/* Universal Slot Core Styles: Animated Symbols, Dramatic Near-Miss, Smoked-Glass Cabinet Overlays,
   Staggered Non-Blocking Big Win Roll-Up, Auto-Spin Console, Device Jukebox, Auto-Marquee Ticker */

/* 1. Living Symbol Animations (Zero Static Frozen Tiles!) */
@keyframes symFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2.5px) scale(1.03); }
}
@keyframes symGlowPulse {
  0%, 100% { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .82)) brightness(1); }
  50% { filter: drop-shadow(0 0 14px rgba(255, 224, 120, .85)) brightness(1.15); }
}
@keyframes scatterAura {
  0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 8px rgba(192, 132, 252, .65)); }
  50% { transform: scale(1.055) rotate(1.2deg); filter: drop-shadow(0 0 18px rgba(236, 72, 153, .95)) brightness(1.16); }
}
@keyframes colBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

.cell.sym-wild img {
  animation: symFloat 2.8s ease-in-out infinite, symGlowPulse 2.2s ease-in-out infinite;
}
.cell.sym-scatter img {
  animation: scatterAura 2.4s ease-in-out infinite;
}
.cell.sym-high img {
  animation: symFloat 3.6s ease-in-out infinite;
}
.exp-col img {
  animation: colBreath 3.2s ease-in-out infinite;
}

/* 2. Dramatic Near-Miss Anticipation (Magenta/Violet/Gold Reel Spotlight!) */
@keyframes epicTeaseFrame {
  0%, 100% {
    box-shadow: inset 0 0 0 3px #e879f9, inset 0 0 32px rgba(217, 70, 239, .75), 0 0 28px rgba(217, 70, 239, .8);
    background: radial-gradient(ellipse at 50% 50%, rgba(217, 70, 239, .36), transparent 76%);
  }
  50% {
    box-shadow: inset 0 0 0 5px #ffe88a, inset 0 0 46px rgba(230, 28, 58, .9), 0 0 42px rgba(255, 224, 120, .92);
    background: radial-gradient(ellipse at 50% 50%, rgba(230, 28, 58, .44), transparent 76%);
  }
}
.reel.tease-epic {
  z-index: 5;
  animation: epicTeaseFrame 260ms ease-in-out infinite !important;
}
.reels.anticipation-on .reel:not(.tease-epic) {
  filter: brightness(.65) saturate(.8);
  transition: filter .25s;
}

/* 3. Selectable Payline Inactive Dim State */
.line-tag.inactive, .line-tags span.inactive {
  opacity: .16 !important;
  filter: grayscale(1);
}

/* 4. Zero-Truncation Auto-Marquee Ticker */
.msg { overflow: hidden; white-space: nowrap; }
.sc-ticker-inner { display: inline-block; white-space: nowrap; }
.msg.sc-marquee .sc-ticker-inner {
  animation: scTickerScroll 5.5s ease-in-out infinite alternate;
}
@keyframes scTickerScroll {
  0%, 18% { transform: translateX(0); }
  82%, 100% { transform: translateX(var(--mq-dist, -40px)); }
}

