/* ═══════════════════════════════════════════
   ROYAL SPIN — Style Sheet
   Theme: Royal blue, steel silver, treasure gold
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { -webkit-user-select:none; -moz-user-select:none; user-select:none; }
img { -webkit-user-drag:none; user-drag:none; pointer-events:none; }

/* ─── CSS VARIABLES ─────────────────────── */
:root {
    --reel-h:     90px;
    --reel-w:     99px;
    --rows:       4;
    --sep:        8px;

    --bg-dark:    #0a0e04;
    --bg-mid:     #141f08;
    --gold-1:     #f0c230;
    --gold-2:     #b88a10;
    --gold-3:     #ffd966;
    --green-1:    #3a7a2a;
    --green-2:    #275c1a;
    --green-3:    #8fd46a;
    --brown-1:    #5a3a10;
    --brown-2:    #3a2408;
    --hud-bg:     #0a0e04;
    --hud-border: #3a5a1a;
    --reel-bg:    #f5ead0;
    --win-green:  #f0c230;
    --red:        #ff4530;

    --font-game: 'Fredoka', 'Nunito', sans-serif;
    --font-hud:  'Nunito', 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

html, body {
    width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
    font-family: var(--font-game);
    display: flex; align-items: center; justify-content: center;
    background: #0a0e04;
}

/* ─── SPLASH ────────────────────────────── */
#splash-screen {
    position: fixed; inset: 0;
    background: radial-gradient(ellipse at 50% 40%, #1a2e08 0%, #060a02 100%);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; transition: opacity 0.7s ease;
}
#splash-screen.fade-out { opacity: 0; pointer-events: none; }
#splash-screen.hidden   { display: none; }

.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }

#splash-logo {
    width: min(420px, 70vw); height: auto;
    filter: drop-shadow(0 0 30px rgba(180,140,10,0.7)) drop-shadow(0 0 60px rgba(58,122,42,0.5));
    animation: splashPulse 2s ease-in-out infinite;
}
@keyframes splashPulse {
    0%,100% { filter: drop-shadow(0 0 30px rgba(180,140,10,0.5)) drop-shadow(0 0 60px rgba(58,122,42,0.3)); }
    50%      { filter: drop-shadow(0 0 50px rgba(180,140,10,0.9)) drop-shadow(0 0 90px rgba(58,122,42,0.6)); }
}

.splash-bar-wrap {
    width: min(320px, 55vw); height: 8px;
    background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden;
    border: 1px solid rgba(180,140,10,0.35);
}
.splash-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #275c1a, #3a7a2a, #f0c230);
    border-radius: 4px; transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(240,194,48,0.8);
}
.splash-loading-text {
    font-family: var(--font-game); font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(180,220,130,0.9);
}
.splash-loading-text.splash-tap {
    font-size: 1rem; letter-spacing: 0.35em;
    color: #f0c230;
    text-shadow: 0 0 20px rgba(240,194,48,0.9), 0 0 40px rgba(180,140,10,0.5);
    animation: tapPulse 1.2s ease-in-out infinite;
}
@keyframes tapPulse {
    0%,100% { opacity: 0.4; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.06); }
}

/* ─── CHARACTER PANEL ────────────────────── */
#character-panel {
    position: fixed; left: 0; top: 50%; transform: translateY(-50%);
    width: calc(50vw - var(--reel-w) * 2.5 - var(--sep) * 2 - 20px + 80px);
    height: calc(var(--reel-h) * 4 + 210px);
    overflow: visible;
    background: transparent;
    pointer-events: none; z-index: 5;
}
#character-img {
    position: absolute; inset: 0;
    display: block;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.9))
            drop-shadow(0 0 22px rgba(240,194,48,0.6))
            drop-shadow(0 0 48px rgba(58,122,42,0.4));
}

/* ─── GAME WRAPPER ───────────────────────── */
#game-wrapper {
    position: relative;
    width: calc(var(--reel-w) * 5 + var(--sep) * 4 + 32px);
    display: flex; flex-direction: column; align-items: center;
    gap: 0; user-select: none; z-index: 10;
    transform: translateX(40px);
}

/* ─── SLOT MACHINE ───────────────────────── */
#slot-machine {
    background: #0e1a06;
    border-radius: 14px 14px 0 0;
    border: 2px solid rgba(180,140,10,0.6); border-bottom: none;
    box-shadow: 0 0 0 1px rgba(180,140,10,0.10) inset,
                0 16px 48px rgba(0,0,0,0.7);
    overflow: visible; width: 100%;
}

.machine-top {
    background: linear-gradient(180deg, rgba(10,20,5,0.85) 0%, rgba(5,10,2,0.7) 100%);
    border-bottom: 2px solid rgba(180,140,10,0.4);
    padding: 9px 14px;
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; position: relative;
}
.machine-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700; font-size: 1.25rem;
    color: var(--gold-1);
    letter-spacing: 0.08em;
    text-shadow: 0 0 20px rgba(240,194,48,0.8),
                 0 0 40px rgba(58,122,42,0.5),
                 0 2px 4px rgba(0,0,0,0.9);
    grid-column: 2; white-space: nowrap; position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
}
.title-logo {
    height: 44px; width: auto; object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(240,194,48,0.7));
    pointer-events: none;
}

.auto-indicator {
    grid-column: 3; justify-self: end;
    background: rgba(240,194,48,0.12); color: var(--gold-1);
    font-family: var(--font-hud); font-size: 0.65rem; font-weight: 800;
    letter-spacing: 0.05em; padding: 2px 8px; border-radius: 10px;
    border: 1px solid rgba(240,194,48,0.4);
    z-index: 2; white-space: nowrap;
}
.auto-indicator.hidden { display: none; }

.bonus1-indicator {
    grid-column: 1; justify-self: start;
    background: linear-gradient(135deg, rgba(240,194,48,0.15), rgba(58,122,42,0.1));
    border: 1px solid rgba(240,194,48,0.5);
    color: var(--gold-1);
    font-family: var(--font-hud); font-size: 0.62rem; font-weight: 800;
    letter-spacing: 0.06em; padding: 2px 8px; border-radius: 10px; z-index: 2;
    white-space: nowrap;
    animation: bonus1Pulse 1.8s ease-in-out infinite;
}
.bonus1-indicator.hidden { display: none; }
@keyframes bonus1Pulse {
    0%,100% { box-shadow: 0 0 6px rgba(240,194,48,0.3); }
    50%      { box-shadow: 0 0 14px rgba(240,194,48,0.7); }
}

/* ─── REELS ──────────────────────────────── */
.reels-frame { padding: 8px 10px 10px; }
.reels-inner {
    display: flex; align-items: stretch;
    background: #f5ead0;
    border-radius: 8px; overflow: hidden;
    border: 3px solid #b88a10;
    box-shadow: inset 0 0 24px rgba(0,0,0,0.9),
                0 0 0 rgba(0,0,0,0);
    position: relative;
    height: calc(var(--reel-h) * var(--rows));
}
.reels-inner::before, .reels-inner::after {
    content: ''; position: absolute; left: 0; right: 0;
    height: 20px; z-index: 22; pointer-events: none;
}
.reels-inner::before { top: 0;    background: linear-gradient(to bottom, rgba(245,234,208,0.85), transparent); }
.reels-inner::after  { bottom: 0; background: linear-gradient(to top,    rgba(5,10,2,0.75), transparent); }

.payline-top, .payline-bottom { display: none; }
.win-line { display: none !important; }

#payline-svg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 12; overflow: visible;
}

.reel-wrap {
    width: var(--reel-w); height: calc(var(--reel-h) * var(--rows));
    overflow: hidden; position: relative; flex-shrink: 0;
    transform: translateZ(0); /* force GPU layer so overflow:hidden clips animated strip correctly */
    isolation: isolate;
}
.reel-strip { display: flex; flex-direction: column; will-change: transform; }
.reel-sep { width: var(--sep); background: rgba(58,122,42,0.3); flex-shrink: 0; align-self: stretch; }

/* ─── SYMBOLS ────────────────────────────── */
.sym {
    width: var(--reel-w); height: var(--reel-h);
    display: flex; align-items: center; justify-content: center;
    position: relative; flex-shrink: 0;
}
.sym img {
    width: calc(var(--reel-h) * 0.78); height: calc(var(--reel-h) * 0.78);
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
    transition: filter 0.2s ease, transform 0.2s ease;
}
/* sym hover removed */
.pay-sym-name {
    font-family: var(--font-hud); font-size: 0.52rem; font-weight: 800;
    color: rgba(58,100,20,0.9); letter-spacing: 0.04em;
    text-align: center; width: 100%;
    white-space: normal; word-break: break-word;
    line-height: 1.2; min-height: 1.5em;
}
.sym.winning img {
    filter: drop-shadow(0 0 16px rgba(240,194,48,0.95))
            drop-shadow(0 0 8px rgba(58,122,42,0.8))
            brightness(1.15);
    animation: symPop 0.35s ease-out;
}
@keyframes symPop { 0%{transform:scale(1) rotate(0)} 30%{transform:scale(1.28) rotate(-2deg)} 60%{transform:scale(0.95) rotate(1deg)} 100%{transform:scale(1) rotate(0)} }

