/* ============ Theme tokens ============ */

body[data-theme="cyberpunk"] {
  --bg-0: #07030f;
  --bg-1: #170a2e;
  --bg-grad: radial-gradient(ellipse at top, #1d0d3a 0%, #0a0416 55%, #050208 100%);
  --panel: #130a24;
  --panel-border: rgba(178, 38, 255, 0.35);
  --panel-glow: rgba(178, 38, 255, 0.18);
  --accent: #b026ff;
  --accent-soft: rgba(178, 38, 255, 0.15);
  --accent-2: #00f0ff;
  --accent-2-soft: rgba(0, 240, 255, 0.15);
  --danger: #ff2f6e;
  --danger-soft: rgba(255, 47, 110, 0.18);
  --text: #ece3ff;
  --text-muted: #8f7fb0;
  --tile-bg: #1a0e33;
  --tile-bg-hover: #26124a;
  --tile-border: rgba(178, 38, 255, 0.28);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --radius: 10px;
  --scanlines: 1;
}

body[data-theme="classic"] {
  --bg-0: #05130c;
  --bg-1: #0c2417;
  --bg-grad: radial-gradient(ellipse at top, #0f2c1c 0%, #071810 55%, #030c08 100%);
  --panel: #0c2016;
  --panel-border: rgba(212, 175, 55, 0.35);
  --panel-glow: rgba(212, 175, 55, 0.12);
  --accent: #d4af37;
  --accent-soft: rgba(212, 175, 55, 0.15);
  --accent-2: #2ecc71;
  --accent-2-soft: rgba(46, 204, 113, 0.15);
  --danger: #e74c3c;
  --danger-soft: rgba(231, 76, 60, 0.18);
  --text: #f2ead0;
  --text-muted: #8fa899;
  --tile-bg: #123321;
  --tile-bg-hover: #1a4630;
  --tile-border: rgba(212, 175, 55, 0.25);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --radius: 8px;
  --scanlines: 0;
}

body[data-theme="minimal"] {
  --bg-0: #f4f4f6;
  --bg-1: #ffffff;
  --bg-grad: #f4f4f6;
  --panel: #ffffff;
  --panel-border: #e5e5ea;
  --panel-glow: rgba(0, 0, 0, 0.04);
  --accent: #171717;
  --accent-soft: rgba(23, 23, 23, 0.06);
  --accent-2: #2563eb;
  --accent-2-soft: rgba(37, 99, 235, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --text: #171717;
  --text-muted: #737380;
  --tile-bg: #f0f0f3;
  --tile-bg-hover: #e6e6ea;
  --tile-border: #e0e0e5;
  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --radius: 6px;
  --scanlines: 0;
}

body[data-theme="playful"] {
  --bg-0: #fff2f8;
  --bg-1: #ffe8f3;
  --bg-grad: radial-gradient(ellipse at top, #ffe0f0 0%, #fff2f8 60%);
  --panel: #ffffff;
  --panel-border: #ffd3e8;
  --panel-glow: rgba(255, 93, 162, 0.12);
  --accent: #ff5da2;
  --accent-soft: rgba(255, 93, 162, 0.13);
  --accent-2: #7c5cff;
  --accent-2-soft: rgba(124, 92, 255, 0.13);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, 0.15);
  --text: #3a1f47;
  --text-muted: #9c85ab;
  --tile-bg: #fdf2f8;
  --tile-bg-hover: #ffe3f0;
  --tile-border: #ffd3e8;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --radius: 14px;
  --scanlines: 0;
}

/* ============ Base ============ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg-grad);
  color: var(--text);
  font-family: var(--font-body);
  transition: background 0.4s ease, color 0.4s ease;
}

.crt-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0;
}

body[data-theme="cyberpunk"] .crt-overlay {
  opacity: 0.5;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: overlay;
}

/* ============ Game nav ============ */

.game-nav {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 32px;
  border-bottom: 1px solid var(--panel-border);
}

.game-nav-link {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.game-nav-link:hover { color: var(--text); background: var(--tile-bg); }
.game-nav-link.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ============ Topbar ============ */

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(to bottom, var(--panel-glow), transparent);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
}

.brand-icon {
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent);
  font-size: 1.4rem;
}

.brand-text {
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  color: var(--text);
  text-shadow: 0 0 18px var(--panel-glow);
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.balance-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 20px var(--panel-glow);
}

.balance-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
}

.balance-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-2);
  text-shadow: 0 0 10px var(--accent-2-soft);
  min-width: 70px;
}

