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

:root {
  --bg: #faf5eb;
  --bg2: #f2ece0;
  --bg3: #e8e0d0;
  --text: #2d333d;
  --text2: #7a8290;
  --accent: #5b7db5;
  --accent2: #5a9e6f;
  --danger: #c45a5a;
  --warning: #b8844a;
  --border: #d1d5db;
  --radius: 12px;
  --radius-sm: 8px;
}

/* Тёмно-синяя тема для ночи */
.theme-night {
  --bg: #0d1b2a;
  --bg2: #1b2838;
  --bg3: #243447;
  --text: #e4e7ed;
  --text2: #8b949e;
  --accent: #6b9ce6;
  --accent2: #5a9e6f;
  --danger: #e06060;
  --warning: #c49a4a;
  --border: #3f444e;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

/* Фоновые декорации: звёзды, луна, магия */
.bg-decor {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.deco-star {
  position: absolute;
  color: #cbd5e1;
  opacity: 0.35;
}
.deco-s1 { top: 8%; left: 10%; font-size: 22px; }
.deco-s2 { top: 22%; right: 8%; font-size: 16px; }
.deco-s3 { bottom: 18%; left: 12%; font-size: 18px; }
.deco-s4 { bottom: 35%; right: 10%; font-size: 14px; }
.deco-moon {
  position: absolute;
  top: 4%;
  right: 6%;
  font-size: 36px;
  opacity: 0.12;
}
.deco-sparkle {
  position: absolute;
  font-size: 12px;
  opacity: 0.25;
  animation: sparkleFloat 4s ease-in-out infinite;
}
.deco-sp1 { top: 40%; left: 6%; animation-delay: 0s; }
.deco-sp2 { bottom: 28%; right: 7%; animation-delay: 1.3s; }
.deco-sp3 { top: 12%; left: 45%; animation-delay: 2.6s; }
.deco-wolf {
  position: absolute;
  font-size: 14px;
  opacity: 0.08;
  animation: wolfProwl 6s ease-in-out infinite;
}
.deco-w1 { bottom: 12%; right: 15%; animation-delay: 0s; }
.deco-w2 { bottom: 8%; left: 20%; animation-delay: 3s; }
@keyframes wolfProwl {
  0%, 100% { transform: translateX(0); opacity: 0.08; }
  50% { transform: translateX(6px); opacity: 0.15; }
}
@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.25; }
  50% { transform: translateY(-10px) scale(1.3); opacity: 0.5; }
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  padding: 20px 16px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.screen { display: none; animation: fadeIn 0.3s ease; }
.screen.active { display: flex; flex-direction: column; min-height: calc(100dvh - 40px); }

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

/* Welcome */
.welcome-content { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 40px; }
.logo { text-align: center; }
.logo-icon { font-size: 64px; margin-bottom: 8px; }
h1 { font-size: 28px; font-weight: 700; color: var(--accent); }
.subtitle { color: var(--text2); font-size: 14px; margin-top: 4px; }

/* Quick rules */
.quick-rules {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  width: 100%;
  max-width: 280px;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}
.quick-rules-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
  font-size: 14px;
}
.quick-rules p {
  color: var(--text2);
}
.quick-rules strong {
  color: var(--text);
}

