/* ============================================================================
   style.css — Secret Hitler: Full Design System
   ============================================================================
   Dark theme, glassmorphism, cinematic typography, smooth animations.
   Desktop-first (1024px+) with basic mobile fallback.
   ============================================================================ */

/* -----------------------------------------------------------------------
   Google Fonts
   ----------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Germania+One&family=Montserrat:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* -----------------------------------------------------------------------
   Design Tokens (CSS Custom Properties)
   ----------------------------------------------------------------------- */
:root {
  /* Backgrounds */
  /* Backgrounds */
  --bg-primary:       #4d4945;
  --bg-secondary:     #372e25;
  --bg-card:          rgba(55, 46, 37, 0.9);
  --bg-glass:         rgba(30, 25, 20, 0.7);
  --bg-glass-hover:   rgba(45, 38, 30, 0.85);

  /* Borders */
  --border-subtle:    rgba(255, 255, 255, 0.08);
  --border-glow:      rgba(244, 162, 97, 0.15);

  /* Text */
  --text-primary:     #f8f7f2;
  --text-secondary:   #dcdad0;
  --text-muted:       #a29d95;

  /* Liberal palette */
  --liberal-primary:  #5a9ba6;
  --liberal-light:    #7abcca;
  --liberal-dark:     #386F8B;
  --liberal-bg:       rgba(90, 155, 166, 0.15);
  --liberal-glow:     rgba(90, 155, 166, 0.25);

  /* Fascist palette */
  --fascist-primary:  #e05b2b;
  --fascist-light:    #e67a53;
  --fascist-dark:     #b4431a;
  --fascist-bg:       rgba(224, 91, 43, 0.15);
  --fascist-glow:     rgba(224, 91, 43, 0.25);

  /* Accent */
  --gold:             #ffca3a;
  --gold-light:       #ffe3a8;
  --gold-dark:        #c47d3a;
  --gold-bg:          rgba(255, 202, 58, 0.12);

  /* Success / Warning / Error */
  --success:          #2ec46b;
  --warning:          #ffca3a;
  --error:            #e05b2b;
  --info:             #5a9ba6;

  /* Sizing */
  --radius-sm:        6px;
  --radius-md:        10px;
  --radius-lg:        16px;
  --radius-xl:        24px;

  /* Shadows */
  --shadow-sm:        0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md:        0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg:        0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow-lib:  0 0 20px rgba(90, 155, 166, 0.25);
  --shadow-glow-fas:  0 0 20px rgba(224, 91, 43, 0.25);

  /* Typography */
  --font-heading:     'Germania One', cursive;
  --font-body:        'Montserrat', sans-serif;

  /* Transitions */
  --ease-out:         cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce:      cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* -----------------------------------------------------------------------
   Reset & Base
   ----------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;

  /* Subtle animated background */
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(78, 168, 222, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(230, 57, 70, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(244, 162, 97, 0.03) 0%, transparent 50%);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: 0.03em;
}

a {
  color: var(--liberal-primary);
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
}

input {
  font-family: var(--font-body);
  outline: none;
}

::selection {
  background: var(--fascist-primary);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

/* -----------------------------------------------------------------------
   Screen Management
   ----------------------------------------------------------------------- */
.screen {
  display: none;
  min-height: 100vh;
  animation: fadeIn 0.5s var(--ease-out);
}

.screen.active {
  display: flex;
}

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

/* -----------------------------------------------------------------------
   MAIN MENU
   ----------------------------------------------------------------------- */
#screen-menu {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.menu-container {
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.menu-logo {
  margin-bottom: 0.5rem;
}

.menu-logo h1 {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold) 0%, var(--fascist-primary) 60%, var(--fascist-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  line-height: 1.2;
}

.menu-logo .subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.menu-main-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
}

.menu-main-buttons.hidden {
  display: none;
}

.menu-section {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.menu-section.visible {
  display: flex;
  animation: slideUp 0.4s var(--ease-out);
}

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

.menu-section h3 {
  font-size: 1.2rem;
  color: var(--gold);
}

.input-field {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(10px);
}

.input-field:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-bg);
}

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

.menu-error {
  color: var(--error);
  font-size: 0.85rem;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.3s;
}

.menu-error.visible {
  opacity: 1;
}

