/* TheOddOne - Comic Style Design */
/* Farbpalette: #C42000 (Rot), #000000 (Schwarz), #FFFFFF (Weiß), #A6A6A6 (Hellgrau), #616161 (Dunkelgrau) */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: #FFFFFF;
  color: #000000;
  line-height: 1.4;
  min-height: 100vh;
  font-weight: 500;
  letter-spacing: -0.01em;
  position: relative;
  overflow-x: hidden;
}

/* Comic Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    url('/assets/bg.png') center/cover no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 248, 248, 0.95) 100%);
  z-index: -1;
  pointer-events: none;
  opacity: 0.7;
}

/* ========== CONTAINER - KOMPAKTER ========== */
.container, .game-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Game Container - SCROLLEN WIEDER ERLAUBT */
.game-container {
  padding: 16px;
  height: 100vh;
  overflow: auto !important;
  overflow-x: hidden;
}

/* ========== HEADER & LOGO - KOMPAKTER ========== */
.header, .game-header {
  text-align: center;
  margin-bottom: 20px;
}

.game-header {
  padding-top: 16px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.logo {
  width: 160px !important;
  height: 160px !important;
  margin: 0 auto 12px;
  background: url('/assets/logo.png') center/contain no-repeat;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05) rotate(-2deg);
}

.game-header .logo {
  width: 140px !important;
  height: 140px !important;
  margin-bottom: 8px;
}

/* ========== TYPOGRAPHY ========== */
h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #000000;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  text-shadow: 2px 2px 0px #C42000;
  display: none;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  text-shadow: 1px 1px 0px rgba(196, 32, 0, 0.3);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.subtitle {
  text-align: center;
  color: #616161;
  font-size: 1rem;
  margin-bottom: 32px;
  font-weight: 500;
  text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
}

/* ========== COMIC CARDS ========== */
.card, .option-card, .game-settings, .game-rules, .name-input, .room-info,
.input-area, .voting-area, .imposter-guess-area, .words-history, .game-end {
  background: #FFFFFF;
  border: 4px solid #000000;
  border-radius: 20px;
  padding: 20px;
  margin: 12px 0;
  position: relative;
  box-shadow: 
    6px 6px 0px #000000,
    0 0 0 2px #FFFFFF;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.card:hover, .option-card:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 
    8px 12px 0px #000000,
    0 0 0 2px #FFFFFF,
    0 8px 24px rgba(0, 0, 0, 0.2);
}

.option-card {
  border-color: #C42000;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF8F8 100%);
}

.option-card:hover {
  background: linear-gradient(135deg, #FFF8F8 0%, #FFEBEB 100%);
  box-shadow: 
    8px 12px 0px #C42000,
    0 0 0 2px #FFFFFF,
    0 8px 24px rgba(196, 32, 0, 0.3);
}

/* ========== EXIT BUTTON - COMIC STYLE - VERBESSERT ========== */
.exit-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #FFFFFF;
  color: #000000;
  border: 2px solid #000000 !important;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  z-index: 100;
  box-shadow: 2px 2px 0px #000000 !important;
  transition: all 0.3s ease;
}

.exit-btn:hover {
  transform: translateY(-2px);
  background: #C42000;
  color: #FFFFFF;
  box-shadow: 3px 4px 0px #000000;
}

/* ========== COMIC BUTTONS ========== */
.primary-btn, .start-btn, .play-again-btn, .submit-btn, .guess-btn, .confirm-btn, .join-btn {
  background: linear-gradient(135deg, #C42000 0%, #FF4020 100%) !important;
  color: #FFFFFF !important;
  border: 4px solid #000000 !important;
  padding: 16px 24px !important;
  border-radius: 16px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  width: 100% !important;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5) !important;
  box-shadow: 
    4px 4px 0px #000000,
    0 0 0 2px #FFFFFF !important;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  position: relative !important;
  overflow: hidden !important;
}

.primary-btn:hover, .start-btn:hover, .play-again-btn:hover,
.submit-btn:hover, .guess-btn:hover, .confirm-btn:hover, .join-btn:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 
    6px 8px 0px #000000,
    0 0 0 2px #FFFFFF,
    0 8px 24px rgba(196, 32, 0, 0.4) !important;
}

