/* TV: palcoscenico fisso 1920×1080 scalato allo schermo (leggibile da lontano). */
body.tv { overflow: hidden; height: 100vh; }
#stage {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--k, .5)); transform-origin: center;
}
.screen { position: absolute; inset: 0; }

/* ---------- sala d'attesa ---------- */
#lobby { display: grid; grid-template-columns: 1fr 720px; gap: 60px; padding: 64px 80px; }
.lobby-logo .logo { font-size: 150px; }
.tagline { font-family: var(--f-display); font-size: 44px; margin: 26px 0 40px; color: var(--ink-2); }
.join { display: flex; gap: 40px; align-items: center; padding: 36px 40px; }
.join-text { flex: 1; }
.step { display: flex; gap: 18px; align-items: flex-start; font-size: 34px; font-weight: 800; margin-bottom: 18px; line-height: 1.2; }
.step b { flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; font-family: var(--f-display); }
.url { color: var(--cyan); }
.code { font-family: var(--f-display); font-size: 150px; letter-spacing: .14em; line-height: 1; margin-top: 10px; color: var(--gold); text-shadow: 0 0 40px rgba(255, 182, 39, .5); }
.qr { width: 330px; height: 330px; border-radius: 18px; background: #fff; padding: 12px; flex: none; }
.summary { font-size: 28px; line-height: 1.55; color: var(--ink-2); margin-top: 34px; }
.summary b { color: var(--ink); }
.lobby-right h2 { font-size: 56px; margin: 6px 0 22px; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.slot { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border-radius: 20px; border: 3px dashed var(--line); color: var(--ink-2); font-size: 32px; font-weight: 800; min-height: 112px; }
.slot.on { border: 0; background: linear-gradient(180deg, var(--panel-2), var(--panel)); color: var(--ink); animation: pop .35s ease-out backwards; box-shadow: var(--shadow); }
.slot .avbox { width: 78px; height: 78px; }
.slot .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .tag { font-size: 22px; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: #3a2400; }
.slot .empty { opacity: .55; font-weight: 600; font-size: 26px; }
.slot.off .avbox { opacity: .4; }
.hint { font-family: var(--f-display); font-size: 40px; margin: 30px 0 0; color: var(--gold); }

/* ---------- partita ---------- */
#game { display: grid; grid-template-columns: 470px 1fr; gap: 36px; padding: 30px 40px 30px 30px; }
.side { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.game-logo .logo { font-size: 74px; margin: 0 0 4px 6px; }
.manche-info { padding: 16px 22px; display: flex; gap: 16px; align-items: center; }
.manche-info .mi-ic { font-size: 54px; }
.manche-info b { display: block; font-family: var(--f-display); font-size: 34px; line-height: 1.1; }
.manche-info small { font-size: 24px; font-weight: 800; color: var(--ink-2); }
.players { display: flex; flex-direction: column; gap: 10px; }
.pl { display: grid; grid-template-columns: 70px 1fr auto; column-gap: 14px; align-items: center; padding: 8px 16px; border-radius: 18px; background: rgba(255, 255, 255, .06); transition: transform .25s, background .25s; }
.pl .avbox { width: 70px; height: 70px; grid-row: 1 / 3; }
.pl .nm { font-family: var(--f-display); font-size: 31px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl .role { font-size: 21px; font-weight: 900; color: var(--ink-2); grid-column: 2; }
.pl .sc { grid-row: 1 / 3; grid-column: 3; font-family: var(--f-display); font-size: 50px; min-width: 70px; text-align: right; color: var(--gold); }
.pl.active { background: rgba(255, 182, 39, .22); transform: scale(1.03); box-shadow: 0 0 0 3px var(--gold); }
.pl.got .role { color: var(--ok); }
.pl.blocked .role { color: var(--bad); }
.pl.blocked .avbox { filter: grayscale(.8); opacity: .7; }
.pl.off { opacity: .55; }
.pl.left { opacity: .3; }
.sc.bump { animation: pulse .5s 2; color: var(--ok); }
.players.compact .pl { padding: 4px 14px; }
.players.compact .pl .avbox { width: 56px; height: 56px; }
.players.compact .pl { grid-template-columns: 56px 1fr auto; }
.players.compact .pl .nm { font-size: 27px; }
.players.compact .pl .sc { font-size: 42px; }

.board { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 10px; }
.round-head { display: flex; gap: 16px; align-items: center; justify-content: center; min-height: 64px; flex-wrap: wrap; }
.round-head .chip { font-size: 30px; padding: 10px 24px; }
.round-head .big-chip { font-family: var(--f-display); font-size: 36px; background: rgba(155, 107, 255, .3); }

.disc-wrap { position: relative; width: 560px; height: 560px; flex: none; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 5; }
.ring-fg { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 351.86; transition: stroke .3s; }
.ring-fg.low { stroke: var(--bad); }
.disc { position: absolute; inset: 34px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #1b1340 0 18%, #0a0718 19% 20%, #17102f 21% 100%);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .04), 0 30px 60px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.disc::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 6px, rgba(255, 255, 255, .025) 6px 7px); }
.disc.spin::before { animation: spin 3s linear infinite; background: conic-gradient(from 0deg, transparent 0 20%, rgba(255, 255, 255, .06) 25%, transparent 30% 70%, rgba(255, 255, 255, .06) 75%, transparent 80%), repeating-radial-gradient(circle, transparent 0 6px, rgba(255, 255, 255, .025) 6px 7px); }
@keyframes spin { to { transform: rotate(360deg); } }
.bars { position: absolute; inset: 0; }
.bars i { position: absolute; left: 50%; top: 50%; width: 14px; height: 40px; margin-left: -7px; border-radius: 7px; transform-origin: 50% 0; background: var(--c); opacity: .35; transition: height .25s ease-out, opacity .25s; }
.bars i.hit { opacity: 1; transition: none; }
.disc-center { position: relative; z-index: 2; width: 210px; height: 210px; border-radius: 50%; background: radial-gradient(circle, var(--panel-2), var(--bg-2)); display: grid; place-content: center; text-align: center; box-shadow: 0 0 0 6px rgba(255, 255, 255, .06); }
.disc-center span { font-family: var(--f-display); font-size: 92px; line-height: 1; }
.disc-center small { font-size: 22px; font-weight: 900; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }

.status { font-family: var(--f-display); font-size: 46px; text-align: center; min-height: 60px; }
.status .hl { color: var(--gold); }
.feed { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 1300px; }
.fd { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; background: rgba(255, 84, 112, .18); font-size: 28px; font-weight: 800; animation: pop .3s ease-out; }
.fd .avbox { width: 48px; height: 48px; }
.fd s { opacity: .85; }
.fd.good { background: rgba(61, 220, 151, .2); }
.raf-bar { position: absolute; left: 50px; right: 50px; bottom: 4px; height: 46px; border-radius: 23px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.raf-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.raf-bar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 900; }

/* sovrimpressioni sopra il disco */
.overlay { position: absolute; inset: -10px 0 0; display: grid; place-items: center; text-align: center; padding: 40px; background: rgba(18, 12, 46, .93); border-radius: 30px; z-index: 5; }
.overlay h2 { font-size: 80px; margin-bottom: 16px; }
.overlay p { font-size: 38px; font-weight: 800; margin: 10px 0; color: var(--ink-2); }
.overlay .big-ic { font-size: 150px; line-height: 1; margin-bottom: 10px; }
.overlay .rules-list { font-size: 34px; color: var(--ink); max-width: 1100px; margin: 18px auto 0; }
.overlay .count { font-family: var(--f-display); font-size: 300px; line-height: 1; color: var(--gold); text-shadow: 0 0 60px rgba(255, 182, 39, .6); }
.ov-buzz .avbox { width: 230px; height: 230px; margin: 0 auto 20px; animation: glow 1.2s infinite; }
.ov-buzz h2 { color: var(--gold); }
.ov-buzz .tmr { font-family: var(--f-display); font-size: 110px; color: var(--ink); }
.ov-reveal .cover { display: block; width: 220px; height: 220px; margin: 0 auto 16px; border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.ov-reveal .title { font-family: var(--f-display); font-size: 104px; line-height: 1.05; color: var(--gold); text-shadow: 0 0 40px rgba(255, 182, 39, .45); margin: 6px 0 8px; }
.ov-reveal .by { font-size: 42px; font-weight: 800; color: var(--ink-2); }
.ov-reveal .who { display: inline-flex; align-items: center; gap: 22px; margin-top: 34px; font-family: var(--f-display); font-size: 50px; padding: 14px 36px 14px 14px; border-radius: 999px; background: rgba(61, 220, 151, .2); }
.ov-reveal .who .avbox { width: 96px; height: 96px; }
.ov-reveal .who.none { background: rgba(255, 255, 255, .08); padding: 18px 40px; }
.ov-reveal .label { font-size: 34px; font-weight: 900; color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; }

/* asta */
.auction { width: 100%; }
.auction h2 { font-size: 66px; margin-bottom: 6px; }
.au-row { display: flex; justify-content: center; gap: 22px; margin: 34px 0; flex-wrap: wrap; }
.au-p { width: 190px; padding: 16px 10px; border-radius: 24px; background: rgba(255, 255, 255, .06); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; }
.au-p .avbox { width: 100px; height: 100px; }
.au-p .bid { font-family: var(--f-display); font-size: 54px; color: var(--ink-2); min-height: 64px; }
.au-p.turn { background: rgba(255, 182, 39, .25); box-shadow: 0 0 0 4px var(--gold); }
.au-p.best .bid { color: var(--gold); }
.au-big { font-family: var(--f-display); font-size: 64px; }
.au-big b { color: var(--gold); font-size: 96px; }

/* ---------- fine partita ---------- */
#final { display: flex; flex-direction: column; align-items: center; padding: 50px 60px; gap: 26px; text-align: center; }
#final h1 { font-size: 92px; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 30px; margin-top: 20px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 300px; }
.pod .avbox { width: 150px; height: 150px; }
.pod .nm { font-family: var(--f-display); font-size: 40px; }
.pod .col { width: 100%; border-radius: 22px 22px 0 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 70px; color: #1a1240; }
.pod.p1 .col { height: 320px; background: linear-gradient(180deg, #ffe08a, var(--gold)); }
.pod.p2 .col { height: 230px; background: linear-gradient(180deg, #e9e6ff, #b9b2e8); }
.pod.p3 .col { height: 170px; background: linear-gradient(180deg, #ffc49b, #e08a50); }
.pod.p1 .avbox { width: 190px; height: 190px; animation: glow 1.4s infinite; }
.others { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; font-size: 30px; font-weight: 800; color: var(--ink-2); }
.fin-hint { font-family: var(--f-display); font-size: 40px; color: var(--gold); }

/* ---------- strumenti ---------- */
.tools { position: absolute; right: 26px; bottom: 22px; display: flex; gap: 12px; opacity: .35; transition: opacity .2s; z-index: 20; }
.tools:hover { opacity: 1; }
.tbtn { width: 64px; height: 64px; border-radius: 18px; border: 0; background: var(--panel-2); color: var(--ink); font-size: 30px; cursor: pointer; display: grid; place-items: center; }
.audio-gate { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); z-index: 30; font-family: var(--f-display); font-size: 40px; padding: 22px 44px; border-radius: 999px; border: 0; background: var(--gold); color: #3a2400; cursor: pointer; animation: glow 1.4s infinite; }
.net, .err { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); padding: 16px 30px; border-radius: 999px; font-size: 30px; font-weight: 900; z-index: 40; }
.net { background: var(--gold); color: #3a2400; }
.err { background: var(--bad); color: #fff; }
