:root {
  --primary: #6366f1; --primary-dark: #4f46e5; --primary-light: #818cf8;
  --secondary: #f59e0b; --success: #10b981; --error: #ef4444; --warning: #f59e0b;
  --bg-dark: #0f0f1a; --bg-card: #1a1a2e; --bg-elevated: #252542; --bg-input: #2a2a4a;
  --text-primary: #ffffff; --text-secondary: #a1a1aa; --text-muted: #71717a;
  --border: rgba(255,255,255,0.1); --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background: var(--bg-dark); color: var(--text-primary); min-height: 100vh; line-height: 1.5; }
.background-animation { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.grid-pattern { position: absolute; inset: 0; background-image: linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px); background-size: 50px 50px; }
.screen { display: none; min-height: 100vh; position: relative; z-index: 1; }
.screen.active { display: flex; }

/* Lobby */
#lobby-screen { align-items: center; justify-content: center; padding: 2rem; }
.lobby-container { width: 100%; max-width: 900px; }
.logo-section { text-align: center; margin-bottom: 2rem; }
.logo-grid { display: inline-flex; gap: 4px; padding: 8px; background: var(--bg-card); border-radius: var(--radius-md); }
.logo-grid span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: var(--radius-sm); font-size: 1.1rem; font-weight: 700; }
.logo-section h1 { font-size: 2rem; font-weight: 700; margin-top: 1rem; background: linear-gradient(135deg, var(--text-primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo-section .subtitle { color: var(--text-secondary); font-size: 0.9rem; }
.lobby-cards { display: flex; gap: 2rem; }
.lobby-card { flex: 1; background: var(--bg-card); border-radius: var(--radius-lg); padding: 1.5rem; border: 1px solid var(--border); }
.card-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.lobby-card h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.lobby-card p { color: var(--text-secondary); margin-bottom: 1rem; font-size: 0.9rem; }
.card-form { display: flex; flex-direction: column; gap: 0.75rem; }
.divider { display: flex; align-items: center; padding: 0 1rem; }
.divider span { color: var(--text-muted); writing-mode: vertical-rl; }

/* Mode/Difficulty Select */
.mode-select, .difficulty-select { margin-bottom: 0.5rem; }
.mode-select label, .difficulty-select label, .player-select label, .size-select label { display: block; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.4rem; }
.mode-buttons, .select-buttons { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.mode-buttons button, .select-buttons button { flex: 1; min-width: 60px; padding: 0.5rem 0.75rem; background: var(--bg-input); border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); font-family: inherit; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.mode-buttons button:hover, .select-buttons button:hover { border-color: var(--primary-light); }
.mode-buttons button.active, .select-buttons button.active { background: var(--primary); border-color: var(--primary); color: white; }

.player-select, .size-select { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }

input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; padding: 0.75rem; background: var(--bg-input); border: 2px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary); font-family: inherit; font-size: 0.95rem; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
.code-input { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.15em; text-align: center; }

.btn-primary, .btn-secondary { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1.25rem; border: none; border-radius: var(--radius-md); font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(99,102,241,0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary-light); }

.lobby-footer { margin-top: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.8rem; }
.lobby-footer a { color: var(--text-secondary); text-decoration: none; margin: 0 0.4rem; }
.lobby-footer a:hover { color: var(--primary-light); }
.lobby-footer span { margin: 0 0.2rem; }

/* Waiting Room */
#waiting-screen { flex-direction: column; padding: 1.5rem; }
.waiting-container { max-width: 800px; width: 100%; margin: 0 auto; }
.room-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 0.75rem; }
.back-btn { display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.75rem; background: transparent; border: 2px solid var(--border); border-radius: var(--radius-md); color: var(--text-secondary); font-family: inherit; font-size: 0.85rem; cursor: pointer; }
.back-btn:hover { border-color: var(--error); color: var(--error); }
.room-code-display { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; background: var(--bg-card); border-radius: var(--radius-md); }
.room-code-display .label { color: var(--text-muted); font-size: 0.8rem; }
.room-code-display .code { font-family: 'JetBrains Mono', monospace; font-size: 1.25rem; font-weight: 600; color: var(--primary-light); letter-spacing: 0.1em; }
.copy-btn { padding: 0.4rem 0.6rem; background: var(--bg-elevated); border: none; border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; font-size: 1rem; }
.copy-btn:hover { background: var(--primary); color: white; }

.room-info { display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.room-info-item { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem; background: var(--bg-card); border-radius: var(--radius-md); font-size: 0.8rem; }
.room-info-item .info-icon { font-size: 1rem; }
.room-info-item .info-label { color: var(--text-muted); }
.room-info-item .info-value { color: var(--text-primary); font-weight: 600; }

.share-link-section { margin-bottom: 1rem; padding: 0.75rem; background: var(--bg-card); border-radius: var(--radius-md); }
.share-link-section label { display: block; color: var(--text-secondary); font-size: 0.8rem; margin-bottom: 0.4rem; }
.share-link-row { display: flex; gap: 0.4rem; }
.share-link-row input { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; padding: 0.5rem; }
.share-link-row .btn-secondary { white-space: nowrap; padding: 0.5rem 0.75rem; font-size: 0.8rem; }

.waiting-content h2 { font-size: 1.1rem; margin-bottom: 0.75rem; color: var(--text-secondary); }
.players-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.player-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--bg-card); border-radius: var(--radius-md); border: 2px solid var(--border); transition: all 0.2s; }
.player-card.ready { border-color: var(--success); background: rgba(16,185,129,0.1); }
.player-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; color: white; }
.player-info { flex: 1; }
.player-name { font-weight: 600; font-size: 0.9rem; }
.player-status { font-size: 0.8rem; color: var(--text-muted); }
.player-card.ready .player-status { color: var(--success); }
.host-badge { font-size: 0.65rem; padding: 0.15rem 0.4rem; background: var(--secondary); color: var(--bg-dark); border-radius: var(--radius-sm); margin-left: 0.4rem; }

