/* ===== CreatorMetrics — Shared Styles ===== */
:root {
  --brand: #6366f1;        /* indigo-500 */
  --brand-light: #818cf8;  /* indigo-400 */
  --brand-dark: #4f46e5;   /* indigo-600 */
  --accent: #06b6d4;       /* cyan-500 */
  --surface: #0f172a;      /* slate-900 */
  --surface-2: #1e293b;    /* slate-800 */
  --surface-3: #334155;    /* slate-700 */
  --text: #f8fafc;         /* slate-50 */
  --text-muted: #94a3b8;   /* slate-400 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section   { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
.text-gradient {
  background: linear-gradient(135deg, var(--brand-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  padding: 16px 0;
}
.nav .container {
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-size: 1.25rem; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.nav-brand svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; color: var(--text); }
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; gap: 16px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface);
    padding: 24px;
    border-bottom: 1px solid var(--surface-3);
  }
  .nav-links.open { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600; font-size: 0.9375rem;
  border: none;
  transition: all 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--surface-3);
}
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--surface-3);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-sm { padding: 8px 18px; font-size: 0.8125rem; }
.btn-lg { padding: 16px 36px; font-size: 1.0625rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.card-flat { transition: none; }
.card-flat:hover { transform: none; box-shadow: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, rgba(99,102,241,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero p.subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 16px auto 32px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Feature Grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

/* ---------- Stats ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
}
.stat-number {
  font-size: 2.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--brand-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }

/* ---------- Comparison Table ---------- */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--surface-3);
}
.comparison-table thead th {
  background: var(--surface-3);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.comparison-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.comparison-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.comparison-table tbody tr { background: var(--surface-2); }
.comparison-table tbody tr:hover { background: var(--surface-3); }
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:last-child td:first-child { border-radius: 0 0 0 var(--radius); }
.comparison-table tbody tr:last-child td:last-child  { border-radius: 0 0 var(--radius) 0; }

.check { color: var(--success); font-weight: 700; }
.cross { color: var(--danger); }
.partial { color: var(--warning); }

/* ---------- Calculator ---------- */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
}
.calc-form { position: sticky; top: 100px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-weight: 600; font-size: 0.875rem;
  margin-bottom: 6px; color: var(--text);
}
.form-group label small { font-weight: 400; color: var(--text-muted); display: block; margin-top: 2px; }
.form-group input[type="number"],
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-3);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--brand);
}
.form-group input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
  margin-top: 4px;
}
.range-labels {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--text-muted); margin-top: 4px;
}

.toggle-group {
  display: flex; gap: 8px;
}
.toggle-btn {
  flex: 1;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8125rem;
  border: 2px solid var(--surface-3);
  background: var(--surface-3);
  color: var(--text-muted);
  transition: all 0.2s;
}
.toggle-btn.active {
  border-color: var(--brand);
  background: rgba(99, 102, 241, 0.15);
  color: var(--text);
}

/* Results */
.result-main {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.08));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}
.result-amount {
  font-size: 2.5rem; font-weight: 800; color: var(--text);
}
.result-range { color: var(--text-muted); font-size: 0.9375rem; margin-top: 4px; }
.result-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px;
}
.result-stat {
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 8px;
  padding: 16px;
}
.result-stat .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.result-stat .value { font-size: 1.5rem; font-weight: 700; margin-top: 4px; }

.breakdown-item {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.breakdown-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.breakdown-info { flex: 1; }
.breakdown-label { font-weight: 600; font-size: 0.875rem; }
.breakdown-bar-bg {
  height: 6px; border-radius: 3px;
  background: var(--surface-3);
  margin-top: 6px;
  overflow: hidden;
}
.breakdown-bar {
  height: 100%; border-radius: 3px;
  transition: width 0.5s ease;
}
.breakdown-pct {
  font-size: 0.75rem; color: var(--text-muted);
  width: 50px; text-align: right; flex-shrink: 0;
}
.breakdown-val {
  font-weight: 700; font-size: 0.875rem;
  width: 80px; text-align: right; flex-shrink: 0;
}

/* ---------- Guide / Article ---------- */
.article {
  max-width: 800px;
  margin: 0 auto;
}
.article h2 {
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-3);
}
.article h2:first-of-type { border-top: none; margin-top: 0; }
.article p, .article li {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 16px;
}
.article ul, .article ol {
  padding-left: 24px;
  margin-bottom: 24px;
}
.article li { margin-bottom: 8px; }
.article strong { color: var(--text); }
.article blockquote {
  border-left: 3px solid var(--brand);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(99,102,241,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Step cards */
.steps { counter-reset: step; }
.step {
  display: flex; gap: 20px;
  margin-bottom: 32px;
  align-items: flex-start;
}
.step-number {
  counter-increment: step;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem;
  color: white;
}
.step-number::before { content: counter(step); }
.step-content h3 { margin-bottom: 8px; }
.step-content p { color: var(--text-muted); margin: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-dark), #7c3aed);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.cta-banner h2 { color: white; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.8); max-width: 500px; margin: 0 auto 24px; }
.cta-banner .btn {
  background: white;
  color: var(--brand-dark);
}
.cta-banner .btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--surface-3);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--text); }

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  background: var(--surface-2);
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}
.faq-question:hover { background: var(--surface-3); }
.faq-question svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  transition: transform 0.3s;
  color: var(--brand);
}
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 24px 18px;
  color: var(--text-muted);
  line-height: 1.7;
  background: var(--surface-2);
  border-top: 1px solid var(--surface-3);
}
.faq-item.open .faq-answer { display: block; padding-top: 16px; }

