/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: #08080c;
  color: #d4d4d8;
  min-height: 100vh;
  line-height: 1.5;
}
::selection { background: #3b82f630; color: #3b82f6; }
a { color: #3b82f6; text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; border: none; }
button:active { transform: scale(0.98); }
input:focus, textarea:focus { outline: 2px solid #3b82f6; outline-offset: -2px; }
code, .mono { font-family: 'JetBrains Mono', monospace; }
pre { font-family: 'JetBrains Mono', monospace; }
img { max-width: 100%; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #08080c; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.fade-up { animation: fadeUp 0.4s ease both; }
.fade-in { animation: fadeIn 0.3s ease both; }
.pulse { animation: pulse 1.5s ease infinite; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

/* ── Nav ── */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 32px; border-bottom: 1px solid #1c1c26;
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,8,12,0.92); backdrop-filter: blur(12px);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: #d4d4d8;
}
.nav-logo-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: #2563eb;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  overflow: hidden;
}
.nav-logo-icon svg { width: 28px; height: 28px; }
.nav-logo-text { font-size: 15px; font-weight: 700; }
.nav-links { display: flex; gap: 6px; }
.nav-btn {
  padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500;
  background: transparent; color: #71717a;
}
.nav-btn:hover { color: #a1a1aa; background: #1c1c26; }
.nav-btn.active { color: #d4d4d8; background: #1c1c26; }
.nav-btn.accent { background: #2563eb; color: #fff; }
.nav-btn.accent:hover { background: #1d4ed8; }

/* ── Card ── */
.card {
  background: #0d0d12; border: 1px solid #1c1c26; border-radius: 14px;
  overflow: hidden; margin-bottom: 16px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #1c1c26;
}
.card-header h3 { font-size: 14px; font-weight: 700; color: #a1a1aa; }
.card-body { padding: 20px; }

/* ── Stat Card ── */
.stat {
  background: #0d0d12; border: 1px solid #1c1c26; border-radius: 14px; padding: 22px 20px;
}
.stat-label { font-size: 12px; color: #52525b; font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat-sub { font-size: 11px; color: #3f3f46; margin-top: 6px; }

/* ── Buttons ── */
.btn {
  padding: 12px 24px; border-radius: 10px; font-size: 15px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #1c1c26; color: #52525b; cursor: not-allowed; }
.btn-secondary { background: #1c1c26; color: #d4d4d8; }
.btn-secondary:hover { background: #27272a; }
.btn-ghost { background: transparent; color: #71717a; border: 1px solid #27272a; padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-ghost:hover { color: #a1a1aa; border-color: #3f3f46; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; font-weight: 600; }
.btn-copy { padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; border: 1px solid #2a2a35; background: transparent; color: #52525b; }
.btn-copy.copied { border-color: #3b82f6; color: #3b82f6; background: #3b82f615; }

/* ── Input ── */
.input {
  width: 100%; padding: 14px 16px; border-radius: 10px;
  border: 1px solid #1c1c26; background: #08080c;
  color: #d4d4d8; font-size: 15px; font-family: 'DM Sans', sans-serif;
}
.input.mono { font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.input-label { font-size: 13px; font-weight: 500; color: #71717a; margin-bottom: 8px; display: block; }

/* ── Code Block ── */
.code-wrap { position: relative; margin-top: 8px; }
.code-wrap .code-actions {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: flex; gap: 6px; align-items: center;
}
.code-wrap .code-lang { font-size: 10px; color: #52525b; text-transform: uppercase; }
.code-block {
  font-size: 12.5px; line-height: 1.7; color: #a1a1aa;
  padding: 18px 20px; background: #0a0a0f; border-radius: 10px;
  border: 1px solid #1c1c26; overflow-x: auto; white-space: pre;
}

/* ── Code Tabs ── */
.code-tabs-wrap { margin-top: 8px; }
.code-tabs-bar {
  display: flex; gap: 4px; margin-bottom: -1px; position: relative; z-index: 1;
}
.code-tab {
  padding: 7px 14px; border-radius: 8px 8px 0 0; font-size: 12px; font-weight: 600;
  border: 1px solid #1c1c26; border-bottom: none; background: #08080c; color: #52525b;
  font-family: 'DM Sans', sans-serif;
}
.code-tab.active { background: #0a0a0f; color: #3b82f6; border-color: #1c1c26; }
.code-tab-panel .code-wrap { margin-top: 0; }
.code-tab-panel .code-block { border-radius: 0 10px 10px 10px; }

/* ── Syntax Highlighting ── */
.hl-kw { color: #c084fc; }
.hl-st { color: #34d399; }
.hl-cm { color: #6b7280; }
.hl-nm { color: #fbbf24; }
.hl-lb { color: #60a5fa; }

/* ── Pill / Tab ── */
.pill {
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid #1c1c26; background: transparent; color: #71717a;
}
.pill.active { border-color: #3b82f6; background: #3b82f612; color: #3b82f6; }

/* ── Table ── */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 10px 14px; color: #52525b; font-weight: 500;
  border-bottom: 1px solid #1c1c26;
}
.table td { padding: 10px 14px; border-bottom: 1px solid #1c1c26; color: #71717a; }
.table .green { color: #3b82f6; }
.table .yellow { color: #f59e0b; }
.table .red { color: #ef4444; }

/* ── Pricing Cards ── */
.price-card {
  padding: 32px; border-radius: 16px; position: relative;
  border: 1px solid #1c1c26; background: #0d0d12;
  transition: transform 0.2s;
}
.price-card:hover { transform: translateY(-4px); }
.price-card.popular { border: 2px solid #3b82f6; background: #3b82f608; }
.price-card .badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #2563eb; color: #fff; padding: 4px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 700;
}
.price-card .plan-name { font-size: 14px; font-weight: 600; color: #71717a; margin-bottom: 8px; }
.price-card .plan-price { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.price-card .plan-price span { font-size: 14px; color: #52525b; font-weight: 400; }
.price-card .plan-tokens { font-size: 13px; color: #3b82f6; margin-bottom: 20px; }
.price-card .plan-feature { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #a1a1aa; margin-bottom: 8px; }
.price-card .plan-feature .check { color: #3b82f6; font-size: 14px; }
.price-card .plan-cta {
  width: 100%; padding: 12px 0; border-radius: 10px; font-size: 15px; font-weight: 600;
  margin-top: 20px; background: #1c1c26; color: #d4d4d8;
}
.price-card.popular .plan-cta { background: #2563eb; color: #fff; }

/* ── Hero ── */
.hero { padding: 60px 0; text-align: center; }
.hero-badge {
  display: inline-block; padding: 6px 14px; border-radius: 20px;
  background: #3b82f615; color: #3b82f6; font-size: 13px;
  font-weight: 600; margin-bottom: 20px; letter-spacing: 0.04em;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 20px;
  background: linear-gradient(180deg, #fff 30%, #666 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 18px; color: #71717a; max-width: 500px; margin: 0 auto; line-height: 1.6; }

/* ── Dashboard Sidebar ── */
.sidebar {
  width: 220px; min-height: 100vh; border-right: 1px solid #1c1c26;
  background: #0a0a0f; padding: 20px 0; display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; z-index: 50;
}
.sidebar-header { padding: 0 16px 24px; border-bottom: 1px solid #1c1c26; margin-bottom: 12px; }
.sidebar-nav { flex: 1; padding: 0 8px; }
.sidebar-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; text-align: left;
  background: transparent; color: #71717a; font-size: 13.5px; font-weight: 500;
  margin-bottom: 2px;
}
.sidebar-item:hover { color: #a1a1aa; background: #1c1c2640; }
.sidebar-item.active { background: #3b82f612; color: #3b82f6; font-weight: 600; }
.sidebar-item .icon { font-size: 14px; width: 18px; text-align: center; }
.sidebar-footer { padding: 16px; border-top: 1px solid #1c1c26; }
.sidebar-email { font-size: 11px; color: #52525b; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; }
.main-content { margin-left: 220px; padding: 32px 40px; max-width: 920px; }

/* ── Deposit amounts ── */
.deposit-btn {
  padding: 12px 22px; border-radius: 10px; font-size: 15px; font-weight: 700;
  border: 1px solid #1c1c26; background: #08080c; color: #71717a;
}
.deposit-btn.active { border: 2px solid #3b82f6; background: #3b82f612; color: #3b82f6; }

/* ── Auth page ── */
.auth-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; }
.auth-box { width: 100%; max-width: 420px; padding: 24px; }
.auth-sent-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 24px;
  background: #3b82f620; display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}

/* ── Mobile bottom nav ── */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,15,0.96); backdrop-filter: blur(12px);
  border-top: 1px solid #1c1c26;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 14px; border-radius: 8px; background: transparent;
  color: #52525b; font-size: 10px; font-weight: 600; border: none;
  font-family: 'DM Sans', sans-serif; min-width: 60px;
}
.mobile-nav-btn .icon { font-size: 16px; }
.mobile-nav-btn.active { color: #3b82f6; background: #3b82f610; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; justify-content: space-around; }
  .main-content { margin-left: 0; padding: 16px 14px 80px; }
  .nav { padding: 10px 14px; }
  .nav-links { display: none; }
  .nav-logo-text { font-size: 14px; }

  /* Cards */
  .card-header { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .card-header h3 { font-size: 13px; }

  /* Stats */
  .stat { padding: 16px 14px; }
  .stat-value { font-size: 20px; }

  /* Tables */
  .table { font-size: 11px !important; }
  .table td, .table th { padding: 6px 8px; }
  .card-body .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

  /* Code blocks */
  .code-block { font-size: 11px; padding: 12px 14px; }
  .code-tab { padding: 6px 10px; font-size: 11px; }
  .code-wrap .code-actions { top: 6px; right: 6px; gap: 4px; }
  .code-wrap .code-lang { font-size: 9px; }
  .code-wrap .btn-copy { padding: 3px 7px; font-size: 10px; }

  /* Buttons */
  .btn { padding: 10px 18px; font-size: 14px; }
  .btn-sm { padding: 5px 10px; font-size: 11px; }
  .deposit-btn { padding: 10px 16px; font-size: 14px; }

  /* Dashboard overview 2x2 grid → stack */
  .main-content > div > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Auth */
  .auth-box { padding: 16px; }

  /* Inputs */
  .input { padding: 12px 14px; font-size: 14px; }

  h2 { font-size: 20px !important; }
}

/* ── Benchmark page extras ── */
.bench-mobile-nav {
  display: none;
  position: sticky; top: 0; z-index: 40;
  background: rgba(8,8,12,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid #1c1c26;
  padding: 12px 16px;
  overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.bench-mobile-nav a {
  display: inline-block; padding: 6px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #71717a;
  text-decoration: none; margin-right: 4px;
}
.bench-mobile-nav a.active { background: #3b82f612; color: #3b82f6; }
.bench-mobile-nav a:hover { color: #a1a1aa; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .table { min-width: 500px; }

.model-tag {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 12px;
  padding: 2px 8px; border-radius: 4px;
  display: inline-block;
}
.model-tag.minilm { color: #6366f1; background: #6366f115; border: 1px solid #6366f130; }
.model-tag.qwen { color: #3b82f6; background: #3b82f615; border: 1px solid #3b82f630; }
.model-tag.te3 { color: #71717a; background: #71717a15; border: 1px solid #71717a30; }
.model-tag.source { color: #ef4444; background: #ef444415; border: 1px solid #ef444430; }

.perf-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
}

.highlight-row { background: #3b82f608; }

@media (max-width: 768px) {
  .bench-mobile-nav { display: flex; gap: 4px; }
  .bench-stat-grid { grid-template-columns: 1fr !important; }
  .bench-dual-col { grid-template-columns: 1fr !important; }
  .perf-grid { grid-template-columns: 1fr 1fr; }
}