.topup-btn {
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 5px 10px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.topup-btn:hover { background: var(--accent); color: var(--panel); transform: translateY(-1px); }

.theme-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
}

.theme-select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ============ Layout ============ */

.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 28px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  /* Spielbrett (Walzen/Tisch/Rad) zuerst zeigen, Steuerung darunter,
     damit man nach dem Start nicht erst runterscrollen muss */
  .board-panel { order: -1; }
}

@media (max-width: 520px) {
  .layout { padding: 16px; gap: 16px; }
  .topbar { padding: 12px 14px; gap: 10px; }
  .topbar-right { gap: 10px; }
  .game-nav { padding: 8px 12px; gap: 6px; }
  .game-nav-link { font-size: 0.7rem; padding: 6px 10px; }
  .brand-text { font-size: 1.15rem; }
  .brand-sub { display: none; }
  .panel { padding: 16px; }
  .balance-chip { padding: 6px 12px; }
  .theme-label { display: none; }
  .theme-select { font-size: 0.72rem; padding: 6px 8px; max-width: 118px; }
  .user-chip, .ghost-link, .topup-btn { font-size: 0.68rem; padding: 6px 10px; }
}

@media (max-width: 400px) {
  .game-nav { gap: 4px; }
  .game-nav-link { font-size: 0.65rem; padding: 5px 8px; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: 0 0 30px var(--panel-glow);
  padding: 22px;
}

/* ============ Controls ============ */

.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: fit-content;
}

.field-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.bet-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

#bet-input {
  flex: 1;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
#bet-input:focus { outline: none; border-color: var(--accent); }

.stepper {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  color: var(--accent);
  font-weight: 700;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s ease;
}
.stepper:hover { background: var(--tile-bg-hover); }

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}

.range-value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-2);
  min-width: 44px;
  text-align: right;
  font-size: 0.9rem;
}

.stats-block {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.stat-value-accent {
  color: var(--accent-2);
  text-shadow: 0 0 12px var(--accent-2-soft);
}

.action-btn {
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.action-btn:not(:disabled):hover { transform: translateY(-2px); }

.action-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0416;
  box-shadow: 0 0 24px var(--panel-glow);
}

.action-btn-cashout {
  background: var(--accent-2-soft);
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
}
.action-btn-cashout:not(:disabled):hover {
  box-shadow: 0 0 20px var(--accent-2-soft);
}

.hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  min-height: 2.2em;
}

.hint.win { color: var(--accent-2); font-weight: 700; }
.hint.lose { color: var(--danger); font-weight: 700; }

/* ============ Board ============ */

.board-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.grid {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
}

.tile {
  position: relative;
  border-radius: calc(var(--radius) - 2px);
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 3vw, 1.6rem);
  transition: background 0.12s ease, transform 0.08s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  overflow: hidden;
}

.tile:not(.revealed):not(.disabled):hover {
  background: var(--tile-bg-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 16px var(--panel-glow);
}

.tile.disabled { cursor: default; }

.tile.gem {
  background: var(--accent-2-soft);
  border-color: var(--accent-2);
  color: var(--accent-2);
  animation: pop-in 0.28s ease;
  text-shadow: 0 0 14px var(--accent-2);
}

.tile.mine {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
  animation: shake 0.4s ease;
  text-shadow: 0 0 14px var(--danger);
}

.tile.mine-dim {
  background: var(--tile-bg);
  border-color: var(--tile-border);
  color: var(--text-muted);
  opacity: 0.55;
}

@keyframes pop-in {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* ============ User chip / nav links ============ */

.user-chip {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--panel);
}

.ghost-link {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--accent-2);
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.ghost-link:hover { background: var(--accent-2-soft); }

/* ============ Auth pages ============ */

.auth-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: center;
  font-family: var(--font-display);
  margin-bottom: 4px;
}
.auth-brand .brand-text {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.auth-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 18px 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  width: 100%;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  padding: 11px 12px;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }

.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.auth-switch a { color: var(--accent-2); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ============ Admin panel ============ */

.admin-main {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 32px;
}

.admin-panel-head h2 {
  margin: 0 0 4px 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.admin-panel-head .hint { margin-bottom: 16px; }

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.admin-table th {
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-border);
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-border);
  vertical-align: middle;
}

.admin-table input[type="number"],
.admin-table input[type="password"] {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  font-family: var(--font-body);
  font-weight: 600;
  width: 110px;
}

.admin-table select.force-select {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
}

.streak-cell {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-2);
  text-align: center;
}

.admin-table .save-btn,
.admin-table .del-btn,
.admin-table .pw-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-body);
}

.admin-table .save-btn { background: var(--accent-2-soft); color: var(--accent-2); }
.admin-table .pw-btn { background: var(--accent-soft); color: var(--accent); margin-left: 6px; }
.admin-table .del-btn { background: var(--danger-soft); color: var(--danger); }

.admin-table .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.admin-loading { text-align: center; color: var(--text-muted); padding: 20px; }

/* ============ Footer ============ */

.foot-note {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.foot-link {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
}
.foot-link:hover { color: var(--accent, #b24bf3); border-color: var(--accent, #b24bf3); }

/* ============ Legal / Impressum ============ */

.legal-page {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 20px 60px;
  position: relative;
  z-index: 2;
}

.legal-panel { padding: 32px; line-height: 1.6; }
.legal-panel h1 { margin-top: 0; font-family: 'Orbitron', sans-serif; }
.legal-panel h2 { font-size: 1rem; margin-top: 24px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.legal-panel p { margin: 8px 0; }

.legal-placeholder-note {
  background: rgba(255, 180, 60, 0.12);
  border: 1px solid rgba(255, 180, 60, 0.4);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #ffb43c;
}

/* ============ Blackjack ============ */

.bj-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
}

.bj-hand-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}

.bj-hand-label .bj-total {
  color: var(--accent-2);
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-left: 6px;
}

.bj-cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 108px;
}

.bj-card {
  width: 68px;
  height: 96px;
  border-radius: 8px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  animation: pop-in 0.22s ease;
  box-shadow: 0 0 14px var(--panel-glow);
}

.bj-card.red { color: var(--danger); }
.bj-card.black { color: var(--text); }
.bj-card.hidden { color: var(--text-muted); font-size: 1.6rem; }

.bj-card-suit { font-size: 1.1rem; margin-top: 2px; }

.bj-result-banner {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  min-height: 1.6em;
}
.bj-result-banner.win { color: var(--accent-2); text-shadow: 0 0 12px var(--accent-2-soft); }
.bj-result-banner.lose { color: var(--danger); text-shadow: 0 0 12px var(--danger-soft); }
.bj-result-banner.push { color: var(--text-muted); }

.action-row { display: flex; gap: 10px; }
.action-row .action-btn { flex: 1; }

/* ============ Roulette ============ */

.roulette-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  width: 100%;
}

.wheel-stage {
  position: relative;
  width: min(320px, 78vw);
  height: min(320px, 78vw);
  margin: 0 auto;
}

.wheel-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 26px var(--panel-glow));
}

.wheel-rim {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  opacity: 0.9;
}

.wheel-track {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.wheel-hub-ring {
  fill: var(--tile-bg);
  stroke: var(--accent);
  stroke-width: 2.5;
}

#wheel-group {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 3.2s cubic-bezier(0.11, 0.68, 0.15, 1);
}

#ball-group {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 3.4s cubic-bezier(0.11, 0.68, 0.15, 1);
}

