:root {
  /* Die Oberfläche ist dunkel. Ohne diese Zeile zeichnet der Browser
     Bildlaufleisten und Formularelemente hell darüber. */
  color-scheme: dark;

  --gold: #e9c45c;
  --gold-pale: #fff2c0;
  --green: #37e895;
  --red: #ea3943;
  --text: #eef1f7;
  --muted: #9aa3b6;
  --panel: rgba(14, 19, 33, 0.82);
  --edge: rgba(233, 196, 92, 0.22);
}

* {
  box-sizing: border-box;
}

/* Ein gesetztes display: überschreibt sonst das hidden-Attribut. */
[hidden] {
  display: none !important;
}

/* Zwei Ausnahmen: Freispiel-Banner und Gewinnanzeige tauchen mitten im Spiel auf
   und wieder ab. Mit display:none sprang alles darunter — Guthaben, Knöpfe,
   Statistik — um 59 px nach unten und wieder zurück. Ihr Platz bleibt darum
   reserviert; unsichtbar heißt hier durchsichtig, nicht abwesend.
   (Höhere Spezifität als [hidden], darum gewinnt das !important hier.) */
.fs-banner[hidden],
.win-box[hidden] {
  display: flex !important;
  visibility: hidden;
}

/* Sichtbar nur für den Screenreader. display:none wäre es auch für ihn. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Tastaturbedienung war bisher unsichtbar: kein einziger Fokusrahmen im
   ganzen Stylesheet. :focus-visible zeigt ihn der Tastatur, nicht der Maus. */
:focus-visible {
  outline: 2px solid var(--gold-pale);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) {
  outline: none;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font:
    15px/1.5 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: #07090f;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
  overflow-x: hidden;
}

/* ---------- Kabinett ---------- */

.cabinet {
  position: relative;
  width: 100%;
  max-width: 1240px;
  padding: 22px 26px 26px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

.cabinet.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  10%,
  90% {
    transform: translate(-2px, 1px);
  }
  20%,
  80% {
    transform: translate(4px, -2px);
  }
  30%,
  50%,
  70% {
    transform: translate(-6px, 2px);
  }
  40%,
  60% {
    transform: translate(6px, -1px);
  }
}

/* ---------- Kulisse ---------- */

.scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #150c30 0%,
    #2c1345 20%,
    #5b2359 38%,
    #a04059 52%,
    #d8794e 62%,
    #7a3247 74%,
    #1d0f26 88%,
    #0a0612 100%
  );
}

/* Der Verlauf würde die untere Hälfte auswaschen. Die Bedienelemente
   brauchen aber einen ruhigen, dunklen Untergrund. */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 46%,
    rgba(8, 5, 16, 0.72) 72%,
    #07050e 92%
  );
}

.sun {
  position: absolute;
  left: 50%;
  bottom: 40%;
  width: 700px;
  height: 700px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 226, 150, 0.55) 0%,
    rgba(255, 190, 110, 0.28) 32%,
    transparent 62%
  );
  filter: blur(6px);
}

.cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(22px);
  background: radial-gradient(
    circle,
    rgba(255, 214, 190, 0.4),
    rgba(255, 190, 170, 0.06) 70%
  );
  animation: drift 60s linear infinite;
}

.c1 {
  width: 420px;
  height: 130px;
  top: 12%;
  left: -6%;
}
.c2 {
  width: 520px;
  height: 150px;
  top: 26%;
  right: -8%;
  animation-duration: 84s;
  animation-direction: reverse;
}
.c3 {
  width: 360px;
  height: 110px;
  bottom: 22%;
  left: 22%;
  animation-duration: 72s;
}

@keyframes drift {
  from {
    transform: translateX(-40px);
  }
  to {
    transform: translateX(40px);
  }
}

.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26%;
  background:
    linear-gradient(180deg, rgba(60, 24, 40, 0.5), rgba(24, 10, 18, 0.92)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 220, 170, 0.05) 0 2px,
      transparent 2px 46px
    );
}

/* ---------- Tempel, Zeus, Blitz ---------- */

.scenery {
  position: absolute;
  inset: 0;
}

/* Der Tempel steht weit hinten. Sein Giebel trägt den Titel, die Kolonnade
   verschwindet hinter dem Spielfeld — genau das erzeugt die Tiefe. */
