/* Shared design tokens + base styles for all three views.
   Dark theme adapted from the music-quiz project. */
:root {
  --bg: #12121f;
  --bg-2: #1c1c2e;
  --bg-card: #252545;
  --border: #3c3c60;
  --text: #ffffff;
  --text-sub: #b7b7d8;
  --text-muted: #7c7ca8;
  --accent: #22c55e; /* green = survivor */
  --danger: #ef4444; /* red = eliminated */
  --gold: #f7c948;
  --blue: #4f7dff;
  --purple: #c084fc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

.hidden {
  display: none !important;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  color: inherit;
}

.btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  transition: filter 0.15s, transform 0.05s;
}
.btn:hover {
  filter: brightness(1.15);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  color: #06210f;
  border-color: transparent;
}
.btn-danger {
  background: var(--danger);
  color: #2a0a0a;
  border-color: transparent;
}
.btn-ghost {
  background: transparent;
}

.input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 18px;
  color: var(--text);
  outline: none;
}
.input:focus {
  border-color: var(--accent);
}

/* Connection / status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
}
.dot.ok {
  background: var(--accent);
}
.dot.bad {
  background: var(--danger);
}

/* Confetti overlay used by the public/results screen */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.35s ease;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}
.pulse {
  animation: pulse 2s ease-in-out infinite;
}
