/* ============================================================
   ALBTRAUM AM CRYSTAL LAKE — Visual Overhaul
   ============================================================ */

* { box-sizing: border-box; }

:root {
  --blood: #a00010;
  --blood-bright: #d4001a;
  --bone: #e8d9b0;
  --parchment: #d9c79a;
  --parchment-dark: #8a7548;
  --ink: #2b1a0a;
  --gold: #c89a3d;
  --gold-bright: #f0c860;
  --fog: rgba(140,140,160,0.08);
}

html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  font-family: 'Georgia', 'Cinzel', serif;
  color: #e8d9b0;
  background:
    radial-gradient(ellipse at 50% 0%, #2a0808 0%, #0a0506 60%, #000 100%),
    #000;
  overflow-x: hidden;
}

/* ---------------- TITLE / BANNER ---------------- */
.title-banner {
  text-align: center;
  padding: 28px 12px 16px;
  border-bottom: 1px solid #4a1a1a;
  position: relative;
}
.title-banner h1 {
  margin: 0;
  font-size: 3em;
  letter-spacing: 6px;
  color: #f0e0a8;
  text-shadow:
    0 0 18px rgba(200,30,30,0.5),
    2px 2px 0 #000,
    -1px -1px 0 #400;
  font-variant: small-caps;
}
.subtitle {
  margin: 6px 0 0;
  color: var(--gold);
  letter-spacing: 8px;
  font-style: italic;
  text-transform: uppercase;
  font-size: 0.85em;
}

.logo-badge {
  position: fixed;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 1.1em;
  color: #f0e0a8;
  letter-spacing: 3px;
  font-variant: small-caps;
  text-shadow: 0 0 12px rgba(200,30,30,0.6), 2px 2px 0 #000;
  pointer-events: none;
  z-index: 5;
}
.logo-badge span { color: var(--gold); font-size: 0.7em; letter-spacing: 6px; }

.hidden { display: none !important; }

/* ---------------- BUTTONS ---------------- */
button {
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(180deg, #5a1010 0%, #2a0606 100%);
  color: #f0e0a8;
  border: 1px solid var(--gold);
  padding: 10px 18px;
  font-size: 1em;
  letter-spacing: 2px;
  font-variant: small-caps;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255,200,100,0.2),
    0 2px 6px rgba(0,0,0,0.6);
  transition: all 0.15s;
}
button:hover:not(:disabled) {
  background: linear-gradient(180deg, #8a1818 0%, #4a0a0a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,200,100,0.3),
    0 0 14px rgba(200,30,30,0.6);
  color: #fff8d0;
}
button:disabled { opacity: 0.35; cursor: not-allowed; filter: grayscale(0.6); }

.big-btn { width: 100%; padding: 14px; font-size: 1.1em; margin: 6px 0; }

/* ---------------- SETUP SCREEN ---------------- */
#setup { padding: 12px 28px 60px; max-width: 1100px; margin: 0 auto; }
#setup h2, #setup h3 { color: var(--gold); letter-spacing: 3px; font-variant: small-caps; }

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.char-card {
  background: linear-gradient(180deg, #1a0a0a 0%, #0a0404 100%);
  border: 1px solid #4a2020;
  border-radius: 6px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.char-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(200,30,30,0.15), transparent 60%);
  pointer-events: none;
}
.char-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(200,30,30,0.4);
  transform: translateY(-2px);
}
.char-card.taken { opacity: 0.25; cursor: not-allowed; filter: grayscale(0.8); }
.char-card .portrait {
  width: 120px; height: 140px;
  margin: 0 auto 10px;
  border-radius: 6px;
  border: 2px solid var(--gold);
  background: #100 center / cover no-repeat;
  box-shadow: 0 0 14px rgba(200,30,30,0.5), inset 0 0 18px rgba(0,0,0,0.5);
}
.char-card h4 {
  margin: 0 0 6px;
  text-align: center;
  color: #f0e0a8;
  letter-spacing: 3px;
  font-variant: small-caps;
}
.char-card .stat-row { display: flex; gap: 6px; justify-content: center; margin: 8px 0; }
.char-card p { margin: 8px 0 0; font-size: 0.85em; color: #b0a080; font-style: italic; text-align: center; }

#chosen-list { list-style: none; padding: 0; }
#chosen-list li { padding: 6px 0; font-size: 1.1em; }
#chosen-list button { padding: 4px 10px; font-size: 0.85em; margin-left: 10px; }

/* ---------------- STAT BADGES (the colored squares) ---------------- */
.stat-badge {
  min-width: 32px; height: 32px;
  padding: 0 6px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #fff;
  text-shadow: 1px 1px 0 #000, 0 0 4px #000;
  border: 1px solid rgba(0,0,0,0.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.6);
  font-family: 'Georgia', serif;
  white-space: nowrap;
}
.stat-badge.str  { background: linear-gradient(180deg, #d02020, #7a0000); }   /* Stärke - rot */
.stat-badge.tal  { background: linear-gradient(180deg, #2060d0, #0a2070); }   /* Talent - blau */
.stat-badge.life { background: linear-gradient(180deg, #30a040, #105020); }   /* Leben - grün */
.stat-badge.san  { background: linear-gradient(180deg, #d0a020, #6a4a00); }   /* Sanity - gelb */

/* ---------------- GAME LAYOUT ---------------- */
#game {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 16px;
  padding: 60px 16px 16px;
  min-height: 100vh;
}

/* ---------------- LEFT: PLAYER LIST ---------------- */
#left-panel { display: flex; flex-direction: column; gap: 10px; }

.player-card {
  display: grid;
  grid-template-columns: 60px 1fr;
  grid-template-rows: auto auto;
  gap: 6px 10px;
  background: linear-gradient(180deg, rgba(40,15,15,0.9), rgba(15,5,5,0.95));
  border: 1px solid #4a2020;
  border-radius: 6px;
  padding: 8px;
  position: relative;
  transition: all 0.2s;
}
.player-card.active {
  border-color: var(--gold-bright);
  box-shadow: 0 0 16px rgba(240,200,96,0.5);
  background: linear-gradient(180deg, rgba(60,20,20,0.95), rgba(25,8,8,0.95));
}
.player-card.dead { opacity: 0.35; filter: grayscale(0.9); }
.player-card .portrait {
  grid-row: 1 / 3;
  width: 60px; height: 70px;
  border-radius: 4px;
  border: 2px solid var(--gold);
  background: #100 center / cover no-repeat;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
}
.player-card .player-name {
  font-variant: small-caps;
  letter-spacing: 2px;
  color: #f0e0a8;
  font-size: 1em;
}
.player-card .stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.player-card .stat-badge { width: 100%; height: 28px; font-size: 0.95em; }
.player-card .items-line {
  grid-column: 1 / 3;
  font-size: 0.8em;
  color: #b0a080;
  font-style: italic;
  padding-top: 2px;
  border-top: 1px solid #3a1a1a;
}

/* ---------------- BOARD STAGE ---------------- */
#board-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  perspective: 1400px;
}

#board-wrapper {
  position: relative;
  width: 720px;
  height: 720px;
  transform: rotateX(18deg);
  transform-style: preserve-3d;
  background: url('assets/board.png') center center / cover no-repeat, #000;
  box-shadow: 0 30px 80px rgba(0,0,0,0.9);
}

.fog-layer, .vignette, .center-piece, .logo-badge { display: none !important; }

.fog-layer-old {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(180,180,200,0.08), transparent 40%),
    radial-gradient(ellipse at 75% 60%, rgba(160,180,200,0.06), transparent 45%),
    radial-gradient(ellipse at 50% 80%, rgba(200,160,160,0.05), transparent 50%);
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(-8px, -4px) scale(1); opacity: 0.8; }
  to   { transform: translate(8px, 6px) scale(1.05); opacity: 1; }
}

.vignette {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 55%, rgba(0,0,0,0.6) 90%, rgba(0,0,0,0.9) 100%);
  pointer-events: none;
}

#board { position: absolute; inset: 0; }

.board-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.board-svg .cell {
  pointer-events: auto;
  fill: rgba(0,0,0,0.08);
  stroke: rgba(220,180,90,0.4);
  stroke-width: 1.2;
  transition: fill 0.2s;
}
.board-svg .cell.ring-outer  { fill: rgba(0,0,0,0.10);   stroke: rgba(220,200,140,0.35); }
.board-svg .cell.ring-middle { fill: rgba(0,0,0,0.10);   stroke: rgba(220,200,140,0.35); }
.board-svg .cell.ring-inner  { fill: rgba(0,0,0,0.10);   stroke: rgba(220,200,140,0.35); }
.board-svg .cell.type-haven  { fill: rgba(40,120,60,0.14); }
.board-svg .cell.type-shop   { fill: rgba(180,140,40,0.14); }
.board-svg .cell.type-danger { fill: rgba(140,20,20,0.18); }
.board-svg .cell.movable {
  fill: rgba(255,210,90,0.45);
  stroke: #ffe080;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(255,200,80,0.9));
  cursor: pointer;
  animation: cellPulse 1s ease-in-out infinite alternate;
}
@keyframes cellPulse {
  from { fill: rgba(255,210,90,0.35); filter: drop-shadow(0 0 6px rgba(255,200,80,0.7)); }
  to   { fill: rgba(255,230,140,0.55); filter: drop-shadow(0 0 14px rgba(255,220,120,1)); }
}

.cell-overlay {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  text-align: center;
}
.cell-overlay.movable { cursor: pointer; pointer-events: auto; }
.cell-overlay img {
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.95));
}
.cell-label {
  font-size: 8px;
  font-variant: small-caps;
  letter-spacing: 1px;
  color: #f0e0a8;
  text-shadow: 1px 1px 0 #000, 0 0 4px #000, 0 0 6px #000;
  margin-top: 1px;
  white-space: nowrap;
  background: rgba(0,0,0,0.55);
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid rgba(200,160,80,0.35);
}
.cell-tokens {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
  max-width: 140px;
  min-height: 76px;
}
.cell-tokens .token.figure,
.board-figure {
  position: relative;
  width: 50px;
  height: 76px;
  background: transparent;
  border: none;
  display: inline-block;
  filter: drop-shadow(3px 7px 6px rgba(0,0,0,0.95));
}
.board-figure {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 50;
  pointer-events: none;
}
/* 3D Meeple-Figuren */
.board-figure .figure-body,
.cell-tokens .token.figure .figure-body {
  position: absolute;
  top: 0;
  left: 50%;
  /* Stärkere 3D-Neigung (Spielfigur lehnt leicht zum Betrachter) */
  transform: translateX(-50%) perspective(140px) rotateX(14deg);
  transform-origin: 50% 100%;
  width: 46px;
  height: 60px;
  border-radius: 23px 23px 10px 10px;
  background: #000 center / cover no-repeat;
  border: 3px solid var(--col);
  box-shadow:
    /* Innenschatten unten - dunkles "Gewand"-Volumen */
    inset 0 -22px 26px rgba(0,0,0,0.7),
    /* Glanzpunkt oben - Lichtreflex */
    inset 0 8px 14px rgba(255,255,255,0.35),
    inset 4px 0 8px rgba(255,255,255,0.18),
    inset -4px 0 8px rgba(0,0,0,0.35),
    /* Farb-Aura außen */
    0 0 14px var(--col),
    0 0 0 1px rgba(0,0,0,0.65),
    /* Schatten zum Brett */
    0 4px 8px rgba(0,0,0,0.6);
  animation: figureIdle 3.2s ease-in-out infinite;
}
/* Glanz-Highlight oben (zusätzliche 3D-Tiefe) */
.board-figure .figure-body::before,
.cell-tokens .token.figure .figure-body::before {
  content: '';
  position: absolute;
  top: 2px; left: 6px; right: 6px;
  height: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
  border-radius: 18px 18px 8px 8px;
  pointer-events: none;
}
@keyframes figureIdle {
  0%, 100% { transform: translateX(-50%) perspective(140px) rotateX(14deg)   rotateY(0deg); }
  50%      { transform: translateX(-50%) perspective(140px) rotateX(12deg)   rotateY(-2deg) translateY(-1px); }
}

.board-figure .figure-base,
.cell-tokens .token.figure .figure-base {
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%) rotateX(60deg);
  transform-origin: 50% 100%;
  width: 54px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%,
    #ffffff 0%,
    var(--col) 22%,
    #2a1a08 70%,
    #050505 100%);
  border: 1.5px solid #000;
  box-shadow:
    /* Bodenschatten */
    0 7px 14px rgba(0,0,0,0.95),
    /* Oberseite Glanz */
    inset 0 3px 5px rgba(255,255,255,0.6),
    /* Unterseite Schatten (3D-Volumen) */
    inset 0 -5px 7px rgba(0,0,0,0.7),
    /* Außen-Glow für aktiven Spieler */
    0 0 8px var(--col);
}
/* Boden-Schatten unter der Basis (Cast-Shadow) */
.board-figure::after,
.cell-tokens .token.figure::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 56px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}
/* (alte duplicate rules entfernt — Styling oben deckt beide Selektoren ab) */

