/* ══ TOKENS ══════════════════════════════════════════ */
:root {
  --gold:         #ffd700;
  --gold-light:   #fff0a0;
  --gold-dark:    #b8860b;
  --purple-deep:  #1a0a2e;
  --purple-mid:   #2d1b4e;
  --purple-bright:#7b2dff;
  --purple-glow:  #9b4dff;
  --win-green:    #00ff88;
  --white:        #fff;
}

/* ══ RESET ═══════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ══ BODY ════════════════════════════════════════════ */
body {
  min-height: 100vh;
  background-color: #0d0520;
  background-image: url("./assets/olympus2.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  font-family: "Cinzel", serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* overflow-x: hidden;
  overflow-y: auto; */
  overflow: hidden;
  position: relative;
}

/* ══ STARS ═══════════════════════════════════════════ */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ══ LIGHTNING ═══════════════════════════════════════ */
.lightning {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bolt {
  position: absolute;
  top: 0;
  width: 2px;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(180,100,255,0.8), transparent);
  animation: boltFlash var(--d, 5s) var(--dl, 0s) infinite;
}
@keyframes boltFlash {
  0%, 93%, 100% { opacity: 0; height: 0;     }
  95%            { opacity: 1; height: 55vh;  }
  97%            { opacity: .4; height: 75vh; }
  99%            { opacity: 0; height: 90vh;  }
}

/* ══ PAGE WRAP — outer column that holds logo + game ═ */
/* .page-wrap {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* fluid vertical gap between logo and game-wrap */
  /* gap: clamp(4px, 1.5vh, 12px);
  width: 100%; */
  /* never wider than 520px, never touching screen edges */
  /* max-width: min(520px, 96vw);
  padding: clamp(8px, 2vh, 20px) clamp(8px, 2vw, 16px);
} 
*/

.page-wrap {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center content vertically */
  height: 100%; /* Fill the body */
  width: 100%;
  max-width: min(520px, 96vw);
  padding: 10px;
  gap: 1vh; /* Use vh for dynamic spacing */
}

/* ══ LOGO ════════════════════════════════════════════ */
.game-logo {
  /* scales from 150px on tiny phones up to 300px on desktop */
  width: clamp(150px, 52vw, 300px);
  height: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 1;
  filter: drop-shadow(0 0 16px rgba(255,215,0,0.4));
  animation: logoFloat 4s ease-in-out infinite alternate;
}
@keyframes logoFloat {
  from { transform: translateY(0);    }
  to   { transform: translateY(-5px); }
}

/* ══ GAME WRAP — inner column for hud + reel + button  */
.game-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-items: center;
  gap: clamp(6px, 1.5vw, 12px);
}

/* ══ HUD ═════════════════════════════════════════════ */
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: clamp(4px, 1.5vw, 8px);
}
.hud-box {
  flex: 1;
  background: rgba(0,0,0,0.9);
  border: 1px solid var(--gold-dark);
  border-radius: 10px;
  padding: clamp(5px, 1.2vw, 10px) clamp(4px, 1vw, 10px);
  text-align: center;
}
.hud-label {
  font-size: clamp(0.38rem, 1.2vw, 0.52rem);
  letter-spacing: 2px;
  color: var(--gold-dark);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.hud-value {
  font-size: clamp(0.75rem, 2.5vw, 1.1rem);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold-dark);
  font-family: "Cinzel Decorative", serif;
}
.hud-value.green  { color: var(--win-green);   text-shadow: 0 0 8px #00cc66;           }
.hud-value.purple { color: var(--purple-glow);  text-shadow: 0 0 8px var(--purple-glow); }

/* ══ SLOT FRAME ══════════════════════════════════════ */
.slot-frame {
  width: 100%;
  background: linear-gradient(180deg, #2a0d5a 0%, #150830 100%);
  border: clamp(2px, 0.5vw, 3px) solid var(--gold-dark);
  border-radius: clamp(12px, 3vw, 20px);
  padding: clamp(6px, 1.8vw, 16px);
  box-shadow:
    0 0 40px rgba(123,45,255,0.4),
    0 0 80px rgba(123,45,255,0.15),
    inset 0 1px 0 rgba(255,215,0,0.3),
    inset 0 -1px 0 rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.slot-frame::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ══ GRID ════════════════════════════════════════════ */
.reels-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(3px, 0.9vw, 6px);
  background: rgba(0,0,0,0.4);
  border: 2px solid rgba(255,215,0,0.2);
  border-radius: clamp(8px, 2vw, 12px);
  padding: clamp(4px, 1.2vw, 10px);
  position: relative;
  overflow: hidden;
}
.reels-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.3) 0%, transparent 20%,
    transparent 80%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
  z-index: 5;
}

