/* ─── Reset & Base ─── */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
button, a, [role="button"], input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus, button:focus-visible, a:focus, a:focus-visible, [role="button"]:focus, [role="button"]:focus-visible { outline: none; }

:root {
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --bg3: #16213e;
  --primary: #e94560;
  --primary-glow: #e9456088;
  --secondary: #533483;
  --accent: #0f3460;
  --gold: #ffd700;
  --green: #00e676;
  --red: #ff1744;
  --text: #eee;
  --text-dim: #888;
  --radius: 12px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

.screen { display: none; }
.screen.active { display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* ─── Buttons ─── */
.btn {
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.btn:disabled, .btn.btn-disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}

#btn-create.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #ff6b3d 60%, #ff8c14 100%);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-secondary {
  background: var(--accent);
  color: white;
}

.btn-large { padding: 18px 40px; font-size: 18px; width: 100%; }

/* ─── Start Screen ─── */
.logo {
  text-align: center;
  margin-top: 60px;
  margin-bottom: 20px;
}

.logo h1 {
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.logo-ladder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 15px;
}

.ladder-rung {
  height: 4px;
  border-radius: 2px;
  background: var(--primary);
  animation: ladderGlow 2s ease-in-out infinite;
}
.ladder-rung:nth-child(1) { width: 40px; animation-delay: 0s; }
.ladder-rung:nth-child(2) { width: 55px; animation-delay: 0.2s; }
.ladder-rung:nth-child(3) { width: 70px; animation-delay: 0.4s; }
.ladder-rung:nth-child(4) { width: 85px; animation-delay: 0.6s; }
.ladder-rung:nth-child(5) { width: 100px; animation-delay: 0.8s; }

@keyframes ladderGlow {
  0%, 100% { opacity: 0.5; box-shadow: none; }
  50% { opacity: 1; box-shadow: 0 0 10px var(--primary-glow); }
}

.start-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input[type="text"], input[type="number"] {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--bg3);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--text);
  font-size: 16px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
input:focus { border-color: var(--primary); }

.divider {
  text-align: center;
  position: relative;
  margin: 5px 0;
}
.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--bg3);
}
.divider::before { left: 0; }
.divider::after { right: 0; }
.divider span { color: var(--text-dim); font-size: 14px; }

.join-row {
  display: flex;
  gap: 10px;
}
.join-row input { flex: 1; text-transform: uppercase; }
.join-row .btn { white-space: nowrap; }

.error { color: var(--red); font-size: 14px; text-align: center; min-height: 20px; }

/* ─── Start Screen ─── */
#screen-start {
  position: relative;
}
#screen-start::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('start-bg.jpg') center/cover no-repeat;
  z-index: -2;
}
#screen-start::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 20, 40, 0.55) 0%,
    rgba(10, 20, 40, 0.65) 100%
  );
  z-index: -1;
}

/* ─── Lobby Screen ─── */
#screen-lobby {
  position: relative;
}
#screen-lobby::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('lobby-bg.jpg') center/cover no-repeat;
  z-index: -2;
}
#screen-lobby::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 5, 30, 0.82) 0%,
    rgba(30, 10, 50, 0.75) 30%,
    rgba(15, 5, 30, 0.80) 100%
  );
  z-index: -1;
}

.lobby-header {
  text-align: center;
  width: 100%;
}
.lobby-header h2 { font-size: 28px; margin-bottom: 5px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.lobby-code-display {
  font-size: 14px;
  color: var(--text-dim);
}
.lobby-code-display span {
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 4px;
  user-select: all;
}

.btn-mute {
  margin-top: 10px;
  background: rgba(20, 8, 40, 0.6);
  border: 2px solid rgba(83, 52, 131, 0.5);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 22px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn-mute.muted { opacity: 0.4; }

.lobby-header { position: relative; }
.lobby-coins {
  position: absolute;
  right: 6px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.mode-selector { width: 100%; }
.mode-selector h3 { font-size: 14px; color: var(--text-dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }

.mode-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-mode {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  border: 2px solid var(--bg3);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-mode.active {
  color: var(--text);
  background: var(--bg3);
}

/* ─── Lobby Slots Grid ─── */
.lobby-slots-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 10px 0;
}

.lobby-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.lobby-slot-crowns {
  font-size: 0.65em;
  line-height: 1;
  letter-spacing: 0.5px;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
  color: #ffd700;
  font-weight: 700;
  white-space: nowrap;
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.lobby-slot-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.lobby-slot-figure {
  background: transparent !important;
  border: none !important;
}
.lobby-slot-figure svg {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}

.lobby-slot-empty {
  cursor: pointer;
}
.lobby-slot-empty .lobby-slot-circle {
  background: rgba(20, 8, 40, 0.5);
  border: 3px dashed rgba(83, 52, 131, 0.5);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.lobby-slot-empty .lobby-slot-plus {
  font-size: 32px;
  font-weight: 300;
  color: rgba(83, 52, 131, 0.6);
  line-height: 1;
}

.lobby-slot-filled .lobby-slot-circle {
  border: 3px solid transparent;
  font-size: 32px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: slotPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
.lobby-slot-filled .lobby-slot-circle svg {
  width: 60px;
  height: 60px;
}

@keyframes slotPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.lobby-slot-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-slot-empty .lobby-slot-name {
  color: var(--bg3);
  font-weight: 400;
}

.lobby-slot-host-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--gold);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.lobby-slot-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
}

.lobby-slot-me { cursor: pointer; }
.lobby-slot-me .lobby-slot-circle {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lobby-slot-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  padding: 8px 12px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  white-space: normal;
  max-width: 160px;
  min-width: 60px;
  width: max-content;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}
.lobby-slot-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}
.lobby-slot-bubble-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.lobby-emote-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: rgba(20, 8, 40, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 30;
  min-width: 180px;
}
.lobby-emote-item {
  background: transparent;
  border: none;
  color: #fff;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

/* Legacy avatar (used elsewhere) */
.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
  overflow: hidden;
}
.player-avatar svg {
  width: 32px;
  height: 32px;
}

.lobby-wait { color: var(--text-dim); font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }

.lobby-actions-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.lobby-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-lobby-action {
  flex: 1;
  padding: 12px 16px;
  background: rgba(20, 8, 40, 0.75);
  border: 2px solid rgba(83, 52, 131, 0.5);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ─── Modals ─── */
body.modal-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  /* position:fixed + top wird via JS gesetzt, damit iOS den Hintergrund wirklich einfriert */
  position: fixed;
  width: 100%;
}
body.modal-open #app {
  overflow: hidden;
  max-height: 100vh;
  max-height: 100dvh;
}
html.modal-open-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overscroll-behavior: contain;
}
/* Shop immer im Vordergrund – auch wenn aus einem anderen Modal geöffnet */
#shop-modal { z-index: 200; }
/* Skin-Kauf-Bestätigung über dem Shop */
#unlock-confirm-modal { z-index: 300; }

/* Pause/Reconnect Overlay */
#pause-overlay, #reconnect-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 15, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pause-card {
  background: linear-gradient(160deg, #2a1546 0%, #120928 100%);
  border: 2px solid rgba(233, 69, 96, 0.45);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(233,69,96,0.2);
}
.pause-icon { font-size: 48px; line-height: 1; margin-bottom: 12px; }
.pause-title {
  font-size: 22px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 8px; color: var(--text);
}
.pause-sub { font-size: 15px; color: var(--text-dim); margin-bottom: 18px; }
.pause-sub #pause-player-name { color: var(--gold); font-weight: 700; }
.pause-timer {
  font-size: 48px; font-weight: 900; color: var(--primary);
  text-shadow: 0 0 20px var(--primary-glow); margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.pause-hint { font-size: 12px; color: var(--text-dim); opacity: 0.8; }

.modal-content {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* ─── Invite-Modal ─── */
#invite-modal .modal-content { max-width: 420px; }
.invite-sub { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; line-height: 1.4; }
.invite-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.invite-link-row input {
  flex: 1;
  background: rgba(20, 8, 40, 0.7);
  border: 1px solid rgba(83, 52, 131, 0.5);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: monospace;
}
.invite-link-row button { padding: 10px 14px; font-size: 13px; }
.invite-share-row {
  display: flex;
  gap: 8px;
}
.invite-share-row .btn { flex: 1; }
.invite-status {
  font-size: 12px;
  color: var(--gold);
  text-align: center;
  margin-top: 10px;
  min-height: 16px;
}

/* ─── Mode Display in Lobby ─── */
.lobby-mode-display {
  width: 100%;
  padding: 10px 16px;
  background: rgba(20, 8, 40, 0.7);
  border: 1px solid rgba(83, 52, 131, 0.4);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lobby-mode-display .mode-label { color: var(--text-dim); }
.lobby-mode-display .mode-value { color: var(--gold); font-weight: 700; }

/* ─── Gamemode Modal ─── */
.modal-gamemode { max-width: 520px; max-height: 94vh; }
#gamemode-modal .modal-content { overflow: hidden; display: flex; flex-direction: column; }
#gamemode-modal .gamemode-grid { flex: 1; align-content: stretch; margin-bottom: 0; }
#gamemode-modal .gamemode-card { min-height: 0; }

.btn-modal-back {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
  transition: color 0.15s;
}

.gamemode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.gamemode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 10px;
  background: var(--bg);
  border: 2px solid var(--bg3);
  border-radius: var(--radius);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.gamemode-card.active { color: var(--text); background: var(--bg3); }
.gamemode-lock {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}
.gamemode-badge-tr {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #ff8a1a;
  letter-spacing: 0.2px;
  line-height: 1.15;
  text-align: right;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.gamemode-subtitle {
  text-align: center;
  color: #ff8a1a;
  font-weight: 700;
  font-size: 14px;
  margin: -6px 0 12px;
  letter-spacing: 0.3px;
}
.gamemode-card-create {
  border-style: dashed !important;
  color: var(--text-dim);
}
.gamemode-card-create .gamemode-icon { opacity: 0.85; }
.gamemode-grid-own {
  position: relative;
  grid-template-columns: repeat(2, 1fr);
}
.gamemode-grid-own > #bib-create-own { grid-column: 1 / -1; }
.gamemode-grid-own > .own-mode-arrow {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-around;
  padding: 0 22%;
  margin: -6px 0;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  position: static;
  transform: none;
}
.custom-mode-tile-author {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  text-align: center;
}
.gamemode-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 18px 0 14px;
}

/* ─── Custom Mode Modals ────────────────────────────────────────── */
.modal-custom-mode {
  max-width: 520px;
  width: 92%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
}
#custom-mode-list-modal .modal-content,
#public-mode-list-modal .modal-content {
  max-width: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#custom-mode-list-modal .gamemode-grid,
#public-mode-list-modal .gamemode-grid {
  flex: 1;
  align-content: stretch;
  margin-bottom: 0;
}
#custom-mode-list-modal .gamemode-card,
#public-mode-list-modal .gamemode-card {
  min-height: 0;
}
.multi-choice-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 14px;
}
.multi-choice-btn {
  padding: 14px 12px;
  font-size: 15px;
  font-weight: 600;
  background: var(--bg);
  border: 2px solid var(--bg3);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  text-align: center;
  word-break: break-word;
}
.multi-choice-btn.selected { background: var(--bg3); }
.multi-choice-btn:disabled { cursor: not-allowed; opacity: 0.7; }
.multi-choice-btn.is-correct { border-color: #2ecc71; background: rgba(46, 204, 113, 0.18); color: #fff; }
.multi-choice-btn.is-wrong { border-color: #e74c3c; background: rgba(231, 76, 60, 0.16); color: #fff; }
.text-answer-container {
  margin: 10px 0 14px;
}
#text-answer-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  background: var(--bg);
  border: 2px solid var(--bg3);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  text-align: center;
}
#text-answer-input:focus { outline: none; border-color: var(--primary); }
.reveal-multi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}
.gamemode-host-hint {
  background: rgba(255, 138, 26, 0.12);
  border: 1px solid rgba(255, 138, 26, 0.4);
  border-radius: var(--radius);
  color: #ff8a1a;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  margin-bottom: 12px;
  text-align: center;
  transition: background 0.2s, transform 0.15s;
}
.gamemode-host-hint.flash {
  background: rgba(255, 138, 26, 0.32);
  transform: scale(1.02);
}
.custom-mode-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.custom-mode-name-input {
  width: 100%;
  padding: 16px 18px;
  font-size: 18px;
  font-weight: 600;
  background: var(--bg);
  border: 2px solid var(--bg3);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  box-sizing: border-box;
}
.custom-mode-name-input:focus { outline: none; border-color: var(--primary); }
.custom-mode-slots {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.custom-slot {
  background: var(--bg);
  border: 1.5px solid var(--bg3);
  border-radius: var(--radius);
  padding: 16px 16px;
}
.custom-slot-empty {
  border-style: dashed;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  min-height: 52px;
}
.custom-slot-collapsed {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  min-height: 52px;
}
.custom-slot-collapsed .custom-slot-num {
  font-weight: 700;
  min-width: 70px;
  color: var(--text);
}
.custom-slot-collapsed .custom-slot-preview {
  flex: 1;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-slot-empty .custom-slot-num { font-weight: 700; min-width: 70px; }
.custom-slot-locked {
  cursor: not-allowed;
  opacity: 0.45;
}
.custom-slot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-dim);
}
.custom-slot-header .custom-slot-num { font-weight: 700; color: var(--text); }
.custom-slot-type-badge {
  background: var(--bg3);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.custom-slot-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: #e66;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  line-height: 1;
}
.custom-slot-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.custom-slot-picker button {
  flex: 1;
  min-width: 140px;
  padding: 14px 12px;
  background: var(--bg3);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
}
.custom-slot-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}
.custom-slot-row input,
.custom-slot-row textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  box-sizing: border-box;
}
.custom-slot-row input:focus,
.custom-slot-row textarea:focus { outline: none; border-color: var(--primary); }
.custom-slot-row textarea { resize: vertical; min-height: 52px; }
.custom-slot-multi-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.custom-slot-multi-row input[type="text"] {
  flex: 1;
  padding: 12px 14px;
  font-size: 16px;
  background: var(--bg3);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  box-sizing: border-box;
}
.custom-slot-multi-row input[type="text"]:focus { outline: none; border-color: var(--primary); }
.custom-slot-multi-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}
.custom-multi-label {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 56px;
  text-align: right;
}
.custom-multi-label.is-right { color: #4caf50; }
.custom-multi-label.is-wrong { color: #e57373; }
.custom-slot-extras {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.custom-slot-extras input {
  flex: 1;
  min-width: 100px;
  padding: 12px 14px;
  font-size: 16px;
  background: var(--bg3);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  box-sizing: border-box;
}
.custom-slot-extras input:focus { outline: none; border-color: var(--primary); }
.custom-slot-done-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.custom-slot-done {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.custom-slot-done:disabled {
  background: var(--bg3);
  color: var(--text-dim);
  cursor: not-allowed;
}
.custom-mode-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid var(--bg3);
  padding-top: 12px;
}
.custom-mode-list-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.custom-mode-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--bg3);
  border-radius: var(--radius);
  cursor: pointer;
}
.custom-mode-list-item .name { font-weight: 600; flex: 1; }
.custom-mode-list-item .count { color: var(--text-dim); font-size: 12px; }
.custom-mode-list-item .actions { display: flex; gap: 6px; }
.custom-mode-list-item .actions button {
  background: var(--bg3);
  border: none;
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.custom-mode-list-item .actions .del { color: #e66; }
.custom-mode-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 30px 0;
  font-size: 14px;
}
.custom-mode-tile {
  position: relative;
}
.custom-mode-tile-name {
  text-align: center;
  margin-bottom: 8px;
}
.custom-mode-tile-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.custom-mode-tile-btn {
  background: var(--bg3);
  border: none;
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.custom-mode-tile-btn.del { color: #e66; }
.gamemode-icon { font-size: 30px; }
.gamemode-name { font-size: 17px; font-weight: 600; text-align: center; }
.gamemode-players { font-size: 14px; font-weight: 300; text-align: center; color: #888; opacity: 0.9; margin-top: -1px; }

.gamemode-sub {
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--bg3);
}
.gamemode-sub h4 { font-size: 14px; color: var(--text-dim); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }

.gamemode-country-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gamemode-country {
  padding: 8px 14px;
  background: var(--bg2);
  border: 2px solid var(--bg3);
  border-radius: var(--radius);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  font-family: inherit;
}
.gamemode-country.active { color: var(--text); background: var(--bg3); }

/* ─── Skins Grid ─── */
.skins-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.skin-tab {
  padding: 8px 16px;
  background: var(--bg);
  border: 2px solid var(--bg3);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}
.skin-tab.active { color: var(--text); background: var(--bg3); }

.skin-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (min-width: 480px) {
  .skin-cards-grid { grid-template-columns: repeat(4, 1fr); }
}

.skin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  background: var(--bg);
  border: 2px solid var(--bg3);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.skin-card.selected { border-color: var(--gold); background: rgba(255,215,0,0.08); }

/* Rarity-Glow nur in der Skin-Auswahl (nicht im Shop). Dezent leuchtend statt harter Rahmen. */
.skin-cards-grid .skin-card.rarity-epic {
  box-shadow: 0 0 12px 2px rgba(168, 90, 255, 0.35);
}
.skin-cards-grid .skin-card.rarity-legendary {
  box-shadow: 0 0 12px 2px rgba(255, 200, 60, 0.4);
}

.skin-preview {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid rgba(255,255,255,0.15);
  overflow: hidden;
  position: relative;
}
.skin-preview svg {
  width: 48px;
  height: 48px;
}
.skin-preview-figure {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--bg);
  border: 2px solid var(--bg3);
}
.skin-preview-figure svg {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.skin-name {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  font-weight: 600;
}

#screen-game { position: relative; }

/* GuessLadder Frage- & Antwort-Ansicht: Holz-Hintergrund */
#screen-game, #screen-reveal { position: relative; }
#screen-game::before,
#screen-reveal::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('guessladder-bg.jpg') center/cover no-repeat;
  z-index: -2;
}
#screen-game::after,
#screen-reveal::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 8, 0, 0.55) 0%, rgba(15, 8, 0, 0.65) 100%);
  z-index: -1;
}

/* ─── Schneeball & Frozen ─── */
.frozen-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  background: radial-gradient(circle at center, rgba(13, 71, 161, 0.85), rgba(4, 20, 45, 0.95));
  backdrop-filter: blur(4px);
  z-index: 20;
}
.frozen-icon {
  font-size: 96px;
  animation: frozen-float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(144, 202, 249, 0.9));
}
.frozen-title {
  color: #e3f2fd;
  margin: 8px 0 12px;
  font-size: 32px;
  text-shadow: 0 2px 16px rgba(100, 181, 246, 0.7);
}
.frozen-text {
  color: #bbdefb;
  font-size: 16px;
  line-height: 1.5;
  max-width: 320px;
}
@keyframes frozen-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-8px) rotate(4deg); }
}

