:root {
  --bg: #0a0a0f;
  --bg-subtle: #12121a;
  --bg-card: #16161f;
  --fg: #e8e8ed;
  --fg-muted: #8b8b9e;
  --fg-dim: #5a5a6e;
  --accent: #00e5a0;
  --accent-dim: rgba(0, 229, 160, 0.12);
  --warn: #ff6b4a;
  --blue: #4d8eff;
  --purple: #a78bfa;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HERO ===== */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 120px 0 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,229,160,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,160,0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 32px;
  width: fit-content;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  max-width: 800px;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero-sub {
  font-size: 20px;
  color: var(--fg-muted);
  max-width: 540px;
  line-height: 1.6;
  margin-bottom: 48px;
}

.hero-metrics {
  display: flex;
  gap: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
}

.metric-value .unit {
  font-size: 18px;
  color: var(--fg-muted);
  font-weight: 400;
}

.metric-label {
  font-size: 13px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== PROBLEM ===== */
.problem {
  padding: 100px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.problem-left h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.problem-left p {
  color: var(--fg-muted);
  font-size: 17px;
  line-height: 1.7;
}

.problem-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.problem-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.problem-icon.red { background: rgba(255,107,74,0.12); color: var(--warn); }
.problem-icon.blue { background: rgba(77,142,255,0.12); color: var(--blue); }
.problem-icon.purple { background: rgba(167,139,250,0.12); color: var(--purple); }

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.problem-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* ===== HOW IT WORKS ===== */
.how {
  padding: 100px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.how h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
  max-width: 560px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.step {
  background: var(--bg-card);
  padding: 36px 28px;
  position: relative;
}

.step:first-child { border-radius: 12px 0 0 12px; }
.step:last-child { border-radius: 0 12px 12px 0; }

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.step .step-accent {
  display: block;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  margin-top: 20px;
}

.step:nth-child(1) .step-accent { background: var(--accent); }
.step:nth-child(2) .step-accent { background: var(--blue); }
.step:nth-child(3) .step-accent { background: var(--purple); }
.step:nth-child(4) .step-accent { background: var(--warn); }

/* ===== CLOSING ===== */
.closing {
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.04);
  position: relative;
}

.closing::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,229,160,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.closing p {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== FOOTER ===== */
footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}

.footer-note {
  font-size: 13px;
  color: var(--fg-dim);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero { min-height: auto; padding: 80px 0 60px; }
  .hero-metrics { flex-direction: column; gap: 24px; }
  .problem-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; gap: 2px; }
  .step:first-child { border-radius: 12px 12px 0 0; }
  .step:last-child { border-radius: 0 0 12px 12px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}

/* ===== HERO CTA BUTTON ===== */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: #0a0a0f;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
  margin-top: 16px;
}
.hero-cta:hover { opacity: 0.88; }
.hero-cta .cta-arrow { font-size: 20px; line-height: 1; }

/* ===== AUDIT PAGE NAV ===== */
.audit-nav {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.audit-nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}
.nav-tagline {
  font-size: 13px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
}

/* ===== AUDIT HERO ===== */
.audit-hero {
  padding: 80px 0 60px;
  position: relative;
}
.audit-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,229,160,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== AUDIT FORM ===== */
.audit-form { margin-top: 40px; }

.input-group {
  display: flex;
  gap: 12px;
  max-width: 680px;
}

.url-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}
.url-input::placeholder { color: var(--fg-dim); }
.url-input:focus { border-color: rgba(0,229,160,0.4); }

.btn-run {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--accent);
  color: #0a0a0f;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  min-width: 120px;
}
.btn-run:hover:not(:disabled) { opacity: 0.88; }
.btn-run:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-spinner svg {
  animation: spin 0.8s linear infinite;
  display: block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
}

/* ===== STATUS BANNER ===== */
.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  margin: 40px 0 32px;
  font-size: 15px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
}
.status-banner.status-running { border-color: rgba(0,229,160,0.2); color: var(--accent); }
.status-banner.status-done { border-color: rgba(0,229,160,0.3); color: var(--accent); }
.status-banner.status-error { border-color: rgba(255,107,74,0.3); color: var(--warn); }

.status-spinner { display: flex; }
.status-spinner svg { animation: spin 0.9s linear infinite; }

/* ===== SCORE CARDS ===== */
.score-cards {
  display: grid;
  grid-template-columns: 200px repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}

.score-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 24px;
}

.score-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 6px;
}

.score-card.score-good .score-num { color: var(--accent); }
.score-card.score-mid  .score-num { color: var(--warn); }
.score-card.score-bad  .score-num { color: #ff3b3b; }

.score-label {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  margin-bottom: 12px;
}

.score-sub {
  font-size: 12px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
}

.score-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.score-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
  background: var(--accent);
}

/* ===== FIX LIST ===== */
.fix-list-header { margin-bottom: 28px; }
.fix-list-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

.fixes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 80px; }

.fix-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.fix-card:hover { border-color: rgba(255,255,255,0.12); }
.fix-card.expanded { border-color: rgba(0,229,160,0.2); }

.fix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  gap: 16px;
}

.fix-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.fix-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  flex-shrink: 0;
  width: 24px;
}

.fix-icon { font-size: 20px; flex-shrink: 0; }

.fix-meta { flex: 1; min-width: 0; }

.fix-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fix-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.fix-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--fg-dim);
  background: rgba(255,255,255,0.04);
}

.fix-cat { color: var(--fg-dim); }

.fix-chevron {
  font-size: 20px;
  color: var(--fg-dim);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.fix-card.expanded .fix-chevron { transform: rotate(90deg); }

.fix-body {
  display: none;
  padding: 0 24px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.fix-card.expanded .fix-body { display: block; padding-top: 20px; }

.fix-problem, .fix-fix {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}
.fix-problem strong, .fix-fix strong { color: var(--fg); font-weight: 600; }

.fix-code {
  background: var(--bg-subtle);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: auto;
  margin-top: 4px;
}
.fix-code pre {
  padding: 16px 18px;
  margin: 0;
  overflow-x: auto;
}
.fix-code code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  white-space: pre;
}

/* ===== ERROR STATE ===== */
.error-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--warn);
}
.error-icon { font-size: 40px; margin-bottom: 16px; }
.error-state h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; }
.error-state p { color: var(--fg-muted); font-size: 14px; }

/* ===== RECENT AUDITS ===== */
.recent-section { padding: 60px 0 80px; border-top: 1px solid rgba(255,255,255,0.04); }

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
  max-width: 800px;
}

.recent-empty { font-size: 14px; color: var(--fg-dim); font-family: var(--font-mono); }

.recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.recent-row:hover { border-color: rgba(255,255,255,0.12); }

.recent-url {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.recent-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.recent-score {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}
.recent-score.score-good { color: var(--accent); }
.recent-score.score-mid  { color: var(--warn); }
.recent-score.score-bad  { color: #ff3b3b; }

.recent-date {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--fg-dim);
  white-space: nowrap;
}

/* ===== AUDIT PAGE RESPONSIVE ===== */
@media (max-width: 768px) {
  .audit-hero { padding: 60px 0 40px; }
  .input-group { flex-direction: column; }
  .btn-run { width: 100%; }
  .score-cards { grid-template-columns: 1fr 1fr; }
  .fix-title { white-space: normal; }
  .recent-section { padding: 40px 0 60px; }
}