/* Slots screen styles. Dark navy panels, gold accents. */

.slots-body {
  display: grid;
  gap: var(--space);
  padding: var(--space);
  background: radial-gradient(120% 90% at 50% 30%, #2a1418 0%, #1d1220 55%, #12101c 100%);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), inset 0 0 60px rgba(0,0,0,0.45);
}

.slots-tagline {
  margin: 0;
  text-align: center;
  color: #ffe6a8;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.slots-stats {
  display: flex;
  gap: var(--space);
  justify-content: center;
  flex-wrap: wrap;
}
.slots-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(201, 162, 74, 0.45);
  border-radius: 10px;
  padding: 8px 16px;
  min-width: 140px;
}
.slots-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c9a24a;
}
.slots-stat-value {
  font-size: clamp(18px, 2.4vmin, 26px);
  font-weight: 800;
  color: #fff6e0;
}

.slots-controls {
  display: flex;
  gap: var(--space);
  justify-content: center;
  flex-wrap: wrap;
}
.slots-bet-btn,
.slots-gift-btn {
  min-height: 48px;
  min-width: 96px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 74, 0.6);
  background: linear-gradient(#2e4d78, #1d2f4a);
  color: #fff6e0;
  cursor: pointer;
}
.slots-bet-btn:disabled,
.slots-gift-btn:disabled { opacity: 0.5; cursor: default; }
.slots-gift-btn {
  background: linear-gradient(#c9a24a, #8a6410);
  color: #1a1a1a;
}

.slots-window {
  position: relative;
  border: 6px solid var(--slots-frame, #c9a24a);
  border-radius: 16px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0) 14%, rgba(0,0,0,0) 86%, rgba(0,0,0,0.26) 100%),
    var(--slots-reel-bg, #fbf6ea);
  /* bezel: lit top edge of the frame, dark lower edge, deep recess inside */
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.22),
    inset 0 10px 18px -6px rgba(0,0,0,0.45),
    inset 0 -10px 18px -6px rgba(0,0,0,0.4),
    0 1px 0 1px rgba(255,255,255,0.18),
    0 -1px 0 1px rgba(0,0,0,0.35),
    0 10px 28px rgba(0,0,0,0.55),
    0 0 0 1px rgba(0,0,0,0.5);
  overflow: hidden;
}
/* Glass over the reel window: curved-drum shading top and bottom plus a
   soft sheen from the upper left. Paint only; no layout. */
.slots-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.06) 11%, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 80%, rgba(0,0,0,0.06) 89%, rgba(0,0,0,0.32) 100%),
    linear-gradient(160deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.10) 22%, rgba(255,255,255,0) 38%);
  box-shadow: inset 0 0 22px rgba(0,0,0,0.28);
  z-index: 1;
}
.slots-reels {
  display: grid;
  gap: 6px;
}
.slots-reels-3 { grid-template-columns: repeat(3, 1fr); }
.slots-reels-5 { grid-template-columns: repeat(5, 1fr); }
.slots-reel {
  display: grid;
  grid-template-rows: repeat(3, minmax(64px, 1fr));
  gap: 4px;
  background: linear-gradient(90deg, rgba(0,0,0,0.16) 0%, rgba(0,0,0,0.05) 18%, rgba(0,0,0,0.02) 50%, rgba(0,0,0,0.05) 82%, rgba(0,0,0,0.16) 100%);
  border-radius: 10px;
  padding: 4px;
  /* reel separators: dark groove with a fine lit edge */
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.16),
    inset 1px 0 0 1px rgba(255,255,255,0.35),
    0 0 0 1px rgba(0,0,0,0.08);
}
.slots-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  border-radius: 8px;
  background:
    radial-gradient(120% 95% at 50% 42%, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.42) 60%, rgba(0,0,0,0.05) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    inset 0 -2px 4px rgba(0,0,0,0.08),
    inset 0 0 0 1px rgba(0,0,0,0.07),
    0 1px 0 rgba(255,255,255,0.4);
  overflow: hidden;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.slots-cell.is-landed {
  background:
    radial-gradient(120% 95% at 50% 40%, #ffffff 0%, rgba(255,255,255,0.86) 55%, rgba(0,0,0,0.06) 100%),
    var(--slots-reel-bg, #fffdf5);
}
.slots-symbol {
  display: block;
  width: 100%;
  height: 100%;
  padding: 6px;
}
.slots-symbol svg { width: 100%; height: 100%; display: block; }
.slots-cell.is-win {
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 250, 220, 0.98) 0%, rgba(255, 228, 150, 0.85) 55%, rgba(255, 196, 80, 0.7) 100%);
  box-shadow:
    inset 0 0 0 3px var(--slots-line, #d8433a),
    inset 0 0 0 5px rgba(255, 236, 170, 0.85),
    inset 0 0 16px rgba(255, 190, 60, 0.55),
    0 0 14px rgba(255, 200, 80, 0.75),
    0 0 4px rgba(255, 240, 200, 0.9);
  transform: scale(1.03);
  animation: slots-win-pulse 1.1s ease-in-out infinite alternate;
}
@keyframes slots-win-pulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.12) saturate(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .slots-cell.is-win { animation: none; }
}
.slots-cell-center { position: relative; }
.slots-payline {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 0;
  border-top: 2px dashed var(--slots-line, #d8433a);
  pointer-events: none;
  opacity: 0.85;
  z-index: 2;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.7));
}

