*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.container {
  width: 100%;
}
@media (min-width: 640px) {

  .container {
    max-width: 640px;
  }
}
@media (min-width: 768px) {

  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {

  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {

  .container {
    max-width: 1280px;
  }
}
@media (min-width: 1536px) {

  .container {
    max-width: 1536px;
  }
}
.visible {
  visibility: visible;
}
.flex {
  display: flex;
}
.hidden {
  display: none;
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.border {
  border-width: 1px;
}
.uppercase {
  text-transform: uppercase;
}
.text-green-400 {
  --tw-text-opacity: 1;
  color: rgb(74 222 128 / var(--tw-text-opacity, 1));
}
.text-orange-400 {
  --tw-text-opacity: 1;
  color: rgb(251 146 60 / var(--tw-text-opacity, 1));
}
.text-purple-400 {
  --tw-text-opacity: 1;
  color: rgb(192 132 252 / var(--tw-text-opacity, 1));
}
.text-red-400 {
  --tw-text-opacity: 1;
  color: rgb(248 113 113 / var(--tw-text-opacity, 1));
}
.text-yellow-400 {
  --tw-text-opacity: 1;
  color: rgb(250 204 21 / var(--tw-text-opacity, 1));
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}



/* ═══════════════════════════════════════════════════════════
   SLOT MACHINE — DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════ */

/* ── Theme Variables ── */
.game-root {
    --machine-bg: #0c0e1a;
    --panel-bg: rgba(15, 23, 42, 0.85);
    --reel-bg: #0a0c16;
    --reel-border: #334155;
    --accent: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.4);
    --win-color: #22c55e;
    --jackpot-color: #facc15;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    --danger: #ef4444;
    --spin-btn: linear-gradient(135deg, #f59e0b, #d97706);
    --spin-btn-disabled: linear-gradient(135deg, #374151, #1f2937);
    --frame-glow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.game-root[data-theme="neon"] {
    --accent: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.4);
    --win-color: #06b6d4;
    --jackpot-color: #e879f9;
    --spin-btn: linear-gradient(135deg, #a855f7, #7c3aed);
    --frame-glow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.game-root[data-theme="royal"] {
    --accent: #dc2626;
    --accent-glow: rgba(220, 38, 38, 0.4);
    --win-color: #fbbf24;
    --jackpot-color: #fef08a;
    --spin-btn: linear-gradient(135deg, #dc2626, #991b1b);
    --frame-glow: 0 0 20px rgba(220, 38, 38, 0.2);
    --machine-bg: #1a0a0a;
}

.game-root[data-theme="cyber"] {
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.4);
    --win-color: #10b981;
    --jackpot-color: #67e8f9;
    --spin-btn: linear-gradient(135deg, #06b6d4, #0891b2);
    --frame-glow: 0 0 20px rgba(6, 182, 212, 0.2);
    --machine-bg: #0a1520;
}

.game-root[data-theme="golden"] {
    --accent: #eab308;
    --accent-glow: rgba(234, 179, 8, 0.4);
    --win-color: #f59e0b;
    --jackpot-color: #fef08a;
    --spin-btn: linear-gradient(135deg, #eab308, #ca8a04);
    --frame-glow: 0 0 25px rgba(234, 179, 8, 0.25);
    --machine-bg: #1a1505;
}

/* ── Game Root ── */
.game-root {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--machine-bg);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--text-primary);
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
    position: relative;
}

/* ── Top Bar ── */
.slots-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--reel-border);
    flex-shrink: 0;
    gap: 4px;
    backdrop-filter: blur(8px);
    min-height: 0;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--reel-border);
    border-radius: 8px;
    padding: 3px 8px;
    font-size: clamp(0.6rem, 1.8vw, 0.75rem);
    font-weight: 700;
    white-space: nowrap;
}

.stat-badge .stat-icon {
    font-size: clamp(0.65rem, 2vw, 0.85rem);
}

.stat-badge .stat-value {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}

.stat-badge .stat-value.counting {
    color: var(--win-color);
}

/* ── Rating Toast ── */
.rating-toast {
    text-align: center;
    padding: 2px 10px;
    font-size: clamp(0.55rem, 1.5vw, 0.65rem);
    font-weight: 800;
    color: var(--jackpot-color);
    background: rgba(250, 204, 21, 0.1);
    border-bottom: 1px solid rgba(250, 204, 21, 0.2);
    animation: toastSlideIn 0.3s ease;
    flex-shrink: 0;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Level / XP Bar ── */
.level-bar-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--reel-border);
    flex-shrink: 0;
}

.level-badge {
    font-size: clamp(0.55rem, 1.5vw, 0.65rem);
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
}

.streak-badge {
    background: rgba(239, 68, 68, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 0.5rem;
    font-size: clamp(0.55rem, 1.5vw, 0.65rem);
    font-weight: 900;
    color: #f87171;
    white-space: nowrap;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.streak-badge.pulse {
    animation: firePulse 1s infinite alternate;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

@keyframes firePulse {
    from {
        box-shadow: 0 0 4px rgba(239, 68, 68, 0.2);
    }

    to {
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
    }
}

.xp-track {
    flex: 1;
    height: 5px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 4px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ── Reel Area ── */
.reel-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    min-height: 0;
    position: relative;
}

.reel-machine {
    display: flex;
    gap: clamp(4px, 1vw, 8px);
    background: var(--reel-bg);
    border: 2px solid var(--reel-border);
    border-radius: 12px;
    padding: clamp(6px, 1.5vw, 12px);
    box-shadow: var(--frame-glow);
    position: relative;
    width: 100%;
    max-width: min(100%, 25rem);
    aspect-ratio: auto;
    transition: box-shadow 0.5s;
}

.reel-machine.winning {
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-glow);
}

/* ── Single Reel ── */
.reel-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.5);
    position: relative;
    /* Constrain height to exactly 3 visible cells. Using min(vw, vh) for true responsiveness. */
    height: calc(clamp(2rem, min(8vw, 12vh), 4rem) * 3);
    max-height: calc(clamp(2rem, min(8vw, 12vh), 4rem) * 3);
}

.reel-viewport {
    display: flex;
    flex-direction: column;
    transition: transform 0.6s cubic-bezier(.17, .67, .29, 1.02);
    will-change: transform;
}

.reel-col:nth-child(2) .reel-viewport {
    transition-duration: 0.8s;
}

.reel-col:nth-child(3) .reel-viewport {
    transition-duration: 1.0s;
}

/* During animation, viewport transitions. In idle, no transition needed. */
.reel-viewport.idle {
    transition: none;
}

.reel-viewport.bounce {
    animation: reelBounce 0.3s ease-out;
}

@keyframes reelBounce {
    0% {
        transform: translateY(2px);
    }

    50% {
        transform: translateY(-4px);
    }

    100% {
        transform: translateY(0);
    }
}

.reel-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, min(6vw, 8vh), 2.5rem);
    height: clamp(2rem, min(8vw, 12vh), 4rem);
    width: 100%;
    flex-shrink: 0;
    transition: background 0.3s, box-shadow 0.3s;
}

