/* ============================================================
   style.css  —  Aussehen der Slot-Machine
   ============================================================ */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0; min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px; text-align: center; user-select: none;
  background: linear-gradient(160deg, #00b4d8, #0077b6);
}
body.theme-neon   { background: linear-gradient(160deg, #f706cf, #7b2ff7, #00f5d4); }
body.theme-sunset { background: linear-gradient(160deg, #ff8c42, #ff5d8f, #6a0572); }
body.theme-ocean  { background: linear-gradient(160deg, #00b4d8, #0077b6, #023e8a); }
body.theme-party  { background: linear-gradient(160deg, #f9d423, #ff4e50, #6a0572); }

h1 { margin: 0 0 4px; font-size: 1.7rem; text-shadow: 0 2px 8px rgba(0,0,0,0.35); }
.subtitle { margin: 0 0 22px; opacity: 0.95; font-size: 0.95rem; }

/* Der Maschinen-Rahmen */
.machine {
  position: relative;
  background: linear-gradient(180deg, #ffd23f, #ff8c42);
  padding: 16px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 0 0 4px rgba(255,255,255,0.5);
}
/* rotierendes Lauflicht hinter der Maschine */
.machine::before {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 28px; z-index: -1;
  background: conic-gradient(from 0deg, #ff5d8f, #ffd23f, #06d6a0, #00b4d8, #7b2ff7, #ff5d8f);
  filter: blur(3px);
  animation: spinlights 3s linear infinite;
}
@keyframes spinlights { to { transform: rotate(360deg); } }

/* Reihe der Walzen */
.reels {
  display: flex; gap: 10px;
  background: #2b2030;
  padding: 14px;
  border-radius: 14px;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
  position: relative;
}
/* (Keine feste Mittel-Linie mehr – bei einem Raster werden die Treffer-Zellen markiert.) */
.reels.win-line { box-shadow: inset 0 0 12px rgba(0,0,0,0.6), 0 0 18px 3px rgba(255,210,63,0.55); }

/* Eine Walze (Spalte) = Fenster, in dem mehrere Symbole vertikal scrollen.
   --cell (Zellengröße in px) und --rows (Anzahl Reihen) werden per JS gesetzt. */
.reel {
  width: var(--cell, 80px);
  height: calc(var(--cell, 96px) * var(--rows, 1));
  background: #fff; color: #222;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
}
.reel .strip { display: flex; flex-direction: column; will-change: transform; }
.reel .cell {
  height: var(--cell, 96px);
  width: var(--cell, 80px);
  display: flex; align-items: center; justify-content: center;
  font-size: calc(var(--cell, 96px) * 0.56); line-height: 1;
}
/* Treffer-Zelle (Teil einer Gewinnlinie) */
.reel .cell.win-cell {
  background: #ffe98a;
  box-shadow: inset 0 0 0 3px #06d6a0;
  animation: cellpulse 0.55s ease-in-out infinite alternate;
}
@keyframes cellpulse {
  from { box-shadow: inset 0 0 0 3px #06d6a0, 0 0 6px 1px #ffd23f; }
  to   { box-shadow: inset 0 0 0 3px #ffd23f, 0 0 16px 4px #06d6a0; }
}
.reel.stopped { animation: bounce 0.25s ease; }
@keyframes bounce { 0%{transform:scale(1.12)} 100%{transform:scale(1)} }

/* Spannungs-Glühen der letzten Walze ("fast Jackpot") */
.reel.anticipate { animation: anticip 0.4s ease-in-out infinite alternate; }
@keyframes anticip {
  from { box-shadow: 0 0 0 3px #fff, 0 0 10px 2px #ffd23f; }
  to   { box-shadow: 0 0 0 3px #fff, 0 0 22px 7px #ff5d8f; }
}

/* Gewinner-Walze leuchtet */
.reel.win { animation: winpulse 0.5s ease-in-out infinite alternate; }
@keyframes winpulse {
  from { box-shadow: inset 0 0 0 3px #ffd23f, 0 0 12px 2px #ffd23f; }
  to   { box-shadow: inset 0 0 0 3px #06d6a0, 0 0 24px 8px #06d6a0; }
}

/* Hebel-Knopf */
.lever {
  margin-top: 18px;
  border: none; border-radius: 999px;
  padding: 16px 40px;
  font-size: 1.3rem; font-weight: 900;
  color: #6a0572; background: #fff;
  cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  transition: transform 0.08s ease;
}
.lever:active { transform: scale(0.95); }
.lever:disabled { opacity: 0.6; cursor: not-allowed; }

.message {
  margin-top: 18px; min-height: 1.6em;
  font-size: 1.25rem; font-weight: 800;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Großes Jackpot-Overlay */
.overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; z-index: 50;
}
.overlay-text {
  font-size: 2.1rem; font-weight: 900; color: #fff;
  text-shadow: 0 0 18px #ffd23f, 0 4px 10px rgba(0,0,0,0.5);
  padding: 0 24px; text-align: center; animation: pop 0.5s ease;
}
@keyframes pop { 0%{transform:scale(0.3);opacity:0} 60%{transform:scale(1.15);opacity:1} 100%{transform:scale(1)} }

/* Vollbild für Bild/Video bei bestimmten Ergebnissen */
.media-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 60; padding: 20px;
}
.media-content { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 85vh; }
.media-content img, .media-content video { max-width: 100%; max-height: 85vh; border-radius: 12px; }
.media-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.2); color: #fff;
  font-size: 1.2rem; cursor: pointer;
}

/* Credits-Anzeige */
.credits {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  font-weight: 800; font-size: 1rem;
}

/* Bildschirm-Shake beim Jackpot */
body.shake { animation: shakeScreen 0.55s ease; }
@keyframes shakeScreen {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-7px, 4px); }
  40% { transform: translate(7px, -4px); }
  60% { transform: translate(-5px, -3px); }
  80% { transform: translate(5px, 3px); }
}

/* Raster-Info */
.gridinfo { font-size: 0.8rem; opacity: 0.85; margin: -8px 0 14px; }

/* Logo ist heimlicher Admin-Zugang (Klick aufs Logo) */
.logo { cursor: pointer; }

/* Spielsucht-Hinweis ganz unten */
.disclaimer {
  margin: 22px auto 0; max-width: 360px;
  font-size: 0.72rem; opacity: 0.7; line-height: 1.45;
}

/* Hall-of-Fame Button + Overlay */
.hof-btn {
  margin-top: 14px; border: none; border-radius: 999px;
  padding: 10px 20px; font-size: 1rem; font-weight: 800; cursor: pointer;
  background: linear-gradient(90deg, #ffe98a, #ffd23f); color: #6a0572;
  box-shadow: 0 4px 12px rgba(0,0,0,0.28);
}
.hof-btn:active { transform: scale(0.96); }
.hof-overlay {
  position: fixed; inset: 0; z-index: 80; padding: 20px;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
}
.hof-card {
  width: 100%; max-width: 380px; text-align: center;
  background: linear-gradient(160deg, #1d1d2b, #2a0845);
  border: 2px solid #ffd23f; border-radius: 18px; padding: 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.hof-h { margin: 0 0 12px; font-size: 1.4rem; }
.hof-best { font-size: 1.1rem; font-weight: 800; margin-bottom: 14px; }
.hof-input {
  width: 100%; padding: 12px 14px; font-size: 1rem; text-align: center;
  border: none; border-radius: 12px; margin-bottom: 12px;
}
.hof-msg { min-height: 1.3em; margin: 10px 0 4px; font-weight: 700; }
.hof-link { display: inline-block; margin: 8px 0; color: #ffd23f; text-decoration: none; font-weight: 700; }
.hof-close {
  display: block; width: 100%; margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.1);
  color: #fff; border-radius: 10px; padding: 10px; font-weight: 700; cursor: pointer;
}

.hidden { display: none !important; }