.primary-btn:active, .start-btn:active, .play-again-btn:active,
.submit-btn:active, .guess-btn:active, .confirm-btn:active, .join-btn:active {
  transform: translateY(1px) !important;
  box-shadow: 2px 2px 0px #000000 !important;
}

/* Lobby Buttons - SCHWARZ */
.container .primary-btn {
  background: linear-gradient(135deg, #000000 0%, #333333 100%) !important;
}

.container .primary-btn:hover {
  background: linear-gradient(135deg, #333333 0%, #000000 100%) !important;
}

.secondary-btn, .copy-btn, .vote-btn {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 3px solid #000000 !important;
  padding: 12px 20px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  width: 100% !important;
  box-shadow: 3px 3px 0px #000000 !important;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
  text-transform: uppercase !important;
}

.secondary-btn:hover, .copy-btn:hover, .vote-btn:hover {
  transform: translateY(-2px) !important;
  background: #000000 !important;
  color: #FFFFFF !important;
  box-shadow: 4px 6px 0px #616161 !important;
}

.vote-btn.selected {
  background: #C42000 !important;
  color: #FFFFFF !important;
  box-shadow: 3px 3px 0px #000000 !important;
}

.skip-btn, .back-btn, .settings-btn {
  background: #A6A6A6 !important;
  color: #000000 !important;
  border: 3px solid #000000 !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 2px 2px 0px #000000 !important;
  transition: all 0.3s ease !important;
  text-transform: uppercase !important;
}

.skip-btn:hover, .back-btn:hover, .settings-btn:hover {
  transform: translateY(-1px) !important;
  background: #616161 !important;
  color: #FFFFFF !important;
}

/* SETTINGS BUTTON - VERBESSERT */
.settings-btn {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 2px 2px 0px #000000 !important;
  transition: all 0.3s ease !important;
  text-transform: uppercase !important;
  display: block !important;
  margin: 12px 0 0 0 !important;
  width: 100% !important;
  min-width: auto !important;
}

.settings-btn:hover {
  background: #000000 !important;
  color: #FFFFFF !important;
  border-color: #000000 !important;
  transform: translateY(-1px) !important;
  box-shadow: 3px 3px 0px #616161 !important;
}

/* NEXT PLAYER BUTTON - COMIC STYLE */
.next-player-btn {
  background: linear-gradient(135deg, #000000 0%, #333333 100%) !important;
  color: #FFFFFF !important;
  border: 4px solid #C42000 !important;
  padding: 20px 32px !important;
  border-radius: 16px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  width: 100% !important;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8) !important;
  box-shadow: 
    4px 4px 0px #C42000,
    0 0 0 2px #FFFFFF !important;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  position: relative !important;
  animation: pulse-ready 2s infinite !important;
}

.next-player-btn:hover {
  transform: translateY(-4px) scale(1.03) !important;
  box-shadow: 
    6px 8px 0px #C42000,
    0 0 0 2px #FFFFFF,
    0 12px 32px rgba(196, 32, 0, 0.5) !important;
}

.next-player-btn:disabled {
  background: #A6A6A6 !important;
  border-color: #616161 !important;
  cursor: not-allowed !important;
  animation: none !important;
  transform: none !important;
  box-shadow: 2px 2px 0px #616161 !important;
}

/* ========== INPUT FIELDS - COMIC STYLE ========== */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="url"], input[type="tel"],
textarea, select {
  width: 100% !important;
  padding: 12px 16px !important;
  border: 3px solid #000000 !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  color: #000000 !important;
  background: #FFFFFF !important;
  transition: all 0.3s ease !important;
  margin-bottom: 12px !important;
  font-weight: 500 !important;
  box-shadow: 2px 2px 0px #A6A6A6 !important;
  font-family: inherit !important;
}

input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: #C42000 !important;
  box-shadow: 
    3px 3px 0px #C42000,
    0 0 0 3px rgba(196, 32, 0, 0.2) !important;
  transform: translateY(-1px) !important;
}

input::placeholder, textarea::placeholder {
  color: #A6A6A6 !important;
  font-weight: 500 !important;
}

/* ========== LAYOUTS - KOMPAKTER ========== */
.game-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.game-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========== GAME STATUS - VERSTECKT ========== */
.game-status-header {
  display: none !important;
}

.game-status-left, .game-status-right {
  background: #FFFFFF;
  border: 3px solid #000000;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  box-shadow: 3px 3px 0px #A6A6A6;
}