.slots-msg {
  margin: 0;
  min-height: 24px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #ffe6a8;
}

.slots-spin {
  min-height: 64px;
  min-width: 220px;
  padding: 14px 28px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  border-radius: 14px;
  border: 2px solid #ffe6a8;
  background: radial-gradient(circle at 50% 30%, #e0484a, #8a1418);
  color: #fff6e0;
  cursor: pointer;
  justify-self: center;
  box-shadow: 0 6px 26px rgba(224, 72, 74, 0.5);
}
.slots-spin:disabled { opacity: 0.6; cursor: default; }

.slots-bust {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #ffd88a;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(201, 162, 74, 0.55);
  border-radius: 10px;
  padding: 14px 18px;
}

.slots-extras {
  display: flex;
  gap: var(--space);
  justify-content: center;
  flex-wrap: wrap;
}
.slots-extra-btn {
  min-height: 48px;
  min-width: 140px;
}

/* ---- overlays ---- */
.slots-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.slots-panel {
  background: linear-gradient(#1e2b44, #152238);
  border: 2px solid #c9a24a;
  border-radius: 16px;
  padding: 20px;
  max-width: min(720px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  color: #fff6e0;
  box-shadow: 0 18px 50px rgba(0,0,0,0.6);
}
.slots-close { margin-bottom: 12px; }
.slots-panel-body { display: grid; gap: 12px; }
.slots-panel-title {
  margin: 0;
  font-size: clamp(22px, 3vmin, 30px);
  color: #ffe6a8;
  font-weight: 900;
}
.slots-panel-line {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}
.slots-panel-note {
  margin: 0;
  font-size: 14px;
  color: #ffd88a;
  border-top: 1px solid rgba(201, 162, 74, 0.4);
  padding-top: 10px;
}
.slots-panel-total {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffe6a8;
}

.slots-paytable {
  display: grid;
  gap: 6px;
  width: 100%;
}
.slots-pay-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
}
.slots-pay-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.slots-pay-sym {
  display: inline-block;
  width: 32px;
  height: 32px;
}
.slots-pay-sym svg { width: 100%; height: 100%; }
.slots-pay-amount {
  font-variant-numeric: tabular-nums;
  color: #ffe6a8;
  font-weight: 700;
}

.slots-continue {
  min-height: 56px;
  min-width: 200px;
  justify-self: center;
}

.slots-freespin-list {
  display: grid;
  gap: 4px;
  max-height: 40vh;
  overflow-y: auto;
}
.slots-freespin-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,0.35);
}
.slots-freespin-retrig { color: #ffd88a; font-weight: 800; }

.slots-hold-grid {
  display: grid;
  gap: 4px;
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  padding: 8px;
}
.slots-hold-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #c9a24a;
  font-weight: 800;
  font-size: 14px;
}
.slots-hold-cell.is-filled {
  background: radial-gradient(circle at 50% 30%, #ffe08a, #c9a24a);
  color: #1a1a1a;
  box-shadow: 0 0 10px rgba(255, 200, 80, 0.7);
}

.slots-wheel-wrap {
  width: min(340px, 80vw);
  aspect-ratio: 1 / 1;
  justify-self: center;
  position: relative;
}
.slots-wheel-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 1.4s cubic-bezier(0.22, 0.9, 0.2, 1);
}

.slots-region-block,
.slots-loading {
  margin: 24px auto;
  max-width: 480px;
  padding: 20px;
  text-align: center;
  font-size: 18px;
  border: 1px solid rgba(201, 162, 74, 0.5);
  border-radius: 12px;
  background: rgba(0,0,0,0.4);
  color: #ffe6a8;
}

@media (max-width: 640px) {
  .slots-reel { grid-template-rows: repeat(3, minmax(52px, 1fr)); }
  .slots-cell { min-height: 52px; }
  .slots-spin { min-width: 180px; font-size: 20px; }
}/* SLOTSCEL-001 celebration rules (appended to css/slots.css) */

/* The celebration layer: paints over the machine, never intercepts input.
   The JS positions coins relative to this element, so it must be the
   containing block for its children. */
.slots-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}

/* Wrapper the JS builds inside .slots-fx; also the positioning context
   for coins and the banner. It sits above the reels, below the banner. */
.slots-celebration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Flying coin disc. The JS supplies the SVG face via inner HTML; the disc
   look (gold rim, star face) comes from that SVG. Here we only size the
   host and give it a soft shadow + transform hint. The JS animates via
   inline transform, so no transition here. */