/* -----------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  transition: all 0.15s ease-in-out 0s;
  position: relative;
  top: 0;
  border: none;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn:active:not(:disabled) {
  top: 5px;
}

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

.btn-primary {
  background: var(--fascist-primary);
  color: #fff;
  box-shadow: 0 5px 0 var(--fascist-dark);
}

.btn-primary:hover {
  background: var(--fascist-light);
}

.btn-primary:active {
  box-shadow: 0 0 0 var(--fascist-dark);
}

.btn-primary:disabled {
  background: var(--text-muted);
  box-shadow: 0 5px 0 #555;
}

.btn-secondary {
  background: var(--liberal-primary);
  color: #fff;
  box-shadow: 0 5px 0 var(--liberal-dark);
}

.btn-secondary:hover {
  background: var(--liberal-light);
}

.btn-secondary:active {
  box-shadow: 0 0 0 var(--liberal-dark);
}

.btn-secondary:disabled {
  background: var(--text-muted);
  box-shadow: 0 5px 0 #555;
}

.btn-danger {
  background: var(--fascist-primary);
  color: #fff;
  box-shadow: 0 5px 0 var(--fascist-dark);
}

.btn-danger:hover {
  background: var(--fascist-light);
}

.btn-danger:active {
  box-shadow: 0 0 0 var(--fascist-dark);
}

.btn-back {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
}

.btn-back:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.btn-large {
  padding: 1rem 2.2rem;
  font-size: 1.3rem;
  border-radius: var(--radius-lg);
}

/* Vote buttons */
.btn-ja {
  background: linear-gradient(135deg, #1a7a3a, #2ec46b);
  color: #fff;
  font-size: 1.2rem;
  padding: 1.1rem 2.8rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 #125528;
}

.btn-ja:hover {
  background: linear-gradient(135deg, #22994c, #3cf588);
}

.btn-ja:active {
  box-shadow: 0 0 0 #125528;
}

.btn-nein {
  background: linear-gradient(135deg, var(--fascist-dark), var(--fascist-primary));
  color: #fff;
  font-size: 1.2rem;
  padding: 1.1rem 2.8rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 #8c1e13;
}

.btn-nein:hover {
  background: linear-gradient(135deg, var(--fascist-primary), var(--fascist-light));
}

.btn-nein:active {
  box-shadow: 0 0 0 #8c1e13;
}

.btn-veto {
  background: #8b5cf6;
  color: #fff;
  margin-top: 1rem;
  box-shadow: 0 5px 0 #5c2cbf;
}

.btn-veto:hover {
  background: #a78bfa;
}

.btn-veto:active {
  box-shadow: 0 0 0 #5c2cbf;
}

.btn-candidate {
  background: var(--bg-glass);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.btn-candidate:hover {
  background: var(--bg-glass-hover);
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-bg);
}

.btn-candidate.btn-danger:hover {
  border-color: var(--fascist-primary);
  box-shadow: 0 0 12px var(--fascist-bg);
}

/* -----------------------------------------------------------------------
   LOBBY SCREEN
   ----------------------------------------------------------------------- */
#screen-lobby {
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  gap: 1.5rem;
}

.lobby-container {
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lobby-header {
  text-align: center;
}

.lobby-header h2 {
  font-size: 2rem;
  color: var(--gold);
}

.lobby-room-code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.room-code-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.room-code-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-glass);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glow);
  letter-spacing: 0.15em;
  user-select: all;
}

.lobby-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Player list */
.lobby-player-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 350px;
  overflow-y: auto;
}

.lobby-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease-out);
  animation: slideIn 0.3s var(--ease-out);
}

.lobby-player:hover {
  background: rgba(255,255,255,0.06);
}

.lobby-player.disconnected {
  opacity: 0.5;
}

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

.player-number {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 28px;
}

.player-name-text {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
}

.player-badges {
  display: flex;
  gap: 0.4rem;
}

.badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.badge-host {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(244, 162, 97, 0.2);
}

