/* GuessTheIMP - View-Specific Styles */

/* ==========================================================================
   1. HOME VIEW
   ========================================================================== */
.view-home {
  text-align: center;
  justify-content: center;
  gap: 24px;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.brand-logo-card {
  width: 76px;
  height: 76px;
  background: linear-gradient(135deg, rgba(255, 42, 85, 0.15) 0%, rgba(18, 22, 34, 0.9) 100%);
  border: 1px solid var(--border-imp);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-imp-glow);
  position: relative;
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.brand-title .imp-text {
  color: var(--imp-red);
  text-shadow: 0 0 16px var(--imp-red-glow);
}

.brand-tagline {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.mode-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.mode-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.mode-card:hover, .mode-card:active {
  border-color: var(--innocent-cyan);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.mode-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--innocent-cyan);
  border: 1px solid var(--border-cyan);
}

.mode-card.mode-offline .mode-card-icon {
  color: var(--accent-gold);
  border-color: rgba(255, 184, 0, 0.4);
}

.mode-card.mode-online .mode-card-icon {
  color: var(--innocent-cyan);
  border-color: var(--border-cyan);
}

/* Fast Start Mode Card */
.mode-card.mode-fast-start {
  background: linear-gradient(135deg, rgba(255, 42, 85, 0.12) 0%, rgba(20, 24, 38, 0.95) 100%);
  border: 1px solid rgba(255, 42, 85, 0.45);
  box-shadow: 0 4px 18px rgba(255, 42, 85, 0.15);
}

.mode-card.mode-fast-start:hover, .mode-card.mode-fast-start:active {
  border-color: var(--imp-red);
  box-shadow: 0 6px 24px rgba(255, 42, 85, 0.3);
  transform: translateY(-2px);
}

.mode-card.mode-fast-start .mode-card-icon {
  background: rgba(255, 42, 85, 0.15);
  border-color: rgba(255, 42, 85, 0.5);
  color: var(--imp-red);
}

.fast-start-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

/* Session Resumed Banner */
.session-resumed-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: var(--radius-sm);
  margin: 8px 12px 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--innocent-cyan);
  animation: slideDown 0.3s ease;
  z-index: 100;
}

.session-resumed-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Discussion Paused Card */
.discussion-paused-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.4);
  border-radius: var(--radius-md);
  margin: 10px 0;
  width: 100%;
  max-width: 320px;
}

.paused-text {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.mode-card-info h3 {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.mode-card-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.home-quick-rules {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 8px;
}

/* ==========================================================================
   2. SETUP VIEW
   ========================================================================== */
.setup-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin: auto 0;
}

.setup-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setup-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.setup-label-val {
  color: var(--innocent-cyan);
  font-size: 0.85rem;
}

/* ==========================================================================
   3. PLAYERS VIEW
   ========================================================================== */
.players-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.player-add-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.player-list-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
  padding-right: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.player-list-scroll::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   4. PASS PHONE VIEW
   ========================================================================== */
.pass-screen-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  margin: auto 0;
  width: 100%;
}

.pass-avatar-wrap {
  position: relative;
}

.pass-avatar-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: var(--imp-red-glow);
  filter: blur(10px);
  z-index: 0;
}

.pass-player-badge {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.pass-warning-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.3);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 700;
}

.pass-counter-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   5. REVEAL ROLE VIEW
   ========================================================================== */
.reveal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 22px 18px;
  border-radius: var(--radius-lg);
  margin: auto 0;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.reveal-card.is-imposter {
  border-color: var(--border-imp);
  background: radial-gradient(circle at 50% 30%, rgba(255, 42, 85, 0.16) 0%, var(--bg-card) 75%);
  box-shadow: var(--shadow-imp-glow);
}

.reveal-card.is-innocent {
  border-color: var(--border-cyan);
  background: radial-gradient(circle at 50% 30%, rgba(0, 229, 255, 0.12) 0%, var(--bg-card) 75%);
  box-shadow: var(--shadow-cyan-glow);
}