.slots-chip-fly {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
.slots-chip-fly svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}
.slots-chip-fly::before {
  /* faint lighter center to read as a struck coin face under the SVG */
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(255, 240, 200, 0.9) 0%, rgba(255, 240, 200, 0) 70%);
  pointer-events: none;
}

/* Win banner ribbon across the reel window. z-index above coins. */
.slots-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 12px;
  border: 2px solid #ffe6a8;
  background: radial-gradient(120% 160% at 50% 20%, #e0484a 0%, #a01a20 55%, #6a0e12 100%);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.35),
    0 12px 34px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(255, 210, 90, 0.55);
  animation: slots-banner-pop 260ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  pointer-events: none;
}
.slots-banner-text {
  color: #ffe6a8;
  font-size: clamp(28px, 5vmin, 40px);
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow:
    0 1px 0 #6a0e12,
    0 2px 6px rgba(0, 0, 0, 0.6),
    0 0 14px rgba(255, 210, 90, 0.6);
  white-space: nowrap;
}

/* Big-win variant is the default red ribbon; mega goes larger + radiant. */
.slots-banner.slots-banner-mega {
  padding: 16px 40px;
  border-width: 3px;
  background: radial-gradient(120% 160% at 50% 18%, #ffd24a 0%, #e0484a 42%, #8a1418 100%);
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.35),
    0 16px 44px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(255, 214, 90, 0.85),
    0 0 80px rgba(255, 190, 60, 0.45);
}
.slots-banner.slots-banner-mega .slots-banner-text {
  font-size: clamp(34px, 6.5vmin, 44px);
  letter-spacing: 4px;
  color: #fff6e0;
  text-shadow:
    0 1px 0 #6a0e12,
    0 2px 8px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(255, 220, 110, 0.9);
}

@keyframes slots-banner-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Sequential pulse the JS toggles on winning cells (one pulse ≈450ms). */
.slots-cell.slots-cell-seq-pulse {
  animation: slots-cell-seq-pulse 450ms ease-out;
}
@keyframes slots-cell-seq-pulse {
  0% {
    box-shadow:
      inset 0 0 0 3px var(--slots-line, #d8433a),
      inset 0 0 0 5px rgba(255, 236, 170, 0.85),
      inset 0 0 16px rgba(255, 190, 60, 0.55),
      0 0 14px rgba(255, 200, 80, 0.75),
      0 0 4px rgba(255, 240, 200, 0.9);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      inset 0 0 0 3px #ffe6a8,
      inset 0 0 0 6px rgba(255, 236, 170, 1),
      inset 0 0 24px rgba(255, 200, 80, 0.9),
      0 0 26px rgba(255, 214, 90, 1),
      0 0 10px rgba(255, 240, 200, 1);
    filter: brightness(1.25) saturate(1.15);
  }
  100% {
    filter: brightness(1);
  }
}

/* Warm gold cabinet glow while the mega celebration runs. The JS applies
   this class to the slots body element. */
.slots-body.slots-mega-glow {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 60px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(255, 210, 90, 0.55),
    0 0 30px rgba(255, 200, 80, 0.65),
    0 0 70px rgba(255, 180, 50, 0.35);
  animation: slots-mega-glow-breathe 1.6s ease-in-out infinite alternate;
}
@keyframes slots-mega-glow-breathe {
  from { box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      inset 0 0 60px rgba(0, 0, 0, 0.45),
      0 0 0 2px rgba(255, 210, 90, 0.45),
      0 0 24px rgba(255, 200, 80, 0.55),
      0 0 60px rgba(255, 180, 50, 0.28); }
  to { box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      inset 0 0 60px rgba(0, 0, 0, 0.45),
      0 0 0 3px rgba(255, 220, 110, 0.7),
      0 0 36px rgba(255, 200, 80, 0.8),
      0 0 90px rgba(255, 180, 50, 0.45); }
}

/* Reduced motion: banner static (no pop-in), no pulse animation. The JS
   also adds the is-reduced class to the banner, but the media query is the
   authority for CSS anims. */
@media (prefers-reduced-motion: reduce) {
  .slots-banner,
  .slots-banner.slots-banner-mega {
    animation: none;
  }
  .slots-cell.slots-cell-seq-pulse {
    animation: none;
    box-shadow:
      inset 0 0 0 3px #ffe6a8,
      inset 0 0 0 5px rgba(255, 236, 170, 0.9),
      inset 0 0 18px rgba(255, 200, 80, 0.7),
      0 0 16px rgba(255, 214, 90, 0.85);
    filter: brightness(1.1);
  }
  .slots-body.slots-mega-glow {
    animation: none;
  }
}
/* Also honor the JS's explicit is-reduced class even without the media
   query (the JS may force reduce via GS settings). */
.slots-banner.is-reduced {
  animation: none;
}
