@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #09090b;
  --card-bg: #18181b;
  --border: #27272a;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --primary: #ffffff;
  --primary-hover: #e4e4e7;
  --primary-text: #09090b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    color 0.2s ease;
  scroll-behavior: smooth;
  scroll-padding-top: 50px;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 100px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--text-main);
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

p {
  color: var(--text-muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

kbd {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2em 0.4em;
  font-size: 0.85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-main);
}

/* Background Effects */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, #18181b 0%, var(--bg) 70%);
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.08;
  z-index: -1;
}

.orb-1 {
  background: var(--accent);
  width: 400px;
  height: 400px;
  top: -100px;
  left: 20%;
}

.orb-2 {
  background: var(--primary);
  width: 300px;
  height: 300px;
  top: 20%;
  right: 10%;
}

/* Layout */
.app-container {
  width: 100%;
  max-width: 900px;
  padding: 0 5px;
  margin: 0 auto;
}

header {
  text-align: center;
  padding: 5rem 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 9999px;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.logo-badge img {
  width: 24px;
  height: 24px;
}

.logo-badge span {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-main);
  text-transform: uppercase;
}

.text-gradient {
  background: linear-gradient(to right, #ffffff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.partnership-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  transition: all 0.2s ease;
}

.partnership-badge:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

/* Navigation */
#menu {
  position: sticky;
  top: 20px;
  z-index: 100;
  background: rgba(24, 24, 27, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 9999px;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 12px 32px;
  margin: 0 auto 2rem;
  width: fit-content;
  box-shadow: var(--shadow-lg);
}

#menu a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

#menu a:hover {
  color: var(--text-main);
}

/* Main Cards */
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}

/* Steps & Instructions */
.step-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.bookmark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 36px;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 9999px;
  margin: 1.5rem 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
  box-shadow: 0 4px 14px 0 rgba(255, 255, 255, 0.1);
}

.bookmark-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
  color: var(--primary-text);
}

.bookmark-btn:active {
  cursor: grabbing;
  transform: translateY(0);
}

/* Code Blocks */
.code-wrapper {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

pre {
  margin: 0;
  padding: 1.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  color: #e4e4e7;
  overflow-x: auto;
  line-height: 1.6;
}

.copy-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Info & Warnings */
.info-box,
.warning-box {
  padding: 16px 20px;
  border-radius: 12px;
  margin: 1rem 0;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
}

.info-box {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.warning-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

/* Lists */
ol {
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

li {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

li strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Attribution Card */
.attribution-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
  transition: border-color 0.3s;
}

.attribution-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

/* Docs Grid */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.doc-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.doc-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}

.doc-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  header {
    padding: 3rem 0 2rem;
  }
  .tool-card {
    padding: 1.5rem;
  }
  .attribution-card {
    flex-direction: column;
    text-align: center;
  }
  #menu {
    gap: 1rem;
    padding: 10px 20px;
    width: 100%;
    justify-content: space-around;
    border-radius: 12px;
  }
}

/* Markdown Content */
#markdown-content {
  color: var(--text-muted);
}

#markdown-content h1,
#markdown-content h2,
#markdown-content h3 {
  color: var(--text-main);
  margin-top: 2rem;
}

#markdown-content p {
  margin-bottom: 1rem;
}

/* Ads Sidebar Container Adjustments */
.aads-sidebar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: 600px;
  z-index: 50;
  transition: opacity 0.3s ease;
}

.aads-sidebar.left {
  left: 20px;
}
.aads-sidebar.right {
  right: 20px;
}

@media screen and (max-width: 1400px) {
  .aads-sidebar {
    display: none;
  }
}

.aads-sidebar-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.aads-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  transition: background 0.2s;
  border: 1px solid var(--border);
}

.aads-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.aads-close-btn svg {
  fill: var(--text-main);
  width: 10px;
  height: 10px;
}

.aads-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aads-frame iframe {
  border: 0;
  width: 100%;
  height: 100%;
  max-height: 500px;
}

#aads-hide-left:checked ~ .aads-sidebar-content,
#aads-hide-right:checked ~ .aads-sidebar-content {
  display: none;
}

#aads-hide-left:checked ~ .aads-sidebar,
#aads-hide-right:checked ~ .aads-sidebar {
  pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-card,
.attribution-card,
.docs-grid {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Consent Overlay */
.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.cookie-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.showcase {
  width: 100%;
  height: fit-content;
  object-fit: contain;
  max-width: 400px;
  display: block;
  margin-inline: auto;
}
.cookie-consent {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 90%;
  max-width: 420px;
  z-index: 9001;
  opacity: 0;
  transition: all 0.3s;
  text-align: center;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

.cookie-consent.show {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.cookie-consent-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: var(--primary);
  color: var(--primary-text);
  transition: background 0.2s;
}

.cookie-consent-btn.decline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.cookie-consent-btn:hover:not(.decline) {
  background: var(--primary-hover);
}

.cookie-consent-btn.decline:hover {
  background: rgba(255, 255, 255, 0.05);
}

#instructions-header {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