.reveal-role-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.role-badge-large {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.role-badge-large.imp {
  background: var(--imp-red);
  color: #ffffff;
  box-shadow: 0 0 20px var(--imp-red-glow);
}

.role-badge-large.innocent {
  background: var(--innocent-cyan);
  color: #06131c;
  box-shadow: 0 0 20px var(--innocent-cyan-glow);
}

.secret-display-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
}

.secret-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.secret-word-val {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-align: center;
  word-break: break-word;
}

.secret-word-val.imp-hint {
  color: var(--imp-red);
  text-shadow: 0 0 12px var(--imp-red-glow);
}

.reveal-guidance {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.35;
  max-width: 280px;
}

/* ==========================================================================
   6. DISCUSSION VIEW
   ========================================================================== */
.discussion-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  margin: auto 0;
  width: 100%;
}

.timer-container {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-circle-bg {
  fill: none;
  stroke: var(--bg-card);
  stroke-width: 8;
}

.timer-circle-progress {
  fill: none;
  stroke: var(--innocent-cyan);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-circle-progress.urgent {
  stroke: var(--imp-red);
}

.timer-display-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.first-speaker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 320px;
}

.speaker-lead-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.speaker-lead-badge svg {
  fill: var(--imposter-red);
  stroke: none;
  width: 10px;
  height: 10px;
}

.speaker-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: space-between;
}

.first-speaker-card .speaker-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.first-speaker-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-reroll-speaker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all var(--trans-fast);
  flex-shrink: 0;
}

.btn-reroll-speaker:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  border-color: var(--border-card);
}

.btn-reroll-speaker:active {
  transform: scale(0.94);
}

.discussion-clue-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
  width: 100%;
  max-width: 320px;
}

/* ==========================================================================
   7. VOTING VIEW
   ========================================================================== */
.voting-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: auto 0;
  width: 100%;
  gap: 12px;
}

.voting-header-strip {
  text-align: center;
}

.voting-header-strip h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

.voting-header-strip p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.vote-players-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
  max-height: 330px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.vote-players-grid::-webkit-scrollbar {
  display: none;
}

.vote-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--trans-fast);
  position: relative;
}

.vote-card:active {
  transform: scale(0.97);
}

.vote-card.selected {
  border-color: var(--imp-red);
  background: rgba(255, 42, 85, 0.12);
  box-shadow: 0 0 16px var(--imp-red-glow);
}

.vote-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vote-indicator {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--imp-red);
  flex-shrink: 0;
}

.vote-card.selected .vote-indicator {
  border-color: var(--imp-red);
  background: var(--imp-red);
  color: white;
}

/* ==========================================================================
   8. RESULT VIEW
   ========================================================================== */
.result-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: auto 0;
  width: 100%;
  text-align: center;
}

.result-target-avatar {
  position: relative;
}

.result-target-status {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.result-target-identity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-words-reveal-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.reveal-pair-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
}

.reveal-pair-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.reveal-pair-word {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================================================
   9. GAME COMPLETE VIEW
   ========================================================================== */
.complete-screen-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: auto 0;
  width: 100%;
  text-align: center;
}

.winner-banner-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.winner-icon-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

