:root {
  --bg: #070b1a;
  --bg2: #0e1633;
  --panel: rgba(12, 18, 44, 0.86);
  --line: rgba(120, 160, 255, 0.28);
  --text: #eef3ff;
  --muted: #9fb0d8;
  --accent: #38bdf8;
  --hot: #f43f5e;
  --gold: #fbbf24;
  --silver: #cbd5e1;
  --bronze: #d97706;
  --ok: #34d399;
  --font-display: "Russo One", "Arial Black", Impact, sans-serif;
  --font-ui: "Rajdhani", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body.transparent { background: transparent; }

/* Palco fixo 1080x1920, escalado para caber na janela (OBS ou navegador). */
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1080px; height: 1920px;
  transform-origin: center center;
  transform: translate(-50%, -50%);
  color: var(--text); font-family: var(--font-ui);
  background:
    radial-gradient(1200px 800px at 50% 42%, #16235a 0%, rgba(22, 35, 90, 0) 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 55%, var(--bg) 100%);
}
body.transparent #stage { background: transparent; }
.hidden { display: none !important; }

/* ---------------- topo */
#top { position: relative; height: 230px; padding: 28px 40px 0; text-align: center; }
.brand { font-family: var(--font-display); letter-spacing: 3px; font-size: 30px; color: var(--muted); }
.brand b { color: var(--text); }
.brand .logo { color: var(--accent); display: inline-block; animation: spin 2s linear infinite; }
#round { position: absolute; left: 40px; top: 84px; font-family: var(--font-display); font-size: 30px; color: var(--muted); }
#phase { position: absolute; right: 40px; top: 84px; font-family: var(--font-display); font-size: 30px; padding: 4px 16px; border-radius: 10px; background: rgba(56, 189, 248, 0.15); color: var(--accent); }
#phase.battle { background: rgba(244, 63, 94, 0.18); color: var(--hot); }
#phase.results { background: rgba(251, 191, 36, 0.18); color: var(--gold); }
#timer { font-family: var(--font-display); font-size: 104px; line-height: 1; margin-top: 18px; text-shadow: 0 0 30px rgba(56, 189, 248, 0.55); font-variant-numeric: tabular-nums; }
#timer.warn { color: var(--hot); text-shadow: 0 0 30px rgba(244, 63, 94, 0.8); animation: pulse 1s ease-in-out infinite; }
#timerbar { position: absolute; left: 40px; right: 40px; bottom: 6px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
#timerbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--hot)); transition: width 0.2s linear; }

#eventBanner {
  position: absolute; top: 250px; left: 50%; transform: translateX(-50%); z-index: 5;
  font-family: var(--font-display); font-size: 44px; letter-spacing: 2px; padding: 10px 34px; border-radius: 14px;
  background: linear-gradient(90deg, #7c3aed, #db2777); box-shadow: 0 0 40px rgba(219, 39, 119, 0.6);
  animation: pop 0.4s ease-out;
}

/* ---------------- arena */
#arenaWrap { position: relative; height: 1040px; display: flex; align-items: center; justify-content: center; }
#arena { width: 1000px; height: 1000px; }

#psx { position: absolute; right: 24px; top: 8px; width: 330px; padding: 8px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); z-index: 4; }
#psx img { width: 100%; aspect-ratio: 4 / 3; display: block; border-radius: 8px; background: #000; }
.psx-title { font-family: var(--font-display); font-size: 16px; color: var(--muted); margin-bottom: 6px; letter-spacing: 1px; }
.psx-slots { display: flex; justify-content: space-between; font-weight: 700; font-size: 20px; margin-top: 6px; }
#psxP1 { color: #f87171; } #psxP2 { color: #60a5fa; }

.panel {
  position: absolute; inset: 40px 60px; z-index: 6; border-radius: 28px; padding: 36px;
  background: var(--panel); border: 2px solid var(--line); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; animation: pop 0.35s ease-out;
}
.panel-kicker { font-family: var(--font-display); font-size: 52px; letter-spacing: 3px; color: var(--accent); text-shadow: 0 0 24px rgba(56, 189, 248, 0.6); }
.big-count { font-family: var(--font-display); font-size: 220px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.entry-cta { font-size: 38px; color: var(--muted); margin-bottom: 26px; }
.entry-cta b { color: var(--text); }
.entry-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 26px; width: 100%; overflow: hidden; }
.entry-slots .slot { display: flex; align-items: center; gap: 14px; font-size: 34px; font-weight: 700; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); animation: slideIn 0.4s ease-out; }
.entry-slots .slot.empty { color: rgba(255, 255, 255, 0.25); font-weight: 500; }
.entry-slots img { width: 54px; height: 54px; border-radius: 50%; }
.entry-slots .dot { width: 54px; height: 54px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.2); }

.splash {
  position: absolute; z-index: 7; font-family: var(--font-display); font-size: 170px; letter-spacing: 4px;
  color: #fff; text-shadow: 0 0 40px #38bdf8, 0 0 90px #db2777; animation: rip 1.8s ease-out forwards;
}

