:root {
  --neon-pink: #ff2fb0;
  --neon-cyan: #2ff3ff;
  --neon-yellow: #fff92f;
  --neon-green: #39ff6a;
  --bg-deep: #0a0620;
  --bg-panel: #150c33;
  --bg-panel-2: #1d1246;
  --text: #f3f0ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at 50% -10%, #2a1660 0%, var(--bg-deep) 60%);
  color: var(--text);
  font-family: 'Orbitron', sans-serif;
  overflow-x: hidden;
}

.crt {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: overlay;
}

#app {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 18px 80px;
  min-height: 100vh;
  position: relative;
}

.screen { display: none; animation: fadeIn .35s ease; }
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.logo {
  font-family: 'Press Start 2P', cursive;
  text-align: center;
  font-size: 28px;
  line-height: 1.6;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px var(--neon-cyan), 0 0 22px rgba(47,243,255,.6);
  margin: 30px 0 6px;
}
.logo span { color: var(--neon-pink); text-shadow: 0 0 6px var(--neon-pink), 0 0 22px rgba(255,47,176,.6); }

.tagline {
  text-align: center;
  opacity: .75;
  margin-bottom: 40px;
  font-size: 14px;
  letter-spacing: .5px;
}

.section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px rgba(255,249,47,.5);
  margin-bottom: 24px;
}

.menu { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }

.btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  letter-spacing: .5px;
  transition: transform .12s ease, box-shadow .12s ease;
  text-align: center;
}
.btn:active { transform: scale(.96); }

.btn-primary {
  background: linear-gradient(135deg, var(--neon-pink), #a020f0);
  color: #fff;
  box-shadow: 0 0 18px rgba(255,47,176,.55);
}
.btn-primary:hover { box-shadow: 0 0 28px rgba(255,47,176,.85); }

.btn-secondary {
  background: linear-gradient(135deg, var(--neon-cyan), #0a7ea4);
  color: #06121a;
  box-shadow: 0 0 18px rgba(47,243,255,.5);
}
.btn-secondary:hover { box-shadow: 0 0 28px rgba(47,243,255,.8); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,.25);
}

.btn-danger {
  background: linear-gradient(135deg, #ff4b4b, #b30000);
  color: #fff;
  box-shadow: 0 0 18px rgba(255,75,75,.5);
  width: 100%;
  margin-top: 20px;
}

.btn-small {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.field {
  display: block;
  margin-bottom: 18px;
}
.invite-box {
  margin-bottom: 18px;
}
.field span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--neon-cyan);
  margin-bottom: 6px;
}
input[type="text"], input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 2px solid rgba(47,243,255,.35);
  background: var(--bg-panel);
  color: var(--text);
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  outline: none;
}
#host-invite-link {
  font-size: 12px;
  opacity: .9;
}
input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 10px rgba(47,243,255,.4); }

.phrase-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.phrase-list input { }

.row-buttons { display: flex; gap: 12px; justify-content: space-between; margin-top: 10px; }
.row-buttons .btn { flex: 1; }

.error { color: #ff5d5d; font-size: 13px; margin-top: 10px; min-height: 16px; }

.status-banner {
  background: var(--bg-panel);
  border: 2px solid var(--neon-yellow);
  color: var(--neon-yellow);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 24px;
}
.hidden { display: none !important; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(255,255,255,.1);
}
.topbar .title {
  font-family: 'Press Start 2P', cursive;
  font-size: 13px;
  color: var(--neon-pink);
  text-shadow: 0 0 8px rgba(255,47,176,.5);
}
.clock {
  font-family: 'Press Start 2P', cursive;
  font-size: 20px;
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(57,255,106,.7);
}

.panel h3 {
  font-size: 15px;
  color: var(--neon-cyan);
  margin-bottom: 14px;
  letter-spacing: .5px;
}

.player-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.player-list li {
  background: var(--bg-panel-2);
  border: 1px solid rgba(255,255,255,.15);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-list li.offline { opacity: .4; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); }
.dot.off { background: #666; box-shadow: none; }

.lock-progress { font-size: 13px; opacity: .8; margin-bottom: 14px; }

.phrase-list-bet { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 14px; }
.phrase-bet-item {
  background: var(--bg-panel);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 14px;
}
.phrase-bet-item .txt { font-size: 14px; margin-bottom: 10px; }
.time-inputs { display: flex; align-items: center; gap: 8px; }
.time-inputs input {
  width: 64px;
  text-align: center;
  padding: 10px 4px;
  font-size: 16px;
}
.time-inputs span { opacity: .6; }

.phrase-list-live { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 14px; }
.phrase-live-item {
  background: var(--bg-panel);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 14px;
}
.phrase-live-item .txt { font-size: 14px; margin-bottom: 10px; }
.phrase-live-item.revealed { border-color: var(--neon-yellow); box-shadow: 0 0 14px rgba(255,249,47,.15); }

.reveal-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.reveal-table th, .reveal-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
.reveal-table tr:first-child td { color: var(--neon-yellow); font-weight: bold; }
.reveal-table input.points-input {
  width: 56px;
  padding: 4px 6px;
  font-size: 13px;
}

.leaderboard { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.leaderboard li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  font-size: 15px;
}
.leaderboard li:first-child {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 20px rgba(255,249,47,.35);
  font-size: 18px;
}
.leaderboard .rank { color: var(--neon-cyan); margin-right: 10px; }
.leaderboard .pts { color: var(--neon-green); font-family: 'Press Start 2P', cursive; font-size: 13px; }

.hint { font-size: 13px; opacity: .75; margin-bottom: 14px; }
.waiting-msg { font-size: 14px; margin-bottom: 20px; opacity: .85; }
.locked-msg { color: var(--neon-green); text-align: center; margin-top: 14px; font-size: 13px; }

#confetti-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1000; }
.confetti-piece {
  position: absolute;
  top: -10px;
  width: 8px; height: 14px;
  opacity: .9;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}