.winner-icon-circle.innocent-win {
  background: linear-gradient(135deg, var(--innocent-cyan) 0%, #0099aa 100%);
  color: #03141f;
  box-shadow: var(--shadow-cyan-glow);
}

.winner-icon-circle.imposter-win {
  background: linear-gradient(135deg, var(--imp-red) 0%, #b81436 100%);
  color: #ffffff;
  box-shadow: var(--shadow-imp-glow);
}

.winner-title {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.winner-subtitle {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* Compact Scoreboard */
.scoreboard-box {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scoreboard-box::-webkit-scrollbar {
  display: none;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 6px;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.score-row:last-child {
  border-bottom: none;
}

.score-player-name {
  font-weight: 700;
}

.score-points {
  font-weight: 800;
  color: var(--accent-gold);
}

/* ==========================================================================
   10. ONLINE LOBBY VIEW
   ========================================================================== */
.lobby-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-imp);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  width: 100%;
  margin-bottom: 12px;
}

.lobby-code-val {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--imp-red);
  text-shadow: 0 0 12px var(--imp-red-glow);
}

.lobby-player-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  max-height: 250px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.lobby-player-list::-webkit-scrollbar {
  display: none;
}

.lobby-player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.lobby-player-item .host-tag {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(255, 184, 0, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-success);
}

/* ==========================================================================
   11. CREATOR BRANDING & RESPONSIVE REFINEMENTS
   ========================================================================== */
.creator-branding {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 0 2px 0;
  opacity: 0.85;
}

.creator-branding .creator-name {
  color: var(--text-secondary);
  font-weight: 700;
  margin-left: 4px;
}

.rules-credit-strip {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  font-weight: 600;
}

/* Timer clickable toggle pause/resume styling */
.timer-container {
  cursor: pointer;
  transition: transform var(--trans-fast);
}

.timer-container:active {
  transform: scale(0.96);
}

/* Ultra-Compact & Responsive Media Queries for All Mobile Displays */
@media (max-height: 720px) {
  .home-hero {
    margin-top: 4px;
    gap: 4px;
  }
  .brand-logo-card {
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }
  .brand-title {
    font-size: 1.55rem;
  }
  .brand-tagline {
    font-size: 0.76rem;
  }
  .mode-cards-grid {
    gap: 7px;
  }
  .mode-card {
    padding: 10px 14px;
    gap: 12px;
  }
  .mode-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .mode-card-info h3 {
    font-size: 0.95rem;
  }
  .setup-sections {
    gap: 8px;
  }
  .setup-block {
    gap: 6px;
  }
  .stepper-control {
    height: 42px;
  }
  .stepper-val {
    font-size: 0.92rem;
  }
  .categories-grid {
    gap: 6px;
  }
  .chip-btn {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .secret-display-box {
    padding: 14px 12px;
    margin: 12px 0;
  }
  .secret-word-val {
    font-size: 1.8rem;
  }
  .timer-container {
    width: 105px;
    height: 105px;
  }
  .timer-display-num {
    font-size: 2rem;
  }
  .discussion-clue-box {
    padding: 10px 14px;
    font-size: 0.78rem;
    margin: 8px 0;
  }
}

@media (max-width: 360px) {
  .brand-title {
    font-size: 1.4rem;
  }
  .mode-card {
    padding: 8px 12px;
    gap: 10px;
  }
  .mode-card-info h3 {
    font-size: 0.9rem;
  }
  .mode-card-info p {
    font-size: 0.72rem;
  }
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .btn-lg {
    padding: 12px 14px;
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   11. IN-GAME CHAT DRAWER & HEADER BUTTON
   ========================================================================== */
.btn-header-chat {
  position: relative;
  color: var(--innocent-cyan);
}

.btn-header-chat:hover, .btn-header-chat:active {
  background: rgba(0, 229, 255, 0.12);
  color: var(--innocent-cyan);
}

.chat-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.chat-clue-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid var(--innocent-cyan);
  color: var(--innocent-cyan);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-msg-item.is-clue {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.4);
}

.chat-unread-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--imp-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px var(--imp-red);
}

.chat-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.chat-drawer-overlay.active {
  display: flex;
}

.chat-drawer-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 70dvh;
  max-height: 520px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.chat-messages-wrap {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 2px;
}

.chat-msg-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  max-width: 90%;
}

.chat-msg-item.msg-outgoing,
.chat-msg-item.is-me {
  align-self: flex-end;
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.25);
}

.chat-msg-item.msg-incoming {
  align-self: flex-start;
}

.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.chat-msg-text {
  font-size: 0.86rem;
  color: var(--text-primary);
  line-height: 1.35;
  word-break: break-word;
}

.chat-quick-chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 4px 0;
}

.chat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.chat-chip:active {
  background: var(--bg-hover);
  color: var(--innocent-cyan);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ==========================================================================
   12. LIVE PUBLIC ROOMS SERVER BROWSER
   ========================================================================== */
.public-rooms-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.public-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 165px;
  overflow-y: auto;
}

.public-room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: border-color 0.2s;
}