input {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 16px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
input:focus { border-color: var(--accent); }
input::placeholder { color: var(--text2); }
.input-code { font-size: 28px; text-align: center; letter-spacing: 8px; font-weight: 700; max-width: 200px; }
.name-input-block { width: 100%; max-width: 280px; }
.enter-form { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; margin-top: 16px; }
.enter-form .input-code { max-width: 240px; font-size: 24px; }
.enter-form .input-code::placeholder { font-size: 16px; letter-spacing: normal; }
.host-toggle-wrap { width: 100%; max-width: 280px; display: flex; justify-content: center; margin: 10px auto 4px; }
.toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle-label input { display: none; }
.toggle-slider { width: 36px; height: 20px; background: var(--bg3); border-radius: 10px; position: relative; transition: 0.2s; flex-shrink: 0; }
.toggle-slider::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--text2); top: 2px; left: 2px; transition: 0.2s; }
.toggle-label input:checked + .toggle-slider { background: var(--accent2); }
.toggle-label input:checked + .toggle-slider::after { left: 18px; background: #fff; }
.toggle-text { font-size: 14px; color: var(--text); }
.secondary-links { margin-top: 12px; text-align: center; }
.secondary-links a { color: var(--text2); font-size: 13px; text-decoration: none; }
.secondary-links a:hover { color: var(--text); }

/* Host panel */
.host-panel { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 20px 0; }
.host-badge { font-size: 16px; font-weight: 700; color: var(--accent2); }
.host-room-code { text-align: center; }
.code-label { font-size: 13px; color: var(--text2); display: block; margin-bottom: 4px; }
.code-big { font-size: 48px; font-weight: 800; letter-spacing: 12px; color: var(--accent2); font-family: monospace; }
.host-qr-wrap { background: white; padding: 12px; border-radius: var(--radius-sm); display: inline-block; }
.host-qr-wrap img { display: block; }
.host-panel .players-list { width: 100%; max-width: 300px; }

/* Joined player panel */
.joined-panel { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px 0; }
.joined-badge { font-size: 16px; font-weight: 700; color: var(--accent); }
.joined-panel .players-list { width: 100%; max-width: 300px; }
.joined-waiting { color: var(--text2); font-size: 14px; margin-top: 8px; }

.btn {
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  max-width: 280px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.btn-secondary { background: var(--bg3); border-color: var(--border); }
.btn-test { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.buttons-stack { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; margin-top: 10px; }

/* QR */
.qr-section { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#qrcode, .lobby-qr #lobby-qrcode { background: white; padding: 8px; border-radius: var(--radius-sm); }
#qrcode img, .lobby-qr #lobby-qrcode img { display: block; }
.qr-hint { color: var(--text2); font-size: 12px; }

/* Screen header */
.screen-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-top: 10px; }
.screen-header h2 { font-size: 20px; }
.btn-back {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  width: 40px; height: 40px; border-radius: 50%; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.join-form, .test-form { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 40px; }
.test-info { text-align: center; color: var(--text2); }
.test-hint { font-size: 14px; margin-top: 8px; color: var(--warning); }

/* Lobby */
.lobby-content { display: flex; flex-direction: column; align-items: center; gap: 20px; flex: 1; }
.lobby-qr { margin-top: 10px; }
.players-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.player-chip {
  background: var(--bg2); padding: 8px 16px; border-radius: 20px; font-size: 14px;
  border: 1px solid var(--border); display: flex; align-items: center; gap: 6px;
}
#host-controls { margin-top: 12px; }
#waiting-msg { color: var(--text2); margin-top: 12px; }

/* Game header — по центру */
.game-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
}
/* Timer bar — отдельная центрованная панель */
#phase-label { font-size: 18px; font-weight: 600; color: var(--accent); }
.timer-bar {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.timer-container { position: relative; width: 80px; height: 80px; }
.timer-svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.timer-bg { fill: none; stroke: var(--bg3); stroke-width: 6; }
.timer-progress { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 282.7; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke 0.3s; }
.timer-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 18px; font-weight: 700; }

/* Дневной таймер — крупный */
.timer-bar.day .timer-container {
  width: 120px;
  height: 120px;
}
.timer-bar.day .timer-svg {
  width: 120px;
  height: 120px;
}
.timer-bar.day .timer-text {
  font-size: 30px;
}

/* Night phase */
.phase-panel { display: flex; flex-direction: column; align-items: center; gap: 20px; flex: 1; }
#night-phase { position: relative; }

.role-reveal { text-align: center; width: 100%; }
.role-label { color: var(--text2); font-size: 13px; margin-bottom: 8px; }
.role-badge-large { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.role-emoji { font-size: 32px; }
#my-role-display { font-size: 22px; color: var(--accent); -webkit-text-fill-color: var(--accent); background: none; }
.role-desc { color: var(--text2); font-size: 13px; margin-top: 8px; max-width: 280px; line-height: 1.4; }

/* Карточки ролей без рамок */
.role-card-image {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 8px;
}

.role-confirm-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(13, 27, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border-radius: var(--radius);
  padding: 20px;
}
.role-confirm-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 320px;
  animation: fadeIn 0.4s ease;
}
.role-confirm-text {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.5;
}
.confirm-status {
  font-size: 13px;
  color: var(--text2);
  min-height: 20px;
}

/* Game header - needs position:relative for music button */
.game-header {
  position: relative;
}

.music-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.music-toggle:hover {
  background: var(--border);
}

.night-instruction-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
}

.night-icon { font-size: 48px; }
.night-step-text {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.night-reveal-box {
  background: var(--bg2);
  border: 2px solid var(--accent2);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  animation: fadeIn 0.5s ease;
  width: 100%;
  max-width: 320px;
}
.reveal-role-label { color: var(--text2); font-size: 14px; margin-bottom: 8px; }
.word-display { font-size: 36px; font-weight: 800; color: var(--accent2); letter-spacing: 2px; text-align: center; }
.category-tag { background: var(--bg3); padding: 4px 12px; border-radius: 12px; font-size: 12px; color: var(--text2); display: inline-block; margin-top: 8px; }

/* PO word choice cards (3 words to pick from) */
.po-choices-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.word-choice-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.word-choice-card:active {
  transform: scale(0.97);
  border-color: var(--accent2);
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.2);
}
.word-choice-word {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 1px;
}

/* Day phase */
.day-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  flex: 1;
}
.day-role-badge {
  font-size: 16px;
  margin-bottom: 4px;
}

.secret-reminder {
  background: var(--bg2);
  border: 1px solid var(--accent2);
  border-radius: var(--radius);
  padding: 12px 16px;
  text-align: center;
  width: 100%;
  max-width: 320px;
  margin: 8px auto;
}
.reminder-role-label { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.reminder-word { font-size: 20px; font-weight: 700; color: var(--accent2); letter-spacing: 1px; }
.day-instructions {
  text-align: center;
  padding: 16px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
}
.day-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.day-subtitle { color: var(--text2); font-size: 14px; margin-bottom: 12px; line-height: 1.4; }
.day-rules {
  list-style: none;
  text-align: center;
  padding: 0 8px;
}
.day-rules li {
  font-size: 13px;
  color: var(--text2);
  padding: 6px 0;
  line-height: 1.4;
  position: relative;
  padding-left: 20px;
}
.day-rules li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--accent);
}