.phase-indicator {
  font-size: 16px;
  font-weight: 700;
  color: #C42000;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.current-player {
  font-size: 14px;
  color: #000000;
  font-weight: 600;
  margin: 4px 0;
}

.round-counter {
  color: #616161;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

/* ========== GAME HEADER - SPIELPHASE INTEGRIERT ========== */
.game-header .room-info {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  font-size: 12px;
  color: #616161;
  text-align: center;
}

.game-header .room-info span {
  font-weight: 600;
  color: #000000;
  font-size: 12px;
  padding: 6px 8px;
  background: #FFFFFF;
  border: 2px solid #000000;
  border-radius: 8px;
  box-shadow: 1px 1px 0px #A6A6A6;
}

/* ========== WORD DISPLAY - VIEL CLEANER & SCHMALER ========== */
.word-display {
  text-align: center;
  margin: 16px 0;
  flex-shrink: 0;
}

.role-card {
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
  color: #FFFFFF;
  padding: 16px 24px;
  border-radius: 16px;
  border: 4px solid #C42000;
  box-shadow: 
    4px 4px 0px #C42000,
    0 0 0 2px #FFFFFF;
  transition: transform 0.3s ease;
  position: relative;
}

.role-card:hover {
  transform: translateY(-2px) rotate(-1deg);
}

.role-card.imposter {
  background: linear-gradient(135deg, #C42000 0%, #8B0000 100%);
  border-color: #000000;
  box-shadow: 
    4px 4px 0px #000000,
    0 0 0 2px #FFFFFF;
}

#roleTitle {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
  color: #FFFFFF !important;
}

.word-text {
  font-size: 24px;
  font-weight: 800;
  margin: 12px 0;
  letter-spacing: -0.02em;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.role-description {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 8px;
  line-height: 1.4;
  white-space: pre-line;
}

/* ========== FLOATING IMPOSTER GUESS - VERBESSERT ========== */
.floating-imposter-guess {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 280px;
  background: linear-gradient(135deg, #C42000 0%, #8B0000 100%) !important;
  border: 4px solid #000000;
  border-radius: 16px;
  z-index: 1000;
  box-shadow: 
    4px 4px 0px #000000,
    0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
}

.floating-imposter-guess.minimized {
  height: 60px;
  width: 200px;
}

.floating-imposter-guess.minimized .floating-content > *:not(.minimize-btn) {
  display: none;
}

.floating-content {
  padding: 16px;
  position: relative;
}

.floating-content h4 {
  margin: 0 0 12px 0;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
}

.floating-content input {
  width: 100% !important;
  padding: 8px 12px !important;
  border: 3px solid #000000 !important;
  border-radius: 8px !important;
  margin-bottom: 12px !important;
  background: #FFFFFF !important;
  color: #000000 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  box-shadow: 2px 2px 0px #000000 !important;
}

.floating-content .guess-btn {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  padding: 8px 16px !important;
  font-size: 12px !important;
  width: auto !important;
  min-width: 80px !important;
  margin-right: 8px !important;
  border-radius: 8px !important;
  box-shadow: 2px 2px 0px #000000 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

.floating-content .guess-btn:hover {
  background: #000000 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
  box-shadow: 3px 3px 0px #616161 !important;
}

.minimize-btn {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  color: #FFFFFF !important;
  border: 2px solid #000000 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  width: auto !important;
  box-shadow: 1px 1px 0px #000000 !important;
}

.minimize-btn:hover {
  background: #000000 !important;
}

/* ========== PLAYER LIST - COMIC STYLE - VERBESSERT ========== */
.players-section {
  margin: 16px 0;
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
}

#playerList {
  list-style: none;
  padding: 0;
  margin-bottom: 8px;
}

#playerList li {
  background: #FFFFFF;
  border: 2px solid #000000 !important;
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 2px 2px 0px #A6A6A6 !important;
  transition: all 0.3s ease !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#playerList li:hover {
  transform: translateX(2px) !important;
  box-shadow: 3px 3px 0px #A6A6A6;
}

/* HOST - NUR SCHILD, KEIN ROTES HINTERGRUND */
#playerList li:first-child {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  box-shadow: 2px 2px 0px #A6A6A6 !important;
  font-weight: 600 !important;
}

#playerList li:first-child::after {
  content: "HOST";
  font-size: 10px;
  background: #C42000 !important;
  color: #FFFFFF !important;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid #000000;
}

