:root{
  --bg0:#0b1230;
  --bg1:#1c2a66;

  --panel: rgba(8, 12, 28, .70);
  --panel2: rgba(10, 16, 40, .70);

  --txt:#f4f6ff;
  --muted:#c8d0ff;

  /* cartoony arcade palette */
  --green:#35ff7a;
  --blue:#36d7ff;
  --pink:#ff4fd8;
  --yellow:#ffd84a;
  --red:#ff3b6b;

  --border: 2px solid rgba(255,255,255,.10);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius: 16px;
  --radius2: 22px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
  color:var(--txt);
  background:
    radial-gradient(900px 600px at 22% 18%, rgba(53,255,122,.16), transparent 60%),
    radial-gradient(900px 600px at 80% 25%, rgba(54,215,255,.12), transparent 60%),
    radial-gradient(900px 600px at 50% 85%, rgba(255,79,216,.10), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow:hidden;
}

#app{ height:100%; display:flex; flex-direction:column; }

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 12px 14px;
  gap: 12px;
}

.brand{ display:flex; align-items:center; gap:12px; }
.logo{
  width:36px; height:36px;
  border-radius: 14px;
  display:grid; place-items:center;
  font-weight: 1000;
  background: linear-gradient(180deg, rgba(53,255,122,.22), rgba(54,215,255,.10));
  border: 2px solid rgba(53,255,122,.18);
  box-shadow: 0 0 0 3px rgba(0,0,0,.22), 0 0 18px rgba(53,255,122,.14);
}
.titles .title{ font-weight: 1000; letter-spacing:.2px; }
.titles .subtitle{ font-size:12px; color:var(--muted); margin-top:2px; }

.topControls{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.btn{
  border: var(--border);
  background: rgba(255,255,255,.07);
  color:var(--txt);
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  user-select:none;
  backdrop-filter: blur(8px);
}
.btn:hover{ background: rgba(255,255,255,.10); }
.btn:active{ transform: translateY(1px); }
.btnPrimary{
  border-color: rgba(54,215,255,.18);
  background: linear-gradient(180deg, rgba(54,215,255,.18), rgba(53,255,122,.08));
}
.btnDanger{
  border-color: rgba(255,59,107,.22);
  background: linear-gradient(180deg, rgba(255,59,107,.22), rgba(255,59,107,.08));
}

.main{ flex:1; display:flex; justify-content:center; padding: 0 14px 14px; }
.stage{
  position:relative;
  width:min(1100px, 100%);
  height:100%;
  border-radius: var(--radius2);
  border: var(--border);
  box-shadow: var(--shadow);
  overflow:hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
}

#game{ width:100%; height:100%; display:block; }

.hud{
  position:absolute;
  left:12px; top:12px; right:12px;
  display:flex; flex-direction:column; gap:8px;
  pointer-events:none;
}
.hudRow{ display:flex; flex-wrap:wrap; gap:8px; }
.hudRow.small{ opacity:.95; }
.pill{
  border: var(--border);
  background: var(--panel);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 13px;
}
.hudRow.small .pill{
  background: var(--panel2);
  font-weight: 700;
  font-size: 12px;
}

.footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 10px 14px 14px;
  color: var(--muted);
  font-size: 12px;
}
.keycap{
  display:inline-block;
  border: var(--border);
  background: rgba(255,255,255,.06);
  padding: 2px 6px;
  border-radius: 10px;
  margin: 0 4px;
  color: var(--txt);
}

/* Screen */
.screen{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  padding: 18px;
  background: radial-gradient(700px 500px at 50% 30%, rgba(54,215,255,.12), rgba(0,0,0,.62));
}
.screen.hidden{ display:none; }
.screenCard{
  width: min(700px, 100%);
  border: var(--border);
  border-radius: var(--radius2);
  background: rgba(8, 10, 26, .85);
  box-shadow: var(--shadow);
  padding: 18px;
}
.screenTitle{ font-size: 36px; font-weight: 1000; letter-spacing:.3px; }
.screenText{ margin-top:10px; color:var(--muted); line-height:1.35; }
.screenText.small{ font-size:12px; }
.screenButtons{ margin-top:14px; display:flex; gap:10px; align-items:center; }
.how{
  margin-top:12px;
  border: var(--border);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}
.how.hidden{ display:none; }
.how ul{ margin:0; padding-left:18px; }

/* Vote overlay */
.overlay{
  position:absolute; inset:0;
  display:flex; justify-content:center; align-items:flex-start;
  padding-top: 88px;
  pointer-events:none;
}
.overlay.hidden{ display:none; }
.overlayCard{
  pointer-events:auto;
  width: min(760px, 92%);
  border-radius: var(--radius2);
  border: 2px solid rgba(54,215,255,.18);
  background: rgba(6, 10, 26, .90);
  box-shadow: 0 18px 70px rgba(54,215,255,.10);
  padding: 14px;
}
.overlayTitle{ font-weight: 1000; letter-spacing:.8px; }
.overlayHint{ margin-top:6px; color:var(--muted); font-size: 13px; }
.voteOptions{ display:grid; grid-template-columns: 1fr; gap:10px; margin-top: 12px; }
.voteBtn{
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(54,215,255,.10), rgba(255,79,216,.07));
  color: var(--txt);
  padding: 12px;
  cursor:pointer;
  font-weight: 1000;
  text-align:left;
}
.voteBtn:hover{ filter: brightness(1.06); }
.overlayTimer{ margin-top:10px; color:var(--muted); font-size: 12px; }

/* Channel points panel */
.cpPanel{
  position:absolute;
  right:12px; bottom:12px;
  width: 240px;
  border-radius: var(--radius);
  border: var(--border);
  background: rgba(8, 10, 26, .74);
  padding: 10px;
  display:flex; flex-direction:column; gap:8px;
}
.cpTitle{
  font-weight: 1000;
  letter-spacing:.3px;
  font-size: 12px;
  color: var(--muted);
}
.cpBtn{
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: var(--txt);
  padding: 10px;
  font-weight: 1000;
  cursor:pointer;
}
.cpBtn:hover{ background: rgba(255,255,255,.09); }
.cpBtn:active{ transform: translateY(1px); }

.clean .hud{ display:none; }
.clean .cpPanel{ opacity:.55; }

@media (max-width: 740px){
  .footerRight{ display:none; }
  .cpPanel{ width: 210px; }
}
