:root {
  --bg: #14102a;
  --bg2: #241a4a;
  --card: #2d2358;
  --ink: #f6f1ff;
  --muted: #b9addf;
  --gold: #ffc94d;
  --good: #2fbf71;
  --bad: #e2525c;
  --half: #e9a23b;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, #3b2a7a 0%, var(--bg2) 35%, var(--bg) 75%) fixed;
  background-color: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.4;
}
.app { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
.screen { text-align: center; }
[hidden] { display: none !important; }

h1 { font-size: clamp(32px, 8vw, 48px); font-weight: 900; margin: 8px 0 12px; color: var(--gold); letter-spacing: .5px; }
h2 { font-size: 20px; font-weight: 800; margin: 0 0 10px; text-align: left; }
.lead { font-size: 19px; margin: 0 0 10px; }
.small { color: var(--muted); font-size: 15px; margin: 0 0 28px; }
.notes { font-size: 54px; margin-top: 28px; color: var(--gold); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

button { font: inherit; cursor: pointer; border: 0; color: inherit; }
button:disabled { cursor: default; }
.big {
  display: block; width: 100%; max-width: 360px; margin: 18px auto 0; padding: 16px 20px;
  border-radius: 16px; background: var(--gold); color: #2a1b00; font-size: 21px; font-weight: 900;
  box-shadow: 0 6px 0 #c3901d; transition: transform .08s, box-shadow .08s;
}
.big:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #c3901d; }
.big:disabled { opacity: .6; }

.top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; margin-bottom: 12px; }
.tally { display: flex; gap: 16px; font-size: 20px; }
.tally b { font-weight: 900; }
a.big { text-decoration: none; text-align: center; }
a.ctl { text-decoration: none; color: var(--ink); }
.link { display: block; width: fit-content; margin: 16px auto 0; background: none; color: var(--muted); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
#stats h2 { text-align: left; margin-top: 22px; }
.summary .n { min-width: 44px; text-align: center; font-weight: 900; font-size: 20px; color: var(--bad); }
.summary li.clean .n { color: var(--good); }
.summary .t { flex: 1; }

/* Pódium: pod obalem je skutečný YouTube přehrávač, obal ho celý zakrývá. */
.stage { position: relative; height: 210px; border-radius: 20px; overflow: hidden; background: #000; }
.stage #yt, .stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cover {
  position: absolute; inset: 0; z-index: 2; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: linear-gradient(160deg, #3a2b78, #1c1540);
  border: 2px solid #4b3a92; border-radius: 20px;
}
.stage.tap .cover { pointer-events: none; }  /* klepnutí projde do přehrávače */
.status { font-weight: 800; font-size: 18px; padding: 0 16px; }
.status.tapme { color: var(--gold); font-size: 21px; animation: pulse 1.2s ease-in-out infinite; }
.status.err { color: #ffb3b8; font-size: 16px; }
@keyframes pulse { 50% { transform: scale(1.06); } }

.eq { display: flex; gap: 7px; align-items: flex-end; height: 78px; }
.eq i { display: block; width: 12px; height: 14px; border-radius: 6px; background: var(--gold); opacity: .55; }
.stage.on .eq i { opacity: 1; animation: bar 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.2s !important; }
.eq i:nth-child(3) { animation-delay: -.5s !important; }
.eq i:nth-child(4) { animation-delay: -.1s !important; }
.eq i:nth-child(5) { animation-delay: -.7s !important; }
.eq i:nth-child(6) { animation-delay: -.3s !important; }
.eq i:nth-child(7) { animation-delay: -.6s !important; }
@keyframes bar { 0%, 100% { height: 14px; } 50% { height: 78px; } }

.controls { display: flex; gap: 10px; justify-content: center; margin: 12px 0 22px; }
.ctl { background: var(--card); border-radius: 12px; padding: 10px 16px; font-weight: 800; font-size: 16px; }

.q { background: rgba(255,255,255,.04); border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.opts { display: grid; gap: 9px; }
.opt {
  text-align: left; padding: 13px 16px; border-radius: 12px; background: var(--card);
  border: 2px solid #43357f; font-weight: 700; font-size: 17px; transition: background .15s, border-color .15s;
}
.opt:hover:not(:disabled) { border-color: var(--gold); }
.opt:disabled { opacity: .55; }
.opt.good { background: var(--good); border-color: var(--good); opacity: 1; color: #fff; }
.opt.bad { background: var(--bad); border-color: var(--bad); opacity: 1; color: #fff; }
.opt.good::after { content: "  ✓"; }
.opt.bad::after { content: "  ✗"; }

.reveal { border-radius: 16px; padding: 14px 16px; font-size: 18px; margin-top: 4px; }
.reveal.good { background: rgba(47,191,113,.2); border: 2px solid var(--good); }
.reveal.half { background: rgba(233,162,59,.18); border: 2px solid var(--half); }
.reveal.bad { background: rgba(226,82,92,.18); border: 2px solid var(--bad); }

.summary { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; display: grid; gap: 8px; }
.summary li { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 12px; padding: 10px 14px; }
.summary .m { white-space: nowrap; font-size: 15px; }
.summary small { color: var(--muted); font-size: 14px; }
