/* ══════════════════════════════════════════════════════════
   TokenAPI Gateway - Modern Dark Theme
   ══════════════════════════════════════════════════════════ */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --text-primary: #e8e8f0;
  --text-secondary: #9090a8;
  --text-muted: #606078;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.3);
  --green: #00d2a0;
  --orange: #fbbf24;
  --red: #ef4444;
  --blue: #60a5fa;
  --border: #2a2a40;
  --border-light: #3a3a55;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ─── Navigation ─── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  height: 64px;
}
.navbar .container {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  display: flex; align-items: center;
  gap: 8px; text-decoration: none;
  font-size: 1.35rem; font-weight: 800;
  color: var(--text-primary);
}
.brand-icon { font-size: 1.5rem; }
.brand-accent { color: var(--accent-light); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 8px 20px; border-radius: 8px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent-light); }
.mobile-menu-btn {
  display: none;
  background: none; border: none;
  color: var(--text-primary);
  font-size: 1.5rem; cursor: pointer;
}

/* ─── Hero ─── */
.hero {
  padding: 140px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, var(--accent-glow) 0%, transparent 50%);
  opacity: 0.15;
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-light);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(108, 92, 231, 0.3);
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 56px; }

.btn {
  display: inline-flex; align-items: center;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 1rem; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(108, 92, 231, 0.1);
}

.hero-stats {
  display: flex; gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-value {
  display: block;
  font-size: 2rem; font-weight: 800;
  color: var(--text-primary);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Sections ─── */
.section {
  padding: 80px 0;
}
.section-dark {
  background: var(--bg-secondary);
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: 2rem; font-weight: 700;
  margin-bottom: 12px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ─── Providers ─── */
.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s;
}
.provider-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.15);
}
.provider-logo { font-size: 2.5rem; margin-bottom: 12px; }
.provider-card h3 {
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: 8px;
}
.provider-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}
.provider-meta {
  display: flex; gap: 16px;
  font-size: 0.85rem;
}
.provider-meta span {
  color: var(--text-muted);
}
.provider-meta strong { color: var(--text-primary); }

/* ─── Filter Bar ─── */
.filter-bar {
  display: flex; gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Models Grid ─── */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s;
  position: relative;
}
.model-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.model-card .badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(108, 92, 231, 0.2);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}
.model-card .provider-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.model-card h3 {
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 8px;
}
.model-card .model-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.55;
}
.model-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.model-specs dt {
  color: var(--text-muted);
}
.model-specs dd {
  color: var(--text-primary);
  font-weight: 500;
}
.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.model-tags span {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.model-card.hidden { display: none; }

/* ─── Pricing Table ─── */
.pricing-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.pricing-table thead {
  background: var(--bg-card);
}
.pricing-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.pricing-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.pricing-table tbody tr:hover {
  background: rgba(108, 92, 231, 0.05);
}
.pricing-table td:first-child { font-weight: 600; color: var(--text-primary); }
.pricing-table td:nth-child(2) { color: var(--text-primary); font-weight: 500; }
.pricing-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* ─── Docs ─── */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.doc-icon { font-size: 2rem; margin-bottom: 12px; }
.doc-card h3 {
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 16px;
}

.code-block {
  background: #0d0d1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow-x: auto;
}
.code-block pre {
  padding: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.code-block code { font-family: inherit; }

.endpoints-list { display: flex; flex-direction: column; gap: 10px; }
.endpoint {
  display: flex; align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}
.endpoint code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-primary);
}
.endpoint .desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: auto;
}
.method {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.method.get { background: rgba(0, 210, 160, 0.15); color: var(--green); }
.method.post { background: rgba(96, 165, 250, 0.15); color: var(--blue); }

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ─── Footer ─── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}
.footer-links h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-links a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ─── Responsive ─── */
/* ─── Visitors Analytics ─── */
.visitor-summary {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 40px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.stat-card .stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-light);
  display: block;
  line-height: 1;
}
.visit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.visit-table thead {
  background: var(--bg-card);
}
.visit-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.visit-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.visit-table tbody tr:hover {
  background: rgba(108, 92, 231, 0.05);
}
.visit-table code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--text-primary);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-stats { gap: 24px; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }
  .models-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; gap: 24px; }
  .pricing-table { font-size: 0.8rem; }
  .pricing-table th, .pricing-table td { padding: 10px; }
  .stat-card { padding: 20px 24px; }
}