.temple {
  position: absolute;
  left: 50%;
  top: -4px;
  width: 1160px;
  transform: translateX(-50%);
  opacity: 0.78;
  filter: drop-shadow(0 0 60px rgba(255, 170, 100, 0.2));
}

/* Warmer Schein hinter Zeus. Ohne ihn versinkt die Silhouette im dunklen Himmel. */
.zeus-glow {
  position: absolute;
  right: -56px;
  bottom: 16%;
  width: 350px;
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 190, 120, 0.34) 0%,
    rgba(255, 140, 90, 0.14) 40%,
    transparent 68%
  );
  filter: blur(10px);
}

.zeus {
  position: absolute;
  right: -28px;
  bottom: 20%;
  height: 600px;
  width: auto;
  animation: breathe 6.5s ease-in-out infinite alternate;
}

@keyframes breathe {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-7px) scale(1.006);
  }
}

.zeus .bolt {
  transform-box: fill-box;
  transform-origin: center;
  animation: boltPulse 2.4s ease-in-out infinite alternate;
}

@keyframes boltPulse {
  from {
    opacity: 0.75;
  }
  to {
    opacity: 1;
    filter: brightness(1.35);
  }
}

/* Blitzschlag: zwei kurze Blenden, wie ein echter Doppelschlag. */
.lightning {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 80% at 78% 24%,
    rgba(255, 240, 210, 0.9),
    rgba(200, 170, 255, 0.35) 40%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
}

.lightning.strike {
  animation: strike 0.7s ease-out;
}

@keyframes strike {
  0% {
    opacity: 0;
  }
  6% {
    opacity: 0.85;
  }
  14% {
    opacity: 0.05;
  }
  22% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
  }
}

/* Wer "weniger Bewegung" eingestellt hat, meint das ernst. Bisher standen hier
   vier Selektoren, animiert wurden vierzehn — Kulisse ruhig, Spielfeld tanzt.
   Jetzt schweigt alles bis auf zwei bewusste Ausnahmen, beide unten begründet. */
@media (prefers-reduced-motion: reduce) {
  .zeus,
  .zeus .bolt,
  .zeus.cast .bolt,
  .flame,
  .cloud,
  .cabinet.shake,
  .cell.scatter.hot,
  .cell.anticipate,
  .orb,
  .cell.drop .inner,
  .cell.drop-slow .inner,
  .mult-pop.show,
  .fs-mult b.bump,
  .overlay {
    animation: none;
  }

  /* Ohne Zoom bleibt der Multiplikator wenigstens kurz sichtbar stehen. */
  .mult-pop.show {
    opacity: 1;
  }

  /* Der Blitz bleibt, aber als kurzes Aufhellen statt als Zucken. */
  .lightning.strike {
    animation-duration: 0.2s;
  }

  /* Ohne die Pop-Animation blieben Gewinnsymbole bis zum Nachrutschen stehen —
     man sähe nicht, was gewonnen hat. Statt Bewegung: sie werden blass. */
  .cell.pop .inner {
    animation: none;
    opacity: 0.25;
  }

  /* Funken sind reine Zierde. Sie entstehen gar nicht erst (siehe main.js);
     diese Regel fängt den Fall ab, dass die Abfrage dort einmal ausfällt. */
  .spark {
    display: none;
  }

  /* Ausnahme: Der Drehknopf-Ring zeigt "Runde läuft". Ein stehender Ladeanzeiger
     zeigt gar nichts. Er dreht sich langsamer weiter, statt zu verschwinden. */
  .spin:disabled .spin-icon {
    animation-duration: 2.4s;
  }
}

/* Säulen mit Feuerschale. */

/* Am Rand angeschnitten. Ein frei stehender Zylinder liest sich als Gegenstand,
   eine halb aus dem Bild laufende Säule als Architektur.
   Nur links: rechts steht Zeus, dort wäre die Säule im Weg. */
.pillar {
  position: absolute;
  bottom: 0;
  left: -26px;
  width: 132px;
  height: 90%;
}

