@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* Theme: Bootstrap handles layout, spacing, forms and base controls. */
:root,
[data-bs-theme="dark"] {
  --bg: #131216;
  --panel: #201e24;
  --muted: #aaa5b2;
  --hot: #fc583a;
  --lime: #d9ff70;
  --line: #39353f;
  --bs-body-bg: var(--bg);
  --bs-body-color: #f8f5f1;
  --bs-secondary-color: #b7b2bd;
  --bs-border-color: var(--line);
  --bs-tertiary-bg: #29262e;
  --bs-body-font-family: Manrope, system-ui, sans-serif;
  --bs-body-line-height: 1.6;
  --bs-link-color: var(--lime);
  --bs-link-color-rgb: 217, 255, 112;
  --bs-link-hover-color: #eaffb0;
  --bs-link-hover-color-rgb: 234, 255, 176;
  --bs-danger-rgb: 255, 117, 127;
}

body { min-height: 100dvh; }
a { text-underline-offset: .2em; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}
.shell {
  max-width: 1140px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
header { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.brand {
  flex-shrink: 0;
  color: var(--bs-body-color);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1.5px;
  text-decoration: none;
}
.brand:hover { color: var(--bs-body-color); }
.brand span { color: var(--hot); }
.brand i { padding-left: 4px; color: var(--lime); font-style: normal; }
.edition {
  max-width: 155px;
  margin-left: auto;
  color: var(--bs-secondary-color);
  font-size: 12px;
  line-height: 1.4;
}
main { min-height: 75dvh; }
footer {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
footer a { color: inherit; text-decoration: none; }
.card { --bs-card-bg: var(--panel); --bs-card-border-color: var(--line); }
.btn {
  --bs-btn-border-radius: .75rem;
  min-height: 44px;
  padding: .75rem 1rem;
  font-weight: 700;
  line-height: 1.4;
}
.btn-primary {
  --bs-btn-color: #211410;
  --bs-btn-bg: var(--hot);
  --bs-btn-border-color: var(--hot);
  --bs-btn-hover-color: #211410;
  --bs-btn-hover-bg: #ff775e;
  --bs-btn-hover-border-color: #ff775e;
  --bs-btn-active-color: #211410;
  --bs-btn-active-bg: #ed492d;
  --bs-btn-active-border-color: #ed492d;
  --bs-btn-disabled-color: #c0b4af;
  --bs-btn-disabled-bg: #51413b;
  --bs-btn-disabled-border-color: #51413b;
  --bs-btn-disabled-opacity: 1;
}
.btn-primary > span { margin-left: .75rem; }
.btn-outline-secondary {
  --bs-btn-color: #e0dae6;
  --bs-btn-border-color: #625b6b;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #3b3542;
  --bs-btn-hover-border-color: #9e9aa7;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #443c4e;
  --bs-btn-active-border-color: #9e9aa7;
}
.form-control, .form-select {
  min-height: 48px;
  border-radius: .65rem;
  background-color: var(--bs-tertiary-bg);
  font-size: 1rem;
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 .2rem rgb(217 255 112 / 18%);
}
.form-control::placeholder { color: #a29ba9; }
.form-label { font-size: .875rem; }
.form-check-input:checked { background-color: var(--hot); border-color: var(--hot); }
.form-check-input { border-color: #8b8296; width: 1.25em; height: 1.25em; margin-top: .2em; }
.small { font-size: .875rem; }

/* Landing and player setup. */
.landing-title {
  font-size: clamp(1.75rem, 7.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.landing-title em { color: var(--hot); font-style: normal; }
.landing-copy { line-height: 1.65; }
.steps { color: var(--muted); font-size: .75rem; }
.steps b { margin-right: .25rem; color: var(--lime); }
.section-number { color: var(--hot); font-size: .75rem; font-weight: 800; }
#lineup { scroll-margin-top: 16px; }
.player-row .form-control { min-width: 0; }
.remove-player { flex: 0 0 44px; padding: .5rem; font-size: 20px; }
.error:empty { display: none; }
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f6b7fc;
  color: #271831;
  font-size: 12px;
  font-weight: 800;
}
.avatar.alt { background: #c2d9ff; }
.record-scene { position: relative; height: 208px; margin-top: 24px; overflow: hidden; }
.record {
  position: absolute;
  top: 5px;
  left: 60px;
  width: 230px;
  height: 230px;
  border: 1px solid #49414b;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #141317 0 3px, #302b33 4px, #17151a 5px 7px);
  box-shadow: 0 10px 50px #0006;
  transform: rotate(-15deg);
}
.record::before {
  content: 'HOT HIT\A SIDE A · 33 RPM';
  position: absolute;
  inset: 70px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: var(--hot);
  color: #1c1616;
  font-size: 12px;
  font-weight: 800;
  line-height: 2;
  letter-spacing: 1px;
  text-align: center;
  white-space: pre;
}
.record::after {
  content: '';
  position: absolute;
  top: 110px;
  left: 110px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #17151a;
}
.sticker {
  position: absolute;
  top: 48px;
  left: 215px;
  padding: 10px 17px;
  border-radius: 8px;
  background: var(--lime);
  color: #20241a;
  font-size: 12px;
  font-weight: 800;
  transform: rotate(12deg);
}
.orbit { position: absolute; top: 110px; left: 5px; color: var(--hot); font-size: 56px; transform: rotate(-20deg); }

/* Consent, loading, pause and results share the same screen width. */
.game { max-width: 660px; margin: 24px auto 32px; }
.game h2 { margin: 0 0 24px; font-size: clamp(1.375rem, 5.5vw, 1.75rem); font-weight: 800; line-height: 1.35; letter-spacing: -.025em; overflow-wrap: anywhere; }
.consent { line-height: 1.65; }
h2[tabindex="-1"]:focus { outline: none; }
.consent .btn-close { box-sizing: content-box; width: 1.25rem; height: 1.25rem; padding: .75rem; margin: -.5rem -.5rem 0 0; }
.consent .form-check { padding-left: 2rem; }
.consent .form-check-input { margin-left: -2rem; }
.consent p { color: var(--bs-secondary-color); }
.screen-center { padding: 24px 0; }
.screen-center p, .sub { color: var(--bs-secondary-color); }
.screen-center > .btn { display: block; max-width: 420px; margin: 16px auto 0; }
.screen-center > .btn-primary { margin-top: 24px; }
.hero-symbol { margin: 0 0 24px; color: var(--lime); font-size: 64px; line-height: 1.2; }
.score-row { background: transparent; }
.score-row strong { min-width: 0; overflow-wrap: anywhere; }
.score-row b:last-child { margin-left: auto; color: var(--lime); white-space: nowrap; }

/* Compact game header and question. */
.header-pause { display: none; }
.playing .shell { padding-top: max(4px, env(safe-area-inset-top)); }
.playing header { min-height: 32px; padding: 0; border-bottom: 0; }
.playing .brand { font-size: 16px; letter-spacing: -.7px; }
.playing .brand i, .playing .edition { display: none; }
.playing .header-pause { display: inline-block; min-height: 32px; margin-left: auto; padding: 5px 12px; border-radius: 8px; background: #302b37; font-size: 12px; }
.playing .game { margin-top: 16px; }
.turn { min-width: 0; font-size: .875rem; font-weight: 700; overflow-wrap: anywhere; }
.score-badge { flex-shrink: 0; padding: .5rem .65rem; border: 1px solid var(--line); color: #c9c2d0; font-size: .75rem; font-weight: 500; }
.timer { --bs-progress-height: 4px; --bs-progress-bg: #302c36; --bs-progress-bar-bg: var(--lime); }
.timer .progress-bar { transition: width .1s linear; }
.eyebrow { color: var(--lime); font-size: .75rem; font-weight: 700; line-height: 1.5; letter-spacing: .06em; text-transform: uppercase; }
.seconds { color: var(--lime); font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.emoji { margin-bottom: 24px; font-size: clamp(1.5rem, 7vw, 2rem); overflow-wrap: anywhere; }
.answer {
  min-height: 64px;
  padding: 12px;
  border-color: var(--line);
  background: var(--panel);
  color: var(--bs-body-color);
  font-size: .9375rem;
  font-weight: 500;
}
.answer:hover:not(:disabled) { border-color: var(--lime); background: #292b24; color: #fff; }
.answer:disabled { opacity: .55; }
.letter { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid #62596c; border-radius: 7px; color: #bbb2c4; font-size: 12px; }
.answer.answer-correct { border-color: #65df98; background: #173c29; color: #9bffbd; opacity: 1; }
.answer-correct .letter { border-color: #65df98; color: inherit; }
.answer.answer-wrong { border-color: #ff757f; background: #481f25; color: #ffb6bc; opacity: 1; }
.answer-wrong .letter { border-color: #ff757f; color: inherit; }
.feedback-error .progress-bar { background: #ff757f; }
.feedback-error .seconds { color: #ff757f; }
.answer-flash { animation: correct-flash .4s ease-in-out 2; }
.answer-loading { position: relative; overflow: hidden; isolation: isolate; }
.answer-loading::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #287044; transform: scaleX(0); transform-origin: left; animation: success-fill var(--success-duration) linear forwards; }
.now { --bs-card-bg: #24291e; --bs-card-border-color: #424a32; border-radius: 12px; }
.now strong { display: block; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.now small { display: block; margin-bottom: 4px; color: var(--lime); font-size: .6875rem; letter-spacing: .05em; }
.bars { display: flex; align-items: center; flex: 0 0 24px; gap: 3px; height: 28px; }
.bars i { width: 4px; height: 18px; background: var(--lime); animation: beat .6s infinite alternate; }
.bars i:nth-child(2) { height: 28px; animation-delay: -.3s; }
.bars i:nth-child(3) { height: 12px; animation-delay: -.1s; }
.feedback-error .bars i { animation-play-state: paused; }
#toast { position: fixed; z-index: 5; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; display: none; width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: #faf4ec; color: #231c21; font-size: .875rem; transform: translateX(-50%); }
.credits { max-width: 700px; margin: 32px auto; line-height: 1.8; }
.credits h1 { margin: 24px 0; font-size: 2rem; }
.credits li { margin-bottom: 16px; }

@keyframes beat { to { height: 5px; } }
@keyframes correct-flash { 50% { background: #287044; box-shadow: 0 0 18px #65df9840; } }
@keyframes success-fill { to { transform: scaleX(1); } }
@media (min-width: 576px) {
  .shell { padding: 20px 24px 24px; }
  .brand { font-size: 32px; }
  .edition { max-width: none; font-size: 14px; }
  footer { font-size: 12px; }
}
@media (min-width: 992px) {
  .landing-title { font-size: 2.75rem; }
  .landing-copy { max-width: 460px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
