/* ========================================================
   SlotHub — SevinHub Dark Theme
   ======================================================== */

:root {
    --bg-primary:       #070B14;
    --bg-secondary:     #0D1117;
    --bg-surface:       #141720;
    --bg-card:          #1A1F2E;
    --bg-elevated:      #202535;
    --brand-purple:     #7C5CFC;
    --brand-purple-l:   #9B7FFF;
    --brand-purple-d:   #5B3FD8;
    --brand-gold:       #F5B800;
    --brand-gold-l:     #FFD000;
    --brand-gold-d:     #C99A00;
    --success:          #22C55E;
    --danger:           #EF4444;
    --warning:          #F59E0B;
    --info:             #38BDF8;
    --text-primary:     #FFFFFF;
    --text-secondary:   #94A3B8;
    --text-muted:       #64748B;
    --border:           #1E2435;
    --border-bright:    #2A3247;
    --glow-purple:      rgba(124,92,252,0.35);
    --glow-gold:        rgba(245,184,0,0.35);
    --glow-success:     rgba(34,197,94,0.35);
    --reel-h:           110px;
    --symbol-h:         110px;
    --radius:           14px;
    --radius-sm:        8px;
    --trans:            0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--brand-purple-l); text-decoration: none; }
a:hover { color: var(--brand-gold); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-purple-d); }

/* ==============================
   HEADER
   ============================== */
.app-header {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px;
    height: 64px;
    background: rgba(13,17,23,0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.header-left { display: flex; align-items: center; flex-shrink: 0; }
.header-center { flex: 1; overflow: hidden; min-width: 0; }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-icon { font-size: 1.6rem; }
.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem; font-weight: 700;
    background: linear-gradient(135deg, var(--brand-purple-l), var(--brand-gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.jackpot-ticker {
    display: flex; gap: 24px; overflow: hidden;
    white-space: nowrap;
}
.jp-item { display: flex; align-items: center; gap: 6px; }
.jp-game { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.jp-amount {
    font-size: 0.875rem; font-weight: 700;
    color: var(--brand-gold);
    text-shadow: 0 0 12px var(--glow-gold);
    animation: goldPulse 3s ease-in-out infinite;
}

@keyframes goldPulse {
    0%, 100% { text-shadow: 0 0 8px var(--glow-gold); }
    50% { text-shadow: 0 0 20px rgba(245,184,0,0.6), 0 0 40px rgba(245,184,0,0.2); }
}

.balance-display {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: 24px;
}
.balance-icon { font-size: 1rem; }
.balance-amount { font-weight: 700; font-size: 0.95rem; color: var(--brand-gold); }

.user-menu { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: var(--trans);
}
.user-btn:hover { border-color: var(--brand-purple); background: var(--bg-elevated); }
.user-avatar {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-gold));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem;
}
.user-name { font-size: 0.85rem; font-weight: 600; }
.user-level {
    font-size: 0.7rem; color: var(--brand-gold);
    background: rgba(245,184,0,0.12); padding: 2px 6px; border-radius: 10px;
}
.user-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-sm);
    padding: 6px;
    display: none; flex-direction: column; gap: 2px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 200;
}
.user-dropdown.open { display: flex; }
.user-dropdown a {
    padding: 8px 12px; border-radius: 6px;
    color: var(--text-secondary); font-size: 0.875rem;
    transition: var(--trans);
    display: block;
}
.user-dropdown a:hover { background: var(--bg-elevated); color: var(--text-primary); }
.user-dropdown .text-danger { color: var(--danger); }

/* ==============================
   WIN TICKER
   ============================== */
.win-ticker {
    background: linear-gradient(90deg, var(--bg-secondary), var(--bg-surface), var(--bg-secondary));
    border-bottom: 1px solid var(--border);
    overflow: hidden; height: 34px;
    display: flex; align-items: center;
}
.win-ticker-inner {
    display: flex; gap: 48px;
    white-space: nowrap;
    animation: tickerScroll 30s linear infinite;
    will-change: transform;
}
.wt-item { font-size: 0.8rem; color: var(--text-secondary); }
.wt-item strong { color: var(--brand-gold); }

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==============================
   LAYOUT
   ============================== */
.app-layout {
    display: flex;
    min-height: calc(100vh - 98px);
}

/* ---- Sidebar ---- */
.app-sidebar {
    width: 240px; flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 16px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 20px;
}
.sidebar-title {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted); margin-bottom: 10px;
}
.game-select-btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 0.85rem;
    transition: var(--trans); margin-bottom: 6px;
    text-align: left;
}
.game-select-btn:hover, .game-select-btn.active {
    background: var(--bg-elevated); border-color: var(--brand-purple);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--glow-purple);
}
.gs-icon { font-size: 1.2rem; }
.gs-info { flex: 1; display: flex; flex-direction: column; }
.gs-name { font-weight: 600; }
.gs-rtp { font-size: 0.7rem; color: var(--text-muted); }
.gs-badge {
    font-size: 0.6rem; font-weight: 700; padding: 2px 6px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-hot { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-new { background: rgba(34,197,94,0.15); color: var(--success); }

.win-feed-list { display: flex; flex-direction: column; gap: 8px; }
.wf-entry {
    display: flex; align-items: center; gap: 8px;
    padding: 8px; background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.wf-avatar {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--brand-purple-d), var(--brand-purple));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
}
.wf-info { flex: 1; min-width: 0; }
.wf-user { font-size: 0.8rem; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-game { font-size: 0.68rem; color: var(--text-muted); }
.wf-win { font-size: 0.8rem; font-weight: 700; color: var(--success); white-space: nowrap; }

/* ---- Main ---- */
.app-main {
    flex: 1; min-width: 0;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 24px 16px;
    background: var(--bg-primary);
}
.game-container {
    width: 100%; max-width: 560px;
    display: flex; flex-direction: column; gap: 16px;
}
.game-header {
    display: flex; align-items: center; justify-content: space-between;
}
.game-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem; font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.game-actions { display: flex; gap: 8px; }
.icon-btn {
    width: 36px; height: 36px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem; transition: var(--trans);
}
.icon-btn:hover { background: var(--bg-elevated); border-color: var(--border-bright); }

/* Fortune Bar */
.fortune-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(124,92,252,0.1), rgba(245,184,0,0.05));
    border: 1px solid rgba(124,92,252,0.3);
    border-radius: var(--radius-sm);
    animation: fadeSlideDown 0.4s ease;
}
.fortune-icon { font-size: 1.2rem; flex-shrink: 0; }
.fortune-text { flex: 1; font-size: 0.85rem; color: var(--text-secondary); font-style: italic; }
.fortune-close { color: var(--text-muted); font-size: 0.9rem; padding: 4px 8px; }
.fortune-close:hover { color: var(--text-primary); }

/* ==============================
   SLOT MACHINE
   ============================== */
.slot-machine {
    position: relative;
    user-select: none; -webkit-user-select: none;
}
.slot-frame {
    position: relative;
    background: linear-gradient(160deg, #1A1F30, #0F1320);
    border: 2px solid var(--border-bright);
    border-radius: 20px;
    padding: 20px;
    box-shadow:
        0 0 0 1px rgba(124,92,252,0.08),
        0 16px 48px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
    overflow: hidden;
}

/* Slot lights */
.slot-lights {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; justify-content: space-around;
    padding: 8px 20px;
    pointer-events: none;
}
.light {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand-gold);
    opacity: 0.4;
    animation: lightFlicker 2s ease-in-out infinite;
}
.light:nth-child(odd) { animation-delay: 0.5s; }
.light:nth-child(3n) { background: var(--brand-purple-l); animation-delay: 1s; }
.light:nth-child(4n) { background: var(--danger); animation-delay: 1.5s; }

@keyframes lightFlicker {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.9; box-shadow: 0 0 6px currentColor; }
}

.reels-container {
    display: flex; align-items: stretch; gap: 0;
    background: #0A0D16;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.04);
    position: relative; z-index: 1;
    margin-top: 24px;
}

.reel-separator {
    width: 2px; background: linear-gradient(to bottom, transparent, var(--border), transparent);
    flex-shrink: 0;
}

.reel-wrapper {
    flex: 1; position: relative;
    height: calc(var(--symbol-h) * 3);
    overflow: hidden;
}

/* Top and bottom fade */
.reel-wrapper::before, .reel-wrapper::after {
    content: ''; position: absolute; left: 0; right: 0; z-index: 10; pointer-events: none;
}
.reel-wrapper::before {
    top: 0; height: 40px;
    background: linear-gradient(to bottom, rgba(10,13,22,0.95), transparent);
}
.reel-wrapper::after {
    bottom: 0; height: 40px;
    background: linear-gradient(to top, rgba(10,13,22,0.95), transparent);
}

.reel-inner {
    width: 100%; height: 100%;
    overflow: hidden; position: relative;
}

.reel-strip {
    display: flex; flex-direction: column;
    will-change: transform;
    /* No transition by default — set dynamically */
}

.symbol-cell {
    height: var(--symbol-h);
    min-height: var(--symbol-h);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; cursor: default;
    /* background, border-radius, overflow set in V2 block below */
}

/* Win line highlight */
.reel-shine {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 5;
    background: linear-gradient(100deg, rgba(255,255,255,0.03) 0%, transparent 60%);
}

/* Active payline highlight */
.payline-lines { position: absolute; left: 12px; right: 12px; top: 44px; z-index: 15; pointer-events: none; }
.pl {
    position: absolute; left: 0; right: 0;
    height: 2px; border-radius: 1px;
    opacity: 0; transition: opacity 0.3s;
}
.pl-top { top: calc(var(--symbol-h) * 0.5 - 1px); background: rgba(34,197,94,0.6); }
.pl-mid { top: calc(var(--symbol-h) * 1.5 - 1px); background: rgba(245,184,0,0.6); }
.pl-bot { top: calc(var(--symbol-h) * 2.5 - 1px); background: rgba(124,92,252,0.6); }
.pl.active { opacity: 1; box-shadow: 0 0 8px currentColor; }