/* ─── Shop (Unlock) ─── */
.shop-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}
.shop-tab {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: #bbb;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.15s ease;
}
.shop-tab.active {
  background: var(--bg3);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.shop-empty { font-style: italic; }
.shop-card { position: relative; }

/* Shop-Offers (reale Angebote) */
.offer-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255,214,0,0.08), rgba(255,100,40,0.04));
  border: 1px solid rgba(255,214,0,0.35);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.offer-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.offer-title {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.offer-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.offer-price {
  font-size: 15px;
  font-weight: 800;
  color: #ffd600;
  padding: 3px 10px;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  white-space: nowrap;
  text-align: center;
}
.offer-btn {
  padding: 8px 14px;
  font-size: 14px;
}
.shop-card-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ─── Probezeit-Modal & Abo (Standard/Pro) ─── */
.trial-content { max-width: 420px; text-align: center; }
.trial-emoji { font-size: 54px; line-height: 1; margin-bottom: 6px; }
.trial-title { font-size: 21px; font-weight: 800; margin-bottom: 12px; color: #fff; }
.trial-text { font-size: 14.5px; line-height: 1.5; color: #cfd2da; margin-bottom: 10px; }
.trial-badge {
  display: inline-block;
  margin: 6px 0 16px;
  padding: 7px 16px;
  font-weight: 800;
  font-size: 14px;
  color: #1a1208;
  background: linear-gradient(135deg, #ffd24a, #ff9d2a);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(255, 180, 40, 0.4);
}
.trial-btn { width: 100%; margin-top: 6px; }
/* Guess-Ladder-Logo im Willkommens-Modal – kompakter als auf der Startseite */
.trial-logo { margin: 0 0 12px; }
.trial-logo h1 { font-size: 36px; }
/* Gelber Pro-Freischalten-Button – kleinere Schrift, damit der Text einzeilig
   bleibt und der Button gleich gross wie „Los geht's" ist */
.trial-btn-pro {
  background: linear-gradient(135deg, #ffd24a, #ff9d2a);
  color: #1a1208;
  box-shadow: 0 4px 16px rgba(255, 180, 40, 0.4);
  font-size: 12.5px;
  letter-spacing: 0.4px;
  padding-left: 12px;
  padding-right: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
/* Willkommens-Modal grösser + mehr Abstand zwischen den beiden Buttons */
.trial-welcome {
  max-width: 480px;
  padding: 34px 26px;
}
.trial-welcome .trial-logo h1 { font-size: 40px; }
.trial-welcome .trial-title { font-size: 24px; }
.trial-welcome .trial-text { font-size: 15.5px; }
.trial-welcome #trial-start-btn { margin-top: 16px; }
.trial-subs { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.trial-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
  background: linear-gradient(135deg, rgba(255,214,0,0.08), rgba(255,100,40,0.04));
  border: 1px solid rgba(255,214,0,0.35);
  border-radius: 12px;
}
.trial-sub-icon { font-size: 30px; flex-shrink: 0; }
.trial-sub-info { flex: 1 1 auto; }
.trial-sub-name { font-weight: 800; font-size: 15px; color: #fff; }
.trial-sub-desc { font-size: 12.5px; color: #b6b9c2; margin-top: 2px; }
.trial-sub-btn { flex: 0 0 auto; padding: 9px 14px; font-size: 14px; white-space: nowrap; }

/* Abo-Karten im Shop */
.sub-status {
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}
/* Grösserer Abstand zwischen Pro-Angebot und den Coin-Paketen */
.offer-coins-start { margin-top: 24px; }
.sub-status-text { font-size: 13.5px; font-weight: 700; color: #e6e7ec; text-align: center; width: 100%; }
.sub-card .offer-title { display: flex; flex-direction: column; gap: 3px; }
.sub-desc { font-size: 12px; font-weight: 500; color: #b6b9c2; }
.offer-btn[disabled] { opacity: 0.6; cursor: default; filter: grayscale(0.3); }
.offer-btn.offer-btn-owned {
  background: #2ecc71;
  border-color: #27ae60;
  color: #fff;
  opacity: 1;
  filter: none;
}
.offer-btn.offer-btn-owned[disabled] { opacity: 1; filter: none; }

/* Konto-Status (Probezeit/Abo) */
.konto-readonly.status-pro { color: #5ecb6a; font-weight: 700; }
.konto-readonly.status-standard { color: #ffd24a; font-weight: 700; }
.konto-readonly.status-trial { color: #5ecb6a; font-weight: 700; }
.konto-readonly.status-expired { color: #e94560; font-weight: 700; }

.skin-preview-figure.locked svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); opacity: 0.92; }
.shop-lock-badge {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
.shop-price {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold, #ffd700);
  text-align: center;
}
.eigene-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim, #aaa);
  padding: 30px 20px;
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Skin Animations ─── */
.skin-anim-pulse {
  animation: skinPulse 2s ease-in-out infinite;
}
@keyframes skinPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.2); }
}

.skin-anim-shimmer {
  animation: skinShimmer 3s linear infinite;
  background-size: 200% 200% !important;
}
@keyframes skinShimmer {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

.skin-anim-rotate svg {
  animation: skinRotate 8s linear infinite;
}
@keyframes skinRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.skin-anim-float {
  animation: skinFloat 3s ease-in-out infinite;
}
@keyframes skinFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.skin-anim-flash {
  animation: skinFlash 2s ease-in-out infinite;
}
@keyframes skinFlash {
  0%, 100% { filter: brightness(1); }
  10% { filter: brightness(1.8); }
  20% { filter: brightness(1); }
  30% { filter: brightness(1.5); }
  40% { filter: brightness(1); }
}

.skin-anim-wave svg {
  animation: skinWave 4s ease-in-out infinite;
}
@keyframes skinWave {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-3px); }
  75% { transform: translateY(3px); }
}

/* ─── Settings ─── */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg3);
}
.setting-row span { font-size: 15px; font-weight: 600; }

.btn-toggle {
  padding: 6px 18px;
  border: 2px solid var(--bg3);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-toggle.active { border-color: var(--green); color: var(--green); }

.setting-slider {
  width: 120px;
  height: 8px !important;
  margin: 0 !important;
}

/* ─── Anleitung Modal ─── */
.anleitung-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Großer, markanter Anleitung-Titel */
#anleitung-modal .anleitung-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--green), var(--gold), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Unterordner-Tabs innerhalb des Anleitung-Modals */
.anleitung-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.anleitung-tabs::-webkit-scrollbar { display: none; }
.anleitung-tab {
  flex: 1 0 auto;
  padding: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #d8d8e6;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}
.anleitung-tab.active {
  color: var(--text);
  background: var(--bg3);
}
.anleitung-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.anleitung-panel > * { min-width: 0; }
/* Fixe Höhe, damit die Tab-Leiste beim Wechsel nicht springt */
#anleitung-modal .modal-content { overflow-x: hidden; min-height: 620px; }

.anleitung-section h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.anleitung-section h4.anleitung-bigtitle {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-top: 8px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--green), var(--gold), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.anleitung-section p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.anleitung-section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.anleitung-section ul li {
  font-size: 14px;
  color: var(--text);
  padding: 4px 0 4px 16px;
  position: relative;
}

.anleitung-section ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ─── Language Selector ─── */
.timer-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}
.timer-selector span {
  min-width: 36px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}
.btn-timer-minus, .btn-timer-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bg3);
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
}

.setting-row-lang {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 10px;
}

.lang-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.btn-lang {
  padding: 6px 12px;
  border: 2px solid var(--bg3);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-lang.active { border-color: var(--gold); color: var(--gold); background: rgba(255,215,0,0.08); }

/* ─── Game Screen ─── */
.game-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}

/* ─── Duell Button ─── */
.board-top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  gap: 8px;
}
.btn-leave-round {
  background: var(--red, #ff1744);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 12px rgba(255, 23, 68, 0.35);
  transition: transform 0.15s, background 0.15s;
}
.btn-leave-round:active { transform: translateY(0); }
.modal-leave-confirm {
  max-width: 420px;
  text-align: center;
}
.leave-confirm-text {
  margin: 16px 0 24px;
  color: var(--text-dim, #aaa);
  font-size: 15px;
  line-height: 1.5;
}
.leave-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.leave-confirm-actions .btn { min-width: 130px; }
.btn-danger {
  background: var(--red, #ff1744);
  color: #fff;
  border: none;
}
.btn-duel {
  background: #00c853;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 12px rgba(0, 200, 83, 0.4);
  transition: all 0.2s;
}
.btn-duel:active:not(:disabled) { transform: translateY(0); }
.btn-duel.used, .btn-duel:disabled {
  background: var(--red);
  box-shadow: 0 2px 12px rgba(255, 23, 68, 0.3);
  opacity: 0.6;
  cursor: not-allowed;
}

.round-info {
  font-size: 14px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.round-info span { color: var(--primary); font-weight: 700; }

.ladder-progress {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mini-player {
  font-size: 12px;
  background: var(--bg2);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--bg3);
}
.mini-pos { color: var(--text-dim); font-size: 11px; }

.question-card {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.timer-bar-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bg3);
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: var(--primary);
  transition: width 1s linear;
}

.timer-bar.warning { background: var(--red); }

.timer-display {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.timer-display.warning { color: var(--red); animation: pulse 0.5s infinite alternate; }

@keyframes pulse { from { opacity: 1; } to { opacity: 0.4; } }

.question-text { font-size: 20px; font-weight: 600; line-height: 1.4; }

.guess-area { width: 100%; }

.slider-container { width: 100%; margin: 20px 0 30px; }

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 0;
  padding: 0 2px;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 6px 2px 0;
}
.slider-ticks span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
  opacity: 0.8;
}
#screen-game .slider-ticks span {
  color: var(--gold);
  opacity: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 18px;
  border-radius: 9px;
  margin: 18px 0 12px;
  background: linear-gradient(to bottom, #555, #333, #555);
  border: 2px solid #666;
  outline: none;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.1);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #eee, #aaa 50%, #777);
  cursor: pointer;
  border: 2px solid #999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.5);
}

.guess-value-display {
  text-align: center;
  margin: 12px 0;
  background: var(--bg2);
  border: 2px solid var(--bg3);
  border-radius: 8px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 20px;
  margin-left: auto;
  margin-right: auto;
}
.guess-area { width: 100%; text-align: center; }
.guess-value-display span:first-child {
  font-size: 42px;
  font-weight: 900;
  color: var(--gold);
}
.guess-value-display span:last-child {
  font-size: 18px;
  color: var(--text-dim);
}

.guess-status { text-align: center; color: var(--text-dim); font-size: 14px; margin-top: 10px; }

.waiting-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 40px;
}

.waiting-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg3);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Reveal Screen ─── */
.reveal-question {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  padding: 20px;
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  width: 100%;
}

.reveal-answer-box {
  text-align: center;
  padding: 18px 24px;
  background: var(--bg2);
  border-radius: var(--radius);
  width: 100%;
  border: 2px solid var(--green);
}
.reveal-answer-label { font-size: 13px; color: var(--text-dim); display: block; margin-bottom: 4px; }
.reveal-answer-value { font-size: 38px; font-weight: 900; color: var(--green); }

.reveal-slider-area {
  width: 100%;
  padding: 40px 14px 24px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--bg3);
}

.reveal-track {
  position: relative;
  width: 100%;
  height: 22px;
  margin-bottom: 8px;
}

.reveal-track-bar {
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to bottom, #555, #333, #555);
  border: 2px solid #666;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.1);
}

.reveal-correct-dot {
  position: absolute;
  top: -5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6ffc6f, var(--green) 60%, #009940);
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 0 10px var(--green), 0 2px 6px rgba(0,0,0,0.4);
  transform: translateX(-50%);
  z-index: 10;
}

.reveal-guess-marker {
  position: absolute;
  transform: translateX(-50%);
  z-index: 5;
}

.reveal-guess-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.reveal-player-labels {
  position: relative;
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
}

.reveal-player-label {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
}

.reveal-label-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.reveal-label-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.reveal-ranking {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reveal-rank-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--bg3);
}
.reveal-rank-card.top { border-color: var(--gold); background: linear-gradient(135deg, var(--bg2), #2a2000); }

.reveal-rank-icon { font-size: 18px; width: 26px; text-align: center; }
.reveal-rank-name { flex: 1; font-weight: 600; font-size: 14px; }
.reveal-rank-guess { font-size: 13px; color: var(--text-dim); }
.reveal-rank-steps { font-size: 18px; font-weight: 900; color: var(--primary); }

/* ─── Results Screen ─── */
.answer-reveal {
  text-align: center;
  padding: 8px 16px;
  background: var(--bg2);
  border-radius: var(--radius);
  width: auto;
  border: 1px solid var(--bg3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.answer-label { font-size: 11px; color: var(--text-dim); }
.answer-value { font-size: 16px; font-weight: 700; color: var(--gold); }

.results-list { width: 100%; display: flex; flex-direction: column; gap: 8px; }

.result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--bg3);
  transition: all 0.3s;
}
.result-card.top { border-color: var(--gold); background: linear-gradient(135deg, var(--bg2), #2a2000); }

.result-rank {
  font-size: 20px;
  font-weight: 900;
  width: 30px;
  text-align: center;
}
.result-rank.gold { color: var(--gold); }

.result-info { flex: 1; }
.result-name { font-weight: 600; }
.result-guess { font-size: 13px; color: var(--text-dim); }
.result-label { font-size: 12px; padding: 2px 8px; border-radius: 20px; }
.result-label.good { background: var(--green); color: #000; }
.result-label.ok { background: var(--gold); color: #000; }
.result-label.bad { background: var(--red); color: #fff; }

.result-points { font-size: 24px; font-weight: 900; color: var(--primary); }
.result-streak { font-size: 11px; color: var(--gold); }

/* ─── Winner Banner ─── */
.winner-banner {
  width: 100%;
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, #2a2000, var(--bg2));
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 700;
  animation: winPulse 1.5s ease-in-out infinite;
}
@keyframes winPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
}

/* ─── Board Canvas ─── */
.ladder-visual {
  width: 100%;
  border-radius: var(--radius);
  margin: 5px 0;
  overflow: hidden;
  flex: 1;
}

#board-canvas,
#board-preview-canvas {
  width: 100%;
  display: block;
  border-radius: var(--radius);
}

#screen-results .btn-large,
#screen-board .btn-large {
  padding: 16px 36px;
  font-size: 18px;
  width: auto;
  min-width: 200px;
  z-index: 1;
}

/* ─── Wahrheit-oder-Pflicht End-Screen ─── */
#screen-wahrheit-end.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 20px;
}
.wahrheit-end-container {
  text-align: center;
  width: 100%;
  max-width: 560px;
}
.wahrheit-end-podium {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}
.wahrheit-end-crown { font-size: 58px; margin-bottom: 6px; }
.wahrheit-end-winner-figure {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8c14, #ffd24a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  box-shadow: 0 10px 40px rgba(255, 180, 40, 0.45), inset 0 0 0 4px rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
}
.wahrheit-end-podium-block {
  width: 160px;
  height: 80px;
  background: linear-gradient(180deg, #ffd24a, #c28708);
  border-radius: 12px 12px 0 0;
  color: #fff;
  font-size: 44px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.wahrheit-end-title {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff8c14, #ffd24a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.wahrheit-end-sub {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg2);
  padding: 16px;
  border-radius: 14px;
  border: 2px solid #ff8c14;
}

/* ─── Truth (Wahrheit oder Pflicht) ─── */
#screen-truth.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 30px;
  gap: 22px;
}
.truth-header { text-align: center; width: 100%; }
.truth-icon { font-size: 54px; margin-bottom: 6px; }
.truth-title {
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff8c14, #ffb43c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.truth-desc { color: var(--text-dim); font-size: 16px; line-height: 1.45; padding: 0 12px; }
.truth-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 720px;
}
.truth-card {
  width: 180px;
  height: 260px;
  border-radius: 14px;
  position: relative;
  perspective: 900px;
  cursor: pointer;
  transition: transform 0.2s;
}
.truth-card.disabled { cursor: not-allowed; opacity: 0.85; }
.truth-card-back, .truth-card-front {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  transition: transform 0.6s;
}
.truth-card-back {
  background: linear-gradient(135deg, #ff8c14 0%, #d66500 60%, #a64d00 100%);
  color: #fff;
  font-size: 90px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(255, 140, 30, 0.35), inset 0 0 0 3px rgba(255, 220, 160, 0.6);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.truth-card-front {
  background: #fff;
  color: #222;
  padding: 18px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  transform: rotateY(180deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 0 0 3px #ff8c14;
}
.truth-card.flipped .truth-card-back { transform: rotateY(-180deg); }
.truth-card.flipped .truth-card-front { transform: rotateY(0deg); }
.truth-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
#screen-truth.dare-theme .truth-title {
  background: linear-gradient(135deg, #f5d21e, #ffe352);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
#screen-truth.dare-theme .truth-card-back {
  background: linear-gradient(135deg, #f5d21e 0%, #cda812 60%, #a68700 100%);
  color: #2a2200;
  box-shadow: 0 8px 24px rgba(255, 225, 40, 0.35), inset 0 0 0 3px rgba(255, 245, 180, 0.6);
}
#screen-truth.dare-theme .truth-card-front {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 0 0 3px #f5d21e;
}

/* ─── Slide Challenge ─── */
.slide-header {
  text-align: center;
  width: 100%;
}
.slide-icon { font-size: 48px; margin-bottom: 5px; }
.slide-header h2 { font-size: 28px; color: var(--primary); margin-bottom: 5px; }
.slide-desc { color: var(--text-dim); font-size: 15px; }

.slide-question-card {
  width: 100%;
  background: var(--bg2);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.slide-question-text { font-size: 20px; font-weight: 600; line-height: 1.4; margin-bottom: 20px; }

.slide-options {
  display: flex;
  gap: 12px;
  width: 100%;
}

.slide-option-btn {
  flex: 1;
  padding: 18px 16px;
  font-size: 18px;
  font-weight: 700;
  border: 3px solid var(--bg3);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.slide-option-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.slide-option-btn.correct { border-color: var(--green); background: rgba(0, 230, 118, 0.15); color: var(--green); }
.slide-option-btn.wrong { border-color: var(--red); background: rgba(255, 23, 68, 0.15); color: var(--red); }

.slide-waiting { text-align: center; color: var(--text-dim); }

.slide-result-box {
  text-align: center;
  width: 100%;
  padding: 20px;
  background: var(--bg2);
  border-radius: var(--radius);
}
.slide-result-icon { font-size: 48px; margin-bottom: 10px; }
.slide-result-text { font-size: 18px; font-weight: 600; line-height: 1.4; }

/* ─── Wette Screen ─── */
#screen-bet.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 30px;
}
.bet-container {
  text-align: center;
  width: 100%;
  max-width: 500px;
}
.bet-icon { font-size: 48px; margin-bottom: 8px; }
.bet-title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--gold), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bet-question-preview {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 17px;
  font-weight: 600;
}
.bet-pick-label {
  color: var(--text-dim);
  margin-bottom: 12px;
  font-size: 15px;
}
.bet-pick-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}
.btn-bet-pick {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--bg3);
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-bet-pick.selected {
  background: var(--gold);
  color: #000;
  box-shadow: 0 0 16px rgba(255,215,0,0.5);
  transform: scale(1.15);
}
.btn-bet-pick:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.bet-pick-status {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 12px;
}
.bet-guess-status {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 8px;
}
.bet-result-answer {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--gold);
  font-weight: 700;
}
.bet-result-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.bet-result-row {
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
}
.bet-result-name { font-weight: 700; }
.bet-result-wager { color: var(--text-dim); font-size: 14px; justify-self: end; }
.bet-result-guess { color: var(--text-dim); font-size: 14px; justify-self: start; }
.bet-result-steps { font-weight: 900; font-size: 18px; justify-self: end; }

/* ─── Trinkspiel End Screen ─── */
#screen-trinkspiel-end.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 30px;
}
.trinkspiel-end-container {
  text-align: center;
  width: 100%;
  max-width: 520px;
}
.trinkspiel-end-icon { font-size: 56px; margin-bottom: 8px; }
.trinkspiel-end-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffd54f, #ff9800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.trinkspiel-end-sub {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 18px;
}
.trinkspiel-loser-box {
  background: rgba(255, 87, 34, 0.12);
  border: 1px solid rgba(255, 87, 34, 0.5);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-weight: 700;
  color: #ffccbc;
}
.trinkspiel-loser-box .extra { color: #ff7043; font-size: 20px; font-weight: 900; }
.trinkspiel-distribute-label {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.trinkspiel-distribute-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.trinkspiel-distribute-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg2);
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 213, 79, 0.3);
}
.trinkspiel-distribute-name { font-weight: 700; }
.trinkspiel-distribute-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.trinkspiel-distribute-controls button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #ffd54f;
  background: var(--bg3);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.trinkspiel-distribute-controls button:disabled { opacity: 0.3; cursor: not-allowed; }
.trinkspiel-distribute-value { min-width: 22px; text-align: center; font-weight: 900; font-size: 18px; }
.trinkspiel-distribute-remaining {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.trinkspiel-final-headline {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 14px;
  color: #ffd54f;
}
.trinkspiel-final-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.trinkspiel-final-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg2);
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 213, 79, 0.35);
  font-weight: 700;
}
.trinkspiel-final-row.loser {
  border-color: rgba(255, 87, 34, 0.5);
  background: rgba(255, 87, 34, 0.1);
}
.trinkspiel-final-row .amount { color: #ffd54f; font-size: 20px; font-weight: 900; }
.trinkspiel-final-row.loser .amount { color: #ff7043; }

/* ─── Überhol-Overlay (Trinkspiel) ─── */
.overtake-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: overtake-fade 0.25s ease-out;
}
@keyframes overtake-fade { from { opacity: 0; } to { opacity: 1; } }
.overtake-card {
  background: linear-gradient(160deg, #2a1a0a, #4a2510);
  border: 2px solid #ff9800;
  border-radius: 16px;
  padding: 24px 22px;
  max-width: 420px;
  width: calc(100% - 32px);
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 152, 0, 0.4);
}
.overtake-icon { font-size: 52px; margin-bottom: 6px; }
.overtake-title {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffb74d, #ff5722);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.overtake-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.overtake-row {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 152, 0, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
}
.overtake-row .overtaker { color: #ffb74d; font-weight: 900; }
.overtake-row .overtaken { color: #ff7043; font-weight: 900; }
.overtake-row .overtake-shot {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: #ffd180;
  font-weight: 700;
}

/* ─── Shot Wette (Trinkspiel) ─── */
#screen-shot-bet.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 30px;
}
.shot-bet-container .bet-title {
  background: linear-gradient(135deg, #ffb74d, #ff5722);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.shot-bet-sub {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 18px;
}
.btn-bet-pick.shot {
  border-color: #ff9800;
}
.btn-bet-pick.shot.selected {
  background: #ff9800;
  color: #000;
  box-shadow: 0 0 16px rgba(255, 152, 0, 0.6);
}
.shot-bet-question-text {
  background: var(--bg2);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0 16px;
  font-size: 18px;
  font-weight: 700;
  white-space: pre-line;
}
.shot-bet-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.shot-bet-options button {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 2px solid #ff9800;
  background: var(--bg3);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.shot-bet-options button:disabled { opacity: 0.5; cursor: not-allowed; }
.shot-bet-distribute-label {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.shot-bet-distribute-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.shot-bet-distribute-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg2);
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
}
.shot-bet-distribute-name { font-weight: 700; }
.shot-bet-distribute-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shot-bet-distribute-controls button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #ff9800;
  background: var(--bg3);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.shot-bet-distribute-controls button:disabled { opacity: 0.3; cursor: not-allowed; }
.shot-bet-distribute-value { min-width: 22px; text-align: center; font-weight: 900; font-size: 18px; }
.shot-bet-distribute-remaining {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.shot-bet-result-icon { font-size: 56px; margin-bottom: 8px; }
.shot-bet-result-headline {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}
.shot-bet-result-headline.correct { color: var(--green); }
.shot-bet-result-headline.wrong { color: var(--red); }
.shot-bet-result-answer {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 14px;
}
.shot-bet-result-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.shot-bet-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg2);
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 152, 0, 0.3);
  font-weight: 700;
}
.shot-bet-result-row .amount { color: #ff9800; font-size: 20px; font-weight: 900; }
.shot-bet-waiting { margin-top: 20px; }

/* ─── Duell Screen ─── */
#screen-duel.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}
.duel-container {
  text-align: center;
  width: 100%;
  max-width: 500px;
}
.duel-icon {
  font-size: 48px;
  margin-bottom: 10px;
}
.duel-title {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--green), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.duel-subtitle {
  color: var(--text-dim);
  margin-bottom: 20px;
  font-size: 16px;
}
.duel-opponent-select {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.btn-duel-opponent {
  background: var(--bg3);
  color: var(--text);
  border: 2px solid var(--green);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-duel-opponent:disabled { opacity: 0.5; cursor: not-allowed; }

.duel-question-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
}
.duel-options {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}
.duel-result-box {
  margin-top: 20px;
}
.duel-result-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.duel-result-card {
  background: var(--bg2);
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 120px;
}
.duel-result-name {
  font-weight: 700;
  font-size: 16px;
}
.duel-result-icon {
  font-size: 28px;
}
.duel-result-steps {
  font-size: 22px;
  font-weight: 900;
}
.duel-vs {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-dim);
}
.duel-correct-answer {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-dim);
  width: 100%;
}

/* ─── Split or Steal ─── */
.split-description {
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
  max-width: 400px;
}

.split-table { width: 100%; overflow-x: auto; }
.split-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.split-table th, .split-table td {
  padding: 10px 12px;
  text-align: center;
  border: 1px solid var(--bg3);
}
.split-table th { background: var(--bg3); color: var(--text-dim); font-size: 12px; text-transform: uppercase; }
.split-table .green { color: var(--green); font-weight: 600; }
.split-table .red { color: var(--red); font-weight: 600; }

.split-score {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}
.split-score span { color: var(--gold); font-size: 28px; }

.split-buttons {
  display: flex;
  gap: 16px;
  width: 100%;
}
.btn-split {
  flex: 1;
  padding: 20px;
  font-size: 20px;
  font-weight: 700;
  border: 3px solid var(--green);
  border-radius: var(--radius);
  background: transparent;
  color: var(--green);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-steal {
  flex: 1;
  padding: 20px;
  font-size: 20px;
  font-weight: 700;
  border: 3px solid var(--red);
  border-radius: var(--radius);
  background: transparent;
  color: var(--red);
  cursor: pointer;
  transition: all 0.2s;
}

.split-waiting { text-align: center; color: var(--text-dim); }

/* ─── Split or Steal (Kollision) ─── */
.split-collision {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 12px 0 6px;
}
.split-bigtitle {
  text-align: center;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 3px;
  margin: 18px 0 16px;
  background: linear-gradient(135deg, var(--green), var(--gold), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.25);
}
.split-spectator {
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 14px;
}
.split-result-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}
.split-result-card {
  min-width: 200px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 3px solid transparent;
  text-align: center;
}
.split-result-card.choice-split { border-color: var(--green); }
.split-result-card.choice-steal { border-color: var(--red); }
.split-result-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.split-result-choice {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.choice-split .split-result-choice { color: var(--green); }
.choice-steal .split-result-choice { color: var(--red); }
.split-result-delta {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dim);
}
.split-result-delta.delta-pos { color: var(--green); }
.split-result-delta.delta-neg { color: var(--red); }
.split-result-summary {
  text-align: center;
  font-size: 18px;
  color: var(--text);
  margin: 10px 0 18px;
  max-width: 540px;
}
#screen-split-result {
  align-items: center;
}
#btn-split-continue { margin-top: 8px; }

/* ─── Rush Mode ─── */
/* Kein display:flex hier – das würde .screen{display:none} überschreiben und
   den Screen (inkl. Verlassen-Button) auch auf anderen Ansichten zeigen.
   .screen.active liefert bereits flex-column. */
#screen-rush.active {
  position: relative;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
  overflow: hidden;
}
#rush-canvas {
  width: 100%;
  border-radius: var(--radius);
  flex: 0 0 auto;
}
.rush-question-overlay {
  position: static;
  width: 100%;
  background: rgba(15,15,26,0.95);
  padding: 14px 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}