.reel-col {
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.9vw, 6px);
}

.symbol-cell {
  aspect-ratio: 1;
  border-radius: clamp(5px, 1.5vw, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(0,0,0,0.3));
  border: 1px solid rgba(255,215,0,0.15);
  position: relative;
  transition: transform 0.1s;
  overflow: hidden;
}

/* Symbol images fill ~72% of cell on all sizes */
.symbol-cell img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* ── Spin animation ── */
.symbol-cell.spinning {
  animation: spinBlur 0.1s linear infinite;
}
@keyframes spinBlur {
  0%   { transform: translateY(-4px); opacity: 0.7; }
  50%  { transform: translateY(4px);  opacity: 1;   }
  100% { transform: translateY(-4px); opacity: 0.7; }
}

/* ── Win glow ── */
.symbol-cell.winning {
  animation: winPulse 0.6s ease infinite alternate;
  border-color: var(--gold);
  box-shadow: 0 0 15px var(--gold), inset 0 0 10px rgba(255,215,0,0.2);
  z-index: 2;
}
@keyframes winPulse {
  from {
    transform: scale(1);
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,215,0,0.05));
  }
  to {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(255,215,0,0.3), rgba(255,215,0,0.1));
  }
}

/* ── FREE SPIN badge on cell ── */
.fs-badge {
  position: absolute;
  bottom: 2px;
  left: 0; right: 0;
  font-size: clamp(0.26rem, 0.9vw, 0.38rem);
  letter-spacing: 0.5px;
  color: rgba(255,215,0,0.9);
  text-align: center;
  font-family: "Cinzel Decorative", serif;
  pointer-events: none;
  line-height: 1;
}

/* ── Multiplier chip ── */
.mult-chip {
  position: absolute;
  top: 3px; right: 2px;
  background: linear-gradient(135deg, var(--purple-bright), var(--purple-glow));
  color: #fff;
  font-size: clamp(0.32rem, 1vw, 0.5rem);
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 4px;
  border-radius: 5px;
  box-shadow: 0 0 10px var(--purple-glow);
  font-family: "Cinzel Decorative", serif;
  z-index: 6;
  pointer-events: none;
  animation: chipPop 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes chipPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ══ SPIN BUTTON ═════════════════════════════════════ */
.spin-btn {
  width: 100%;
  padding: clamp(8px, 2vw, 12px) clamp(10px, 2vw, 16px);
  font-family: "Cinzel Decorative", serif;
  font-size: clamp(0.75rem, 2.8vw, 1.3rem);
  font-weight: 400;
  letter-spacing: clamp(1px, 0.5vw, 3px);
  color: var(--purple-deep);
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, #c8960a 100%);
  border: none;
  border-radius: clamp(10px, 2.5vw, 14px);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow:
    0 4px 20px rgba(255,215,0,0.4),
    0 2px 0 var(--gold-dark),
    inset 0 1px 0 rgba(255,255,255,0.5);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  white-space: nowrap;
}
.spin-btn::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: sheen 2.5s 1s infinite;
}
@keyframes sheen {
  0%       { left: -100%; }
  55%, 100% { left: 150%; }
}
.spin-btn:hover  { transform: translateY(-1px); box-shadow: 0 6px 30px rgba(255,215,0,0.6), 0 2px 0 var(--gold-dark), inset 0 1px 0 rgba(255,255,255,0.5); }
.spin-btn:active { transform: translateY(1px); }
.spin-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ══ PARTICLES ═══════════════════════════════════════ */
.particle {
  position: fixed;
  pointer-events: none;
  z-index: 100;
  animation: particleFall var(--dur, 2s) ease-in forwards;
}
.particle img {
  width: clamp(1rem, 3vw, 1.5rem);
  height: clamp(1rem, 3vw, 1.5rem);
  object-fit: contain;
  display: block;
}
@keyframes particleFall {
  0%   { transform: translateY(0) rotate(0deg);    opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  width: 8px; height: 8px;
  border-radius: 2px;
  animation: cFly var(--dur, 0.8s) ease-out forwards;
}
@keyframes cFly {
  0%   { transform: translate(0,0) rotate(0);                        opacity: 1; }
  100% { transform: translate(var(--tx),var(--ty)) rotate(var(--rot)); opacity: 0; }
}

/* ══ WIN POPUP ═══════════════════════════════════════ */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.78);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.popup-overlay.show { opacity: 1; pointer-events: all; }

