/* ═══════════════════════════════════════════════════════════
   UENI WordPress Audit Tool — Design System
   Dark theme · Glassmorphism · Animated gauges
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ────────────────────────────────── */

:root {
  /* Background */
  --bg-base: #0b0d17;
  --bg-surface: rgba(255, 255, 255, 0.035);
  --bg-surface-hover: rgba(255, 255, 255, 0.06);
  --bg-elevated: rgba(255, 255, 255, 0.055);
  --bg-input: rgba(255, 255, 255, 0.06);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(99, 102, 241, 0.5);

  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Accent */
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --accent-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  /* Status */
  --color-pass: #10b981;
  --color-warn: #f59e0b;
  --color-fail: #ef4444;
  --color-pass-bg: rgba(16, 185, 129, 0.1);
  --color-warn-bg: rgba(245, 158, 11, 0.1);
  --color-fail-bg: rgba(239, 68, 68, 0.1);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(99, 102, 241, 0.06), transparent),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(139, 92, 246, 0.04), transparent);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ── Layout ───────────────────────────────────────────────── */

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--space-3xl) 0;
}

/* ── Typography ───────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; font-weight: 600; }

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }

/* ── Cards (Glassmorphism) ────────────────────────────────── */

.card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-base);
}

.card:hover {
  border-color: var(--border-medium);
}

.card + .card {
  margin-top: var(--space-lg);
}

.card__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.card__icon--perf { background: rgba(99, 102, 241, 0.15); }
.card__icon--wp { background: rgba(139, 92, 246, 0.15); }
.card__icon--content { background: rgba(16, 185, 129, 0.15); }
.card__icon--gbp { background: rgba(245, 158, 11, 0.15); }
.card__icon--seo { background: rgba(59, 130, 246, 0.15); }

.card__title {
  font-size: 1rem;
  font-weight: 600;
}

/* ── Header ───────────────────────────────────────────────── */

.header {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

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

.header__logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.header__badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ── Hero Section ─────────────────────────────────────────── */

.hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-light);
  margin-bottom: var(--space-lg);
}

.hero__title {
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

/* ── Form Controls ────────────────────────────────────────── */

.form-group {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: var(--space-sm);
}

.input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input::placeholder { color: var(--text-muted); }

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input--url {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

.select {
  appearance: none;
  padding: 14px 40px 14px 18px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: border-color var(--transition-fast);
}

.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Native <option> elements can't be fully styled in dark themes.
   Force dark text so they're readable on the browser's white dropdown. */
.select option {
  background: #1e1e2e;
  color: #e2e8f0;
}

.select optgroup {
  background: #1e1e2e;
  color: #94a3b8;
  font-weight: 600;
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1;
}

.btn--primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--large {
  padding: 16px 36px;
  font-size: 1.0625rem;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}

.btn--ghost:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* ── Spinner ──────────────────────────────────────────────── */

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Step 2: Details Form ─────────────────────────────────── */

.details {
  padding: var(--space-xl) 0;
  overflow: visible;
  position: relative;
  z-index: 5;
}

.details__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  max-width: 560px;
  margin: 0 auto var(--space-lg);
}

.details__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.details__help {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-sm);
}

/* Scan progress (live feedback while PSI + scrape run) */
.scan-progress {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.scan-progress__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.scan-progress__item--done {
  color: var(--color-pass);
  border-color: rgba(52, 211, 153, 0.2);
  background: rgba(52, 211, 153, 0.06);
}

.scan-progress__item--error {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.06);
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Places Autocomplete — custom dropdown */
#places-input {
  width: 100%;
  box-sizing: border-box;
}

.places-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  background: #1e1e2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  max-height: 280px;
  overflow-y: auto;
}

.places-dropdown__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition-fast);
}

.places-dropdown__item:last-child {
  border-bottom: none;
}

.places-dropdown__item:hover,
.places-dropdown__item--active {
  background: rgba(99, 102, 241, 0.12);
}

.places-dropdown__icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
  opacity: 0.7;
}

.places-dropdown__main {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.places-dropdown__secondary {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Progress Checklist ───────────────────────────────────── */

.progress {
  max-width: 400px;
  margin: 0 auto;
  padding: var(--space-lg) 0;
}

.progress__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.progress__item--active {
  color: var(--text-primary);
}

.progress__item--active .progress__icon {
  animation: pulse-glow 1.5s ease-in-out infinite;
}

.progress__item--done {
  color: var(--color-pass);
}

.progress__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.progress__icon .spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(99, 102, 241, 0.3);
  border-top-color: var(--accent);
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

/* ── Health Score Gauge ───────────────────────────────────── */

.gauge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl) 0;
}

