:root {
  --bg: #030712;
  --bg-card: rgba(11, 17, 33, 0.7);
  --bg-hover: rgba(31, 41, 55, 0.8);
  --fg: #f8fafc;
  --muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-md: 0 12px 32px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 80px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: auto;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Typography */
h1, h2, h3 { font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.muted { color: var(--muted); }
.gradient-text {
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Background Orbs */
.bg-orbs {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}
.orb-1 { top: -10%; left: -10%; width: 60vw; height: 60vw; background: #6366f1; animation-delay: 0s; }
.orb-2 { bottom: -20%; right: -10%; width: 50vw; height: 50vw; background: #c084fc; animation-delay: -5s; }
.orb-3 { top: 40%; left: 40%; width: 40vw; height: 40vw; background: #38bdf8; animation-delay: -10s; }
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* Utilities */
.hidden { display: none !important; }
.w-full { width: 100%; }

/* Dashboard Loader */
.dash-loader {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.25s ease;
}
.dash-loader.fade-out { opacity: 0; pointer-events: none; }
.spinner {
  width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.05);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Nav */
.nav {
  position: sticky; top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  z-index: 100;
}
.verify-banner {
  position: sticky; top: 0;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  padding: 8px 16px;
  display: flex; align-items: center; justify-content: center;
  gap: 12px; font-size: 0.85rem; font-weight: 500; color: white;
  z-index: 110;
}
.verify-banner + .nav {
  top: 0;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; justify-content: space-between; align-items: center;
}
.logo { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; }
.logo-icon { width: 24px; height: 24px; display: inline-block; flex-shrink: 0; }
.nav-links { display: flex; gap: 24px; align-items: center; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }
.btn-nav {
  padding: 8px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.btn-nav:hover { background: rgba(255,255,255,0.1); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  color: white;
  padding: 12px 28px; border-radius: 999px;
  font-weight: 600; font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-md), inset 0 2px 4px rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.btn-primary:hover { 
  transform: translateY(-3px) scale(1.03); 
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  filter: brightness(1.15);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); padding: 12px 24px; font-weight: 500;
  border-radius: 999px; font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  transition: all 0.2s;
}
.btn-ghost:hover { 
  color: white; 
  background: rgba(255,255,255,0.08); 
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.btn-sm { 
  padding: 8px 16px; font-size: 0.85rem; border-radius: 999px; 
  background: rgba(255,255,255,0.05); color: var(--fg); font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s;
}

/* Header User Menu */
.user-menu-wrap { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.user-menu-btn:hover { background: rgba(255,255,255,0.1); color: white; transform: scale(1.05); }

.user-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0;
  width: 240px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  overflow: hidden; z-index: 200;
  animation: slideDown 0.2s ease-out forwards;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-dropdown-header {
  padding: 16px; border-bottom: 1px solid var(--border);
  font-size: 0.85rem; font-weight: 500; color: white;
  word-break: break-all; background: rgba(255,255,255,0.02);
}
.user-dropdown-body { padding: 8px; }
.dropdown-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 0.9rem; font-weight: 500; color: var(--fg);
  border-radius: var(--radius-sm); transition: background 0.2s;
}
.dropdown-item:hover { background: rgba(255,255,255,0.05); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: rgba(239, 68, 68, 0.1); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  color: white;
  padding: 12px 24px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm), inset 0 1px 1px rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-primary:hover { 
  transform: translateY(-2px) scale(1.02); 
  box-shadow: var(--shadow-md), var(--shadow-glow);
  filter: brightness(1.1);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); padding: 10px 20px; font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.btn-ghost:hover { 
  color: white; 
  background: rgba(255,255,255,0.05); 
  border-color: rgba(255,255,255,0.1);
}

.btn-sm { 
  padding: 8px 14px; font-size: 0.85rem; border-radius: var(--radius-sm); 
  background: var(--bg-hover); color: var(--fg); font-weight: 600;
  transition: all 0.2s;
}
.btn-sm:hover { filter: brightness(1.2); transform: translateY(-1px); }
.btn-sm.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.btn-sm.danger:hover { background: var(--danger); color: white; }
.link-btn { color: var(--accent); font-weight: 600; text-decoration: none; transition: opacity 0.2s; }
.link-btn:hover { opacity: 0.8; text-decoration: underline; }

main { padding-top: 64px; }

/* ─── Hero ────────────────────────────────────────── */
.hero {
  max-width: 1000px; margin: 120px auto 80px; padding: 0 24px;
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%; width: 800px; height: 400px;
  background: radial-gradient(ellipse at top, rgba(99,102,241,0.15), transparent 70%);
  transform: translateX(-50%); pointer-events: none; z-index: -1;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 20px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; color: #cbd5e1;
  margin-bottom: 32px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.05), var(--shadow-sm);
  backdrop-filter: blur(8px);
}
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #38bdf8;
  box-shadow: 0 0 12px #38bdf8;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}
.hero-title { font-size: clamp(3.5rem, 8vw, 6.5rem); letter-spacing: -0.04em; margin-bottom: 24px; line-height: 1.05; }
.hero-sub { font-size: 1.35rem; color: var(--muted); max-width: 680px; margin: 0 auto 48px; line-height: 1.6; }
.hero-actions { display: flex; gap: 20px; justify-content: center; align-items: center; margin-bottom: 80px; }
.hero-stats {
  display: flex; justify-content: center; align-items: center; gap: 48px;
  padding-top: 48px; border-top: 1px solid rgba(255,255,255,0.05);
  max-width: 900px; margin: 0 auto 80px;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-val { font-size: 1.75rem; font-weight: 800; color: white; letter-spacing: -0.02em; }
.stat-label { font-size: 0.9rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.08); }

/* ─── Preview Tool ────────────────────────────────── */
.preview-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  max-width: 1000px; margin: 0 auto;
}
.preview-toolbar {
  display: flex; align-items: center; padding: 12px 20px;
  background: rgba(0,0,0,0.2); border-bottom: 1px solid var(--border);
}
.preview-dots { display: flex; gap: 6px; margin-right: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ed6a5e; }
.dot-yellow { background: #f4bf4f; }
.dot-green { background: #61c554; }
.preview-toolbar-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; margin-right: auto; }
.preview-controls-inline { display: flex; gap: 8px; }
.preview-controls-inline input, .preview-controls-inline select {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: white; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.85rem; outline: none; transition: border-color 0.2s;
}
.preview-controls-inline input { width: 140px; }
.preview-controls-inline select { cursor: pointer; }
.preview-controls-inline input:focus, .preview-controls-inline select:focus { border-color: var(--accent); }

.og-preview-frame {
  padding: 40px; display: flex; justify-content: center; align-items: center;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 12px);
}
.og-preview {
  width: 100%; max-width: 600px; aspect-ratio: 1200 / 630;
  border-radius: 12px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  background: #000; display: flex; justify-content: center; align-items: center;
}
.og-preview svg { width: 100%; height: 100%; display: block; }

.url-strip {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  background: rgba(0,0,0,0.4); border-top: 1px solid var(--border);
}
.url-method { font-size: 0.75rem; font-weight: 700; color: var(--success); background: rgba(34, 197, 94, 0.1); padding: 2px 6px; border-radius: 4px; }
.url-strip code { flex: 1; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.copy-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm); color: white; font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.1); }

/* ─── Bento Grid ──────────────────────────────────── */
.bento-section { max-width: 1200px; margin: 160px auto; padding: 0 24px; }
.section-title { font-size: 3.5rem; text-align: center; margin-bottom: 80px; letter-spacing: -0.03em; }
.bento-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.bento-card {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 40px; border-radius: var(--radius-lg); position: relative; overflow: hidden;
  box-shadow: var(--shadow-md), inset 0 1px 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}
.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: var(--shadow-lg), inset 0 1px 1px rgba(255,255,255,0.1);
}
.bento-wide { grid-column: span 2; }
.bento-icon { 
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; font-size: 1.8rem; margin-bottom: 24px; 
  background: rgba(255,255,255,0.05); border-radius: var(--radius-md);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.1);
}
.bento-card h3 { font-size: 1.4rem; margin-bottom: 16px; color: white; }
.bento-card p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.bento-tag { position: absolute; top: 40px; right: 40px; font-size: 0.8rem; font-weight: 600; color: #38bdf8; background: rgba(56,189,248,0.1); padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(56,189,248,0.2); }

/* ─── Code Section ────────────────────────────────── */
.code-section {
  max-width: 1200px; margin: 160px auto; padding: 0 24px;
}
.code-section-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.code-section-text h2 { font-size: 3.5rem; margin-bottom: 32px; letter-spacing: -0.03em; }
.code-section-text p { font-size: 1.25rem; color: var(--muted); margin-bottom: 40px; line-height: 1.7; }
.tabs { display: flex; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1px; margin-bottom: 24px; }
.tab {
  padding: 10px 20px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; font-size: 1.05rem; transition: color 0.2s;
}
.tab.active { color: white; border-bottom-color: var(--accent); }
.tab:hover:not(.active) { color: white; }

.code-panel {
  background: #0d1117; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.05);
}
.code-block-header {
  padding: 16px 20px; background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted);
  display: flex; align-items: center; gap: 16px;
}
.code-block-header::before {
  content: ''; display: block; width: 48px; height: 12px;
  background-image: radial-gradient(circle at 6px 6px, #ff5f56 6px, transparent 6px), radial-gradient(circle at 24px 6px, #ffbd2e 6px, transparent 6px), radial-gradient(circle at 42px 6px, #27c93f 6px, transparent 6px);
  background-repeat: no-repeat; opacity: 0.8;
}
.code-block pre { margin: 0; padding: 24px; overflow-x: auto; }
.code-block code { font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.6; color: #e2e8f0; }

/* Basic syntax highlighting */
.tok-tag { color: #5eead4; }
.tok-attr { color: #7dd3fc; }
.tok-str { color: #a5b4fc; }
.tok-kw { color: #f472b6; }
.tok-fn { color: #818cf8; }
.tok-const { color: #fbbf24; }

/* ─── CTA Section ─────────────────────────────────── */
.cta-section { padding: 160px 24px; text-align: center; }
.cta-inner {
  max-width: 900px; margin: 0 auto; background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08); padding: 100px 40px; border-radius: 32px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg), inset 0 1px 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.cta-glow {
  position: absolute; top: -50%; left: 50%; width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 60%);
  transform: translate(-50%, -10%); pointer-events: none;
}
.cta-section h2 { font-size: 4rem; margin-bottom: 24px; position: relative; z-index: 1; letter-spacing: -0.03em; }
.cta-section p { font-size: 1.35rem; color: var(--muted); margin-bottom: 48px; position: relative; z-index: 1; }
.btn-primary.large { padding: 16px 36px; font-size: 1.25rem; border-radius: 999px; position: relative; z-index: 1; }

/* ─── Footer ──────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 24px; font-size: 0.9rem; color: var(--muted); }
.footer-links a:hover { color: white; }

/* ─── Auth Page (Dashboard entry) ─────────────────── */
.auth-body { min-height: 100vh; }
.auth-page { display: flex; width: 100%; min-height: 100vh; }
.auth-left {
  flex: 1; padding: 48px; display: flex; flex-direction: column; position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  border-right: 1px solid var(--border);
}
.auth-logo { margin-bottom: auto; }
.auth-left-content { margin: auto 0; max-width: 480px; }
.auth-left-content h2 { font-size: 3rem; margin-bottom: 24px; }
.auth-left-content p { font-size: 1.1rem; color: var(--muted); margin-bottom: 40px; }
.auth-perks { list-style: none; margin-bottom: 60px; display: grid; gap: 16px; }
.auth-perks li { display: flex; align-items: center; gap: 12px; font-size: 1rem; color: #cbd5e1; }
.perk-icon { color: var(--accent); }

.auth-preview-wrap {
  position: relative; background: rgba(0,0,0,0.3); padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--border);
  transform: rotate(-2deg); transition: transform 0.3s;
}
.auth-preview-wrap:hover { transform: rotate(0deg); }
.auth-preview-badge { position: absolute; top: -12px; right: 20px; background: var(--accent); color: white; font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; }
.auth-og-mini { width: 100%; aspect-ratio: 1200 / 630; background: #0f172a; border-radius: 8px; background-image: radial-gradient(circle at top right, #38bdf8 0%, transparent 50%); position: relative; overflow: hidden; }

.auth-right {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px;
}
.auth-card {
  width: 100%; max-width: 440px; background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08); padding: 40px; border-radius: var(--radius-lg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 32px 64px rgba(0,0,0,0.3);
}
.auth-card-tabs { display: flex; gap: 8px; margin-bottom: 32px; background: rgba(0,0,0,0.2); padding: 4px; border-radius: var(--radius-sm); }
.auth-tab { flex: 1; padding: 8px 0; Text-align: center; border-radius: 4px; color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: all 0.2s; }
.auth-tab.active { background: rgba(255,255,255,0.1); color: white; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

.auth-form-header { margin-bottom: 32px; text-align: center; }
.auth-form-header h3 { font-size: 1.5rem; margin-bottom: 8px; }
.auth-form-sub { color: var(--muted); font-size: 0.9rem; }

.field { margin-bottom: 24px; text-align: left; }
.field label { 
  display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 700; 
  color: #94a3b8; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; 
}
.field-optional { color: var(--muted); font-size: 0.75rem; text-transform: none; font-weight: 400; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 14px; color: var(--muted); transition: color 0.2s; }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  color: white; padding: 14px 16px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 0.95rem; outline: none; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.field .input-wrap input { padding-left: 40px; }
.field select { padding-left: 14px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.field input:focus, .field select:focus, .field textarea:focus { 
  border-color: var(--accent); 
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15), 0 0 20px rgba(99, 102, 241, 0.1);
  background: rgba(0,0,0,0.5);
}
.field input:focus + .input-icon { color: var(--accent); }
.field input::placeholder { color: #475569; }

.btn-arrow { transition: transform 0.2s; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.auth-switch { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--muted); }

.dash-layout {
  max-width: 1400px; margin: 0 auto; display: flex; gap: 40px;
  padding: 20px 24px 80px; align-items: flex-start;
  min-height: calc(100vh - 64px);
}
.dash-sidebar { width: 240px; flex-shrink: 0; position: sticky; top: 80px; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 40px; }
.dash-navlink {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-radius: var(--radius-md); color: var(--muted);
  font-weight: 500; font-size: 0.95rem; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2px;
}
.dash-navlink:hover { 
  color: white; background: rgba(255,255,255,0.05); 
  transform: translateX(4px); 
}
.dash-navlink.active { 
  color: white; background: rgba(255,255,255,0.1); 
  font-weight: 600; 
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}
.dash-nav-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 16px 0; }

.dash-plan-box { 
  background: rgba(255,255,255,0.02); border: 1px solid var(--border); 
  padding: 20px; border-radius: var(--radius-md); transition: all 0.3s;
}
.dash-plan-box.premium {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(192, 132, 252, 0.05) 100%);
  border-color: rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: relative; overflow: hidden;
}
.dash-plan-box.premium::after {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(99, 102, 241, 0.1) 25%, transparent 50%);
  animation: rotate 10s linear infinite; pointer-events: none;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.plan-label { font-size: 0.85rem; font-weight: 600; color: white; text-transform: uppercase; letter-spacing: 0.5px; }
.plan-meter-wrap { height: 8px; background: rgba(0,0,0,0.5); border-radius: 4px; overflow: hidden; }
.plan-meter-bar { height: 100%; background: linear-gradient(90deg, var(--accent), #c084fc); border-radius: 4px; }
.plan-usage { font-size: 0.8rem; color: var(--muted); }

.dash-main { flex: 1; min-width: 0; min-height: 800px; padding-bottom: 200px; position: relative; }
.dash-footer {
  position: absolute;
  bottom: 32px;
  right: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}
.dash-footer a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.dash-footer a:hover { color: var(--text); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.section-header h2 { font-size: 1.8rem; }
.dash-section { display: flex; flex-direction: column; gap: 40px; }

/* Dashboard: API Keys */
.keys-list { display: flex; flex-direction: column; gap: 20px; }
.key-card { 
  display: flex; justify-content: space-between; align-items: flex-start; 
  background: var(--bg-card); border: 1px solid var(--border); padding: 16px 20px; 
  border-radius: var(--radius-lg); box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.key-card:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); border-color: rgba(99,102,241,0.2); }
.key-inactive { opacity: 0.6; filter: grayscale(0.5); }
.key-name { font-weight: 700; font-size: 1.1rem; color: white; margin-bottom: 12px; }
.key-meta { display: flex; flex-direction: column; gap: 8px; }
.key-prefix, .key-text-revealed { font-family: var(--font-mono); background: rgba(0,0,0,0.3); padding: 2px 8px; border-radius: 4px; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,0.05); }
.reveal-btn, .copy-btn { 
  background: none; border: none; padding: 2px; cursor: pointer; color: var(--muted); 
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.reveal-btn:hover, .copy-btn:hover { color: var(--accent); transform: scale(1.1); }
.reveal-btn svg, .copy-btn svg { width: 14px; height: 14px; }
.revoked-badge { color:var(--danger); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; background: rgba(239,68,68,0.1); border-radius: 4px; border: 1px solid rgba(239,68,68,0.1); }

/* Dashboard: Preview Redesign */
.preview-editor { 
  display: grid; 
  grid-template-columns: 380px 1fr; 
  gap: 48px; 
  align-items: start; /* Prevents columns from stretching each other */
}

.preview-fields { 
  background: var(--bg-card); padding: 32px; 
  border-radius: 20px; border: 1px solid var(--border); 
  display: flex; flex-direction: column; gap: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  min-height: 520px; /* Provides a stable height to reduce shift */
  transition: min-height 0.3s ease;
}

.preview-fields > div {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.endpoint-box {
  background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-top: 16px; transition: border-color 0.2s;
}
.endpoint-box:hover { border-color: rgba(129, 140, 248, 0.3); }
.endpoint-tabs {
  display: flex; gap: 4px;
}
.endpoint-tab {
  background: none; border: none; padding: 12px 16px; font-size: 0.7rem; 
  font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
  text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.2s;
}
.endpoint-tab:hover { color: white; background: rgba(255,255,255,0.03); }
.endpoint-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.endpoint-view.hidden { display: none; }

.endpoint-url {
  padding: 14px 20px; font-family: var(--font-mono); font-size: 0.85rem;
  color: #818cf8; word-break: break-all; line-height: 1.5;
  scrollbar-width: thin;
}
.method-badge {
  font-size: 0.65rem; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  background: rgba(129, 140, 248, 0.1); color: var(--accent);
  border: 1px solid rgba(129, 140, 248, 0.2); text-transform: uppercase;
}

.collapsible-wrapper.open {
  grid-template-rows: 1fr;
}

.collapsible-wrapper > div {
  min-height: 0;
}

#group-dynamic.hidden, #group-signing.hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

#group-dynamic:not(.hidden), #group-signing:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease 0.1s;
}

.preview-result-wrap {
  display: flex; flex-direction: column; gap: 32px;
  background: rgba(255,255,255,0.01); padding: 40px; border-radius: 20px;
  border: 1px solid var(--border); overflow-x: hidden;
}

#unified-preview-container {
  position: relative; border-radius: 12px; overflow: hidden; 
  background: #000; border: 1px solid var(--border);
  aspect-ratio: 1200 / 630; width: 100%;
  max-width: 640px; margin: 0;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
}

#dash-og-preview {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

#dash-og-preview svg {
  max-width: 100%; max-height: 100%;
  width: 100%; height: 100%;
}

#real-preview-img {
  position: absolute; inset: 0; width: 100%; height: 100%; 
  object-fit: contain; display: none; z-index: 10;
}

#refresh-real-btn:hover {
  background: rgba(99,102,241,0.15) !important;
  border-color: rgba(99,102,241,0.4) !important;
  transform: translateY(-1px);
}

#refresh-real-btn:active {
  transform: translateY(0);
}

.spinner {
  width: 32px; height: 32px; border: 3px solid rgba(99,102,241,0.2);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.endpoint-box {
  background: #090b10; border: 1px solid var(--border); 
  border-radius: 12px; overflow: hidden;
}
.endpoint-url::-webkit-scrollbar { width: 4px; }
.endpoint-url::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Dashboard: Usage */
.usage-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.usage-card { 
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(255,255,255,0.02) 100%); 
  border: 1px solid var(--border); padding: 32px; 
  border-radius: var(--radius-lg); text-align: left; 
  box-shadow: 0 12px 32px rgba(0,0,0,0.2); display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow: hidden;
}
.usage-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent); opacity: 0; transition: opacity 0.3s;
}
.usage-card:hover::before { opacity: 1; }
.usage-card-icon { position: absolute; top: 32px; right: 32px; color: var(--accent); opacity: 0.2; }
.usage-card-label { font-size: 0.85rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.usage-card-value { font-size: 3.5rem; font-weight: 800; color: white; letter-spacing: -0.03em; line-height: 1; }
.usage-card-sub { font-size: 0.9rem; color: var(--muted); margin-top: auto; font-weight: 500; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-card { background: var(--bg-card); border: 1px solid var(--border); padding: 32px; border-radius: var(--radius-lg); width: 100%; max-width: 480px; box-shadow: 0 24px 64px rgba(0,0,0,0.5); }
.modal-card h3 { margin-bottom: 24px; font-size: 1.4rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; }

.key-reveal-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #000; border: 1px solid var(--success); padding: 16px; border-radius: var(--radius-sm);
}
.key-reveal-box code { font-family: var(--font-mono); font-size: 1rem; color: var(--success); overflow-x: auto; white-space: nowrap; }

.form-error { background: rgba(239, 68, 68, 0.1); color: var(--danger); padding: 12px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 20px; font-weight: 500; }

@media (max-width: 900px) {
  .hero-title { font-size: 3rem; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-wide { grid-column: 1; }
  .code-section-inner { grid-template-columns: 1fr; }
  .auth-page { flex-direction: column; }
  .auth-left { display: none; }
  .auth-right { padding: 24px; }
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; position: static; }
  .preview-editor { grid-template-columns: 1fr; }
  .docs-layout { flex-direction: column; padding-top: 80px; }
  .docs-sidebar { width: 100%; position: static; margin-bottom: 40px; }
}

/* ─── Docs Layout ─────────────────────────────────── */
.docs-layout {
  max-width: 1200px; margin: 0 auto; display: flex; gap: 60px; padding: 80px 24px 60px;
  align-items: flex-start;
}
.docs-sidebar {
  width: 260px; flex-shrink: 0; position: sticky; top: 80px;
  max-height: calc(100vh - 96px); overflow-y: auto;
  padding-right: 20px;
}
.docs-nav { display: flex; flex-direction: column; gap: 40px; }
.docs-nav-group { display: flex; flex-direction: column; gap: 12px; }
.docs-nav-label { font-size: 0.75rem; font-weight: 800; color: white; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; opacity: 0.5; }
.docs-nav a { color: var(--muted); font-size: 0.95rem; transition: all 0.2s; display: block; }
.docs-nav a:hover { color: white; transform: translateX(2px); }

.docs-main { flex: 1; min-width: 0; max-width: 800px; }
.docs-main h1 { font-size: 3rem; margin-bottom: 16px; letter-spacing: -0.02em; }
.docs-main p.lead { font-size: 1.25rem; color: var(--muted); margin-bottom: 28px; line-height: 1.6; }
.docs-main h2 { font-size: 1.8rem; margin: 40px 0 20px; color: white; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 14px; scroll-margin-top: 84px; }
.docs-main h3 { font-size: 1.25rem; margin: 28px 0 14px; color: white; }
.docs-main p { color: #cbd5e1; margin-bottom: 16px; line-height: 1.7; font-size: 1.05rem; }
.docs-main hr { border: none; border-top: 1px solid var(--border); margin: 44px 0; }
.docs-main ul, .docs-main ol { color: #cbd5e1; margin-bottom: 24px; padding-left: 20px; font-size: 1.05rem; line-height: 1.7; }
.docs-main li { margin-bottom: 8px; }

.endpoint-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
  color: #a5b4fc; font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600;
  padding: 8px 16px; border-radius: var(--radius-sm); margin-bottom: 24px;
}
.docs-main pre {
  background: #0d1117; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 24px; overflow-x: auto; margin-bottom: 32px; box-shadow: var(--shadow-md);
  position: relative;
}
.docs-main pre::before {
  content: ' '; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
}
.docs-main code { font-family: var(--font-mono); font-size: 0.9em; }
.docs-main pre code { font-size: 0.9rem; color: #e2e8f0; line-height: 1.6; }
.docs-main p code, .docs-main li code, .docs-main td code {
  background: rgba(255,255,255,0.05); padding: 4px 8px; border-radius: 4px; color: #f8fafc; font-size: 0.85em; border: 1px solid rgba(255,255,255,0.05);
}

.docs-main table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 40px;
  border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
}
.docs-main th, .docs-main td {
  padding: 16px; text-align: left; border-bottom: 1px solid var(--border);
}
.docs-main tr:last-child td { border-bottom: none; }
.docs-main th { font-weight: 600; color: white; background: rgba(255,255,255,0.02); }
.docs-main td { color: var(--muted); font-size: 0.95rem; }
.docs-main td:first-child { color: white; font-weight: 500; }

.themes-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; margin-top: 32px;
}
.theme-sample {
  aspect-ratio: 1200 / 630; background: #0f172a; border-radius: var(--radius-md);
  border: 1px solid var(--border); position: relative; overflow: hidden;
  background-size: cover; background-position: center; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.theme-label {
  position: absolute; bottom: 12px; left: 12px; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: white; text-transform: uppercase; letter-spacing: 0.5px;
}
/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  z-index: 20000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-success {
  border-left: 4px solid var(--success);
}
.toast-error {
  border-left: 4px solid #ef4444;
}
.toast-info {
  border-left: 4px solid var(--accent);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 600px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 16px;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.hidden { display: none; }

@keyframes slideUp {
  from { transform: translateY(100%) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.cookie-content { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.cookie-content a { color: var(--primary); text-decoration: none; font-weight: 500; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }

@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; bottom: 0; left: 0; right: 0; border-radius: 16px 16px 0 0; max-width: 100%; border-left: 0; border-right: 0; border-bottom: 0; }
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; }
}