.rush-question-text {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  white-space: pre-line;
  line-height: 1.4;
  max-width: 720px;
}
.rush-options {
  width: 100%;
  max-width: 420px;
  display: flex;
  gap: 12px;
  justify-content: center;
}
.rush-options .btn-rush-option {
  flex: 1;
  padding: 16px 12px;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg3, #1f2040);
  color: var(--text, #fff);
  border: 2px solid var(--gold, #ffd700);
  border-radius: var(--radius, 10px);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}
.rush-options .btn-rush-option:disabled { opacity: 0.55; cursor: not-allowed; }
.rush-options .btn-rush-option.correct { background: var(--green, #00e676); color: #111; border-color: var(--green, #00e676); }
.rush-options .btn-rush-option.wrong { background: var(--red, #ff1744); color: #fff; border-color: var(--red, #ff1744); }
.rush-result-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 10;
}
.rush-result-icon { font-size: 64px; }
.rush-result-text { font-size: 18px; font-weight: 700; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.9); margin-top: 8px; }

#screen-rush-winner { justify-content: center; align-items: center; }
#rush-winner-canvas { border-radius: var(--radius); max-width: 100%; }

/* ─── Podium / Game Over ─── */
#screen-gameover { justify-content: center; align-items: center; }
#podium-canvas { border-radius: var(--radius); max-width: 100%; }

/* ─── Board Preview ─── */
#screen-board-preview {
  position: relative;
}
#screen-board-preview::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('board-bg.jpg') center/cover no-repeat;
  z-index: -2;
}
#screen-board-preview.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 20px;
  gap: 2px;
}

.board-preview-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  text-align: center;
  margin: 0;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.board-preview-countdown {
  font-size: 36px;
  font-weight: 900;
  color: var(--primary);
  text-align: center;
  margin: 0;
  text-shadow: 0 0 20px var(--primary-glow);
}

#screen-board {
  position: relative;
}
#screen-board::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('board-bg.jpg') center/cover no-repeat;
  z-index: -2;
}
body[data-mode="standard"] #screen-board::before,
body[data-mode="standard"] #screen-board-preview::before,
body[data-mode="bib_antike"] #screen-board::before,
body[data-mode="bib_antike"] #screen-board-preview::before,
body[data-mode="bib_roemer"] #screen-board::before,
body[data-mode="bib_roemer"] #screen-board-preview::before,
body[data-mode="bib_aegypten"] #screen-board::before,
body[data-mode="bib_aegypten"] #screen-board-preview::before,
body[data-mode="bib_wikinger"] #screen-board::before,
body[data-mode="bib_wikinger"] #screen-board-preview::before,
body[data-mode^="custom:"] #screen-board::before,
body[data-mode^="custom:"] #screen-board-preview::before {
  background: url('board-bg-standard.jpg') center/cover no-repeat;
}
/* Schweiz: Canvas zeichnet das BG-Bild direkt (für Pixel-exakte
   Ausrichtung der Felder auf den Schubladen) — kein body-BG nötig. */
