@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-dark: #070a12;
  --bg-card: rgba(15, 23, 42, 0.8);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.4);

  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 60%, rgba(6, 182, 212, 0.08) 0%, transparent 45%);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  padding-bottom: 80px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ── HEADER ──────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  background: rgba(7, 10, 18, 0.85);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 32px;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #fff 0%, #a5f3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  color: white;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  -webkit-text-fill-color: initial;
  letter-spacing: 0.03em;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%   { transform: scale(0.95); }
  70%  { transform: scale(1.1); }
  100% { transform: scale(0.95); }
}

/* ── MAIN ────────────────────────────────────── */
main {
  max-width: 1100px;
  margin: 36px auto 0;
  padding: 0 20px;
}

/* ── HERO ────────────────────────────────────── */
.hero {
  text-align: center;
  margin-bottom: 44px;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff 0%, #a5f3fc 60%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.6s ease both;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
}

.stat-badge strong { color: var(--accent-cyan); }

.stat-separator {
  color: var(--border-glass);
  font-size: 0.85rem;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── STEP BLOCK ──────────────────────────────── */
.step-block {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(16px);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.step-num {
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* ── FILTERS BLOCK ───────────────────────────── */
.filters-block {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.filter-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
  width: 100%;
}

.filter-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 24px 0;
}

.filter-note {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
  width: 100%;
}

/* Category pills */
.pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: 30px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  white-space: nowrap;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--border-glow);
}

.pill-btn.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* Pricing toggle */
.pricing-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
}

.toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 9px 22px;
  border-radius: 30px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  white-space: nowrap;
}

.toggle-btn.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.toggle-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--border-glow);
}

/* ── WINNER CARD ─────────────────────────────── */
.winner-section { margin-bottom: 24px; }

.winner-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 2px solid var(--accent-emerald);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  box-shadow: 0 12px 40px -12px rgba(16, 185, 129, 0.25);
  transition: border-color 0.3s ease;
}

.winner-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-emerald);
  font-weight: 700;
  margin-bottom: 10px;
}

.winner-name {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.15;
  word-break: break-word;
}

.winner-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 120px;
}

/* Score chip with tooltip gets a subtle hint */
.stat-chip[title] {
  cursor: help;
  border-color: rgba(99, 102, 241, 0.25);
}

.stat-chip[title]:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.5);
}

.stat-chip-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.stat-chip-value {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.stat-chip-value.cyan  { color: var(--accent-cyan); }
.stat-chip-value.green { color: var(--accent-emerald); }

.winner-sources {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.winner-sources a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  background: rgba(6, 182, 212, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  transition: all 0.2s ease;
}

.winner-sources a:hover { background: rgba(6, 182, 212, 0.25); color: #fff; }

.winner-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  flex-shrink: 0;
}

.winner-price-block { text-align: right; }

.winner-price-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.winner-price {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  white-space: nowrap;
  line-height: 1;
}

.winner-price.is-free { color: var(--accent-emerald); }

.primary-cta-btn {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #000;
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.primary-cta-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

.winner-card.no-match {
  border-color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}

.winner-card.no-match .winner-label { color: var(--text-dim); }
.winner-card.no-match .winner-name  { color: var(--text-muted); font-size: 1.4rem; }

/* ── RANKING TABLE SECTION — MODERN REVAMP ───────────────────── */
.table-section {
  padding: 28px;
}

.table-step-num {
  background: transparent !important;
  border: 1px solid var(--border-glass) !important;
  color: var(--text-muted) !important;
}

.table-subtitle {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.table-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: rgba(10, 15, 29, 0.7);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  min-width: 720px;
}

thead th {
  background: rgba(15, 23, 42, 0.95);
  padding: 16px 20px;
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

tbody tr {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid var(--border-glass);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr td {
  padding: 16px 20px;
  font-size: 0.9rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tbody tr:hover td {
  background: rgba(99, 102, 241, 0.08);
}

/* ── RANK BADGES ────────────────────────────── */
.rank-badge-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
}

/* #1 Champion Row - Neon Glow Highlight */
tbody tr.rank-first td {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%) !important;
  border-bottom-color: rgba(16, 185, 129, 0.3);
}

tbody tr.rank-first .rank-badge-box {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #000;
  border: none;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
}

tbody tr.rank-second .rank-badge-box {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  color: #000;
  border: none;
}

tbody tr.rank-third .rank-badge-box {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
}

/* ── MODEL CELL & PROVIDER BADGES ────────────── */
.model-cell-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.model-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.model-name-text {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
}

.provider-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.model-id-text {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* ── CPT PRICE CELL ──────────────────────────── */
.cpt-price-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-cyan);
}

.cpt-price-badge.is-free {
  color: var(--accent-emerald);
}

.cpt-subtext {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-main);
  font-weight: 500;
}

/* ── CONTEXT PILL TAG ────────────────────────── */
.ctx-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ── VISUAL SCORE GAUGE ──────────────────────── */
.score-gauge-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
}

.score-num {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
  min-width: 32px;
}

.score-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  transition: width 0.4s ease;
}

/* ── SOURCE BUTTON ───────────────────────────── */
.source-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.source-btn-pill:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ── BACK TO TOP ─────────────────────────────── */
.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 30px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 99;
}

.back-to-top-btn.visible { opacity: 1; pointer-events: auto; }
.back-to-top-btn:hover   { transform: translateY(-3px); background: var(--accent-cyan); }

/* ── FOOTER ──────────────────────────────────── */
/* ── METHODOLOGY & FAQ SECTION ───────────────── */
.seo-faq-section {
  margin-top: 40px;
  padding: 28px 32px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.faq-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.2s ease;
}

.faq-card:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.faq-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-card p {
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

footer {
  max-width: 1100px;
  margin: 60px auto 0;
  padding: 24px;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.83rem;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
  header { padding: 14px 20px; }
  .nav-container { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero h1 { font-size: 2.4rem; }
  .winner-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .winner-right { align-items: flex-start; }
  .winner-price { font-size: 2rem; }
}

@media (max-width: 600px) {
  main { padding: 0 12px; }
  .step-block { padding: 16px; }
  .hero h1 { font-size: 1.9rem; }
  .winner-name { font-size: 1.6rem; }
  .winner-price { font-size: 1.7rem; }
  .pill-btn { padding: 8px 14px; font-size: 0.82rem; }
  .winner-stats { gap: 8px; }
  .stat-chip { min-width: 100px; }
}