.popup {
  width: min(430px, 92vw);
  background: linear-gradient(160deg, #1e0550, #0d0228);
  border: 2px solid var(--gold);
  border-radius: 24px;
  padding: clamp(18px, 4vw, 30px) clamp(14px, 4vw, 24px) clamp(16px, 4vw, 26px);
  text-align: center;
  box-shadow:
    0 0 80px rgba(255,215,0,0.2),
    0 0 160px rgba(123,45,255,0.2),
    inset 0 1px 0 rgba(255,215,0,0.2);
  transform: scale(0.7) translateY(40px);
  transition: transform 0.45s cubic-bezier(0.175,0.885,0.32,1.275);
  position: relative;
  overflow: hidden;
}
.popup-overlay.show .popup { transform: scale(1) translateY(0); }
.popup::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 40px,
    rgba(255,215,0,0.018) 40px, rgba(255,215,0,0.018) 80px);
}

.popup-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  animation: iconFloat 2s ease-in-out infinite alternate;
}
.popup-icon img { max-width: clamp(100px, 55%, 200px); height: auto; }
@keyframes iconFloat {
  from { transform: translateY(0);    }
  to   { transform: translateY(-8px); }
}

/* popup-eyebrow becomes the "Du hast gewonnen" line */
.popup-eyebrow {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: #ffffff;
  text-shadow: none;
  text-transform: none;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.popup-headline {
  font-family: "Cinzel Decorative", serif;
  font-weight: 900;
  font-size: clamp(0.9rem, 3.5vw, 1.4rem);
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold), 0 0 28px var(--gold-dark);
  line-height: 1.35;
  margin-bottom: 8px;
}
.popup-number {
  font-family: "Cinzel Decorative", serif;
  font-weight: 900;
  font-size: clamp(3rem, 10vw, 5.5rem);
  color: var(--win-green);
  text-shadow: 0 0 20px var(--win-green), 0 0 50px #00cc66;
  line-height: 1;
  animation: numPulse 1.2s ease-in-out infinite alternate;
}
@keyframes numPulse {
  from { text-shadow: 0 0 20px var(--win-green), 0 0 50px #00cc66; }
  to   { text-shadow: 0 0 30px var(--win-green), 0 0 80px #00cc66, 0 0 120px rgba(0,255,136,0.3); }
}
.popup-number-label {
  font-size: 0.68rem;
  letter-spacing: 4px;
  color: rgba(0,255,136,0.55);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.popup-bonus {
  background: linear-gradient(135deg, rgba(123,45,255,0.18), rgba(155,77,255,0.1));
  border: 1px solid rgba(155,77,255,0.3);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 20px;
  font-size: clamp(0.68rem, 2.5vw, 0.88rem);
  color: rgba(255,255,255,0.7);
  letter-spacing: 1px;
}
.popup-bonus strong { color: var(--gold); }

/* Button: button.png as background, wide and responsive */
.collect-btn {
  display: block;
  width: clamp(200px, 80%, 380px);
  margin: 0 auto 4px;
  position: relative;

  background-image: url('./assets/button.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-color: transparent;

  padding: 7% 20px;

  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
  overflow: visible;

  font-family: "Cinzel Decorative", serif;
  font-size: clamp(0.85rem, 3.5vw, 1.2rem);
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--gold);
  text-shadow:
    0 0 10px var(--gold),
    0 0 24px var(--gold-dark),
    0 1px 0 rgba(0,0,0,0.6);
  text-align: center;

  transition: transform 0.15s, filter 0.15s;
  animation: none;
}
.collect-btn::after { display: none; }
.collect-btn:hover  { transform: translateY(-2px) scale(1.02); filter: brightness(1.1); }
.collect-btn:active { transform: translateY(2px) scale(0.98); }

.popup-disclaimer {
  font-size: 0.46rem;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.2);
  margin-top: 12px;
  text-transform: uppercase;
}


/* DELETE THIS ENTIRE BLOCK */
.popup-number {
  font-family: "Cinzel Decorative", serif;
  font-weight: 900;
  font-size: clamp(3rem, 10vw, 5.5rem);
  color: var(--win-green);
  text-shadow: 0 0 20px var(--win-green), 0 0 50px #00cc66;
  line-height: 1;
  animation: numPulse 1.2s ease-in-out infinite alternate;
}
@keyframes numPulse {
  from { text-shadow: 0 0 20px var(--win-green), 0 0 50px #00cc66; }
  to   { text-shadow: 0 0 30px var(--win-green), 0 0 80px #00cc66, 0 0 120px rgba(0,255,136,0.3); }
}
/* Button: button.png as background, JETZT EINLÖSEN centered on top */
.collect-btn {
  display: block;
  width: 100%;
  max-width: 620px;
  margin: 0 auto 4px;
  position: relative;

  /* button.png fills the element */
  background-image: url('./assets/button.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-color: transparent;

  /* height is driven by the image's natural ratio — adjust if yours differs */
  padding: 18% 20px;

  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
  overflow: visible;

  /* golden CLAIM text */
  font-family: "Cinzel Decorative", serif;
  font-size: clamp(0.9rem, 3.2vw, 1.25rem);
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--gold);
  text-shadow:
    0 0 10px var(--gold),
    0 0 24px var(--gold-dark),
    0 1px 0 rgba(0,0,0,0.6);
  text-align: center;

  transition: transform 0.15s, filter 0.15s;
  animation: none; /* remove the old purple pulse */
}
.collect-btn::after { display: none; } /* remove old sheen */
.collect-btn:hover  { transform: translateY(-2px) scale(1.02); filter: brightness(1.1); }
.collect-btn:active { transform: translateY(2px) scale(0.98); }

/* ══ RESPONSIVE BREAKPOINTS ══════════════════════════ */

/* Very small phones (≤ 380px) */
@media (max-width: 380px) {
  .game-logo {
    width: clamp(120px, 60vw, 180px);
  }
  .hud-label {
    font-size: 0.36rem;
    letter-spacing: 1px;
  }
  .hud-value {
    font-size: clamp(0.65rem, 4vw, 0.85rem);
  }
  .spin-btn {
    font-size: clamp(0.62rem, 3.5vw, 0.85rem);
    letter-spacing: 1px;
  }
  .fs-badge  { font-size: 0.24rem; }
  .mult-chip { font-size: 0.28rem; padding: 1px 3px; }
}

/* Short screens (landscape phone) — shrink vertical gaps */
@media (max-height: 620px) {
  .page-wrap { gap: 4px; padding-top: 6px; padding-bottom: 6px; }
  .game-wrap { gap: 5px; }
  .game-logo { width: clamp(100px, 28vw, 180px); }
}

/* Tablets and up */
@media (min-width: 540px) {
  .game-logo { width: clamp(220px, 42vw, 300px); }
}