/* ═══════════════════════════════════════════════════════════════
   Leerblad — gedeelde stijl voor de tafelspellen (topbar + spel-UI).
   Werkt in beide weergaven; donkere varianten via [data-theme="dark"].
   ═══════════════════════════════════════════════════════════════ */

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif; background: #f8f8f8; color: #1a1a1a; min-height: 100vh; }

/* ── Topbar ── */
.topbar { background: #fff; border-bottom: 0.5px solid #e5e5e5; position: sticky; top: 0; z-index: 100; }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 160px; display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 1rem; }
.logo-link { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; flex-shrink: 0; }
.logo-text { font-size: 40px; font-weight: 200; letter-spacing: 1.5px; background: linear-gradient(90deg, #2A7FD4, #2DBF8E); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.1; }
.logo-tagline-row { display: flex; align-items: center; gap: 7px; }
.logo-tagline-line { height: 1px; width: 36px; background: linear-gradient(90deg, #2A7FD4, #2DBF8E); opacity: 0.4; }
.logo-tagline { font-size: 8.5px; letter-spacing: 3px; color: #2A7FD4; font-weight: 400; text-transform: uppercase; }
nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav-btn { font-size: 16px; font-weight: 400; color: #888; border: none; background: none; padding: 10px 20px; border-radius: 24px; cursor: pointer; transition: background 0.18s, color 0.18s; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.nav-btn:hover, .nav-dropdown:hover > .nav-btn { background: linear-gradient(90deg, #2A7FD4, #2DBF8E); color: #fff; }
.nav-btn.active { background: #e8f4fd; color: #2A7FD4; font-weight: 500; }
.nav-btn.soon { color: #ccc; cursor: default; pointer-events: none; }
.tag { font-size: 9px; background: rgba(255,255,255,0.25); color: inherit; padding: 2px 6px; border-radius: 10px; margin-left: 4px; }
.nav-btn:not(:hover) .tag { background: #f0f0f0; color: #bbb; }
.nav-dropdown { position: relative; display: inline-flex; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; padding-top: 8px; min-width: 200px; z-index: 200; flex-direction: column; }
.nav-dropdown-menu-inner { background: #fff; border: 0.5px solid #e5e5e5; border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); display: flex; flex-direction: column; gap: 2px; }
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-dropdown-item { font-size: 14px; color: #555; padding: 9px 14px; border-radius: 8px; text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nav-dropdown-item:hover { background: #e8f4fd; color: #2A7FD4; }
.nav-dropdown-item.soon { color: #ccc; pointer-events: none; }

/* ── Pagina ── */
.main { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.page-title { font-size: 28px; font-weight: 300; color: #1a1a1a; margin-bottom: 4px; }
.page-sub { font-size: 13px; color: #999; margin-bottom: 1.75rem; }

/* ── Setup / start ── */
.setup { background: #fff; border: 0.5px solid #e5e5e5; border-radius: 16px; padding: 1.75rem; text-align: center; }
.setup h2 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.setup p { font-size: 13px; color: #999; margin-bottom: 1.25rem; }
.chips { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.chip { font-size: 13px; font-weight: 500; border: 1px solid #e0e0e0; background: #f8f8f8; color: #555; padding: 8px 14px; border-radius: 11px; cursor: pointer; transition: all 0.14s; user-select: none; }
.chip:hover { border-color: #2A7FD4; color: #2A7FD4; }
.chip.active { border-color: #2A7FD4; background: #e8f4fd; color: #2A7FD4; }
.start-btn { font-size: 15px; font-weight: 600; background: linear-gradient(90deg, #2A7FD4, #2DBF8E); color: #fff; border: none; padding: 12px 34px; border-radius: 28px; cursor: pointer; transition: opacity 0.2s, transform 0.15s; }
.start-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.start-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── HUD ── */
.hud { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.hud .box { text-align: center; }
.hud .lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 2px; color: #bbb; }
.hud .val { font-size: 22px; font-weight: 800; color: #1a1a1a; }
.hud .val.accent { color: #2A7FD4; }

/* ── Som-balk ── */
.som-bar { background: #fff; border: 0.5px solid #e5e5e5; border-radius: 14px; padding: 1rem 1.2rem; text-align: center; }
.som-vraag { font-size: 30px; font-weight: 800; background: linear-gradient(90deg, #2A7FD4, #2DBF8E); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ── Antwoordknoppen ── */
.answers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
.answer { background: #fff; border: 1.5px solid #e0e0e0; border-radius: 14px; padding: 1.1rem; font-size: 22px; font-weight: 700; color: #1a1a1a; cursor: pointer; transition: all 0.13s; text-align: center; }
.answer:hover { border-color: #2A7FD4; background: #e8f4fd; transform: translateY(-2px); }
.answer.goed { border-color: #2DBF8E; background: #eafaf4; color: #17a877; }
.answer.fout { border-color: #ff6b6b; background: #ffecec; color: #d64545; }
.answer.disabled { pointer-events: none; }

/* ── Tijdbalk ── */
.timebar-wrap { height: 8px; border-radius: 5px; background: #eee; overflow: hidden; margin-top: 12px; }
.timebar { height: 100%; width: 100%; background: linear-gradient(90deg, #2A7FD4, #2DBF8E); border-radius: 5px; }

/* ── Overlay ── */
.overlay { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(4,6,12,0.72); backdrop-filter: blur(6px); align-items: center; justify-content: center; padding: 1.5rem; }
.overlay.on { display: flex; }
.over-card { background: #fff; border-radius: 20px; padding: 2.5rem 2.75rem; text-align: center; max-width: 420px; box-shadow: 0 24px 64px rgba(0,0,0,0.3); }
.over-emoji { font-size: 54px; margin-bottom: 0.6rem; }
.over-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.over-card p { font-size: 14px; color: #888; margin-bottom: 1.4rem; line-height: 1.6; }
.over-card b { color: #2A7FD4; }

footer { text-align: center; padding: 1.15rem 0; font-size: 12px; color: #bbb; border-top: 1px solid rgba(0,0,0,0.06); }

/* ═══════════ Donkere (leerling) varianten ═══════════ */
[data-theme="dark"] .setup, [data-theme="dark"] .som-bar { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); }
[data-theme="dark"] .setup h2 { color: #e9eef8; }
[data-theme="dark"] .chip { background: rgba(255,255,255,0.045); border-color: rgba(255,255,255,0.12); color: #9aa7bf; }
[data-theme="dark"] .chip:hover { border-color: #4da9ff; color: #7cc4ff; }
[data-theme="dark"] .chip.active { background: rgba(77,169,255,0.14); border-color: #4da9ff; color: #7cc4ff; }
[data-theme="dark"] .hud .val { color: #e9eef8; }
[data-theme="dark"] .hud .val.accent { color: #7cc4ff; }
[data-theme="dark"] .som-vraag { filter: drop-shadow(0 0 12px rgba(77,169,255,0.35)); }
[data-theme="dark"] .answer { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); color: #e9eef8; }
[data-theme="dark"] .answer:hover { border-color: #4da9ff; background: rgba(77,169,255,0.14); }
[data-theme="dark"] .answer.goed { border-color: #3ce6b4; background: rgba(60,230,180,0.16); color: #6ff0c8; }
[data-theme="dark"] .answer.fout { border-color: #ff6b6b; background: rgba(255,107,107,0.16); color: #ff9b9b; }
[data-theme="dark"] .timebar-wrap { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .over-card { background: #0d1320; box-shadow: 0 24px 64px rgba(0,0,0,0.6); }
[data-theme="dark"] .over-card h2 { color: #e9eef8; }
[data-theme="dark"] .over-card b { color: #7cc4ff; }

@media (max-width: 1100px) { .topbar-inner { padding-left: 2rem; padding-right: 2rem; } }
@media (max-width: 600px) { .topbar-inner { flex-wrap: wrap; height: auto; padding: 0.75rem 1rem; gap: 0.5rem; } nav { gap: 2px; } .nav-btn { font-size: 12px; padding: 5px 10px; } .som-vraag { font-size: 26px; } .answer { font-size: 19px; padding: 0.9rem; } }
