    @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500&display=swap');

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

    :root {
      --bg: #0b0b0e;
      --surface: #16161b;
      --surface2: #1e1e25;
      --border: rgba(255,255,255,0.08);
      --text: #edecf1;
      --muted: #86858f;

      /* Default accent — a calm indigo shown before a mood is picked. */
      --accent: #8b93f0;
      --accent-dim: rgba(139,147,240,0.15);
      --accent-glow: rgba(139,147,240,0.35);

      --green: #34d399;
      --gold: #f6c453;
    }

    /* ── MOOD-REACTIVE ACCENTS ──
       Each mood carries its own hue. On step 1, every mood button previews
       its own colour. Once a mood is picked, body[data-mood] repaints the
       whole page — CTAs, progress dots and result cards — in that colour. */
    .mood-btn[data-mood="tired"],   body[data-mood="tired"]   { --accent:#7f8cf7; --accent-dim:rgba(127,140,247,.15); --accent-glow:rgba(127,140,247,.40); }
    .mood-btn[data-mood="happy"],   body[data-mood="happy"]   { --accent:#f7bf5c; --accent-dim:rgba(247,191,92,.15);  --accent-glow:rgba(247,191,92,.40); }
    .mood-btn[data-mood="sad"],     body[data-mood="sad"]     { --accent:#5ec6da; --accent-dim:rgba(94,198,218,.15);  --accent-glow:rgba(94,198,218,.40); }
    .mood-btn[data-mood="anxious"], body[data-mood="anxious"] { --accent:#f2758a; --accent-dim:rgba(242,117,138,.15); --accent-glow:rgba(242,117,138,.40); }
    .mood-btn[data-mood="excited"], body[data-mood="excited"] { --accent:#a6e04b; --accent-dim:rgba(166,224,75,.15);  --accent-glow:rgba(166,224,75,.40); }
    .mood-btn[data-mood="numb"],    body[data-mood="numb"]    { --accent:#98a2b3; --accent-dim:rgba(152,162,179,.15); --accent-glow:rgba(152,162,179,.40); }

    html { scroll-behavior: smooth; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'Inter', sans-serif;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 0 16px 60px;
      overflow-x: hidden;
    }

    /* Ambient glow background */
    body::before {
      content: '';
      position: fixed;
      top: -200px;
      left: 50%;
      transform: translateX(-50%);
      width: 600px;
      height: 600px;
      background: radial-gradient(circle, color-mix(in srgb, var(--accent) 8%, transparent) 0%, transparent 70%);
      pointer-events: none;
      z-index: 0;
      transition: background 0.4s ease;
    }

    .container {
      width: 100%;
      max-width: 680px;
      position: relative;
      z-index: 1;
    }

    /* ── HEADER ── */
    header {
      text-align: center;
      padding: 56px 0 40px;
    }

    .logo-tag {
      display: inline-block;
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 20px;
      opacity: 0.8;
    }

    h1 {
      font-family: 'Playfair Display', serif;
      font-size: clamp(28px, 6vw, 42px);
      font-weight: 400;
      line-height: 1.2;
      color: var(--text);
      margin-bottom: 12px;
    }

    h1 em {
      font-style: italic;
      color: var(--accent);
    }

    .subtitle {
      font-size: 14px;
      color: var(--muted);
      font-weight: 300;
      letter-spacing: 0.01em;
    }

    /* ── STEPS ── */
    .step { display: none; animation: fadeUp 0.4s ease; }
    .step.active { display: block; }

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

    .step-label {
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 10px;
    }

    .step-question {
      font-family: 'Playfair Display', serif;
      font-size: clamp(20px, 4vw, 26px);
      font-weight: 400;
      color: var(--text);
      margin-bottom: 28px;
      line-height: 1.3;
    }

    /* ── MOOD GRID ── */
    .mood-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 32px;
    }

    /* mood/option are real <button>s — reset native chrome, keep focus ring */
    .mood-btn, .option-btn {
      font-family: 'Inter', sans-serif;
      color: inherit;
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
    }
    .mood-btn:focus-visible, .option-btn:focus-visible,
    .cta-btn:focus-visible, .back-btn:focus-visible,
    .restart-btn:focus-visible, .share-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 3px;
    }

    .mood-btn {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 18px 12px;
      cursor: pointer;
      text-align: center;
      transition: all 0.2s ease;
      user-select: none;
    }

    .mood-btn:hover {
      border-color: var(--accent);
      background: var(--accent-dim);
      transform: translateY(-2px);
    }

    .mood-btn.selected {
      border-color: var(--accent);
      background: var(--accent-dim);
      box-shadow: 0 0 0 1px var(--accent), 0 12px 32px -12px var(--accent-glow);
      transform: translateY(-2px) scale(1.03);
    }

    .mood-emoji { font-size: 28px; display: block; margin-bottom: 8px; }
    .mood-label { font-size: 12px; color: var(--muted); font-weight: 400; }
    .mood-btn.selected .mood-label { color: var(--accent); }

    /* ── ENERGY / FORMAT OPTIONS ── */
    .option-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 32px;
    }

    .option-btn {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 16px 20px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 14px;
      transition: all 0.2s ease;
      text-align: left;
    }

    .option-btn:hover {
      border-color: var(--accent);
      background: var(--accent-dim);
    }

    .option-btn.selected {
      border-color: var(--accent);
      background: var(--accent-dim);
      box-shadow: 0 0 0 1px var(--accent), 0 8px 26px -14px var(--accent-glow);
      transform: translateY(-1px);
    }

    .option-icon { font-size: 22px; flex-shrink: 0; }

    .option-text { flex: 1; }
    .option-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
    .option-desc { font-size: 12px; color: var(--muted); }
    .option-btn.selected .option-title { color: var(--accent); }

    /* ── CTA BUTTON ── */
    .cta-btn {
      width: 100%;
      background: var(--accent);
      color: #0b0b0e;
      border: none;
      border-radius: 14px;
      padding: 17px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      letter-spacing: 0.01em;
      transition: all 0.2s ease;
      font-family: 'Inter', sans-serif;
    }

    .cta-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }
    .cta-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }

    .back-btn {
      background: none;
      border: none;
      color: var(--muted);
      font-size: 13px;
      cursor: pointer;
      padding: 12px 0 0;
      font-family: 'Inter', sans-serif;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: color 0.2s;
    }
    .back-btn:hover { color: var(--text); }

    /* ── LOADING ── */
    #step-loading {
      text-align: center;
      padding: 48px 0;
    }

    .spinner {
      width: 40px;
      height: 40px;
      border: 2px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin: 0 auto 20px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .loading-text {
      font-family: 'Playfair Display', serif;
      font-size: 18px;
      color: var(--muted);
      font-style: italic;
    }

    /* ── RESULTS ── */
    #step-results { padding-bottom: 20px; }

    .results-header {
      margin-bottom: 24px;
    }

    .results-tag {
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 8px;
    }

    .results-title {
      font-family: 'Playfair Display', serif;
      font-size: 22px;
      color: var(--text);
    }

    /* ── RESULT CARD ── */
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 18px;
      margin-bottom: 12px;
      transition: border-color 0.2s;
      cursor: default;
      position: relative;
      overflow: hidden;
      display: flex;
    }

    .card:hover { border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

    /* Poster slot — mood-tinted placeholder now; real TMDB art drops in here later */
    .poster {
      position: relative;
      flex: none;
      width: 104px;
      align-self: stretch;
      min-height: 158px;
      background: var(--surface2);
      overflow: hidden;
    }
    @media (max-width: 400px) { .poster { width: 82px; min-height: 138px; } }

    .poster-glyph {
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      width: 32px; height: 32px;
      color: #fff;
      opacity: 0.32;
    }
    .poster-rank {
      position: absolute;
      top: 8px; left: 11px;
      font-family: 'Playfair Display', serif;
      font-style: italic;
      font-size: 22px;
      line-height: 1;
      color: #fff;
      text-shadow: 0 1px 8px rgba(0,0,0,0.55);
    }

    .card-body { flex: 1; padding: 18px 20px; min-width: 0; }

    .card-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 9px;
      line-height: 1.25;
    }

    .card-meta {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 12px;
    }
    .card-meta .sep { opacity: 0.35; }
    .meta-rating { color: var(--gold); font-weight: 500; font-variant-numeric: tabular-nums; }
    .type-pill {
      font-size: 10px;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 999px;
      padding: 2px 9px;
    }

    .card-why {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.6;
      margin-bottom: 14px;
      font-style: italic;
    }

    .where-label {
      display: block;
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--muted);
      opacity: 0.7;
      margin-bottom: 8px;
    }
    .badges { display: flex; flex-wrap: wrap; gap: 8px; }

    .logo-badge {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 9px;
      padding: 4px 11px 4px 4px;
      font-size: 12px;
      font-weight: 500;
      color: var(--text);
      transition: border-color 0.2s;
      cursor: pointer;
    }
    .logo-badge:hover { border-color: var(--green); }
    .logo-mono {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px; height: 22px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      color: #fff;
      flex: none;
      letter-spacing: -0.02em;
    }

    /* ── RESULTS ACTIONS ── */
    .results-actions {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
      margin-top: 30px;
    }

    .share-btn {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      background: var(--accent);
      color: #0b0b0e;
      border: none;
      border-radius: 12px;
      padding: 13px 22px;
      font-size: 14px;
      font-weight: 600;
      font-family: 'Inter', sans-serif;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .share-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }
    .share-btn svg { display: block; }

    .restart-btn {
      background: none;
      border: 1px solid var(--border);
      color: var(--muted);
      border-radius: 10px;
      padding: 12px 24px;
      font-size: 13px;
      cursor: pointer;
      font-family: 'Inter', sans-serif;
      transition: all 0.2s;
    }

    .restart-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    /* ── PROGRESS DOTS ── */
    .progress {
      display: flex;
      gap: 6px;
      margin-bottom: 32px;
    }

    .dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--border);
      transition: background 0.3s;
    }

    .dot.active { background: var(--accent); }
    .dot.done { background: color-mix(in srgb, var(--accent) 40%, transparent); }

    /* ── FOOTER ── */
    footer {
      text-align: center;
      margin-top: 48px;
      font-size: 11px;
      color: var(--muted);
      opacity: 0.5;
      letter-spacing: 0.05em;
    }

    @media (max-width: 400px) {
      .mood-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
      .mood-btn.selected, .option-btn.selected { transform: none; }
    }