.waiting-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn-ready { padding: 0.75rem 1.5rem; background: var(--bg-elevated); border: 2px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.btn-ready .not-ready-text { display: none; }
.btn-ready.active { background: var(--success); border-color: var(--success); }
.btn-ready.active .ready-text { display: none; }
.btn-ready.active .not-ready-text { display: inline; }
.btn-start { padding: 0.75rem 1.5rem; }
.btn-start:disabled { opacity: 0.5; cursor: not-allowed; }

/* =====================================================
   GAME SCREEN
   ===================================================== */
#game-screen { flex-direction: column; height: 100vh; height: 100dvh; padding: 0.5rem; overflow: hidden; }
.game-container { display: flex; flex-direction: column; height: 100%; max-width: 1400px; width: 100%; margin: 0 auto; gap: 0.5rem; }

.game-header { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0.75rem; background: var(--bg-card); border-radius: var(--radius-md); flex-wrap: wrap; gap: 0.4rem; }
.game-info { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.game-info-badge { display: flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.5rem; background: var(--bg-elevated); border-radius: var(--radius-sm); font-size: 0.75rem; }
.game-info-badge .badge-icon { font-size: 0.9rem; }
.game-info-badge .badge-value { font-weight: 600; color: var(--primary-light); }

.timer-section { flex-shrink: 0; }
.timer-ring { position: relative; width: 50px; height: 50px; }
.timer-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.timer-bg { fill: none; stroke: var(--bg-elevated); stroke-width: 5; }
.timer-progress { fill: none; stroke: var(--primary); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 283; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.timer-ring.warning .timer-progress { stroke: var(--warning); }
.timer-ring.danger .timer-progress { stroke: var(--error); }
.timer-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; font-weight: 600; }

.game-main { display: flex; gap: 0.5rem; flex: 1; min-height: 0; overflow: hidden; }

/* Players Sidebar */
.players-sidebar { width: 140px; padding: 0.5rem; background: var(--bg-card); border-radius: var(--radius-md); overflow-y: auto; flex-shrink: 0; }
.players-sidebar h3 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.4rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.sidebar-player { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem; background: var(--bg-elevated); border-radius: var(--radius-sm); margin-bottom: 0.3rem; border: 2px solid transparent; }
.sidebar-player.leading { border-color: var(--secondary); background: rgba(245,158,11,0.1); }
.sidebar-player .rank { width: 18px; height: 18px; border-radius: 50%; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700; }
.sidebar-player.leading .rank { background: var(--secondary); color: var(--bg-dark); }
.sidebar-player .player-color { width: 6px; height: 6px; border-radius: 50%; }
.sidebar-player .player-details { flex: 1; min-width: 0; }
.sidebar-player .player-name { font-size: 0.7rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-player .player-score { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; font-weight: 700; color: var(--primary-light); }

/* =====================================================
   CROSSWORD GRID - BUCHSTABEN GARANTIERT SICHTBAR
   ===================================================== */
.crossword-section { flex: 1; display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 0.5rem; }
.crossword-wrapper { display: inline-block; }
.crossword-grid { display: inline-grid; gap: 0; background: #000; padding: 2px; border-radius: 2px; }

/* Basis-Zelle */
.cell { 
  width: 34px; 
  height: 34px; 
  position: relative; 
  background: #000; 
}

.cell-empty { 
  background: #1a1a2e; 
}

.cell-letter { 
  background: #ffffff !important; 
  border: 1px solid #333 !important; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

.cell-letter:hover { 
  background: #f5f5ff !important; 
}

.cell-letter.selected { 
  background: #e8e8ff !important; 
  outline: 2px solid var(--primary); 
  outline-offset: -2px; 
  z-index: 5; 
}

/* GELÖSTE ZELLE - GRÜN */
.cell-letter.solved { 
  background: #c8f7c5 !important; 
  border-color: #2e7d32 !important; 
}

/* Falsche Antwort - Rot + Shake */
.cell-letter.wrong { 
  animation: shake 0.4s ease-in-out; 
  background: #ffcdd2 !important; 
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-3px); }
  40%, 80% { transform: translateX(3px); }
}

/* Zellnummer oben links */
.cell-number { 
  position: absolute; 
  top: 1px; 
  left: 2px; 
  font-size: 9px; 
  font-weight: 700; 
  color: #333; 
  pointer-events: none; 
  z-index: 2; 
  line-height: 1; 
}

/* =====================================================
   INPUT - BUCHSTABEN GROSS UND SICHTBAR!
   ===================================================== */
.cell-input { 
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important; 
  height: 100% !important; 
  background: transparent !important; 
  border: none !important; 
  outline: none !important; 
  text-align: center !important; 
  font-family: 'Arial Black', Arial, sans-serif !important; 
  font-size: 20px !important; 
  font-weight: 900 !important; 
  color: #000000 !important; 
  text-transform: uppercase !important; 
  padding: 0 !important;
  margin: 0 !important;
  line-height: 34px !important;
  caret-color: #6366f1;
  z-index: 3 !important;
}

/* Gelöste Zelle - Dunkelgrüne Schrift */
.cell-letter.solved .cell-input { 
  color: #1b5e20 !important; 
  pointer-events: none; 
}

/* Spieler-Indikator auf gelösten Zellen */
.cell-player-indicator { 
  position: absolute; 
  bottom: 2px; 
  right: 2px; 
  width: 6px; 
  height: 6px; 
  border-radius: 50%; 
  border: 1px solid rgba(0,0,0,0.3); 
  z-index: 4;
}

/* =====================================================
   ZEITUNGS-MODUS (Newspaper Mode)
   ===================================================== */
.crossword-grid.newspaper-mode {
  background: #000;
  padding: 0;
  border: 2px solid #000;
}

.newspaper-mode .cell { 
  width: 30px; 
  height: 30px; 
}

.newspaper-mode .cell-empty { 
  background: #000 !important; 
}

.newspaper-mode .cell-letter { 
  background: #fff !important; 
  border: 1px solid #000 !important;
}

.newspaper-mode .cell-letter:hover { 
  background: #fffde7 !important; 
}

.newspaper-mode .cell-letter.selected { 
  background: #fff9c4 !important; 
  outline: 2px solid #000; 
}

.newspaper-mode .cell-letter.solved { 
  background: #e8f5e9 !important; 
}

.newspaper-mode .cell-number { 
  font-size: 7px; 
  top: 1px; 
  left: 1px; 
  font-family: 'Times New Roman', serif; 
}

.newspaper-mode .cell-input { 
  font-family: 'Times New Roman', Georgia, serif !important; 
  font-size: 18px !important; 
  font-weight: bold !important;
  line-height: 30px !important;
}

/* =====================================================
   CLUES SECTION - MOBILE-FREUNDLICH
   ===================================================== */
.clues-section { 
  width: 260px; 
  background: var(--bg-card); 
  border-radius: var(--radius-md); 
  display: flex; 
  flex-direction: column; 
  overflow: hidden; 
  flex-shrink: 0; 
}

.clues-tabs { 
  display: flex; 
  border-bottom: 1px solid var(--border); 
}

.clue-tab { 
  flex: 1; 
  padding: 0.5rem; 
  background: transparent; 
  border: none; 
  color: var(--text-secondary); 
  font-family: inherit; 
  font-size: 0.75rem; 
  font-weight: 600; 
  cursor: pointer; 
  position: relative; 
  transition: all 0.2s; 
}

.clue-tab::after { 
  content: ''; 
  position: absolute; 
  bottom: 0; 
  left: 0; 
  right: 0; 
  height: 2px; 
  background: var(--primary); 
  transform: scaleX(0); 
  transition: transform 0.2s; 
}

.clue-tab.active { 
  color: var(--primary-light); 
}

.clue-tab.active::after { 
  transform: scaleX(1); 
}

.clues-content { 
  flex: 1; 
  overflow: hidden; 
  position: relative; 
}

.clues-list { 
  position: absolute; 
  inset: 0; 
  padding: 0.4rem; 
  overflow-y: auto; 
  display: none; 
}

.clues-list.active { 
  display: block; 
}

.clue-item { 
  display: flex; 
  gap: 0.3rem; 
  padding: 0.4rem; 
  margin-bottom: 0.25rem; 
  background: var(--bg-elevated); 
  border-radius: var(--radius-sm); 
  cursor: pointer; 
  transition: all 0.2s; 
}

.clue-item:hover { 
  background: var(--bg-input); 
}

.clue-item.solved { 
  opacity: 0.4; 
  text-decoration: line-through; 
}

.clue-number { 
  font-family: 'JetBrains Mono', monospace; 
  font-weight: 700; 
  color: var(--primary-light); 
  min-width: 22px; 
  font-size: 0.75rem; 
}

.clue-text { 
  color: var(--text-secondary); 
  font-size: 0.75rem; 
  line-height: 1.3; 
  flex: 1; 
}

.clue-length { 
  color: var(--text-muted); 
  font-size: 0.65rem; 
  white-space: nowrap; 
}

/* =====================================================
   MOBILE CLUES TOGGLE - FÜR HANDY
   ===================================================== */
.mobile-clues-toggle {
  display: none;
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.6rem 1.25rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99,102,241,0.4);
}

.mobile-clues-panel {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 50vh;
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 200;
  flex-direction: column;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.mobile-clues-panel.active {
  display: flex;
}

.mobile-clues-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-clues-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.mobile-clues-close {
  width: 32px;
  height: 32px;
  background: var(--bg-elevated);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
}

.mobile-clues-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.mobile-clues-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mobile-clue-tab {
  flex: 1;
  padding: 0.5rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.mobile-clue-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* =====================================================
   CHAT
   ===================================================== */
.chat-section { position: fixed; bottom: 1rem; right: 1rem; z-index: 100; }
.chat-toggle { width: 45px; height: 45px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem; position: relative; box-shadow: 0 4px 15px rgba(99,102,241,0.4); border: none; }
.chat-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; background: var(--error); border-radius: 9px; font-size: 0.65rem; font-weight: 700; color: white; display: flex; align-items: center; justify-content: center; opacity: 0; }
.chat-badge.visible { opacity: 1; }
.chat-panel { position: absolute; bottom: 55px; right: 0; width: 300px; height: 380px; background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border); display: none; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.chat-panel.active { display: flex; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; }
.chat-close { width: 26px; height: 26px; background: var(--bg-elevated); border: none; border-radius: 50%; color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; }
.chat-close:hover { background: var(--error); color: white; }
.chat-messages { flex: 1; padding: 0.6rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.4rem; }
.chat-message { max-width: 85%; }
.chat-message.own { align-self: flex-end; }
.message-header { display: flex; gap: 0.4rem; margin-bottom: 0.15rem; }
.message-author { font-size: 0.65rem; font-weight: 600; }
.message-time { font-size: 0.6rem; color: var(--text-muted); }
.message-content { padding: 0.4rem 0.6rem; background: var(--bg-elevated); border-radius: var(--radius-sm); font-size: 0.8rem; word-break: break-word; }
.chat-message.own .message-content { background: var(--primary); color: white; }
.chat-input { display: flex; gap: 0.4rem; padding: 0.6rem; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; padding: 0.4rem 0.6rem; font-size: 0.85rem; }
.chat-input button { width: 36px; height: 36px; background: var(--primary); border: none; border-radius: var(--radius-sm); color: white; cursor: pointer; font-size: 0.9rem; }

/* =====================================================
   RESULT SCREEN
   ===================================================== */
#result-screen { align-items: center; justify-content: center; padding: 1.5rem; }
.result-container { max-width: 600px; width: 100%; text-align: center; }
.trophy-animation { font-size: 3.5rem; margin-bottom: 0.75rem; animation: bounce 1s ease infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.result-header h1 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.result-header p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.9rem; }
.result-podium { display: flex; justify-content: center; align-items: flex-end; gap: 0.75rem; margin-bottom: 1.5rem; }
.podium-place { display: flex; flex-direction: column; align-items: center; }
.podium-avatar { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; margin-bottom: 0.4rem; }
.podium-name { font-weight: 600; font-size: 0.8rem; margin-bottom: 0.2rem; }
.podium-score { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--secondary); margin-bottom: 0.4rem; font-size: 0.9rem; }
.podium-stand { width: 60px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 800; }
.podium-place.first .podium-stand { height: 70px; background: linear-gradient(to top, #ffd700, #ffec8b); color: #8b7500; }
.podium-place.second .podium-stand { height: 50px; background: linear-gradient(to top, #c0c0c0, #e8e8e8); color: #707070; }
.podium-place.third .podium-stand { height: 35px; background: linear-gradient(to top, #cd7f32, #daa06d); color: #8b4513; }
.result-list { background: var(--bg-card); border-radius: var(--radius-md); padding: 0.75rem; margin-bottom: 1.25rem; }
.result-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem; }
.result-rank { width: 26px; height: 26px; background: var(--bg-elevated); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }
.result-player-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 0.85rem; }
.result-player-name { flex: 1; text-align: left; font-weight: 500; font-size: 0.9rem; }
.result-player-score { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--primary-light); }
.result-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* =====================================================
   MODAL
   ===================================================== */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.modal.active { display: flex; }
.modal-content { background: var(--bg-card); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-header h2 { font-size: 1.25rem; }
.modal-close { width: 32px; height: 32px; background: var(--bg-elevated); border: none; border-radius: 50%; color: var(--text-secondary); font-size: 1.25rem; cursor: pointer; }
.modal-close:hover { background: var(--error); color: white; }
.form-group { margin-bottom: 0.75rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-size: 0.85rem; color: var(--text-secondary); }
textarea { resize: vertical; min-height: 80px; }

/* Toast */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.4rem; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem; background: var(--bg-card); border-radius: var(--radius-md); border-left: 4px solid var(--primary); box-shadow: 0 4px 20px rgba(0,0,0,0.3); animation: slideIn 0.3s ease; pointer-events: auto; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--error); }
.toast.warning { border-color: var(--warning); }
.toast-icon { font-size: 1.1rem; }
.toast-message { font-size: 0.85rem; }

/* =====================================================
   RESPONSIVE - MOBILE
   ===================================================== */
@media (max-width: 900px) {
  .lobby-cards { flex-direction: column; }
  .divider { padding: 0.75rem 0; }
  .divider span { writing-mode: horizontal-tb; }
  
  .game-main { flex-direction: column; }
  .players-sidebar { display: none; }
  .clues-section { display: none; }
  .mobile-clues-toggle { display: block; }
  
  .game-header { justify-content: center; }
  .game-info { justify-content: center; }
  
  .cell { width: 30px; height: 30px; }
  .cell-input { font-size: 18px !important; line-height: 30px !important; }
  .cell-number { font-size: 8px; }
  
  .newspaper-mode .cell { width: 28px; height: 28px; }
  .newspaper-mode .cell-input { font-size: 16px !important; line-height: 28px !important; }
}

@media (max-width: 600px) {
  #lobby-screen { padding: 1rem; }
  .lobby-card { padding: 1.25rem; }
  .logo-grid span { width: 32px; height: 32px; font-size: 0.9rem; }
  .logo-section h1 { font-size: 1.5rem; }
  
  .room-header { flex-direction: column; align-items: stretch; }
  .room-code-display { justify-content: center; }
  .share-link-row { flex-direction: column; }
  .room-info { justify-content: center; }
  
  .cell { width: 28px; height: 28px; }
  .cell-input { font-size: 16px !important; line-height: 28px !important; }
  .cell-number { font-size: 7px; top: 1px; left: 1px; }
  
  .newspaper-mode .cell { width: 26px; height: 26px; }
  .newspaper-mode .cell-input { font-size: 14px !important; line-height: 26px !important; }
  
  .chat-panel { width: 260px; height: 320px; }
  .chat-section { bottom: 0.5rem; right: 0.5rem; }
  
  .game-info-badge { padding: 0.25rem 0.4rem; font-size: 0.7rem; }
}

@media (max-width: 400px) {
  .cell { width: 24px; height: 24px; }
  .cell-input { font-size: 14px !important; line-height: 24px !important; }
  .cell-number { font-size: 6px; }
  
  .newspaper-mode .cell { width: 22px; height: 22px; }
  .newspaper-mode .cell-input { font-size: 12px !important; line-height: 22px !important; }
}

/* =====================================================
   SPENDEN BUTTON
   ===================================================== */
.donate-section {
  text-align: center;
  margin: 1.5rem 0;
}

.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.donate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.donate-btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.post-game-donate {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.post-game-donate p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

/* =====================================================
   ZEIT AUSWAHL
   ===================================================== */
.time-select {
  margin-bottom: 0.75rem;
}

.time-select label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.time-hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.3rem;
}

/* Bonus Badge im Spiel */
.bonus-badge {
  background: linear-gradient(135deg, var(--secondary), #f59e0b) !important;
}

.bonus-badge .badge-value {
  color: var(--bg-dark) !important;
}

/* =====================================================
   BUCHSTABEN PENDING (noch nicht bestätigt)
   ===================================================== */
.cell-letter.pending .cell-input {
  color: #666 !important;
  font-style: italic;
}

.cell-letter.correct-pending {
  background: #fff3cd !important;
}

/* Word Solved Animation */
@keyframes wordSolved {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); background: #c8f7c5; }
  100% { transform: scale(1); }
}

.cell-letter.word-solved {
  animation: wordSolved 0.5s ease-out;
}