.badge-disconnected {
  background: var(--fascist-bg);
  color: var(--fascist-light);
  border: 1px solid rgba(230, 57, 70, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Chat */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages {
  flex: 1;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding-right: 0.25rem;
}

.chat-msg {
  display: flex;
  gap: 0.4rem;
  font-size: 0.85rem;
  align-items: baseline;
  animation: slideIn 0.2s var(--ease-out);
}

.chat-system {
  color: var(--text-muted);
  font-style: italic;
}

.chat-name {
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.chat-msg.chat-me .chat-name {
  color: #4ea8de; /* Nice liberal teal/blue highlight for own chat */
}

.chat-name::after {
  content: ':';
}

.chat-text {
  color: var(--text-secondary);
  word-break: break-word;
}

.chat-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
}

.chat-input-row input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.chat-input-row input:focus {
  border-color: var(--gold);
}

.chat-input-row button {
  padding: 0.55rem 0.85rem;
  background: var(--gold-bg);
  border: 1px solid rgba(244, 162, 97, 0.2);
  color: var(--gold);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.chat-input-row button:hover {
  background: rgba(244, 162, 97, 0.2);
}

/* Lobby player count & start */
.lobby-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#lobby-player-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#btn-start-game {
  padding: 0.85rem 2rem;
}

/* -----------------------------------------------------------------------
   GAME SCREEN
   ----------------------------------------------------------------------- */
#screen-game {
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.game-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  gap: 0;
}

/* Turn banner */
.turn-banner {
  grid-column: 1;
  grid-row: 1;
  background: linear-gradient(135deg, var(--bg-glass), rgba(20, 20, 36, 0.95));
  backdrop-filter: blur(20px);
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.85rem;
  width: fit-content;
  max-width: 90%;
  margin: 0.5rem auto 0.2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.banner-icon {
  font-size: 1.1rem;
}

.turn-banner strong {
  color: var(--gold);
}

/* Main board area */
.game-main {
  grid-column: 1;
  grid-row: 2;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  gap: 0.35rem;
  position: relative;
}

/* Sidebar */
.game-sidebar {
  grid-column: 2;
  grid-row: 1 / 4;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-section:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-bottom: none;
}

/* Action panel (bottom of main area) */
.game-action-bar {
  grid-column: 1;
  grid-row: 3;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
  min-height: 80px;
}

/* -----------------------------------------------------------------------
   Policy Tracks
   ----------------------------------------------------------------------- */
.tracks-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  height: auto;
}

.board-wrapper {
  position: relative;
  display: block;
  height: 240px;
  width: fit-content;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(0, 0, 0, 0.4);
  overflow: hidden;
  background: #222;
}

.board-img {
  height: 100%;
  width: auto;
  display: block;
  user-select: none;
}

.board-policy-tile {
  position: absolute;
  width: 9.8%;
  height: auto;
  top: 30.5%;
  user-select: none;
  image-rendering: -webkit-optimize-contrast;
}

.board-policy-tile.show {
  visibility: visible;
  animation: tileAppear 1s, tileDrop 0.3s 1s ease-in-out;
}

.board-policy-tile.static {
  visibility: visible;
  animation: none;
}

.board-policy-tile.hide {
  visibility: hidden;
}

@keyframes tileAppear {
  0% { opacity: 0; transform: translateY(-40px); }
  100% { opacity: 1; transform: translateY(-40px); }
}

@keyframes tileDrop {
  0% { transform: translateY(-40px); }
  100% { transform: translateY(0); }
}

#election-tracker-token {
  position: absolute;
  top: 74.2%;
  width: 3.2%;
  height: auto;
  transition: left 1s ease-in-out;
  user-select: none;
}

/* Decks & piles info */
.tracker-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tracker-label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Deck info */
.deck-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.deck-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.deck-stat-value {
  font-weight: 700;
  color: var(--text-primary);
}

/* -----------------------------------------------------------------------
   Player Cards
   ----------------------------------------------------------------------- */
.player-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.player-card {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  min-width: 120px;
  flex: 1;
  max-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s var(--ease-out);
  position: relative;
}

.player-card:hover {
  border-color: rgba(255,255,255,0.12);
  background: var(--bg-glass-hover);
}

.player-card.is-me {
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-bg);
}

.player-card.president {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(244, 162, 97, 0.2);
}

.player-card.chancellor {
  border-color: var(--liberal-primary);
  box-shadow: 0 0 16px rgba(78, 168, 222, 0.2);
}

.player-card.nominated {
  border-color: var(--warning);
  animation: nominatePulse 1.5s infinite;
}

@keyframes nominatePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(244, 162, 97, 0.2); }
  50%      { box-shadow: 0 0 20px rgba(244, 162, 97, 0.4); }
}

.player-card.dead {
  opacity: 0.35;
  filter: grayscale(0.8);
}

.player-card.dead::after {
  content: 'EXECUTED';
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--error);
  border: 3px solid var(--error);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  opacity: 0.85;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.55);
  letter-spacing: 0.05em;
  font-family: var(--font-heading);
}

.player-card.disconnected:not(.dead) {
  border-color: rgba(230, 57, 70, 0.3);
  opacity: 0.6;
}

.player-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(255,255,255,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  border: 2px solid var(--border-glow);
}

.player-card.president .player-avatar {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.15), rgba(244, 162, 97, 0.05));
}

.player-card.chancellor .player-avatar {
  border-color: var(--liberal-primary);
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.15), rgba(78, 168, 222, 0.05));
}

.player-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-card-badges {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
}

.badge-president {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(244, 162, 97, 0.2);
}

.badge-chancellor {
  background: var(--liberal-bg);
  color: var(--liberal-primary);
  border: 1px solid rgba(78, 168, 222, 0.2);
}

.badge-nominated {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(244, 162, 97, 0.2);
  animation: pulse 1.5s infinite;
}

.badge-dead {
  background: var(--fascist-bg);
  color: var(--fascist-light);
  border: 1px solid rgba(230, 57, 70, 0.2);
}

.vote-indicator {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.vote-indicator.voted {
  color: var(--success);
}

/* -----------------------------------------------------------------------
   Action Panel
   ----------------------------------------------------------------------- */
.action-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.action-title {
  font-size: 1rem;
  color: var(--gold);
}

.action-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 500px;
}

.action-text strong {
  color: var(--gold);
}

.candidate-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 600px;
}

.vote-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
}

.vote-label {
  display: block;
  font-size: 1.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
}

.vote-sub {
  display: block;
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 0.15rem;
}

.veto-buttons {
  display: flex;
  gap: 1rem;
}

/* Waiting spinner */
.waiting-section {
  padding: 1rem 0;
}

.waiting-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.waiting-text {
  color: var(--text-muted);
}

