/* Do Re Quiz — stili comuni. Stile «Palco»: sala buia, luci colorate, tasti grandi da quiz show. */
:root {
  --bg: #120c2e;
  --bg-2: #1d1446;
  --panel: #251a57;
  --panel-2: #2f2270;
  --ink: #fff7ea;
  --ink-2: #c8bfee;
  --pink: #ff4f9a;
  --gold: #ffb627;
  --green: #3ddc97;
  --cyan: #4cc9f0;
  --violet: #9b6bff;
  --coral: #ff6b4a;
  --ok: #3ddc97;
  --bad: #ff5470;
  --line: rgba(255, 255, 255, .14);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 22px;
  --f-display: 'Fredoka', 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --f-text: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-text); color: var(--ink); background: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 50% at 15% -10%, rgba(255, 79, 154, .28), transparent 70%),
    radial-gradient(ellipse 60% 50% at 85% -10%, rgba(76, 201, 240, .25), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(155, 107, 255, .3), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
h1, h2, h3, .display { font-family: var(--f-display); font-weight: 700; letter-spacing: .01em; margin: 0; }
button { font: inherit; color: inherit; }
a { color: var(--cyan); }
.hidden { display: none !important; }

/* pulsanti */
.btn {
  appearance: none; border: 0; background: var(--panel-2); color: var(--ink);
  font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; line-height: 1.1; text-decoration: none;
  padding: .8em 1.2em; border-radius: 18px; box-shadow: 0 5px 0 rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .15); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 54px;
  transition: transform .08s, box-shadow .08s, filter .15s; touch-action: manipulation; user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #ff6fae, var(--pink)); color: #fff; }
.btn.go { background: linear-gradient(180deg, #5ef0b0, #22b97a); color: #06281a; }
.btn.gold { background: linear-gradient(180deg, #ffd166, var(--gold)); color: #3a2400; }
.btn.cyan { background: linear-gradient(180deg, #7fdcfa, #2fb2e0); color: #052636; }
.btn.violet { background: linear-gradient(180deg, #b48cff, var(--violet)); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; border: 2px solid var(--line); }
.btn.big { font-size: 1.45rem; padding: .9em 1.4em; min-height: 66px; }
.btn.wide { width: 100%; }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }

/* logo */
.logo { position: relative; display: inline-flex; align-items: center; gap: .12em; white-space: nowrap; font-family: var(--f-display); font-weight: 700; line-height: 1; }
.logo-syl { color: var(--c); text-shadow: 0 0 .25em color-mix(in srgb, var(--c) 60%, transparent), 0 .06em 0 rgba(0, 0, 0, .4); display: inline-block; }
.logo-syl.s0 { transform: translateY(.08em) rotate(-4deg); }
.logo-syl.s1 { transform: translateY(-.06em) rotate(3deg); }
.logo-syl.s2 { margin-left: .12em; transform: rotate(-2deg); }
.logo-note { display: inline-block; width: .55em; height: .8em; }
.logo-note svg { width: 100%; height: 100%; display: block; }
.logo-note.n1 { transform: rotate(-12deg) translateY(-.1em); animation: bob 2.4s ease-in-out infinite; }
.logo-note.n2 { transform: rotate(10deg) translateY(-.25em); animation: bob 2.4s ease-in-out .8s infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -.12em; } }

/* avatar */
.av { display: block; width: 100%; height: 100%; }
.avbox { width: 56px; height: 56px; border-radius: 50%; background: #fff; padding: 3px; flex: none; position: relative; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }

/* chip */
.chip {
  display: inline-flex; align-items: center; gap: .35em; padding: .35em .8em; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid var(--line); font-weight: 800; font-size: .95rem; line-height: 1.1;
}
.chip.facile { background: rgba(61, 220, 151, .2); color: #9ff5cf; }
.chip.media { background: rgba(255, 182, 39, .2); color: #ffd98a; }
.chip.difficile { background: rgba(255, 84, 112, .22); color: #ffaab8; }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 99; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--rot)); } }

@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 182, 39, .6); } 50% { box-shadow: 0 0 0 14px rgba(255, 182, 39, 0); } }
.pop { animation: pop .35s ease-out both; }
.shake { animation: shake .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -.14em; flex: none; }