body[data-mode="laender_schweiz"] #screen-board::before,
body[data-mode="laender_schweiz"] #screen-board-preview::before {
  background: #1a2238;
}
body[data-mode="laender_deutschland"] #screen-board::before,
body[data-mode="laender_deutschland"] #screen-board-preview::before,
body[data-mode="laender_oesterreich"] #screen-board::before,
body[data-mode="laender_oesterreich"] #screen-board-preview::before,
body[data-mode="laender_england"] #screen-board::before,
body[data-mode="laender_england"] #screen-board-preview::before {
  background: url('board-bg-allgemein.png') center/cover no-repeat;
}
body[data-mode="laender_italien"] #screen-board::before,
body[data-mode="laender_italien"] #screen-board-preview::before,
body[data-mode="laender_amerika"] #screen-board::before,
body[data-mode="laender_amerika"] #screen-board-preview::before {
  background: url('board-bg-road.jpg') center/cover no-repeat;
}
body[data-mode="trinkspiel"] #screen-board::before,
body[data-mode="trinkspiel"] #screen-board-preview::before {
  background: url('board-bg-trinkspiel.webp') center/cover no-repeat;
}
body[data-mode="fun"] #screen-board::before,
body[data-mode="fun"] #screen-board-preview::before {
  background: url('board-bg-fun.jpg') center/cover no-repeat;
}
body[data-mode="wahrheit"] #screen-board::before,
body[data-mode="wahrheit"] #screen-board-preview::before {
  background: url('board-bg-wahrheit.webp') center/cover no-repeat;
}
body[data-mode="allgemein"] #screen-board::before,
body[data-mode="allgemein"] #screen-board-preview::before {
  background: url('board-bg-allgemein.png') center/cover no-repeat;
}
#screen-board.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px 10px;
}

.board-answer-mini {
  font-size: 18px;
  color: #fff;
  text-align: center;
  padding: 6px 18px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  width: 100%;
  z-index: 1;
}

.board-answer-mini .board-answer-label {
  color: #fff;
}

.board-answer-mini .board-answer-value {
  color: #ffd700;
  font-weight: 900;
  font-size: 20px;
}

#screen-board .ladder-visual {
  width: 100%;
  flex: 1;
}

#screen-board .btn-large {
  margin-top: 6px;
}

#board-preview-canvas {
  width: 100%;
  display: block;
  border-radius: var(--radius);
}

/* ─── Auth ─── */
.auth-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.auth-info { display: contents; }
.auth-label {
  font-size: 13px;
  color: var(--text-dim);
}
.auth-info strong {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  color: var(--text);
  text-align: center;
  pointer-events: none;
}
.auth-coins { display: none; }
.auth-status .btn-link {
  padding: 4px 2px;
}
.btn-link {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tab {
  flex: 1;
  padding: 12px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
}
.auth-tab.active {
  color: var(--text);
  background: var(--bg3);
}
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input {
  padding: 12px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
}
.auth-form input:focus { outline: none; border-color: var(--primary); }

/* ─── Konto-Modal ─── */
.konto-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.konto-tabs::-webkit-scrollbar { display: none; }
.konto-tab {
  flex: 1 0 auto;
  padding: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #d8d8e6;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}
.konto-tab.active {
  color: var(--text);
  background: var(--bg3);
}
.konto-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.konto-panel > * { min-width: 0; }
#konto-modal .modal-content { min-height: 620px; overflow-x: hidden; }
#konto-modal .konto-readonly,
#konto-modal .konto-guest,
#konto-modal .community-intro,
#konto-modal #community-input,
#konto-modal #community-list { overflow-wrap: anywhere; word-break: break-word; }
#shop-modal .modal-content { min-height: 620px; }
#skins-modal .modal-content { min-height: 620px; }
.konto-guest {
  padding: 14px;
  background: var(--bg2);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.konto-guest p { margin: 0; }
.konto-guest-login-btn { min-width: 160px; }
.konto-field { display: flex; flex-direction: column; gap: 4px; }
.konto-field label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.konto-readonly {
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
}
.konto-name-row { display: flex; gap: 8px; }
.konto-name-row input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
}
.konto-name-row input:focus { outline: none; border-color: var(--primary); }
.konto-name-row button { padding: 10px 14px; font-size: 13px; }
.konto-skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  padding: 10px;
  background: var(--bg2);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
  min-height: 72px;
}
.konto-skin-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--bg3);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.konto-skin-tile .skin-preview {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}
.konto-skin-tile .skin-preview svg { width: 100%; height: 100%; }
.konto-skin-tile span { font-size: 11px; color: var(--text-dim); text-align: center; }
.konto-empty { text-align: center; color: var(--text-dim); padding: 40px 10px; }

/* ─── Community-Tab ─── */
.community-intro {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 4px;
  text-align: center;
}
#community-input {
  width: 100%;
  min-height: 90px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