.wheel-wedge {
  stroke: rgba(0, 0, 0, 0.5);
  stroke-width: 0.75;
  transition: filter 0.2s ease;
}
.wheel-wedge.rw-red { fill: #c81e3d; }
.wheel-wedge.rw-black { fill: #14151b; }
.wheel-wedge.rw-green { fill: #0f8f4f; }
.wheel-wedge.winning { filter: brightness(1.9) saturate(1.3); }

.wheel-number {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  fill: #f2eefb;
  pointer-events: none;
  user-select: none;
}

.wheel-ball {
  fill: #fffef2;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9));
}

.wheel-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  color: var(--accent);
  text-shadow: 0 0 10px var(--panel-glow);
  pointer-events: none;
}

.wheel-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 16px solid var(--accent);
  filter: drop-shadow(0 0 6px var(--panel-glow));
  z-index: 3;
}

.wheel-result {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  color: var(--text-muted);
  min-height: 1.4em;
}
.wheel-result.win { color: var(--accent-2); }
.wheel-result.lose { color: var(--danger); }

.bet-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 460px;
}

.bet-cell {
  padding: 10px 4px;
  text-align: center;
  border-radius: 6px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}
.bet-cell:hover { transform: translateY(-1px); border-color: var(--accent); }
.bet-cell.red { color: var(--danger); }
.bet-cell.green { color: var(--accent-2); grid-column: span 6; }
.bet-cell.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 12px var(--panel-glow); }

.outside-bets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 460px;
}

.outside-bets .bet-cell { font-size: 0.72rem; padding: 10px 6px; }

/* ============ Slots ============ */

.slots-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  width: 100%;
}

.slots-cabinet {
  position: relative;
  padding: 20px 22px 26px;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--tile-bg) 0%, var(--panel) 100%);
  border: 2px solid var(--panel-border);
  box-shadow: 0 0 40px var(--panel-glow), inset 0 0 30px rgba(0, 0, 0, 0.4);
}

.cabinet-lights {
  display: flex;
  justify-content: space-between;
  padding: 0 6px 10px;
}
.cabinet-lights-bottom { padding: 10px 6px 0; }

.cabinet-lights::before,
.cabinet-lights::after {
  content: '';
  display: block;
}

.cabinet-lights {
  position: relative;
  height: 10px;
}
.cabinet-lights span { display: none; }

.cabinet-lights::before {
  position: absolute;
  inset: 0;
  content: '';
  background-image: radial-gradient(circle, var(--accent-2) 0 3px, transparent 4px);
  background-size: 22px 10px;
  background-repeat: repeat-x;
  animation: light-chase 1s steps(2) infinite;
  opacity: 0.9;
}

@keyframes light-chase {
  0% { filter: brightness(1); }
  50% { filter: brightness(0.35); }
  100% { filter: brightness(1); }
}

.cabinet-marquee {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--accent);
  text-shadow: 0 0 10px var(--panel-glow);
  margin-bottom: 14px;
}
.cabinet-marquee span { color: var(--accent-2); }

.slots-machine {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-radius: 14px;
  background: #0a0714;
  border: 3px solid var(--accent);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6), 0 0 24px var(--panel-glow);
}

.slot-reel {
  position: relative;
  width: clamp(48px, 20vw, 92px);
  height: 264px;
  border-radius: 8px;
  background: linear-gradient(180deg, #050308 0%, #14101f 50%, #050308 100%);
  border: 1px solid var(--tile-border);
  overflow: hidden;
}

.slot-reel::before,
.slot-reel::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 88px;
  z-index: 2;
  pointer-events: none;
}
.slot-reel::before {
  top: 0;
  background: linear-gradient(180deg, rgba(5, 3, 8, 0.95) 0%, rgba(5, 3, 8, 0) 100%);
}
.slot-reel::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(5, 3, 8, 0.95) 0%, rgba(5, 3, 8, 0) 100%);
}

.slot-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform, filter;
}

.slot-symbol {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
}

.slot-reel.landed { animation: reel-land-pulse 0.35s ease-out; }
@keyframes reel-land-pulse {
  0% { box-shadow: 0 0 0 rgba(0, 240, 255, 0); }
  35% { box-shadow: inset 0 0 24px var(--accent-2-soft), 0 0 14px var(--accent-2-soft); }
  100% { box-shadow: 0 0 0 rgba(0, 240, 255, 0); }
}

.payline-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--accent-2);
  text-shadow: 0 0 8px var(--accent-2-soft);
  z-index: 3;
}
.payline-left { left: 4px; }
.payline-right { right: 4px; }

.reel-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.06) 0%, transparent 30%, transparent 70%, rgba(255, 255, 255, 0.04) 100%);
  pointer-events: none;
  border-radius: 14px;
}