/* ==============================
   WIN DISPLAY
   ============================== */
.win-display {
    text-align: center; padding: 16px 20px;
    background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(245,184,0,0.06));
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: var(--radius);
    animation: fadeSlideDown 0.3s ease;
}
.win-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; color: var(--success); text-transform: uppercase; }
.win-amount { font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--brand-gold); }
.win-multiplier { font-size: 0.9rem; color: var(--text-secondary); margin-top: 2px; }

.free-spins-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(124,92,252,0.1), rgba(124,92,252,0.05));
    border: 1px solid rgba(124,92,252,0.3);
    border-radius: var(--radius-sm);
    font-size: 0.875rem; color: var(--text-secondary);
}
.free-spins-bar strong { color: var(--brand-purple-l); font-size: 1.1rem; }
.fs-icon { font-size: 1.1rem; }

/* ==============================
   BET CONTROLS
   ============================== */
.bet-controls {
    padding: 16px; background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.bet-row {
    display: flex; align-items: center; gap: 16px;
}
.bet-group { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bet-group-right { align-items: flex-end; }
.bet-label {
    font-size: 0.65rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.1em;
}
.bet-adjuster {
    display: flex; align-items: center; gap: 0;
    background: var(--bg-secondary); border: 1px solid var(--border-bright);
    border-radius: var(--radius-sm); overflow: hidden;
}
.bet-adj-btn {
    padding: 8px 14px; font-size: 1.1rem; font-weight: 700;
    color: var(--text-secondary); transition: var(--trans);
}
.bet-adj-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.bet-input {
    width: 72px; text-align: center;
    background: transparent; border: none; outline: none;
    color: var(--text-primary); font-weight: 700; font-size: 0.95rem;
    padding: 8px 4px;
}
.bet-presets { display: flex; gap: 4px; flex-wrap: wrap; }
.preset-btn {
    padding: 4px 8px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 6px; font-size: 0.72rem; color: var(--text-muted);
    transition: var(--trans);
}
.preset-btn:hover { border-color: var(--brand-purple); color: var(--brand-purple-l); background: rgba(124,92,252,0.06); }
.preset-btn[data-bet="max"] { border-color: rgba(245,184,0,0.3); color: var(--brand-gold); }

.spin-group { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.spin-btn {
    position: relative;
    width: 88px; height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-d));
    box-shadow: 0 0 0 3px rgba(124,92,252,0.2), 0 8px 24px rgba(124,92,252,0.3);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.spin-btn:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: 0 0 0 4px rgba(124,92,252,0.35), 0 12px 32px rgba(124,92,252,0.4);
}
.spin-btn:active:not(:disabled) { transform: scale(0.96); }
.spin-btn:disabled {
    background: linear-gradient(135deg, #3a3a5c, #2a2a45);
    box-shadow: none; cursor: not-allowed;
}
.spin-btn-icon { font-size: 1.4rem; color: #fff; }
.spin-btn-text { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em; color: rgba(255,255,255,0.85); }
.spin-btn.idle-pulse { animation: idlePulse 2.5s ease-in-out infinite; }
@keyframes idlePulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(124,92,252,0.2), 0 8px 24px rgba(124,92,252,0.3); }
    50%       { box-shadow: 0 0 0 6px rgba(124,92,252,0.1), 0 8px 32px rgba(124,92,252,0.45); }
}
/* When spinning: button turns red pulsing STOP state */
.spin-btn.is-spinning {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    box-shadow: 0 0 0 4px rgba(220,38,38,0.25), 0 8px 24px rgba(220,38,38,0.4) !important;
    animation: stopPulse 0.9s ease-in-out infinite !important;
}
@keyframes stopPulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(220,38,38,0.2), 0 8px 24px rgba(220,38,38,0.35); }
    50%      { box-shadow: 0 0 0 10px rgba(220,38,38,0.08), 0 8px 32px rgba(220,38,38,0.5); }
}
.spin-btn.spinning { animation: spinnerRotate 0.6s linear infinite; background: linear-gradient(135deg, var(--brand-purple-d), var(--brand-purple)); }
@keyframes spinnerRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.lines-display {
    font-size: 1.5rem; font-weight: 800; color: var(--text-secondary); text-align: center;
}

/* ==============================
   BUTTONS
   ============================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.875rem;
    border: 1px solid transparent;
    transition: var(--trans); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.btn-primary {
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-d));
    color: #fff; border-color: transparent;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-purple-l), var(--brand-purple)); box-shadow: 0 4px 16px var(--glow-purple); }
.btn-gold {
    background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-d));
    color: #000; font-weight: 700;
}
.btn-gold:hover { box-shadow: 0 4px 16px var(--glow-gold); filter: brightness(1.1); }
.btn-ghost {
    background: transparent; color: var(--text-secondary);
    border-color: var(--border-bright);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--brand-purple); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* ==============================
   BIG WIN / JACKPOT OVERLAY
   ============================== */
.big-win-overlay, .jackpot-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(7,11,20,0.92);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}
.bwo-inner, .jpo-inner {
    position: relative;
    text-align: center; padding: 48px 40px;
    background: linear-gradient(160deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border-bright);
    border-radius: 24px; max-width: 480px; width: 90%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,92,252,0.15);
    animation: bwoAppear 0.5s cubic-bezier(0.2,0.8,0.3,1.2);
}
@keyframes bwoAppear {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.bwo-badge {
    display: inline-block; padding: 6px 20px;
    background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-d));
    color: #000; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.2em;
    border-radius: 20px; margin-bottom: 16px;
}
.bwo-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem; font-weight: 900;
    color: var(--brand-gold);
    text-shadow: 0 0 40px var(--glow-gold);
    animation: countUp 0.8s ease;
    line-height: 1;
}
.bwo-multiplier { font-size: 1.2rem; color: var(--text-secondary); margin: 8px 0; }
.bwo-ai-msg {
    font-size: 0.9rem; color: var(--text-secondary); font-style: italic;
    margin: 16px 0; min-height: 40px;
}
.bwo-close { margin-top: 20px; padding: 12px 40px; }
.bwo-particles {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 24px;
}

/* Jackpot specific */
.jpo-emoji { font-size: 3rem; margin-bottom: 8px; animation: jackpotBounce 0.5s ease infinite alternate; }
.jpo-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem; font-weight: 900; color: var(--brand-gold);
    text-shadow: 0 0 40px var(--glow-gold);
    letter-spacing: 0.08em; margin-bottom: 16px;
}
.jpo-amount {
    font-size: 3rem; font-weight: 800; color: var(--text-primary); margin-bottom: 24px;
}
@keyframes jackpotBounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-8px); }
}

/* ==============================
   PAYTABLE MODAL
   ============================== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(7,11,20,0.85);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.modal-card {
    width: 100%; max-width: 500px; max-height: 80vh; overflow-y: auto;
    background: var(--bg-card); border: 1px solid var(--border-bright);
    border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0;
    background: var(--bg-card);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-elevated); color: var(--text-secondary);
    font-size: 0.9rem; transition: var(--trans);
}
.modal-close:hover { background: rgba(239,68,68,0.15); color: var(--danger); }
.modal-body { padding: 20px 24px; }

.paytable { width: 100%; border-collapse: collapse; }
.paytable th {
    text-align: left; padding: 8px 12px;
    font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
}
.paytable td {
    padding: 10px 12px; border-bottom: 1px solid rgba(30,36,53,0.5);
    font-size: 0.875rem; color: var(--text-secondary);
}
.paytable tr:last-child td { border-bottom: none; }
.sym-cell { font-size: 1.4rem; text-align: center !important; }
.pt-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 16px; text-align: center; }

/* ==============================
   ACHIEVEMENT TOAST
   ============================== */
.achievement-toast {
    position: fixed; bottom: 80px; right: 20px; z-index: 800;
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
    border: 1px solid rgba(245,184,0,0.4);
    border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    max-width: 300px;
    animation: slideInRight 0.4s cubic-bezier(0.2,0.8,0.3,1.2);
}
.at-icon { font-size: 1.8rem; }
.at-title { font-size: 0.68rem; font-weight: 700; color: var(--brand-gold); text-transform: uppercase; letter-spacing: 0.1em; }
.at-name { font-size: 0.875rem; font-weight: 600; margin-top: 2px; }

/* ==============================
   AI WIDGET
   ============================== */