#community-input:focus { outline: none; border-color: var(--primary); }
.community-wordcount {
  text-align: right;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: -6px;
}
.community-wordcount.over { color: #ff5a6e; }
#btn-community-submit { align-self: stretch; }
.community-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.community-list-title {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.community-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 2px;
}
.community-item {
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
}
.community-item .community-meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.rangliste-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}
.rangliste-table th,
.rangliste-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rangliste-table th {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #bbb;
  font-weight: 600;
}
.rangliste-table td.rl-rank,
.rangliste-table th.rl-rank {
  width: 38px;
  text-align: center;
  color: #888;
  font-weight: 700;
}
.rangliste-table td.rl-name {
  font-weight: 600;
}
.rangliste-table td.rl-crowns,
.rangliste-table th.rl-crowns {
  text-align: right;
  white-space: nowrap;
  color: #ffd700;
  font-weight: 700;
}
/* ─── Rangliste-Scope-Tabs (Monat / Welt) ─── */
.rl-scope-tabs {
  display: flex;
  gap: 8px;
}
.rl-scope-tab {
  flex: 1;
  padding: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #d8d8e6;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.rl-scope-tab.active {
  color: var(--text);
  background: var(--bg3);
}
.rl-month-title {
  margin: 4px 0 0;
  text-align: center;
  font-size: 17px;
  color: var(--text);
}
/* ─── Rangliste-Podium (Top 3) ─── */
.rl-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 18px;
}
.rl-podium-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 130px;
}
.rl-podium-medal { font-size: 30px; line-height: 1; margin-bottom: 4px; }
.rl-podium-1 .rl-podium-medal { font-size: 42px; }
.rl-podium-name {
  font-weight: 700;
  font-size: 0.95em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-bottom: 2px;
}
.rl-podium-crowns {
  color: #ffd700;
  font-weight: 700;
  font-size: 0.9em;
  margin-bottom: 6px;
}
.rl-podium-block {
  width: 100%;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.rl-podium-1 .rl-podium-block { height: 92px; background: linear-gradient(180deg, #ffd24a, #c28708); }
.rl-podium-2 .rl-podium-block { height: 66px; background: linear-gradient(180deg, #e2e2e2, #9a9a9a); }
.rl-podium-3 .rl-podium-block { height: 48px; background: linear-gradient(180deg, #e0a064, #b06a2a); }
.konto-danger-zone {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}
.btn-konto-delete {
  background: transparent;
  color: #ff5a6e;
  border: 1px solid rgba(255, 90, 110, 0.4);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger {
  background: #e94560;
  color: #fff;
  border: none;
  font-weight: 700;
}
.konto-coin-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  vertical-align: -3px;
  border-radius: 50%;
  background:
    /* eingravierter Stern + Innenring + Körper */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'>\
<defs>\
<radialGradient id='c' cx='35%25' cy='35%25' r='70%25'>\
<stop offset='0%25' stop-color='%23fff6b0'/>\
<stop offset='45%25' stop-color='%23ffd700'/>\
<stop offset='100%25' stop-color='%23b8860b'/>\
</radialGradient>\
</defs>\
<circle cx='16' cy='16' r='15' fill='url(%23c)'/>\
<circle cx='16' cy='16' r='11.5' fill='none' stroke='%238a6d1f' stroke-width='0.9' opacity='0.55'/>\
<circle cx='16' cy='16' r='11.5' fill='none' stroke='%23fff4c0' stroke-width='0.5' stroke-dasharray='1 1.8' opacity='0.7'/>\
<path d='M16 8 L18 14 L24.5 14 L19.3 17.8 L21.3 24 L16 20.1 L10.7 24 L12.7 17.8 L7.5 14 L14 14 Z' fill='%23b8860b' opacity='0.55'/>\
<path d='M16 9 L17.7 14 L23 14 L18.7 17.2 L20.4 22 L16 19.1 L11.6 22 L13.3 17.2 L9 14 L14.3 14 Z' fill='none' stroke='%23fff4c0' stroke-width='0.35' opacity='0.6'/>\
</svg>") center/100% no-repeat;
  border: 1px solid #8a6d1f;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* ─── Responsive ─── */
@media (max-width: 500px) {
  .logo h1 { font-size: 36px; }
  .question-text { font-size: 17px; }
  .guess-value-display span:first-child { font-size: 32px; }
  .split-buttons { flex-direction: column; }
}

/* ─── Brücken-Modus ─────────────────────────────────────────── */
#screen-bruecken {
  background: radial-gradient(ellipse at top, #0c1530 0%, #05070f 70%);
  min-height: 100vh;
  padding: 12px;
}
#screen-bruecken.active {
  display: flex;
  flex-direction: column;
}
.bruecken-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding-top: 32px;
}
.bruecken-status {
  font-size: 15px;
  font-weight: 600;
  color: #9fb3d1;
  text-align: center;
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  min-height: 22px;
}
.bruecken-status.my-turn { color: #ffd600; border-color: rgba(255,214,0,0.4); background: rgba(255,214,0,0.08); }
.bruecken-question-banner {
  width: 100%;
  max-width: 420px;
  padding: 12px 14px;
  background: rgba(10,20,40,0.85);
  border: 1px solid rgba(120,200,255,0.3);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: #f3f6ff;
  min-height: 44px;
  line-height: 1.35;
}
.bruecken-board {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 600px;
  gap: 5px;
  flex: 1 1 auto;
}
.bruecken-rows {
  flex: 1 1 auto;
}
.bruecken-goal, .bruecken-start {
  padding: 14px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: 10px;
  min-height: 52px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.bruecken-goal {
  background: linear-gradient(135deg, #ffd600, #ff9100);
  color: #111;
  box-shadow: 0 0 18px rgba(255,214,0,0.35);
}
.bruecken-start {
  background: linear-gradient(135deg, #37474f, #263238);
  color: #eceff1;
}
.bruecken-rows {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
}
.bruecken-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  position: relative;
  min-height: 46px;
  flex: 1 1 auto;
}
.bruecken-tile {
  min-height: 46px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(100,180,255,0.12), rgba(50,120,200,0.06));
  border: 1px solid rgba(120,200,255,0.2);
  position: relative;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 4px 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  overflow: visible;
  perspective: 300px;
}
.bruecken-tile .tile-label {
  font-weight: 700;
  letter-spacing: 1px;
}
/* Aktive Zielzeile: Tiles werden zu anklickbaren Antwort-Feldern */
.bruecken-row.active-target {
  min-height: 88px;
  flex: 2 1 auto;
}
.bruecken-row.active-target .bruecken-tile {
  background: linear-gradient(180deg, rgba(100,200,255,0.22), rgba(50,150,220,0.12));
  border: 2px solid rgba(120,220,255,0.55);
  box-shadow: 0 0 12px rgba(100,200,255,0.25);
  cursor: default;
  font-size: 14px;
  color: #f3f6ff;
  padding: 6px 8px;
  line-height: 1.25;
  text-align: left;
  min-height: 88px;
  font-weight: 500;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
}
.bruecken-row.active-target .tile-letter {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  flex: 0 0 auto;
}
.bruecken-row.active-target .tile-answer {
  flex: 1 1 auto;
  text-align: left;
}
.bruecken-row.active-target.can-click .bruecken-tile { cursor: pointer; }
.bruecken-tile.preview {
  background: linear-gradient(180deg, rgba(255,220,0,0.32), rgba(255,150,0,0.22)) !important;
  border-color: rgba(255,220,0,0.85) !important;
}
.bruecken-tile.correct {
  background: linear-gradient(180deg, rgba(0,230,118,0.55), rgba(0,180,80,0.35)) !important;
  border-color: rgba(0,230,118,0.95) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(0,230,118,0.5) !important;
}
.bruecken-tile.wrong {
  background: linear-gradient(180deg, rgba(255,23,68,0.55), rgba(180,10,40,0.35)) !important;
  border-color: rgba(255,23,68,0.95) !important;
  color: #fff !important;
}
/* Feld bricht / öffnet sich → zwei Hälften klappen auseinander */
.bruecken-tile.broken {
  animation: tile-break 0.6s ease-in forwards;
  transform-origin: center;
}
@keyframes tile-break {
  0%   { transform: rotateX(0deg); opacity: 1; }
  30%  { transform: rotateX(0deg); opacity: 1; }
  100% { transform: rotateX(90deg); opacity: 0; }
}

.bruecken-player {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translate(-50%, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: bottom 0.45s ease, left 0.45s ease, transform 0.45s ease, opacity 0.3s;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.55));
  width: 84px;
}
.bruecken-player .player-skin-wrap {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.bruecken-player.my-player .player-skin-wrap { border-color: transparent; box-shadow: none; }
.bruecken-player .player-skin-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}
.bruecken-player .player-name-label {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: transparent;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 4px rgba(0,0,0,0.75);
}
/* Sprung-Animationen auf das gewählte Antwort-Tile (FLIP: startet an alter Position --jump-dx/--jump-dy, endet zentriert) */
.bruecken-player.jumping { z-index: 10; }
.bruecken-player.jumping-default {
  animation: bruecken-jump-default 0.75s cubic-bezier(.3,.1,.5,1) forwards;
}
@keyframes bruecken-jump-default {
  0%   { transform: translate(calc(-50% + var(--jump-dx, 0px)), var(--jump-dy, 0px)) scale(1); }
  50%  { transform: translate(calc(-50% + var(--jump-dx, 0px) * 0.5), calc(var(--jump-dy, 0px) * 0.5 - 48px)) scale(1.1); }
  100% { transform: translate(-50%, 0) scale(1); }
}

.bruecken-player.jumping-batman {
  animation: bruecken-jump-batman 0.85s cubic-bezier(.3,.1,.5,1) forwards;
}
@keyframes bruecken-jump-batman {
  0%   { transform: translate(calc(-50% + var(--jump-dx, 0px)), var(--jump-dy, 0px)) rotate(0deg); }
  50%  { transform: translate(calc(-50% + var(--jump-dx, 0px) * 0.5), calc(var(--jump-dy, 0px) * 0.5 - 60px)) rotate(180deg); }
  100% { transform: translate(-50%, 0) rotate(360deg); }
}

.bruecken-player.jumping-astronaut {
  animation: bruecken-jump-astronaut 0.9s cubic-bezier(.3,.1,.5,1) forwards;
}
.bruecken-player.jumping-astronaut::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  width: 22px;
  height: 34px;
  background: radial-gradient(ellipse at 50% 20%, #fff8b0 0%, #ffb300 35%, #ff3d00 75%, rgba(255,0,0,0) 100%);
  filter: blur(1.5px);
  border-radius: 50% 50% 40% 40% / 40% 40% 60% 60%;
  transform: translateX(-50%);
  animation: astronaut-flame 0.08s infinite alternate;
  pointer-events: none;
}
@keyframes astronaut-flame {
  0%   { opacity: 0.95; transform: translateX(-50%) scaleY(1) scaleX(1); }
  100% { opacity: 0.7;  transform: translateX(-50%) scaleY(0.7) scaleX(0.85); }
}
@keyframes bruecken-jump-astronaut {
  0%   { transform: translate(calc(-50% + var(--jump-dx, 0px)), var(--jump-dy, 0px)) rotate(0deg); }
  25%  { transform: translate(calc(-50% + var(--jump-dx, 0px) * 0.75), calc(var(--jump-dy, 0px) * 0.75 - 50px)) rotate(6deg); }
  60%  { transform: translate(calc(-50% + var(--jump-dx, 0px) * 0.3), calc(var(--jump-dy, 0px) * 0.3 - 80px)) rotate(8deg); }
  100% { transform: translate(-50%, 0) rotate(0deg); }
}

.bruecken-player.jumping-homer {
  animation: bruecken-jump-homer 0.75s cubic-bezier(.3,.1,.5,1) forwards;
}
@keyframes bruecken-jump-homer {
  0%   { transform: translate(calc(-50% + var(--jump-dx, 0px)), var(--jump-dy, 0px)) scale(1); }
  30%  { transform: translate(calc(-50% + var(--jump-dx, 0px) * 0.65), calc(var(--jump-dy, 0px) * 0.65 - 35px)) scale(1.08); }
  60%  { transform: translate(calc(-50% + var(--jump-dx, 0px) * 0.3), calc(var(--jump-dy, 0px) * 0.3 - 40px)) scale(1.05); }
  100% { transform: translate(-50%, 0) scale(1); }
}

/* Engel: sanfter Flugbogen, schwebt höher + länger */
.bruecken-player.jumping-engel {
  animation: bruecken-jump-engel 0.95s cubic-bezier(.25,.1,.5,1) forwards;
}
@keyframes bruecken-jump-engel {
  0%   { transform: translate(calc(-50% + var(--jump-dx, 0px)), var(--jump-dy, 0px)); }
  30%  { transform: translate(calc(-50% + var(--jump-dx, 0px) * 0.7), calc(var(--jump-dy, 0px) * 0.7 - 55px)); }
  60%  { transform: translate(calc(-50% + var(--jump-dx, 0px) * 0.3), calc(var(--jump-dy, 0px) * 0.3 - 70px)); }
  100% { transform: translate(-50%, 0); }
}
/* Leichter goldener Glow hinterm Engel während Flug */
.bruecken-player.jumping-engel::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  width: 90%;
  height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, rgba(255,244,168,0.5) 0%, rgba(255,225,120,0.2) 50%, rgba(255,225,120,0) 80%);
  border-radius: 50%;
  filter: blur(3px);
  pointer-events: none;
  z-index: -1;
}

.bruecken-player.falling {
  animation: bruecken-fall 0.8s ease-in forwards;
}
@keyframes bruecken-fall {
  0%   { transform: translate(-50%, 0) rotate(0deg); opacity: 1; }
  30%  { transform: translate(-50%, 40%) rotate(-25deg); opacity: 1; }
  100% { transform: translate(-50%, 220%) rotate(90deg); opacity: 0; }
}
.bruecken-start .bruecken-player {
  position: relative;
  transform: none;
  bottom: auto;
  left: auto;
  margin: 2px 4px;
}
.bruecken-start .bruecken-player { width: 56px; }
.bruecken-start .bruecken-player .player-skin-wrap { width: 52px; height: 52px; }

@media (max-width: 500px) {
  .bruecken-tile { font-size: 11px; min-height: 38px; }
  .bruecken-row { min-height: 38px; }
  .bruecken-row.active-target { min-height: 74px; }
  .bruecken-row.active-target .bruecken-tile { font-size: 12px; padding: 4px 5px; min-height: 74px; }
  .bruecken-row.active-target .tile-letter { width: 22px; height: 22px; line-height: 22px; font-size: 12px; }
  .bruecken-player { width: 70px; }
  .bruecken-player .player-skin-wrap { width: 64px; height: 64px; }
  .bruecken-start .bruecken-player { width: 48px; }
  .bruecken-start .bruecken-player .player-skin-wrap { width: 44px; height: 44px; }
  .bruecken-question-banner { font-size: 14px; padding: 10px 12px; }
  .bruecken-goal, .bruecken-start { padding: 10px; min-height: 44px; font-size: 14px; }
}

/* ─── Trust me (not) ─────────────────────────────────────────── */
#screen-trustmenot,
#screen-woerter {
  padding: 12px;
  overflow-y: auto;
  position: relative;
}
/* Fullscreen-Hintergrund via fixed pseudo-Element – sprengt die #app-Max-Width */
#screen-trustmenot::before,
#screen-woerter::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
  transition: background-image 0.3s ease;
}
/* Schreibe-, Abstimmungs- und Reveal-Ansicht: dunkle Blätter (nur Trust me not) */
#screen-trustmenot[data-phase="writing"]::before,
#screen-trustmenot[data-phase="voting"]::before,
#screen-trustmenot[data-phase="reveal"]::before {
  background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('trust-bg-leaves.jpg');
}
/* Trust me (not) Spielfeld: Sonnenuntergangs-Strasse */
#screen-trustmenot[data-phase="countdown"]::before,
#screen-trustmenot[data-phase="move"]::before {
  background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('trust-bg-road.jpg');
}
/* Wörter Jagd Standard-Hintergrund: Tafel-Look (überall ausser Spielfeld) */
#screen-woerter::before {
  background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('woerter-bg.jpg');
}
/* End-Screen ebenfalls auf Tafel-Look */
#screen-woerter-end {
  position: relative;
}
#screen-woerter-end::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('woerter-bg.jpg') center/cover no-repeat;
  pointer-events: none;
}
/* Wörter Jagd Spielfeld: Fantasy-Schloss in den Wolken */
#screen-woerter[data-phase="countdown"]::before,
#screen-woerter[data-phase="move"]::before {
  background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('trust-bg-fantasy.jpg');
}
.trust-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  padding-top: 40px;
}

/* Phasenabhängige Sichtbarkeit */
.trust-board-wrap,
.trust-next-wrap,
.trust-question,
.trust-slots,
.trust-actions,
.trust-info,
.trust-countdown-overlay,
#trust-next-btn,
#trust-next-wait,
#woerter-next-btn,
#woerter-next-wait { display: none; }

#screen-trustmenot[data-phase="countdown"] .trust-board-wrap,
#screen-trustmenot[data-phase="move"] .trust-board-wrap,
#screen-woerter[data-phase="countdown"] .trust-board-wrap,
#screen-woerter[data-phase="move"] .trust-board-wrap { display: block; }
#btn-leave-trustmenot,
#btn-leave-woerter { display: none; }
#screen-trustmenot[data-phase="countdown"] #btn-leave-trustmenot,
#screen-trustmenot[data-phase="move"] #btn-leave-trustmenot,
#screen-woerter[data-phase="countdown"] #btn-leave-woerter,
#screen-woerter[data-phase="move"] #btn-leave-woerter { display: block; }
.trust-timer { display: none; }
#screen-trustmenot[data-phase="writing"] .trust-timer,
#screen-trustmenot[data-phase="voting"] .trust-timer,
#screen-woerter[data-phase="writing"] .trust-timer,
#screen-woerter[data-phase="voting"] .trust-timer,
#screen-woerter[data-phase="choose"] .trust-timer,
#screen-woerter[data-phase="play"] .trust-timer { display: block; }
#screen-trustmenot[data-phase="countdown"] .trust-countdown-overlay,
#screen-woerter[data-phase="countdown"] .trust-countdown-overlay { display: flex; }
#screen-trustmenot[data-phase="move"] .trust-next-wrap,
#screen-woerter[data-phase="move"] .trust-next-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#screen-trustmenot[data-phase="move"] .trust-info,
#screen-woerter[data-phase="move"] .trust-info { display: flex; }

#screen-trustmenot[data-phase="writing"] .trust-question,
#screen-trustmenot[data-phase="writing"] .trust-slots,
#screen-trustmenot[data-phase="writing"] .trust-actions,
#screen-trustmenot[data-phase="writing"] .trust-info,
#screen-trustmenot[data-phase="voting"] .trust-question,
#screen-trustmenot[data-phase="voting"] .trust-slots,
#screen-trustmenot[data-phase="voting"] .trust-info,
#screen-trustmenot[data-phase="reveal"] .trust-question,
#screen-trustmenot[data-phase="reveal"] .trust-slots,
#screen-trustmenot[data-phase="reveal"] .trust-info,
#screen-trustmenot[data-phase="reveal"] .trust-next-wrap,
#screen-woerter[data-phase="writing"] .trust-question,
#screen-woerter[data-phase="writing"] .trust-slots,
#screen-woerter[data-phase="writing"] .trust-actions,
#screen-woerter[data-phase="writing"] .trust-info,
#screen-woerter[data-phase="voting"] .trust-question,
#screen-woerter[data-phase="voting"] .trust-slots,
#screen-woerter[data-phase="voting"] .trust-info,
#screen-woerter[data-phase="reveal"] .trust-question,
#screen-woerter[data-phase="reveal"] .trust-slots,
#screen-woerter[data-phase="reveal"] .trust-info,
#screen-woerter[data-phase="reveal"] .trust-next-wrap { display: flex; }

#screen-trustmenot[data-phase="writing"] .trust-slots,
#screen-trustmenot[data-phase="voting"] .trust-slots,
#screen-trustmenot[data-phase="reveal"] .trust-slots,
#screen-woerter[data-phase="writing"] .trust-slots,
#screen-woerter[data-phase="voting"] .trust-slots,
#screen-woerter[data-phase="reveal"] .trust-slots { display: flex; flex-direction: column; }

#screen-trustmenot[data-phase="reveal"] .trust-next-wrap,
#screen-trustmenot[data-phase="move"] .trust-next-wrap,
#screen-woerter[data-phase="reveal"] .trust-next-wrap,
#screen-woerter[data-phase="move"] .trust-next-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }

#screen-trustmenot[data-phase="reveal"] #trust-next-btn,
#screen-woerter[data-phase="reveal"] #woerter-next-btn { display: inline-block; }
#screen-trustmenot[data-phase="move"][data-is-host="true"] #trust-next-btn,
#screen-woerter[data-phase="move"][data-is-host="true"] #woerter-next-btn { display: inline-block; }
#screen-trustmenot[data-phase="move"] #trust-next-wait,
#screen-woerter[data-phase="move"] #woerter-next-wait { display: block; }

/* ─── Wörter Jagd: phasenspezifische Sichtbarkeit ───────────────── */
.woerter-word-banner,
.woerter-choose-wrap,
.woerter-choose-wait,
.woerter-describe-wrap,
.woerter-draw-wrap,
.woerter-pantomime-wrap,
.woerter-guess-wrap,
.woerter-reveal { display: none; }

/* Schreiber sieht sein Wort in choose + play */
#screen-woerter[data-phase="choose"][data-is-writer="true"] .woerter-word-banner,
#screen-woerter[data-phase="play"][data-is-writer="true"] .woerter-word-banner { display: block; }

/* Choose-Phase */
#screen-woerter[data-phase="choose"][data-is-writer="true"] .woerter-choose-wrap { display: block; }
#screen-woerter[data-phase="choose"]:not([data-is-writer="true"]) .woerter-choose-wait { display: flex; align-items: center; justify-content: center; }

/* Play-Phasen */
#screen-woerter[data-phase="play"][data-mode="describe"][data-is-writer="true"] .woerter-describe-wrap { display: block; }
#screen-woerter[data-phase="play"][data-mode="draw"] .woerter-draw-wrap { display: block; }
#screen-woerter[data-phase="play"][data-mode="pantomime"] .woerter-pantomime-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; }