.board-svg .cell.center-cell {
  fill: radial-gradient(#a02020, #200000);
  fill: rgba(120,0,0,0.35);
  stroke: #ff4040;
  stroke-width: 3;
  filter: drop-shadow(0 0 16px rgba(255,40,40,0.6));
}
.cell-overlay.center-overlay {
  width: 130px;
}
.center-boss-img {
  width: 84px; height: 84px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ff4040;
  box-shadow: 0 0 20px rgba(255,40,40,0.9), inset 0 0 12px rgba(0,0,0,0.5);
  display: block;
  margin: 0 auto;
  animation: hellPulse 2.5s ease-in-out infinite alternate;
}
.center-label {
  background: rgba(80,0,0,0.85) !important;
  color: #ffd0c0 !important;
  border-color: #ff6040 !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
}

.boss-token {
  width: 52px; height: 52px;
  z-index: 10;
}
.boss-token.chuck-token {
  border: 3px solid #c060e0;
  box-shadow:
    0 0 18px rgba(200,80,255,0.95),
    inset 0 0 12px rgba(0,0,0,0.6);
  animation: chuckPulse 1.1s ease-in-out infinite alternate;
}
@keyframes chuckPulse {
  from { box-shadow: 0 0 12px rgba(200,80,255,0.6),  inset 0 0 10px rgba(0,0,0,0.6); transform: translate(-50%, -50%) scale(1); }
  to   { box-shadow: 0 0 28px rgba(220,120,255,1),   inset 0 0 12px rgba(0,0,0,0.6); transform: translate(-50%, -50%) scale(1.08); }
}

/* shared enemy token base */
.enemy-token {
  position: absolute;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: #100;
  z-index: 9;
  transform: translate(-50%, -50%);
  pointer-events: none;
  overflow: hidden;
}
.enemy-token img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* ============ CHARACTER CREATOR ============ */
#modal.creator-modal #modal-content {
  background:
    radial-gradient(ellipse at top, #2a0a0a, #0a0303 70%),
    #0a0303;
  border: 3px solid #c89a3d;
  max-width: 720px;
  width: 95%;
  padding: 0;
  overflow: hidden;
}
#modal.creator-modal #modal-content::before {
  border-color: rgba(200,154,61,0.4);
}
.cc-wrap { padding: 18px 24px 14px; color: #f0e0a8; }
.cc-title {
  margin: 0 0 14px;
  text-align: center;
  color: #f0e0a8;
  font-variant: small-caps;
  letter-spacing: 4px;
  font-size: 1.6em;
  border-bottom: 1px solid #5a3a18;
  padding-bottom: 10px;
  text-shadow: 0 0 12px rgba(200,30,30,0.5), 2px 2px 0 #000;
}
.cc-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
}
.cc-photo-col { display: flex; flex-direction: column; align-items: center; }
.cc-photo-frame {
  position: relative;
  border: 3px solid #c89a3d;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 0 16px rgba(200,30,30,0.5), inset 0 0 24px rgba(0,0,0,0.8);
  overflow: hidden;
}
.cc-photo-frame canvas {
  display: block;
  width: 220px; height: 280px;
}
.cc-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(120,0,0,0.05), transparent 40%, rgba(0,0,0,0.4));
  pointer-events: none;
}
.cc-file-btn {
  display: inline-block;
  margin-top: 10px;
  background: linear-gradient(180deg, #5a1010, #2a0606);
  color: #f0e0a8;
  border: 1px solid #c89a3d;
  padding: 8px 16px;
  cursor: pointer;
  letter-spacing: 2px;
  font-variant: small-caps;
  border-radius: 4px;
  font-family: 'Georgia', serif;
  transition: all 0.15s;
  text-align: center;
  font-size: 0.9em;
}
.cc-file-btn:hover {
  background: linear-gradient(180deg, #8a1818, #4a0a0a);
  box-shadow: 0 0 12px rgba(200,30,30,0.7);
}
.cc-file-btn input[type=file] { display: none; }
.cc-hint {
  font-size: 0.75em;
  font-style: italic;
  text-align: center;
  margin: 6px 0 0;
  color: #b0a080;
}

.cc-stats-col { display: flex; flex-direction: column; }
.cc-label {
  display: block;
  font-variant: small-caps;
  letter-spacing: 2px;
  font-size: 0.85em;
  color: #c89a3d;
  margin-bottom: 4px;
}
.cc-input {
  width: 100%;
  background: #1a0606;
  color: #f0e0a8;
  border: 1px solid #5a3a18;
  border-radius: 4px;
  padding: 8px 10px;
  font-family: 'Georgia', serif;
  font-size: 1em;
  margin-bottom: 14px;
  letter-spacing: 1px;
  transition: all 0.15s;
}
.cc-input:focus {
  outline: none;
  border-color: #c89a3d;
  box-shadow: 0 0 8px rgba(200,154,61,0.5);
}
.cc-input::placeholder { color: #5a4a30; font-style: italic; }

.cc-points {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(40,15,15,0.6);
  border: 1px solid #5a3a18;
  border-radius: 4px;
  padding: 8px 14px;
  margin-bottom: 14px;
}
.cc-points-label {
  font-variant: small-caps;
  letter-spacing: 2px;
  font-size: 0.85em;
  color: #c89a3d;
}
.cc-points-value {
  font-size: 1.4em;
  font-weight: bold;
  color: #f0e0a8;
}
.cc-points-value small { font-size: 0.6em; color: #8a7548; }

.cc-slider-row { margin-bottom: 10px; }
.cc-slider-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.cc-slider-header .stat-badge {
  width: 26px; height: 26px;
  font-size: 0.9em;
}
.cc-stat-name {
  flex: 1;
  font-variant: small-caps;
  letter-spacing: 1px;
  color: #f0e0a8;
}
.cc-stat-val {
  font-size: 1.3em;
  font-weight: bold;
  color: #c89a3d;
  min-width: 24px;
  text-align: right;
}

.cc-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: linear-gradient(90deg, #1a0606 0%, #5a1010 50%, #8a1818 100%);
  border-radius: 4px;
  outline: none;
  border: 1px solid #5a3a18;
  cursor: pointer;
}
.cc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f0e0a8, #c89a3d 70%, #5a3a18);
  border: 2px solid #2a0606;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(200,154,61,0.7), 0 2px 4px rgba(0,0,0,0.8);
}
.cc-slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f0e0a8, #c89a3d 70%, #5a3a18);
  border: 2px solid #2a0606;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(200,154,61,0.7);
}
.cc-slider.str { background: linear-gradient(90deg, #1a0606, #7a0000); }
.cc-slider.tal { background: linear-gradient(90deg, #0a1030, #2060d0); }
.cc-slider.life { background: linear-gradient(90deg, #0a3010, #30a040); }

.cc-quick-btns {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.cc-quick-btn {
  flex: 1;
  background: linear-gradient(180deg, #3a1818, #1a0606);
  color: #f0e0a8;
  border: 1px solid #5a3a18;
  padding: 8px;
  cursor: pointer;
  font-family: 'Georgia', serif;
  letter-spacing: 1px;
  font-variant: small-caps;
  border-radius: 4px;
  font-size: 0.9em;
  transition: all 0.15s;
}
.cc-quick-btn:hover {
  border-color: #c89a3d;
  background: linear-gradient(180deg, #5a2020, #2a0a0a);
  box-shadow: 0 0 8px rgba(200,154,61,0.4);
}
.cc-ability-row { margin-top: 2px; }
.cc-ability-select {
  width: 100%;
  margin-top: 5px;
  padding: 8px 10px;
  font-size: 0.95em;
  background: #1a0a0a;
  border: 1px solid #5a2a08;
  color: #f0d8a0;
  border-radius: 5px;
  font-family: Georgia, serif;
  cursor: pointer;
}
.cc-ability-select:focus { outline: none; border-color: #8040c0; }

.cc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #5a3a18;
  padding: 14px 24px;
  background: rgba(20,8,8,0.6);
}
.cc-btn {
  padding: 10px 24px;
  font-variant: small-caps;
  letter-spacing: 3px;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Georgia', serif;
}
.cc-btn.cancel {
  background: transparent;
  color: #8a7548;
  border: 1px solid #5a3a18;
}
.cc-btn.cancel:hover { color: #c89a3d; border-color: #c89a3d; }
.cc-btn.confirm {
  background: linear-gradient(180deg, #8a1818, #4a0a0a);
  color: #fff8d0;
  border: 1px solid #c89a3d;
  font-weight: bold;
}
.cc-btn.confirm:hover:not(:disabled) {
  background: linear-gradient(180deg, #c02020, #6a1010);
  box-shadow: 0 0 16px rgba(255,80,80,0.6);
}
.cc-btn.confirm:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.choice-btn {
  background: linear-gradient(180deg, #f4e0a6 0%, #d9b86f 100%);
  color: #2b1a0a;
  border: 2px solid #5a3a18;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  font-family: 'Georgia', serif;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}
.choice-btn:hover {
  background: linear-gradient(180deg, #f8e8b0 0%, #e0c478 100%);
  border-color: #c89a3d;
  box-shadow: 0 0 14px rgba(200,154,61,0.6);
  transform: translateY(-1px);
}

.trade-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  background: rgba(40,15,15,0.4);
  border-radius: 4px;
}
.trade-pick {
  display: block;
  width: 100%;
  background: rgba(60,30,10,0.85);
  border: 2px solid #5a3a18;
  color: #f0e0a8;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.85em;
}
.trade-pick:hover { background: rgba(90,50,20,0.95); border-color: #c89a3d; }
.trade-pick.selected {
  background: rgba(200,154,61,0.45);
  border-color: #ffe080;
  box-shadow: 0 0 12px rgba(255,220,120,0.85);
}
.trade-pick img {
  width: 60px; height: 60px;
  object-fit: cover;
  display: block;
  margin: 0 auto 4px;
  border: 1px solid #5a3a18;
  border-radius: 3px;
}

.loot-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 22px;
  z-index: 8;
  filter: drop-shadow(0 0 6px rgba(255,210,80,0.95));
  animation: lootGlow 1.5s ease-in-out infinite alternate;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(255,200,80,0.95), 0 0 8px rgba(0,0,0,0.95);
}
.loot-marker .loot-count {
  position: absolute;
  top: -6px; right: -10px;
  font-size: 10px;
  background: #5a3a18;
  color: #f0e0a8;
  border-radius: 50%;
  padding: 1px 5px;
  border: 1px solid #c89a3d;
  font-family: 'Georgia', serif;
  text-shadow: none;
}
@keyframes lootGlow {
  from { transform: translate(-50%, -50%) scale(1); filter: drop-shadow(0 0 4px rgba(255,200,80,0.7)); }
  to   { transform: translate(-50%, -50%) scale(1.12); filter: drop-shadow(0 0 14px rgba(255,230,140,1)); }
}

.pennywise-token {
  width: 52px; height: 52px;
  border: 3px solid #d02020;
  box-shadow:
    0 0 22px rgba(255,80,80,0.95),
    0 0 38px rgba(255,255,255,0.55),
    inset 0 0 12px rgba(0,0,0,0.5);
  animation: pennyPulse 1.3s ease-in-out infinite alternate;
}
@keyframes pennyPulse {
  from { box-shadow: 0 0 16px rgba(255,80,80,0.7), 0 0 26px rgba(255,255,255,0.4), inset 0 0 10px rgba(0,0,0,0.6); transform: translate(-50%, -50%) scale(1); }
  to   { box-shadow: 0 0 32px rgba(255,120,120,1), 0 0 50px rgba(255,255,255,0.85), inset 0 0 12px rgba(0,0,0,0.6); transform: translate(-50%, -50%) scale(1.08); }
}

.joker-token {
  border: 3px solid #50d050;
  box-shadow:
    0 0 20px rgba(120,255,120,0.95),
    0 0 32px rgba(180,80,200,0.7),
    inset 0 0 12px rgba(0,0,0,0.5);
  animation: jokerPulse 1.2s ease-in-out infinite alternate;
}
@keyframes jokerPulse {
  from { box-shadow: 0 0 14px rgba(120,255,120,0.6), 0 0 22px rgba(180,80,200,0.5), inset 0 0 10px rgba(0,0,0,0.6); transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
  to   { box-shadow: 0 0 28px rgba(150,255,150,1),   0 0 40px rgba(220,120,240,0.95), inset 0 0 12px rgba(0,0,0,0.6); transform: translate(-50%, -50%) scale(1.1) rotate(3deg); }
}

.scream-token {
  width: 44px; height: 44px;
  border: 3px solid #ff2020;
  box-shadow:
    0 0 16px rgba(255,30,30,0.95),
    inset 0 0 12px rgba(0,0,0,0.6);
  animation: screamPulse 0.9s ease-in-out infinite alternate;
}
@keyframes screamPulse {
  from { box-shadow: 0 0 12px rgba(255,30,30,0.7), inset 0 0 10px rgba(0,0,0,0.6); transform: translate(-50%, -50%) scale(1); }
  to   { box-shadow: 0 0 26px rgba(255,80,80,1),   inset 0 0 12px rgba(0,0,0,0.6); transform: translate(-50%, -50%) scale(1.08); }
}

/* ---------------- TILES ---------------- */
.tile {
  position: absolute;
  width: 84px; height: 84px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center; justify-content: flex-end;
  color: #fff;
  text-shadow: 1px 1px 2px #000, 0 0 4px #000;
  transform: translate(-50%, -50%);
  border: 3px solid #2a1408;
  background: #1a0a0a center / 78% no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(200,160,80,0.45),
    inset 0 0 24px rgba(0,0,0,0.7),
    0 4px 10px rgba(0,0,0,0.85);
  transition: all 0.15s;
  cursor: default;
  overflow: hidden;
}
.tile::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, transparent 30%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.tile .tile-label {
  position: relative;
  z-index: 2;
  font-size: 0.62em;
  letter-spacing: 1px;
  font-variant: small-caps;
  background: rgba(0,0,0,0.65);
  padding: 1px 6px;
  margin-bottom: 3px;
  border-radius: 3px;
  color: #f0e0a8;
  border: 1px solid rgba(200,160,80,0.5);
}
.tile.type-adventure { background-image: url('assets/tile-adventure.png'); }
.tile.type-haven     { background-image: url('assets/tile-haven.png'); }
.tile.type-shop      { background-image: url('assets/tile-shop.png'); }
.tile.type-danger    { background-image: url('assets/tile-danger.png'); }

.tile.ring-outer  { box-shadow: inset 0 0 0 1px rgba(120,200,120,0.5), inset 0 0 24px rgba(0,30,10,0.7), 0 4px 10px rgba(0,0,0,0.85); }
.tile.ring-middle { box-shadow: inset 0 0 0 1px rgba(180,120,220,0.5), inset 0 0 24px rgba(30,0,40,0.7), 0 4px 10px rgba(0,0,0,0.85); }
.tile.ring-inner  { box-shadow: inset 0 0 0 1px rgba(255,80,80,0.6),   inset 0 0 24px rgba(60,0,0,0.75), 0 4px 12px rgba(0,0,0,0.9); }

.tile.movable {
  cursor: pointer;
  animation: tilePulse 0.9s ease-in-out infinite alternate;
  z-index: 5;
  border-color: var(--gold-bright);
}
@keyframes tilePulse {
  from { box-shadow: 0 0 14px 2px rgba(240,200,80,0.8), inset 0 0 0 1px rgba(255,220,120,0.6); transform: translate(-50%, -50%) scale(1); }
  to   { box-shadow: 0 0 28px 8px rgba(255,220,100,1),  inset 0 0 0 1px rgba(255,240,180,0.9); transform: translate(-50%, -50%) scale(1.06); }
}
.tile.movable:hover { transform: translate(-50%, -50%) scale(1.12); }

.token {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  top: 4px; left: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.9), inset 0 1px 2px rgba(255,255,255,0.5);
  z-index: 6;
}

/* ---------------- CENTER PIECE ---------------- */
.center-piece {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 180px; height: 180px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, #d02020 0%, #800010 35%, #300006 75%, #100 100%);
  border: 4px solid var(--gold);
  box-shadow:
    0 0 40px rgba(200,30,30,0.7),
    inset 0 0 40px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(255,80,40,0.4);
  display: flex; align-items: center; justify-content: center;
  animation: hellPulse 3s ease-in-out infinite alternate;
}
@keyframes hellPulse {
  from { box-shadow: 0 0 30px rgba(200,30,30,0.6), inset 0 0 40px rgba(0,0,0,0.7), inset 0 0 80px rgba(255,80,40,0.3); }
  to   { box-shadow: 0 0 60px rgba(255,60,40,0.9), inset 0 0 40px rgba(0,0,0,0.7), inset 0 0 100px rgba(255,120,60,0.55); }
}
.center-inner { text-align: center; }
.center-title {
  font-variant: small-caps;
  letter-spacing: 3px;
  font-size: 1.05em;
  color: #fff8d0;
  text-shadow: 0 0 12px rgba(255,100,50,0.9), 2px 2px 0 #000;
}
.center-sub {
  font-size: 0.75em;
  color: #f8c0a0;
  font-style: italic;
  letter-spacing: 1px;
  margin-top: 4px;
  text-shadow: 1px 1px 0 #000;
}

/* ---------------- CARD DISPLAY (unter Brett) — versteckt, ersetzt durch #card-info im rechten Panel ---------------- */
#card-display { display: none !important; }
#card-title, #card-body { display: none !important; }

/* ---------------- RIGHT PANEL ---------------- */
#right-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(40,15,15,0.85), rgba(15,5,5,0.95));
  border: 1px solid #4a2020;
  border-radius: 6px;
  padding: 14px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.panel-section h4 {
  margin: 8px 0 6px;
  color: var(--gold);
  letter-spacing: 3px;
  font-variant: small-caps;
  border-bottom: 1px solid #4a2020;
  padding-bottom: 4px;
}
.turn-label {
  font-size: 0.75em;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  text-align: center;
}
#current-player-name {
  font-size: 1.4em;
  font-variant: small-caps;
  letter-spacing: 3px;
  text-align: center;
  color: #f0e0a8;
  text-shadow: 0 0 8px rgba(200,30,30,0.5);
}

#dice-display {
  font-size: 3em;
  text-align: center;
  padding: 14px;
  margin: 4px 0;
  background: radial-gradient(circle, #2a0a0a, #100);
  border: 2px solid var(--gold);
  border-radius: 8px;
  color: #f0e0a8;
  font-weight: bold;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 12px rgba(200,30,30,0.3);
  font-family: 'Georgia', serif;
}
#move-hint {
  font-style: italic;
  color: #b0a080;
  text-align: center;
  font-size: 0.9em;
  padding: 4px;
}

#inventory-list { list-style: none; padding: 0; margin: 0; font-size: 0.9em; }
#inventory-list li { padding: 4px 6px; border-bottom: 1px dashed #3a1a1a; }
#inventory-list li::before { content: '◆ '; color: var(--gold); }

#log {
  background: #0a0303;
  border: 1px solid #3a1a1a;
  padding: 8px;
  height: 180px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.78em;
  border-radius: 4px;
  color: #c0a890;
}
#log .entry {
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px dashed #2a1010;
  line-height: 1.4;
}
#log .entry:first-child { color: #f0e0a8; }

/* ---------------- MODAL ---------------- */
#modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
#modal-content {
  background:
    linear-gradient(180deg, rgba(220,200,150,0.97), rgba(180,160,110,0.97));
  color: var(--ink);
  border: 3px solid #5a3a18;
  border-radius: 8px;
  padding: 24px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 0 60px rgba(200,30,30,0.5);
  position: relative;
}
#modal-content::before {
  content: '';
  position: absolute; inset: 6px;
  border: 1px solid rgba(90,60,20,0.4);
  border-radius: 4px;
  pointer-events: none;
}
#modal-content h2 {
  margin-top: 0;
  text-align: center;
  font-variant: small-caps;
  letter-spacing: 4px;
  color: #5a0808;
  border-bottom: 1px solid rgba(90,60,20,0.4);
  padding-bottom: 8px;
}
#modal-content p { font-size: 1em; line-height: 1.5; }
#modal-content button {
  background: linear-gradient(180deg, #5a1010, #2a0606);
  color: #f0e0a8;
  margin: 4px;
}

/* ===== GAME CARD (Talisman-Stil) ===== */
.game-card {
  width: 180px;
  background:
    linear-gradient(180deg, rgba(245,225,170,0.96) 0%, rgba(215,185,115,0.96) 100%),
    radial-gradient(circle at 30% 20%, rgba(255,240,200,0.5), transparent 60%);
  border: 3px solid #5a3a18;
  border-radius: 10px;
  padding: 8px;
  margin: 10px auto;
  position: relative;
  box-shadow:
    0 6px 16px rgba(0,0,0,0.85),
    inset 0 0 24px rgba(120,80,30,0.25);
  color: #2b1a0a;
  font-family: 'Georgia', serif;
  display: flex;
  flex-direction: column;
}
.game-card.big { width: 240px; padding: 10px; }
.game-card::before {
  content: '';
  position: absolute; inset: 4px;
  border: 1px solid rgba(90, 60, 20, 0.55);
  border-radius: 7px;
  pointer-events: none;
}
.game-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,200,0.3), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(50,20,5,0.3), transparent 50%);
  border-radius: 10px;
  pointer-events: none;
}

.game-card-name {
  background: linear-gradient(180deg, #7a1414 0%, #3a0606 100%);
  color: #f0e0a8;
  font-variant: small-caps;
  letter-spacing: 2px;
  text-align: center;
  padding: 5px 8px;
  border: 1px solid #c89a3d;
  border-radius: 4px;
  margin-bottom: 6px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #000;
  position: relative;
  z-index: 1;
  font-size: 0.95em;
}
.game-card.big .game-card-name { font-size: 1.1em; }

.game-card-img-wrap {
  background: #0a0303;
  border: 2px solid #5a3a18;
  border-radius: 4px;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.7);
}
.game-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.game-card-emoji {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4em;
  background: radial-gradient(circle, #2a0a0a, #100);
  color: #f0e0a8;
}

.game-card-bonuses {
  background: rgba(255,250,220,0.55);
  border: 1px solid rgba(90,60,20,0.4);
  border-radius: 4px;
  padding: 4px 6px;
  margin-top: 6px;
  position: relative;
  z-index: 1;
}
.card-bonus-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88em;
  padding: 2px 0;
  font-weight: bold;
}
.card-bonus-row .stat-badge {
  width: 26px; height: 26px;
  font-size: 0.9em;
  flex-shrink: 0;
}
.card-bonus-row.card-bonus-text { color: #5a0808; font-style: italic; justify-content: center; }

.game-card-desc {
  font-style: italic;
  font-size: 0.78em;
  color: #4a2a0a;
  margin-top: 6px;
  text-align: center;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  padding: 0 4px;
}

.game-card-type-tag {
  position: absolute;
  bottom: -8px;
  right: 12px;
  background: #5a3a18;
  color: #f0e0a8;
  font-size: 0.65em;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 1px;
  font-variant: small-caps;
  border: 1px solid #c89a3d;
  z-index: 2;
}

/* Kind-spezifische Banner-Farben */
.game-card.kind-companion .game-card-name { background: linear-gradient(180deg, #1a4a7a 0%, #061a3a 100%); }
.game-card.kind-upgrade   .game-card-name { background: linear-gradient(180deg, #2a7a2a 0%, #063a06 100%); }
.game-card.kind-event     .game-card-name { background: linear-gradient(180deg, #6a1a6a 0%, #2a062a 100%); }
.game-card.kind-monster   .game-card-name,
.game-card.kind-scream    .game-card-name,
.game-card.kind-joker     .game-card-name { background: linear-gradient(180deg, #5a0606 0%, #200 100%); }

/* Ring-spezifische seitliche Border-Akzente */
.game-card.ring-outer  { border-color: #3a5a20; }
.game-card.ring-middle { border-color: #4a1a5a; }
.game-card.ring-inner  { border-color: #6a0a0a; }

.fight-result {
  padding: 14px;
  margin: 12px 0;
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
  font-variant: small-caps;
  letter-spacing: 3px;
  border-radius: 4px;
}
.fight-result.win  { background: #1a4020; color: #c0ffc0; border: 1px solid #40a040; }
.fight-result.lose { background: #4a1010; color: #ffc0c0; border: 1px solid #a04040; }
.fight-result.tie  { background: #4a4010; color: #ffe080; border: 1px solid #a08040; }

/* ---------------- DICE ROLL UI ---------------- */
.dice-roll-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 16px 0;
}
.dice-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 180px;
}
.dice-cell-label {
  font-variant: small-caps;
  letter-spacing: 2px;
  font-size: 0.85em;
  color: #5a0808;
  font-weight: bold;
  margin-bottom: 4px;
  text-align: center;
}
.dice-cell-stat {
  font-size: 1.1em;
  color: #3a1a08;
  font-weight: bold;
}
.dice-cell-die {
  width: 72px;
  height: 72px;
  margin-top: 6px;
  border: 3px solid #5a3a18;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff 0%, #f0d8a0 35%, #c89a3d 75%, #8a6020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6em;
  font-weight: bold;
  color: #2a1408;
  text-shadow: 1px 1px 0 #f0d8a0, 0 2px 4px rgba(0,0,0,0.4);
  box-shadow:
    0 6px 14px rgba(0,0,0,0.65),
    inset 0 4px 4px rgba(255,255,255,0.45),
    inset 0 -4px 6px rgba(80,40,0,0.3),
    inset 2px 0 4px rgba(255,255,255,0.25),
    inset -2px 0 4px rgba(60,20,0,0.25);
  font-family: 'Georgia', serif;
  transform: perspective(120px) rotateX(-12deg) rotateY(8deg);
  transition: transform 0.3s ease-out;
}
.dice-cell-die.rolling {
  animation: dice3dTumble 0.12s linear infinite;
  background: linear-gradient(135deg, #fff 0%, #ffd870 35%, #c84020 75%, #500000 100%);
  color: #500;
}
@keyframes dice3dTumble {
  0%   { transform: perspective(120px) rotateX(40deg)  rotateY(-30deg) translate(-2px, -1px); }
  25%  { transform: perspective(120px) rotateX(-25deg) rotateY(45deg)  translate(2px, 1px); }
  50%  { transform: perspective(120px) rotateX(60deg)  rotateY(15deg)  translate(-1px, 2px); }
  75%  { transform: perspective(120px) rotateX(-40deg) rotateY(-60deg) translate(1px, -2px); }
  100% { transform: perspective(120px) rotateX(20deg)  rotateY(30deg)  translate(-2px, 1px); }
}
.dice-cell-die.settled {
  animation: dieSettle 0.4s ease-out;
  box-shadow:
    0 4px 10px rgba(0,0,0,0.5),
    inset 0 -3px 6px rgba(0,0,0,0.2),
    0 0 18px rgba(255,200,80,0.7);
}
@keyframes dieShake {
  0%   { transform: translate(-2px, -1px) rotate(-4deg); }
  25%  { transform: translate(2px, 1px)   rotate(3deg); }
  50%  { transform: translate(-1px, 2px)  rotate(-2deg); }
  75%  { transform: translate(1px, -2px)  rotate(5deg); }
  100% { transform: translate(-2px, 1px)  rotate(-3deg); }
}
@keyframes dieSettle {
  from { transform: scale(1.3) rotate(8deg); }
  to   { transform: scale(1) rotate(0); }
}
.dice-cell-vs {
  font-variant: small-caps;
  letter-spacing: 3px;
  font-weight: bold;
  color: #800;
  font-size: 1.4em;
  text-shadow: 1px 1px 0 #c0a880;
}
.dice-btn {
  font-size: 1.2em !important;
  padding: 14px 28px !important;
  letter-spacing: 3px !important;
}

/* ---------------- CHARACTER DETAIL MODAL ---------------- */
.player-card.clickable { cursor: pointer; }
.player-card.clickable:hover { box-shadow: 0 0 12px rgba(240,200,96,0.55); }

.char-detail-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 12px 0;
}
.char-detail-portrait {
  width: 120px;
  height: 140px;
  object-fit: cover;
  border: 3px solid;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.7);
}
.char-detail-stats { flex: 1; }
.char-stat-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
  color: #3a1a08;
}
.char-section-h {
  margin: 14px 0 6px;
  color: #5a0808;
  letter-spacing: 3px;
  font-variant: small-caps;
  border-bottom: 1px solid rgba(90,60,20,0.4);
  padding-bottom: 4px;
  font-size: 1.05em;
}
.char-detail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.char-item-row {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(90,60,20,0.15);
  border: 1px solid rgba(90,60,20,0.35);
  border-radius: 4px;
  padding: 6px 8px;
}
.char-item-img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.char-item-img img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #5a3a18;
  background: #000;
}
.char-item-emoji { font-size: 1.8em; }
.char-item-info { flex: 1; min-width: 0; }
.char-item-name {
  font-weight: bold;
  color: #3a1a08;
  font-size: 0.95em;
}
.char-item-bonus {
  font-size: 0.8em;
  color: #5a0808;
  font-variant: small-caps;
  letter-spacing: 1px;
  margin-top: 1px;
}
.char-item-desc {
  font-size: 0.75em;
  color: #5a3a18;
  font-style: italic;
  margin-top: 2px;
}
.char-empty {
  text-align: center;
  font-style: italic;
  color: #7a5a30;
  font-size: 0.85em;
  padding: 8px;
}

/* ============================================================
   READABILITY OVERHAUL — größere, hellere, weiße Schrift
   ============================================================ */

/* Basis-Schriftgröße erhöhen */
html { font-size: 17px; }

/* Alle Texte auf hell/weiß */
body { color: #ffffff !important; }

/* Spieler-Panel links */
.player-name { font-size: 1.1em !important; font-weight: bold; letter-spacing: 1px; color: #ffffff !important; }
.player-card .items-line { font-size: 0.95em !important; color: #e0d0a8 !important; }
.player-card .stat-badge { font-size: 1.05em !important; height: 32px !important; }
.player-card .stat-row { gap: 5px; }

/* Rechtes Panel */
.turn-label { font-size: 0.95em !important; color: #f0c860 !important; opacity: 1 !important; }
#current-player-name { font-size: 1.35em !important; font-weight: bold; letter-spacing: 2px; color: #ffffff !important; }
#move-hint { font-size: 1em !important; color: #e8d0a0 !important; }
#inventory-list { font-size: 1em !important; }
#inventory-list li { color: #ffffff !important; padding: 5px 6px !important; }
.panel-section h4 { font-size: 1.05em !important; color: #f0c860 !important; }

/* Log */
#log { font-size: 0.9em !important; color: #e0d0a8 !important; }
#log .entry { color: #ddd !important; }
#log .entry:first-child { color: #ffffff !important; }

/* Board-Felder Text */
.cell-label { font-size: 0.85em !important; color: #ffffff !important; text-shadow: 1px 1px 3px #000, 0 0 6px #000 !important; font-weight: bold !important; }
.center-label { font-size: 1em !important; color: #ffffff !important; }

/* Charakter-Karten (Setup) */
.char-card h4 { font-size: 1.05em !important; color: #ffffff !important; }
.char-card p  { font-size: 0.9em !important;  color: #e0d0b0 !important; }

/* Modal — dunkler Hintergrund, weißer Text */
#modal-content {
  background: linear-gradient(180deg, #1a0808 0%, #0d0404 100%) !important;
  color: #ffffff !important;
  border-color: #c89a3d !important;
}
#modal-content h2 { color: #f0c860 !important; font-size: 1.4em !important; }
#modal-content h3 { color: #f0c860 !important; font-size: 1.15em !important; }
#modal-content p  { color: #ffffff !important; font-size: 1em !important; }
#modal-content small { color: #e0d0a8 !important; font-size: 0.88em !important; }
/* Override inline dark-brown colors inside modals */
#modal-content [style*="color:#d0b880"],
#modal-content [style*="color: #5a3a18"] { color: #d0b880 !important; }
#modal-content [style*="color:#d8c088"],
#modal-content [style*="color:#888"]     { color: #c0b090 !important; }
#modal-content [style*="color:#c0a870"] { color: #c0b080 !important; }

/* Karten-Anzeige unterm Brett */
#card-title { color: #ffffff !important; font-size: 1.3em !important; }
#card-body  { color: #1a0a00 !important; font-size: 1em !important; }

/* Char-Detail Modal */
.char-section-h  { color: #f0c860 !important; font-size: 1.05em !important; }
.char-item-name  { color: #ffffff !important; font-size: 1em !important; }
.char-item-bonus { color: #f0c860 !important; font-size: 0.9em !important; }
.char-item-desc  { color: #d0c090 !important; font-size: 0.88em !important; }
.char-empty      { color: #c0b080 !important; font-size: 0.95em !important; }
.char-detail-stats span { color: #e0d0a8 !important; font-size: 0.95em !important; }

/* Kampf-Ergebnis */
.fight-result { font-size: 1.15em !important; }
.fight-result.win  { color: #60ff60 !important; }
.fight-result.lose { color: #ff6060 !important; }
.fight-result.tie  { color: #f0c860 !important; }

/* Dice-Roll */
.dice-cell-label { color: #f0c860 !important; font-size: 1em !important; }
.dice-cell-stat  { color: #ffffff !important; font-size: 1.1em !important; }
.dice-cell-die   { font-size: 2.2em !important; color: #ffffff !important; }
.dice-cell-vs    { color: #f04040 !important; font-size: 1.3em !important; }

/* Wahl-Buttons im Modal */
.choice-btn { font-size: 1em !important; color: #ffffff !important; }
.choice-btn div { color: #e0d0a8 !important; }

/* Lobby & Waiting Room */
#lobby h1, #waiting h1 { color: #f0e0a8 !important; }
.lobby-connecting { color: #f0c860 !important; font-size: 1em !important; }
.share-hint { color: #c0b080 !important; font-size: 0.95em !important; }
.wait-player-row { font-size: 1em !important; color: #ffffff !important; }
.wait-char { color: #f0c860 !important; }
.wait-no-char { color: #c0a070 !important; }
.start-hint { color: #c0a070 !important; font-size: 0.9em !important; }

/* PvP / Trade */
.trade-pick { font-size: 0.95em !important; color: #ffffff !important; }
.trade-pick div { color: #ffffff !important; }
.trade-pick small { color: #e0c890 !important; }

/* Drop-Grid */
.drop-btn { font-size: 0.95em !important; }
.drop-btn div  { color: #ffffff !important; }
.drop-btn small { color: #e0c890 !important; }

/* Game-Card Visuals — Karte hat hellen Pergament-Hintergrund, Text muss dunkel bleiben */
.game-card-name { color: #ffffff !important; font-size: 1.05em !important; }
.game-card { color: #2b1a0a !important; }
.game-card .game-card-desc { color: #4a2a0a !important; font-size: 0.9em !important; }
.game-card-type-tag { color: #f0c860 !important; }
.game-card .game-card-bonuses { background: rgba(255,250,220,0.85) !important; }
.game-card .game-card-bonuses .card-bonus-row { color: #2b1a0a !important; }
.game-card .game-card-bonuses .card-bonus-text { color: #5a0808 !important; font-size: 0.9em !important; font-style: italic !important; }
.game-card .card-bonus-row span:not(.stat-badge) { color: #2b1a0a !important; }

/* Buttons allgemein etwas größer */
button { font-size: 1em !important; }
.big-btn { font-size: 1.1em !important; padding: 13px 16px !important; }

/* ============================================================
   MONSTER-BILDER — obere Hälfte (Kopf) zeigen
   ============================================================ */
.game-card.kind-monster .game-card-img-wrap img {
  object-position: top !important;
}

/* ============================================================
   MODAL — scrollbar wenn Inhalt zu hoch
   ============================================================ */
#modal-content {
  max-height: 88vh !important;
  overflow-y: auto !important;
}

/* ============================================================
   RESPONSIVE — Tablet & kleine Bildschirme
   ============================================================ */

/* Bodybreite scrollbar machen falls Inhalt breiter als Viewport */
html, body { overflow-x: auto !important; }

/* Spiel-Layout via zoom skalieren damit alles sichtbar bleibt */
@media (max-width: 1280px) {
  #game { zoom: 0.82; }
}
@media (max-width: 1050px) {
  #game { zoom: 0.67; }
}
@media (max-width: 850px) {
  #game { zoom: 0.54; }
}
@media (max-width: 680px) {
  #game { zoom: 0.44; }
}

/* Lobby & Waiting Room auf kleinen Screens */
@media (max-width: 600px) {
  #lobby { padding: 16px 10px; }
  .lobby-mode-btns { flex-direction: column; align-items: center; }
  #waiting { padding: 14px 10px; }
  .char-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   NEUES SPIEL-LAYOUT — Log links unten, Brett mittig, Steuerung rechts
   ============================================================ */

/* Seite scrollbar */
html, body { overflow: auto !important; }

/* Spiel-Grid */
#game {
  display: grid;
  grid-template-columns: 240px 1fr 270px;
  gap: 12px;
  padding: 16px;
  min-height: 100vh;
  align-items: start;
}

/* LINKES PANEL: Spieler oben, Log unten */
#left-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 16px;
}
#log-panel {
  background: rgba(10,3,3,0.85);
  border: 1px solid #3a1a1a;
  border-radius: 6px;
  overflow: hidden;
}
.log-label {
  font-size: 0.75em;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  padding: 5px 10px 4px;
  border-bottom: 1px solid #3a1a1a;
  font-variant: small-caps;
}
#log {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 8px !important;
  height: 200px !important;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.82em !important;
  color: #c0a890 !important;
}

/* BRETT: zentriert, kein Gap nach unten */
#board-stage {
  gap: 0 !important;
  align-items: center;
  justify-content: center;
}

/* RECHTES PANEL */
#right-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 12px !important;
  background: linear-gradient(180deg, rgba(40,15,15,0.9), rgba(15,5,5,0.95));
  border: 1px solid #4a2020;
  border-radius: 6px;
  max-height: none !important;
  overflow-y: visible !important;
  position: sticky;
  top: 16px;
}

/* Am-Zug Block */
.turn-block {
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #3a1a1a;
}

/* Würfeln-Zeile: Button links, Zahl rechts */
#roll-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
#roll-row #roll-btn {
  flex: 1;
  margin: 0 !important;
  padding: 11px 8px !important;
}
#dice-display {
  width: 54px !important;
  height: 54px !important;
  flex-shrink: 0;
  font-size: 1.9em !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px;
  background: radial-gradient(circle, #2a0a0a, #100);
  border: 2px solid var(--gold) !important;
  color: #f0e0a8 !important;
  font-weight: bold;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
  font-family: 'Georgia', serif;
}

/* Reroll-Button */
#reroll-btn {
  font-size: 0.88em !important;
  padding: 8px 10px !important;
  margin: 0 !important;
}

/* Move-Hint */
#move-hint {
  font-size: 0.88em !important;
  color: #c0b080 !important;
  text-align: center;
  padding: 2px 4px !important;
  min-height: 0 !important;
  line-height: 1.3;
}

/* Zug-beenden */
#end-turn-btn {
  margin: 0 !important;
  padding: 11px 8px !important;
}

/* Card-Info */
#card-info {
  background: rgba(10,3,3,0.65);
  border: 1px solid #4a1a1a;
  border-radius: 5px;
  padding: 7px 9px;
}
#card-info-content {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.86em;
  color: #e0d0a8;
  line-height: 1.3;
}
#card-info-content img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  border: 1px solid #5a3a18;
  flex-shrink: 0;
}
#card-info-title {
  font-variant: small-caps;
  letter-spacing: 1px;
  font-weight: bold;
  color: #f0c860;
  font-size: 0.92em;
  margin-bottom: 2px;
}
#card-info-body {
  color: #e0d0a8;
  font-size: 0.88em;
}

/* Inventar */
#inv-section { }
.inv-label {
  font-size: 0.82em;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  font-variant: small-caps;
  border-bottom: 1px solid #3a1a1a;
  padding-bottom: 3px;
  margin-bottom: 4px;
}
#inventory-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.92em !important;
}
#inventory-list li {
  color: #ffffff !important;
  padding: 3px 4px !important;
  border-bottom: 1px dashed #2a1a1a;
}
#inventory-list li::before { content: '◆ '; color: var(--gold); }

/* Karten-Anzeige: war unter Brett, jetzt ersetzt durch #card-info */
#card-title, #card-body { display: none !important; }

/* ===== ABILITY BUTTON ===== */
.ability-btn {
  background: linear-gradient(135deg, #1a0a3a, #2a0a5a) !important;
  border-color: #8040c0 !important;
  color: #d0a0ff !important;
  font-size: 0.88em !important;
  padding: 8px 10px !important;
}
.ability-btn:hover { background: linear-gradient(135deg, #2a0a5a, #3a0a7a) !important; border-color: #a060e0 !important; }

/* ===== BLOOD OVERLAY ===== */
#blood-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  background: radial-gradient(ellipse at center, rgba(180,0,0,0.55) 0%, rgba(120,0,0,0.0) 70%);
  opacity: 0;
  transition: opacity 0.08s ease-in;
}
#blood-overlay.active {
  opacity: 1;
  transition: opacity 0.08s ease-in;
  animation: blood-fade 0.7s ease-out forwards;
}
@keyframes blood-fade {
  0%   { opacity: 1; }
  40%  { opacity: 0.8; }
  100% { opacity: 0; }
}

/* ===== SCREEN SHAKE ===== */
@keyframes fx-shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  15%  { transform: translate(-6px, 2px) rotate(-0.8deg); }
  30%  { transform: translate(5px, -2px) rotate(0.5deg); }
  45%  { transform: translate(-4px, 3px) rotate(-0.4deg); }
  60%  { transform: translate(3px, -1px) rotate(0.3deg); }
  75%  { transform: translate(-2px, 1px) rotate(-0.2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
.fx-shake { animation: fx-shake 0.45s ease-out !important; }

/* ===== MONSTER PULSE ===== */
@keyframes fx-monster-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(160,0,0,0); }
  25%  { box-shadow: 0 0 30px 12px rgba(160,0,0,0.6); }
  60%  { box-shadow: 0 0 50px 20px rgba(100,0,0,0.35); }
  100% { box-shadow: 0 0 0 0 rgba(160,0,0,0); }
}
.fx-monster-pulse { animation: fx-monster-pulse 0.9s ease-out !important; }

/* ===== CARD REVEAL ===== */
@keyframes fx-card-reveal {
  0%   { transform: scale(0.95); opacity: 0.5; }
  60%  { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.fx-card-reveal { animation: fx-card-reveal 0.35s ease-out !important; }

/* ===== END SCREEN ===== */
#end-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  overflow-y: auto;
}
#end-screen.visible { opacity: 1; }
#end-screen.victory { background: radial-gradient(ellipse at center, rgba(8,4,2,0.97) 0%, rgba(4,2,0,0.99) 100%); }
#end-screen.defeat  { background: radial-gradient(ellipse at center, rgba(6,0,0,0.97) 0%, rgba(2,0,0,0.99) 100%); }

.end-content {
  text-align: center;
  padding: 40px 30px;
  max-width: 640px;
  width: 100%;
}
.end-icon {
  font-size: 5em;
  line-height: 1;
  margin-bottom: 16px;
  animation: end-icon-pulse 1.5s ease-in-out infinite alternate;
}
@keyframes end-icon-pulse {
  from { transform: scale(1); filter: drop-shadow(0 0 10px rgba(200,154,61,0.4)); }
  to   { transform: scale(1.1); filter: drop-shadow(0 0 30px rgba(200,154,61,0.9)); }
}
.victory .end-icon { animation-name: end-icon-pulse-gold; }
.defeat  .end-icon { animation-name: end-icon-pulse-red; }
@keyframes end-icon-pulse-gold {
  from { filter: drop-shadow(0 0 10px rgba(200,154,61,0.4)); transform: scale(1); }
  to   { filter: drop-shadow(0 0 40px rgba(200,154,61,1));   transform: scale(1.1); }
}
@keyframes end-icon-pulse-red {
  from { filter: drop-shadow(0 0 10px rgba(160,0,0,0.4)); transform: scale(1); }
  to   { filter: drop-shadow(0 0 40px rgba(160,0,0,0.9)); transform: scale(1.08); }
}
.end-title {
  font-size: 2.6em;
  letter-spacing: 4px;
  font-variant: small-caps;
  margin: 0 0 10px;
}
.victory .end-title { color: #f0c860; text-shadow: 0 0 30px rgba(200,154,61,0.8); }
.defeat  .end-title { color: #c03030; text-shadow: 0 0 30px rgba(160,0,0,0.8); }
.end-sub {
  font-size: 1em;
  color: #b0a080;
  font-style: italic;
  margin: 0 0 24px;
  line-height: 1.5;
}
.end-portrait {
  width: 140px;
  height: 170px;
  object-fit: cover;
  object-position: top;
  border: 3px solid #c89a3d;
  border-radius: 8px;
  margin: 0 auto 20px;
  display: block;
  box-shadow: 0 0 24px rgba(200,154,61,0.5);
}
.end-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.end-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid #3a2a08;
  border-radius: 8px;
  padding: 12px 20px;
  min-width: 80px;
}
.end-stat-n {
  font-size: 2em;
  font-weight: bold;
  color: #f0c860;
  line-height: 1;
}
.end-stat-l {
  font-size: 0.78em;
  color: #7a6040;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}
.end-players {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 20px 0 28px;
  flex-wrap: wrap;
}
.end-player {
  text-align: center;
  font-size: 0.85em;
}
.end-player img {
  width: 72px;
  height: 88px;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  border: 2px solid #5a3a18;
  display: block;
  margin: 0 auto 5px;
  opacity: 0.5;
}
.end-player.survived img { opacity: 1; box-shadow: 0 0 14px rgba(74,219,120,0.5); border-color: #4adb78; }
.end-player small { color: #7a6040; display: block; margin-top: 2px; }
.end-new-game {
  font-size: 1.1em !important;
  padding: 14px 32px !important;
  letter-spacing: 2px;
  border-color: #c89a3d !important;
}


/* ---- Monster Video (Jason) ---- */
.game-card-img-wrap .monster-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.game-card.big .game-card-img-wrap .monster-video {
  max-height: 220px;
}

/* ---- Monster Video Fullscreen Intro ---- */
#monster-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: mv-fadein 0.4s ease;
}
@keyframes mv-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#mv-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
  opacity: 0.9;
}
#mv-name {
  position: relative;
  z-index: 2;
  font-size: clamp(1.8em, 5vw, 3.2em);
  font-family: Georgia, serif;
  color: #c00;
  text-shadow: 0 0 30px #f00, 0 0 60px #800, 2px 2px 4px #000;
  letter-spacing: 4px;
  text-align: center;
  padding: 0 20px;
  margin-bottom: 32px;
  animation: mv-pulse 1.2s ease-in-out infinite alternate;
}
@keyframes mv-pulse {
  from { text-shadow: 0 0 20px #f00, 0 0 40px #800; }
  to   { text-shadow: 0 0 40px #f00, 0 0 80px #c00, 0 0 120px #600; }
}
#mv-fight-btn {
  position: relative;
  z-index: 2;
  font-size: 1.3em;
  padding: 14px 40px;
  background: rgba(120, 0, 0, 0.85);
  border: 2px solid #c00;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 2px;
  font-family: Georgia, serif;
  transition: background 0.2s, transform 0.1s;
}
#mv-fight-btn:hover {
  background: rgba(180, 0, 0, 0.95);
  transform: scale(1.06);
}

/* ============================================================
   POLISH PASS — Floating numbers, vignette, boss aura,
   tile atmosphere, card flip, 3D dice, title screen,
   night cycle, player token slide
   ============================================================ */

/* ---- Floating damage/heal numbers ---- */
.fx-float-num {
  position: fixed;
  transform: translateX(-50%);
  font-size: 1.6em;
  font-weight: bold;
  font-family: Georgia, serif;
  text-shadow: 2px 2px 0 #000, 0 0 8px #000, 0 0 16px currentColor;
  pointer-events: none;
  z-index: 9999;
  animation: floatNum 1.3s ease-out forwards;
  white-space: nowrap;
}
.fx-float-damage  { color: #ff4040; }
.fx-float-heal    { color: #6cff60; }
.fx-float-sanLoss { color: #d080ff; }
.fx-float-sanGain { color: #80c8ff; }
@keyframes floatNum {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
  15%  { opacity: 1; transform: translate(-50%, -10px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(1); }
}

/* ---- Vignette overlay ---- */
#vignette-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(70,0,0,0.55) 75%, rgba(120,0,0,0.85) 100%);
  transition: opacity 0.3s ease-out;
}
#vignette-overlay.active { opacity: 1; }

/* ---- Boss aura on the board ---- */
.boss-token { position: relative; }
.boss-token::after {
  content: '';
  position: absolute; inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220,0,0,0.45) 0%, rgba(220,0,0,0.0) 70%);
  z-index: -1;
  animation: bossAura 2.4s ease-in-out infinite;
  pointer-events: none;
}
.boss-token.chuck-token::after { background: radial-gradient(circle, rgba(220,0,0,0.5) 0%, transparent 70%); }
@keyframes bossAura {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.25); }
}
/* Freddy center glow */
.center-label { position: relative; }
.tile.ring-inner.center-tile, [data-center-glow] {
  animation: freddyCenterPulse 3s ease-in-out infinite;
}
@keyframes freddyCenterPulse {
  0%, 100% { box-shadow: inset 0 0 40px rgba(150,0,0,0.5), 0 0 30px rgba(150,0,0,0.4); }
  50%      { box-shadow: inset 0 0 60px rgba(255,40,40,0.7), 0 0 60px rgba(220,30,30,0.7); }
}
/* Ability flash on boss */
.boss-token.fx-ability-flash {
  animation: abilityFlash 0.7s ease-out;
}
@keyframes abilityFlash {
  0%   { filter: brightness(1); transform: scale(1); }
  30%  { filter: brightness(2.5) drop-shadow(0 0 16px #f00); transform: scale(1.3); }
  100% { filter: brightness(1); transform: scale(1); }
}

/* ---- Tile atmosphere per type ---- */
.cell-overlay[data-loc="campfire"] img,
.cell-overlay[data-loc="lagerfeuer"] img {
  animation: campfireFlickerImg 1.4s ease-in-out infinite;
}
@keyframes campfireFlickerImg {
  0%, 100% { box-shadow: 0 0 8px rgba(255,140,40,0.4), 0 2px 6px rgba(0,0,0,0.85); filter: brightness(1); }
  45%      { box-shadow: 0 0 18px rgba(255,180,60,0.9), 0 2px 6px rgba(0,0,0,0.85); filter: brightness(1.2) saturate(1.3); }
  70%      { box-shadow: 0 0 6px rgba(255,130,30,0.35), 0 2px 6px rgba(0,0,0,0.85); filter: brightness(0.95); }
}
.cell-overlay[data-loc="graveyard"] img,
.cell-overlay[data-loc="cemetery"] img {
  animation: graveyardEerie 4s ease-in-out infinite;
}
@keyframes graveyardEerie {
  0%, 100% { filter: hue-rotate(0deg) saturate(0.9); }
  50%      { filter: hue-rotate(-25deg) saturate(0.6) brightness(0.85); }
}
.cell-overlay[data-loc="church"] img {
  box-shadow: 0 0 14px rgba(255,220,140,0.5), 0 2px 6px rgba(0,0,0,0.85) !important;
}
.cell-overlay[data-ring="inner"] img {
  animation: nightmarePulseImg 3.5s ease-in-out infinite;
}
@keyframes nightmarePulseImg {
  0%, 100% { filter: brightness(1) saturate(1); }
  50%      { filter: brightness(1.15) saturate(1.4) hue-rotate(-8deg); box-shadow: 0 0 10px rgba(255,80,80,0.5), 0 2px 6px rgba(0,0,0,0.85); }
}

/* ---- Card flip animation ---- */
.fx-card-flip {
  animation: cardFlip3D 0.65s cubic-bezier(0.3, 0.0, 0.4, 1);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
@keyframes cardFlip3D {
  0%   { transform: rotateY(90deg) scale(0.7); opacity: 0; }
  60%  { transform: rotateY(-12deg) scale(1.04); opacity: 1; }
  100% { transform: rotateY(0deg) scale(1); }
}

/* ---- 3D dice ---- */
.dice3d {
  position: relative;
  width: 60px; height: 60px;
  transform-style: preserve-3d;
  display: inline-block;
  margin: 4px;
}
.dice3d.rolling { animation: dice3dRoll 0.9s cubic-bezier(.32,.05,.31,1.01); }
.dice3d .face {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #f6e4b4, #c89a3d);
  color: #2a1408;
  border: 2px solid #2a1408;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2em; font-weight: bold;
  font-family: Georgia, serif;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}
.dice3d .f1 { transform: rotateY(  0deg) translateZ(30px); }
.dice3d .f2 { transform: rotateY( 90deg) translateZ(30px); }
.dice3d .f3 { transform: rotateY(180deg) translateZ(30px); }
.dice3d .f4 { transform: rotateY(-90deg) translateZ(30px); }
.dice3d .f5 { transform: rotateX( 90deg) translateZ(30px); }
.dice3d .f6 { transform: rotateX(-90deg) translateZ(30px); }
@keyframes dice3dRoll {
  0%   { transform: rotateX(0) rotateY(0); }
  100% { transform: rotateX(720deg) rotateY(540deg); }
}

/* ---- Title screen ---- */
#title-screen {
  position: fixed; inset: 0;
  background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 100000;
  cursor: pointer;
  overflow: hidden;
  animation: titleFadeIn 1.2s ease-out;
}
#title-screen.hidden { display: none; }
#title-screen::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, transparent 30%, rgba(0,0,0,0.9) 95%),
              linear-gradient(180deg, #060a14 0%, #0a0408 50%, #100406 100%);
  z-index: 0;
}
.title-mist {
  position: absolute; inset: -50px;
  background: radial-gradient(circle at 20% 70%, rgba(120,140,160,0.18) 0%, transparent 40%),
              radial-gradient(circle at 80% 30%, rgba(100,80,100,0.16) 0%, transparent 35%),
              radial-gradient(circle at 50% 90%, rgba(80,100,120,0.20) 0%, transparent 45%);
  animation: titleDrift 18s ease-in-out infinite;
  z-index: 1;
}
@keyframes titleDrift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-30px, 20px); }
}
#title-screen h1 {
  position: relative; z-index: 2;
  font-family: Georgia, serif;
  font-size: clamp(2em, 7vw, 5em);
  letter-spacing: 4px;
  color: #c8a050;
  text-shadow: 0 0 14px #000, 0 0 28px rgba(200,80,40,0.5), 2px 2px 0 #000;
  text-align: center;
  margin: 0 20px;
  animation: titleGlow 4s ease-in-out infinite;
}
@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 14px #000, 0 0 28px rgba(200,80,40,0.4), 2px 2px 0 #000; }
  50%      { text-shadow: 0 0 18px #000, 0 0 60px rgba(255,120,60,0.8), 2px 2px 0 #000; }
}
#title-screen .title-sub {
  position: relative; z-index: 2;
  color: #7a5028;
  font-style: italic;
  font-size: clamp(0.9em, 2.5vw, 1.4em);
  margin-top: 16px;
  letter-spacing: 2px;
}
#title-screen .title-tap {
  position: relative; z-index: 2;
  margin-top: 40px;
  font-size: 1.1em;
  color: #c8a050;
  letter-spacing: 4px;
  animation: titlePulse 1.6s ease-in-out infinite;
}
@keyframes titlePulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
@keyframes titleFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
#title-screen.fading-out { animation: titleFadeOut 0.6s ease-in forwards; }
@keyframes titleFadeOut { 0% { opacity: 1; } 100% { opacity: 0; pointer-events: none; } }

/* ---- Night-cycle filter on board ---- */
#board-wrapper {
  --night-level: 0;
  transition: filter 1.5s ease-out;
  filter: brightness(calc(1 - var(--night-level) * 0.35)) saturate(calc(1 - var(--night-level) * 0.25)) hue-rotate(calc(var(--night-level) * -10deg));
}
#board-wrapper::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,8,calc(var(--night-level, 0) * 0.6)) 100%);
  z-index: 50;
}

/* ---- Smooth player token movement ---- */
.board-figure {
  transition: left 0.55s cubic-bezier(0.45, 0, 0.55, 1), top 0.55s cubic-bezier(0.45, 0, 0.55, 1);
}
.board-figure.moving .figure-body { animation: figureBob 0.3s ease-in-out infinite; }
@keyframes figureBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* ---- Trophy gallery ---- */
.trophy-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin: 10px 0;
}
.trophy-cell {
  background: rgba(20,10,4,0.9);
  border: 1px solid #5a2a08;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  position: relative;
}
.trophy-cell img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 4px;
  display: block;
}
.trophy-cell-name {
  font-size: 0.78em;
  color: #c89a3d;
  margin-top: 4px;
  line-height: 1.2;
}
.trophy-cell::before {
  content: '🏆';
  position: absolute;
  top: -8px; right: -8px;
  background: #c89a3d;
  color: #1a0a04;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8em;
  border: 2px solid #1a0a04;
}

/* ---- Spectator side panel (non-blocking) ---- */
#spectator-panel {
  position: fixed;
  top: 60px;
  right: 14px;
  width: 280px;
  max-height: 70vh;
  background: linear-gradient(180deg, rgba(28,12,12,0.96), rgba(20,8,8,0.96));
  border: 2px solid #5a2a08;
  border-radius: 8px;
  padding: 10px 12px;
  color: #f0d8a0;
  font-family: Georgia, serif;
  z-index: 90;
  box-shadow: 0 6px 22px rgba(0,0,0,0.85), 0 0 14px rgba(200,80,40,0.18);
  animation: specSlideIn 0.35s ease-out;
  overflow-y: auto;
  pointer-events: none;
}
#spectator-panel.hidden { display: none; }
@keyframes specSlideIn {
  0%   { transform: translateX(40px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.spec-header {
  font-size: 0.8em;
  color: #c89a3d;
  border-bottom: 1px solid #4a2a08;
  padding-bottom: 5px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.spec-body {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.spec-img, .spec-video {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border: 2px solid #5a2a08;
  border-radius: 4px;
  flex-shrink: 0;
  background: #000;
}
.spec-video {
  border-color: #c89a3d;
  box-shadow: 0 0 12px rgba(200, 154, 61, 0.5);
}
.spec-emoji {
  font-size: 2.4em;
  width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #5a2a08;
  border-radius: 4px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.4);
}
.spec-text {
  flex: 1;
  min-width: 0;
}
.spec-title {
  font-size: 0.95em;
  font-weight: bold;
  color: #f0c860;
  margin-bottom: 3px;
  letter-spacing: 0.5px;
}
.spec-line {
  font-size: 0.82em;
  line-height: 1.3;
  color: #e0c890;
  margin-bottom: 3px;
}
.spec-sub {
  font-size: 0.75em;
  font-style: italic;
  color: #b09060;
  line-height: 1.3;
}

/* === ELITE-MONSTER STYLING === */
.game-card.elite {
  border: 2px solid #ffcf3c;
  box-shadow: 0 0 22px rgba(255, 207, 60, 0.6), inset 0 0 30px rgba(180, 0, 0, 0.35);
  position: relative;
  animation: elite-pulse 2.4s ease-in-out infinite;
}
.game-card.elite .game-card-name {
  color: #ffcf3c;
  text-shadow: 0 0 8px rgba(255, 207, 60, 0.9), 0 0 2px #800;
}
.game-card-elite-banner {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #ffcf3c 0%, #d49020 100%);
  color: #2a0a0a;
  font-size: 0.7em;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 2px 8px;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.6);
  z-index: 2;
}
@keyframes elite-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(255, 207, 60, 0.5), inset 0 0 30px rgba(180, 0, 0, 0.35); }
  50%      { box-shadow: 0 0 30px rgba(255, 207, 60, 0.9), inset 0 0 40px rgba(220, 30, 30, 0.5); }
}

/* === FULLSCREEN-TAUSCH-MODAL auf Mobile === */
@media (max-width: 720px) {
  #modal { padding: 0; }
  #modal-content {
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 16px;
    overflow-y: auto;
    box-sizing: border-box;
  }
}

/* === DROP-GRID RESPONSIVE statt seitwärts scrollen === */
.drop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0;
  max-width: 100%;
  overflow: visible;
}
.drop-btn {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px !important;
  min-height: 110px;
  cursor: pointer;
  white-space: normal !important;
}
.drop-btn img {
  width: 60px; height: 60px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 4px;
}
@media (max-width: 480px) {
  .drop-grid { grid-template-columns: repeat(2, 1fr); }
  .drop-btn { min-height: 130px; }
  .drop-btn img { width: 70px; height: 70px; }
}

/* === CONNECTION-STATUS IN-GAME === */
.conn-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  background: #444;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}
.conn-dot.on  { background: #4c4; box-shadow: 0 0 6px #4c4; }
.conn-dot.off { background: #c44; box-shadow: 0 0 6px #c44; animation: pulse-off 1.8s ease-in-out infinite; }
@keyframes pulse-off {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}
.player-card.offline {
  opacity: 0.65;
  filter: grayscale(0.4);
}