.guess-big-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* PO secret secondary role */
.po-secondary-role {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg3);
  border: 1px dashed var(--accent2);
  border-radius: var(--radius-sm);
  text-align: center;
}
.sec-role-label { font-size: 11px; color: var(--text2); margin-bottom: 2px; }
.sec-role-text { font-size: 16px; font-weight: 700; color: var(--accent2); }
.sec-role-hint { font-size: 10px; color: var(--text2); margin-top: 4px; font-style: italic; }

.po-secret-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent2);
  color: var(--accent2);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-outline:hover {
  background: var(--accent2);
  color: #fff;
}
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg3);
  border: 1px dashed var(--accent2);
  border-radius: var(--radius-sm);
  text-align: center;
}
.sec-role-label { font-size: 11px; color: var(--text2); margin-bottom: 2px; }
.sec-role-text { font-size: 16px; font-weight: 700; color: var(--accent2); }

/* PO public info in role card */
.po-public-info {
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  text-align: center;
}
.po-public-label { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.po-public-name { font-size: 18px; font-weight: 700; color: var(--accent); }

/* Day player cards */
.day-players-section {
  width: 100%;
  max-width: 320px;
}
.day-players-title {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
  text-align: center;
}
.day-players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.day-player-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.day-player-me {
  border-color: var(--accent);
  background: #eef3f9;
}
.day-player-avatar {
  font-size: 14px;
}
.day-player-name {
  color: var(--text);
}

/* Vote result message */
.vote-result-msg {
  text-align: center;
  width: 100%;
  max-width: 320px;
  animation: fadeIn 0.4s ease;
}
.vote-result-anim {
  font-size: 20px;
  font-weight: 700;
  padding: 24px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 2px solid var(--accent2);
  line-height: 1.5;
}
.btn-guess {
  font-size: 22px;
  padding: 24px 40px;
  max-width: 320px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(91, 125, 181, 0.2);
  animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(91, 125, 181, 0.15); }
  50% { box-shadow: 0 0 30px rgba(91, 125, 181, 0.3); }
}