/* Feeds-Container: zweispaltig in describe-mode, einspaltig sonst */
.woerter-feeds { display: none; }
#screen-woerter[data-phase="play"] .woerter-feeds {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}
#screen-woerter[data-phase="play"][data-mode="describe"] .woerter-feeds {
  grid-template-columns: 1fr 1fr;
}
.woerter-feed-col {
  display: flex;
  flex-direction: column;
  background: rgba(20, 22, 35, 0.6);
  border: 1px solid rgba(120, 130, 180, 0.35);
  border-radius: 12px;
  overflow: hidden;
  min-height: 120px;
}
.woerter-feed-header {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(120, 130, 180, 0.3);
}
.woerter-feed-descriptions .woerter-feed-header {
  color: #ffd600;
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.18), rgba(255, 140, 0, 0.10));
}
.woerter-feed-guesses .woerter-feed-header {
  color: #87ceeb;
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.18), rgba(70, 130, 180, 0.10));
}

/* Beschreibungs-Spalte nur in describe-mode sichtbar */
#screen-woerter[data-phase="play"] .woerter-feed-descriptions { display: none; }
#screen-woerter[data-phase="play"][data-mode="describe"] .woerter-feed-descriptions { display: flex; }

/* Stream: Beschreibungen sieht jeder im describe-mode */
.woerter-stream { display: flex; flex-direction: column; gap: 6px; padding: 10px; max-height: 320px; overflow-y: auto; }

/* Rate-Eingabe: nur für Nicht-Schreiber, nur in play */
#screen-woerter[data-phase="play"]:not([data-is-writer="true"]) .woerter-guess-wrap { display: block; }
.woerter-guesses { display: flex; flex-direction: column; gap: 4px; padding: 10px; max-height: 320px; overflow-y: auto; }

/* Reveal */
#screen-woerter[data-phase="reveal"] .woerter-reveal { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; }

/* Wort-Banner */
.woerter-word-banner {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.18), rgba(255, 140, 0, 0.18));
  border: 2px solid rgba(255, 214, 0, 0.5);
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
}
.woerter-word-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}
.woerter-word-text {
  font-size: 28px;
  font-weight: 900;
  color: #ffd600;
  letter-spacing: 0.5px;
}
.woerter-blocked-hint {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* Wort-Anzeige: ohne Kasten, einfach oben in Gelb — für Choose-Phase und alle Play-Modi */
#screen-woerter[data-phase="choose"][data-is-writer="true"] .woerter-word-banner,
#screen-woerter[data-phase="play"][data-mode="describe"] .woerter-word-banner,
#screen-woerter[data-phase="play"][data-mode="draw"] .woerter-word-banner,
#screen-woerter[data-phase="play"][data-mode="pantomime"] .woerter-word-banner {
  background: transparent;
  border: none;
  padding: 0;
  margin-top: -4px;
  box-shadow: none;
}
#screen-woerter[data-phase="choose"][data-is-writer="true"] .woerter-word-label,
#screen-woerter[data-phase="choose"][data-is-writer="true"] .woerter-blocked-hint,
#screen-woerter[data-phase="play"][data-mode="describe"] .woerter-word-label,
#screen-woerter[data-phase="play"][data-mode="describe"] .woerter-blocked-hint,
#screen-woerter[data-phase="play"][data-mode="draw"] .woerter-word-label,
#screen-woerter[data-phase="play"][data-mode="draw"] .woerter-blocked-hint,
#screen-woerter[data-phase="play"][data-mode="pantomime"] .woerter-word-label,
#screen-woerter[data-phase="play"][data-mode="pantomime"] .woerter-blocked-hint {
  display: none;
}
#screen-woerter[data-phase="choose"][data-is-writer="true"] .woerter-word-text,
#screen-woerter[data-phase="play"][data-mode="describe"] .woerter-word-text,
#screen-woerter[data-phase="play"][data-mode="draw"] .woerter-word-text,
#screen-woerter[data-phase="play"][data-mode="pantomime"] .woerter-word-text {
  font-size: 32px;
  color: #ffd600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  line-height: 1.1;
}

/* Zeichnen-Modus: Tipps-Slot füllt den restlichen Platz bis fast an den unteren Rand */
#screen-woerter[data-phase="play"][data-mode="draw"].active {
  padding: 6px 12px 4px;
  gap: 4px;
}
#screen-woerter[data-phase="play"][data-mode="draw"] .trust-container {
  min-height: calc(100dvh - 10px);
  padding-top: 6px;
  padding-bottom: 0;
  gap: 6px;
}
#screen-woerter[data-phase="play"][data-mode="draw"] .woerter-feeds {
  flex: 1;
  min-height: 0;
  margin-top: 4px;
  margin-bottom: 0;
}
#screen-woerter[data-phase="play"][data-mode="draw"] .woerter-feed-guesses {
  flex: 1;
  min-height: 0;
}
#screen-woerter[data-phase="play"][data-mode="draw"] .woerter-guesses {
  max-height: none;
  flex: 1;
  min-height: 0;
}

/* Choose-Cards */
.woerter-choose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.woerter-choose-card {
  background: rgba(40, 45, 70, 0.7);
  border: 2px solid rgba(120, 130, 180, 0.4);
  border-radius: 16px;
  padding: 18px 14px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.woerter-choose-icon { font-size: 36px; }
.woerter-choose-name { font-size: 18px; font-weight: 800; }
.woerter-choose-sub { font-size: 12px; color: rgba(255,255,255,0.7); text-align: center; }

.woerter-choose-wait {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
}

/* Beschreibungs-Form */
.woerter-describe-form {
  display: flex;
  gap: 8px;
}
.woerter-describe-input {
  flex: 1 1 auto;
  background: rgba(0,0,0,0.4);
  border: 2px solid rgba(255, 214, 0, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.woerter-describe-input:focus { border-color: rgba(255, 214, 0, 0.85); }
.woerter-describe-submit { flex: 0 0 auto; }
.woerter-describe-meta {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  text-align: right;
}
.woerter-describe-meta.over { color: #ff6b6b; font-weight: 700; }
.woerter-describe-error {
  margin-top: 6px;
  font-size: 13px;
  color: #ff6b6b;
  min-height: 18px;
}

/* Beschreibungs-Stream */
.woerter-stream-item {
  background: rgba(255,255,255,0.06);
  border-left: 3px solid rgba(255, 214, 0, 0.6);
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
  font-size: 15px;
  word-break: break-word;
}

/* Whiteboard */
.woerter-draw-wrap {
  background: rgba(20, 22, 35, 0.85);
  border: 2px solid rgba(120, 130, 180, 0.5);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
#woerter-draw-canvas {
  display: block;
  width: 100%;
  background: #1a1d2e;
  touch-action: none;
  cursor: crosshair;
}
.woerter-draw-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: rgba(0,0,0,0.4);
  flex-wrap: wrap;
}
#screen-woerter[data-phase="play"]:not([data-is-writer="true"]) .woerter-draw-tools { display: none; }
#woerter-draw-width { flex: 0 1 120px; }

/* Farb-Trigger im Tool-Bar */
.woerter-color-trigger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.4);
  padding: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.woerter-color-dot {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.4);
}

/* Popup über dem Whiteboard */
.woerter-color-popup {
  position: absolute;
  left: 50%;
  bottom: 56px; /* sitzt direkt über der Toolbar */
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(6, 36px);
  gap: 6px;
  background: rgba(20, 22, 35, 0.95);
  border: 2px solid rgba(255, 214, 0, 0.5);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 5;
}
.woerter-color-popup[hidden] { display: none; }
.woerter-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, border-color 0.1s;
}
.woerter-color-swatch.active { border-color: #ffd600; box-shadow: 0 0 0 2px rgba(255, 214, 0, 0.4); }

/* Pantomime */
.woerter-pantomime-icon { font-size: 64px; }
.woerter-pantomime-text { font-size: 18px; color: #fff; text-align: center; }

/* Guess-Form */
.woerter-guess-form {
  display: flex;
  gap: 8px;
}
.woerter-guess-input {
  flex: 1 1 auto;
  background: rgba(0,0,0,0.4);
  border: 2px solid rgba(135, 206, 235, 0.5);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.woerter-guess-input:focus { border-color: rgba(135, 206, 235, 0.95); }

/* Guess-Stream */
.woerter-guess-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  font-size: 14px;
  color: #fff;
}
.woerter-guess-item.correct {
  background: rgba(76, 175, 80, 0.25);
  border-left: 3px solid #4caf50;
}
.woerter-guess-item .woerter-guess-name {
  font-weight: 700;
  color: rgba(255, 214, 0, 0.9);
}
/* Richtig getroffenes Teilwort — nur für den Rater selbst sichtbar */
.woerter-guess-hit {
  color: #4caf50;
  font-weight: 800;
}

/* Reveal */
.woerter-reveal-headline {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
}
.woerter-reveal-word {
  font-size: 48px;
  font-weight: 900;
  color: #ffd600;
  text-shadow: 0 0 24px rgba(255, 214, 0, 0.6);
  text-align: center;
  word-break: break-word;
}
.woerter-reveal-winner {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-align: center;
}
.woerter-reveal-points {
  font-size: 18px;
  font-weight: 700;
  color: #4caf50;
  text-align: center;
}
.woerter-reveal-points.timeout { color: #ff6b6b; }

.trust-point-pill {
  display: inline-block;
  background: transparent;
  border: none;
  color: #ffd600;
  font-weight: 800;
  font-size: 14px;
  padding: 2px 6px;
  margin: 2px 4px;
}
#screen-trustmenot[data-phase="reveal"] .trust-info,
#screen-woerter[data-phase="reveal"] .trust-info { flex-wrap: wrap; gap: 4px; min-height: 0; }
#screen-trustmenot[data-phase="reveal"] .trust-info .trust-writer-summary,
#screen-woerter[data-phase="reveal"] .trust-info .trust-writer-summary { width: 100%; }

.trust-board-wrap { position: relative; }
.trust-countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 214, 0, 0.6);
  pointer-events: none;
  animation: trustCountdownPulse 1s infinite;
}
@keyframes trustCountdownPulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.1); opacity: 1; }
}

.trust-next-wrap {
  justify-content: center;
  align-items: center;
}
.trust-next-wait {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.trust-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.trust-phase-label {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.trust-timer {
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 800;
  color: #ffd600;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 214, 0, 0.4);
  border-radius: 12px;
  padding: 6px 14px;
  min-width: 48px;
  text-align: center;
  line-height: 1.1;
}
.trust-timer.warn {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.6);
  animation: trustPulse 0.8s infinite;
}
@keyframes trustPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.trust-board-wrap {
  width: 100%;
  position: relative;
}
#trust-board-canvas,
#woerter-board-canvas {
  width: 100%;
  display: block;
}
.trust-question {
  background: transparent;
  border: none;
  padding: 8px 16px 4px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.trust-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trust-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 8, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 44px;
}
.trust-slot-badge {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-slot-correct {
  /* gleiche Farbe wie normale Slots — die richtige Antwort steht einfach zuoberst */
}
.trust-slot-correct-label {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-align: center;
}
.trust-slot-input {
  flex: 1 1 auto;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  padding: 4px 0;
  font-family: inherit;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  width: 100%;
  word-break: break-word;
}
.trust-slot-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.trust-slot-input.blocked { color: #ff6b6b; }
.trust-slot-input.duplicate { color: #ffb74d; }
.trust-slot-input.too-long { color: #ff6b6b; }
.trust-slot-placeholder {
  flex: 1 1 auto;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
}
.trust-slot-disabled { opacity: 0.7; }

/* Vertikal höhere Slots in Schreib- und Reveal-Ansicht (mehr Platz unten) */
#screen-trustmenot[data-phase="writing"] .trust-slot,
#screen-trustmenot[data-phase="reveal"] .trust-vote-option,
#screen-woerter[data-phase="writing"] .trust-slot,
#screen-woerter[data-phase="reveal"] .trust-vote-option {
  padding-top: 22px;
  padding-bottom: 22px;
  min-height: 72px;
}

.trust-vote-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 8, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.trust-vote-option.selected {
  background: rgba(255, 214, 0, 0.18);
  border-color: rgba(255, 214, 0, 0.8);
}
.trust-vote-option.locked,
.trust-vote-disabled {
  cursor: default;
  opacity: 0.85;
}
.trust-vote-text {
  flex: 1 1 auto;
  color: #fff;
  word-break: break-word;
}
.trust-vote-voters {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trust-vote-option.trust-vote-reveal {
  align-items: center;
  gap: 10px;
  cursor: default;
}
.trust-vote-option.trust-vote-reveal .trust-vote-text {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
  padding-right: 8px;
}
.trust-vote-reveal-voters {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  flex: 0 0 33%;
  width: 33%;
  max-width: 33%;
  min-height: 100%;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  align-self: stretch;
}
.trust-voter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trust-voter-chip.pos {
  color: #a5d6a7;
  border-color: rgba(76, 175, 80, 0.5);
  background: rgba(76, 175, 80, 0.18);
}
.trust-voter-chip.neg {
  color: #ffb4a8;
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.14);
}
.trust-writer-summary {
  font-size: 16px;
  font-weight: 800;
  color: #ffd600;
  text-align: center;
  padding: 6px 14px;
  background: transparent;
  border: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.trust-actions {
  display: flex;
  justify-content: center;
}
.trust-info {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  .trust-container { padding-top: 46px; }
  .trust-phase-label { font-size: 13px; }
  .trust-timer { font-size: 18px; padding: 4px 10px; }
  .trust-question { font-size: 14px; padding: 10px 12px; }
  .trust-slot, .trust-vote-option { padding: 8px 10px; font-size: 14px; }
}

/* ─── Lobby „Animation"-Emote: Bewegungsanimation auf dem Slot-Skin ─── */
.lobby-slot-figure.animating svg {
  animation: lobby-walk 0.45s ease-in-out infinite;
  transform-origin: 50% 100%;
  will-change: transform;
}
@keyframes lobby-walk {
  0%   { transform: translateY(0) rotate(-4deg); }
  25%  { transform: translateY(-7px) rotate(-2deg); }
  50%  { transform: translateY(0) rotate(4deg); }
  75%  { transform: translateY(-7px) rotate(2deg); }
  100% { transform: translateY(0) rotate(-4deg); }
}

/* Legendäre Skins: jeweils eigene Bewegungsanimation */
.lobby-slot-figure.animating[data-skin="batman"] svg {
  animation: lobby-anim-batman 0.9s cubic-bezier(.3,.1,.5,1) infinite;
}
@keyframes lobby-anim-batman {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-22px) rotate(180deg); }
  100% { transform: translateY(0) rotate(360deg); }
}

.lobby-slot-figure.animating[data-skin="astronaut"] svg {
  animation: lobby-anim-astronaut 0.85s ease-in-out infinite;
}
.lobby-slot-figure.animating[data-skin="astronaut"]::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 18px;
  height: 30px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 20%, #fff8b0 0%, #ffb300 35%, #ff3d00 75%, rgba(255,0,0,0) 100%);
  filter: blur(1.5px);
  border-radius: 50% 50% 40% 40% / 40% 40% 60% 60%;
  animation: astronaut-flame 0.08s infinite alternate;
  pointer-events: none;
  z-index: 1;
}
@keyframes lobby-anim-astronaut {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-22px) rotate(4deg); }
}