.ai-widget {
    position: fixed; bottom: 160px; right: 16px; z-index: 700;
    touch-action: none; user-select: none;
}
.ai-fab {
    position: relative;
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-d));
    box-shadow: 0 4px 20px var(--glow-purple);
    font-size: 1.4rem; transition: transform 0.2s;
}
.ai-fab:hover { transform: scale(1.1); }
.ai-fab-badge {
    position: absolute; top: -2px; right: -2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--danger); font-size: 0.6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-primary);
}
.ai-panel {
    position: absolute; bottom: 64px; right: 0;
    width: 300px; background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    display: flex; flex-direction: column;
    animation: slideInRight 0.3s ease;
    overflow: hidden;
}
.ai-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(124,92,252,0.1), rgba(124,92,252,0.03));
    border-bottom: 1px solid var(--border);
    font-weight: 600; font-size: 0.875rem;
}
.ai-panel-close { color: var(--text-muted); padding: 2px 6px; }
.ai-panel-close:hover { color: var(--danger); }
.ai-messages {
    flex: 1; overflow-y: auto; padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
    max-height: 280px; min-height: 120px;
}
.ai-msg { max-width: 85%; }
.ai-msg-bot { align-self: flex-start; }
.ai-msg-user { align-self: flex-end; }
.ai-msg-text {
    padding: 8px 12px; border-radius: 12px;
    font-size: 0.82rem; line-height: 1.5;
}
.ai-msg-bot .ai-msg-text {
    background: var(--bg-elevated);
    border-bottom-left-radius: 4px;
    color: var(--text-secondary);
}
.ai-msg-user .ai-msg-text {
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-d));
    border-bottom-right-radius: 4px; color: #fff;
}
.ai-msg-typing .ai-msg-text::after {
    content: '●●●'; animation: typingDots 1s infinite;
    color: var(--text-muted); letter-spacing: 4px;
}
@keyframes typingDots {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}
.ai-input-row {
    display: flex; gap: 8px; padding: 10px 12px;
    border-top: 1px solid var(--border);
}
.ai-input {
    flex: 1; padding: 8px 12px;
    background: var(--bg-secondary); border: 1px solid var(--border-bright);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 0.82rem; outline: none;
    transition: border-color 0.2s;
}
.ai-input:focus { border-color: var(--brand-purple); }
.ai-send {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--brand-purple); color: #fff; font-size: 0.9rem;
    transition: var(--trans);
}
.ai-send:hover { background: var(--brand-purple-l); }

/* ==============================
   AUTH PAGES
   ============================== */
.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; position: relative; overflow: hidden;
}
.auth-bg-glow {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 60% 40% at 20% 50%, rgba(124,92,252,0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 50%, rgba(245,184,0,0.05) 0%, transparent 70%);
}
.auth-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 400px;
    background: var(--bg-card); border: 1px solid var(--border-bright);
    border-radius: 20px; padding: 36px 32px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,92,252,0.08);
}
.auth-logo {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 28px;
}
.auth-logo .logo-icon { font-size: 2rem; }
.auth-logo .logo-text { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; font-weight: 700; background: linear-gradient(135deg, var(--brand-purple-l), var(--brand-gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-title { font-size: 1.4rem; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.form-input {
    padding: 11px 14px;
    background: var(--bg-secondary); border: 1px solid var(--border-bright);
    border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.9rem;
    outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--brand-purple); box-shadow: 0 0 0 3px rgba(124,92,252,0.1); }
.auth-error {
    padding: 10px 14px; background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3); border-radius: var(--radius-sm);
    color: var(--danger); font-size: 0.85rem;
}
.auth-switch { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 0.85rem; }

/* ==============================
   ADMIN SHARED
   ============================== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; flex-shrink: 0;
    background: var(--bg-secondary); border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    padding: 20px 0;
}
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.admin-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
    transition: var(--trans);
}
.admin-nav a:hover, .admin-nav a.active {
    background: var(--bg-elevated); color: var(--text-primary);
}
.admin-nav a.active { border-left: 3px solid var(--brand-purple); padding-left: 9px; }
.admin-content { flex: 1; min-width: 0; padding: 28px; overflow-y: auto; }
.admin-header { margin-bottom: 24px; }
.admin-header h1 { font-size: 1.4rem; font-weight: 700; }
.admin-header p { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.stat-value { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-trend { font-size: 0.78rem; color: var(--success); margin-top: 4px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 0.95rem; font-weight: 600; }
.card-body { padding: 20px; }
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th { padding: 10px 16px; text-align: left; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data-table td { padding: 12px 16px; border-bottom: 1px solid rgba(30,36,53,0.5); font-size: 0.875rem; color: var(--text-secondary); }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.badge-success { background: rgba(34,197,94,0.12); color: var(--success); }
.badge-danger  { background: rgba(239,68,68,0.12); color: var(--danger); }
.badge-warning { background: rgba(245,159,11,0.12); color: var(--warning); }
.badge-purple  { background: rgba(124,92,252,0.12); color: var(--brand-purple-l); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.form-control {
    padding: 10px 14px;
    background: var(--bg-secondary); border: 1px solid var(--border-bright);
    border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.875rem;
    outline: none; transition: border-color 0.2s; width: 100%;
}
.form-control:focus { border-color: var(--brand-purple); }
select.form-control { cursor: pointer; }
.form-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; margin-bottom: 16px; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: var(--success); }
.alert-danger  { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: var(--danger); }
.toggle-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    width: 40px; height: 22px; background: var(--border-bright);
    border-radius: 11px; transition: 0.3s; position: relative;
}
.toggle-slider::after {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 16px; height: 16px; background: #fff; border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--brand-purple); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(18px); }

/* ==============================
   ANIMATIONS & UTILITIES
   ============================== */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes countUp { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.loading-shimmer {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
    background-size: 400px 100%;
    animation: shimmer 1.5s infinite;
}
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-gold    { color: var(--brand-gold); }
.text-purple  { color: var(--brand-purple-l); }
.text-muted   { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ==============================
   MOBILE RESPONSIVE — GAME
   ============================== */
@media (max-width: 900px) {
    .app-sidebar { display: none; }
    .app-sidebar.open { display: flex; position: fixed; inset-y: 0; left: 0; z-index: 300; width: 260px; box-shadow: 8px 0 32px rgba(0,0,0,0.5); }
}
@media (max-width: 600px) {
    :root { --symbol-h: 90px; --reel-h: 90px; }
    .app-header { padding: 0 12px; gap: 8px; height: 56px; }
    .jackpot-ticker { display: none; }
    .logo-text { font-size: 1rem; }
    .balance-amount { font-size: 0.85rem; }
    .user-name { display: none; }
    .app-main { padding: 12px 10px; }
    .game-container { gap: 12px; }
    .slot-frame { padding: 14px 10px; }
    .bet-row { flex-direction: column; align-items: center; gap: 12px; }
    .bet-group { width: 100%; }
    .bet-group-right { align-items: flex-start; }
    .spin-group { flex-direction: row; justify-content: center; align-items: center; gap: 16px; }
    .spin-btn { width: 76px; height: 76px; }
    .bwo-amount { font-size: 2.5rem; }
    .auth-card { padding: 28px 20px; }
    .ai-panel { width: 280px; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
    :root { --symbol-h: 80px; }
    .symbol-cell { font-size: 2.2rem; }
    .spin-btn { width: 68px; height: 68px; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* ==============================
   ADMIN PANEL — MOBILE RESPONSIVE
   ============================== */

/* Mobile top bar (hamburger + title) — hidden on desktop */
.admin-mobile-bar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 56px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}
.admin-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: background 0.15s;
}
.admin-hamburger:hover { background: var(--bg-secondary); }
.admin-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.admin-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.admin-hamburger.open span:nth-child(2) { opacity: 0; }
.admin-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.admin-mobile-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
}

/* Sidebar overlay (backdrop) */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    z-index: 299;
    opacity: 0;
    transition: opacity 0.25s;
}
.admin-sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

/* Chart grid — use a real class so we can override it responsively */
.admin-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

/* Hooks/plugins grid */
.admin-hooks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 820px) {
    /* Show mobile top bar, hide sidebar by default */
    .admin-mobile-bar { display: flex; }

    /* Admin layout: single column, sidebar slides in as overlay */
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 300;
        width: 260px !important;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
        box-shadow: none;
    }
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0,0,0,0.55);
    }

    /* Content takes full width */
    .admin-content {
        padding: 16px;
        min-height: calc(100vh - 56px);
    }

    /* Stack charts vertically */
    .admin-chart-grid {
        grid-template-columns: 1fr;
    }

    /* Hooks reference */
    .admin-hooks-grid {
        grid-template-columns: 1fr;
    }

    /* Stats grid — 2 cols on tablet */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Table: horizontal scroll + smaller text */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table {
        font-size: 0.8rem;
        min-width: 520px;
    }
    .data-table th,
    .data-table td {
        padding: 10px 10px;
    }

    /* Forms */
    .form-row { grid-template-columns: 1fr; }

    /* Cards */
    .card { border-radius: 12px; }
    .card-header { flex-wrap: wrap; gap: 8px; }

    /* Buttons */
    .btn { min-height: 40px; padding: 10px 16px; }
}

@media (max-width: 480px) {
    .admin-content { padding: 12px; }
    .admin-header { padding-bottom: 12px; margin-bottom: 12px; }
    .admin-header h1 { font-size: 1.3rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px 12px; }
    .stat-value { font-size: 1.4rem; }

    /* Plugin table — hide less-important cols on very small screens */
    .data-table .hide-xs { display: none; }
}

/* ================================================================
   PLUGIN SETTINGS PAGE — RESPONSIVE LAYOUT
   ================================================================ */

/* Outer wrapper: sidebar + content side by side */
.ps-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Tab sidebar */
.ps-tabs {
    width: 220px;
    flex-shrink: 0;
}
.ps-tabs-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.ps-tab-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}
.ps-tab-link:last-child { border-bottom: none; }
.ps-tab-link.active {
    background: var(--bg-elevated);
    border-left-color: var(--brand-purple);
}
.ps-tab-icon { font-size: 1.2rem; flex-shrink: 0; }
.ps-tab-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ps-tab-status {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Main content area */
.ps-content { flex: 1; min-width: 0; }

/* Stat boxes inside plugin panels */
.ps-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}
.ps-stat-box {
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    text-align: center;
}
.ps-stat-val {
    font-size: 1.3rem;
    font-weight: 800;
    display: block;
    margin-bottom: 4px;
}
.ps-stat-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
}