.slots-machine::before,
.slots-machine::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 32px);
  height: 90px;
  left: 16px;
  border-top: 1px dashed var(--accent-2-soft);
  border-bottom: 1px dashed var(--accent-2-soft);
  pointer-events: none;
  z-index: 2;
}
.slots-machine::after { display: none; }

.slots-paytable {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 420px) {
  /* Nur Breite/Innenabstände verkleinern - die Höhe (264px / 88px pro Symbol)
     bleibt fix, da slots.js SYMBOL_HEIGHT=88 für die Dreh-Animation nutzt */
  .slots-cabinet { padding: 14px 8px 16px; }
  .slots-machine { padding: 10px 6px; gap: 6px; }
}

.paytable-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.paytable-entry .pt-mult { color: var(--accent-2); font-weight: 700; }

/* ============ Bud Cascade (5x3 cascading slot) ============ */

.cx-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  width: 100%;
}

.cx-cabinet {
  position: relative;
  padding: 20px 22px 26px;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--tile-bg) 0%, var(--panel) 100%);
  border: 2px solid var(--panel-border);
  box-shadow: 0 0 40px var(--panel-glow), inset 0 0 30px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 620px;
}

.cx-machine {
  position: relative;
  padding: 18px;
  border-radius: 16px;
  background: #0a0714;
  border: 3px solid var(--accent);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6), 0 0 24px var(--panel-glow);
}

.cx-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cx-reels, 5), 1fr);
  grid-template-rows: repeat(var(--cx-rows, 3), 1fr);
  gap: 8px;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.cx-grid.cx-spinning {
  filter: blur(3px) brightness(1.3);
  animation: cx-spin-shimmer 0.35s linear infinite;
}

@keyframes cx-spin-shimmer {
  0%   { transform: translateY(0); opacity: 1; }
  50%  { transform: translateY(4px); opacity: 0.75; }
  100% { transform: translateY(0); opacity: 1; }
}

.cx-reels-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cx-reels, 5), 1fr);
  gap: 8px;
  z-index: 10;
}

.cx-reel-col {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #0d0a18;
  border: 2px solid var(--tile-border);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55);
}

.cx-reel-strip {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  will-change: transform, filter;
}

.cx-reel-tile {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cx-reel-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-reel-tile.cx-wild {
  background: linear-gradient(135deg, #ffd24a, #ff5fd8, #00e0ff, #58e07a, #ffd24a);
  background-size: 300% 300%;
  animation: cx-wild-shift 3s ease infinite;
}

.cx-reel-col.cx-reel-landed { animation: cx-reel-land-flash 0.26s ease-out; }
@keyframes cx-reel-land-flash {
  0%   { box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55), 0 0 0 rgba(0, 240, 255, 0); }
  40%  { box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55), 0 0 20px var(--accent-2-soft), inset 0 0 22px var(--accent-2-soft); }
  100% { box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55), 0 0 0 rgba(0, 240, 255, 0); }
}

.cx-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
}

