/* styles.css — BarBuzzer neon/dark mobile-first theme */

:root {
  --bg: #0b0714;
  --bg-alt: #140c24;
  --panel: #1b1230;
  --neon-pink: #ff2bd6;
  --neon-cyan: #2be9ff;
  --neon-purple: #9b5cff;
  --neon-yellow: #ffe14d;
  --text: #f5f0ff;
  --text-dim: #b6a9d6;
  --danger: #ff4d6d;
  --success: #38f9c4;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at 50% 0%, var(--bg-alt) 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px 40px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
}

.back-link {
  align-self: flex-start;
  color: var(--neon-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-shadow: 0 0 8px rgba(43, 233, 255, 0.6);
}

.back-link:hover,
.back-link:focus {
  text-decoration: underline;
}

.brand {
  font-size: 1.6rem;
  margin: 4px 0 0;
  text-align: center;
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.7), 0 0 24px rgba(255, 43, 214, 0.4);
  letter-spacing: 0.02em;
}

.brand-glow {
  margin-left: 6px;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fade-in 0.25s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(43, 233, 255, 0.5);
  margin: 0;
  font-size: 1.3rem;
}

h3 {
  color: var(--neon-yellow);
  margin: 8px 0 0;
  font-size: 1rem;
}

.hint {
  color: var(--text-dim);
  margin: 0;
  font-size: 0.9rem;
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: #10041a;
  box-shadow: 0 0 18px rgba(255, 43, 214, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--neon-cyan);
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 10px rgba(43, 233, 255, 0.25) inset;
}

.btn-big {
  padding: 18px;
  font-size: 1.1rem;
  margin-top: auto;
}

.add-player-form {
  display: flex;
  gap: 8px;
}

.add-player-form input {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 2px solid var(--neon-purple);
  background: var(--panel);
  color: var(--text);
  font-size: 1rem;
}

.add-player-form input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(43, 233, 255, 0.4);
}

.add-player-form .btn {
  width: auto;
  padding: 12px 18px;
}

.player-list,
.vote-list,
.score-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-list li,
.vote-list li,
.score-list li {
  background: var(--panel);
  border: 1px solid rgba(155, 92, 255, 0.4);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.player-list .remove-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.vote-list li {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.vote-list li.selected {
  background: rgba(255, 43, 214, 0.18);
  border-color: var(--neon-pink);
  box-shadow: 0 0 12px rgba(255, 43, 214, 0.4);
}

.vote-list li:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

.score-list .score-value {
  color: var(--neon-yellow);
  font-weight: 700;
}

.pass-card,
.secret-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid rgba(43, 233, 255, 0.3);
  padding: 24px;
  text-align: center;
}

.pass-to-label {
  color: var(--text-dim);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.pass-player-name {
  font-size: 2rem;
  margin: 0;
  color: var(--neon-cyan);
  text-shadow: 0 0 14px rgba(43, 233, 255, 0.6);
}

.secret-role {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

.secret-drink {
  font-size: 2rem;
  margin: 0;
  color: var(--neon-yellow);
  text-shadow: 0 0 14px rgba(255, 225, 77, 0.6);
}

.secret-spec {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.secret-note {
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 0 10px rgba(255, 77, 109, 0.6);
}

.secret-card.impostor {
  border-color: var(--danger);
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.25) inset;
}

.talk-timer {
  align-self: center;
  font-size: 4rem;
  font-weight: 800;
  color: var(--neon-pink);
  text-shadow: 0 0 20px rgba(255, 43, 214, 0.6);
  margin: 20px 0;
}

.reveal-detail {
  color: var(--text-dim);
  margin: 0;
}

.reveal-drinks {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid rgba(155, 92, 255, 0.4);
}

.reveal-drinks p {
  margin: 6px 0;
}

.reveal-drinks .label {
  color: var(--text-dim);
}

#reveal-headline.win {
  color: var(--success);
  text-shadow: 0 0 10px rgba(56, 249, 196, 0.6);
}

#reveal-headline.lose {
  color: var(--danger);
  text-shadow: 0 0 10px rgba(255, 77, 109, 0.6);
}

@media (min-width: 480px) {
  .brand {
    font-size: 1.9rem;
  }
}