/* ---------- Badge / Tag ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-brand {
  background: rgba(99,102,241,0.15);
  color: var(--brand-light);
  border: 1px solid rgba(99,102,241,0.3);
}

/* ---------- Utilities ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.w-full { width: 100%; }
.hidden { display: none; }
.relative { position: relative; }

/* Donut chart */
.donut-wrap {
  position: relative;
  width: 200px; height: 200px;
  margin: 0 auto 24px;
}
.donut-wrap svg { transform: rotate(-90deg); }
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.donut-center .amount { font-size: 1.5rem; font-weight: 800; }
.donut-center .label { font-size: 0.625rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.1em; margin-top: 2px; }

/* Sticky bottom CTA bar */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--surface-3);
  padding: 12px 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.sticky-cta.visible {
  transform: translateY(0);
}
.sticky-cta .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sticky-cta p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}
.sticky-cta p strong {
  color: var(--text);
}
@media (max-width: 640px) {
  .sticky-cta p { display: none; }
  .sticky-cta .container { justify-content: center; }
}

/* ===== Leaderboard ===== */
.leaderboard {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.leaderboard th,
.leaderboard td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--surface-3);
}
.leaderboard thead th {
  background: var(--surface-3);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.leaderboard tbody tr {
  background: var(--surface-2);
  transition: background 0.15s;
  cursor: pointer;
}
.leaderboard tbody tr:hover { background: var(--surface-3); }
.leaderboard tbody tr:last-child td { border-bottom: none; }

.lb-rank {
  width: 40px;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
}
.lb-rank.gold   { color: #fbbf24; }
.lb-rank.silver { color: #94a3b8; }
.lb-rank.bronze { color: #d97706; }

.lb-creator {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem; color: white;
  flex-shrink: 0;
}
.lb-name { font-weight: 600; font-size: 0.9375rem; }
.lb-handle { font-size: 0.75rem; color: var(--text-muted); }
.lb-earnings { font-weight: 700; color: var(--success); font-size: 0.9375rem; }
.lb-growth { font-size: 0.8125rem; }
.lb-growth.up { color: var(--success); }
.lb-niche {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(99,102,241,0.12);
  color: var(--brand-light);
}
.lb-action {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-light);
  white-space: nowrap;
}
.lb-action:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .leaderboard .hide-mobile { display: none; }
  .leaderboard th, .leaderboard td { padding: 10px 12px; }
}

/* ===== Creator Spotlight Cards ===== */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.spotlight-card {
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.spotlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  border-color: rgba(99,102,241,0.3);
}
.spotlight-header {
  height: 80px;
  position: relative;
  overflow: hidden;
}
.spotlight-header-bg {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(12px) brightness(0.6);
}
.spotlight-avatar {
  position: absolute;
  bottom: -24px; left: 20px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 1.125rem;
  border: 3px solid var(--surface-2);
}
.spotlight-body {
  padding: 32px 20px 20px;
}
.spotlight-name { font-weight: 700; font-size: 1rem; }
.spotlight-niche { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.spotlight-stats {
  display: flex; gap: 16px; margin-top: 12px;
}
.spotlight-stat-val { font-weight: 700; font-size: 0.875rem; }
.spotlight-stat-lbl { font-size: 0.625rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.spotlight-earning {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.spotlight-earning .amount { font-weight: 700; color: var(--success); }
.spotlight-earning .label { font-size: 0.75rem; color: var(--text-muted); }
.spotlight-cta {
  display: block;
  text-align: center;
  padding: 12px;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--brand-light);
  border-top: 1px solid var(--surface-3);
  transition: background 0.15s;
}
.spotlight-card:hover .spotlight-cta {
  background: rgba(99,102,241,0.08);
}

/* ===== See More Banner ===== */
.see-more-banner {
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(180deg, transparent, rgba(99,102,241,0.06));
  border-radius: var(--radius);
  margin-top: 24px;
}
.see-more-banner p {
  color: var(--text-muted);
  margin-bottom: 16px;
}
.see-more-count {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: 4px;
}

/* Inline CTA card */
.inline-cta {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(6,182,212,0.08));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 32px 0;
}
.inline-cta p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.inline-cta p strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}
.inline-cta .btn {
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .inline-cta {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
}

/* Scroll animation */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