/* 5. Staggered Non-Blocking Big Win Choreography (Top Multiplier Badge + Bottom Glass Roll-Up Dock) */
.sc-mult-badge {
  position: absolute; top: 8px; left: 50%; transform: translate(-50%, -12px) scale(.85);
  z-index: 9; pointer-events: none; opacity: 0;
  padding: 4px 16px; border-radius: 999px;
  background: rgba(8, 5, 16, .92);
  border: 1.5px solid var(--sc-acc, #ffd447);
  box-shadow: 0 0 18px var(--sc-acc, #ffd447), 0 6px 16px rgba(0, 0, 0, .85);
  color: #fff8dc; font-weight: 700; font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  white-space: nowrap; transition: opacity .26s, transform .3s cubic-bezier(.2, .9, .3, 1.25);
}
.sc-mult-badge.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.sc-win-dock {
  position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 16px) scale(.92);
  z-index: 9; opacity: 0; pointer-events: none; cursor: pointer;
  display: flex; align-items: baseline; justify-content: center; gap: 12px;
  padding: 8px 22px; border-radius: 12px; max-width: 94%;
  background: linear-gradient(180deg, rgba(16, 10, 26, .88), rgba(6, 4, 12, .94));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 2px solid var(--sc-acc, #ffd447);
  box-shadow: 0 0 28px color-mix(in srgb, var(--sc-acc, #ffd447) 58%, transparent), 0 10px 26px rgba(0, 0, 0, .9);
  transition: opacity .3s, transform .35s cubic-bezier(.18, .9, .28, 1.2);
}
.sc-win-dock.show { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.sc-wd-tier {
  font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--sc-acc, #ffd447); white-space: nowrap;
}
.sc-wd-amt {
  font-size: clamp(22px, 3vw, 32px); font-weight: 900; color: #fff8e0;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  text-shadow: 0 0 16px var(--sc-acc, #ffd447);
}

/* 6. Native In-Cabinet Smoked-Glass Overlay (NO Flat Black Popups!) */
.cabinet, .st-cabinet, .gb-cabinet { position: relative; }
.sc-glass-wrap {
  position: fixed; inset: 0; z-index: 48;
  display: flex; align-items: center; justify-content: center; padding: 14px;
  background: rgba(5, 4, 10, .58);
  backdrop-filter: blur(9px) saturate(1.15); -webkit-backdrop-filter: blur(9px) saturate(1.15);
  opacity: 0; transition: opacity .26s ease;
}
.sc-glass-wrap.in-cab {
  position: absolute; inset: 0; border-radius: inherit; z-index: 30; padding: 12px;
}
.sc-glass-wrap.in { opacity: 1; }
.sc-glass-card {
  position: relative; width: min(620px, 100%); max-height: 100%; overflow: auto;
  padding: clamp(14px, 2.4vw, 24px); border-radius: 16px; text-align: center;
  background:
    radial-gradient(500px 220px at 50% 0, color-mix(in srgb, var(--sc-acc, #e61c3a) 26%, transparent), transparent 72%),
    linear-gradient(180deg, rgba(20, 15, 32, .88), rgba(8, 6, 15, .92));
  border: 1.5px solid color-mix(in srgb, var(--sc-acc, #d4d0de) 68%, #ffffff);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .24),
    inset 0 0 28px rgba(0, 0, 0, .55),
    0 0 38px color-mix(in srgb, var(--sc-acc, #e61c3a) 35%, transparent),
    0 24px 60px rgba(0, 0, 0, .82);
  transform: scale(.94) translateY(8px);
  transition: transform .32s cubic-bezier(.18, .9, .28, 1.18);
}
.sc-glass-wrap.in .sc-glass-card { transform: none; }
.sc-glass-card .kicker { margin: 0 0 4px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--sc-acc, #ff5272); }
.sc-glass-card h2 { margin: 0 0 6px; font-size: clamp(20px, 3.2vw, 30px); color: #fff; }
.sc-glass-card p { margin: 4px 0 12px; color: #b9b2cc; font-size: 13.5px; }
.sc-glass-card .big-win {
  font-weight: 900; font-size: clamp(32px, 5.5vw, 52px); color: #ffe8a8;
  text-shadow: 0 0 22px color-mix(in srgb, var(--sc-acc, #e61c3a) 72%, transparent);
  margin: 8px 0; font-variant-numeric: tabular-nums;
}

/* 7. Auto-Spin Settings In-Cabinet Drawer */
.sc-auto-panel {
  position: absolute; right: 12px; bottom: 72px; z-index: 25;
  width: min(300px, calc(100% - 24px)); padding: 12px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 14, 30, .96), rgba(8, 6, 14, .98));
  backdrop-filter: blur(10px);
  border: 1.5px solid color-mix(in srgb, var(--sc-acc, #e61c3a) 75%, #fff);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .88);
}
.sc-ap-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
  font-size: 11px; letter-spacing: .2em; color: #fff;
}
.sc-ap-close {
  border: none; background: transparent; color: #b4acc8; cursor: pointer; font-size: 14px;
}
.sc-ap-counts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 10px; }
.sc-ap-counts button {
  padding: 8px 0; border-radius: 7px; cursor: pointer; font-weight: 700; font-size: 13px;
  background: rgba(255, 255, 255, .06); color: #fff;
  border: 1px solid rgba(255, 255, 255, .24); transition: background .15s, border-color .15s;
}
.sc-ap-counts button:hover {
  background: color-mix(in srgb, var(--sc-acc, #e61c3a) 38%, transparent);
  border-color: var(--sc-acc, #e61c3a);
}
.sc-ap-opts { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #d6d0e4; text-align: left; }
.sc-ap-opts label { display: flex; align-items: center; gap: 7px; cursor: pointer; }

/* 8. Device Music Jukebox Popover */
.sc-music-btn.playing {
  border-color: #2dff7a !important; color: #d8ffe6 !important;
  box-shadow: 0 0 14px rgba(45, 255, 122, .45);
}
.sc-jukebox {
  position: fixed; top: 52px; right: 12px; z-index: 60;
  width: min(330px, calc(100vw - 24px)); padding: 12px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 14, 28, .96), rgba(7, 6, 14, .98));
  backdrop-filter: blur(12px);
  border: 1.5px solid color-mix(in srgb, var(--sc-acc, #e61c3a) 70%, #ffffff);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .88);
  color: #f2eefc;
}
.sc-jb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.sc-jb-close { border: none; background: transparent; color: #aaa; cursor: pointer; font-size: 14px; }
.sc-jb-track {
  padding: 6px 9px; border-radius: 7px; background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .14); font-size: 11.5px; color: #ffe8a8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px;
}
.sc-jb-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sc-jb-btn {
  width: 32px; height: 32px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .07); color: #fff; cursor: pointer; font-size: 13px;
}
.sc-jb-vol { flex: 1; min-width: 60px; accent-color: var(--sc-acc, #e61c3a); }
.sc-jb-pick {
  padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #fff;
  background: color-mix(in srgb, var(--sc-acc, #e61c3a) 70%, #111);
  border: 1px solid rgba(255, 255, 255, .35);
}
.sc-jb-list { max-height: 130px; overflow: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.sc-jb-item {
  text-align: left; padding: 5px 8px; border-radius: 6px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .04); color: #ccc6dd; font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc-jb-item.on { background: color-mix(in srgb, var(--sc-acc, #e61c3a) 32%, transparent); color: #fff; }

/* 9. Clickable Bank Balance Link */
a.credits { text-decoration: none; cursor: pointer; }
a.credits:hover { filter: brightness(1.12); }

/* 10. Active Auto-Spin Button Highlight */
.sq-btn.auto-on, .pill-btn.auto-on {
  border-color: #2dff7a !important; color: #d8ffe6 !important;
  box-shadow: 0 0 14px rgba(45, 255, 122, .55) !important;
}

/* 11. Compact Mobile Topbar (Zero Right-Edge Clipping on 390px Phones!) */
@media (max-width: 560px) {
  .topbar { gap: 4px !important; padding: 5px 6px !important; }
  .top-left, .top-right { gap: 4px !important; }
  .topbar .pill-btn { padding: 4px 8px !important; font-size: 10.5px !important; letter-spacing: .08em !important; }
  .top-left a[href*="bank"], #top-help-btn, #top-pt-btn { display: none !important; }
  .credits { padding: 3px 8px 3px 5px !important; gap: 4px !important; }
  .credits-num { font-size: 13.5px !important; }
  .icon-btn { width: 29px !important; height: 29px !important; font-size: 13px !important; }
}
