  :root {
    --bg: #F4F6F9;
    --surface: rgba(255, 255, 255, 0.9);
    --surface2: #F1F5F9;
    --border: rgba(40, 60, 90, 0.14);
    --text: #0F172A;
    --muted: #64748B;
    --accent: #1E3A8A;
    --accent2: #2563EB;
    --correct: #059669;
    --incorrect: #DC2626;
    --correct-bg: rgba(5, 150, 105, 0.12);
    --incorrect-bg: rgba(220, 38, 38, 0.1);
    --glow: rgba(37, 99, 235, 0.25);
  }

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

  body {
    font-family: 'Sora', sans-serif;
    background: #F4F6F9 url('../assets/engquiz-bg.jpg') no-repeat center bottom fixed;
    background-size: cover;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* Ambient light vignette */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.2) 65%, transparent 100%);
    pointer-events: none;
    z-index: 0;
  }

  /* Subtle texture overlay */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    mix-blend-mode: multiply;
  }

  #app { position: relative; z-index: 1; }

  /* ── SCREEN SYSTEM ── */
  .screen { display: none; min-height: 100vh; }
  .screen.active { display: flex; flex-direction: column; animation: fadeIn 0.5s ease; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

  /* ── FLOWER GARDEN WIDGET (always visible) ── */
  .mini-flower-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 280px;
    background: #F5E6C8; /* Đông Hồ điệp paper */
    border: 2px solid #1A1A1A;
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 4px 0 #1A1A1A, 0 10px 28px rgba(0,0,0,0.35);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
  }
  .mini-flower-widget.ready { cursor: pointer; animation: gardenReadyGlow 1.6s ease-in-out infinite alternate; }

  .mini-flower-frame {
    position: relative;
    width: 56px; height: 56px; min-width: 56px;
    background: #FFFDF7;
    border: 1.5px solid #1A1A1A;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    padding: 4px;
  }
  .mini-flower-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  .mini-flower-frame img.bounce { transform: scale(1.25) rotate(6deg); }

  /* Watering can + drops, played when the plant grows */
  .mini-watering-can {
    position: absolute;
    left: 40px; top: -30px;
    width: 46px;
    opacity: 0;
    pointer-events: none;
    transform-origin: 70% 60%;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.25));
  }
  .mini-drop {
    position: absolute;
    top: -8px;
    width: 5px; height: 8px;
    background: #38BDF8;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0;
    z-index: 2;
  }
  .mini-drop:nth-child(1) { left: 26%; }
  .mini-drop:nth-child(2) { left: 42%; }
  .mini-drop:nth-child(3) { left: 58%; }
  .mini-flower-widget.watering .mini-watering-can { animation: gardenPour 1.3s ease-in-out forwards; }
  .mini-flower-widget.watering .mini-drop { animation: gardenDrop 0.4s ease-in 2; }
  .mini-flower-widget.watering .mini-drop:nth-child(1) { animation-delay: 0.5s; }
  .mini-flower-widget.watering .mini-drop:nth-child(2) { animation-delay: 0.6s; }
  .mini-flower-widget.watering .mini-drop:nth-child(3) { animation-delay: 0.7s; }

  .mini-flower-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .mini-flower-header { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
  .mini-flower-title { font-weight: bold; font-size: 13px; color: #C83228; /* Đông Hồ vermilion */ }
  .mini-water-badge {
    font-size: 11px;
    font-weight: bold;
    background: #E0F2FE;
    color: #0284C7;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #0284C7;
    white-space: nowrap;
  }
  .mini-growth-bar {
    width: 100%; height: 8px;
    background: #E5E7EB;
    border: 1px solid #1A1A1A;
    border-radius: 6px;
    overflow: hidden;
  }
  .mini-growth-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ADE80, #16A34A);
    width: 10%;
    transition: width 0.4s ease-in-out;
  }
  .mini-status-text {
    font-size: 10.5px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Celebration modal */
  .oriental-celebration-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999;
    animation: gardenFadeIn 0.3s ease-out;
  }
  .oriental-modal-card {
    position: relative;
    background: #FFFDF7;
    border: 3px solid #C83228;
    border-radius: 20px;
    padding: 26px 22px;
    max-width: 350px;
    width: 88%;
    text-align: center;
    color: #1A1A1A;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35), inset 0 0 15px #F5E6C8;
    animation: gardenModalPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
  }
  .modal-header-badge { font-size: 11px; font-weight: bold; color: #C83228; letter-spacing: 2px; margin-bottom: 10px; }
  .modal-flower-display {
    position: relative;
    width: 130px; height: 130px;
    margin: 0 auto 14px auto;
    display: flex; align-items: center; justify-content: center;
  }
  .flower-glow-ring {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230,180,34,0.45) 0%, rgba(255,253,247,0) 70%);
    animation: gardenPulseGlow 2s infinite alternate;
  }
  .modal-flower-display img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
    animation: gardenFloat 3s ease-in-out infinite;
  }
  .modal-title { font-size: 19px; color: #1A1A1A; margin: 0 0 8px 0; font-family: 'Georgia', serif; }
  .modal-subtitle { font-size: 12.5px; color: #555; line-height: 1.45; margin: 0 0 16px 0; }
  .reward-badges-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 18px; }
  .reward-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: #F5E6C8;
    color: #1B4D3E;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px 4px 6px;
    border-radius: 12px;
    border: 1px solid #E6B422;
  }
  .reward-badge img { width: 18px; height: 18px; object-fit: contain; }
  .plant-next-btn {
    position: relative;
    z-index: 2;
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #C83228, #991B1B);
    color: #FFFDF7;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    padding: 9px 24px 9px 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(200, 50, 40, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .plant-next-btn img { width: 24px; height: 24px; object-fit: contain; }
  .plant-next-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(200, 50, 40, 0.4); }

  .petal-particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
  .petal-particle {
    position: absolute;
    top: -10px;
    width: 8px; height: 12px;
    background: #F43F5E;
    border-radius: 10px 0 10px 0;
    opacity: 0.8;
    animation: gardenFallPetal 3s linear infinite;
  }

  @keyframes gardenModalPop { 0% { transform: scale(0.65); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
  @keyframes gardenPulseGlow { 0% { transform: scale(0.85); opacity: 0.4; } 100% { transform: scale(1.3); opacity: 0.95; } }
  @keyframes gardenFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
  @keyframes gardenFallPetal { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(300px) rotate(360deg); opacity: 0; } }
  @keyframes gardenFadeIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes gardenPour {
    0% { opacity: 0; transform: translate(14px, -6px) rotate(0deg); }
    20% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
    40%, 75% { opacity: 1; transform: translate(0, 0) rotate(-32deg); }
    100% { opacity: 0; transform: translate(10px, -4px) rotate(0deg); }
  }
  @keyframes gardenDrop { 0% { opacity: 0.9; transform: translateY(0); } 100% { opacity: 0; transform: translateY(40px); } }
  @keyframes gardenReadyGlow {
    from { box-shadow: 0 4px 0 #1A1A1A, 0 10px 28px rgba(0,0,0,0.35); }
    to { box-shadow: 0 4px 0 #1A1A1A, 0 0 26px rgba(230,180,34,0.75); }
  }

  @media (max-width: 600px) {
    .mini-flower-widget { right: 12px; bottom: 12px; width: 230px; gap: 10px; padding: 8px 10px; }
    .mini-flower-frame { width: 46px; height: 46px; min-width: 46px; }
    .mini-watering-can { left: 30px; width: 40px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .mini-flower-widget.watering .mini-watering-can,
    .mini-flower-widget.watering .mini-drop,
    .mini-flower-widget.ready,
    .flower-glow-ring, .modal-flower-display img, .petal-particle { animation: none; }
    .petal-particle { display: none; }
  }

  /* ── HOME SCREEN ── */
  #home {
    align-items: center;
    justify-content: center;
    padding: 60px 24px 130px; /* bottom: clear the garden widget */
    text-align: center;
  }

  .logo-area { margin-bottom: 42px; }

  .logo-word {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(68px, 11vw, 108px);
    line-height: 1.05;
    background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 55%, #0D9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    filter: drop-shadow(0 2px 10px rgba(15, 23, 42, 0.09));
  }

  .logo-sub { display: none; }
  .home-desc { display: none; }

  .badge-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 44px;
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
  }

  .badge {
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    color: #1E3A8A;
    border: 1px solid rgba(30, 58, 138, 0.22);
    border-radius: 25px;
    padding: 7px 18px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #1E3A8A, #2563EB);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 48px;
    font-size: 18.5px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    letter-spacing: 0.4px;
  }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37, 99, 235, 0.5); }
  .btn-primary:active { transform: translateY(0); }

  .stats-row {
    display: flex;
    gap: 44px;
    margin-top: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 22px 42px;
    border-radius: 24px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
  }

  .stat-item { text-align: center; }
  .stat-num {
    font-family: 'DM Serif Display', serif;
    font-size: 42px;
    color: #1E3A8A;
    line-height: 1.1;
  }
  .stat-lbl {
    font-size: 12.5px;
    color: var(--muted);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 4px;
  }

  /* ── GAME SCREEN ── */
  #game { padding: 0; }

  .game-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  }

  /* Header nav group */
  .header-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }

  /* Home link button */
  .home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    transition: all 0.2s;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  }
  .home-link:hover {
    border-color: var(--accent2);
    color: var(--accent2);
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  }

  .back-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    color: #334155;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  }
  .back-btn:hover { border-color: var(--accent2); color: var(--accent2); background: #FFFFFF; }

  .header-meta { flex: 1; }
  .text-label {
    font-size: 12px;
    color: var(--accent2);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
  }
  .text-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-top: 3px;
  }

  .header-right { display: flex; align-items: center; gap: 18px; }

  .score-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14.5px;
    color: #1E3A8A;
    background: rgba(30, 58, 138, 0.08);
    border: 1px solid rgba(30, 58, 138, 0.2);
    border-radius: 20px;
    padding: 5px 15px;
    font-weight: 600;
  }

  .progress-ring-wrap { position: relative; width: 44px; height: 44px; }
  .progress-ring { transform: rotate(-90deg); }
  .ring-bg { fill: none; stroke: rgba(40, 60, 90, 0.15); stroke-width: 3; }
  .ring-fg { fill: none; stroke: var(--accent2); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.4s ease; }
  .ring-label {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-family: 'JetBrains Mono', monospace;
    color: #1E3A8A;
    font-weight: 700;
  }

  /* Progress bar */
  .text-progress-bar {
    height: 3px;
    background: rgba(40, 60, 90, 0.12);
    position: relative;
  }
  .text-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent2), var(--correct));
    transition: width 0.5s ease;
  }

  .game-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    min-height: calc(100vh - 110px);
  }

  @media (max-width: 900px) {
    .game-body { grid-template-columns: 1fr; }
  }

  /* Text panel */
  .text-panel {
    padding: 36px 36px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    max-height: calc(100vh - 110px);
    position: sticky;
    top: 110px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
  }

  @media (max-width: 900px) {
    .text-panel { position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--border); }
  }

  .passage-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: #0F766E;
    border: 1px solid rgba(15, 118, 110, 0.28);
    background: rgba(15, 118, 110, 0.08);
    border-radius: 20px;
    padding: 4px 14px;
    margin-bottom: 18px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
  }

  .passage-title {
    font-family: 'DM Serif Display', serif;
    font-size: 26px;
    line-height: 1.35;
    margin-bottom: 22px;
    color: var(--text);
  }

  .passage-body {
    font-size: 17px;
    line-height: 2.05;
    color: #1E293B;
  }

  .blank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    height: 32px;
    border-bottom: 2px solid var(--accent2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14.5px;
    color: var(--accent2);
    font-weight: 700;
    transition: all 0.3s;
    border-radius: 4px;
    padding: 0 10px;
    cursor: default;
    position: relative;
    top: -1px;
    background: rgba(37, 99, 235, 0.06);
  }

  .blank.answered-correct {
    border-bottom-color: var(--correct);
    color: var(--correct);
    background: var(--correct-bg);
  }

  .blank.answered-incorrect {
    border-bottom-color: var(--incorrect);
    color: var(--incorrect);
    background: var(--incorrect-bg);
  }

  /* Questions panel */
  .questions-panel {
    padding: 36px 36px 120px; /* bottom: keep Next/Finish clear of the garden widget */
    overflow-y: auto;
    max-height: calc(100vh - 110px);
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(10px);
  }

  @media (max-width: 900px) {
    .questions-panel { max-height: none; }
  }

  .q-tracker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
  }

  .q-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  }
  .q-dot:hover { border-color: var(--accent2); color: var(--accent2); }
  .q-dot.current { border-color: var(--accent2); color: var(--accent2); background: rgba(37, 99, 235, 0.12); font-weight: bold; }
  .q-dot.correct { border-color: var(--correct); color: var(--correct); background: var(--correct-bg); font-weight: bold; }
  .q-dot.incorrect { border-color: var(--incorrect); color: var(--incorrect); background: var(--incorrect-bg); font-weight: bold; }

  .question-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 26px;
    margin-bottom: 18px;
    transition: all 0.3s;
    display: none;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  }
  .question-card.active { display: block; animation: slideUp 0.3s ease; }
  @keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

  .q-type-tag {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    font-size: 11.5px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent2);
    background: rgba(37, 99, 235, 0.08);
    border-radius: 5px;
    padding: 3px 10px;
    margin-bottom: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
  }

  .q-num {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
  }

  .q-text {
    font-size: 17.5px;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 24px;
    font-weight: 500;
  }

  .q-blank-ref {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent2);
    font-weight: 700;
  }

  .options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #FFFFFF;
    border: 1px solid rgba(40, 60, 90, 0.16);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text);
    font-size: 15.5px;
    font-family: 'Sora', sans-serif;
    transition: all 0.2s;
    text-align: left;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  }

  .option-btn:hover:not(:disabled) {
    border-color: var(--accent2);
    background: rgba(37, 99, 235, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  }

  .option-btn:disabled { cursor: default; }

  .option-btn.correct {
    border-color: var(--correct);
    background: var(--correct-bg);
    color: var(--correct);
    font-weight: 600;
  }

  .option-btn.incorrect {
    border-color: var(--incorrect);
    background: var(--incorrect-bg);
    color: var(--incorrect);
  }

  .option-key {
    width: 28px; height: 28px;
    border-radius: 7px;
    background: #E2E8F0;
    color: #1E293B;
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s;
  }

  .option-btn.correct .option-key { background: var(--correct); color: #ffffff; }
  .option-btn.incorrect .option-key { background: var(--incorrect); color: #ffffff; }

  /* Feedback */
  .feedback-box {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14.5px;
    line-height: 1.65;
    display: none;
  }
  .feedback-box.show { display: block; animation: fadeIn 0.3s ease; }
  .feedback-box.correct { background: var(--correct-bg); border: 1px solid rgba(5, 150, 105, 0.3); color: #047857; }
  .feedback-box.incorrect { background: var(--incorrect-bg); border: 1px solid rgba(220, 38, 38, 0.3); color: #b91c1c; }
  .feedback-icon { font-size: 18px; margin-right: 8px; }

  .nav-btns {
    display: flex;
    gap: 12px;
    margin-top: 24px;
  }

  .btn-nav {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #FFFFFF;
    color: #334155;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  }
  .btn-nav:hover { border-color: var(--accent2); color: var(--accent2); }
  .btn-nav.primary {
    background: linear-gradient(135deg, #1E3A8A, #2563EB);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  }
  .btn-nav.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  }

  /* Text selector */
  #select-screen {
    padding: 50px 24px 120px;
    align-items: center;
  }

  .select-title {
    font-family: 'DM Serif Display', serif;
    font-size: 44px;
    text-align: center;
    margin-bottom: 10px;
    color: #0F172A;
  }
  .select-sub { color: var(--muted); text-align: center; margin-bottom: 44px; font-size: 16px; }

  .texts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
    width: 100%;
    max-width: 1040px;
  }

  .text-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  }

  .text-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s;
  }

  .text-card:hover {
    border-color: var(--accent2);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.16);
    background: #FFFFFF;
  }
  .text-card:hover::before { opacity: 1; }

  .text-card.completed {
    border-color: rgba(5, 150, 105, 0.4);
    background: rgba(255, 255, 255, 0.96);
  }
  .text-card.completed::after {
    content: '✓';
    position: absolute;
    top: 14px; right: 14px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--correct);
    color: #ffffff;
    font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
  }

  .card-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--accent2);
    letter-spacing: 2px;
    margin-bottom: 8px;
    font-weight: 700;
  }

  .card-title {
    font-family: 'DM Serif Display', serif;
    font-size: 19.5px;
    margin-bottom: 8px;
    line-height: 1.35;
    color: #0F172A;
  }

  .card-type {
    font-size: 12.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .card-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent2);
  }

  .card-score {
    margin-top: 14px;
    font-size: 13.5px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
  }

  /* Results Screen */
  #results {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 20px 120px;
  }

  .result-emoji { font-size: 72px; margin-bottom: 22px; animation: bounce 1s ease infinite alternate; }
  @keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }

  .result-title { font-family: 'DM Serif Display', serif; font-size: 48px; margin-bottom: 10px; color: #0F172A; }
  .result-score { font-family: 'JetBrains Mono', monospace; font-size: 21px; color: var(--accent); margin-bottom: 36px; font-weight: 600; }

  .result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 38px;
    max-width: 540px;
  }

  .result-stat {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  }
  .result-stat-num { font-family: 'DM Serif Display', serif; font-size: 34px; }
  .result-stat-lbl { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }

  .btn-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

  .btn-secondary {
    padding: 13px 26px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    color: #334155;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  }
  .btn-secondary:hover {
    border-color: var(--accent2);
    color: var(--accent2);
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  }