/* ── Free Spins Mode ── */
.reel-frame.in-free-spins .reel-machine {
    border-color: var(--jackpot-color);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4), inset 0 0 20px rgba(250, 204, 21, 0.1);
}

.level-bar-wrap.free-spins-bar {
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.3);
}

.level-bar-wrap.free-spins-bar .level-badge {
    color: var(--jackpot-color);
}

.xp-track.bonus-track {
    background: rgba(250, 204, 21, 0.15);
}

.xp-fill.bonus-fill {
    background: linear-gradient(90deg, #fef08a, #f59e0b);
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
}

.spin-btn.free-spin-btn {
    background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%);
    border-bottom-color: #d97706;
    color: #451a03;
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
    }

    to {
        box-shadow: 0 0 20px rgba(250, 204, 21, 0.8);
    }
}

.reel-cell.win-highlight {
    background: rgba(245, 158, 11, 0.15);
    box-shadow: inset 0 0 15px var(--accent-glow);
    animation: cellPulse 0.6s ease infinite alternate;
}

@keyframes cellPulse {
    from {
        box-shadow: inset 0 0 10px var(--accent-glow);
    }

    to {
        box-shadow: inset 0 0 25px var(--accent-glow);
    }
}

/* Payline indicators — 3 lines: top (16.67%), center (50%), bottom (83.33%) */
.payline-indicator {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.payline-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
    background: var(--accent);
    opacity: 0.35;
}

.payline-indicator::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 16.67%;
    height: 1px;
    border-top: 1px dashed var(--accent);
    opacity: 0.2;
}

.payline-top-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 83.33%;
    height: 1px;
    border-top: 1px dashed var(--accent);
    opacity: 0.2;
    pointer-events: none;
    z-index: 5;
}

/* ── Win Message ── */
.win-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 900;
    color: var(--win-color);
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
    z-index: 20;
    pointer-events: none;
    white-space: nowrap;
}

.win-message.show {
    animation: winPop 1.5s ease forwards;
}

@keyframes winPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    15% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }

    30% {
        transform: translate(-50%, -50%) scale(1);
    }

    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -80%) scale(0.8);
        opacity: 0;
    }
}

.win-message.jackpot {
    color: var(--jackpot-color);
    font-size: clamp(1.3rem, 4vw, 2rem);
    text-shadow: 0 0 30px rgba(250, 204, 21, 0.7);
    animation: jackpotPop 2s ease forwards;
}