.shaft {
  position: absolute;
  bottom: 0;
  left: 26px;
  right: 26px;
  top: 68px;
  background: linear-gradient(
    90deg,
    #4e4038 0%,
    #b7a89a 18%,
    #efe6da 44%,
    #cabdaf 64%,
    #6a584e 100%
  );
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

/* Basis und Deckplatte geben der Säule Gewicht. */
.shaft::before {
  content: "";
  position: absolute;
  left: -9px;
  right: -9px;
  bottom: 0;
  height: 26px;
  background: linear-gradient(180deg, #cabdaf, #5d4d43);
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.4);
}

/* Kannelierung: schmale Rillen, wie bei dorischen Säulen. */
.shaft::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.16) 0 1px,
    transparent 1px 11px
  );
}

.capital {
  position: absolute;
  top: 52px;
  left: 10px;
  right: 10px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, #efe6da, #9d8d7f);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

/* Tiefe Bronzeschale. Ein flacher Teller mit hoher Flamme sah aus wie eine Kerze. */
.brazier {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 34px;
  border-radius: 4px 4px 40px 40px / 4px 4px 26px 26px;
  background: linear-gradient(180deg, #8a6a2a 0%, #6d4c0e 40%, #3a2705 100%);
  box-shadow:
    0 0 60px rgba(240, 150, 50, 0.45),
    inset 0 4px 10px rgba(255, 210, 120, 0.45);
}

/* Glut im Inneren der Schale. */
.brazier::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 8px;
  right: 8px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #ffcf6a, #b3560f 70%);
  filter: blur(2px);
}

.flame {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 30px;
  height: 44px;
  transform: translateX(-50%);
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(
    ellipse at 50% 78%,
    #fff3c4 0%,
    #ffca4a 30%,
    #f4772a 62%,
    rgba(220, 60, 20, 0) 78%
  );
  filter: blur(1.5px);
  animation: flicker 1.1s ease-in-out infinite alternate;
}

.flame.f2 {
  width: 17px;
  height: 27px;
  bottom: 28px;
  opacity: 0.85;
  animation-duration: 0.8s;
  animation-delay: 0.2s;
}

@keyframes flicker {
  from {
    transform: translateX(-50%) scaleY(0.92) scaleX(1.04);
    opacity: 0.85;
  }
  to {
    transform: translateX(-50%) scaleY(1.1) scaleX(0.94);
    opacity: 1;
  }
}

/* ---------- Kopf ---------- */

header {
  text-align: center;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  font-weight: 700;
  background: linear-gradient(180deg, #fff8dd 0%, #f0cf6a 46%, #a97d16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.55));
}

.sub {
  margin: 6px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

/* ---------- Tisch: Leiste | Feld | Leiste ---------- */

/* Rechts mehr Platz als links: dort steht Zeus. Sonst verschwindet er
   hinter dem undurchsichtigen Spielfeldrahmen. */
.table {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 232px;
  gap: 26px;
  align-items: center;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

/* Die Knöpfe sitzen unten, damit Zeus' Kopf, Arm und Blitz darüber frei stehen. */
.rail-right {
  align-items: center;
  justify-content: flex-end;
  align-self: stretch;
  padding-bottom: 8px;
}

/* ---------- Rahmen und Spielfeld ---------- */

.stage {
  position: relative;
}

.frame {
  padding: 9px;
  border-radius: 18px;
  background: linear-gradient(
    170deg,
    #fff2c0 0%,
    #c9a13c 22%,
    #7d590f 52%,
    #c9a13c 78%,
    #ffeeb0 100%
  );
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(233, 196, 92, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.frame-inner {
  position: relative;
  border-radius: 11px;
  padding: 7px;
  background:
    radial-gradient(
      120% 90% at 50% -10%,
      rgba(233, 196, 92, 0.1),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(30, 14, 48, 0.94), rgba(10, 6, 20, 0.97));
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

/* --cols und --rows setzt main.js aus config.js. Die Fallbacks greifen nur,
   wenn das Skript nicht lief — dann steht ohnehin ein leeres Feld da. */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), 1fr);
  grid-template-rows: repeat(var(--rows, 5), 1fr);
  gap: 5px;
}

.cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.015)
  );
  border: 1px solid rgba(255, 255, 255, 0.05);
  user-select: none;
  position: relative;
  overflow: hidden; /* beschneidet das fallende Symbol auf die eigene Zelle */
  /* Bezugsgröße für die Schrift der Goldkugel. Siehe .orb. */
  container-type: inline-size;
}

/* Animiert wird der Inhalt, nicht die Zelle. Sonst schiebt sich ein
   fallendes Symbol sichtbar über seinen Nachbarn. */
.inner {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.art {
  width: 74%;
  height: 74%;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}

.gem-art {
  width: 66%;
  height: 66%;
}

.scatter-art {
  width: 90%;
  height: 90%;
}

.cell.scatter {
  background: radial-gradient(circle at 50% 42%, #4a3a12 0%, #1a1226 74%);
  border-color: rgba(233, 196, 92, 0.5);
  box-shadow: inset 0 0 22px rgba(233, 196, 92, 0.28);
}

/* Spannungsaufbau: sobald 3+ Scatter liegen, pulsieren sie. */
.cell.scatter.hot {
  animation: hot 0.7s ease-in-out infinite alternate;
}

@keyframes hot {
  from {
    box-shadow: inset 0 0 22px rgba(233, 196, 92, 0.28);
  }
  to {
    box-shadow:
      inset 0 0 34px rgba(233, 196, 92, 0.65),
      0 0 26px rgba(233, 196, 92, 0.7);
  }
}

.orb {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  /* "500×" ist der breiteste Text im Spiel und stand bei 15 px in einer 35 px
     breiten Kugel — 0,8 px Luft je Seite, die Schrift berührte den Rand. Die
     Schrift folgt darum der Zellenbreite und deckelt bei 15 px.
     Die erste Zeile ist der Rückfall für Browser ohne Container-Einheiten. */
  font-size: 15px;
  font-size: clamp(9px, 21cqw, 15px);
  font-weight: 800;
  color: #33260a;
  background: radial-gradient(
    circle at 34% 28%,
    #fff6d4 0%,
    #f0cf6a 38%,
    #c9971f 70%,
    #7d590f 100%
  );
  box-shadow:
    0 0 22px rgba(233, 196, 92, 0.6),
    inset 0 -4px 8px rgba(0, 0, 0, 0.3),
    inset 0 3px 6px rgba(255, 255, 255, 0.5);
  animation: orbGlow 1.4s ease-in-out infinite alternate;
}

@keyframes orbGlow {
  to {
    box-shadow:
      0 0 34px rgba(255, 220, 120, 0.85),
      inset 0 -4px 8px rgba(0, 0, 0, 0.3),
      inset 0 3px 6px rgba(255, 255, 255, 0.5);
  }
}

/* ---------- Animationen ---------- */

/* backwards hält den Startzustand während der Verzögerung fest. Sonst stünde
   das Symbol erst an seinem Platz und ruckte dann nach oben. */
.cell.drop .inner {
  /* --drop-ms setzt main.js aus T.DROP und skaliert es mit dem Turbo mit. */
  animation: drop var(--drop-ms, 260ms) cubic-bezier(0.3, 1.25, 0.6, 1)
    backwards;
  animation-delay: var(--drop-delay, 0ms);
}

@keyframes drop {
  from {
    transform: translateY(-115%);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.cell.pop {
  z-index: 2;
  overflow: visible; /* der Glanz beim Auflösen darf über den Rand */
}

/* forwards: ohne Fülleinstellung springt das Symbol nach der Animation auf volle
   Größe zurück und steht noch ~20 ms da, bevor das Nachrutschen es ersetzt. */
.cell.pop .inner {
  animation: pop var(--pop-ms, 500ms) ease forwards;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.18);
    filter: brightness(1.6) drop-shadow(0 0 20px rgba(233, 196, 92, 0.8));
  }
  100% {
    transform: scale(0.15);
    opacity: 0;
  }
}

/* Partikel beim Auflösen. */

.fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.spark {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fff6d4,
    var(--gold) 60%,
    transparent 72%
  );
  animation: spark 0.62s ease-out forwards;
}

@keyframes spark {
  from {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(var(--dx), var(--dy)) scale(0.2);
    opacity: 0;
  }
}

/* ---------- Banner, Gewinn, Overlay ---------- */

.fs-banner {
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: 11px;
  background: linear-gradient(
    90deg,
    rgba(52, 40, 18, 0.9),
    rgba(28, 22, 10, 0.9)
  );
  border: 1px solid rgba(233, 196, 92, 0.45);
  color: var(--gold);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.06em;
  backdrop-filter: blur(4px);
}

.fs-mult {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}
.fs-mult b {
  color: var(--gold-pale);
  font-size: 18px;
}

.fs-mult b.bump {
  animation: bump 0.4s ease;
}

@keyframes bump {
  50% {
    transform: scale(1.5);
    color: #fff;
  }
}

/* ---------- Juice: Anticipation, Zeus, Multiplikator-Zoom ---------- */

/* Zeus schleudert den Blitz, wenn eine Kugel landet. --cast (0..1) skaliert die
   Helligkeit mit dem Kugelwert. scenery.js setzt Klasse und Variable. */
.zeus.cast .bolt {
  animation: castBolt 0.6s ease-out;
}
@keyframes castBolt {
  0% {
    filter: brightness(1);
    transform: scale(1);
  }
  25% {
    filter: brightness(calc(1.6 + var(--cast, 0.5) * 1.8))
      drop-shadow(0 0 calc(8px + var(--cast, 0.5) * 30px) #ffe8a0);
    transform: scale(calc(1 + var(--cast, 0.5) * 0.12));
  }
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

/* Eine Walze läuft in Zeitlupe ein, weil ein weiterer Scatter fallen könnte.
   Der langsame Fall ist das eigentliche Herzklopfen. */
.cell.drop-slow .inner {
  animation: drop 0.52s cubic-bezier(0.25, 0.9, 0.35, 1) backwards;
}

/* Die Zellen einer Anticipation-Walze glühen pulsierend gold, solange die
   Spannung hält. */
.cell.anticipate {
  z-index: 1;
  animation: antGlow 0.6s ease-in-out infinite alternate;
}
@keyframes antGlow {
  from {
    box-shadow:
      inset 0 0 0 2px rgba(233, 196, 92, 0.4),
      0 0 10px rgba(233, 196, 92, 0.3);
  }
  to {
    box-shadow:
      inset 0 0 0 2px rgba(255, 240, 180, 0.9),
      0 0 26px rgba(233, 196, 92, 0.7);
  }
}

/* Der Multiplikator, groß in der Mitte, bevor er auf den Gewinn wirkt. */
.mult-pop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 6;
  font-weight: 900;
  font-size: clamp(40px, 14cqw, 96px);
  color: var(--gold-pale);
  text-shadow:
    0 0 30px rgba(233, 196, 92, 0.9),
    0 4px 10px rgba(0, 0, 0, 0.6);
  opacity: 0;
}
.mult-pop.show {
  animation: multPop 0.9s cubic-bezier(0.2, 1.5, 0.4, 1);
}
@keyframes multPop {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-8deg);
  }
  30% {
    opacity: 1;
    transform: scale(1.15) rotate(2deg);
  }
  70% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

/* Der Rahmen lädt sich mit jeder Kaskade der Kette weiter auf. --charge (0..1)
   setzt main.js. Kein animation:, nur ein Übergang — steigt und fällt weich. */
.frame-inner {
  transition: box-shadow 0.3s ease;
}
.frame-inner.charged {
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.8),
    inset 0 0 calc(20px + var(--charge, 0) * 60px)
      rgba(233, 196, 92, calc(var(--charge, 0) * 0.5));
}

.win-box {
  margin-top: 10px;
  /* flex in beiden Zuständen — als Block wäre die Zeile 1 px höher als der
     reservierte Platz, und genau um dieses Pixel zuckte die Seite. */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  min-height: 32px;
  text-shadow: 0 0 24px rgba(55, 232, 149, 0.4);
  font-variant-numeric: tabular-nums;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 11px;
  background: rgba(8, 4, 16, 0.9);
  backdrop-filter: blur(4px);
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.1em;
  z-index: 5;
  padding: 20px;
  white-space: pre-line; /* Overlay-Texte enthalten Zeilenumbrüche */
  text-shadow: 0 0 36px rgba(233, 196, 92, 0.5);
  animation: fadeIn 0.25s ease;
}

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

/* ---------- Seitenleisten ---------- */

.plaque {
  padding: 12px 8px 10px;
  border-radius: 12px;
  border: 2px solid var(--gold-pale);
  background: linear-gradient(180deg, #2f5fa8 0%, #1d3a6b 55%, #142a4f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.15;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.5),
    inset 0 0 0 2px rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.plaque-top,
.plaque-mid {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plaque-cost {
  margin-top: 5px;
  font-size: 17px;
  font-weight: 800;
  color: var(--gold-pale);
  font-variant-numeric: tabular-nums;
}

.bet-box,
.rtp-badge,
.meter {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 11px;
  padding: 8px 10px;
  backdrop-filter: blur(6px);
}

.bet-box {
  text-align: center;
}

.bet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
}

.bet-row b {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.rtp-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.rtp-badge b {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* Runder Spin-Knopf, wie am echten Automaten. */
.spin {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--gold-pale);
  background: radial-gradient(
    circle at 40% 32%,
    #fff8dd 0%,
    #f0cf6a 40%,
    #b8891f 78%,
    #7d590f 100%
  );
  color: #2a1f06;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(233, 196, 92, 0.3),
    inset 0 -6px 14px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.08s,
    filter 0.12s;
}

.spin-icon {
  width: 52px;
  height: 52px;
}

.spin:hover:not(:disabled) {
  filter: brightness(1.1);
}
.spin:active:not(:disabled) {
  transform: scale(0.95);
}

.spin:disabled .spin-icon {
  animation: rotate 0.9s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Knöpfe allgemein ---------- */

button {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 9px;
  padding: 10px 8px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition:
    filter 0.12s,
    transform 0.06s;
}

button:hover:not(:disabled) {
  filter: brightness(1.35);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sq {
  width: 34px;
  padding: 6px 0;
}

.pill {
  width: 100%;
  font-size: 13px;
  letter-spacing: 0.05em;
}

button.on {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- Untere Leiste ---------- */

.bottombar {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
}

.meter {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.meter b {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Statistik ---------- */

.stats {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: blur(6px);
}

.stats h2 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.stats-grid div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
}

.stats-grid b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.pos {
  color: var(--green);
}
.neg {
  color: var(--red);
}

.note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- Gewinntabelle ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.88);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 30;
  overflow-y: auto;
}

.modal-body {
  position: relative;
  max-width: 540px;
  width: 100%;
  background: #101627;
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 22px;
}

.modal-body h2 {
  margin: 0 0 12px;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  padding: 4px;
  font-size: 20px;
  line-height: 1;
}

#payTable {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-variant-numeric: tabular-nums;
}

#payTable td,
#payTable th {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: right;
  font-size: 13px;
}

#payTable th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

#payTable td:first-child,
#payTable th:first-child {
  text-align: left;
}

#payTable .sym {
  display: flex;
  align-items: center;
  gap: 10px;
}

#payTable .sym .art {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

#payTable .sym-name {
  font-size: 13px;
  color: var(--muted);
}

.scatter-inline {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: -6px;
  margin-right: 2px;
}

.rules {
  font-size: 13px;
  color: #b4bdcc;
  line-height: 1.6;
}
.rules.muted {
  color: var(--muted);
  font-size: 12px;
}
.rules b {
  color: var(--text);
}

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 980px) {
  .pillar,
  .zeus,
  .zeus-glow {
    display: none;
  }

  .table {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rail {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .rail-left {
    order: 3;
  }
  .rail-right {
    order: 2;
  }
  .stage {
    order: 1;
  }

  .plaque {
    flex: 1;
    flex-direction: row;
    gap: 6px;
    padding: 10px;
  }
  .plaque-cost {
    margin: 0;
  }
  .bet-box {
    flex: 1;
  }
  /* Der RTP war auf schmalen Bildschirmen ausgeblendet. Ausgerechnet die Zahl,
     die sagt, was das Spiel auf Dauer zurückgibt, verschwand dort, wo die
     meisten spielen. Sie bleibt — notfalls in einer eigenen Zeile. */
  .rtp-badge {
    flex-basis: 100%;
    order: 4;
  }

  .spin {
    width: 84px;
    height: 84px;
  }
  .spin-icon {
    width: 40px;
    height: 40px;
  }
  .pill {
    width: auto;
    padding: 10px 16px;
  }

  .bottombar {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .cabinet {
    padding: 16px 12px;
  }
  h1 {
    font-size: 24px;
  }
  .rail {
    flex-wrap: wrap;
  }
}

/* ---------- Ohne JavaScript ---------- */

/* Die Seite ist ohne Skript ein leeres Kabinett. Sie soll wenigstens sagen,
   warum — und dass niemand etwas verpasst, weil es ohnehin um nichts geht. */
.noscript {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 32px;
  text-align: center;
  line-height: 1.7;
  background: #07090f;
  color: var(--text);
}
.noscript b {
  color: var(--gold);
}