/* -----------------------------------------------------------------------
   Policy Cards (President/Chancellor hands)
   ----------------------------------------------------------------------- */
.cards-section {
  padding: 0.5rem 0;
}

.card-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.policy-card-btn {
  width: 110px;
  height: 160px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.policy-card-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s;
  background: rgba(255,255,255,0.05);
}

.policy-card-btn:hover::before {
  opacity: 1;
}

.policy-card-btn:hover {
  transform: translateY(-8px) scale(1.03);
}

.liberal-card-btn {
  background: linear-gradient(145deg, var(--liberal-dark), var(--liberal-primary));
  border-color: var(--liberal-primary);
  box-shadow: 0 4px 20px rgba(78, 168, 222, 0.2);
}

.liberal-card-btn:hover {
  box-shadow: 0 8px 30px rgba(78, 168, 222, 0.35);
}

.fascist-card-btn {
  background: linear-gradient(145deg, var(--fascist-dark), var(--fascist-primary));
  border-color: var(--fascist-primary);
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.2);
}

.fascist-card-btn:hover {
  box-shadow: 0 8px 30px rgba(230, 57, 70, 0.35);
}

.policy-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}

.policy-card-icon {
  font-size: 2.5rem;
}

.policy-card-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* -----------------------------------------------------------------------
   Game Log (sidebar)
   ----------------------------------------------------------------------- */
.game-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-right: 0.25rem;
  max-height: 250px;
}

.log-entry {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  line-height: 1.45;
  animation: slideIn 0.2s var(--ease-out);
}

/* -----------------------------------------------------------------------
   Role Overlay
   ----------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s var(--ease-out);
}

.overlay.visible {
  display: flex;
}

#role-card {
  perspective: 800px;
}

.role-card-inner {
  width: 280px;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-xl);
  text-align: center;
  animation: cardReveal 0.6s var(--ease-bounce);
  box-shadow: var(--shadow-lg);
}

@keyframes cardReveal {
  from { transform: scale(0.5) rotateY(90deg); opacity: 0; }
  to   { transform: scale(1) rotateY(0); opacity: 1; }
}

.role-card-inner.role-liberal {
  background: linear-gradient(145deg, #1a3a5c, var(--liberal-dark));
  border: 2px solid var(--liberal-primary);
  box-shadow: 0 0 40px rgba(78, 168, 222, 0.3);
}

.role-card-inner.role-fascist {
  background: linear-gradient(145deg, #3a1520, var(--fascist-dark));
  border: 2px solid var(--fascist-primary);
  box-shadow: 0 0 40px rgba(230, 57, 70, 0.3);
}

.role-card-inner.role-hitler {
  background: linear-gradient(145deg, #1a0a0a, #3a1010);
  border: 2px solid #8b0000;
  box-shadow: 0 0 40px rgba(139, 0, 0, 0.4);
}

.role-card-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.role-card-label {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.role-card-party {
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 1rem;
}

.role-card-party.liberal {
  background: var(--liberal-bg);
  color: var(--liberal-primary);
  border: 1px solid rgba(78, 168, 222, 0.3);
}

.role-card-party.fascist {
  background: var(--fascist-bg);
  color: var(--fascist-primary);
  border: 1px solid rgba(230, 57, 70, 0.3);
}

.team-section {
  margin-top: 1rem;
  text-align: left;
  background: transparent;
  padding: 0;
}

.team-section h4 {
  font-size: 0.8rem;
  color: #5a1818;
  margin-bottom: 0.4rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: bold;
}

.team-section ul {
  list-style: none;
  padding-left: 0;
}

.team-section li,
.team-section p {
  font-size: 0.85rem;
  color: #2c2014;
  padding: 0.15rem 0;
  font-weight: bold;
}

/* -----------------------------------------------------------------------
   Vote Results Overlay
   ----------------------------------------------------------------------- */
#vote-overlay {
  z-index: 1001;
}

.vote-results-container {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 2rem 2.5rem;
  max-width: 450px;
  width: 90%;
  text-align: center;
  animation: cardReveal 0.4s var(--ease-bounce);
  box-shadow: var(--shadow-lg);
}

.vote-results-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.vote-passed {
  color: var(--success);
}

.vote-failed {
  color: var(--error);
}

.vote-tally {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.tally-ja {
  color: #2ec46b;
  font-weight: 600;
}

.tally-nein {
  color: var(--fascist-primary);
  font-weight: 600;
}

.vote-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.vote-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  animation: voteReveal 0.4s var(--ease-out) both;
}

@keyframes voteReveal {
  from { opacity: 0; transform: translateX(-15px); }
  to   { opacity: 1; transform: translateX(0); }
}

.vote-item.vote-ja {
  background: rgba(46, 196, 107, 0.1);
  border-left: 3px solid #2ec46b;
}

.vote-item.vote-nein {
  background: rgba(230, 57, 70, 0.1);
  border-left: 3px solid var(--fascist-primary);
}

.vote-player-name {
  font-weight: 500;
}

