/* ==========================================================================
   IMPOSTER: The Social Deduction Word Game
   Design System & Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-dark: #070913;
  --bg-card: rgba(18, 22, 38, 0.72);
  --bg-card-hover: rgba(28, 34, 58, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-glass-bright: rgba(255, 255, 255, 0.22);

  --accent-cyan: #00f2fe;
  --accent-cyan-glow: rgba(0, 242, 254, 0.35);
  --accent-purple: #9d4edd;
  --accent-purple-glow: rgba(157, 78, 221, 0.35);
  --accent-rose: #ff3366;
  --accent-rose-glow: rgba(255, 51, 102, 0.4);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --accent-amber: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;

  /* Shadows & Curves */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-glass: 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-glass);
  --shadow-neon-cyan: 0 0 24px var(--accent-cyan-glow);
  --shadow-neon-rose: 0 0 24px var(--accent-rose-glow);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Dynamic Ambient Glow Backdrop */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7928ca 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #00f2fe 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation-duration: 22s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #ff007a 0%, transparent 70%);
  top: 40%;
  left: 30%;
  opacity: 0.25;
  animation-duration: 15s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.15); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* App Header */
.app-header {
  position: relative;
  z-index: 10;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  background: rgba(7, 9, 19, 0.6);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-purple));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 16px var(--accent-rose-glow);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #fff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  font-size: 0.65rem;
  font-family: var(--font-display);
  background: rgba(255, 51, 102, 0.2);
  border: 1px solid var(--accent-rose);
  color: var(--accent-rose);
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-left: 0.25rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 1.1rem;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-glass-bright);
  transform: translateY(-2px);
}

/* Main Container */
.main-wrapper {
  position: relative;
  z-index: 5;
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Glass Card */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

/* Screen Transitions */
.view-screen {
  display: none;
  animation: fadeInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-screen.active {
  display: block;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hero Title & Subtitle */
.hero-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.hero-gradient {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 75%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* Mode Selector Tabs */
.mode-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  margin-bottom: 2rem;
}

.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mode-tab:hover {
  color: var(--text-main);
}

.mode-tab.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(157, 78, 221, 0.15));
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.2);
}

/* Setup Form Sections */
.form-section {
  margin-bottom: 1.75rem;
}

.section-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

/* Player List UI */
.players-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-chip.is-bot {
  border-color: rgba(157, 78, 221, 0.4);
  background: rgba(157, 78, 221, 0.12);
}

.player-chip .remove-player-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 2px;
  line-height: 1;
}

.player-chip .player-order-badge {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 1.2;
}

.player-chip .player-name-text {
  cursor: pointer;
  transition: var(--transition-fast);
}

.player-chip .player-name-text:hover {
  color: var(--accent-cyan);
  text-decoration: underline dotted;
}

.player-chip .remove-player-btn:hover {
  color: var(--accent-rose);
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.add-player-row {
  display: flex;
  gap: 0.6rem;
}

.input-field {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.input-field:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px var(--accent-cyan-glow);
}

.input-field::placeholder {
  color: var(--text-dim);
}

.select-field {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.select-field option {
  background: #121626;
  color: #fff;
}

.select-field:focus {
  border-color: var(--accent-cyan);
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0099ff 100%);
  color: #040916;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 242, 254, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-rose) 0%, #ff007a 100%);
  color: #fff;
  box-shadow: 0 6px 20px var(--accent-rose-glow);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 51, 102, 0.6);
}

.btn-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-bright);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

/* Difficulty Mode Cards (Easy, Medium, Hard) */
.difficulty-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (max-width: 680px) {
  .difficulty-cards-grid {
    grid-template-columns: 1fr;
  }
}

.difficulty-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.difficulty-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-bright);
  transform: translateY(-2px);
}

.difficulty-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.difficulty-card-icon {
  font-size: 1.4rem;
}

.difficulty-card-tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.difficulty-card-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.15rem;
}

.difficulty-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Specific Mode Active States */
.difficulty-card.easy.active {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 20px var(--accent-emerald-glow);
}

.difficulty-card.easy .difficulty-card-tag {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.difficulty-card.medium.active {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}

.difficulty-card.medium .difficulty-card-tag {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.difficulty-card.hard.active {
  border-color: var(--accent-rose);
  background: rgba(255, 51, 102, 0.15);
  box-shadow: 0 0 20px var(--accent-rose-glow);
}

.difficulty-card.hard .difficulty-card-tag {
  background: rgba(255, 51, 102, 0.2);
  color: var(--accent-rose);
  border: 1px solid rgba(255, 51, 102, 0.4);
}

/* Category Hint Badge on Reveal Screen */
.category-hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.hard-mode-warning-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid var(--accent-rose);
  color: var(--accent-rose);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 0.6rem;
  animation: pulseFingerprint 1.5s infinite ease-in-out;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Secret Peek Shield & Reveal Screen */
.reveal-wrapper {
  text-align: center;
  padding: 1rem 0;
}

.reveal-player-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  margin-bottom: 2rem;
}

.player-avatar-lg {
  font-size: 2.25rem;
}

.player-name-lg {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

/* Secret Hold Card */
.secret-card-container {
  max-width: 440px;
  margin: 0 auto 2.5rem;
  perspective: 1000px;
}

.secret-card {
  position: relative;
  width: 100%;
  height: 280px;
  background: linear-gradient(145deg, #13172c, #0a0d1a);
  border: 2px dashed rgba(0, 242, 254, 0.4);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.secret-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 30px var(--accent-cyan-glow);
}

.secret-card.revealed {
  background: linear-gradient(145deg, #1c2340, #13182d);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 45px var(--accent-cyan-glow);
}

.card-hidden-content, .card-revealed-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.fingerprint-icon {
  font-size: 3.5rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  animation: pulseFingerprint 2s infinite ease-in-out;
}

@keyframes pulseFingerprint {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 12px var(--accent-cyan)); }
}

.hold-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.hold-subtext {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Revealed Secret Word Styling */
.word-pre-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.secret-word-display {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
  margin-bottom: 0.75rem;
}

.secret-word-instruction {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 320px;
}

.reveal-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.reveal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  width: 0%;
  transition: width 0.3s ease;
}

/* Clue Phase Screen */
.clue-turn-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.round-badge {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: 8px;
}

.turn-timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-rose);
}