/* Homer: leichtes Wippen, die sichtbare Armbewegung geschieht über den SVG-Swap */
.lobby-slot-figure.animating[data-skin="homer"] svg {
  animation: lobby-anim-homer 1.6s ease-in-out infinite;
}
@keyframes lobby-anim-homer {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-3px) scale(1.03); }
}

.lobby-slot-figure.animating[data-skin="engel"] svg {
  animation: lobby-anim-engel 1.2s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.lobby-slot-figure.animating[data-skin="engel"]::after {
  content: '';
  position: absolute;
  inset: 5%;
  background: radial-gradient(circle at 50% 50%, rgba(255,244,168,0.55) 0%, rgba(255,225,120,0.22) 50%, rgba(255,225,120,0) 80%);
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
  z-index: -1;
  animation: lobby-anim-engel-glow 1.2s ease-in-out infinite;
}
@keyframes lobby-anim-engel {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes lobby-anim-engel-glow {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

.lobby-slot-figure.animating[data-skin="samurai"] svg {
  animation: lobby-anim-samurai 0.55s ease-in-out infinite;
}
@keyframes lobby-anim-samurai {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25%      { transform: translateX(-6px) rotate(-8deg); }
  50%      { transform: translateX(0) rotate(0deg); }
  75%      { transform: translateX(6px) rotate(8deg); }
}

.lobby-slot-figure.animating[data-skin="alien"] svg {
  animation: lobby-anim-alien 0.7s ease-in-out infinite;
  filter: drop-shadow(0 0 6px #00ff9c);
}
@keyframes lobby-anim-alien {
  0%, 100% { transform: translateY(0) scale(1);    filter: brightness(1); }
  50%      { transform: translateY(-10px) scale(1.08); filter: brightness(1.6); }
}

/* Einstein: ruhiges Wippen, da der Stock separat geworfen wird */
.lobby-slot-figure.animating[data-skin="einstein"] svg {
  animation: lobby-anim-einstein 0.7s ease-in-out infinite;
}
@keyframes lobby-anim-einstein {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-3px) rotate(1.5deg); }
}
/* Stock wird hoch geworfen und wieder gefangen */
.lobby-slot-filled .lobby-slot-circle.lobby-slot-figure.animating[data-skin="einstein"] {
  overflow: visible;
}
/* Wissenschaftler: kleine lila Explosion + Rauch über dem Reagenzglas */
.lobby-slot-filled .lobby-slot-circle.lobby-slot-figure.animating[data-skin="scientist"] {
  overflow: visible;
}
.lobby-slot-figure.animating[data-skin="scientist"] svg {
  animation: lobby-anim-scientist 1.4s ease-in-out infinite;
}
@keyframes lobby-anim-scientist {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  35%      { transform: translate(-1px, 1px) rotate(-2deg); }
  55%      { transform: translate(1px, -1px) rotate(2deg); }
}
.scientist-explosion {
  position: absolute;
  left: 56%;
  top: -8%;
  width: 36px;
  height: 50px;
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(0 0 6px rgba(168,90,255,0.8));
}
.scientist-explosion svg { width: 100%; height: 100%; display: block; }
.scientist-explosion .sci-burst {
  transform-origin: 30px 55px;
  animation: sci-burst 1.4s ease-out infinite;
}
@keyframes sci-burst {
  0%   { transform: scale(0); opacity: 1; }
  10%  { transform: scale(1.3); opacity: 1; }
  25%  { transform: scale(1.0); opacity: 0.85; }
  45%  { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(0); opacity: 0; }
}
.scientist-explosion .sci-sparks { opacity: 0; animation: sci-sparks 1.4s ease-out infinite; }
@keyframes sci-sparks {
  0%, 6%   { opacity: 0; }
  10%      { opacity: 1; }
  25%      { opacity: 0; }
  100%     { opacity: 0; }
}
.scientist-explosion .sci-smoke-puff { opacity: 0; }
.sci-smoke-1 { animation: sci-smoke-1 1.4s ease-out infinite; }
.sci-smoke-2 { animation: sci-smoke-2 1.4s ease-out infinite; }
.sci-smoke-3 { animation: sci-smoke-3 1.4s ease-out infinite; }
@keyframes sci-smoke-1 {
  0%, 12%  { transform: translate(0, 0) scale(0.4); opacity: 0; }
  25%      { transform: translate(0, -8px) scale(0.8); opacity: 0.9; }
  60%      { transform: translate(-2px, -22px) scale(1.1); opacity: 0.6; }
  100%     { transform: translate(-3px, -36px) scale(1.4); opacity: 0; }
}
@keyframes sci-smoke-2 {
  0%, 18%  { transform: translate(0, 0) scale(0.4); opacity: 0; }
  35%      { transform: translate(-3px, -8px) scale(0.7); opacity: 0.8; }
  70%      { transform: translate(-6px, -20px) scale(1.0); opacity: 0.45; }
  100%     { transform: translate(-8px, -32px) scale(1.2); opacity: 0; }
}
@keyframes sci-smoke-3 {
  0%, 22%  { transform: translate(0, 0) scale(0.4); opacity: 0; }
  40%      { transform: translate(3px, -10px) scale(0.7); opacity: 0.75; }
  72%      { transform: translate(5px, -22px) scale(1.0); opacity: 0.4; }
  100%     { transform: translate(7px, -34px) scale(1.2); opacity: 0; }
}

.einstein-cane-throw {
  position: absolute;
  left: 62%;
  top: 32%;
  width: 10px;
  height: 34px;
  transform-origin: 50% 85%;
  pointer-events: none;
  z-index: 3;
  animation: einstein-cane-throw 1.5s cubic-bezier(.5,.05,.5,.95) infinite;
}
.einstein-cane-throw svg { width: 100%; height: 100%; display: block; }
@keyframes einstein-cane-throw {
  /* Wurf in die Luft, überschlagend, dann wieder gefangen */
  0%   { transform: translate(0, 0) rotate(0deg); }
  20%  { transform: translate(-6px, -14px) rotate(-180deg); }
  40%  { transform: translate(-10px, -26px) rotate(-540deg); }
  55%  { transform: translate(-8px, -30px) rotate(-900deg); }
  70%  { transform: translate(-4px, -18px) rotate(-1260deg); }
  90%  { transform: translate(-1px, -4px) rotate(-1620deg); }
  100% { transform: translate(0, 0) rotate(-1800deg); }
}

/* ─── DUELL MODUS · 3D Vollbild ──────────────────────────────────── */
#screen-duell {
  background: #0a0518;
}
#screen-duell.active {
  position: fixed;
  inset: 0;
  padding: 0;
  gap: 0;
  align-items: stretch;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  z-index: 50;
}
.duell-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  cursor: grab;
}
.duell-3d-canvas:active { cursor: grabbing; }

.duell-ui {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 10px;
}
.duell-ui > * { pointer-events: auto; }

/* Statusbar */
.duell-statusbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(10,5,24,0.85), rgba(10,5,24,0.4));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(180, 140, 255, 0.28);
  border-radius: 14px;
  padding: 10px 16px 10px 52px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.duell-leave-btn {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(180, 140, 255, 0.28);
  background: rgba(40, 22, 70, 0.6);
  color: rgba(245, 236, 217, 0.7);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}