/* Mobile: stack tabs above content, make tabs a horizontal scroll row */
@media (max-width: 820px) {
    .ps-layout {
        flex-direction: column;
        gap: 0;
    }
    .ps-tabs {
        width: 100%;
        margin-bottom: 16px;
    }
    .ps-tabs-inner {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
        scrollbar-width: none;
        gap: 0;
    }
    .ps-tabs-inner::-webkit-scrollbar { display: none; }
    .ps-tab-link {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 10px 14px;
        border-bottom: none;
        border-left: none;
        border-bottom: 3px solid transparent;
        flex-shrink: 0;
        min-width: 72px;
        text-align: center;
    }
    .ps-tab-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--brand-purple);
        background: var(--bg-elevated);
    }
    .ps-tab-icon { font-size: 1.4rem; }
    .ps-tab-label { font-size: 0.68rem; }
    .ps-tab-status { display: none; }
    .ps-content { width: 100%; }
}

/* Plugin widget cards on dashboard */
.admin-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.admin-widget .widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-widget .widget-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.admin-widget .widget-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.admin-widget .widget-stat .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.admin-widget .widget-stat .stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================================================
   V2 SYMBOL CELLS — styled backgrounds per symbol
   ================================================================ */
.symbol-cell {
    background: var(--sym-bg, var(--bg-elevated));
    border-radius: 10px;
    margin: 0 4px;          /* NO vertical margin — keeps JS symH calculation exact */
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

/* Emoji bigger, label smaller */
.sym-emoji  { font-size: 3rem; line-height: 1; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.sym-label  { font-size: 0.52rem; font-weight: 700; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.06em; display: block; }

/* Inner shimmer on all cells */
.symbol-cell::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 60%);
    border-radius: 10px;
    pointer-events: none;
}

/* Spin blur */
.cell-spinning { filter: blur(2.5px) brightness(1.15); }

/* Winner glow pulse */
.symbol-cell.winner {
    box-shadow: 0 0 22px var(--sym-glow), 0 0 6px var(--sym-glow), inset 0 0 18px rgba(255,255,255,0.06);
    animation: symPulse 0.55s ease-in-out infinite alternate;
    z-index: 3;
}
@keyframes symPulse {
    from { transform: scale(1);    filter: brightness(1); }
    to   { transform: scale(1.07); filter: brightness(1.35); }
}