/* FS scatter glow */
.sym img[src$="fs.png"],
.sym img[src$="fs.PNG"] {
    animation: fsFire 2.4s ease-in-out infinite;
}
@keyframes fsFire {
    0%   { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)) drop-shadow(0 0 10px rgba(240,194,48,0.7)); }
    33%  { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)) drop-shadow(0 0 10px rgba(58,122,42,0.6)); }
    66%  { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)) drop-shadow(0 0 10px rgba(143,212,106,0.6));  }
    100% { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)) drop-shadow(0 0 10px rgba(240,194,48,0.7)); }
}

/* ─── SPIN ANIMATION ─────────────────────── */
.reel-strip.spinning {
    animation-name: reelSpin;
    animation-timing-function: ease-in-out;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}
@keyframes reelSpin {
    0%   { transform: translateY(0); }
    100% { transform: translateY(calc(-100% + var(--reel-h) * var(--rows))); }
}
.reel-strip.landing { /* no flash on stop */ }
@keyframes reelShake {
    0%   { transform: translateY(0); } 20% { transform: translateY(-3px); }
    40%  { transform: translateY(2px); }  65% { transform: translateY(-1px); }
    100% { transform: translateY(0); }
}

/* ─── HUD ────────────────────────────────── */
#hud {
    display: flex; align-items: stretch; gap: 8px;
    background: linear-gradient(180deg, #0a1404 0%, #060c02 100%);
    border: 2px solid rgba(180,140,10,0.4); border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 8px 12px;
    overflow: visible;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6),
                inset 0 1px 0 rgba(180,140,10,0.12);
    width: 100%;
}

/* ─── HUD BUTTONS (left side) ────────────── */
.hud-left { display: flex; flex-direction: row; gap: 6px; flex-shrink: 0; align-self: stretch; }

.hud-btn {
    border-radius: 12px; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.1s, filter 0.1s, box-shadow 0.2s;
    flex-shrink: 0; font-size: 1.2rem;
}
.hud-btn:hover  { transform: scale(1.08); filter: brightness(1.15); }
.hud-btn:active { transform: scale(0.93); }
.hud-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }

/* Bonus button — large gold gem */
.hud-btn--bonus {
    width: 52px; background: linear-gradient(145deg, #e8b010, #f5c542, #b88a20);
    border: 2px solid rgba(240,194,48,0.8);
    box-shadow: 0 4px 14px rgba(58,122,42,0.5),
                inset 0 1px 0 rgba(255,255,255,0.3);
    color: #fff; font-size: 1.6rem;
}
.hud-btn--bonus:hover { box-shadow: 0 6px 20px rgba(58,122,42,0.7), inset 0 1px 0 rgba(255,255,255,0.3); }
.hud-btn--bonus .hud-btn-icon { line-height: 1; }
.hud-btn--bonus-active {
    animation: goldGlow 1.5s ease-in-out infinite;
}
@keyframes goldGlow {
    0%,100% { box-shadow: 0 0 0 2px rgba(240,194,48,0.7), 0 0 14px rgba(58,122,42,0.5); }
    50%      { box-shadow: 0 0 0 3px rgba(240,194,48,1.0), 0 0 26px rgba(58,122,42,0.9); }
}

/* Menu button — dark navy */
.hud-btn--menu {
    width: 40px; height: 100%; min-width: unset;
    background: linear-gradient(145deg, #0d1e40, #060e20);
    border: 2px solid rgba(58,122,42,0.4);
    color: rgba(180,220,130,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hud-btn--menu svg { width: 18px; height: 18px; }

/* Generic dark/blue buttons */
.hud-btn--dark {
    background: linear-gradient(145deg, #0a1830, #040c18);
    color: rgba(180,220,130,0.9);
    border: 1px solid rgba(58,122,42,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hud-btn--blue {
    background: linear-gradient(145deg, #0d1e40, #060e20);
    color: rgba(180,220,130,0.9);
    border: 1px solid rgba(58,122,42,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hud-left .hud-btn { height: 100%; }

/* Speed fast mode glow */
.hud-btn--active {
    box-shadow: 0 0 0 2px rgba(245,197,66,0.9), 0 0 18px rgba(200,150,10,0.7) !important;
    animation: blueGlow 1.5s ease-in-out infinite;
}
@keyframes blueGlow {
    0%,100% { box-shadow: 0 0 0 2px rgba(240,194,48,0.7), 0 0 12px rgba(58,122,42,0.5); }
    50%      { box-shadow: 0 0 0 2px rgba(240,194,48,1.0), 0 0 24px rgba(58,122,42,0.9); }
}

/* ─── HUD INFO BAR ───────────────────────── */
.hud-info {
    flex: 1; display: flex; align-items: center;
    background: rgba(6,12,2,0.8);
    border: 2px solid rgba(58,122,42,0.35);
    border-radius: 10px; padding: 5px 12px; min-width: 0;
}
.hud-stat   { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow: hidden; }
.hud-label  { font-family: var(--font-hud); font-size: 0.52rem; font-weight: 800;
    letter-spacing: 0.07em; color: rgba(143,180,80,0.7); text-transform: uppercase; }
.hud-value-wrap { display: flex; align-items: center; }
.hud-coin   { display: none; }
.hud-value  { font-family: var(--font-hud); font-size: 1rem; font-weight: 900; color: #fff;
    white-space: nowrap; overflow: visible; max-width: none; display: inline-block;
    font-size: clamp(0.75rem, 2.2vw, 1rem); }
.hud-value.bet-feature { color: var(--gold-1); text-shadow: 0 0 10px rgba(240,194,48,0.6); }
.hud-divider { width: 1px; height: 28px; background: rgba(58,122,42,0.3); margin: 0 12px; }

/* ─── BET CONTROLS ───────────────────────── */
.bet-controls { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; align-self: center; }
.bet-btn {
    width: 30px; height: 22px; border-radius: 6px; border: 2px solid rgba(58,122,42,0.4);
    background: linear-gradient(145deg, #1a2e08, #0e1a04);
    color: var(--gold-1); font-size: 1rem; font-weight: 900; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    cursor: pointer; transition: filter 0.1s, transform 0.1s;
}
.bet-btn:hover  { filter: brightness(1.2); }
.bet-btn:active { transform: scale(0.9); }
.bet-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ─── SPIN BUTTON ────────────────────────── */
.spin-btn {
    width: calc(var(--reel-h) * 0.65); height: calc(var(--reel-h) * 0.65);
    border-radius: 50%;
    border: 3px solid rgba(240,194,48,0.8);
    background: radial-gradient(circle at 35% 35%, #f0c230, #8ab820, #3a6a10);
    color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px rgba(58,122,42,0.3),
                0 6px 20px rgba(58,122,42,0.6),
                0 0 30px rgba(240,194,48,0.3),
                inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s ease-out; transform: scale(1);
    flex-shrink: 0; cursor: pointer;
    align-self: center; position: relative; z-index: 5;
    margin-top: calc(var(--reel-h) * -0.16); margin-bottom: calc(var(--reel-h) * -0.16);
}
.spin-btn svg { width: calc(var(--reel-h) * 0.26); height: calc(var(--reel-h) * 0.26); }
.spin-btn:hover {
    transform: scale(1.07);
    box-shadow: 0 0 0 5px rgba(58,122,42,0.4), 0 8px 28px rgba(58,122,42,0.8),
                0 0 40px rgba(240,194,48,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}
.spin-btn:active  { transform: scale(0.93); }
.spin-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.spin-btn.spinning {
    background: radial-gradient(circle at 35% 35%, #ffd966, #8ab820);
    border-color: rgba(240,194,48,0.9);
    box-shadow: 0 0 0 4px rgba(58,122,42,0.5), 0 6px 24px rgba(58,122,42,0.7),
                inset 0 1px 0 rgba(255,255,255,0.5);
    animation: spinBtnPulse 0.8s ease-in-out infinite alternate;
}
.spin-btn.spinning svg { animation: spinCW 0.65s linear infinite; }
@keyframes spinBtnPulse {
    from { box-shadow: 0 0 0 4px rgba(58,122,42,0.4), 0 6px 20px rgba(58,122,42,0.6); }
    to   { box-shadow: 0 0 0 6px rgba(58,122,42,0.7), 0 8px 32px rgba(58,122,42,0.9); }
}
.spin-btn--stop {
    background: radial-gradient(circle at 35% 35%, #ff6b4a, #cc2222);
    border-color: rgba(255,80,50,0.7);
    box-shadow: 0 0 0 4px rgba(255,80,50,0.2), 0 6px 20px rgba(255,80,50,0.4);
}
.spin-icon.hidden { display: none; }
.stop-icon.hidden { display: none; }
@keyframes spinCW { to { transform: rotate(360deg); } }

/* ─── HUD RIGHT ──────────────────────────── */
.hud-right { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; align-self: center; }
.hud-right .hud-btn { height: 20px; width: 30px; border-radius: 6px; }
.hud-right .hud-btn svg { width: 11px; height: 11px; }

/* ─── SETTINGS DROPDOWN ──────────────────── */
.settings-menu {
    position: fixed; bottom: calc(var(--hud-h, 88px) + 12px); left: 12px;
    background: linear-gradient(180deg, #0e1a06 0%, #080e02 100%);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(58,122,42,0.3);
    border-radius: 14px; overflow: hidden; z-index: 200;
    min-width: 165px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 20px rgba(58,122,42,0.1);
}
.settings-menu.hidden { display: none; }
.settings-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 11px 16px;
    background: none; border: none; cursor: pointer;
    color: rgba(180,220,130,0.85);
    font-family: var(--font-hud); font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
    transition: background 0.15s, color 0.15s; text-align: left;
}
.settings-item:hover { background: rgba(58,122,42,0.12); color: #fff; }
.settings-item svg { flex-shrink: 0; opacity: 0.7; }
.settings-item span:nth-child(2) { flex: 1; }
.settings-toggle {
    font-family: var(--font-hud); font-size: 0.7rem; font-weight: 900;
    color: var(--gold-1); letter-spacing: 0.08em;
}
.settings-divider { height: 1px; background: rgba(58,122,42,0.15); margin: 2px 0; }

/* ─── FREE SPIN BANNER ───────────────────── */
.fs-banner {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #060e20 0%, #0a1630 100%);
    border: 2px solid rgba(240,194,48,0.8); border-top: none;
    border-radius: 0 0 14px 14px; padding: 8px 20px;
    display: flex; align-items: center; gap: 12px; z-index: 150;
    box-shadow: 0 4px 20px rgba(58,122,42,0.4);
    animation: fsBannerIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.fs-banner.hidden { display: none; }
@keyframes fsBannerIn { from{transform:translateX(-50%) translateY(-100%)} to{transform:translateX(-50%) translateY(0)} }
.fs-banner-label {
    background: #f0c230; color: #1a1000;
    font-family: var(--font-hud); font-size: 0.6rem; font-weight: 900;
    letter-spacing: 0.12em; padding: 2px 8px; border-radius: 6px;
}
.fs-banner-count, .fs-banner-totalwin {
    font-family: var(--font-hud); font-size: 0.82rem; color: rgba(180,220,130,0.75);
}
.fs-banner-count strong, .fs-banner-totalwin strong { color: var(--gold-1); }
.fs-sep { color: rgba(58,122,42,0.4); }

/* ─── WIN OVERLAY ────────────────────────── */
.win-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 50; pointer-events: none;
}
.win-overlay.hidden { display: none; }
.win-content {
    text-align: center;
    animation: winPop 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes winPop {
    0%   { transform: scale(0.1) rotate(-8deg); opacity: 0; }
    40%  { transform: scale(1.18) rotate(2deg);  opacity: 1; }
    60%  { transform: scale(0.92) rotate(-1deg); }
    80%  { transform: scale(1.04) rotate(0.5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.win-label {
    font-family: var(--font-game); font-size: 2.8rem; font-weight: 700;
    color: var(--gold-1);
    text-shadow: 0 0 30px rgba(240,194,48,1), 0 0 60px rgba(58,122,42,0.6), 0 2px 4px rgba(0,0,0,0.9);
    letter-spacing: 0.05em; display: block;
    animation: winLabelPulse 1.4s ease-in-out infinite;
}
.win-label.max-win-label {
    background: linear-gradient(90deg, #f0c230, #8fd46a, #f0c230, #8fd46a);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    text-shadow: none;
    animation: maxWinRainbow 1.2s linear infinite, winLabelPulse 1.4s ease-in-out infinite;
    font-size: 3.2rem;
}
@keyframes maxWinRainbow { 0%{background-position:0% center} 100%{background-position:200% center} }
@keyframes winLabelPulse {
    0%,100% { text-shadow: 0 0 30px rgba(240,194,48,1), 0 0 60px rgba(58,122,42,0.5), 0 2px 4px rgba(0,0,0,0.9); }
    50%      { text-shadow: 0 0 50px rgba(240,194,48,1), 0 0 100px rgba(58,122,42,0.8), 0 2px 4px rgba(0,0,0,0.9); }
}
.win-amount {
    font-family: var(--font-game); font-size: 2.4rem; font-weight: 700;
    color: #ffd966;
    text-shadow: 0 0 24px rgba(240,194,48,0.9), 0 2px 4px rgba(0,0,0,0.9); display: block;
}
.win-multiplier {
    font-family: var(--font-hud); font-size: 1.15rem; font-weight: 800;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 0 12px rgba(255,255,255,0.5), 0 2px 4px rgba(0,0,0,0.9);
    letter-spacing: 0.05em; margin-top: 4px; display: block;
}

/* ─── ERROR TOAST ────────────────────────── */
.error-toast {
    position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%);
    background: rgba(200,60,20,0.95); color: #fff;
    font-family: var(--font-hud); font-weight: 700; font-size: 0.85rem;
    padding: 9px 22px; border-radius: 10px; z-index: 200;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4); animation: toastIn 0.25s ease;
}
.error-toast.hidden { display: none; }
@keyframes toastIn { from{opacity:0;transform:translateX(-50%) translateY(8px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* ─── REPLAY BANNER ──────────────────────── */
.replay-banner {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #060e02 0%, #0a1604 100%);
    border: 2px solid var(--gold-1); border-top: none;
    border-radius: 0 0 14px 14px; padding: 8px 18px;
    display: flex; align-items: center; gap: 12px; z-index: 150;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.replay-banner.hidden { display: none; }
.replay-label {
    background: var(--gold-1); color: #0a1400;
    font-family: var(--font-hud); font-size: 0.6rem; font-weight: 900;
    letter-spacing: 0.15em; padding: 2px 8px; border-radius: 6px;
}
.replay-stat  { font-family: var(--font-hud); font-size: 0.8rem; color: rgba(180,220,130,0.7); }
.replay-stat strong { color: #fff; }
.replay-sep   { color: rgba(58,122,42,0.4); }
.replay-again-btn {
    background: linear-gradient(145deg, #275c1a, #183c0e);
    border: none; border-radius: 8px;
    color: var(--gold-1); font-family: var(--font-hud); font-size: 0.75rem; font-weight: 800;
    padding: 5px 14px; cursor: pointer;
}
.replay-again-btn:hover { filter: brightness(1.15); }
.replay-again-btn.hidden { display: none; }

/* ─── CONNECTING OVERLAY ─────────────────── */
.connecting-overlay {
    position: fixed !important; inset: 0 !important;
    background: rgba(4,8,2,0.88);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; border-radius: 0 !important; z-index: 9990 !important;
    backdrop-filter: blur(6px); transition: opacity 0.3s;
}
.connecting-overlay.hidden { opacity: 0; pointer-events: none; }
.connecting-spinner {
    width: 44px; height: 44px;
    border: 4px solid rgba(58,122,42,0.2); border-top-color: var(--gold-3);
    border-radius: 50%; animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.connecting-text { font-family: var(--font-hud); font-weight: 800; font-size: 1rem;
    color: rgba(143,180,80,0.7); letter-spacing: 0.05em; }
.connecting-overlay.fatal { background: rgba(4,8,2,0.97); }
.fatal-icon   { font-size: 2.4rem; margin-bottom: 4px; }
.fatal-title  { font-family: var(--font-hud); font-weight: 900; font-size: 1.1rem; color: #ff6b4a; letter-spacing: 0.04em; text-align: center; }
.fatal-detail { font-family: var(--font-hud); font-size: 0.8rem; color: rgba(143,180,80,0.4); text-align: center; max-width: 270px; line-height: 1.5; margin-top: 6px; }

/* ─── MODALS BASE ────────────────────────── */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
    z-index: 300; backdrop-filter: blur(4px);
}
.modal.hidden { display: none; }
.modal-box {
    background: linear-gradient(160deg, #0a1404 0%, #060c02 100%);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 2px solid rgba(58,122,42,0.4); border-radius: 18px;
    width: 380px; max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8),
                0 0 40px rgba(58,122,42,0.1); overflow: hidden;
}
.modal-box--wide    { width: 540px; }
.modal-box--confirm { width: 340px; }
.modal-box--wide { max-height: 88vh; overflow: hidden; }

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 18px;
    background: linear-gradient(90deg,
        rgba(4,8,2,0.0) 0%, rgba(20,60,10,0.3) 50%, rgba(4,8,2,0.0) 100%);
    border-bottom: 2px solid rgba(58,122,42,0.25);
    font-family: var(--font-game); font-weight: 700; font-size: 1rem;
    color: var(--gold-3); letter-spacing: 0.04em; flex-shrink: 0;
}

.modal-close { background: none; border: none; font-size: 1.1rem; color: rgba(143,180,80,0.7); cursor: pointer; font-weight: 900; }
.modal-close:hover { opacity: 0.6; }
.modal-body  { overflow-y: auto; padding: 14px 18px; flex: 1; min-height: 0; }
.modal-body  { scrollbar-width: thin; scrollbar-color: rgba(58,122,42,0.5) rgba(10,18,4,0.6); }
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #275c1a, #183c0e); border-radius: 4px; }

/* ─── INFO SECTIONS ──────────────────────── */
.info-section-title {
    font-family: var(--font-hud); font-size: 0.7rem; font-weight: 800;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--gold-3); padding: 14px 0 8px; margin-top: 8px;
    border-bottom: 2px solid rgba(240,194,48,0.3); margin-bottom: 12px;
}
.info-section-title:first-child { margin-top: 0; padding-top: 4px; }
.tab-intro { font-family: var(--font-hud); font-size: 0.76rem; color: rgba(143,180,80,0.7); margin-bottom: 12px; line-height: 1.5; }

/* ─── PAYTABLE ───────────────────────────── */
#paytable-body {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px; padding: 4px 0 16px; perspective: 800px;
}
.pay-card {
    display: flex; flex-direction: column; align-items: center;
    background: rgba(58,122,42,0.05);
    border: 2px solid rgba(58,122,42,0.25);
    border-radius: 14px; padding: 14px 10px 10px; gap: 8px;
    cursor: default;
}
.pay-card img { width: 96px; height: 96px; object-fit: contain; }
.pay-card-rows { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.pay-card-row { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; }
.pay-k { font-family: var(--font-hud); font-size: 0.72rem; font-weight: 700; color: rgba(180,220,130,0.5); }
.pay-v { font-family: var(--font-game); font-weight: 700; font-size: 0.9rem; color: var(--gold-1); }
.pay-card--special { flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; padding: 14px 10px 10px; }
.pay-card--wild, .pay-card--fs { grid-column: auto; }
.pay-card--special img { width: 96px; height: 96px; flex-shrink: 0; }
.pay-card--special .pay-special-text { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.pay-card--special .pay-special-title { font-family: var(--font-hud); font-weight: 800; font-size: 0.82rem; color: var(--gold-1); text-align: center; }
.pay-card--special .pay-special-desc { font-family: var(--font-hud); font-size: 0.68rem; color: rgba(180,220,130,0.5); line-height: 1.4; text-align: center; }

/* Paytable 3D tilt */
.applyTilt { /* applied via JS */ }

/* ─── PAYLINES ───────────────────────────── */
.payline-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
html.layout-narrow-portrait .payline-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pd-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pd-num  { font-family: var(--font-hud); font-size: 0.6rem; font-weight: 800; color: rgba(180,220,130,0.4); }
.pd-svg {
    width: 50px; height: 32px; display: block; border-radius: 3px;
    overflow: visible;
}

/* ─── RULES ──────────────────────────────── */
.rules-content h3 {
    font-family: var(--font-hud); font-size: 0.75rem; font-weight: 800;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--gold-3); margin: 16px 0 6px;
}
.rules-content h3:first-child { margin-top: 0; }
.rules-content p { font-family: var(--font-body); font-size: 0.9rem; color: rgba(180,220,130,0.65); line-height: 1.6; margin: 0 0 6px; }
.rules-content strong { color: rgba(180,220,130,0.95); }

.rules-table {
    background: rgba(58,122,42,0.05); border: 1px solid rgba(58,122,42,0.2);
    border-radius: 8px; overflow: hidden; margin: 6px 0 8px;
}
.rules-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; border-bottom: 1px solid rgba(58,122,42,0.1); }
.rules-row:last-child { border-bottom: none; }
.rules-label { font-family: var(--font-hud); font-size: 0.76rem; color: rgba(143,180,80,0.6); }
.rules-val   { font-family: var(--font-hud); font-size: 0.76rem; font-weight: 800; color: var(--gold-1); }

.rules-bonus-card {
    background: rgba(58,122,42,0.06); border: 1px solid rgba(58,122,42,0.2);
    border-radius: 10px; padding: 12px 14px; margin: 8px 0;
}
.rules-bonus-card--buy { background: rgba(240,194,48,0.04); border-color: rgba(240,194,48,0.2); }
.rules-bonus-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rules-bonus-icon { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.rules-bonus-name { font-family: var(--font-hud); font-weight: 900; font-size: 0.82rem; color: var(--gold-3); }
.rules-bonus-sub  { font-family: var(--font-hud); font-size: 0.68rem; color: rgba(143,180,80,0.5); margin-top: 1px; }
.rules-bonus-card p { margin: 0; }

.disclaimer {
    margin-top: 16px; padding: 10px 12px;
    background: rgba(58,122,42,0.03); border: 1px solid rgba(58,122,42,0.1);
    border-left: 3px solid rgba(240,194,48,0.5); border-radius: 6px;
}
.disclaimer p { font-size: 0.78rem; color: rgba(143,180,80,0.35); line-height: 1.55; margin-bottom: 4px; }
.disclaimer p:last-child { margin-bottom: 0; }

/* ─── AUTOPLAY MODAL ─────────────────────── */
.auto-intro { font-family: var(--font-hud); font-size: 0.8rem; color: rgba(143,180,80,0.6); margin-bottom: 14px; }
.auto-opts  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.auto-opt {
    background: rgba(58,122,42,0.08); border: 2px solid rgba(58,122,42,0.2);
    border-radius: 12px; color: var(--gold-1); font-family: var(--font-game); font-size: 1.1rem;
    font-weight: 700; padding: 14px 0; cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.auto-opt:hover { background: rgba(58,122,42,0.2); border-color: rgba(58,122,42,0.5); }
.auto-opt--inf  { grid-column: 1 / -1; font-size: 1.5rem; padding: 10px 0; }

/* ─── BONUS MODAL ────────────────────────── */
.bonus-bet-selector {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(58,122,42,0.06); border: 2px solid rgba(58,122,42,0.15);
    border-radius: 10px; padding: 10px 14px; margin-bottom: 4px;
}
.bonus-bet-label { font-family: var(--font-hud); font-size: 0.78rem; color: rgba(143,180,80,0.6); letter-spacing: 0.05em; }
.bonus-bet-controls { display: flex; align-items: center; gap: 10px; }
.bonus-bet-btn {
    width: 28px; height: 28px; border-radius: 7px;
    background: rgba(58,122,42,0.15); border: 2px solid rgba(58,122,42,0.3);
    color: var(--gold-3); font-size: 1.1rem; font-weight: 700; cursor: pointer; line-height: 1;
    transition: background 0.15s, border-color 0.15s;
}
.bonus-bet-btn:hover:not(:disabled) { background: rgba(58,122,42,0.3); border-color: rgba(58,122,42,0.6); }
.bonus-bet-btn:disabled { opacity: 0.3; cursor: default; }
.bonus-bet-value { font-family: var(--font-hud); font-size: 0.95rem; font-weight: 800; color: var(--gold-3); min-width: 60px; text-align: center; }

.bonus-modal-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 18px; overflow-y: auto !important; overflow-x: hidden; }
.bonus-cards-row { display: flex; flex-direction: row; gap: 12px; align-items: stretch; }
.bonus-cards-row .bonus-card { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bonus-card-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 0; }
.bonus-card .bonus-action-btn { margin-top: auto; }

.bonus-card {
    background: rgba(58,122,42,0.05);
    border: 2px solid rgba(58,122,42,0.2);
    border-radius: 14px; padding: 16px;
    transition: border-color 0.2s, background 0.2s, transform 0.12s ease, box-shadow 0.12s ease;
}
.bonus-card:hover { border-color: rgba(58,122,42,0.45); }
.bonus-card--active {
    border-color: rgba(240,194,48,0.7) !important;
    background: rgba(240,194,48,0.06) !important;
    box-shadow: 0 0 20px rgba(240,194,48,0.15);
}
.bonus-card--buy { border-color: rgba(240,194,48,0.2); }
.bonus-card--buy:hover { border-color: rgba(240,194,48,0.5); }

.bonus-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bonus-card-icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.bonus-card-titles { flex: 1; }
.bonus-card-name { font-family: var(--font-game); font-weight: 700; font-size: 1rem; color: var(--gold-3); letter-spacing: 0.04em; }
.bonus-card-subtitle { font-family: var(--font-hud); font-size: 0.62rem; font-weight: 700; color: rgba(143,180,80,0.5); letter-spacing: 0.04em; margin-top: 1px; }

.bonus-status-badge {
    font-family: var(--font-hud); font-size: 0.55rem; font-weight: 900;
    letter-spacing: 0.06em; padding: 3px 8px; border-radius: 20px;
    background: rgba(255,255,255,0.06); color: rgba(143,180,80,0.4);
    border: 1px solid rgba(58,122,42,0.15); flex-shrink: 0;
}
.bonus-status-badge--active { background: rgba(240,194,48,0.15); color: var(--gold-3); border-color: rgba(240,194,48,0.5); box-shadow: 0 0 8px rgba(240,194,48,0.2); }
.bonus-status-badge--instant { background: rgba(58,122,42,0.12); color: var(--gold-3); border-color: rgba(58,122,42,0.4); }

.bonus-card-desc { font-family: var(--font-hud); font-size: 0.76rem; color: rgba(180,220,130,0.65); line-height: 1.55; margin-bottom: 12px; }
.bonus-card-desc strong { color: rgba(180,220,130,0.9); }
.bonus-card-costline { font-family: var(--font-hud); font-size: 0.72rem; color: rgba(143,180,80,0.5); margin-bottom: 12px; }
.bonus-card-costline strong { color: rgba(180,220,130,0.85); }
.bonus-card-formula { font-size: 0.65rem; color: rgba(143,180,80,0.3); margin-left: 4px; }

.bonus-action-btn {
    width: 100%; padding: 10px 0; border: none; border-radius: 10px; cursor: pointer;
    font-family: var(--font-game); font-size: 0.9rem; font-weight: 700;
    letter-spacing: 0.05em;
}
.bonus-action-btn:hover  { filter: brightness(1.12); }
.bonus-action-btn:active { transform: scale(0.97); }
.bonus-action-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }
.bonus-action-btn--activate { background: linear-gradient(135deg, #275c1a, #183c0e); color: var(--gold-1); box-shadow: 0 3px 12px rgba(58,122,42,0.5); border: 1px solid rgba(240,194,48,0.3); }
.bonus-action-btn--deactivate { background: linear-gradient(135deg, #1a2e08, #0e1a04); color: rgba(240,194,48,0.7); border: 1px solid rgba(180,140,10,0.3); }
.bonus-action-btn--buy { background: linear-gradient(135deg, #3a7a2a, #1e4a10); color: #fff; box-shadow: 0 3px 12px rgba(58,122,42,0.5); }

/* ─── CONFIRM MODAL ──────────────────────── */
.confirm-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; }
.confirm-msg { font-family: var(--font-hud); font-size: 0.84rem; font-weight: 800; color: rgba(255,255,255,0.85); line-height: 1.5; text-align: center; }
.confirm-detail { font-family: var(--font-hud); font-size: 0.76rem; color: rgba(180,220,130,0.5); line-height: 1.55; text-align: center; padding: 10px 12px; background: rgba(58,122,42,0.05); border: 1px solid rgba(58,122,42,0.1); border-radius: 8px; }
.confirm-buttons { display: flex; gap: 10px; margin-top: 4px; }
.confirm-btn { flex: 1; padding: 11px 0; border: none; border-radius: 10px; cursor: pointer; font-family: var(--font-game); font-size: 0.88rem; font-weight: 700; letter-spacing: 0.04em; transition: filter 0.12s, transform 0.1s; }
.confirm-btn:hover  { filter: brightness(1.1); }
.confirm-btn:active { transform: scale(0.97); }
.confirm-btn--yes { background: linear-gradient(135deg, #275c1a, #183c0e); color: #fff; box-shadow: 0 3px 12px rgba(200,66,122,0.4); }
.confirm-btn--no  { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.12); }
.confirm-btn--no:hover { background: rgba(255,255,255,0.12); }

/* ─── FS AWARD MODAL ─────────────────────── */
.modal-box--fs-award {
    background: radial-gradient(ellipse at 50% 0%, rgba(40,8,55,0.97) 0%, rgba(12,4,18,0.98) 100%);
    border: 2px solid rgba(245,197,66,0.6); border-radius: 20px;
    width: 340px; text-align: center; padding: 36px 28px 32px;
    box-shadow: 0 0 60px rgba(58,122,42,0.4), 0 0 120px rgba(58,122,42,0.2),
                inset 0 0 60px rgba(58,122,42,0.05);
    animation: fsAwardPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative; overflow: hidden;
}
.modal-box--fs-award::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(135deg, transparent 0px, transparent 30px, rgba(58,122,42,0.04) 30px, rgba(58,122,42,0.04) 32px);
    pointer-events: none;
}
@keyframes fsAwardPop { from{transform:scale(0.5);opacity:0} to{transform:scale(1);opacity:1} }

.fs-award-stars { font-size: 1.4rem; letter-spacing: 0.4em; color: var(--gold-3); text-shadow: 0 0 14px rgba(240,194,48,0.8); margin-bottom: 10px; animation: starsGlow 1.5s ease-in-out infinite; }
@keyframes starsGlow { 0%,100%{opacity:0.7} 50%{opacity:1} }

.fs-award-title { font-family: var(--font-game); font-size: 2rem; font-weight: 700; letter-spacing: 0.15em; color: #fff; text-shadow: 0 0 30px rgba(240,194,48,1), 0 0 60px rgba(58,122,42,0.6), 0 2px 4px rgba(0,0,0,0.9); margin-bottom: 16px; }
.fs-award-count-wrap { display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.fs-award-count-wrap > span { font-family: var(--font-game); font-size: 5rem; font-weight: 700; color: var(--gold-1); text-shadow: 0 0 40px rgba(240,194,48,1), 0 0 80px rgba(58,122,42,0.7), 0 3px 6px rgba(0,0,0,0.9); line-height: 1; animation: countPulse 1s ease-in-out infinite; }
@keyframes countPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }
.fs-award-sub { font-family: var(--font-hud); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.25em; color: rgba(143,180,80,0.7); text-transform: uppercase; margin-bottom: 28px; }
.fs-award-btn { width: 100%; padding: 14px 0; border: none; border-radius: 12px; background: linear-gradient(135deg, #3a7a2a, #1e4a10); color: #fff; font-family: var(--font-game); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.05em; cursor: pointer; box-shadow: 0 4px 20px rgba(200,150,10,0.6), inset 0 1px 0 rgba(255,255,255,0.2); transition: filter 0.12s, transform 0.1s; }
.fs-award-btn:hover  { filter: brightness(1.2); }
.fs-award-btn:active { transform: scale(0.97); }

/* ─── FS CELEBRATION ─────────────────────── */
.fs-celebration { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 500; pointer-events: all; }
.fs-celebration.hidden { display: none; }
.fs-celeb-bg { position: absolute; inset: 0; background: rgba(10,18,4,0.88); backdrop-filter: blur(8px); }
.fs-celeb-inner {
    position: relative; z-index: 1; text-align: center;
    animation: celebPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 40px 48px;
    background: radial-gradient(ellipse at 50% 30%, rgba(20,40,8,0.95), rgba(8,14,4,0.97));
    border: 2px solid rgba(58,122,42,0.5); border-radius: 24px;
    box-shadow: 0 0 80px rgba(58,122,42,0.25), inset 0 0 40px rgba(58,122,42,0.08);
    min-width: 280px;
}
@keyframes celebPop { from{transform:scale(0.3) rotate(-8deg);opacity:0} 60%{transform:scale(1.08) rotate(2deg);opacity:1} 80%{transform:scale(0.96) rotate(-1deg)} to{transform:scale(1) rotate(0deg);opacity:1} }

.fs-celeb-label { font-family: var(--font-game); font-weight: 700; letter-spacing: 0.18em; margin-bottom: 12px; text-shadow: 0 0 30px currentColor, 0 2px 6px rgba(0,0,0,0.9); animation: celebLabelPulse 1.2s ease-in-out infinite; }
.fs-celeb-label.tier-win    { font-size: 2.8rem; color: var(--gold-1); }
.fs-celeb-label.tier-bigwin { font-size: 3.4rem; color: var(--gold-3); }
.fs-celeb-label.tier-epicwin { font-size: 4rem; background: linear-gradient(90deg, #f5c542, #8fdf55, #f5c542, #8fdf55); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; filter: drop-shadow(0 0 20px rgba(245,197,66,0.8)); }
@keyframes celebLabelPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.04)} }

.fs-celeb-amount { font-family: var(--font-game); font-size: 3rem; font-weight: 700; color: var(--green-3); text-shadow: 0 0 30px rgba(245,197,66,0.9), 0 3px 6px rgba(0,0,0,0.9); margin-bottom: 8px; animation: amountShimmer 2s ease-in-out infinite; }
@keyframes amountShimmer { 0%,100%{text-shadow:0 0 30px rgba(245,197,66,0.9),0 3px 6px rgba(0,0,0,0.9)} 50%{text-shadow:0 0 50px rgba(245,197,66,1.0),0 3px 6px rgba(0,0,0,0.9)} }
.fs-celeb-sub { font-family: var(--font-hud); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.2em; color: rgba(143,180,80,0.5); text-transform: uppercase; margin-bottom: 28px; }
.fs-celeb-btn { padding: 14px 40px; border: none; border-radius: 12px; background: linear-gradient(135deg, #3a7a2a, #1e4a10); color: #fff; font-family: var(--font-game); font-size: 1rem; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; box-shadow: 0 4px 20px rgba(200,150,10,0.5), inset 0 1px 0 rgba(255,255,255,0.2); transition: filter 0.12s, transform 0.1s; }
.fs-celeb-btn:hover  { filter: brightness(1.15); }
.fs-celeb-btn:active { transform: scale(0.97); }

#fs-stars-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 499; }

/* ─── REPLAY INFO MODAL ──────────────────── */
.replay-info-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(10,18,4,0.88); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); overflow: auto; padding: 10px 0; }
.replay-info-overlay.hidden { display: none; }
.replay-info-box { background: linear-gradient(160deg, #0a1404 0%, #060c02 100%); border: 2px solid rgba(58,122,42,0.3); border-radius: 20px; padding: 28px 28px 24px; width: min(360px, 92vw); box-shadow: 0 0 60px rgba(58,122,42,0.15), 0 24px 48px rgba(0,0,0,0.6); display: flex; flex-direction: column; align-items: center; gap: 16px; max-height: calc(100vh - 20px); overflow-y: auto; }
.replay-info-badge { background: var(--gold-1); color: #1a0020; font-family: var(--font-hud); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.15em; padding: 3px 14px; border-radius: 20px; }
.replay-info-title { color: #fff; font-family: var(--font-hud); font-size: 1.5rem; font-weight: 800; margin: 0; text-align: center; }
.replay-info-table { width: 100%; background: rgba(58,122,42,0.04); border: 1px solid rgba(58,122,42,0.1); border-radius: 12px; overflow: hidden; }
.replay-info-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; }
.replay-info-row--highlight { background: rgba(58,122,42,0.06); }
.replay-info-divider { height: 1px; background: rgba(58,122,42,0.08); }
.replay-info-label { color: rgba(143,180,80,0.6); font-family: var(--font-hud); font-size: 0.82rem; }
.replay-info-value { color: #fff; font-family: var(--font-hud); font-size: 0.88rem; font-weight: 700; }
.replay-info-value--mode  { color: var(--gold-1); letter-spacing: 0.05em; }
.replay-info-value--gold  { color: var(--gold-1); }
.replay-info-value--green { color: var(--gold-1); }
.replay-info-btn { width: 100%; background: linear-gradient(135deg, #3a7a2a, #1e4a10); border: none; border-radius: 14px; color: #fff; font-family: var(--font-hud); font-size: 1.05rem; font-weight: 900; padding: 14px 0; cursor: pointer; box-shadow: 0 4px 20px rgba(58,122,42,0.35); transition: filter 0.15s, transform 0.1s; }
.replay-info-btn:hover  { filter: brightness(1.1); }
.replay-info-btn:active { transform: scale(0.98); }
.replay-info-disclaimer { color: rgba(143,180,80,0.3); font-size: 0.72rem; text-align: center; margin: 0; }

/* ─── WIN POPUP ──────────────────────────── */
.payline-win-popup {
    position: absolute;
    background: rgba(4,8,2,0.92); border: 2px solid rgba(240,194,48,0.7);
    border-radius: 8px; padding: 4px 10px;
    font-family: var(--font-game); font-size: 0.88rem; font-weight: 700;
    color: var(--gold-1); text-shadow: 0 0 10px rgba(245,197,66,0.8);
    pointer-events: none; z-index: 25; white-space: nowrap;
    box-shadow: 0 0 12px rgba(58,122,42,0.4);
    animation: popupPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.payline-win-popup.hidden { display: none; }
@keyframes popupPop { from{transform:scale(0.5) translateY(6px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }

/* ─── ANTICIPATION ───────────────────────── */
.reel-wrap.anticipation-active {
    z-index: 25; position: relative; border-radius: 6px;
    animation: antiBoxGlow 0.5s ease-in-out infinite alternate;
}
.reel-wrap.anticipation-active::after { display: none; }
@keyframes antiBoxGlow {
    0% { box-shadow: 0 0 0 2px rgba(245,197,66,0.75), 0 0 14px 5px rgba(58,122,42,0.45), 0 0 28px 10px rgba(245,197,66,0.15); transform: translateX(0); }
    25% { transform: translateX(-1px); }
    50% { box-shadow: 0 0 0 3px rgba(245,197,66,0.95), 0 0 22px 8px rgba(58,122,42,0.65), 0 0 44px 16px rgba(245,197,66,0.28); transform: translateX(1px); }
    75% { transform: translateX(-0.5px); }
    100% { transform: translateX(0); }
}
.reel-wrap.anticipation-fading { z-index: 25; border-radius: 6px; animation: none; box-shadow: none; transition: box-shadow 0.65s ease-out; }
.anti-flash { position: fixed; inset: 0; z-index: 999; pointer-events: none; background: rgba(58,122,42,0.12); animation: antiFlash 0.4s ease-out forwards; }
@keyframes antiFlash { 0%{opacity:1} 100%{opacity:0} }

.sym.scatter-highlight img {
    filter: drop-shadow(0 0 14px rgba(245,197,66,1)) drop-shadow(0 0 6px rgba(200,150,10,0.8)) brightness(1.35);
    animation: scatterPulse 0.55s ease-in-out infinite alternate;
}
@keyframes scatterPulse { from{transform:scale(1)} to{transform:scale(1.12)} }

/* ─── PAYLINE ANIMATIONS ─────────────────── */
.payline-path-main { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: drawLine 0.45s cubic-bezier(0.4,0,0.2,1) forwards; }
.payline-path-glow { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: drawLine 0.45s cubic-bezier(0.4,0,0.2,1) forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.payline-dot { opacity: 0; animation: popDot 0.2s ease-out forwards; }
@keyframes popDot { 0%{opacity:0;r:2} 60%{opacity:1;r:7} 100%{opacity:1;r:5} }

/* ─── LIGHTNING ──────────────────────────── */
#lightning-canvas { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; }
.screen-flicker { position: fixed; inset: 0; z-index: 2; background: rgba(58,122,42,0.05); pointer-events: none; animation: flicker 0.15s steps(1) forwards; }
@keyframes flicker { 0%,100%{opacity:0} 30%{opacity:1} 60%{opacity:0} 80%{opacity:0.5} }

/* ─── RAIN ───────────────────────────────── */
#rain-canvas { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0.7; }

/* ─── CLICK TO CONTINUE ──────────────────── */
.click-to-continue { position: fixed; inset: 0; z-index: 9998; background: #000; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity 0.5s ease; }
.click-to-continue.hidden { display: none; }
.click-to-continue.fade-out { opacity: 0; pointer-events: none; }
.ctc-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; animation: ctcPulse 2s ease-in-out infinite; }
@keyframes ctcPulse { 0%,100%{transform:scale(1);opacity:0.85} 50%{transform:scale(1.04);opacity:1} }
.ctc-icon { font-size: 3rem; filter: drop-shadow(0 0 20px rgba(245,197,66,0.8)); }
.ctc-title { font-family: var(--font-game); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.25em; color: var(--gold-3); text-shadow: 0 0 24px rgba(240,194,48,0.9), 0 0 50px rgba(58,122,42,0.6); }
.ctc-btn { font-family: var(--font-hud); font-weight: 900; font-size: 0.75rem; letter-spacing: 0.3em; color: rgba(180,220,130,0.5); border: 1px solid rgba(58,122,42,0.2); padding: 8px 24px; border-radius: 20px; background: rgba(58,122,42,0.05); animation: ctcBlink 1.4s ease-in-out infinite; }
@keyframes ctcBlink { 0%,100%{opacity:0.4} 50%{opacity:1} }

/* ─── HUD VALUE SCALING ──────────────────── */
.hud-value { white-space: nowrap; overflow: visible; max-width: none; display: inline-block; }
.hud-stat { min-width: 0; overflow: hidden; }

/* ─── RESPONSIVE ─────────────────────────── */
.bonus1-indicator { display: none !important; }

@media (max-width: 480px) {
    .modal-box--wide, .modal-box { width: 95vw; }
    .modal-box--fs-award { width: 88vw; min-width: 0; }
}
html.replay-mode #display-balance,
html.replay-mode #display-balance + .hud-divider,
html.replay-mode .hud-stat:first-child { display: none; }
html.replay-mode .hud-info { justify-content: center; }
#btn-auto:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }

html.has-banner:not(.layout-portrait):not(.layout-small-h):not(.layout-tiny-h) body { padding-top: 42px; }
html.has-banner.layout-small-h body { padding-top: 30px; }
html.has-banner.layout-tiny-h body { padding-top: 24px; }

.bonus-modal-body { overflow-y: auto !important; overflow-x: hidden; }

/* PORTRAIT */
html.layout-portrait body { padding-bottom: var(--hud-h, 108px); }
html.layout-portrait #character-panel { display: none; }
/* In portrait, game-wrapper is full width — remove shift */
html.layout-portrait #game-wrapper { transform: none; }

html.layout-portrait #hud { position: fixed; bottom: 0; left: 0; right: 0; border-radius: 0; border-top: 2px solid rgba(58,122,42,0.35); border-left: none; border-right: none; border-bottom: none; width: 100%; z-index: 20; padding-bottom: max(7px, env(safe-area-inset-bottom, 0px)); }
html.layout-portrait #slot-machine { border-radius: 12px; border: 2px solid rgba(58,122,42,0.3); }
html.layout-portrait .machine-title { font-size: 1.1rem; letter-spacing: 0.1em; }
html.layout-portrait .auto-indicator { font-size: 0.6rem; }
html.layout-portrait .reels-inner { align-items: center; }
html.layout-portrait .fs-banner, html.layout-portrait .replay-banner { left: 0; right: 0; width: 100%; transform: none; border-radius: 0; border-left: none; border-right: none; justify-content: center; animation-name: bannerInFull; }
@keyframes bannerInFull { from{transform:translateY(-100%)} to{transform:translateY(0)} }
html.layout-portrait .fs-banner { padding: 6px 14px; gap: 10px; }
html.layout-portrait .fs-banner-label { font-size: 0.62rem; }
html.layout-portrait .fs-banner-count, html.layout-portrait .fs-banner-totalwin { font-size: 0.72rem; }
html.layout-portrait .replay-banner { flex-wrap: nowrap; padding: 5px 14px; gap: 8px; }
html.layout-portrait .replay-stat { font-size: 0.73rem; }
html.layout-portrait .bonus-cards-row { flex-direction: column; }
html.layout-portrait .bonus-modal-body { max-height: 72vh; }

/* In portrait, game-wrapper is full width — remove shift */
html.layout-portrait #game-wrapper { transform: none; }

html.layout-portrait #hud { flex-wrap: wrap; padding: 5px 10px 7px; gap: 5px; align-items: center; }
html.layout-portrait .hud-info { order: 1; flex: 0 0 100%; width: 100%; padding: 5px 14px; justify-content: space-around; min-width: 0; }
html.layout-portrait .hud-stat { align-items: center; flex: 0 1 auto; }
html.layout-portrait .hud-divider { height: 26px; margin: 0 10px; }
html.layout-portrait .hud-left      { order: 2; flex: 1; justify-content: flex-start; flex-shrink: 0; align-self: center; }
html.layout-portrait .bet-controls  { order: 3; flex-shrink: 0; align-self: center; }
html.layout-portrait .spin-btn      { order: 4; flex-shrink: 0; align-self: center; margin-top: 0 !important; margin-bottom: 0 !important; margin-left: 6px; }
html.layout-portrait .hud-right     { order: 5; flex: 1; justify-content: flex-end; flex-shrink: 0; align-self: center; }
html.layout-portrait .bet-controls { flex-direction: column; gap: 3px; margin: 0 6px 0 0; }
html.layout-portrait .bet-btn { width: 32px; height: 22px; border-radius: 6px; font-size: 1rem; }
html.layout-portrait .spin-btn { width: 52px; height: 52px; }
html.layout-portrait .spin-btn svg { width: 22px; height: 22px; }
html.layout-portrait .hud-btn { width: 34px; height: 34px; border-radius: 8px; }
html.layout-portrait .hud-left { flex-direction: row; gap: 5px; }
html.layout-portrait .hud-left .hud-btn { height: 34px; width: 34px; }
html.layout-portrait .hud-btn svg { width: 16px; height: 16px; }
html.layout-portrait .hud-right { flex-direction: row; gap: 5px; }
html.layout-portrait .hud-right .hud-btn { height: 26px; width: 34px; border-radius: 6px; }
html.layout-portrait .hud-right .hud-btn svg { width: 12px; height: 12px; }
html.layout-portrait .fs-celeb-inner { padding: 28px 24px; min-width: 0; width: min(88vw, 340px); }
html.layout-portrait .fs-celeb-label.tier-epicwin { font-size: 2.8rem; }
html.layout-portrait .replay-info-box { padding: 20px 18px 18px; }

/* LARGE */
html.layout-large #character-panel { height: min(calc((100vh - 60px) * 0.7), 630px); top: 50%; }

/* SMALL HEIGHT (Popout L) */
html.layout-small-h #character-panel { height: calc((var(--reel-h) * 4 + 210px) * 0.7); left: -30px; }
html.layout-small-h .machine-top { padding: 5px 16px; }
html.layout-small-h .machine-title { font-size: 0.95rem; letter-spacing: 0.1em; }
html.layout-small-h .title-gem { display: none; }
html.layout-small-h .reels-frame { padding: 4px 8px 6px; }
html.layout-small-h #game-wrapper { width: calc(var(--reel-w) * 5 + var(--sep) * 4 + 20px); }
html.layout-small-h #hud { padding: 4px 10px; gap: 7px; }
html.layout-small-h .hud-info { padding: 3px 10px; }
html.layout-small-h .hud-label { font-size: 0.5rem; }
html.layout-small-h .hud-divider { margin: 0 8px; height: 22px; }
html.layout-small-h .bet-btn { width: 26px; height: 18px; font-size: 0.85rem; }
html.layout-small-h .bet-controls { gap: 2px; }
html.layout-small-h .hud-btn { width: 32px; height: 26px; }
html.layout-small-h .hud-left .hud-btn { width: auto; min-width: 26px; }
html.layout-small-h .hud-btn svg { width: 14px; height: 14px; }
html.layout-small-h .hud-right .hud-btn { width: 24px; height: 14px; border-radius: 4px; }
html.layout-small-h .hud-right .hud-btn svg { width: 9px; height: 9px; }
html.layout-small-h .hud-btn--bonus { font-size: 1.1rem; }
html.layout-small-h .replay-banner { padding: 4px 10px; gap: 5px 8px; flex-wrap: wrap; max-width: calc(100vw - 16px); }
html.layout-small-h .replay-stat { font-size: 0.7rem; }
html.layout-small-h .replay-sep { display: none; }
html.layout-small-h .fs-banner { padding: 4px 10px; gap: 7px; }
html.layout-small-h .fs-banner-label  { font-size: 0.58rem; letter-spacing: 0.05em; }
html.layout-small-h .fs-banner-count, html.layout-small-h .fs-banner-totalwin { font-size: 0.68rem; }
html.layout-small-h .fs-sep { display: none; }
html.layout-small-h .auto-indicator { font-size: 0.58rem; padding: 1px 6px; }
html.layout-small-h .win-label { font-size: 2rem; }
html.layout-small-h .win-amount { font-size: 1.7rem; }

/* Popout S — paytable scaling */
html.layout-small-h .modal-box { width: min(340px, 96vw); }
html.layout-small-h #paytable-body { gap: 8px; }
html.layout-small-h .pay-card { padding: 10px 6px 8px; gap: 5px; border-radius: 10px; }
html.layout-small-h .pay-card img { width: 64px; height: 64px; }
html.layout-small-h .pay-card--special img { width: 64px; height: 64px; }
html.layout-small-h .pay-sym-name { font-size: 0.46rem; }
html.layout-small-h .pay-k { font-size: 0.62rem; }
html.layout-small-h .pay-v { font-size: 0.76rem; }
html.layout-small-h .pay-card-row { padding: 0 4px; }
html.layout-small-h .modal-body { padding: 10px 12px; }
html.layout-small-h .modal-header { padding: 10px 14px; font-size: 0.9rem; }
html.layout-small-h .info-section-title { font-size: 0.62rem; padding: 10px 0 6px; }
html.layout-small-h .rules-content p { font-size: 0.78rem; }
html.layout-small-h .bonus-card { padding: 12px; }
html.layout-small-h .bonus-card-name { font-size: 0.88rem; }
html.layout-small-h .bonus-card-desc { font-size: 0.68rem; }
html.layout-small-h .bonus-action-btn { font-size: 0.8rem; padding: 8px 0; }
html.layout-small-h .win-multiplier { font-size: 0.95rem; }
html.layout-small-h .modal-box, html.layout-small-h .modal-box--wide { width: 92vw; max-height: 86vh; }
html.layout-small-h .modal-body { padding: 10px 14px; }
html.layout-small-h .modal-header { padding: 8px 14px; font-size: 0.88rem; }
html.layout-small-h .bonus-cards-row { flex-direction: column; }
html.layout-small-h .replay-info-box { padding: 18px 20px 16px; gap: 10px; max-height: calc(100vh - 16px); }
html.layout-small-h .replay-info-title { font-size: 1.2rem; }
html.layout-small-h .replay-info-row   { padding: 8px 14px; }
html.layout-small-h .replay-info-label { font-size: 0.75rem; }
html.layout-small-h .replay-info-value { font-size: 0.8rem; }
html.layout-small-h .replay-info-btn   { padding: 11px 0; font-size: 0.95rem; }
html.layout-small-h .replay-info-disclaimer { font-size: 0.65rem; }

/* TINY HEIGHT (Popout S) */
html.layout-tiny-h #character-panel { display: none; }
html.layout-tiny-h .machine-top { padding: 2px 10px; min-height: 0; }
html.layout-tiny-h .machine-title { font-size: 0.65rem; letter-spacing: 0.04em; line-height: 1.1; }
html.layout-tiny-h .title-gem { display: none; }
html.layout-tiny-h .auto-indicator { font-size: 0.5rem; padding: 1px 5px; }
html.layout-tiny-h .title-logo { height: 16px; }
html.layout-tiny-h .reels-frame { padding: 0 6px 0; }
html.layout-tiny-h #slot-machine { border-width: 1px; border-radius: 8px 8px 0 0; box-sizing: border-box; }
html.layout-tiny-h .reels-inner { border-width: 2px; }
html.layout-tiny-h .machine-top { border-bottom-width: 1px; padding-top: 2px; padding-bottom: 2px; min-height: 0; }
html.layout-tiny-h #game-wrapper { width: calc(var(--reel-w) * 5 + var(--sep) * 4 + 14px); transform: none; max-height: 100vh; overflow: visible; box-sizing: border-box; }
html.layout-tiny-h #hud { padding: 1px 6px; gap: 4px; min-height: 0; border-width: 1px; border-radius: 0 0 8px 8px; box-sizing: border-box; position: relative; overflow: visible; }
html.layout-tiny-h .hud-info { padding: 1px 6px; }
html.layout-tiny-h .hud-divider { margin: 0 4px; height: 14px; }
html.layout-tiny-h .bet-btn { width: 20px; height: 13px; font-size: 0.7rem; }
html.layout-tiny-h .bet-controls { gap: 1px; }
html.layout-tiny-h .hud-btn { width: 26px; height: 22px; border-radius: 5px; }
html.layout-tiny-h .hud-left .hud-btn { width: auto; min-width: 20px; }
html.layout-tiny-h .hud-btn svg { width: 11px; height: 11px; }
html.layout-tiny-h .hud-right .hud-btn { width: 20px; height: 12px; border-radius: 3px; }
html.layout-tiny-h .hud-right .hud-btn svg { width: 8px; height: 8px; }
html.layout-tiny-h .hud-btn--bonus { position: absolute; left: -30px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; font-size: 0.9rem; padding: 0; border-width: 1px; border-radius: 8px; }
html.layout-tiny-h .hud-label { font-size: 0.44rem; letter-spacing: 0.04em; }
html.layout-tiny-h .hud-value { font-size: clamp(0.9rem, 3.8vw, 1.1rem); }
html.layout-tiny-h .spin-btn { width: 34px; height: 34px; margin: 0; }
html.layout-tiny-h .spin-btn svg { width: 13px; height: 13px; }
html.has-banner.layout-tiny-h .hud-label   { font-size: 0.28rem; letter-spacing: 0; }
html.has-banner.layout-tiny-h .hud-info    { padding: 2px 4px; }
html.has-banner.layout-tiny-h .hud-divider { margin: 0 3px; }
html.layout-tiny-h .replay-banner, html.layout-tiny-h .fs-banner { left: 0; right: 0; width: 100%; transform: none; border-radius: 0; border-left: none; border-right: none; justify-content: center; animation-name: bannerInFull; }
html.layout-tiny-h .replay-banner { padding: 3px 8px; gap: 4px 6px; flex-wrap: nowrap; font-size: 0.62rem; }
html.layout-tiny-h .replay-label { font-size: 0.5rem; padding: 1px 5px; }
html.layout-tiny-h .replay-stat  { font-size: 0.6rem; }
html.layout-tiny-h .replay-sep   { color: rgba(58,122,42,0.25); }
html.layout-tiny-h .replay-again-btn { font-size: 0.6rem; padding: 3px 8px; }
html.layout-tiny-h .fs-banner { padding: 2px 8px; gap: 6px; }
html.layout-tiny-h .fs-banner-label  { font-size: 0.5rem; letter-spacing: 0.06em; }
html.layout-tiny-h .fs-banner-count, html.layout-tiny-h .fs-banner-totalwin { font-size: 0.58rem; }
html.layout-tiny-h .win-label { font-size: 1.4rem; }
html.layout-tiny-h .win-amount { font-size: 1.2rem; }
html.layout-tiny-h .win-multiplier { font-size: 0.72rem; }
html.layout-tiny-h .modal-box, html.layout-tiny-h .modal-box--wide { width: 96vw; max-height: 82vh; }
html.layout-tiny-h .modal-body { padding: 8px 10px; }
html.layout-tiny-h .modal-header { padding: 6px 12px; font-size: 0.82rem; }
html.layout-tiny-h .bonus-cards-row { flex-direction: column; }
html.layout-tiny-h .bonus-modal-body { gap: 8px; padding: 8px 10px; }
html.layout-tiny-h .bonus-card { padding: 10px 10px; }
html.layout-tiny-h .bonus-card-name { font-size: 0.82rem; }
html.layout-tiny-h .bonus-card-desc { font-size: 0.65rem; margin-bottom: 7px; }
html.layout-tiny-h .bonus-card-costline { font-size: 0.62rem; margin-bottom: 7px; }
html.layout-tiny-h .bonus-action-btn { padding: 7px 0; font-size: 0.75rem; }
html.layout-tiny-h .bonus-bet-selector { padding: 6px 10px; }
html.layout-tiny-h .modal-box--fs-award { width: 88vw; padding: 8px 14px 10px; max-height: 96vh; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 0; }
html.layout-tiny-h .fs-award-title { font-size: 1.1rem; margin-bottom: 4px; }
html.layout-tiny-h .fs-award-count-wrap > span { font-size: 2.2rem; }
html.layout-tiny-h .fs-award-count-wrap { margin-bottom: 3px; }
html.layout-tiny-h .fs-award-btn { padding: 7px 0; font-size: 0.82rem; margin-top: 2px; }
html.layout-tiny-h .fs-award-stars { font-size: 0.85rem; margin-bottom: 3px; letter-spacing: 0.3em; }
html.layout-tiny-h .fs-award-sub { margin-bottom: 8px; font-size: 0.58rem; }
html.layout-tiny-h .fs-celeb-inner { padding: 10px 14px; min-width: 0; width: min(96vw, 300px); max-height: 96vh; overflow-y: auto; }
html.layout-tiny-h .fs-celeb-label.tier-win    { font-size: 1.4rem; }
html.layout-tiny-h .fs-celeb-label.tier-bigwin { font-size: 1.7rem; }
html.layout-tiny-h .fs-celeb-label.tier-epicwin{ font-size: 2rem; }
html.layout-tiny-h .fs-celeb-amount { font-size: 1.5rem; margin-bottom: 4px; }
html.layout-tiny-h .fs-celeb-sub { font-size: 0.52rem; margin-bottom: 10px; }
html.layout-tiny-h .fs-celeb-btn { padding: 7px 20px; font-size: 0.82rem; }
html.layout-tiny-h .splash-inner { gap: 8px; justify-content: center; }
html.layout-tiny-h #splash-logo { width: min(160px, 48vw); max-height: 28vh; object-fit: contain; }
html.layout-tiny-h .splash-bar-wrap { width: min(180px, 48vw); }
html.layout-tiny-h .splash-loading-text { font-size: 0.58rem; letter-spacing: 0.06em; }
html.layout-tiny-h .splash-loading-text.splash-tap { font-size: 0.7rem; letter-spacing: 0.22em; }
html.layout-small-h .splash-inner { gap: 16px; }
html.layout-small-h #splash-logo { width: min(280px, 60vw); max-height: 38vh; object-fit: contain; }
html.layout-small-h .splash-bar-wrap { width: min(240px, 50vw); }
html.layout-small-h .splash-loading-text { font-size: 0.68rem; }
html.layout-tiny-h .replay-info-overlay { align-items: flex-start; padding: 4px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(200,150,10,0.5) rgba(255,255,255,0.04); }
html.layout-tiny-h .replay-info-box { padding: 8px 10px 8px; gap: 5px; max-height: none; width: min(340px, 96vw); margin: auto; overflow-y: visible; }
html.layout-tiny-h .replay-info-badge { font-size: 0.52rem; padding: 2px 8px; }
html.layout-tiny-h .replay-info-title { font-size: 0.88rem; }
html.layout-tiny-h .replay-info-row   { padding: 4px 10px; }
html.layout-tiny-h .replay-info-divider { margin: 0; }
html.layout-tiny-h .replay-info-label { font-size: 0.62rem; }
html.layout-tiny-h .replay-info-value { font-size: 0.66rem; }
html.layout-tiny-h .replay-info-btn   { padding: 7px 0; font-size: 0.78rem; border-radius: 10px; }
html.layout-tiny-h .replay-info-disclaimer { font-size: 0.52rem; margin: 0; }

html.layout-tiny-h body {
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
    overflow: hidden;
}
html.layout-tiny-h #game-wrapper {
    max-height: 100vh;
    overflow: visible;
} gap: 6px; grid-template-columns: repeat(2, 1fr); }
html.layout-tiny-h .pay-card { padding: 8px 4px 6px; gap: 4px; border-radius: 8px; border-width: 1px; }
html.layout-tiny-h .pay-card img { width: 44px; height: 44px; }
html.layout-tiny-h .pay-card--special img { width: 44px; height: 44px; }
html.layout-tiny-h .pay-sym-name { font-size: 0.38rem; min-height: 1.2em; }
html.layout-tiny-h .pay-k { font-size: 0.52rem; }
html.layout-tiny-h .pay-v { font-size: 0.64rem; }
html.layout-tiny-h .pay-card-row { padding: 0 2px; }
html.layout-tiny-h .pay-card-rows { gap: 1px; }
html.layout-tiny-h .pay-card--special { padding: 8px 6px 6px; gap: 4px; }
html.layout-tiny-h .pay-card--special .pay-special-title { font-size: 0.6rem; }
html.layout-tiny-h .pay-card--special .pay-special-desc { font-size: 0.52rem; }

/* ─── LOGO PANEL (right of reels) ──────────── */
#logo-panel {
    position: fixed;
    /*
      game-wrapper is centred + shifted 40px right:
        centre = 50vw + 40px
        half-width = (reel*5 + sep*4 + 32px) / 2
        right-edge = 50vw + 40px + half-width
      Logo panel fills everything from that edge to the right viewport edge.
    */
    left: calc(50vw + 40px + (var(--reel-w) * 5 + var(--sep) * 4 + 32px) / 2);
    right: 0;
    top: 50%; transform: translateY(-50%);
    height: calc(var(--reel-h) * 4 + 210px);
    min-width: 80px;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; z-index: 5;
    overflow: hidden;
}
#logo-img {
    width: min(190px, calc(100% - 8px)); height: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(240,194,48,0.6))
            drop-shadow(0 0 50px rgba(58,122,42,0.4));
    animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
    0%,100% { filter: drop-shadow(0 0 20px rgba(240,194,48,0.5)) drop-shadow(0 0 50px rgba(58,122,42,0.3)); }
    50%      { filter: drop-shadow(0 0 35px rgba(240,194,48,0.8)) drop-shadow(0 0 70px rgba(58,122,42,0.6)); }
}

/* Hide on portrait and tiny */
html.layout-tiny-h #logo-panel,
html.layout-portrait #logo-panel { display: none; }

/* layout-large (laptop/desktop): game-wrapper still has translateX(40px)
   Same formula as default — just adjust height */
html.layout-large #logo-panel {
    height: min(calc((100vh - 60px) * 0.75), 630px);
}

/* layout-small-h (Popout L, vh < 500): very little side space
   game-wrapper width is smaller (var from layout-small-h rule).
   Recalculate left, shrink logo. */
html.layout-small-h #logo-panel {
    left: calc(50vw + 40px + (var(--reel-w) * 5 + var(--sep) * 4 + 20px) / 2);
    height: calc((var(--reel-h) * 4 + 210px) * 0.85);
    min-width: 60px;
}
html.layout-small-h #logo-img {
    width: min(110px, calc(100% - 4px));
}

/* Hide logo if panel has no room (< 70px) */
@media (max-width: 700px) {
    html:not(.layout-portrait) #logo-panel { display: none; }
}