/* CURRENT PLAYER - NUR ROTE UMRANDUNG */
.current-player {
  border: 2px solid #C42000 !important;
  background: #FFFFFF !important;
  animation: none !important;
  box-shadow: 2px 2px 0px #C42000 !important;
}

/* ========== BUGFIXES ========== */

/* BUG 1: Grauer Balken beim Hover - ALLE player-count Varianten verstecken */
.player-count, 
.player-count-alternative,
p[style*="color: #C42000"],
p[style*="color: #000000"] {
  display: none !important;
}

/* BUG 2: Leere Game Controls verstecken wenn kein Host */
.game-controls:empty {
  display: none !important;
}

.game-controls .card:empty {
  display: none !important;
}

/* ========== ROOM INFO - COMIC ========== */
.room-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFFFFF;
  border: 3px solid #000000;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 3px 3px 0px #A6A6A6;
}

.room-info p {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.room-info button {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 3px solid #C42000 !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  width: auto !important;
  min-width: 100px !important;
  box-shadow: 2px 2px 0px #C42000 !important;
  text-transform: uppercase !important;
}

.room-info button:hover {
  transform: translateY(-1px) !important;
  background: #C42000 !important;
  border-color: #000000 !important;
  box-shadow: 3px 4px 0px #000000 !important;
}

/* ========== SETTINGS - KOMPAKT ========== */
.settings-compact {
  display: grid;
  gap: 10px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 2px solid #000000;
  border-radius: 8px;
  box-shadow: 1px 1px 0px #A6A6A6;
}

.setting-row label {
  font-size: 13px;
  font-weight: 600;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-row select {
  width: 120px !important;
  padding: 4px 8px !important;
  border: 2px solid #000000 !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  background: #FFFFFF !important;
  margin: 0 !important;
  font-weight: 600 !important;
  box-shadow: 1px 1px 0px #A6A6A6 !important;
}

.setting-row input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  accent-color: #C42000 !important;
  margin: 0 !important;
}

/* ========== PLAYERS GRID - GAME - VERBESSERT ========== */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.player-card {
  background: #FFFFFF;
  border: 2px solid #000000 !important;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  box-shadow: 2px 2px 0px #A6A6A6 !important;
  transition: none !important;
  pointer-events: none;
}

.player-card:hover {
  transform: none !important;
  box-shadow: 2px 2px 0px #A6A6A6 !important;
}

.player-card.current {
  border: 2px solid #C42000 !important;
  background: #FFFFFF !important;
  animation: none !important;
  box-shadow: 2px 2px 0px #C42000 !important;
}

.player-card.self {
  border: 2px solid #000000 !important;
  background: #FFFFFF !important;
  box-shadow: 2px 2px 0px #000000 !important;
}

.player-name {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 13px;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.player-word {
  font-style: italic;
  color: #616161;
  font-size: 11px;
  min-height: 14px;
  font-weight: 600;
}

/* ========== VOICE AREAS - KOMPAKT ========== */
.voice-game-area, .voice-waiting-area {
  background: #FFFFFF;
  border: 3px solid #C42000;
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 3px 3px 0px #C42000;
  text-align: center;
  flex-shrink: 0;
}

.voice-game-area h3 {
  margin-bottom: 12px;
  color: #C42000;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.voice-instructions {
  background: linear-gradient(135deg, #FFF8F8, #FFEBEB);
  border: 2px solid #C42000;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  text-align: center;
}

.voice-instructions h4 {
  color: #C42000;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.voice-instructions p {
  color: #000000;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  font-weight: 600;
}

/* ========== VOTING AREAS - KOMPAKT ========== */
.voting-area, .imposter-guess-area {
  background: #FFFFFF;
  border: 3px solid #000000;
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 3px 3px 0px #A6A6A6;
  flex-shrink: 0;
}

.voting-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.voting-controls {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ========== WAITING AREA ========== */
.waiting-area {
  text-align: center;
  padding: 24px 16px;
  background: #FFFFFF;
  border: 3px solid #A6A6A6;
  border-radius: 16px;
  margin: 16px 0;
  box-shadow: 3px 3px 0px #A6A6A6;
  flex-shrink: 0;
}

.spinner {
  border: 3px solid #A6A6A6;
  border-top: 3px solid #C42000;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

.waiting-area p {
  font-size: 14px;
  color: #616161;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ========== GAME END ========== */
.game-end {
  background: #FFFFFF;
  border: 4px solid #000000;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  box-shadow: 6px 6px 0px #000000;
  flex-shrink: 0;
}

.game-end h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.end-game-buttons {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== RULES SECTION - KOMPAKT ========== */
.rules-section {
  margin-top: auto;
  flex-shrink: 0;
}

.rules-toggle {
  background: transparent;
  border: 2px solid #000000;
  color: #000000;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  box-shadow: 2px 2px 0px #A6A6A6;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rules-toggle:hover {
  transform: translateY(-1px);
  background: #000000;
  color: #FFFFFF;
  box-shadow: 3px 4px 0px #A6A6A6;
}

.rules-content {
  display: none;
  background: #FFFFFF;
  border: 3px solid #000000;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  box-shadow: 2px 2px 0px #A6A6A6;
}

.rules-content.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

.rules-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rules-content li {
  font-size: 11px;
  color: #000000;
  margin: 6px 0;
  padding-left: 12px;
  position: relative;
  line-height: 1.3;
  font-weight: 600;
}

.rules-content li::before {
  content: "•";
  color: #C42000;
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 14px;
}

/* ========== GAME RULES - KOMPAKT ========== */
.game-rules {
  background: #FFFFFF;
  border: 3px solid #000000;
  border-left: 6px solid #C42000;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 3px 3px 0px #A6A6A6;
}

.game-rules h3 {
  text-align: center;
  color: #C42000;
  margin-bottom: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-rules ul {
  max-width: 600px;
  margin: 0 auto;
  padding-left: 16px;
}

.game-rules li {
  margin: 10px 0;
  color: #000000;
  line-height: 1.4;
  font-weight: 500;
  font-size: 13px;
}

/* ========== IMPOSTER VOTING OPTIONS ========== */
.imposter-voting {
  background: linear-gradient(135deg, #FFF8F8, #FFEBEB);
  border: 3px solid #C42000;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 3px 3px 0px #C42000;
  margin: 12px 0;
}

.imposter-voting h3 {
  margin-top: 0;
  color: #C42000;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.imposter-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0;
}

.imposter-actions button {
  flex: 1;
  min-width: 80px;
  max-width: 120px;
}

/* ========== FOOTER LINKS ========== */
.footer-links {
  text-align: center;
  margin-top: 20px;
  padding: 12px 0;
  border-top: 2px solid #A6A6A6;
  flex-shrink: 0;
}

.footer-links p {
  font-size: 11px;
  color: #616161;
  margin: 0;
  font-weight: 600;
}

.footer-links a {
  color: #616161;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 600;
}

.footer-links a:hover {
  color: #C42000;
}

/* ========== TOAST NOTIFICATIONS - COMIC ========== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 12px;
  color: #FFFFFF;
  font-weight: 700;
  max-width: 300px;
  word-wrap: break-word;
  border: 3px solid #000000;
  box-shadow: 3px 3px 0px #000000;
  animation: slideInRight 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 10000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.toast.error {
  background: linear-gradient(135deg, #C42000 0%, #8B0000 100%);
}

.toast.success {
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

.toast.info {
  background: linear-gradient(135deg, #616161 0%, #4D4D4D 100%);
}

/* ========== ANIMATIONS ========== */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes slideInRight {
  from { 
    transform: translateX(100%) rotate(5deg); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0) rotate(0deg); 
    opacity: 1; 
  }
}

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

@keyframes comic-pulse {
  0%, 100% {
    box-shadow: 2px 2px 0px #C42000;
    transform: scale(1);
  }
  50% {
    box-shadow: 4px 4px 0px #C42000;
    transform: scale(1.02);
  }
}

@keyframes pulse-ready {
  0%, 100% {
    box-shadow: 
      4px 4px 0px #C42000,
      0 0 0 2px #FFFFFF;
  }
  50% {
    box-shadow: 
      6px 6px 0px #C42000,
      0 0 0 2px #FFFFFF,
      0 0 20px rgba(196, 32, 0, 0.5);
  }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
  .container, .game-container {
    padding: 16px 12px;
  }
  
  .game-container {
    height: auto !important;
    min-height: 100vh;
    overflow: auto !important;
  }
  
  .game-header {
    padding-top: 40px;
  }
  
  .exit-btn {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 12px;
    display: inline-block;
    align-self: flex-start;
  }
  
  .logo {
    width: 80px;
    height: 80px;
  }
  
  .game-header .logo {
    width: 60px;
    height: 60px;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .game-options {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .game-status-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .game-header .room-info {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .room-info {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .room-info button {
    width: 100% !important;
  }
  
  .players-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    max-height: 150px;
  }
  
  .players-section {
    max-height: 250px;
  }
  
  .voting-buttons {
    grid-template-columns: 1fr 1fr;
  }
  
  .floating-imposter-guess {
    width: calc(100vw - 24px) !important;
    right: 12px !important;
    left: 12px !important;
    bottom: 12px !important;
  }
  
  .floating-imposter-guess.minimized {
    width: 160px !important;
    right: 12px !important;
    left: auto !important;
  }
  
  .end-game-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .voting-controls {
    flex-direction: column;
    gap: 10px;
  }
  
  .imposter-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .imposter-actions button {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .container, .game-container {
    padding: 12px 8px;
    height: auto !important;
    overflow: auto !important;
  }
  
  .word-text {
    font-size: 20px;
  }
  
  .role-card {
    padding: 12px 16px;
  }
  
  .players-grid {
    grid-template-columns: 1fr;
    max-height: 120px;
  }
  
  .players-section {
    max-height: 200px;
  }
  
  .voting-buttons {
    grid-template-columns: 1fr;
  }
  
  .card, .option-card, .game-settings, .game-rules, .name-input, .room-info,
  .voting-area, .imposter-guess-area, .words-history, .game-end {
    padding: 16px;
    margin: 8px 0;
  }
  
  .voice-game-area, .voice-waiting-area {
    padding: 12px;
  }
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.hidden { display: none !important; }
.visible { display: block !important; }

/* ========== FOCUS STATES ========== */
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #C42000;
  outline-offset: 2px;
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F5F5F5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #A6A6A6;
  border-radius: 4px;
  border: 1px solid #000000;
}

::-webkit-scrollbar-thumb:hover {
  background: #616161;
}

/* ========== SELECTION STYLING ========== */
::selection {
  background: rgba(196, 32, 0, 0.3);
  color: #000000;
}

/* Füge dieses CSS zu deiner main.css hinzu: */

/* ========== IMPOSTER LAST CHANCE ========== */
.imposter-last-chance {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease;
}

.last-chance-content {
  background: linear-gradient(135deg, #C42000 0%, #8B0000 100%);
  color: #FFFFFF;
  padding: 40px;
  border-radius: 20px;
  border: 4px solid #000000;
  box-shadow: 
    8px 8px 0px #000000,
    0 0 0 4px #FFFFFF;
  text-align: center;
  max-width: 500px;
  width: 90%;
  position: relative;
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.last-chance-content h2 {
  color: #FFFFFF !important;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.countdown {
  font-size: 4rem;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.8);
  margin: 20px 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  border: 4px solid #FFFFFF;
}

.last-chance-content .input-group {
  margin: 24px 0;
  display: flex;
  gap: 12px;
  flex-direction: column;
}

.last-chance-content input {
  width: 100% !important;
  padding: 16px 20px !important;
  border: 4px solid #000000 !important;
  border-radius: 12px !important;
  font-size: 18px !important;
  color: #000000 !important;
  background: #FFFFFF !important;
  font-weight: 700 !important;
  text-align: center !important;
  box-shadow: 3px 3px 0px #000000 !important;
}

.last-chance-content input:focus {
  outline: none !important;
  border-color: #FFFFFF !important;
  box-shadow: 
    4px 4px 0px #FFFFFF,
    0 0 0 3px rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px) !important;
}

.last-chance-content .guess-btn {
  background: #FFFFFF !important;
  color: #C42000 !important;
  border: 4px solid #000000 !important;
  padding: 16px 32px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  width: 100% !important;
  text-shadow: none !important;
  box-shadow: 
    4px 4px 0px #000000,
    0 0 0 2px #C42000 !important;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
}

.last-chance-content .guess-btn:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 
    6px 8px 0px #000000,
    0 0 0 2px #C42000,
    0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.last-chance-content .guess-btn:disabled {
  background: #A6A6A6 !important;
  color: #616161 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: 2px 2px 0px #616161 !important;
}

.last-chance-content .warning {
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  margin-top: 16px;
  opacity: 0.9;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
}

.last-chance-content p {
  color: #FFFFFF;
  font-weight: 600;
  line-height: 1.4;
  margin: 16px 0;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes bounceIn {
  0% {
    transform: scale(0.3) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) rotate(2deg);
  }
  70% {
    transform: scale(0.9) rotate(-1deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .last-chance-content {
    padding: 24px;
    margin: 20px;
  }
  
  .last-chance-content h2 {
    font-size: 1.5rem;
  }
  
  .countdown {
    font-size: 3rem;
    width: 100px;
    height: 100px;
  }
  
  .last-chance-content .input-group {
    gap: 16px;
  }
}

.players-section {
  margin: 16px 0;
  flex-shrink: 0; /* Wichtig: Nicht schrumpfen lassen */
  height: 200px; /* Fixe Höhe */
  overflow: hidden; /* Kein Scrollen */
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  height: 100%; /* Volle Höhe nutzen */
  overflow: hidden; /* Definitiv kein Scrollen */
  align-content: start; /* Oben ausrichten */
}

.players-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.players-grid.compact .player-card {
  padding: 8px;
  font-size: 12px;
  }


.imposter-last-chance {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease;
}

.last-chance-content {
  background: linear-gradient(135deg, #C42000 0%, #8B0000 100%);
  color: #FFFFFF;
  padding: 40px;
  border-radius: 20px;
  border: 4px solid #000000;
  box-shadow: 
    8px 8px 0px #000000,
    0 0 0 4px #FFFFFF;
  text-align: center;
  max-width: 500px;
  width: 90%;
  position: relative;
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.last-chance-content h2 {
  color: #FFFFFF !important;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.countdown {
  font-size: 4rem;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.8);
  margin: 20px 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  border: 4px solid #FFFFFF;
}

.last-chance-content .input-group {
  margin: 24px 0;
  display: flex;
  gap: 12px;
  flex-direction: column;
}

.last-chance-content input {
  width: 100% !important;
  padding: 16px 20px !important;
  border: 4px solid #000000 !important;
  border-radius: 12px !important;
  font-size: 18px !important;
  color: #000000 !important;
  background: #FFFFFF !important;
  font-weight: 700 !important;
  text-align: center !important;
  box-shadow: 3px 3px 0px #000000 !important;
}

.last-chance-content input:focus {
  outline: none !important;
  border-color: #FFFFFF !important;
  box-shadow: 
    4px 4px 0px #FFFFFF,
    0 0 0 3px rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px) !important;
}

.last-chance-content .guess-btn {
  background: #FFFFFF !important;
  color: #C42000 !important;
  border: 4px solid #000000 !important;
  padding: 16px 32px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  width: 100% !important;
  text-shadow: none !important;
  box-shadow: 
    4px 4px 0px #000000,
    0 0 0 2px #C42000 !important;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
}

.last-chance-content .guess-btn:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 
    6px 8px 0px #000000,
    0 0 0 2px #C42000,
    0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.last-chance-content .guess-btn:disabled {
  background: #A6A6A6 !important;
  color: #616161 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: 2px 2px 0px #616161 !important;
}

.last-chance-content .warning {
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  margin-top: 16px;
  opacity: 0.9;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
}

.last-chance-content p {
  color: #FFFFFF;
  font-weight: 600;
  line-height: 1.4;
  margin: 16px 0;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes bounceIn {
  0% {
    transform: scale(0.3) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) rotate(2deg);
  }
  70% {
    transform: scale(0.9) rotate(-1deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .last-chance-content {
    padding: 24px;
    margin: 20px;
  }
  
  .last-chance-content h2 {
    font-size: 1.5rem;
  }
  
  .countdown {
    font-size: 3rem;
    width: 100px;
    height: 100px;
  }
  
  .last-chance-content .input-group {
    gap: 16px;
  }
}

.logo {
  width: 160px !important;
  height: 160px !important;
  min-width: 160px !important;
  min-height: 160px !important;
  max-width: 160px !important;
  max-height: 160px !important;
  margin: 0 auto 12px !important;
  background: url('/assets/logo.png') center/contain no-repeat !important;
  background-size: contain !important;
  display: block !important;
}

.header .logo,
.container .logo,
div.logo {
  width: 140px !important;
  height: 140px !important;
  background: url('/assets/logo.png') center/contain no-repeat !important;
  background-size: contain !important;
}