/* Reel flash on stop */
.reel-inner.reel-flash::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    animation: reelFlash 0.18s ease-out forwards;
    pointer-events: none;
    z-index: 20;
}
@keyframes reelFlash {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ================================================================
   V2 GAME THEMES — machine frame + background per game
   ================================================================ */

/* Theme CSS variables */
:root {
    --game-accent: #F5B800;
}

/* ---- Classic / Fortune Wheel ---- */
.slot-machine.theme-classic .slot-frame {
    background: linear-gradient(160deg, #1f0f0a, #0f0809);
    border-color: #8B6914;
    box-shadow:
        0 0 0 1px rgba(245,184,0,0.15),
        0 0 60px rgba(245,184,0,0.08),
        0 20px 60px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(245,184,0,0.12);
}
.slot-machine.theme-classic .slot-lights .light { background: #F5B800; }
.slot-machine.theme-classic .slot-lights .light:nth-child(odd) { background: #ff4444; }
.slot-machine.theme-classic .slot-lights .light:nth-child(3n) { background: #F5B800; }
.slot-machine.theme-classic .reels-container {
    background: #0d0606;
    border: 1px solid rgba(139,105,20,0.35);
}
.slot-machine.theme-classic .reel-separator {
    background: linear-gradient(to bottom, transparent, rgba(139,105,20,0.6), transparent);
}
.slot-machine.theme-classic .reel-wrapper::before {
    background: linear-gradient(to bottom, rgba(13,6,6,0.97), transparent);
}
.slot-machine.theme-classic .reel-wrapper::after {
    background: linear-gradient(to top, rgba(13,6,6,0.97), transparent);
}

/* ---- Phoenix / Mystic Phoenix ---- */
.slot-machine.theme-phoenix .slot-frame {
    background: linear-gradient(160deg, #1a0800, #0a0400);
    border-color: #cc3300;
    box-shadow:
        0 0 0 1px rgba(255,69,0,0.2),
        0 0 80px rgba(255,69,0,0.12),
        0 20px 60px rgba(0,0,0,0.65),
        inset 0 1px 0 rgba(255,100,0,0.15);
}
.slot-machine.theme-phoenix .slot-lights .light        { background: #ff6b35; }
.slot-machine.theme-phoenix .slot-lights .light:nth-child(odd) { background: #fde047; }
.slot-machine.theme-phoenix .slot-lights .light:nth-child(3n) { background: #e879f9; }
.slot-machine.theme-phoenix .reels-container {
    background: #0a0300;
    border: 1px solid rgba(204,51,0,0.4);
}
.slot-machine.theme-phoenix .reel-separator {
    background: linear-gradient(to bottom, transparent, rgba(255,80,0,0.5), transparent);
}
.slot-machine.theme-phoenix .reel-wrapper::before {
    background: linear-gradient(to bottom, rgba(10,3,0,0.97), transparent);
}
.slot-machine.theme-phoenix .reel-wrapper::after {
    background: linear-gradient(to top, rgba(10,3,0,0.97), transparent);
}

/* Ember particles on phoenix theme */
.game-theme-phoenix .slot-machine::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255,80,0,0.08), transparent),
        radial-gradient(ellipse 80% 30% at 50% 0%, rgba(255,140,0,0.04), transparent);
    pointer-events: none; border-radius: 20px; z-index: 0;
}

/* ---- Dragon / Golden Dragon ---- */
.slot-machine.theme-dragon .slot-frame {
    background: linear-gradient(160deg, #051a08, #020d04);
    border-color: #8B7000;
    box-shadow:
        0 0 0 1px rgba(255,215,0,0.15),
        0 0 60px rgba(255,215,0,0.08),
        0 20px 60px rgba(0,0,0,0.65),
        inset 0 1px 0 rgba(255,215,0,0.12);
}
.slot-machine.theme-dragon .slot-lights .light        { background: #FFD700; }
.slot-machine.theme-dragon .slot-lights .light:nth-child(odd) { background: #f44336; }
.slot-machine.theme-dragon .slot-lights .light:nth-child(3n) { background: #4ade80; }
.slot-machine.theme-dragon .reels-container {
    background: #030f05;
    border: 1px solid rgba(139,112,0,0.4);
}
.slot-machine.theme-dragon .reel-separator {
    background: linear-gradient(to bottom, transparent, rgba(255,215,0,0.5), transparent);
}
.slot-machine.theme-dragon .reel-wrapper::before {
    background: linear-gradient(to bottom, rgba(3,15,5,0.97), transparent);
}
.slot-machine.theme-dragon .reel-wrapper::after {
    background: linear-gradient(to top, rgba(3,15,5,0.97), transparent);
}

/* ================================================================
   GAME SIDEBAR BUTTONS — per theme color accents
   ================================================================ */
.theme-btn-classic.game-select-btn.active  { border-color: rgba(245,184,0,0.6);  box-shadow: 0 0 12px rgba(245,184,0,0.2); }
.theme-btn-phoenix.game-select-btn.active  { border-color: rgba(255,107,53,0.6); box-shadow: 0 0 12px rgba(255,107,53,0.2); }
.theme-btn-dragon.game-select-btn.active   { border-color: rgba(255,215,0,0.6);  box-shadow: 0 0 12px rgba(255,215,0,0.2); }
.theme-btn-classic .gs-icon { filter: drop-shadow(0 0 6px rgba(245,184,0,0.5)); }
.theme-btn-phoenix .gs-icon { filter: drop-shadow(0 0 6px rgba(255,107,53,0.5)); }
.theme-btn-dragon  .gs-icon { filter: drop-shadow(0 0 6px rgba(255,215,0,0.5)); }

/* ================================================================
   WIN DISPLAY — per theme accent color
   ================================================================ */
.game-theme-classic .win-display  { border-color: rgba(245,184,0,0.4); }
.game-theme-phoenix .win-display  { border-color: rgba(255,107,53,0.4); }
.game-theme-dragon  .win-display  { border-color: rgba(255,215,0,0.4); }
.game-theme-classic .win-amount   { color: #F5B800; text-shadow: 0 0 20px rgba(245,184,0,0.5); }
.game-theme-phoenix .win-amount   { color: #ff6b35; text-shadow: 0 0 20px rgba(255,107,53,0.5); }
.game-theme-dragon  .win-amount   { color: #FFD700; text-shadow: 0 0 20px rgba(255,215,0,0.5); }

/* ================================================================
   SPIN BUTTON — adapts to current game theme
   ================================================================ */
.game-theme-classic .spin-btn  { background: linear-gradient(135deg, #b8860b, #8B6914); }
.game-theme-classic .spin-btn:not(:disabled):hover { background: linear-gradient(135deg, #F5B800, #cc9900); }
.game-theme-phoenix .spin-btn  { background: linear-gradient(135deg, #cc3300, #7c1a00); }
.game-theme-phoenix .spin-btn:not(:disabled):hover { background: linear-gradient(135deg, #ff4500, #cc2200); }
.game-theme-dragon  .spin-btn  { background: linear-gradient(135deg, #a16207, #78350f); }
.game-theme-dragon  .spin-btn:not(:disabled):hover { background: linear-gradient(135deg, #FFD700, #cc9900); }

/* ================================================================
   BODY BACKGROUND AMBIENCE — subtle per theme
   ================================================================ */
body.game-theme-classic { background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(139,105,20,0.06), transparent) var(--bg-primary); }
body.game-theme-phoenix { background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255,69,0,0.06), transparent) var(--bg-primary); }
body.game-theme-dragon  { background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255,215,0,0.06), transparent) var(--bg-primary); }

/* ================================================================
   AMBIENT PARTICLE RISE ANIMATION
   ================================================================ */
@keyframes ambientRise {
    0%   { opacity: 0;    transform: translateY(0)      translateX(0)           rotate(0deg); }
    12%  { opacity: 0.6; }
    88%  { opacity: 0.2; }
    100% { opacity: 0;    transform: translateY(-90vh)  translateX(var(--dx,0)) rotate(300deg); }
}

/* ================================================================
   WIN SCREEN FLASH
   ================================================================ */
@keyframes winFlash {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* ================================================================
   THEME SWITCH — frame brightness flash
   ================================================================ */
.slot-machine.theme-switching .slot-frame {
    animation: themeSwitchFlash 0.45s ease-out;
}
@keyframes themeSwitchFlash {
    0%   { filter: brightness(2.2) saturate(0); }
    35%  { filter: brightness(1.5) saturate(0.4); }
    100% { filter: brightness(1)   saturate(1); }
}

/* Extra machine border glow pulse while spinning */
.slot-machine.theme-classic  .slot-frame { transition: box-shadow 0.3s ease; }
.slot-machine.theme-phoenix  .slot-frame { transition: box-shadow 0.3s ease; }
.slot-machine.theme-dragon   .slot-frame { transition: box-shadow 0.3s ease; }

/* ================================================================
   FULLSCREEN BUTTON
   ================================================================ */
#fullscreenBtn { font-size: 1.1rem; }

/* ================================================================
   FULLSCREEN GLOBAL TWEAKS
   ================================================================ */
body.is-fullscreen .app-header {
    height: 50px;
    padding: 0 12px;
}
body.is-fullscreen .app-main {
    padding: 8px 10px;
}

/* ================================================================
   LANDSCAPE ORIENTATION — side-by-side layout
   ================================================================ */
@media (orientation: landscape) {
    body.is-fullscreen {
        --symbol-h: 80px;
        --reel-h:   80px;
    }

    body.is-fullscreen .app-layout {
        overflow: hidden;
        height: 100vh;
    }

    body.is-fullscreen #appSidebar {
        display: none !important;
    }

    body.is-fullscreen .app-main {
        padding: 4px 8px;
        align-items: center;
    }

    body.is-fullscreen .game-container {
        max-width: 100%;
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto 1fr auto;
        grid-template-areas:
            "machine  header"
            "machine  win"
            "machine  controls"
            "machine  fs";
        gap: 8px;
        align-items: start;
    }

    body.is-fullscreen .game-header     { grid-area: header;   }
    body.is-fullscreen .fortune-bar     { display: none !important; }
    body.is-fullscreen .slot-machine    { grid-area: machine;  align-self: center; }
    body.is-fullscreen .win-display     { grid-area: win;      }
    body.is-fullscreen .free-spins-bar  { grid-area: fs;       }
    body.is-fullscreen .bet-controls    { grid-area: controls; align-self: center; }

    body.is-fullscreen .game-title {
        font-size: 1rem;
    }

    body.is-fullscreen .bet-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    body.is-fullscreen .spin-btn {
        width: 76px;
        height: 76px;
    }

    body.is-fullscreen .slot-frame {
        padding: 12px;
    }

    body.is-fullscreen .reel-wrapper {
        width: 88px;
    }
}

/* ================================================================
   PORTRAIT FULLSCREEN — compact vertical layout
   ================================================================ */
@media (orientation: portrait) {
    body.is-fullscreen {
        --symbol-h: 100px;
        --reel-h:   100px;
    }
}

/* ================================================================
   COSMIC VOYAGE THEME
   ================================================================ */
.slot-machine.theme-cosmic .slot-frame {
    background: linear-gradient(160deg, #0d0a2e, #080618);
    border-color: #4338ca;
    box-shadow: 0 0 0 1px rgba(129,140,248,0.15), 0 16px 48px rgba(0,0,0,0.6),
                inset 0 1px 0 rgba(165,180,252,0.08);
}
.slot-machine.theme-cosmic .slot-lights .light        { background: #818cf8; }
.slot-machine.theme-cosmic .slot-lights .light:nth-child(odd)  { background: #f0abfc; }
.slot-machine.theme-cosmic .slot-lights .light:nth-child(3n)   { background: #67e8f9; }
.slot-machine.theme-cosmic .reels-container {
    background: linear-gradient(180deg, #070515, #0a0820);
    border: 1px solid rgba(129,140,248,0.25);
    border-radius: 12px;
}
.slot-machine.theme-cosmic .reel-separator {
    background: linear-gradient(to bottom, transparent, rgba(129,140,248,0.4), transparent);
}
.slot-machine.theme-cosmic .reel-wrapper::before {
    background: linear-gradient(to bottom, rgba(7,5,21,0.97), transparent);
}
.slot-machine.theme-cosmic .reel-wrapper::after {
    background: linear-gradient(to top, rgba(7,5,21,0.97), transparent);
}
body.game-theme-cosmic { background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(67,56,202,0.10), transparent) var(--bg-primary); }

/* ================================================================
   EGYPTIAN GOLD THEME
   ================================================================ */
.slot-machine.theme-egypt .slot-frame {
    background: linear-gradient(160deg, #1c1200, #100b00);
    border-color: #b45309;
    box-shadow: 0 0 0 1px rgba(217,119,6,0.15), 0 16px 48px rgba(0,0,0,0.6),
                inset 0 1px 0 rgba(253,230,138,0.06);
}
.slot-machine.theme-egypt .slot-lights .light        { background: #fbbf24; }
.slot-machine.theme-egypt .slot-lights .light:nth-child(odd)  { background: #f87171; }
.slot-machine.theme-egypt .slot-lights .light:nth-child(3n)   { background: #fde68a; }
.slot-machine.theme-egypt .reels-container {
    background: linear-gradient(180deg, #0f0800, #180e00);
    border: 1px solid rgba(217,119,6,0.25);
    border-radius: 12px;
}
.slot-machine.theme-egypt .reel-separator {
    background: linear-gradient(to bottom, transparent, rgba(217,119,6,0.5), transparent);
}
.slot-machine.theme-egypt .reel-wrapper::before {
    background: linear-gradient(to bottom, rgba(15,8,0,0.97), transparent);
}
.slot-machine.theme-egypt .reel-wrapper::after {
    background: linear-gradient(to top, rgba(15,8,0,0.97), transparent);
}
body.game-theme-egypt { background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(180,83,9,0.10), transparent) var(--bg-primary); }

/* ================================================================
   PIRATE'S BOUNTY THEME
   ================================================================ */
.slot-machine.theme-pirate .slot-frame {
    background: linear-gradient(160deg, #0e0b1a, #070512);
    border-color: #6d28d9;
    box-shadow: 0 0 0 1px rgba(124,58,237,0.15), 0 16px 48px rgba(0,0,0,0.6),
                inset 0 1px 0 rgba(196,181,253,0.06);
}
.slot-machine.theme-pirate .slot-lights .light        { background: #a78bfa; }
.slot-machine.theme-pirate .slot-lights .light:nth-child(odd)  { background: #f87171; }
.slot-machine.theme-pirate .slot-lights .light:nth-child(3n)   { background: #fcd34d; }
.slot-machine.theme-pirate .reels-container {
    background: linear-gradient(180deg, #060410, #0a0618);
    border: 1px solid rgba(109,40,217,0.25);
    border-radius: 12px;
}
.slot-machine.theme-pirate .reel-separator {
    background: linear-gradient(to bottom, transparent, rgba(124,58,237,0.4), transparent);
}
.slot-machine.theme-pirate .reel-wrapper::before {
    background: linear-gradient(to bottom, rgba(6,4,16,0.97), transparent);
}
.slot-machine.theme-pirate .reel-wrapper::after {
    background: linear-gradient(to top, rgba(6,4,16,0.97), transparent);
}
body.game-theme-pirate { background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(109,40,217,0.10), transparent) var(--bg-primary); }

/* ================================================================
   NEW GAME SIDEBAR BUTTON ACCENTS
   ================================================================ */
.theme-btn-cosmic.game-select-btn.active  { border-color: rgba(129,140,248,0.6); box-shadow: 0 0 12px rgba(129,140,248,0.2); }
.theme-btn-egypt.game-select-btn.active   { border-color: rgba(217,119,6,0.6);   box-shadow: 0 0 12px rgba(217,119,6,0.2); }
.theme-btn-pirate.game-select-btn.active  { border-color: rgba(124,58,237,0.6);  box-shadow: 0 0 12px rgba(124,58,237,0.2); }
.theme-btn-cosmic .gs-icon { filter: drop-shadow(0 0 6px rgba(129,140,248,0.5)); }
.theme-btn-egypt  .gs-icon { filter: drop-shadow(0 0 6px rgba(217,119,6,0.5)); }
.theme-btn-pirate .gs-icon { filter: drop-shadow(0 0 6px rgba(124,58,237,0.5)); }

/* ================================================================
   WIN & SPIN BUTTON — NEW THEMES
   ================================================================ */
.game-theme-cosmic .win-display  { border-color: rgba(129,140,248,0.4); }
.game-theme-egypt  .win-display  { border-color: rgba(217,119,6,0.4); }
.game-theme-pirate .win-display  { border-color: rgba(124,58,237,0.4); }
.game-theme-cosmic .win-amount   { color: #818cf8; text-shadow: 0 0 20px rgba(129,140,248,0.5); }
.game-theme-egypt  .win-amount   { color: #fbbf24; text-shadow: 0 0 20px rgba(217,119,6,0.5); }
.game-theme-pirate .win-amount   { color: #a78bfa; text-shadow: 0 0 20px rgba(124,58,237,0.5); }

.game-theme-cosmic .spin-btn  { background: linear-gradient(135deg, #4338ca, #312e81); }
.game-theme-cosmic .spin-btn:not(:disabled):hover { background: linear-gradient(135deg, #818cf8, #4338ca); }
.game-theme-egypt  .spin-btn  { background: linear-gradient(135deg, #b45309, #92400e); }
.game-theme-egypt  .spin-btn:not(:disabled):hover { background: linear-gradient(135deg, #d97706, #b45309); }
.game-theme-pirate .spin-btn  { background: linear-gradient(135deg, #6d28d9, #4c1d95); }
.game-theme-pirate .spin-btn:not(:disabled):hover { background: linear-gradient(135deg, #7c3aed, #6d28d9); }

/* ================================================================
   VIDEO SLOTS vs CLASSIC SLOTS — VISUAL DISTINCTION
   ================================================================ */

/* 5-reel layout: smaller symbols, wider machine */
.slot-machine[data-reels="5"] .symbol-cell {
    font-size: 1.6rem;
}
.slot-machine[data-reels="5"] .reel-wrapper {
    height: calc(var(--symbol-h) * 3);
    min-width: 0;
}
.slot-machine[data-reels="5"] .reels-container {
    gap: 0;
}
.slot-machine[data-reels="5"] .reel-separator {
    width: 1px;
}

/* Video slots: cinematic frame, neon accent line, animated gradient bg */
.slot-machine.video-slots .slot-frame {
    background: linear-gradient(160deg, #0f0f2e 0%, #1a0a2e 50%, #0a1a2e 100%);
    border: 2px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 40px rgba(139,92,246,0.25), inset 0 0 60px rgba(0,0,0,0.6);
    position: relative;
    overflow: hidden;
}
.slot-machine.video-slots .slot-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #a78bfa, #818cf8, #a78bfa, transparent);
    animation: videoGlow 2s ease-in-out infinite alternate;
}
@keyframes videoGlow {
    from { opacity: 0.5; }
    to   { opacity: 1; }
}
.slot-machine.video-slots .reels-container {
    background: linear-gradient(to bottom, #060614, #0d0d28, #060614);
    border: 1px solid rgba(139,92,246,0.2);
}
.slot-machine.video-slots .slot-lights .light {
    background: #818cf8;
    box-shadow: 0 0 6px rgba(129,140,248,0.6);
}
.slot-machine.video-slots .slot-lights .light:nth-child(odd)  { background: #a78bfa; }
.slot-machine.video-slots .slot-lights .light:nth-child(3n)   { background: #60a5fa; }

/* Classic slots: warm retro feel */
.slot-machine.classic-slots .slot-frame {
    background: linear-gradient(160deg, #1a0a00 0%, #2a1500 50%, #1a0a00 100%);
    border: 2px solid rgba(245,184,0,0.4);
    box-shadow: 0 0 30px rgba(245,184,0,0.15), inset 0 0 40px rgba(0,0,0,0.5);
}
.slot-machine.classic-slots .reels-container {
    background: linear-gradient(to bottom, #050305, #0c080c, #050305);
    border: 1px solid rgba(245,184,0,0.15);
}
.slot-machine.classic-slots .slot-lights .light {
    background: #F5B800;
    box-shadow: 0 0 5px rgba(245,184,0,0.5);
}
.slot-machine.classic-slots .slot-lights .light:nth-child(odd) { background: #ff4444; }
.slot-machine.classic-slots .slot-lights .light:nth-child(3n)  { background: #F5B800; }

/* VIDEO SLOTS badge */
.video-slots-badge {
    position: absolute;
    top: -1px; right: 14px;
    background: linear-gradient(90deg, #7c3aed, #4f46e5);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 3px 10px;
    border-radius: 0 0 8px 8px;
    z-index: 20;
    text-transform: uppercase;
    box-shadow: 0 2px 12px rgba(124,58,237,0.5);
}

/* Game type badge in sidebar */
.game-select-btn[data-type="video"] .gs-rtp::before {
    content: '5R · ';
    opacity: 0.7;
}
.game-select-btn[data-type="classic"] .gs-rtp::before {
    content: '3R · ';
    opacity: 0.7;
}

/* Payline count badge for video games */
.slot-machine.video-slots .payline-lines {
    /* payline bars visible for video slots — JS populates based on winning positions */
}
.slot-machine.video-slots .paylines-badge {
    display: block;
}

/* ================================================================
   STOP BUTTON
   ================================================================ */
.stop-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff; border: none; border-radius: 12px;
    padding: 10px 18px; cursor: pointer;
    font-weight: 800; font-size: 0.9rem; letter-spacing: 0.06em;
    box-shadow: 0 4px 16px rgba(220,38,38,0.45);
    animation: stopPulse 0.7s ease-in-out infinite alternate;
    transition: transform 0.1s;
}
.stop-btn:hover  { transform: scale(1.06); background: linear-gradient(135deg,#ef4444,#b91c1c); }
.stop-btn:active { transform: scale(0.97); }
.stop-btn-icon   { font-size: 1rem; }
.stop-btn-text   { text-transform: uppercase; }
@keyframes stopPulse {
    from { box-shadow: 0 4px 12px rgba(220,38,38,0.4); }
    to   { box-shadow: 0 4px 24px rgba(220,38,38,0.75); }
}

/* ================================================================
   SLOT-ONLY MODE — pure fullscreen, no chrome
   ================================================================ */
body.slot-only-mode {
    overflow: hidden;
    background: #000 !important;
}
body.slot-only-mode .app-header,
body.slot-only-mode .win-ticker,
body.slot-only-mode #appSidebar,
body.slot-only-mode .fortune-bar,
body.slot-only-mode .win-display,
body.slot-only-mode .free-spins-bar,
body.slot-only-mode .ai-panel {
    display: none !important;
}
body.slot-only-mode .app-layout {
    display: block;
    height: 100vh;
    overflow: hidden;
}
body.slot-only-mode .app-main {
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
body.slot-only-mode .game-container {
    max-width: 100vw;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    gap: 8px;
}
body.slot-only-mode .slot-machine {
    max-width: 100%;
    box-shadow: 0 0 60px rgba(0,0,0,0.9);
}
body.slot-only-mode .bet-controls {
    width: 100%;
    max-width: 600px;
    background: rgba(0,0,0,0.7);
    border-radius: 14px;
    padding: 10px 14px;
}
body.slot-only-mode .game-header { display: none; }
body.slot-only-mode .win-display { display: flex !important; position: absolute; }
/* Landscape slot-only */
@media (orientation: landscape) and (max-height: 500px) {
    body.slot-only-mode .app-main    { flex-direction: row; }
    body.slot-only-mode .game-container { flex-direction: row; align-items: center; gap: 12px; }
    body.slot-only-mode .slot-machine   { max-height: 100vh; }
    body.slot-only-mode .bet-controls   { max-width: 220px; flex-shrink: 0; }
}

/* Slot-only exit bar */
.slot-only-exit {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 14px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ================================================================
   CUSTOMIZE MODAL
   ================================================================ */
.cust-presets {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px;
}
.cust-preset-btn {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text-primary); padding: 6px 12px;
    font-size: 0.8rem; cursor: pointer; transition: background .15s, border-color .15s;
}
.cust-preset-btn:hover { background: var(--bg-elevated); border-color: var(--brand-purple); }

.cust-emoji-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px;
}
.cust-sym-row {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-secondary); border-radius: 8px; padding: 8px 10px;
}
.cust-sym-role {
    font-size: 0.7rem; color: var(--text-muted); font-weight: 600;
    min-width: 52px; text-align: center; text-transform: uppercase; letter-spacing: .04em;
}
.cust-wild    { color: #fbbf24 !important; }
.cust-scatter { color: #60a5fa !important; }
.cust-emoji-input {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
    color: var(--text-primary); padding: 4px 8px; width: 60px;
    font-size: 1.1rem; text-align: center;
}
.cust-sym-preview { font-size: 1.3rem; min-width: 28px; text-align: center; }

.cust-colors {
    display: flex; align-items: center; gap: 12px; margin-top: 8px;
}
.cust-color-swatches {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.cust-swatch {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2); cursor: pointer;
    transition: transform .15s, border-color .15s; flex-shrink: 0;
}
.cust-swatch:hover { transform: scale(1.2); border-color: #fff; }

.cust-frames {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.cust-frame-btn {
    background: var(--bg-secondary); border: 2px solid var(--border);
    border-radius: 8px; color: var(--text-primary); padding: 7px 14px;
    font-size: 0.78rem; cursor: pointer; transition: border-color .15s, background .15s;
}
.cust-frame-btn.active  { border-color: var(--brand-purple); background: rgba(139,92,246,0.12); }
.cust-frame-btn:hover:not(.active) { background: var(--bg-elevated); }

/* Responsive customize modal emoji grid */
@media (max-width: 480px) {
    .cust-emoji-grid { grid-template-columns: 1fr; }
    .cust-frames { gap: 6px; }
    .cust-frame-btn { padding: 6px 10px; font-size: 0.72rem; }
}

/* ================================================================
   PAYTABLE — type badge + 5-reel column updates
   ================================================================ */
.pt-type-badge {
    font-size: 0.62rem; font-weight: 700; letter-spacing: .05em;
    background: rgba(139,92,246,0.2); color: #c084fc;
    border: 1px solid rgba(139,92,246,0.3);
    padding: 2px 8px; border-radius: 20px; margin-left: 8px;
    vertical-align: middle; text-transform: uppercase;
}
.sym-badge {
    font-size: .58rem; border-radius: 4px; padding: 1px 5px; margin-left: 4px;
    font-weight: 700; vertical-align: middle;
}
.badge-wild    { background: var(--brand-gold); color: #000; }
.badge-scatter { background: var(--brand-purple); color: #fff; }

/* ============================================
   CASINO FULLSCREEN SCREEN
   ============================================ */
.casino-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: radial-gradient(ellipse at 50% 0%, #1a0a2e 0%, #0a0a18 55%, #0d1422 100%);
    overflow: hidden;
    z-index: 1;
}

/* TOP BAR */
.casino-top {
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: rgba(0,0,0,0.55);
    border-bottom: 1px solid rgba(245,184,0,0.18);
    gap: 8px;
    z-index: 10;
}
.ct-left  { display:flex; align-items:center; gap:6px; flex-shrink:0; min-width:0; max-width:40%; }
.ct-center{ flex:1; min-width:0; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.ct-right { display:flex; align-items:center; gap:6px; flex-shrink:0; }

.ct-icon-btn {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--trans); cursor: pointer; flex-shrink: 0;
}
.ct-icon-btn:hover { background: rgba(245,184,0,0.15); border-color: var(--brand-gold); }
.ct-bonus-btn { background: rgba(245,184,0,0.12); border-color: rgba(245,184,0,0.3); }

.ct-game-title {
    font-size: 0.85rem; font-weight: 700; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px;
}
.ct-badge {
    font-size: 0.58rem; font-weight: 700; flex-shrink: 0;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.05em;
}
.ct-balance {
    display: flex; align-items: center; gap: 4px;
    background: rgba(245,184,0,0.1); border: 1px solid rgba(245,184,0,0.25);
    border-radius: 20px; padding: 4px 10px; flex-shrink: 0;
}
.ct-balance-amount { font-size: 0.85rem; font-weight: 700; color: var(--brand-gold); }
.ct-user-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-purple-d), var(--brand-purple));
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* Jackpot ticker in top bar */
.casino-top .jackpot-ticker {
    display: flex; gap: 20px; overflow: hidden;
    animation: scrollTicker 20s linear infinite;
    white-space: nowrap;
}
.casino-top .jp-item { display: flex; gap: 6px; font-size: 0.75rem; }
.casino-top .jp-game { color: var(--text-muted); }
.casino-top .jp-amount { color: var(--brand-gold); font-weight: 700; }

/* MACHINE AREA */
.casino-machine-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 6px 10px;
    min-height: 0;
}

/* Slot machine scales to fill available space */
.casino-machine-area .slot-machine {
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.casino-machine-area .slot-frame {
    width: 100%;
    max-width: 580px;
}

/* Win display compact in fullscreen */
.casino-machine-area .win-display {
    margin-top: 6px;
}
.casino-machine-area .free-spins-bar {
    margin-top: 4px;
}
.casino-machine-area .fortune-bar {
    width: 100%; max-width: 580px; margin-bottom: 6px;
}

/* BOTTOM CONTROLS */
.casino-bottom {
    flex-shrink: 0;
    background: rgba(0,0,0,0.55);
    border-top: 1px solid rgba(245,184,0,0.18);
    padding: 6px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

/* Preset bets row */
.cb-presets-row {
    display: flex; gap: 5px; justify-content: center;
}
.cb-presets-row .preset-btn {
    flex: 1; padding: 4px 2px; font-size: 0.7rem; font-weight: 600;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px; color: var(--text-secondary);
    cursor: pointer; transition: var(--trans); max-width: 62px;
}
.cb-presets-row .preset-btn:hover,
.cb-presets-row .preset-btn.active {
    background: rgba(245,184,0,0.15); border-color: var(--brand-gold); color: var(--brand-gold);
}

/* Controls row */
.cb-controls-row {
    display: flex; align-items: center; gap: 8px; justify-content: center;
}
.cb-bet-group {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.cb-label {
    font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em;
    color: var(--text-muted); text-transform: uppercase;
}
.cb-bet-adj {
    display: flex; align-items: center;
    background: rgba(0,0,0,0.4); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden;
}
.cb-bet-adj .bet-adj-btn {
    width: 28px; height: 32px; background: rgba(255,255,255,0.05);
    border: none; color: var(--text-primary);
    font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--trans);
}
.cb-bet-adj .bet-adj-btn:hover { background: rgba(245,184,0,0.2); }
.cb-bet-adj .bet-input {
    width: 58px; height: 32px; background: transparent; border: none;
    text-align: center; font-size: 0.85rem; font-weight: 700;
    color: var(--brand-gold); -moz-appearance: textfield;
}
.cb-bet-adj .bet-input::-webkit-outer-spin-button,
.cb-bet-adj .bet-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.cb-aux-btn {
    padding: 6px 10px; font-size: 0.7rem; font-weight: 700;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px; color: var(--text-secondary); cursor: pointer;
    transition: var(--trans); letter-spacing: 0.05em; white-space: nowrap;
}
.cb-aux-btn:hover { background: rgba(245,184,0,0.12); border-color: var(--brand-gold); color: var(--brand-gold); }

.cb-info-group {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.cb-lines-label {
    font-size: 0.62rem; color: var(--text-muted);
    text-align: center; line-height: 1.2;
}
.cb-lines-label strong { color: var(--text-secondary); font-size: 0.75rem; }

/* GAMES PANEL */
.games-panel {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; max-width: 85vw;
    background: #0f1422;
    border-right: 1px solid rgba(245,184,0,0.2);
    z-index: 500;
    display: flex; flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
    box-shadow: 4px 0 32px rgba(0,0,0,0.6);
}
.games-panel.open { transform: translateX(0); }
.games-panel-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65); z-index: 499;
    display: none; backdrop-filter: blur(2px);
}
.games-panel-backdrop.open { display: block; }

.gp-header {
    padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.gp-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.gp-close {
    width: 28px; height: 28px; background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 6px;
    color: var(--text-muted); cursor: pointer; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center; transition: var(--trans);
}
.gp-close:hover { background: rgba(239,68,68,0.15); border-color: var(--danger); color: var(--danger); }

.gp-list { flex: 1; overflow-y: auto; padding: 12px; }
.gp-section-title {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 8px; padding: 0 2px;
}
/* Keep game-select-btn styles from sidebar but let them work in the panel */
.gp-list .game-select-btn { margin-bottom: 6px; }

.gp-recent-wins { padding: 12px; border-top: 1px solid rgba(255,255,255,0.07); }

/* Responsive: reduce symbol size to fit machine area */
@media (max-height: 640px) {
    :root { --symbol-h: 80px; }
    .casino-top { height: 46px; }
    .casino-bottom { padding: 4px 10px 6px; gap: 4px; }
}
@media (max-height: 520px) {
    :root { --symbol-h: 66px; }
    .casino-top { height: 42px; }
    .cb-presets-row { display: none; }
}

/* Landscape phone: wider machine, fewer rows visible */
@media (max-height: 500px) and (orientation: landscape) {
    :root { --symbol-h: 60px; }
    .casino-top { height: 40px; }
    .casino-bottom { padding: 3px 10px 5px; gap: 3px; }
    .cb-presets-row { display: none; }
    .casino-machine-area { padding: 3px 6px; }
}

/* Lines selector in casino bottom */
.cb-lines-group {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.cb-lines-adj {
    display: flex; align-items: center;
    background: rgba(0,0,0,0.4); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden;
}
.cb-lines-adj .bet-adj-btn {
    width: 24px; height: 32px; background: rgba(255,255,255,0.05);
    border: none; color: var(--text-primary);
    font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: var(--trans);
}
.cb-lines-adj .bet-adj-btn:hover { background: rgba(124,92,252,0.2); }
#linesDisplay {
    width: 28px; text-align: center; font-size: 0.85rem;
    font-weight: 700; color: var(--brand-purple-l);
}

/* AI widget draggable cursor */
.ai-widget.dragging .ai-fab { cursor: grabbing; }

/* ============================================
   APP-LIKE DESIGN — SAFE AREAS & POLISH
   ============================================ */

/* Safe area for notched phones */
.casino-top {
    padding-top: max(0px, env(safe-area-inset-top));
    height: calc(52px + max(0px, env(safe-area-inset-top)));
}
.casino-bottom {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.games-panel {
    padding-top: max(0px, env(safe-area-inset-top));
}

/* App-like button feedback */
.ct-icon-btn:active, .ct-user-btn:active, .gp-close:active {
    transform: scale(0.92);
    transition: transform 0.08s;
}
.spin-btn:active { transform: scale(0.96); }
.stop-btn:active { transform: scale(0.96); }
.cb-aux-btn:active { transform: scale(0.93); }
.preset-btn:active { transform: scale(0.9); }
.bet-adj-btn:active { background: rgba(245,184,0,0.3); }
.game-select-btn:active { transform: scale(0.97); }

/* Touch highlight removal for app feel */
* { -webkit-tap-highlight-color: transparent; }

/* Slot machine in machine area: scale to fit without overflow */
.casino-machine-area .slot-machine {
    max-width: min(100%, 560px);
}

/* Reduce symbol size for short screens so machine always fits */
@media (max-height: 700px) {
    :root { --symbol-h: 95px; }
}
@media (max-height: 620px) {
    :root { --symbol-h: 80px; }
    .casino-bottom { padding: 5px 10px 6px; }
}
@media (max-height: 560px) {
    :root { --symbol-h: 68px; }
    .cb-presets-row { display: none; }
    .casino-top { height: 44px; }
}

/* Landscape phone */
@media (orientation: landscape) and (max-height: 480px) {
    :root { --symbol-h: 58px; }
    .casino-top  { height: 40px; }
    .casino-bottom { padding: 3px 8px; gap: 3px; }
    .cb-presets-row { display: none; }
    .casino-machine-area { padding: 2px 8px; }
}

/* Scrollbar style */
.games-panel ::-webkit-scrollbar { width: 4px; }
.games-panel ::-webkit-scrollbar-track { background: transparent; }
.games-panel ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* AI panel in casino mode */
.casino-screen ~ .ai-widget .ai-panel {
    bottom: 64px;
}

/* Win display compact */
.casino-machine-area .win-display {
    background: rgba(0,0,0,0.0);
    border: none;
    padding: 4px 0;
}

/* ============================================
   MOBILE RESPONSIVE — top bar & layout
   ============================================ */
@media (max-width: 480px) {
    /* Tighten top bar */
    .casino-top { padding: 0 6px; gap: 4px; }
    .ct-right { gap: 4px; }
    .ct-icon-btn, .ct-user-btn { width: 30px; height: 30px; font-size: 0.85rem; }

    /* Compact balance — show amount only */
    .ct-balance { padding: 3px 7px; gap: 2px; }
    .ct-balance > span:first-child { display: none; } /* hide 💰 emoji */
    .ct-balance-amount { font-size: 0.78rem; }

    /* Ensure user avatar circle always shows */
    .ct-user-btn {
        min-width: 30px; min-height: 30px;
        overflow: visible;
        flex-shrink: 0;
    }
    .user-avatar { width: 24px; height: 24px; font-size: 0.65rem; }

    /* Games / title smaller */
    .ct-game-title { max-width: 80px; font-size: 0.78rem; }
}

@media (max-width: 360px) {
    /* Very small phones */
    .ct-game-title { display: none; }
    .ct-badge { display: none; }
    .ct-balance-amount { max-width: 60px; overflow: hidden; text-overflow: ellipsis; }
}

/* Portrait phone: give machine area more room */
@media (max-width: 480px) and (orientation: portrait) {
    .casino-machine-area { padding: 4px 6px; }
    .casino-bottom { padding: 5px 8px 8px; gap: 4px; }
}

/* Ensure .ct-right never clips the user button */
.ct-right { overflow: visible; flex-wrap: nowrap; }
.user-menu { overflow: visible; }

/* ============================================
   ENGAGEMENT — Alive animations & effects
   ============================================ */

/* Coin rain */
@keyframes coinFall {
    0%   { transform: translateY(-30px) rotate(0deg) scale(1); opacity: 1; }
    80%  { opacity: 0.9; }
    100% { transform: translateY(110vh) rotate(540deg) scale(0.7); opacity: 0; }
}
#coinRain { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.coin-particle {
    position: absolute; top: -40px;
    animation: coinFall linear forwards;
    will-change: transform, opacity;
    user-select: none;
}

/* Symbol bounce on win */
@keyframes winnerBounce {
    0%,100% { transform: scale(1) rotate(0deg); }
    20%     { transform: scale(1.32) rotate(-6deg); }
    45%     { transform: scale(1.18) rotate(5deg); }
    65%     { transform: scale(1.25) rotate(-3deg); }
    82%     { transform: scale(1.12) rotate(2deg); }
}
.symbol-cell.winner .sym-emoji {
    animation: winnerBounce 0.75s ease-in-out;
    display: inline-block;
}
@keyframes winnerShimmer {
    0%,100% { box-shadow: 0 0 10px rgba(245,184,0,0.45), inset 0 0 8px rgba(245,184,0,0.08); }
    50%     { box-shadow: 0 0 28px rgba(245,184,0,0.85), inset 0 0 16px rgba(245,184,0,0.18); }
}
.symbol-cell.winner { animation: winnerShimmer 0.75s ease-in-out infinite; }

/* Screen shake */
@keyframes screenShake {
    0%,100% { transform: translate(0,0) rotate(0deg); }
    10%     { transform: translate(-5px, 3px) rotate(-0.4deg); }
    20%     { transform: translate(5px, -3px) rotate(0.4deg); }
    30%     { transform: translate(-4px, 2px) rotate(-0.3deg); }
    50%     { transform: translate(-3px, 1px) rotate(0.2deg); }
    70%     { transform: translate(2px, -2px) rotate(-0.1deg); }
    90%     { transform: translate(-1px, 1px) rotate(0deg); }
}
.screen-shake { animation: screenShake 0.42s ease-in-out !important; }

/* Hot streak machine glow */
@keyframes streakFireGlow {
    0%,100% { box-shadow: 0 0 20px rgba(255,69,0,0.4), 0 0 50px rgba(255,100,0,0.18); }
    50%     { box-shadow: 0 0 45px rgba(255,69,0,0.75), 0 0 90px rgba(255,190,0,0.28); }
}
#slotMachine.hot-streak .slot-frame {
    animation: streakFireGlow 1.1s ease-in-out infinite !important;
}

/* Anticipation reel glow (scatter near-miss) */
@keyframes anticipateGlow {
    0%,100% { box-shadow: 0 0 6px rgba(245,184,0,0.25); }
    50%     { box-shadow: 0 0 28px rgba(245,184,0,0.95), 0 0 55px rgba(245,184,0,0.35); }
}
.reel-wrapper.anticipating {
    animation: anticipateGlow 0.38s ease-in-out infinite;
    outline: 1px solid rgba(245,184,0,0.55);
    border-radius: 10px;
    z-index: 2;
}

/* Streak badge */
@keyframes fireText {
    0%,100% { text-shadow: 0 0 5px #ff4500, 0 0 10px #ff6b35; }
    50%     { text-shadow: 0 0 12px #ff4500, 0 0 22px #ffd700, 0 0 35px #ff4500; }
}
.streak-badge {
    display: flex; align-items: center; gap: 3px;
    background: rgba(255,69,0,0.18); border: 1px solid rgba(255,100,0,0.45);
    border-radius: 20px; padding: 2px 9px;
    font-size: 0.72rem; font-weight: 800; color: #ff7043;
    animation: fireText 1.2s ease-in-out infinite;
    white-space: nowrap; flex-shrink: 0;
}
.streak-badge.cold {
    background: rgba(56,189,248,0.12); border-color: rgba(56,189,248,0.3);
    color: #38bdf8; animation: none;
}

/* Session stats micro-bar */
.session-stats-bar {
    display: flex; align-items: center; gap: 14px;
    padding: 3px 12px; font-size: 0.62rem; color: var(--text-muted);
    background: rgba(0,0,0,0.22); border-top: 1px solid rgba(255,255,255,0.035);
    flex-shrink: 0; overflow: hidden;
}
.session-stat { display: flex; align-items: center; gap: 3px; }
.session-stat-val { color: var(--text-secondary); font-weight: 600; }
@media (max-width: 360px) { .session-stats-bar { display: none; } }

/* Near-miss "SO CLOSE!" toast */
@keyframes nearMissAnim {
    0%   { transform: translateX(-50%) scale(0.8); opacity: 0; }
    18%  { transform: translateX(-50%) scale(1.05); opacity: 1; }
    80%  { transform: translateX(-50%) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) scale(0.95); opacity: 0; }
}
.near-miss-toast {
    position: fixed; bottom: 230px; left: 50%; transform: translateX(-50%);
    z-index: 400; background: rgba(10,10,20,0.92); border: 1px solid var(--brand-gold);
    color: var(--brand-gold); font-size: 1rem; font-weight: 900; letter-spacing: 0.05em;
    padding: 7px 22px; border-radius: 30px; pointer-events: none;
    animation: nearMissAnim 2.2s ease-in-out forwards;
    box-shadow: 0 0 20px rgba(245,184,0,0.3);
}

/* Milestone pop */
@keyframes milestonePop {
    0%   { transform: translate(-50%,-50%) scale(0.4); opacity: 0; }
    60%  { transform: translate(-50%,-50%) scale(1.08); opacity: 1; }
    80%  { transform: translate(-50%,-50%) scale(0.97); }
    100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
@keyframes milestoneOut {
    0%   { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%,-50%) translateY(-20px); }
}
.milestone-toast {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    z-index: 600; pointer-events: none;
    background: linear-gradient(135deg, #4c1d95, #7c3aed, #f5b800);
    color: #fff; padding: 16px 32px; border-radius: 18px;
    text-align: center; box-shadow: 0 0 60px rgba(124,92,252,0.55);
}
.milestone-toast-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; opacity: 0.85; text-transform: uppercase; }
.milestone-toast-text  { font-size: 1.3rem; font-weight: 900; margin-top: 4px; }

/* Active effects bar */
.effects-bar {
    display: flex; align-items: center; gap: 6px; padding: 4px 12px;
    overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
    background: rgba(0,0,0,0.22); border-bottom: 1px solid rgba(255,255,255,0.04);
    min-height: 0; transition: min-height 0.3s, padding 0.3s;
}
.effects-bar:empty { display: none; }
.effects-bar::-webkit-scrollbar { display: none; }
.effect-pill {
    display: flex; align-items: center; gap: 4px;
    border-radius: 20px; padding: 2px 9px;
    font-size: 0.64rem; font-weight: 700; white-space: nowrap; flex-shrink: 0;
    background: rgba(124,92,252,0.15); border: 1px solid rgba(124,92,252,0.3); color: #a78bfa;
}
.effect-pill.boost  { background: rgba(245,184,0,0.12); border-color: rgba(245,184,0,0.35); color: var(--brand-gold); }
.effect-pill.special{ background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.effect-pill-timer  { opacity: 0.75; font-size: 0.6rem; }

/* Big win overlay entrance boost */
.big-win-overlay.showing .bwo-amount {
    animation: megaWinPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes megaWinPop {
    0%   { transform: scale(0.2); opacity: 0; }
    70%  { transform: scale(1.12); }
    100% { transform: scale(1); opacity: 1; }
}