.duell-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.duell-player-right { justify-content: flex-end; }
.duell-player-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(160deg, #4ce06b, #2aa64a);
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 14px rgba(76, 224, 107, 0.5);
  position: relative;
  flex-shrink: 0;
}
.duell-player-avatar::after {
  content: ""; position: absolute; inset: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.5), transparent 60%);
}
.duell-player-right .duell-player-avatar {
  background: linear-gradient(160deg, #e04c4c, #a82a2a);
  box-shadow: 0 0 14px rgba(224, 76, 76, 0.5);
}
.duell-player-meta {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.duell-player-right .duell-player-meta { align-items: flex-end; }
.duell-player-name {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.duell-player-diamonds {
  font-size: 20px; font-weight: 800;
  color: #6ec0ff;
  text-shadow: 0 0 12px rgba(110, 192, 255, 0.4);
  font-variant-numeric: tabular-nums;
}
.duell-round {
  text-align: center;
  background: rgba(245, 200, 74, 0.08);
  border: 1px solid rgba(245, 200, 74, 0.3);
  padding: 4px 14px;
  border-radius: 10px;
}
.duell-round-label {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  font-weight: 700;
}
.duell-round-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Phasen */
.duell-phases {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  pointer-events: none;
  position: relative;
}
.duell-phase {
  width: 100%;
  max-width: 640px;
  pointer-events: auto;
  animation: duell-phase-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes duell-phase-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.duell-card {
  background: rgba(20, 8, 40, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(180, 140, 255, 0.28);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 260px;
  box-sizing: border-box;
}
.duell-card-actions { gap: 10px; }
.duell-card-gameover { text-align: center; align-items: center; }

/* Resolve-Phase: Card unsichtbar — nur die Brücken-Animationen zählen.
   Nur der Host sieht einen grossen, zentralen "Weiter"-Button unter der Brücke. */
#duell-phase-resolve {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translateX(-50%);
  width: auto;
  max-width: none;
}
#duell-phase-resolve .duell-card {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: 0;
  align-items: center;
  gap: 0;
}
#duell-phase-resolve .duell-phase-tag,
#duell-phase-resolve .duell-resolve-log { display: none; }
#duell-phase-resolve .duell-btn {
  padding: 16px 44px;
  font-size: 18px;
  letter-spacing: 0.05em;
  border-radius: 999px;
  box-shadow: 0 10px 32px rgba(245, 200, 74, 0.55),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.duell-phase-tag {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
}
.duell-phase-tag-combat {
  color: #e04c4c;
  text-shadow: 0 0 14px rgba(224, 76, 76, 0.5);
}

/* Frage */
.duell-question-text {
  font-size: 18px; font-weight: 700;
  line-height: 1.35;
  text-wrap: pretty;
  color: var(--text);
}
.duell-slider-wrap { display: flex; flex-direction: column; gap: 10px; }
.duell-slider-wrap input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: linear-gradient(90deg, #281857, rgba(110, 192, 255, 0.4));
  border-radius: 4px;
  outline: none;
}
.duell-slider-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--gold));
  border: 2px solid #d4a017;
  box-shadow: 0 4px 16px rgba(245, 200, 74, 0.5);
  cursor: pointer;
}
.duell-slider-wrap input[type=range]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--gold));
  border: 2px solid #d4a017;
  cursor: pointer;
}
.duell-slider-value {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}
.duell-slider-value strong {
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* Buttons */
.duell-btn {
  border: none; border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s, filter 0.12s, box-shadow 0.12s;
  color: var(--text);
}
.duell-btn:active { transform: translateY(0); }
.duell-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.duell-btn-primary {
  background: linear-gradient(180deg, var(--gold), #d4a017);
  color: #2a1700;
  box-shadow: 0 6px 20px rgba(245, 200, 74, 0.35),
              inset 0 1px 0 rgba(255,255,255,0.4);
}
.duell-btn-ghost {
  background: rgba(40, 22, 70, 0.6);
  color: var(--text);
  border: 1px solid rgba(180, 140, 255, 0.28);
}

.duell-wait-text {
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  font-size: 14px;
  margin: 0;
}

/* Scoring */
.duell-scoring-card {
  display: flex; flex-direction: column; gap: 8px;
}
.duell-scoring-correct {
  font-size: 15px;
  text-align: center;
  padding: 10px;
  background: rgba(245, 200, 74, 0.08);
  border-radius: 10px;
}
.duell-scoring-correct strong { color: var(--gold); font-size: 18px; }
.duell-scoring-result {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px;
  line-height: 1.5;
}
.duell-scoring-result > div {
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(40, 22, 70, 0.4);
}
.duell-scoring-result .duell-row-mine { color: #4ce06b; font-weight: 700; }
.duell-scoring-result .duell-row-enemy { color: #e04c4c; font-weight: 700; }

/* Aktionen */
.duell-action-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.duell-action-card {
  background: linear-gradient(180deg, rgba(60,32,100,0.5), rgba(40,22,70,0.6));
  border: 1.5px solid rgba(180, 140, 255, 0.28);
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  display: flex; flex-direction: column; gap: 2px;
  color: var(--text);
  font-family: inherit;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}
.duell-action-card:disabled { opacity: 0.35; cursor: not-allowed; }
.duell-action-icon { font-size: 26px; line-height: 1; }
.duell-action-name { font-size: 14px; font-weight: 700; }
.duell-action-cost { font-size: 13px; color: #6ec0ff; font-weight: 800; }
.duell-action-desc { font-size: 11px; color: var(--text-dim); line-height: 1.3; }

/* Unit Picker */
.duell-unit-picker {
  background: rgba(40, 22, 70, 0.7);
  border: 1px solid rgba(180, 140, 255, 0.28);
  border-radius: 12px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.duell-unit-picker-title {
  font-size: 13px;
  text-align: center;
  color: var(--text-dim);
}
.duell-unit-picker-options {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
.duell-unit-picker-options button {
  background: rgba(20, 10, 40, 0.85);
  border: 1px solid rgba(180, 140, 255, 0.28);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}

/* Resolve Log */
.duell-resolve-log {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px; line-height: 1.4;
  max-height: 220px; overflow-y: auto;
  padding: 4px 4px 4px 0;
}
.duell-resolve-log .duell-log-entry {
  padding: 6px 10px;
  background: rgba(40, 22, 70, 0.4);
  border-radius: 6px;
  border-left: 3px solid rgba(180, 140, 255, 0.28);
}
.duell-resolve-log .duell-log-mine { border-left-color: #4ce06b; color: #4ce06b; }
.duell-resolve-log .duell-log-enemy { border-left-color: #e04c4c; color: #e04c4c; }

/* Combat */
.duell-combat-question {
  font-size: 16px; line-height: 1.4;
  text-align: center;
  padding: 12px;
  background: rgba(224, 76, 76, 0.08);
  border: 1px solid rgba(224, 76, 76, 0.3);
  border-radius: 10px;
}
.duell-combat-options {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.duell-combat-options button {
  flex: 1; min-width: 140px;
  padding: 14px 16px;
  font-size: 14px; font-weight: 700;
  background: linear-gradient(180deg, rgba(60,32,100,0.7), rgba(40,22,70,0.8));
  border: 2px solid rgba(180, 140, 255, 0.28);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.duell-combat-options button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Game Over */
.duell-gameover-icon { font-size: 64px; line-height: 1; }
.duell-gameover-title {
  font-size: 28px; font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(245, 200, 74, 0.5);
}

/* Camera Hint */
.duell-camera-hint {
  align-self: flex-end;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
  pointer-events: none;
  padding: 4px 0;
}

/* Mobile */
@media (max-width: 900px) and (orientation: landscape) {
  .duell-ui { padding: 10px; gap: 6px; }
  .duell-statusbar { padding: 6px 12px 6px 44px; gap: 8px; }
  .duell-leave-btn { width: 26px; height: 26px; left: 8px; font-size: 11px; }
  .duell-player-avatar { width: 32px; height: 32px; }
  .duell-player-name { font-size: 10px; letter-spacing: 0.03em; }
  .duell-player-diamonds { font-size: 15px; }
  .duell-round { padding: 2px 10px; }
  .duell-round-label { font-size: 8px; }
  .duell-round-num { font-size: 16px; }
  .duell-phase { max-width: 520px; }
  .duell-card { padding: 10px 14px; gap: 8px; min-height: 200px; }
  .duell-phase-tag { font-size: 10px; }
  .duell-question-text { font-size: 14px; line-height: 1.25; }
  .duell-slider-wrap { gap: 6px; }
  .duell-slider-value { font-size: 12px; }
  .duell-slider-value strong { font-size: 18px; }
  .duell-btn { padding: 9px 14px; font-size: 13px; }
  .duell-action-grid { gap: 6px; }
  .duell-action-card { padding: 7px 8px; gap: 0; }
  .duell-action-icon { font-size: 18px; }
  .duell-action-name { font-size: 12px; }
  .duell-action-cost { font-size: 11px; }
  .duell-action-desc { font-size: 10px; line-height: 1.2; }
  .duell-camera-hint { display: none; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .duell-ui { padding: 8px; }
}

/* Rotate-Prompt: nur auf kleinen Geräten im Hochkant-Modus zeigen */
.duell-rotate-prompt { display: none; }
@media (max-width: 900px) and (orientation: portrait) {
  .duell-rotate-prompt {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(180deg, #0a0518 0%, #1a0f3a 50%, #0a0518 100%);
    color: var(--text);
    text-align: center;
    padding: 24px;
  }
  /* 3D + UI ausblenden, solange im Hochkant — spart Render + verhindert Klicks */
  #screen-duell.active .duell-3d-canvas,
  #screen-duell.active .duell-ui { display: none; }
}
.duell-rotate-icon {
  font-size: 72px;
  animation: duell-rotate-hint 2.4s ease-in-out infinite;
  transform-origin: center;
}
@keyframes duell-rotate-hint {
  0%, 40%, 100% { transform: rotate(0deg); }
  60%, 90%      { transform: rotate(-90deg); }
}
.duell-rotate-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.duell-rotate-text {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 280px;
  line-height: 1.4;
}

/* ─── Wörter Spion ─── */
#screen-spion { position: relative; }
#screen-spion.active { padding: 0; gap: 0; align-items: stretch; }
#screen-spion::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(8, 14, 30, 0.55), rgba(8, 14, 30, 0.7)), url('spion-bg.jpg') center/cover no-repeat;
  pointer-events: none;
}
.spion-container { padding: 14px 14px 28px; max-width: 720px; min-height: 100dvh; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; }
.spion-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 4px; }
.spion-phase-label { font-size: 18px; font-weight: 700; color: var(--text); }
.spion-timer { font-size: 26px; font-weight: 900; color: var(--primary); min-width: 60px; text-align: right; }

#screen-spion .spion-intro,
#screen-spion .spion-write,
#screen-spion .spion-reveal,
#screen-spion .spion-vote,
#screen-spion .spion-reveal-votes,
#screen-spion .spion-match-end { display: none; }
#screen-spion[data-phase="intro"] .spion-intro { display: flex; flex-direction: column; align-items: center; gap: 14px; flex: 1; position: relative; }
#screen-spion[data-phase="civ_writing"] .spion-write,
#screen-spion[data-phase="spy_writing"] .spion-write { display: flex; flex-direction: column; gap: 14px; flex: 1; }
#screen-spion[data-phase="reveal"] .spion-reveal { display: flex; flex-direction: column; gap: 12px; flex: 1; }
#screen-spion[data-phase="voting"] .spion-vote { display: flex; flex-direction: column; gap: 14px; flex: 1; }
#screen-spion[data-phase="reveal_votes"] .spion-reveal-votes { display: flex; flex-direction: column; gap: 14px; flex: 1; }
#screen-spion[data-phase="match_end"] .spion-match-end { display: flex; flex-direction: column; align-items: stretch; gap: 14px; flex: 1; }

.spion-intro-title { font-size: 36px; font-weight: 900; color: var(--gold); margin-top: 12px; text-align: center; }
.spion-intro-sub { font-size: 16px; color: var(--text-dim); text-align: center; }
.spion-intro-countdown {
  font-size: 140px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.85);
  z-index: 5;
}
.spion-intro-players { display: flex; flex-direction: column; gap: 14px; align-items: stretch; margin: 8px 0; width: 100%; }
.spion-intro-player { display: flex; flex-direction: row; align-items: center; gap: 16px; padding: 10px 14px; background: var(--bg2); border-radius: var(--radius); border: 2px solid var(--bg3); }
.spion-intro-player-skin { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.spion-intro-player-skin .player-avatar { width: 100%; height: 100%; font-size: 34px; border-radius: 50%; }
.spion-intro-player-skin .player-avatar svg { width: 70%; height: 70%; }
.spion-intro-player-skin .player-skin-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.spion-intro-player-skin .player-skin-wrap svg { width: 100%; height: 100%; display: block; }
.spion-intro-player-name { font-size: 20px; font-weight: 700; flex: 1; word-break: break-word; }

.spion-self { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 12px 4px; }
.spion-self-skin { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.spion-self-skin .player-avatar { width: 100%; height: 100%; font-size: 38px; border-radius: 50%; }
.spion-self-skin .player-avatar svg { width: 70%; height: 70%; }
.spion-self-skin .player-skin-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.spion-self-skin .player-skin-wrap svg { width: 100%; height: 100%; display: block; }
.spion-self-name { font-size: 22px; font-weight: 800; text-align: center; }
.spion-self-role { font-size: 16px; font-weight: 600; color: var(--text-dim); text-align: center; }
.spion-self.spy .spion-self-role { color: #ff4d4d; }

.spion-role-banner { background: var(--bg2); border-radius: var(--radius); padding: 22px 18px; text-align: center; border: 2px solid var(--bg3); }
.spion-role-banner.spy { border-color: #d44; background: rgba(180, 30, 30, 0.12); }
.spion-role-label { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.5px; }
.spion-role-text { font-size: 38px; font-weight: 900; color: var(--text); margin-top: 8px; }
.spion-role-hint { font-size: 14px; color: var(--text-dim); margin-top: 10px; line-height: 1.4; }
.spion-write-prompt { font-size: 16px; color: var(--text); text-align: center; font-weight: 600; }
.spion-write-form { display: flex; gap: 10px; }
.spion-write-input { flex: 1; padding: 16px; font-size: 18px; border-radius: var(--radius); border: 2px solid var(--bg3); background: var(--bg); color: var(--text); }
.spion-write-input:focus { outline: none; border-color: var(--primary); }
.spion-write-submit { padding: 14px 22px; font-size: 16px; }
.spion-write-error { color: #d44; font-size: 14px; min-height: 20px; text-align: center; }
.spion-write-status { font-size: 14px; color: var(--text-dim); text-align: center; }
.spion-other-answers { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.spion-other-answer { display: flex; justify-content: space-between; padding: 12px 14px; background: var(--bg2); border-radius: var(--radius); font-size: 16px; }
.spion-other-answer .name { color: var(--text-dim); }
.spion-other-answer .word { font-weight: 700; color: var(--gold); }

.spion-reveal-title, .spion-vote-title { font-size: 22px; font-weight: 800; text-align: center; }
.spion-vote-word-reminder { font-size: 22px; font-weight: 800; color: var(--gold); text-align: center; margin-top: -4px; min-height: 28px; }
.spion-vote-word-reminder:empty { display: none; }
.spion-reveal-list, .spion-vote-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spion-vote-row { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; background: var(--bg2); border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; transition: border-color 0.15s; }
.spion-vote-row.selected { border-color: var(--gold); background: rgba(255, 200, 0, 0.1); }
.spion-vote-row.disabled { opacity: 0.4; cursor: default; }
.spion-vote-row.voted-self { opacity: 1; cursor: default; background: var(--bg2); }
.spion-vote-left { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.spion-vote-skin { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.spion-vote-skin .player-avatar { width: 100%; height: 100%; font-size: 36px; border-radius: 50%; }
.spion-vote-skin .player-avatar svg { width: 70%; height: 70%; }
.spion-vote-skin .player-skin-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.spion-vote-skin .player-skin-wrap svg { width: 100%; height: 100%; display: block; }
.spion-vote-name { font-weight: 700; font-size: 15px; text-align: center; word-break: break-word; line-height: 1.2; }
.spion-vote-word { font-weight: 800; color: var(--gold); font-size: 20px; text-align: center; word-break: break-word; margin-top: 2px; }
.spion-vote-actions { display: flex; gap: 12px; justify-content: center; margin-top: 6px; }
.spion-vote-actions .btn { padding: 14px 22px; font-size: 16px; }
.spion-vote-status { font-size: 14px; color: var(--text-dim); text-align: center; }

.spion-roundend-content { text-align: center; padding: 8px 0; }
.spion-roundend-icon { font-size: 64px; }
.spion-roundend-title { font-size: 24px; font-weight: 800; margin-top: 8px; }
.spion-roundend-detail { font-size: 15px; color: var(--text-dim); margin-top: 8px; }
#spion-continue-btn, #spion-next-match-btn { display: none; padding: 16px 28px; font-size: 17px; align-self: center; }
.spion-roundend-wait, .spion-match-wait { font-size: 14px; color: var(--text-dim); text-align: center; }
#screen-spion[data-host="true"] #spion-continue-btn,
#screen-spion[data-host="true"] #spion-next-match-btn { display: inline-block; }
#screen-spion[data-host="true"] .spion-roundend-wait,
#screen-spion[data-host="true"] .spion-match-wait { display: none; }

.spion-reveal-votes-list { display: flex; flex-direction: column; gap: 6px; }
.spion-reveal-vote-row { display: flex; align-items: center; padding: 10px 14px; background: var(--bg2); border-radius: var(--radius); font-size: 15px; }
.spion-reveal-vote-row .voter { flex: 1; text-align: left; font-weight: 700; word-break: break-word; }
.spion-reveal-vote-row .arrow { padding: 0 14px; color: var(--text-dim); flex-shrink: 0; }
.spion-reveal-vote-row .target { flex: 1; text-align: right; font-weight: 700; color: var(--gold); word-break: break-word; }
.spion-reveal-vote-row.abstain .target { color: var(--text-dim); font-style: italic; font-weight: 400; }

.spion-match-title { font-size: 32px; font-weight: 900; color: var(--gold); text-align: center; margin-top: 4px; }
.spion-match-sub { font-size: 15px; color: var(--text-dim); text-align: center; }
.spion-match-players { display: flex; flex-direction: column; gap: 12px; }
.spion-match-player { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--bg2); border-radius: var(--radius); border: 2px solid var(--bg3); }
.spion-match-player.was-spy { border-color: rgba(220, 60, 60, 0.55); background: rgba(180, 30, 30, 0.12); }
.spion-match-player-skin { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.spion-match-player-skin .player-avatar { width: 100%; height: 100%; font-size: 30px; border-radius: 50%; }
.spion-match-player-skin .player-skin-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.spion-match-player-skin .player-skin-wrap svg { width: 100%; height: 100%; display: block; }
.spion-match-player-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.spion-match-player-name { font-size: 18px; font-weight: 800; }
.spion-match-player-role { font-size: 13px; color: var(--text-dim); }
.spion-match-player-pts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 70px; }
.spion-match-player-delta { font-size: 28px; font-weight: 900; color: var(--gold); line-height: 1; }
.spion-match-player-delta.zero { color: var(--text-dim); }
.spion-match-player-total { font-size: 15px; font-weight: 600; color: var(--text-dim); }
.spion-match-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.spion-match-action { padding: 14px 22px; font-size: 16px; font-weight: 700; flex: 1; max-width: 220px; min-width: 140px; }

#screen-spion[data-host="true"] .spion-match-actions { display: flex; }
#screen-spion:not([data-host="true"]) .spion-match-actions { display: none; }

.spion-end-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); z-index: 1100; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; }
.spion-end-overlay.open { display: flex; }
.spion-end-dialog { background: var(--bg); border-radius: 18px; max-width: 400px; width: 100%; padding: 24px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); border: 1px solid var(--bg3); }
.spion-end-dialog-icon { font-size: 40px; }
.spion-end-dialog-title { font-size: 22px; font-weight: 800; text-align: center; }
.spion-end-dialog-text { font-size: 15px; color: var(--text-dim); text-align: center; line-height: 1.5; }
.spion-end-dialog-actions { display: flex; gap: 10px; width: 100%; margin-top: 6px; }
.spion-end-dialog-actions .btn { flex: 1; padding: 12px 16px; font-size: 15px; font-weight: 700; }

/* Chat */
.spion-chat-open-btn { width: 100%; padding: 12px; font-size: 15px; margin-top: 4px; position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; }
.spion-chat-badge { display: none; min-width: 22px; height: 22px; padding: 0 7px; background: #d33; color: #fff; font-size: 13px; font-weight: 800; border-radius: 11px; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.spion-chat-badge.visible { display: inline-flex; }
.spion-chat-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 1000; align-items: center; justify-content: center; padding: 48px 44px; box-sizing: border-box; }
.spion-chat-overlay.open { display: flex; }
.spion-chat-panel { background: var(--bg); width: 100%; max-width: 520px; display: flex; flex-direction: column; height: 100%; max-height: calc(100dvh - 96px); border-radius: 22px; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.spion-chat-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--bg3); font-size: 22px; font-weight: 800; }
.spion-chat-close { background: none; border: none; color: var(--text); font-size: 32px; cursor: pointer; padding: 0 8px; line-height: 1; }
.spion-chat-messages { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.spion-chat-empty { color: var(--text-dim); text-align: center; padding: 24px; font-style: italic; }
.spion-chat-msg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--bg2); border-radius: var(--radius); }
.spion-chat-msg.mine { background: rgba(0, 150, 255, 0.12); border: 1px solid rgba(0,150,255,0.3); }
.spion-chat-msg-name { font-weight: 700; min-width: 90px; max-width: 120px; word-break: break-word; color: var(--text); }
.spion-chat-msg-text { flex: 1; color: var(--text); font-size: 15px; line-height: 1.4; }
.spion-chat-options { border-top: 1px solid var(--bg3); padding: 12px; background: var(--bg2); }
.spion-chat-template-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spion-chat-tpl { padding: 14px 10px; font-size: 14px; font-weight: 700; opacity: 1; color: #fff; border: 2px solid transparent; }
.spion-chat-tpl[data-opt="spy"] { background: rgba(220, 50, 50, 0.85); border-color: rgba(255, 80, 80, 0.9); }
.spion-chat-tpl[data-opt="suspicious"] { background: rgba(230, 160, 30, 0.85); border-color: rgba(255, 200, 60, 0.9); color: #1a1300; }
.spion-chat-tpl[data-opt="innocent"] { background: rgba(70, 170, 100, 0.85); border-color: rgba(120, 220, 150, 0.9); }
.spion-chat-tpl[data-opt="unsure"] { background: var(--bg3); border-color: var(--bg3); color: var(--text); }
.spion-chat-tpl:disabled { opacity: 0.45; cursor: not-allowed; }
.spion-chat-picker { display: none; margin-top: 12px; padding: 10px; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--bg3); }
.spion-chat-picker.open { display: block; }
.spion-chat-picker-prompt { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.spion-chat-picker-cancel { background: none; border: none; color: var(--text-dim); font-size: 22px; cursor: pointer; line-height: 1; }
.spion-chat-picker-list { display: flex; flex-wrap: wrap; gap: 6px; }
.spion-chat-picker-pill { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; background: var(--bg2); border-radius: 999px; border: 2px solid var(--bg3); cursor: pointer; transition: border-color 0.15s; }
.spion-chat-picker-pill .spion-chat-picker-skin { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.spion-chat-picker-pill .spion-chat-picker-skin svg { width: 80%; height: 80%; }
.spion-chat-picker-pill .player-skin-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.spion-chat-picker-pill .player-skin-wrap svg { width: 86%; height: 86%; }
.spion-chat-picker-pill .name { font-size: 14px; font-weight: 600; }
