/* =========================================================
   voto.css — votação do público (prefixo .vk-)
   ========================================================= */
:root {
  --bg: #0a0a0f; --bg-2: #1a1a2e;
  --pink: #ff00ff; --cyan: #00ffff; --green: #00ff00; --purple: #bf00ff;
  --text: #fff; --text-dim: #9aa0c0; --danger: #ff3b6b;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body); color: var(--text);
  background:
    radial-gradient(1000px 500px at 20% -10%, rgba(191,0,255,.20), transparent 60%),
    radial-gradient(900px 450px at 100% 0%, rgba(0,255,255,.16), transparent 55%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
  background-attachment: fixed; min-height: 100%; overflow-x: hidden;
}

.vk-wrap { min-height: 100dvh; display: grid; place-items: center; padding: clamp(14px,4vw,32px); position: relative; z-index: 1; }

.vk-title {
  font-family: var(--font-display); font-weight: 900; letter-spacing: 1px;
  text-align: center; line-height: 1;
  font-size: clamp(1.8rem, 7vw, 3rem); color: #fff;
  text-shadow: 0 0 6px var(--pink), 0 0 18px rgba(255,0,255,.55);
}
.vk-title small {
  display: block; font-size: .42em; letter-spacing: 8px; margin-top: 6px;
  color: var(--green); text-shadow: 0 0 6px var(--green), 0 0 16px rgba(0,255,0,.5);
}

.vk-btn {
  font-family: var(--font-display); font-weight: 700; letter-spacing: 1px;
  border: none; border-radius: 14px; cursor: pointer; color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  box-shadow: 0 0 14px rgba(255,0,255,.45);
  transition: transform .12s, box-shadow .2s, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.vk-btn:active { transform: translateY(1px) scale(.99); }
.vk-btn[disabled] { filter: grayscale(.5) brightness(.7); cursor: default; }
.vk-btn--ghost { background: transparent; color: var(--cyan); border: 1.5px solid var(--cyan); box-shadow: 0 0 8px rgba(0,255,255,.4); }

/* ---------- Página de VOTAÇÃO (celular) ---------- */
.vk-vote { width: 100%; max-width: 460px; display: grid; gap: 22px; justify-items: center; text-align: center; }
.vk-now-label { color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; font-size: .78rem; }
.vk-now-name {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 9vw, 2.6rem);
  color: var(--cyan); text-shadow: 0 0 8px var(--cyan), 0 0 22px rgba(0,255,255,.5);
  word-break: break-word;
}
.vk-vote-btn {
  width: 100%; padding: 28px 20px; font-size: 1.4rem; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.vk-vote-btn .big { font-size: 1.7rem; }
.vk-msg { min-height: 1.4em; font-weight: 600; }
.vk-msg--ok { color: var(--green); }
.vk-msg--info { color: var(--text-dim); }
.vk-count { font-family: var(--font-display); color: var(--pink); }
.vk-wait { color: var(--text-dim); font-size: 1.05rem; }

/* ---------- Painel / TELÃO ---------- */
.vk-stage { width: 100%; max-width: 1100px; display: grid; gap: 18px; }
.vk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.vk-url {
  font-size: .85rem; color: var(--text-dim);
  background: rgba(10,10,20,.6); border: 1px solid rgba(0,255,255,.3);
  padding: 8px 12px; border-radius: 10px; word-break: break-all;
}
.vk-url b { color: var(--cyan); }

.vk-current {
  text-align: center; padding: 18px; border-radius: 18px;
  border: 1.5px solid rgba(255,0,255,.4); box-shadow: 0 0 18px rgba(255,0,255,.25);
  background: rgba(10,10,20,.5);
}
.vk-current .lbl { color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; font-size: .78rem; }
.vk-current .nome {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(1.8rem, 6vw, 3.2rem);
  color: #fff; text-shadow: 0 0 10px var(--pink), 0 0 26px rgba(255,0,255,.5);
  animation: vk-pulse 1.8s ease-in-out infinite;
}
@keyframes vk-pulse { 50% { text-shadow: 0 0 16px var(--cyan), 0 0 34px rgba(0,255,255,.6); } }

.vk-rank { list-style: none; display: grid; gap: 10px; }
.vk-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(10,10,20,.55); border: 1.5px solid rgba(0,255,255,.25);
}
.vk-row--live { border-color: var(--pink); box-shadow: 0 0 16px rgba(255,0,255,.4); }
.vk-pos {
  font-family: var(--font-display); font-weight: 900; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 50%; color: #0a0a0f;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}
.vk-row:nth-child(1) .vk-pos { background: linear-gradient(135deg, #ffd54a, #ff8c00); }
.vk-name { font-weight: 600; word-break: break-word; }
.vk-bar-wrap { grid-column: 1 / -1; height: 10px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; }
.vk-bar { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width .5s ease; box-shadow: 0 0 10px rgba(255,0,255,.5); }
.vk-votes { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; color: var(--green); text-shadow: 0 0 8px rgba(0,255,0,.5); white-space: nowrap; }
.vk-votes small { font-family: var(--font-body); font-weight: 400; font-size: .6em; color: var(--text-dim); display: block; }

/* controles do operador */
.vk-admin { display: grid; gap: 12px; padding: 14px; border-radius: 14px; border: 1px dashed rgba(0,255,255,.3); }
.vk-admin h3 { font-family: var(--font-display); font-size: .9rem; letter-spacing: 1px; color: var(--cyan); }
.vk-admin-row { display: flex; flex-wrap: wrap; gap: 8px; }
.vk-input {
  flex: 1 1 200px; min-width: 0; font-family: var(--font-body); font-size: 1rem; color: #fff;
  background: rgba(10,10,20,.7); border: 1.5px solid rgba(0,255,255,.35); border-radius: 12px; padding: 12px 14px; outline: none;
}
.vk-input:focus { border-color: var(--cyan); box-shadow: 0 0 8px rgba(0,255,255,.5); }
.vk-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px;
  background: rgba(0,255,255,.08); border: 1px solid rgba(0,255,255,.3); cursor: pointer; font-size: .9rem;
}
.vk-chip.is-live { background: rgba(255,0,255,.15); border-color: var(--pink); }
.vk-chip .x { color: var(--danger); font-weight: 700; }
.vk-mini { font-size: .8rem; padding: 8px 14px; }

/* ---------- Flash + chuva de emoji ---------- */
.vk-flash {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255,0,255,.45), rgba(0,255,255,.28) 55%, transparent 75%);
}
.vk-flash--on { animation: vk-flash .5s ease; }
@keyframes vk-flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

.vk-emoji { position: fixed; top: -64px; z-index: 60; pointer-events: none; will-change: transform; animation: vk-fall linear forwards; }
@keyframes vk-fall { to { transform: translateY(112vh) rotate(var(--rot, 0deg)); opacity: .15; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; }
}

/* ---------- Seletor de nota 0-5 (página de votação) ---------- */
.vk-rate { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.vk-rate-btn {
  width: 58px; height: 58px; border-radius: 14px; cursor: pointer;
  font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: #fff;
  background: rgba(10,10,20,.7); border: 2px solid rgba(0,255,255,.35);
  transition: transform .1s, box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.vk-rate-btn:active { transform: scale(.94); }
.vk-rate-btn.sel {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-color: var(--pink); box-shadow: 0 0 16px rgba(255,0,255,.7);
}
.vk-rate-btn[disabled] { filter: grayscale(.6) brightness(.7); cursor: default; }

/* ---------- Banner no topo do telão ---------- */
.vk-banner {
  display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
}

/* ---------- Resultado final (pódio) ---------- */
.vk-final-title {
  font-family: var(--font-display); font-weight: 900; text-align: center;
  font-size: clamp(1.8rem, 6vw, 3rem); color: #fff;
  text-shadow: 0 0 10px var(--pink), 0 0 28px rgba(255,0,255,.55);
}
.vk-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; margin: 6px 0 4px; }
.vk-pod {
  text-align: center; border-radius: 14px; padding: 16px 8px;
  background: rgba(10,10,20,.55); border: 1.5px solid rgba(0,255,255,.3);
}
.vk-pod .medal { font-size: 2rem; }
.vk-pod .nome { font-weight: 600; margin: 6px 0; word-break: break-word; }
.vk-pod .pts { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; color: var(--green); text-shadow: 0 0 10px rgba(0,255,0,.5); }
.vk-pod--1 { border-color: #ffd54a; box-shadow: 0 0 20px rgba(255,180,0,.5); transform: translateY(-10px); }
.vk-pod--1 .pts { font-size: 2.1rem; color: #ffd54a; text-shadow: 0 0 14px rgba(255,200,0,.7); }
.vk-pod--2 { border-color: #c9d2ff; }
.vk-pod--3 { border-color: #ffb27a; }

/* ---------- Player de vídeo no telão ---------- */
.vk-video {
  position: relative;
  width: min(100%, calc(56vh * 16 / 9));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(0,255,255,.4);
  box-shadow: 0 0 18px rgba(0,255,255,.25);
  background: #000;
}
.vk-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.vk-video.hidden { display: none; }

/* =========================================================
   TELÃO EM TELA CHEIA (index.html) — vídeo full + faixa fina
   ========================================================= */
.vk-screen { position: fixed; inset: 0; z-index: 0; background: #000; }

/* sobrescreve o .vk-video antigo: agora ocupa a tela toda */
.vk-video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; overflow: hidden; background: #000; }
.vk-video.hidden { display: none; }
.vk-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.vk-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.vk-idle.hidden { display: none; }
.vk-idle-img { width: min(60vw, 520px); height: auto; -webkit-mask-image: linear-gradient(to bottom,#000 65%,transparent 100%); mask-image: linear-gradient(to bottom,#000 65%,transparent 100%); }
.vk-idle-msg { color: var(--text-dim); }

/* faixa fina embaixo */
.vk-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 44px;
  display: flex; align-items: center; gap: 14px; padding: 0 14px;
  font-size: .82rem; white-space: nowrap; overflow-x: auto;
  background: linear-gradient(to top, rgba(0,0,0,.92), rgba(0,0,0,.5));
  border-top: 1px solid rgba(0,255,255,.3);
}
.vk-bar::-webkit-scrollbar { height: 0; }
.vk-bar-now { flex: none; font-family: var(--font-display); font-weight: 700; color: var(--cyan); text-shadow: var(--glow-cyan); }
.vk-bar-rank { flex: 1 1 auto; overflow-x: auto; white-space: nowrap; min-width: 0; }
.vk-bar-rank::-webkit-scrollbar { height: 0; }
.vk-bar-item { margin: 0 2px; }
.vk-bar-item.live { color: var(--pink); }
.vk-bar-item b { font-family: var(--font-display); color: var(--green); }
.vk-bar-sep { opacity: .35; margin: 0 3px; }
.vk-bar-url { flex: none; color: var(--text-dim); }
.vk-bar-url b { color: var(--cyan); }

/* botão do operador */
.vk-gear { position: fixed; top: 12px; right: 12px; z-index: 70; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; border: 1px solid rgba(0,255,255,.4); background: rgba(0,0,0,.55); color: #fff; font-size: 1.2rem; }
.vk-gear:hover { background: rgba(0,0,0,.78); }

/* painel do operador (overlay no canto) */
.vk-panel { position: fixed; top: 66px; right: 12px; z-index: 80; width: min(94vw, 440px); max-height: 82vh; overflow: auto; background: rgba(10,10,20,.96); border: 1px solid rgba(0,255,255,.35); border-radius: 14px; padding: 14px; box-shadow: 0 0 26px rgba(0,0,0,.7); display: grid; gap: 12px; }
.vk-panel-close { justify-self: end; background: none; border: none; color: var(--text-dim); font-size: 1.2rem; cursor: pointer; margin: -4px -4px 0 0; }

/* resultado final em tela cheia */
.vk-final { position: fixed; inset: 0; z-index: 90; overflow: auto; padding: 24px; background: rgba(8,8,16,.97); display: grid; gap: 16px; align-content: center; }
.vk-final .vk-podium, .vk-final .vk-rank { max-width: 640px; margin: 0 auto; width: 100%; }

/* =========================================================
   POLIMENTO MOBILE — página de votar
   ========================================================= */
.vk-vote { gap: 18px; }
.vk-vote .vk-title { font-size: clamp(1.5rem, 7vw, 2.2rem); }

/* nota 0-5 numa linha só, dividindo a largura igualmente */
.vk-rate { display: flex; gap: 8px; width: 100%; }
.vk-rate-btn { flex: 1 1 0; width: auto; min-width: 0; height: 56px; font-size: 1.35rem; }

/* botão CONFIRMAR menor e proporcional */
.vk-vote-btn { padding: 15px 20px; font-size: 1.05rem; border-radius: 14px; }
.vk-vote-btn .big { font-size: 1.2rem; }

/* emoji sempre por cima */
.vk-emoji { z-index: 120; }

/* =========================================================
   FESTA RGB ao votar, terminando em VERDE
   ========================================================= */
.vk-party {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; flex-direction: column;
  text-align: center; padding: 24px;
}
.vk-party.on { animation: vk-rgb 1.7s steps(1, end) forwards; }
@keyframes vk-rgb {
  0%   { background: #ff0000; }
  9%   { background: #ff00ff; }
  18%  { background: #6a00ff; }
  27%  { background: #0000ff; }
  36%  { background: #00ffff; }
  45%  { background: #00ff66; }
  54%  { background: #ffff00; }
  63%  { background: #ff8800; }
  72%  { background: #ff0066; }
  81%  { background: #00ff00; }
  90%  { background: #00e6a0; }
  100% { background: #00dd00; }
}
.vk-party-content { opacity: 0; color: #052b13; }
.vk-party.on .vk-party-content { animation: vk-fadein .5s ease 1.15s forwards; }
@keyframes vk-fadein { to { opacity: 1; } }
.vk-party-check { font-size: 4.2rem; line-height: 1; }
.vk-party-title { font-family: var(--font-display); font-weight: 900; letter-spacing: 2px; font-size: 1.7rem; margin-top: 6px; }
.vk-party-note { font-size: 1.15rem; margin-top: 10px; }
.vk-party-note b { font-family: var(--font-display); font-size: 1.5rem; }
.vk-party-sub { opacity: .85; margin-top: 4px; }

/* link do vídeo escolhido no chip do operador */
.vk-chip-link { text-decoration: none; font-size: 1.05em; }
.vk-chip-link:hover { filter: brightness(1.3); }

/* endereço de inscrição na tela de espera */
.vk-idle-cad { color: var(--text-dim); font-size: .9rem; }
.vk-idle-cad b { color: var(--green); }

/* botão de editar link no chip */
.vk-edit { cursor: pointer; font-size: .95em; }
.vk-edit:hover { filter: brightness(1.3); }

/* botão de atualizar dentro da tela verde de voto registrado */
.vk-party-btn {
  margin-top: 22px;
  background: #063d1c; color: #fff;
  border: 2px solid rgba(255,255,255,.5); border-radius: 12px;
  padding: 13px 26px; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 1px; font-size: 1rem;
}
.vk-party-btn:active { transform: translateY(1px); }
