/* TV: pensado para 1280×720 a 1920×1080, lido do sofá. Tudo em vw/vh. */
:root {
  --bg1: #140824;
  --bg2: #2a0b3d;
  --pink: #ff4fd8;
  --cyan: #33e1ff;
  --yellow: #ffd23f;
  --green: #7cff6b;
  --text: #fff;
  --muted: #c9b8e0;
  --card: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.15);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: 'Baloo 2', system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at 20% 10%, #4a1470 0%, transparent 55%),
              radial-gradient(ellipse at 90% 90%, #0b3a5c 0%, transparent 50%),
              linear-gradient(160deg, var(--bg1), var(--bg2));
  font-size: 1.6vw;
}
b { font-weight: 800; }

.logo { font-size: 4.2vw; font-weight: 800; letter-spacing: -0.02em; }
.logo b { background: linear-gradient(90deg, var(--pink), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.95vw; color: var(--muted); font-weight: 700; margin-bottom: 0.6vh; }
.badge { display: inline-block; padding: 0.4vh 1.2vw; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 700; margin: 1vh 0 2vh; }
.badge.game { background: linear-gradient(90deg, #ff9d00, #ff4f7b); border: 0; }

.screen { position: absolute; inset: 0; display: none; }
.screen.show { display: grid; }

.overlay { position: fixed; inset: 0; display: none; place-items: center; background: rgba(10, 3, 20, 0.82); backdrop-filter: blur(6px); z-index: 10; }
.overlay.show { display: grid; }
.card { background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)); border: 1px solid var(--line); border-radius: 2vw; padding: 4vh 4vw; text-align: center; max-width: 80vw; }
.big-btn { font: inherit; font-size: 2.2vw; font-weight: 800; color: #1a0630; background: linear-gradient(90deg, var(--yellow), var(--pink)); border: 0; border-radius: 99px; padding: 1.6vh 3vw; cursor: pointer; }
.big-btn:focus { outline: 0.4vw solid var(--cyan); outline-offset: 0.4vw; }
.hint { color: var(--muted); font-size: 1.1vw; }

/* ---------- Lobby */
#lobby { grid-template-columns: 1.15fr 1fr; align-items: center; padding: 0 6vw; gap: 4vw; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.2vh; font-size: 2vw; line-height: 1.25; }
.steps li { display: flex; gap: 1.4vw; align-items: flex-start; }
.steps span { flex: none; width: 3.4vw; height: 3.4vw; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: #1a0630; font-weight: 800; }
.players { display: flex; flex-wrap: wrap; gap: 0.8vw; margin-top: 4vh; min-height: 5vh; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 0.4vh 1.1vw; font-weight: 700; font-size: 1.4vw; }
.chip.off { opacity: 0.4; }
.qr-card { background: #fff; color: #1a0630; border-radius: 2vw; padding: 2.5vw; text-align: center; box-shadow: 0 0 6vw rgba(255, 79, 216, 0.35); }
.qr-card img { width: 30vw; height: 30vw; display: block; margin: 0 auto; image-rendering: pixelated; }
.qr-card .code { font-size: 2.2vw; margin-top: 1vh; }
.qr-card .code b { letter-spacing: 0.25em; font-size: 3vw; }
.qr-card .url { font-size: 1.2vw; color: #6b5a80; word-break: break-all; }

/* ---------- Palco */
#stage { grid-template-columns: 1fr 22vw; }
.video-area { display: grid; grid-template-rows: 1fr 17vh; min-height: 0; padding: 1.5vh 0 1.5vh 1.5vw; gap: 1.2vh; }
.video-box { position: relative; min-height: 0; border-radius: 1.2vw; overflow: hidden; background: #000; }
.video-box iframe, #yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#pitch { width: 100%; height: 100%; border-radius: 1.2vw; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.side { display: flex; flex-direction: column; gap: 1.5vh; padding: 1.5vh 1.5vw; min-height: 0; }
.block { background: var(--card); border: 1px solid var(--line); border-radius: 1.2vw; padding: 1.4vh 1.1vw; }
.block.grow { flex: 1; min-height: 0; overflow: hidden; }
.singer { display: flex; gap: 0.8vw; align-items: center; margin-bottom: 1.2vh; }
.singer .em { font-size: 2.8vw; line-height: 1; }
.singer .info { flex: 1; min-width: 0; }
.singer .info b { display: block; font-size: 1.6vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c); }
.singer small { display: block; font-size: 0.9vw; color: var(--muted); }
.singer small.warn { color: var(--yellow); }
.meter { height: 0.9vh; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin-top: 0.4vh; }
.meter i { display: block; height: 100%; width: 0; background: var(--c); transition: width 0.08s linear; }
.score-box { display: none; text-align: center; }
.score-box.show { display: block; }
#liveScore { font-size: 4.5vw; font-weight: 800; line-height: 1; color: var(--yellow); }
.q-item { display: flex; gap: 0.6vw; align-items: center; padding: 0.7vh 0; border-bottom: 1px solid var(--line); font-size: 1.15vw; }
.q-item:last-child { border: 0; }
.q-item .em { font-size: 1.6vw; }
.q-item div { min-width: 0; }
.q-item b, .q-item small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item small { color: var(--muted); font-size: 0.95vw; }
.empty { color: var(--muted); font-size: 1.1vw; }
.mini-qr { display: flex; gap: 0.8vw; align-items: center; font-size: 1.1vw; }
.mini-qr img { width: 7vw; height: 7vw; background: #fff; border-radius: 0.6vw; padding: 0.3vw; }
.mini-qr b { font-size: 1.8vw; letter-spacing: 0.15em; color: var(--yellow); }

/* ---------- Intro / votação / nota */
.intro-card .singers-big { font-size: 4vw; font-weight: 800; line-height: 1.1; margin: 1vh 0; }
.intro-card .song { font-size: 2.6vw; font-weight: 700; }
.intro-card .song small { display: block; font-size: 1.6vw; color: var(--muted); font-weight: 500; }
.countdown { font-size: 5vw; font-weight: 800; color: var(--yellow); line-height: 1.2; }
.tip { margin-top: 1.5vh; font-size: 1.6vw; color: var(--cyan); }
.warn-line { margin-top: 1vh; font-size: 1.5vw; color: var(--yellow); font-weight: 700; }
.vote-stars { font-size: 6vw; letter-spacing: 0.1em; }
.score-num { font-size: 13vw; font-weight: 800; line-height: 1; background: linear-gradient(180deg, var(--yellow), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.score-msg { font-size: 2.6vw; font-weight: 800; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; text-align: left; margin-top: 2vh; }
.bar-row { display: grid; grid-template-columns: 9vw 1fr 3vw; gap: 0.8vw; align-items: center; font-size: 1.3vw; margin-bottom: 1vh; }
.bar { height: 1.4vh; background: rgba(255, 255, 255, 0.12); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); width: 0; transition: width 1.2s ease-out; }
.board-row { display: flex; gap: 0.8vw; font-size: 1.4vw; padding: 0.4vh 0; }
.board-row .pos { width: 2.4vw; color: var(--muted); }
.board-row .pts { margin-left: auto; font-weight: 800; color: var(--yellow); }

.banner { position: fixed; top: 0; left: 50%; transform: translate(-50%, -110%); background: var(--yellow); color: #1a0630; font-weight: 800; padding: 0.8vh 2vw; border-radius: 0 0 1vw 1vw; transition: transform 0.3s; z-index: 30; }
.banner.show { transform: translate(-50%, 0); }
#toast { pointer-events: none; position: fixed; left: 50%; bottom: 4vh; transform: translate(-50%, 200%); background: rgba(20, 8, 36, 0.95); border: 1px solid var(--pink); padding: 1vh 2vw; border-radius: 99px; font-size: 1.5vw; font-weight: 700; transition: transform 0.35s; z-index: 40; white-space: nowrap; }
#toast.show { transform: translate(-50%, 0); }

.screens { color: var(--muted); font-size: 1.2vw; line-height: 1.5; margin-top: 2vh; }
.screens b { color: var(--text); }

/* ---------- Tela dentro do celular (?celular=1): em pé, vídeo em cima */
body.celular { font-size: 15px; }
body.celular .screen.show { display: block; overflow-y: auto; }
body.celular #lobby { padding: 16px; }
body.celular .logo { font-size: 26px; }
body.celular .steps, body.celular .lobby-right { display: none; }
body.celular .badge, body.celular .chip { font-size: 13px; }
body.celular .screens { font-size: 13px; }
body.celular .video-area { display: block; padding: 8px; }
body.celular .video-box { aspect-ratio: 16 / 9; border-radius: 10px; }
body.celular #pitch { height: 64px; margin-top: 8px; border-radius: 10px; }
body.celular .side { padding: 0 8px 12px; gap: 8px; }
body.celular .block { border-radius: 12px; padding: 8px 10px; }
body.celular .block.grow, body.celular .mini-qr { display: none; }
body.celular .label { font-size: 11px; }
body.celular .singer .em { font-size: 28px; }
body.celular .singer .info b { font-size: 16px; }
body.celular .singer small { font-size: 12px; }
body.celular .meter { height: 6px; }
body.celular #liveScore { font-size: 36px; }
body.celular .card { padding: 18px 14px; border-radius: 16px; max-width: 94vw; }
body.celular .big-btn { font-size: 18px; padding: 12px 20px; }
body.celular .hint { font-size: 13px; }
body.celular .intro-card .singers-big { font-size: 26px; }
body.celular .intro-card .song { font-size: 20px; }
body.celular .intro-card .song small { font-size: 14px; }
body.celular .countdown { font-size: 40px; }
body.celular .tip, body.celular .warn-line { font-size: 14px; }
body.celular .vote-stars { font-size: 34px; }
body.celular .score-num { font-size: 84px; }
body.celular .score-msg { font-size: 22px; }
body.celular .result-grid { grid-template-columns: 1fr; gap: 12px; }
body.celular .bar-row { grid-template-columns: 72px 1fr 30px; font-size: 13px; gap: 6px; }
body.celular .board-row { font-size: 14px; }
body.celular .board-row .pos { width: 28px; }
body.celular #toast { font-size: 14px; white-space: normal; width: 90vw; text-align: center; }