.public-room-card:hover {
  border-color: var(--border-focus);
}

.public-room-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.public-room-code-tag {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--innocent-cyan);
}

.public-room-info {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-kick-player {
  background: transparent;
  border: 1px solid rgba(255, 42, 85, 0.4);
  color: var(--imp-red);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.15s, color 0.15s;
}

.btn-kick-player:hover, .btn-kick-player:active {
  background: var(--imp-red);
  color: #fff;
}

/* ==========================================================================
   13. SPECIAL ROLES SYSTEM (SPY, SHERIFF, LETTER & FIRST-LETTER IMPOSTERS)
   ========================================================================== */
.btn-sheriff {
  background: rgba(255, 184, 0, 0.12);
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--trans-fast);
}

.btn-sheriff:hover, .btn-sheriff:active {
  background: var(--accent-gold);
  color: #000;
  box-shadow: 0 0 16px var(--accent-gold-glow);
}

.badge-spy {
  background: rgba(0, 229, 255, 0.14);
  color: var(--innocent-cyan);
  border: 1px solid var(--innocent-cyan);
  box-shadow: 0 0 14px var(--innocent-cyan-glow);
}

.badge-sheriff {
  background: rgba(255, 184, 0, 0.14);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  box-shadow: 0 0 14px var(--accent-gold-glow);
}

.badge-letter-imp {
  background: rgba(255, 42, 85, 0.14);
  color: var(--imp-red);
  border: 1px solid var(--imp-red);
  box-shadow: 0 0 14px var(--imp-red-glow);
}

.badge-first-letter-imp {
  background: rgba(157, 78, 221, 0.18);
  color: #c77dff;
  border: 1px solid #c77dff;
  box-shadow: 0 0 14px rgba(199, 125, 255, 0.3);
}

.role-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reveal-extra-intel-box {
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   14. PLAYER CLUES BOARD (PROVING INNOCENCE IN CHAT & DISCUSSION)
   ========================================================================== */
.clues-board-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.clue-chip-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clue-chip-author {
  font-weight: 800;
  color: var(--text-primary);
}

.clue-chip-text {
  color: var(--innocent-cyan);
  font-weight: 700;
}

/* ==========================================================================
   15. AMONG US STYLE EJECTION & DEATH CUTSCENE
   ========================================================================== */
.ejection-scene-overlay {
  position: fixed;
  inset: 0;
  background: #030408;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.starfield-bg {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1.5px 1.5px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 60px 120px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 140px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 210px 180px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 280px 40px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 340px 150px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 90px 240px, #00e5ff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 240px 290px, #ffb800, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 380px 380px;
  animation: starDrift 18s linear infinite;
  opacity: 0.85;
}

@keyframes starDrift {
  from { transform: translateY(0); }
  to { transform: translateY(-380px); }
}

.ejection-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.ejection-character-wrap {
  width: 100%;
  height: 130px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.ejection-avatar {
  position: absolute;
  top: 30px;
  left: -80px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.4);
  animation: amongUsEject 3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.ejection-avatar-initial {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  z-index: 2;
}

.ejection-visor {
  position: absolute;
  top: 15px;
  right: 6px;
  width: 22px;
  height: 15px;
  background: #a5f3fc;
  border: 2px solid #083344;
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

@keyframes amongUsEject {
  0% {
    left: -80px;
    transform: rotate(0deg) scale(1.1);
  }
  50% {
    left: 42%;
    transform: rotate(360deg) scale(0.95);
  }
  100% {
    left: 110%;
    transform: rotate(720deg) scale(0.68);
  }
}

.ejection-text-container {
  text-align: center;
  min-height: 80px;
}

.ejection-typewriter-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  line-height: 1.4;
}

.ejection-subtext {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.ejection-skip-hint {
  position: absolute;
  bottom: 24px;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: pulse 1.5s infinite;
}