.vote-value {
  font-weight: 700;
  font-family: var(--font-heading);
}

.vote-ja .vote-value { color: #2ec46b; }
.vote-nein .vote-value { color: var(--fascist-primary); }

/* -----------------------------------------------------------------------
   Investigation Overlay
   ----------------------------------------------------------------------- */
.investigation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.investigation-overlay.visible {
  display: flex;
}

.investigation-card {
  padding: 2.5rem 3rem;
  border-radius: var(--radius-xl);
  text-align: center;
  animation: cardReveal 0.5s var(--ease-bounce);
  box-shadow: var(--shadow-lg);
}

.investigation-card.liberal {
  background: linear-gradient(145deg, #1a3a5c, #0f2640);
  border: 2px solid var(--liberal-primary);
}

.investigation-card.fascist {
  background: linear-gradient(145deg, #3a1520, #1f0a10);
  border: 2px solid var(--fascist-primary);
}

.investigation-card h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.investigation-target {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
}

.investigation-party {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  margin-bottom: 1rem;
}

.investigation-party.liberal {
  background: var(--liberal-bg);
  border: 1px solid rgba(78, 168, 222, 0.3);
}

.investigation-party.fascist {
  background: var(--fascist-bg);
  border: 1px solid rgba(230, 57, 70, 0.3);
}

.investigation-icon { font-size: 1.5rem; }

.investigation-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
}

.investigation-party.liberal .investigation-label { color: var(--liberal-primary); }
.investigation-party.fascist .investigation-label { color: var(--fascist-primary); }

.investigation-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* -----------------------------------------------------------------------
   Policy Peek Overlay
   ----------------------------------------------------------------------- */
.policy-peek-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.policy-peek-overlay.visible {
  display: flex;
}

.policy-peek-container {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 2rem 2.5rem;
  text-align: center;
  animation: cardReveal 0.4s var(--ease-bounce);
  box-shadow: var(--shadow-lg);
}

.policy-peek-container h3 {
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.peek-cards {
  margin-bottom: 1.5rem;
}

.peek-card {
  width: 100px;
  height: 140px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: cardReveal 0.5s var(--ease-bounce) both;
}

.liberal-peek {
  background: linear-gradient(145deg, var(--liberal-dark), var(--liberal-primary));
  border: 2px solid var(--liberal-primary);
  box-shadow: 0 4px 20px rgba(78, 168, 222, 0.2);
}

.fascist-peek {
  background: linear-gradient(145deg, var(--fascist-dark), var(--fascist-primary));
  border: 2px solid var(--fascist-primary);
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.2);
}

.peek-icon { font-size: 2rem; color: #fff; }
.peek-label { font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.85); text-transform: uppercase; letter-spacing: 0.1em; }
.peek-position { font-size: 0.65rem; color: rgba(255,255,255,0.5); }

.peek-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

/* -----------------------------------------------------------------------
   Game Over Overlay
   ----------------------------------------------------------------------- */
#game-over-overlay {
  z-index: 1003;
}

.game-over-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2.5rem 3rem;
  max-width: 600px;
  width: 90%;
  text-align: center;
  animation: cardReveal 0.6s var(--ease-bounce);
  box-shadow: var(--shadow-lg);
}

.game-over-container.liberal-win {
  border: 2px solid var(--liberal-primary);
  box-shadow: 0 0 60px rgba(78, 168, 222, 0.2);
}

.game-over-container.fascist-win {
  border: 2px solid var(--fascist-primary);
  box-shadow: 0 0 60px rgba(230, 57, 70, 0.2);
}

.game-over-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.liberal-win .game-over-title { color: var(--liberal-primary); }
.fascist-win .game-over-title { color: var(--fascist-primary); }