.gauge {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    var(--gauge-color, var(--accent)) calc(var(--gauge-pct, 0) * 1%),
    rgba(255, 255, 255, 0.05) 0
  );
  transition: --gauge-pct 1s ease-out;
}

.gauge::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--bg-base);
}

.gauge__value {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
}

.gauge__label {
  margin-top: var(--space-md);
  font-size: 1.125rem;
  font-weight: 600;
}

.gauge__sublabel {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: var(--space-xs);
}

/* ── Metrics Grid ─────────────────────────────────────────── */

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.metric {
  text-align: center;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.metric__value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.metric__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric--pass .metric__value { color: var(--color-pass); }
.metric--warn .metric__value { color: var(--color-warn); }
.metric--fail .metric__value { color: var(--color-fail); }

/* ── Checklist (Content Completeness) ─────────────────────── */

.checklist {
  list-style: none;
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.checklist__item:last-child { border-bottom: none; }

.checklist__status {
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  font-size: 0.875rem;
}

.checklist__label {
  font-weight: 500;
}

.checklist__note {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin-top: 2px;
}

/* ── Status Pills ─────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.pill--pass { background: var(--color-pass-bg); color: var(--color-pass); }
.pill--warn { background: var(--color-warn-bg); color: var(--color-warn); }
.pill--fail { background: var(--color-fail-bg); color: var(--color-fail); }

/* ── Comparison Table ─────────────────────────────────────── */

.comparison {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.comparison th,
.comparison td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comparison th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.comparison td:first-child {
  font-weight: 500;
  color: var(--text-secondary);
}

.comparison__current {
  color: var(--color-fail);
}

.comparison__ueni {
  color: var(--color-pass);
}

/* ── Recommendation Cards ─────────────────────────────────── */

.recs {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.rec {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.rec__number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--accent-gradient);
  color: white;
}

.rec__title {
  font-weight: 600;
  margin-bottom: 2px;
}

.rec__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Email Gate ───────────────────────────────────────────── */

.email-gate {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.08),
    rgba(139, 92, 246, 0.06)
  );
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-xl);
  margin: var(--space-2xl) 0;
}

.email-gate__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.email-gate__icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.email-gate__title {
  margin-bottom: var(--space-sm);
}

.email-gate__desc {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.email-gate .form-row {
  max-width: 440px;
  margin: 0 auto;
}

/* ── SEO Report Section ───────────────────────────────────── */

.seo-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.seo-metric {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.seo-metric__value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-xs);
}

.seo-metric__label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.opportunity-box {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.08),
    rgba(99, 102, 241, 0.06)
  );
  border: 1px solid rgba(16, 185, 129, 0.15);
  text-align: center;
}

.opportunity-box__value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-pass);
  margin: var(--space-sm) 0;
}

.opportunity-box__label {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.opportunity-box__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Migration CTA ────────────────────────────────────────── */

.migration-cta {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.migration-cta__title {
  margin-bottom: var(--space-md);
}

.migration-cta__benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 360px;
  margin: var(--space-lg) auto;
  text-align: left;
}

.migration-cta__benefit {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.migration-cta__benefit span {
  color: var(--color-pass);
}

/* ── Executive Summary ────────────────────────────────────── */

.summary-box {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  position: relative;
}

.summary-box::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 3rem;
  font-style: normal;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}

/* ── Footer ───────────────────────────────────────────────── */

.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ── Visibility & Animation ───────────────────────────────── */

.hidden { display: none !important; }

.fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

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

/* ── Analysis Loading Overlay ────────────────────────────── */

.analysis-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(11, 13, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease-out;
}

.analysis-overlay.fade-out {
  animation: fadeOut 0.4s ease-in forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.analysis-overlay__spinner {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(99, 102, 241, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--space-xl);
}

.analysis-overlay__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.analysis-overlay__status {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-align: center;
  max-width: 320px;
  line-height: 1.6;
}

.analysis-overlay__steps {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.analysis-overlay__step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.analysis-overlay__step--active {
  color: var(--text-primary);
}

.analysis-overlay__step--done {
  color: var(--color-pass);
}

.stagger-1 { animation-delay: 0.1s; opacity: 0; }
.stagger-2 { animation-delay: 0.2s; opacity: 0; }
.stagger-3 { animation-delay: 0.3s; opacity: 0; }
.stagger-4 { animation-delay: 0.4s; opacity: 0; }
.stagger-5 { animation-delay: 0.5s; opacity: 0; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero {
    padding: var(--space-2xl) 0 var(--space-xl);
  }

  .form-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .details__grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .seo-metrics {
    grid-template-columns: 1fr;
  }

  .card {
    padding: var(--space-md);
  }

  .gauge {
    width: 150px;
    height: 150px;
  }

  .gauge::before {
    width: 124px;
    height: 124px;
  }

  .gauge__value {
    font-size: 2rem;
  }
}
