:root{
  --bg:#0c193d;
  --bg-soft:#17294f;
  --surface:rgba(255,255,255,0.08);
  --surface-strong:rgba(255,255,255,0.14);
  --accent:#ffd541;
  --accent-strong:#4c6fe8;
  --muted:#9aa4b2;
  --text:#e9f0ff;
}
*{box-sizing:border-box}
html,body,#app{height:100%;margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial}
body{background:radial-gradient(circle at top center, rgba(76,111,232,0.18), transparent 24%), linear-gradient(180deg,#0a1430 0%,#0c193d 100%);color:var(--text);display:flex;align-items:center;justify-content:center;min-height:100vh;padding:18px}
.screen{display:none;width:100%;max-width:760px;padding:24px;visibility:hidden;opacity:0;transform:translateY(8px);transition:opacity 240ms ease,transform 240ms ease,visibility 240ms}
.screen.active{display:block;visibility:visible;opacity:1;transform:translateY(0)}
.title{font-size:2.8rem;margin:0;text-align:left;letter-spacing:-0.04em}
.subtitle{margin:4px 0 0;color:var(--muted)}
.highscore{margin:0;font-size:0.95rem;color:var(--text);font-weight:600;text-align:right}
.hero-copy{margin:18px 0 20px;font-size:1.05rem;line-height:1.6;color:#dfe7ff;max-width:720px}
.splash-top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px}
.brand-pill{display:flex;align-items:center;gap:14px;background:rgba(255,255,255,0.06);padding:14px 16px;border-radius:24px;backdrop-filter:blur(8px);box-shadow:0 18px 44px rgba(0,0,0,0.2)}
.brand-mark{width:48px;height:48px;border-radius:18px;background:linear-gradient(180deg,#ffd541,#ffb500);color:#082026;display:grid;place-items:center;font-size:1.4rem;font-weight:800;box-shadow:0 12px 24px rgba(255,181,0,0.28)}
.game-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.game-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 16px;border-radius:24px;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.08);color:var(--text);text-align:left;min-height:120px;box-shadow:0 18px 44px rgba(0,0,0,0.18);transition:transform 180ms ease, border-color 180ms ease, background-color 180ms ease}
.game-card:hover:not(.disabled),.game-card:focus-visible:not(.disabled){transform:translateY(-2px);border-color:rgba(255,255,255,0.22);background:rgba(255,255,255,0.09);outline:none}
.game-card.disabled{opacity:0.55;cursor:not-allowed;pointer-events:none}
.game-card.active{border-color:rgba(255,213,65,0.6);background:rgba(255,221,65,0.12)}
.card-title{font-size:1rem;font-weight:800;margin-bottom:6px}
.card-subtitle{font-size:0.9rem;color:#d1d9ec;line-height:1.4}
.card-badge{padding:8px 12px;border-radius:999px;font-size:0.82rem;font-weight:700;background:rgba(255,255,255,0.08);color:var(--text);min-width:58px;text-align:center}
.game-header{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;margin-bottom:18px}
.game-meta{display:grid;gap:6px}
.game-title{font-size:1.5rem;font-weight:800;letter-spacing:-0.04em}
.game-prompt{color:var(--muted);font-size:0.96rem}
.hud-group{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.lights{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:flex-end}
.light-item{display:flex;flex-direction:column;align-items:center;font-size:0.75rem;color:var(--muted);min-width:72px;line-height:1.15}
.score, .timer{background:rgba(255,255,255,0.06);padding:12px 16px;border-radius:18px;letter-spacing:-0.01em;min-width:110px;text-align:center}
@media (max-width:680px){
  .splash-top{flex-direction:column;align-items:flex-start}
  .game-cards{grid-template-columns:1fr}
  .hero-copy{font-size:1rem}
  .game-header{grid-template-columns:1fr;}
  .hud-group{justify-content:flex-start;}
}
@media (max-width:540px){
  .board{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px}
  .game-header .score,.game-header .timer{flex:1 1 45%;font-size:0.95rem}
  .light-item{min-width:0}
}
.game-header{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;margin-bottom:18px}
.lights{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:flex-end}
.light-item{display:flex;flex-direction:column;align-items:center;font-size:0.75rem;color:var(--muted);min-width:72px;line-height:1.15}
.score, .timer{background:rgba(255,255,255,0.06);padding:10px 14px;border-radius:16px;letter-spacing:-0.01em}
@media (max-width:540px){
  .game-header{grid-template-columns:1fr;}
  .lights{justify-content:flex-start}
}
.light{width:18px;height:18px;border-radius:50%;display:block;margin-bottom:4px;background:rgba(255,255,255,0.04);box-shadow:inset 0 -2px 4px rgba(0,0,0,0.4);transition:transform 0.16s ease, box-shadow 0.16s ease}
.light.red{background:linear-gradient(180deg,#ff8a6a,#d4412b)}
.light.yellow{background:linear-gradient(180deg,#ffe37a,#d1a300)}
.light.purple{background:linear-gradient(180deg,#cfa0ff,#6e23d1)}
.light.active{box-shadow:0 6px 18px rgba(0,0,0,0.35),0 0 32px rgba(255,255,255,0.06);transform:scale(1.12)}
.board{display:grid;gap:10px;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;justify-items:center;padding:18px;background:rgba(15,23,36,0.94);border-radius:32px;box-shadow:0 24px 90px rgba(0,0,0,0.32), inset 0 14px 36px rgba(255,255,255,0.06);width:min(96vw,720px);margin:0 auto;transition:padding 0.2s ease, transform 0.24s ease;touch-action: manipulation}
.controls{display:flex;gap:12px;justify-content:center;margin-top:18px;flex-wrap:wrap}
button{cursor:pointer;border:none;border-radius:16px;background:linear-gradient(180deg,#ffcc00,#f5ae09);color:#082026;font-weight:700;padding:14px 20px;box-shadow:0 12px 24px rgba(0,0,0,0.22);transition:transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;min-width:120px}
button:hover,button:focus-visible{transform:translateY(-1px);box-shadow:0 16px 30px rgba(0,0,0,0.24);outline:none}
button:focus-visible{box-shadow:0 0 0 4px rgba(255,204,0,0.35)}
button.secondary{background:rgba(255,255,255,0.1);color:#fdf7d8}
button.secondary:hover{background:rgba(255,255,255,0.16)}
.link:hover{background:rgba(255,255,255,0.08)}

@media (max-width:540px){
  .board{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px}
  .game-header{gap:8px}
  .game-header .score,.game-header .timer{flex:1 1 45%;font-size:0.95rem}
  .light-item{min-width:0}
}

.hole{background:rgba(255,255,255,0.06);width:100%;padding-top:100%;position:relative;border-radius:24px;overflow:hidden;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 4px 18px rgba(255,255,255,0.12), inset 0 -8px 14px rgba(0,0,0,0.2);transition:transform 200ms ease, background-color 200ms ease;touch-action: manipulation}
.hole:hover{transform:translateY(-2px)}
.hole::after{content:'';position:absolute;inset:6%;border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,0.08),rgba(0,0,0,0.1));pointer-events:none}
.mole{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(0.78);width:72%;height:72%;background:radial-gradient(circle at 30% 30%, #ffffff, #e6eef8 86%);border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#082026;transition:transform 0.14s cubic-bezier(.2,.9,.3,1), box-shadow 0.14s ease, filter 0.14s ease, opacity 0.14s ease}
.mole.up{transform:translate(-50%,-35%) scale(1);opacity:1}
.mole:focus-visible{outline:4px solid rgba(255,204,0,0.7);outline-offset:6px;}
.mole.hit{transform:translate(-50%,-35%) scale(0.92);box-shadow:0 0 0 6px rgba(255,204,0,0.16)}
.mole.miss{transform:translate(-50%,-35%) scale(0.92);box-shadow:0 0 0 10px rgba(255,60,60,0.18);filter:grayscale(0.1)}
.mole.red.up{background:radial-gradient(circle at 30% 30%,#fff4e6,#ff6b4a 46%,#d4412b 100%);box-shadow:0 14px 34px rgba(255,107,74,0.28),0 0 64px rgba(255,107,74,0.22);transform:translate(-50%,-35%) scale(1.06);filter:brightness(1.05)}
.mole.yellow.up{background:radial-gradient(circle at 30% 30%,#fffbe6,#ffd400 46%,#d1a300 100%);box-shadow:0 14px 34px rgba(255,212,0,0.28),0 0 64px rgba(255,212,0,0.18);transform:translate(-50%,-35%) scale(1.06);filter:brightness(1.06)}
.mole.purple.up{background:radial-gradient(circle at 30% 30%,#faf0ff,#9b45ff 46%,#6e23d1 100%);box-shadow:0 14px 34px rgba(155,69,255,0.28),0 0 64px rgba(155,69,255,0.22);transform:translate(-50%,-35%) scale(1.06);filter:brightness(1.03)}
.hit{transform:translate(-50%,-35%) scale(0.92);box-shadow:0 0 0 6px rgba(255,204,0,0.12)}
.mole.miss{transform:translate(-50%,-35%) scale(0.92);box-shadow:0 0 0 10px rgba(255,60,60,0.18);filter:grayscale(0.1)}
.final-score{font-size:3.8rem;text-align:center;margin:16px 0 8px;color:var(--accent);letter-spacing:-0.04em;font-weight:800}
#new-high{font-size:0.88rem;letter-spacing:0.22em;color:#ffe599;margin-bottom:10px;text-transform:uppercase}
.score-actions{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}
.score-actions button, .score-actions .link{min-width:120px}
.secondary{background:rgba(255,255,255,0.12);color:#f9f3d4}
.secondary:hover{background:rgba(255,255,255,0.18)}
.link{color:var(--accent);text-decoration:none;font-weight:700;display:inline-flex;align-items:center;justify-content:center;padding:14px 20px;border-radius:16px;background:rgba(255,255,255,0.06);box-shadow:0 10px 22px rgba(0,0,0,0.16)}
.link:hover{background:rgba(255,255,255,0.1)}

.game-header .score,.game-header .timer{background:rgba(255,255,255,0.03);padding:8px 12px;border-radius:8px}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.site-footer{color:var(--muted);text-align:center;padding:12px 0;font-size:0.85rem}