.cx-tile {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0a18;
  border: 2px solid var(--tile-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cx-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cx-tile.cx-drop-in {
  animation: cx-drop 0.5s cubic-bezier(.2,.9,.3,1.2) both;
}

@keyframes cx-drop {
  0%   { transform: translateY(-140%); opacity: 0; }
  70%  { transform: translateY(6%); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

.cx-tile.cx-win {
  animation: cx-win-pulse 0.6s ease-in-out infinite;
  z-index: 4;
}

@keyframes cx-win-pulse {
  0%, 100% { box-shadow: 0 0 10px 0 var(--accent-2-soft); border-color: var(--accent-2); transform: scale(1); }
  50%      { box-shadow: 0 0 26px 6px var(--accent-2-soft); border-color: #fff; transform: scale(1.06); }
}

.cx-tile.cx-pop {
  animation: cx-pop-out 0.32s ease-in forwards;
}

@keyframes cx-pop-out {
  0%   { transform: scale(1) rotate(0deg); opacity: 1; }
  100% { transform: scale(0.15) rotate(25deg); opacity: 0; }
}

/* rarity accents per rank */
.cx-rank1 { border-color: #ffd24a; box-shadow: 0 0 12px rgba(255, 210, 74, 0.45); }
.cx-rank2 { border-color: #ff5fd8; box-shadow: 0 0 10px rgba(255, 95, 216, 0.35); }
.cx-rank3 { border-color: #00e0ff; box-shadow: 0 0 10px rgba(0, 224, 255, 0.3); }
.cx-rank4 { border-color: #58e07a; box-shadow: 0 0 8px rgba(88, 224, 122, 0.28); }
.cx-rank5 { border-color: #b7b0cf; box-shadow: 0 0 6px rgba(183, 176, 207, 0.2); }
.cx-rank6 { border-color: #7a7290; }

.cx-wild {
  background: linear-gradient(135deg, #ffd24a, #ff5fd8, #00e0ff, #58e07a, #ffd24a);
  background-size: 300% 300%;
  animation: cx-wild-shift 3s ease infinite;
  border-color: #fff;
}
.cx-tile.cx-wild.cx-drop-in { animation: cx-drop 0.5s cubic-bezier(.2,.9,.3,1.2) both, cx-wild-shift 3s ease infinite; }
.cx-tile.cx-wild.cx-win { animation: cx-win-pulse 0.6s ease-in-out infinite, cx-wild-shift 3s ease infinite; }

@keyframes cx-wild-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.cx-wild-star {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #1a0e33;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.cx-line-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

.cx-line-path {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--accent-2));
  stroke-dasharray: 12 8;
  animation: cx-line-march 0.5s linear infinite;
}

@keyframes cx-line-march {
  to { stroke-dashoffset: -40; }
}

.cx-cascade-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  z-index: 8;
  padding: 10px 22px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  border: 2px solid #fff;
  box-shadow: 0 0 30px var(--panel-glow);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(.3,1.4,.5,1);
}

.cx-cascade-badge.cx-show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: cx-badge-bounce 0.7s ease;
}

@keyframes cx-badge-bounce {
  0%   { transform: translate(-50%, -50%) scale(0.6); }
  40%  { transform: translate(-50%, -50%) scale(1.15); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.cx-cascade-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: #0a0714;
}

.cx-cascade-mult {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  color: #0a0714;
}

.cx-paytable {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.cx-pt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
}

.cx-pt-thumb {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--tile-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.cx-pt-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cx-pt-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.cx-pt-label { font-size: 0.74rem; font-weight: 700; color: var(--text); }
.cx-pt-mult { font-size: 0.68rem; color: var(--accent-2); font-weight: 600; }

@media (max-width: 520px) {
  .cx-cabinet { padding: 14px 12px 18px; }
  .cx-machine { padding: 10px; }
  .cx-grid { gap: 5px; }
  .cx-tile { border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .cx-tile, .cx-grid, .cx-line-path, .cx-cascade-badge, .cx-reel-strip, .cx-reel-col {
    animation: none !important;
  }
}

/* ============ Announcements / News feed ============ */

.news-layout {
  grid-template-columns: 340px 1fr;
}

@media (max-width: 860px) {
  .news-layout { grid-template-columns: 1fr; }
}

.news-composer-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
  color: var(--text);
}

.news-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.news-form-row { display: flex; gap: 10px; }

.news-form input[type="text"],
.news-form textarea {
  width: 100%;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
}

.news-form input[type="file"] {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.news-image-preview img {
  margin-top: 8px;
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--tile-border);
}

.news-feed-panel { padding: 20px; }

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  border: 1px solid var(--tile-border);
  border-radius: var(--radius);
  background: var(--tile-bg);
  padding: 18px;
  position: relative;
}

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.news-badge {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--tile-border);
  color: var(--text-muted);
}
.news-badge-announcement { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.news-badge-update { color: var(--accent-2); border-color: var(--accent-2); background: var(--accent-2-soft); }
.news-badge-log { color: var(--text-muted); }

.news-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.news-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 10px;
  color: var(--text);
}

/* Wrap + blurred letterbox backdrop keeps the FULL uploaded image visible at its
   native aspect ratio (object-fit: contain) instead of cropping/stretching it
   to a fixed box — that mismatch between the box and the real px size was
   what made uploaded images look distorted/low quality. */
.news-card-image-wrap {
  position: relative;
  width: 100%;
  max-height: 320px;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--tile-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-image-backdrop {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(26px) brightness(0.55) saturate(1.3);
  transform: scale(1.15);
  z-index: 0;
}

.news-card-image {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
}

.news-card-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  margin: 0;
}

.news-delete-btn {
  margin-top: 12px;
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.news-delete-btn:hover { background: var(--danger-soft); }

@media (max-width: 520px) {
  .news-card-image-wrap { max-height: 260px; }
}

/* ============ Shared ambient fx tokens (used by the decor rails) ============ */

.cw-glow-purple { --glow: rgba(178, 38, 255, 0.55); }
.cw-glow-teal   { --glow: rgba(0, 224, 255, 0.5); }
.cw-glow-green  { --glow: rgba(90, 220, 120, 0.5); }

@keyframes cw-ambient-glow {
  0%, 100% { box-shadow: 0 0 8px -2px var(--glow); }
  50%      { box-shadow: 0 0 20px 0px var(--glow); }
}

/* ambient fx layers, sit between the tile background and the image */
.cw-fx {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.cw-fx-smoke {
  left: 10%;
  bottom: 6%;
  width: 70px;
  height: 100px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 72%);
  filter: blur(12px);
  opacity: 0;
  animation: cw-drift 8s ease-in-out infinite;
}

.cw-fx-pink { left: 55%; background: radial-gradient(circle, rgba(255, 45, 170, 0.5) 0%, transparent 72%); animation-duration: 10s; }
.cw-fx-delay1 { animation-delay: 2.4s; }
.cw-fx-delay2 { animation-delay: 4.8s; }

@keyframes cw-drift {
  0%   { transform: translateY(0) scale(0.8); opacity: 0; }
  15%  { opacity: 0.55; }
  85%  { opacity: 0.25; }
  100% { transform: translateY(-150px) scale(1.3); opacity: 0; }
}

.cw-fx-ember {
  right: 12%;
  bottom: 12%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffcf80 0%, #ff7a1f 55%, transparent 75%);
  box-shadow: 0 0 12px 3px rgba(255, 140, 40, 0.8);
  animation: cw-ember-pulse 1.8s ease-in-out infinite;
}

@keyframes cw-ember-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

.cw-fx-flame {
  left: 10%;
  top: 8%;
  width: 24px;
  height: 32px;
  background: radial-gradient(ellipse at bottom, #ffe27a 0%, #ff8a00 45%, transparent 75%);
  filter: blur(2px);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: cw-flicker 1.3s ease-in-out infinite;
}

@keyframes cw-flicker {
  0%, 100% { transform: scaleY(1) scaleX(1); opacity: 0.8; }
  50%      { transform: scaleY(1.18) scaleX(0.9); opacity: 1; }
}

.cw-fx-sparkle {
  right: 10%;
  top: 8%;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(255,255,255,0.9);
  animation: cw-twinkle 2.6s ease-in-out infinite;
}

@keyframes cw-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50%      { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .decor-item, .cw-fx, .cw-fx-smoke, .cw-fx-ember, .cw-fx-flame, .cw-fx-sparkle {
    animation: none !important;
  }
}

/* ============ Decorative side rails (all game pages) ============ */

.decor-rail {
  position: fixed;
  top: 140px;
  bottom: 24px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
  width: 128px;
  z-index: 1;
  pointer-events: none;
}
.decor-rail-left { left: 18px; }
.decor-rail-right { right: 18px; }

@media (min-width: 1500px) {
  .decor-rail { display: flex; }
}

.decor-item {
  position: relative;
  margin: 0;
  padding: 7px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: 14px;
  overflow: hidden;
  transform: rotate(var(--rot, 0deg));
  animation: cw-ambient-glow 5s ease-in-out infinite, decor-float 6s ease-in-out infinite;
  animation-delay: 0s, var(--float-delay, 0s);
}

.decor-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  position: relative;
  z-index: 2;
}

@keyframes decor-float {
  0%, 100% { transform: rotate(var(--rot, 0deg)) translateY(0); }
  50%      { transform: rotate(var(--rot, 0deg)) translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .decor-item { animation: none !important; }
}