@keyframes jackpotPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-10deg);
        opacity: 0;
    }

    10% {
        transform: translate(-50%, -50%) scale(1.5) rotate(5deg);
        opacity: 1;
    }

    20% {
        transform: translate(-50%, -50%) scale(1.2) rotate(-3deg);
    }

    30% {
        transform: translate(-50%, -50%) scale(1.3) rotate(2deg);
    }

    40% {
        transform: translate(-50%, -50%) scale(1.2) rotate(0deg);
    }

    75% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -70%) scale(1);
        opacity: 0;
    }
}

/* ── Big Win Flash Overlay ── */
.bigwin-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 15;
    opacity: 0;
}

.bigwin-overlay.active {
    animation: bigFlash 1s ease forwards;
}

@keyframes bigFlash {
    0% {
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
    }
}

/* ── Loss shake ── */
.reel-machine.shake {
    animation: machineShake 0.4s ease;
}

@keyframes machineShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-3px);
    }

    40% {
        transform: translateX(3px);
    }

    60% {
        transform: translateX(-2px);
    }

    80% {
        transform: translateX(2px);
    }
}

/* ── Controls Area ── */
.controls-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 10px 8px;
    background: var(--panel-bg);
    border-top: 1px solid var(--reel-border);
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.bet-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bet-label {
    font-size: clamp(0.55rem, 1.5vw, 0.65rem);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bet-btn {
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid var(--reel-border);
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-secondary);
    font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.bet-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.bet-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.spin-btn {
    width: 100%;
    padding: clamp(8px, 2vw, 12px);
    border: none;
    border-radius: 10px;
    background: var(--spin-btn);
    color: #000;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.spin-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    animation: btnShimmer 3s infinite;
}

@keyframes btnShimmer {
    0% {
        transform: translateX(-100%);
    }

    50%,
    100% {
        transform: translateX(100%);
    }
}

.spin-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.spin-btn:active {
    transform: translateY(1px);
}

.spin-btn:disabled {
    background: var(--spin-btn-disabled);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.spin-btn:disabled::before {
    animation: none;
}

.no-spins-msg {
    text-align: center;
    font-size: clamp(0.55rem, 1.5vw, 0.65rem);
    color: var(--accent);
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* ── History Strip ── */
.history-strip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--panel-bg);
    border-top: 1px solid var(--reel-border);
    flex-shrink: 0;
    overflow-x: auto;
    min-height: 0;
}

.history-label {
    font-size: clamp(0.45rem, 1.2vw, 0.55rem);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 6px;
    padding: 2px 5px;
    font-size: clamp(0.5rem, 1.3vw, 0.6rem);
    white-space: nowrap;
    border: 1px solid transparent;
    animation: historySlideIn 0.3s ease;
}

.history-item.win {
    border-color: rgba(34, 197, 94, 0.3);
}

.history-item.loss {
    border-color: rgba(239, 68, 68, 0.15);
}

.history-symbols {
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
}

.history-result {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.history-result.positive {
    color: var(--win-color);
}

.history-result.negative {
    color: var(--danger);
}

@keyframes historySlideIn {
    from {
        transform: translateX(-8px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ── Coin Particles ── */
.coin-particle {
    position: absolute;
    font-size: 1rem;
    pointer-events: none;
    z-index: 25;
    animation: coinFall 1.5s ease-out forwards;
}

@keyframes coinFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(80px) rotate(360deg) scale(0.3);
    }
}

/* ── Theme Selector (small pill row) ── */
.theme-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 10px;
    flex-shrink: 0;
}

.theme-pill {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--reel-border);
    cursor: pointer;
    transition: all 0.2s;
}

.theme-pill:hover {
    transform: scale(1.2);
}

.theme-pill.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 6px var(--accent-glow);
}

.theme-pill.locked {
    opacity: 0.3;
    cursor: not-allowed;
}

.theme-pill.locked:hover {
    transform: none;
}

/* ── HUD Topbar Extras ── */
.stats-toggle-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.stats-toggle-btn:hover {
    transform: scale(1.1);
}

/* ── Statistics Overlay ── */
.stats-overlay {
    position: absolute;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.stats-modal {
    background: var(--panel-bg);
    border: 1px solid var(--reel-border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    width: 90%;
    max-width: 400px;
    color: var(--text-base);
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.stats-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--accent);
}

.close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.close-btn:hover {
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
}

.stat-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.stat-val {
    font-size: 1rem;
    font-weight: 700;
}

/* ── Offline Badge ── */
.offline-badge {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

/* ── Loading Spinner ── */
.loading-spinner {
    display: flex;
    gap: 0.5rem;
    font-size: 2.5rem;
}

.loading-spinner div {
    animation: bounce-loader 1.2s infinite ease-in-out both;
}

.loading-spinner .bounce1 {
    animation-delay: -0.32s;
}

.loading-spinner .bounce2 {
    animation-delay: -0.16s;
}

@keyframes bounce-loader {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
        filter: grayscale(100%);
    }

    40% {
        transform: scale(1);
        opacity: 1;
        filter: grayscale(0%);
    }
}