.result { justify-content: flex-start; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 22px; margin: 6px 0 14px; width: 100%; }
.podium .pos { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; animation: rise 0.8s ease-out both; }
.podium .pos:nth-child(1) { animation-delay: 0.5s; } .podium .pos:nth-child(3) { animation-delay: 0.25s; }
.podium .medal { font-size: 50px; }
.podium img { width: 100px; height: 100px; border-radius: 50%; border: 5px solid var(--silver); }
.podium .first img { width: 140px; height: 140px; border-color: var(--gold); box-shadow: 0 0 40px rgba(251, 191, 36, 0.7); }
.podium .third img { border-color: var(--bronze); }
.podium .name { font-family: var(--font-display); font-size: 34px; margin-top: 8px; }
.podium .score { font-size: 32px; color: var(--gold); font-weight: 700; }
.podium .stats { font-size: 21px; color: var(--muted); line-height: 1.35; margin-top: 4px; }
.podium .block { width: 100%; border-radius: 12px 12px 0 0; margin-top: 10px; background: linear-gradient(180deg, rgba(56, 189, 248, 0.35), rgba(56, 189, 248, 0.05)); }
.podium .first .block { height: 70px; background: linear-gradient(180deg, rgba(251, 191, 36, 0.5), rgba(251, 191, 36, 0.05)); }
.podium .second .block { height: 44px; } .podium .third .block { height: 26px; }
.result-row { display: flex; gap: 22px; width: 100%; }
.mvp-card, .sup-card { flex: 1; border-radius: 18px; padding: 16px 20px; background: rgba(255, 255, 255, 0.05); }
.mini-title { font-family: var(--font-display); font-size: 26px; color: var(--gold); margin-bottom: 10px; }
#mvp { display: flex; align-items: center; gap: 14px; font-size: 34px; font-weight: 700; }
#mvp img { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--gold); }
#mvp small { display: block; font-size: 22px; color: var(--muted); font-weight: 500; }
#supportersFinal { margin: 0; padding-left: 30px; font-size: 25px; line-height: 1.35; }
.next-in { margin-top: auto; padding-top: 10px; font-size: 28px; color: var(--muted); text-align: center; }

/* ---------------- rodapé */
#bottom { display: flex; gap: 22px; padding: 10px 30px 30px; height: 650px; }
.card { border-radius: 22px; padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); }
.card-title { font-family: var(--font-display); font-size: 28px; letter-spacing: 2px; color: var(--accent); margin-bottom: 8px; }
.ranking { flex: 1.25; }
.col { flex: 1; display: flex; flex-direction: column; gap: 16px; }
#ranking { list-style: none; margin: 0; padding: 0; }
#ranking li { display: flex; align-items: center; gap: 12px; height: 62px; font-size: 30px; font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, 0.06); transition: background 0.3s; }
#ranking li .pos { width: 44px; font-family: var(--font-display); color: var(--muted); text-align: center; }
#ranking li:first-child .pos { color: var(--gold); }
#ranking li:nth-child(2) .pos { color: var(--silver); }
#ranking li:nth-child(3) .pos { color: var(--bronze); }
#ranking li img { width: 46px; height: 46px; border-radius: 50%; }
#ranking li .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ranking li .sc { font-variant-numeric: tabular-nums; color: var(--text); }
#ranking li .bar { width: 90px; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
#ranking li .bar i { display: block; height: 100%; }
#ranking li.up { background: rgba(52, 211, 153, 0.12); }
.champ-body { display: flex; align-items: center; gap: 14px; font-size: 32px; font-weight: 700; }
.champ-body img { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--gold); box-shadow: 0 0 22px rgba(251, 191, 36, 0.6); }
.champ-body small { display: block; color: var(--gold); font-size: 24px; }
.queue, .history { flex: 1; overflow: hidden; }
#queue, #history { margin: 0; padding-left: 30px; font-size: 26px; line-height: 1.4; }
#history { list-style: none; padding-left: 0; }
#history b { color: var(--gold); }

/* ---------------- toasts */
#toasts { position: absolute; left: 40px; right: 40px; top: 1180px; height: 0; z-index: 8; pointer-events: none; }
.toast {
  position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap;
  display: flex; align-items: center; gap: 14px; padding: 10px 26px 10px 12px; border-radius: 50px;
  font-size: 34px; font-weight: 700; background: rgba(8, 12, 30, 0.92); border: 2px solid var(--accent);
  animation: toast 3.2s ease-out forwards;
}
.toast img { width: 58px; height: 58px; border-radius: 50%; }
.toast.special { border-color: #db2777; font-family: var(--font-display); font-size: 36px; box-shadow: 0 0 34px rgba(219, 39, 119, 0.7); }
.toast.join { border-color: var(--ok); }
.toast em { font-style: normal; color: var(--gold); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes pop { from { transform: translateX(var(--tx, 0)) scale(0.85); opacity: 0; } to { opacity: 1; } }
#eventBanner { --tx: -50%; }
@keyframes slideIn { from { transform: translateX(-30px); opacity: 0; } }
@keyframes rise { from { transform: translateY(60px); opacity: 0; } }
@keyframes rip { 0% { transform: scale(0.3); opacity: 0; } 20% { transform: scale(1.15); opacity: 1; } 75% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes toast { 0% { opacity: 0; margin-top: 30px; } 10% { opacity: 1; margin-top: 0; } 80% { opacity: 1; } 100% { opacity: 0; margin-top: -40px; } }