.game-over-reason {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.role-reveal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.role-reveal-card {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.role-reveal-card.liberal {
  background: var(--liberal-bg);
  border: 1px solid rgba(78, 168, 222, 0.2);
}

.role-reveal-card.fascist {
  background: var(--fascist-bg);
  border: 1px solid rgba(230, 57, 70, 0.2);
}

.role-reveal-card.hitler {
  background: rgba(139, 0, 0, 0.15);
  border: 1px solid rgba(139, 0, 0, 0.3);
}

.reveal-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.reveal-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.reveal-party {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-new-game {
  margin-top: 0;
}

/* -----------------------------------------------------------------------
   Pause Overlay
   ----------------------------------------------------------------------- */
#pause-overlay {
  z-index: 999;
  background: rgba(0, 0, 0, 0.7);
}

#pause-message {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--warning);
  animation: pulse 2s infinite;
}

/* -----------------------------------------------------------------------
   Notifications
   ----------------------------------------------------------------------- */
.notification-area {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.notification {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  transform: translateX(120%);
  transition: transform 0.4s var(--ease-out), opacity 0.4s;
  pointer-events: auto;
  max-width: 350px;
  border: 1px solid;
}

.notification.show {
  transform: translateX(0);
}

.notification-info {
  background: rgba(78, 168, 222, 0.15);
  color: var(--liberal-light);
  border-color: rgba(78, 168, 222, 0.2);
}

.notification-success {
  background: rgba(46, 196, 182, 0.15);
  color: var(--success);
  border-color: rgba(46, 196, 182, 0.2);
}

.notification-warning {
  background: rgba(244, 162, 97, 0.15);
  color: var(--warning);
  border-color: rgba(244, 162, 97, 0.2);
}

.notification-error {
  background: rgba(230, 57, 70, 0.15);
  color: var(--fascist-light);
  border-color: rgba(230, 57, 70, 0.2);
}

/* -----------------------------------------------------------------------
   Secret Role Peek (in-game hoverable)
   ----------------------------------------------------------------------- */
.secret-role-peek {
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.secret-role-peek .peek-hidden {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: opacity 0.3s;
}

.secret-role-peek .peek-revealed {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s;
  padding: 0.5rem;
}

.secret-role-peek:hover .peek-hidden,
.secret-role-peek:active .peek-hidden {
  opacity: 0;
}

.secret-role-peek:hover .peek-revealed,
.secret-role-peek:active .peek-revealed {
  opacity: 1;
}

.secret-role-peek.liberal {
  border-color: rgba(78, 168, 222, 0.2);
}
.secret-role-peek.liberal:hover {
  background: var(--liberal-bg);
  border-color: var(--liberal-primary);
}

.secret-role-peek.fascist {
  border-color: rgba(230, 57, 70, 0.2);
}
.secret-role-peek.fascist:hover {
  background: var(--fascist-bg);
  border-color: var(--fascist-primary);
}

.secret-role-peek.hitler {
  border-color: rgba(139, 0, 0, 0.2);
}
.secret-role-peek.hitler:hover {
  background: rgba(139, 0, 0, 0.15);
  border-color: #8b0000;
}

.peek-role-icon { font-size: 1.1rem; }
.peek-role-name { font-weight: 600; font-size: 0.8rem; }
.peek-party-name { font-size: 0.7rem; color: var(--text-muted); }

/* -----------------------------------------------------------------------
   Responsive (basic mobile fallback)
   ----------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .game-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto auto;
  }

  .game-sidebar {
    grid-column: 1;
    grid-row: 4;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    max-height: 250px;
  }

  .lobby-body {
    grid-template-columns: 1fr;
  }

  .policy-slot {
    width: 55px;
    height: 75px;
  }

  .player-card {
    min-width: 90px;
  }
}

@media (max-width: 600px) {
  .menu-logo h1 {
    font-size: 2rem;
  }

  .vote-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }

  .card-row {
    gap: 0.5rem;
  }

  .policy-card-btn {
    width: 85px;
    height: 120px;
  }

  .role-reveal-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

/* ============================================================================
   Secret Hitler Visual Assets Integration Styles
   ============================================================================ */

/* Deck piles styles */
.deck-piles-container {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  width: 100%;
}

.deck-pile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.deck-stack {
  position: relative;
  width: 110px;
  height: 160px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.draw-stack {
  background-image: url('../assets/board-draw.png');
}

.discard-stack {
  background-image: url('../assets/board-discard.png');
}

.deck-card-visual {
  position: absolute;
  width: 90px;
  height: 130px;
  left: 10px;
  background-image: url('../assets/board-policy.png');
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
  transition: all 0.3s ease;
}

.pile-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-secondary);
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* 3D Folder & Role Reveal (Book Opening Hinge) */
.role-folder-container {
  perspective: 1500px;
  width: 345px;
  height: 419px;
  margin: 0 auto;
}

.role-folder {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

.folder-cover {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  transform-origin: left center;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.3, 1);
  transform-style: preserve-3d;
  z-index: 3;
  cursor: pointer;
}

.role-folder .folder-cover {
  width: 298px;
}

.policy-folder .folder-cover {
  width: 298px;
}

/* Open folder cover: swing to the left Y-axis */
.role-folder.open .folder-cover {
  transform: rotateY(-140deg);
}

.cover-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.cover-face-front {
  border: 3px solid var(--gold-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.role-folder .cover-face-front,
.role-folder .cover-face-back,
.policy-folder .cover-face-front,
.policy-folder .cover-face-back {
  padding: 0;
  border: none;
}

.role-folder .cover-face-front {
  background: #372e25;
}

.policy-folder .cover-face-front {
  background: #372e25;
}

.folder-cover-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  margin-bottom: 0;
  display: block;
  transition: transform 0.3s ease;
}

.cover-face-front:hover .folder-cover-img {
  transform: scale(1.04);
}

.folder-prompt {
  position: absolute;
  bottom: 2rem;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--gold);
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: pulse 2s infinite;
  z-index: 5;
}

.cover-face-back {
  transform: rotateY(180deg);
  border: 3px solid var(--gold-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.role-folder .cover-face-back {
  background: #2f271f;
}

.policy-folder .cover-face-back {
  background: #2f271f;
  padding: 0;
}

.inside-left-content {
  text-align: center;
  color: var(--gold-dark);
}

.inside-left-content h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.seal-icon {
  font-size: 4.5rem;
  opacity: 0.35;
}

.folder-inside {
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  border: 3px solid var(--gold);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1;
}

.folder-inside.role-liberal {
  border-color: var(--liberal-primary);
  background: linear-gradient(145deg, #1a3a5c, var(--liberal-dark));
}

.folder-inside.role-fascist {
  border-color: var(--fascist-primary);
  background: linear-gradient(145deg, #3a1520, var(--fascist-dark));
}

.folder-inside.role-hitler {
  border-color: #8b0000;
  background: linear-gradient(145deg, #1a0a0a, #3a1010);
}

.role-folder .folder-inside {
  border: none;
}

.role-folder .folder-inside.role-liberal,
.role-folder .folder-inside.role-fascist,
.role-folder .folder-inside.role-hitler {
  background: url('../assets/role-folder-back.png') no-repeat;
}

/* Page transitions within folder */
.folder-page {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(10px);
  color: var(--text-primary);
}

.folder-page.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.folder-page.cards-view {
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
}

.folder-page.details-view {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.role-folder .folder-page,
.policy-folder .folder-page {
  padding: 1.25rem 1.5rem;
}

/* Horizontally center all contents inside the role reveal folder page frame */
.role-folder .folder-page {
  align-items: center;
}

.role-folder .details-scroll-content {
  align-items: center;
  width: 100%;
}

.role-folder .role-card-desc {
  width: 100%;
  text-align: center;
}

.role-folder .team-section {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.role-folder .team-section ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  margin: 0;
  width: 100%;
}

.role-folder .team-section li,
.role-folder .team-section p {
  text-align: center;
  width: 100%;
}

.details-scroll-content {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 0.75rem;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.role-reveal-cards-row {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin-bottom: 0;
  width: 100%;
}

.role-portrait-wrapper, .party-card-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.reveal-card-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}

.card-label-under {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--gold);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  text-transform: uppercase;
}

.view-details-prompt {
  font-size: 0.8rem;
  color: #4a3621;
  font-weight: bold;
  font-style: italic;
  text-align: center;
  margin-top: 0.25rem;
  animation: pulse 2.5s infinite;
  width: 100%;
}

.role-card-desc {
  font-size: 0.85rem;
  line-height: 1.45;
  background: rgba(0,0,0,0.4);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  color: #f1ebd9;
}

.details-buttons {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  justify-content: center;
}

.details-buttons .btn {
  flex: 1;
  max-width: 110px;
  font-size: 0.85rem;
  padding: 0.5rem 0.6rem;
}

/* Player SVGs and Portraits */
.player-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Vote ballots */
.vote-ballot-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  margin-left: 0.75rem;
}

.btn-ja-ballot, .btn-nein-ballot {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease;
  position: relative;
  top: 0;
}

.btn-ja-ballot:hover, .btn-nein-ballot:hover {
  transform: scale(1.06);
}

.btn-ja-ballot:active, .btn-nein-ballot:active {
  top: 4px;
}

.vote-button-card {
  height: 140px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
  transition: box-shadow 0.2s ease;
}

.btn-ja-ballot:hover .vote-button-card {
  box-shadow: 0 8px 16px rgba(46, 196, 107, 0.4);
}

.btn-nein-ballot:hover .vote-button-card {
  box-shadow: 0 8px 16px rgba(230, 57, 70, 0.4);
}

.vote-button-label {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-primary);
  text-transform: uppercase;
}

/* Policy Card Button Images */
.policy-card-img {
  width: 110px;
  height: 160px;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 15px rgba(0,0,0,0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.policy-card-btn:hover .policy-card-img {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

/* Policy Peek */
.peek-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.peek-card-img {
  width: 90px;
  height: 130px;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

/* Victory banners */
.victory-header-img {
  display: block;
  margin: 0 auto 1rem;
  width: 100%;
  max-width: 440px;
  height: auto;
}

.victory-footer-img {
  display: block;
  margin: 1.25rem auto 1.5rem;
  width: 100%;
  max-width: 320px;
  height: auto;
}

.game-over-buttons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-top: 1.5rem;
}

/* Loyalty Investigation results */
.investigation-party-card-wrapper {
  margin: 1.25rem 0;
  display: flex;
  justify-content: center;
}

.investigation-party-img {
  width: 130px;
  height: 195px;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

/* ============================================================================
   Avatar Picker, Confirmation Modal, and Popup Voting Styles
   ============================================================================ */

/* Avatar Picker Carousel */
.menu-avatar-picker {
  margin: 1.5rem 0;
  text-align: center;
}

.menu-avatar-picker h3 {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.avatar-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.btn-arrow {
  background: var(--bg-glass);
  border: 1px solid var(--border-glow);
  color: var(--gold);
  font-size: 1.2rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-arrow:hover {
  background: var(--bg-glass-hover);
  border-color: var(--gold);
}

.avatar-selected-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(255,255,255,0.08));
  border: 3px solid var(--gold);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.selected-avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lobby Avatar Preview */
.lobby-player-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-glow);
  object-fit: cover;
  margin-right: 0.25rem;
  background: var(--bg-secondary);
}

/* Eligible Nominees clickable styles */
.player-card.eligible-nominee {
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.player-card.eligible-nominee:hover {
  border-color: var(--gold);
  box-shadow: 0 0 14px var(--gold-bg);
  transform: translateY(-4px) scale(1.02);
}

/* Confirmation overlay modal */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  animation: fadeIn 0.2s ease-out;
}

.confirm-modal {
  background: var(--bg-card);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: cardReveal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-message {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.confirm-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Voting Ballot Popup Overlay */
#voting-ballot-overlay {
  z-index: 1005;
}

.voting-ballot-modal {
  background: var(--bg-card);
  border: 2px solid var(--gold);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: cardReveal 0.4s var(--ease-bounce);
}

/* ============================================================================
   Secret Hitler Refactored Game Layout and Animations
   ============================================================================ */

/* Main layout fit adjustments */
.game-layout {
  overflow: hidden;
}

.player-cards-row-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 0.8rem;
  margin-bottom: 0rem;
}

.player-cards-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

/* Player Card top label positioning */
.player-card {
  padding-top: 0 !important;
  overflow: hidden;
}

.player-card-header-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  text-align: center;
  width: 100%;
  color: var(--text-muted);
  min-height: 1.2rem;
  margin-bottom: 0.4rem;
}

.player-card-header-label.president {
  background: var(--gold-dark);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 -2px 6px var(--gold-bg);
}

.player-card-header-label.chancellor {
  background: var(--liberal-dark);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 -2px 6px var(--liberal-glow);
}

.player-card-header-label.nominated {
  background: var(--warning);
  color: #000;
  font-weight: bold;
  animation: nominatePulse 1.5s infinite;
}

/* Inline vote result container and keyframes */
.player-card-vote-result {
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
  height: 74px;
}

.player-card-vote-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  animation: voteIconReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.player-card-vote-icon.static {
  animation: none;
}

/* Local player card secret role styling */
.player-card-my-role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  text-transform: uppercase;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  width: 90%;
}

.my-role-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* Colored stats number values */
#stat-liberal-count, #stat-unenacted-liberal {
  color: #4ea8de !important; /* Liberal Blue */
}

#stat-fascist-count, #stat-hitler-count, #stat-unenacted-fascist {
  color: #e63946 !important; /* Fascist/Hitler Red */
}

@keyframes voteIconReveal {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-30deg);
  }
  70% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Center play area container */
.center-play-area {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3.5rem;
  margin: 0.15rem 0;
  width: 100%;
  height: auto;
}

.center-controls-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.game-stats-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  min-width: 220px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.stats-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.stat-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.stat-value {
  font-weight: 700;
  font-size: 1rem;
}

.btn-end-term {
  padding: 0.5rem 1.5rem;
  font-size: 1.05rem;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.phase-banner-overlay {
  position: absolute;
  top: 0.2rem;
  left: 0;
  width: 100%;
  z-index: 1500;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.phase-banner-overlay.fullscreen-banner {
  position: fixed;
  top: 1.5rem;
  left: 0;
  width: 100vw;
  height: auto;
  z-index: 1500;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.phase-banner-overlay.show {
  opacity: 1;
}

.phase-banner-text {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 0 0 40px var(--gold-dark);
  letter-spacing: 0.1em;
  animation: bannerSplash 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes bannerSplash {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  15% {
    opacity: 1;
    transform: scale(1.05);
  }
  25% {
    transform: scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

/* Policy Enacted 3D Folder Animation Overlay */
.policy-folder-container {
  perspective: 1500px;
  width: 345px;
  height: 419px;
  margin: 0 auto;
}

.policy-folder {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

.policy-folder.open .folder-cover {
  transform: rotateY(-140deg);
}

.policy-folder .folder-inside {
  border: none;
  background: url('../assets/policy-folder-back.png') no-repeat;
}

.policy-card-inside-img {
  width: auto;
  height: 80%;
  margin: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 16px rgba(0,0,0,0.6);
  transform: scale(0.9);
  transition: transform 0.5s ease 0.4s;
  display: block;
}

.policy-folder.open .policy-card-inside-img {
  transform: scale(1.05);
}

/* Avatar Picker Modal Popup */
.avatar-modal-container {
  max-width: 500px;
  width: 90%;
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--gold);
}

.avatar-modal-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.avatar-option {
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 50%;
  padding: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-option img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-option:hover:not(.taken):not(.selected) {
  transform: scale(1.1);
  border-color: var(--border-glow);
}

.avatar-option.selected {
  border-color: var(--gold);
  background: rgba(244, 162, 97, 0.2);
}

.avatar-option.taken {
  opacity: 0.15;
  filter: grayscale(100%);
  cursor: not-allowed;
  pointer-events: none;
}

.avatar-modal-footer {
  display: flex;
  justify-content: center;
}