.current-speaker-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.08), rgba(157, 78, 221, 0.08));
  border: 1px solid var(--border-glass-bright);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  animation: glowPulse 3s infinite alternate;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 15px rgba(0, 242, 254, 0.1); }
  100% { box-shadow: 0 0 25px rgba(157, 78, 221, 0.25); }
}

.speaker-avatar {
  font-size: 2.75rem;
}

.speaker-details h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.2rem;
}

.speaker-prompt {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Notebook & Clue History Stream */
.notebook-container {
  background: rgba(10, 12, 20, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.notebook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 700;
}

.clue-stream {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clue-bubble {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  animation: slideInClue 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.clue-bubble-avatar {
  font-size: 1.35rem;
}

.clue-bubble-content {
  flex: 1;
}

.clue-bubble-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.2rem;
}

.clue-bubble-text {
  color: var(--text-main);
  font-style: italic;
}

.clue-bubble.bot-bubble {
  border-left: 3px solid var(--accent-purple);
}

.clue-bubble.human-bubble {
  border-left: 3px solid var(--accent-cyan);
}

/* Clue Input Form */
.clue-submit-row {
  display: flex;
  gap: 0.75rem;
}

/* Discussion Phase */
.discussion-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.player-clue-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.player-clue-card .card-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.player-clue-card .card-clues-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.clue-tag {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #e2e8f0;
  border-left: 2px solid var(--accent-cyan);
}

/* Voting Phase Grid */
.voting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.vote-card {
  background: var(--bg-glass);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.vote-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-rose);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--accent-rose-glow);
}

.vote-card.selected {
  background: rgba(255, 51, 102, 0.15);
  border-color: var(--accent-rose);
  box-shadow: 0 0 25px var(--accent-rose-glow);
}

.vote-card-avatar {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.vote-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.vote-badge {
  font-size: 0.75rem;
  font-family: var(--font-display);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--text-muted);
}

/* Elimination Modal & Dramatic Reveal */
.dramatic-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.92);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.dramatic-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  animation: zoomReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes zoomReveal {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.eliminated-badge {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-rose);
  margin-bottom: 1rem;
}

.eliminated-avatar {
  font-size: 4.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 20px rgba(255, 51, 102, 0.4));
}

.eliminated-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.eliminated-role-reveal {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.role-was-imposter {
  background: rgba(255, 51, 102, 0.2);
  border: 1px solid var(--accent-rose);
  color: var(--accent-rose);
  box-shadow: 0 0 25px var(--accent-rose-glow);
}

.role-was-civilian {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.elimination-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Victory & Game Over Screen */
.victory-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.victory-trophy {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: floatTrophy 3s ease-in-out infinite alternate;
}

@keyframes floatTrophy {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.victory-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.victory-civilians {
  color: var(--accent-cyan);
  text-shadow: 0 0 35px var(--accent-cyan-glow);
}

.victory-imposter {
  color: var(--accent-rose);
  text-shadow: 0 0 35px var(--accent-rose-glow);
}

.victory-reason {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Words Breakdown Box */
.words-comparison-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.word-column {
  padding: 1rem;
  border-radius: var(--radius-md);
}

.civilian-col {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.imposter-col {
  background: rgba(255, 51, 102, 0.08);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.word-type-tag {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.word-highlight {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.shared-characteristic-box {
  background: rgba(157, 78, 221, 0.12);
  border: 1px solid rgba(157, 78, 221, 0.35);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
}

.characteristic-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-purple);
  margin-bottom: 0.5rem;
}

.characteristic-text {
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.5;
}

/* Modals (Rules, Custom Words) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-glass);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}

.rule-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.rule-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-cyan);
  color: #040916;
  font-family: var(--font-display);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-desc h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.rule-desc p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 95;
}

/* Resume Match Banner (Cache Saver) */
.resume-match-banner {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  animation: slideDownFade 0.35s ease-out;
}

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

/* Responsive Breakpoints */
@media (max-width: 640px) {
  .app-header {
    padding: 1rem;
  }

  .main-wrapper {
    padding: 1rem 0.75rem;
  }

  .glass-panel {
    padding: 1.5rem 1.25rem;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .secret-card {
    height: 250px;
    padding: 1.5rem;
  }

  .secret-word-display {
    font-size: 1.85rem;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