/* Vote */
.vote-header { text-align: center; }
.vote-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.vote-prompt { color: var(--text2); font-size: 14px; text-align: center; max-width: 280px; line-height: 1.4; }

.vote-list { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; }
.vote-player {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg2); padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid var(--border); cursor: pointer; transition: all 0.2s;
}
.vote-player:active { transform: scale(0.97); border-color: var(--accent); }
.vote-avatar { font-size: 20px; margin-right: 8px; }
.vote-action { font-size: 20px; margin-left: auto; }
.vote-player-selected { border-color: var(--accent2); background: rgba(88,166,255,0.12); }
.vote-player-multi { cursor: pointer; }
.vote-check { font-size: 18px; margin-left: auto; }
.multi-vote-submit-wrap { width: 100%; max-width: 320px; margin-top: 12px; }
.vote-status { color: var(--text2); font-size: 13px; margin-top: 8px; }

/* Result */
.result-content { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 30px; text-align: center; }
.result-icon { font-size: 64px; }
#result-title { font-size: 20px; margin-bottom: 8px; line-height: 1.4; }

.word-reveal-box {
  padding: 16px 24px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 320px;
}
.word-reveal-label { color: var(--text2); font-size: 13px; margin-bottom: 4px; }
.word-reveal-word { font-size: 28px; font-weight: 800; color: var(--accent2); }

.roles-reveal { width: 100%; max-width: 320px; }
.roles-reveal-title { color: var(--text2); font-size: 13px; margin-bottom: 8px; }
#role-reveal-all { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.role-chip { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--bg2); border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 14px; }
.ba-reveal { color: var(--danger); font-weight: 700; }

/* Genre selection */
.genre-selection {
  width: 100%;
  max-width: 280px;
  margin-top: 10px;
  text-align: center;
}
.genre-title {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
}
.genre-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.genre-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 13px;
}
.genre-btn:active {
  transform: scale(0.97);
}
.genre-btn.genre-active {
  border-color: var(--accent2);
  background: rgba(90, 158, 111, 0.1);
  box-shadow: 0 0 8px rgba(90, 158, 111, 0.2);
}
.genre-icon {
  font-size: 24px;
}
.genre-status {
  font-size: 12px;
  color: var(--text2);
  margin-top: 6px;
}

/* Ночью убираем эмодзи перед названием роли */
.theme-night .role-emoji {
  display: none;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Night instruction phase ── */
#night-instruction-phase {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  gap: 24px;
  flex: 1;
}
.instruction-container {
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.instruction-icon {
  font-size: 64px;
  animation: pulse 2s infinite;
}
.instruction-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}
.instruction-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}
.inst-line {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
}
.inst-line strong {
  color: var(--text);
}
.instruction-hint {
  font-size: 14px;
  color: var(--text2);
  text-align: center;
  animation: pulse 2s infinite;
}

/* ── Test mode role selection ── */
#test-role-select-phase {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 12px;
}
.role-select-container {
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.role-select-icon {
  font-size: 48px;
}
.role-select-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.role-select-sub {
  font-size: 13px;
  color: var(--text2);
  text-align: center;
  margin-bottom: 4px;
}
.role-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.role-option {
  padding: 14px 16px;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.role-option:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.role-option:active {
  transform: scale(0.98);
}
.role-option-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.role-option-desc {
  font-size: 13px;
  color: var(--text2);
}

.po-secret-reveal-banner {
  margin-top: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

/* ── Smooth phase transitions ── */
.phase-panel,
#night-instruction-phase,
#night-instruction-area,
#night-word-box,
#po-choice-area,
.vote-list,
#day-phase,
#test-role-select-phase {
  animation: fadeIn 0.45s ease;
}

.screen.active {
  animation: screenFadeIn 0.35s ease;
}

@keyframes screenFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
