/* ==========================================================================
   Jackpot 777 – Slot Machine v2
   ========================================================================== */

.jackpot-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 2rem 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(233,69,96,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(26,26,46,0.3) 0%, transparent 60%),
        var(--color-bg);
}

/* ── Machine shell ─────────────────────────────────────────────────────────── */

.jackpot-machine {
    width: 100%;
    max-width: 520px;
    background: linear-gradient(180deg, #2a1a3e 0%, #1a1a2e 40%, #12101e 100%);
    border-radius: 24px;
    box-shadow:
        0 0 0 3px #3d2b56,
        0 0 0 6px #1a1a2e,
        0 20px 60px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
    overflow: hidden;
    position: relative;
    user-select: none;
}

/* ── Top section ───────────────────────────────────────────────────────────── */

.machine-top {
    text-align: center;
    padding: 0 0 0.75rem;
    position: relative;
}

.top-lights,
.bottom-lights {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    gap: 2px;
}

.bulb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #555;
    flex-shrink: 0;
}

.bulb:nth-child(odd)  { animation: bulbA 0.8s ease-in-out infinite alternate; }
.bulb:nth-child(even) { animation: bulbB 0.8s ease-in-out infinite alternate; }

@keyframes bulbA {
    0%   { background: #ffe066; box-shadow: 0 0 6px 2px rgba(255,224,102,0.7); }
    100% { background: #e94560; box-shadow: 0 0 6px 2px rgba(233,69,96,0.6); }
}
@keyframes bulbB {
    0%   { background: #e94560; box-shadow: 0 0 6px 2px rgba(233,69,96,0.6); }
    100% { background: #ffe066; box-shadow: 0 0 6px 2px rgba(255,224,102,0.7); }
}

.machine-title {
    font-size: 2.4rem;
    font-weight: 900;
    color: #ffe066;
    text-shadow: 0 0 20px rgba(255,224,102,0.6), 0 2px 0 #b8860b;
    letter-spacing: 0.08em;
    line-height: 1;
    padding: 0.4rem 0 0.15rem;
}

.machine-title em {
    color: #e94560;
    font-style: normal;
    text-shadow: 0 0 20px rgba(233,69,96,0.6), 0 2px 0 #8b0020;
    font-size: 2.8rem;
}

.star {
    font-size: 1.6rem;
    vertical-align: middle;
    animation: starPulse 1.5s ease-in-out infinite;
}
.star:last-child { animation-delay: 0.75s; }

@keyframes starPulse {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50%      { opacity: 1; transform: scale(1.15); }
}

/* Jackpot display */
.jackpot-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.25rem 0 0.5rem;
}

.jackpot-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #e94560;
    background: rgba(233,69,96,0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(233,69,96,0.3);
}

.jackpot-amount {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffe066;
    font-family: var(--font-mono, monospace);
    text-shadow: 0 0 10px rgba(255,224,102,0.5);
    animation: jackpotGlow 2s ease-in-out infinite;
}

@keyframes jackpotGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255,224,102,0.4); }
    50%      { text-shadow: 0 0 25px rgba(255,224,102,0.9), 0 0 50px rgba(255,224,102,0.3); }
}

/* ── Free Spins banner ─────────────────────────────────────────────────────── */

.free-spins-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.35rem 0;
    background: linear-gradient(90deg, transparent, rgba(255,224,102,0.12), transparent);
    border-top: 1px solid rgba(255,224,102,0.15);
    border-bottom: 1px solid rgba(255,224,102,0.15);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s, max-height 0.3s;
}

.free-spins-banner.show {
    opacity: 1;
    max-height: 40px;
}

.fs-icon {
    font-size: 1rem;
    animation: starPulse 1s ease-in-out infinite;
}

.fs-label {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: #ffe066;
    text-shadow: 0 0 8px rgba(255,224,102,0.5);
}

.fs-count,
.fs-total {
    font-size: 0.9rem;
    font-weight: 900;
    color: #ffe066;
    font-family: var(--font-mono, monospace);
}

.fs-of {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
}

/* ── Reels frame ───────────────────────────────────────────────────────────── */

.reels-frame {
    margin: 0 20px;
    background: #0d0d1a;
    border-radius: 14px;
    border: 3px solid #3d2b56;
    box-shadow: inset 0 4px 20px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.reels-shadow-top,
.reels-shadow-bottom {
    position: absolute;
    left: 0; right: 0;
    height: 40px;
    z-index: 5;
    pointer-events: none;
}

.reels-shadow-top    { top: 0;    background: linear-gradient(to bottom, rgba(13,13,26,0.9), transparent); }
.reels-shadow-bottom { bottom: 0; background: linear-gradient(to top, rgba(13,13,26,0.9), transparent); }

.payline {
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 88px;
    border-top: 2px solid rgba(233,69,96,0.7);
    border-bottom: 2px solid rgba(233,69,96,0.7);
    background: rgba(233,69,96,0.05);
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(233,69,96,0.15);
}

.payline::before,
.payline::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-style: solid;
}

.payline::before {
    left: 0;
    border-width: 8px 10px 8px 0;
    border-color: transparent #e94560 transparent transparent;
}

.payline::after {
    right: 0;
    border-width: 8px 0 8px 10px;
    border-color: transparent transparent transparent #e94560;
}

.reels-container {
    display: flex;
    align-items: stretch;
    height: 264px;
    padding: 0 8px;
}

.reel-divider {
    width: 3px;
    background: linear-gradient(to bottom, transparent, #3d2b56 20%, #3d2b56 80%, transparent);
    flex-shrink: 0;
}

.reel {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.reel-strip {
    display: flex;
    flex-direction: column;
    transition: none;
    will-change: transform;
}

.reel-symbol {
    width: 100%;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    flex-shrink: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
}

.reel-symbol[data-symbol="seven"]   { filter: drop-shadow(0 0 8px rgba(233,69,96,0.5)); }
.reel-symbol[data-symbol="diamond"] { filter: drop-shadow(0 0 8px rgba(100,200,255,0.5)); }

.reel.spinning .reel-strip { filter: blur(1px); }
.reel.stopping .reel-strip { filter: blur(0); transition: filter 0.2s; }

/* ── Winning & near-miss symbols ───────────────────────────────────────────── */

.reel-symbol.winner {
    animation: symbolWin 0.5s ease-in-out 3;
    filter: drop-shadow(0 0 15px rgba(255,224,102,0.8)) !important;
}

@keyframes symbolWin {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}

.reel-symbol.near-miss {
    animation: nearMissPulse 0.4s ease-in-out 2;
}

@keyframes nearMissPulse {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.5) drop-shadow(0 0 8px rgba(255,224,102,0.4)); }
}

/* ── Paytable ──────────────────────────────────────────────────────────────── */

.paytable {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px 8px;
    padding: 0.6rem 24px;
    margin-top: 0.25rem;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
}

.pay-row span:first-child {
    font-size: 0.8rem;
    letter-spacing: -1px;
}

.pay-value {
    font-weight: 800;
    color: #ffe066;
    font-family: var(--font-mono, monospace);
}

/* ── Stats bar ─────────────────────────────────────────────────────────────── */

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.5rem 20px 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.stat-item { text-align: center; }

.stat-label {
    display: block;
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.25);
    margin-bottom: 0.1rem;
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 900;
    color: rgba(255,224,102,0.7);
    font-family: var(--font-mono, monospace);
}

/* ── Controls ──────────────────────────────────────────────────────────────── */

.machine-controls {
    padding: 1rem 20px 0.75rem;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.5rem;
}

.credit-display,
.win-display,
.bet-controls {
    text-align: center;
    flex: 1;
}

.credit-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.25rem;
}

.credit-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffe066;
    font-family: var(--font-mono, monospace);
    text-shadow: 0 0 8px rgba(255,224,102,0.3);
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,224,102,0.15);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    min-width: 80px;
}

.credit-value.credit-up   { animation: creditUp 0.6s ease-out; }
.credit-value.credit-down { animation: creditDown 0.3s ease-out; }

@keyframes creditUp {
    0%   { color: #64c888; transform: scale(1.15); }
    100% { color: #ffe066; transform: scale(1); }
}

@keyframes creditDown {
    0%   { color: #e94560; transform: scale(0.92); }
    100% { color: #ffe066; transform: scale(1); }
}

.bet-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-bet {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1;
}

.btn-bet:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
}

.btn-bet:active { transform: scale(0.92); }

.bet-value {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    font-family: var(--font-mono, monospace);
    min-width: 40px;
    text-align: center;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 0.25rem 0.3rem;
}

/* Main buttons row */
.controls-buttons {
    margin-top: 0.75rem;
    gap: 0.6rem;
}

.btn-spin {
    flex: 2;
    height: 56px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #e94560 0%, #c0243d 100%);
    box-shadow:
        0 4px 0 #8b0020,
        0 6px 20px rgba(233,69,96,0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, filter 0.1s;
    position: relative;
    overflow: hidden;
}

.btn-spin--free {
    background: linear-gradient(180deg, #ffe066 0%, #d4a520 100%);
    box-shadow:
        0 4px 0 #8b6914,
        0 6px 20px rgba(255,224,102,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-spin--free .spin-text {
    color: #1a1a2e;
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.btn-spin::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: btnSheen 3s ease-in-out infinite;
}

@keyframes btnSheen {
    0%, 100% { left: -100%; }
    50%      { left: 150%; }
}

.spin-text {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.15em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.btn-spin:hover { filter: brightness(1.1); }

.btn-spin:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #8b0020, 0 2px 10px rgba(233,69,96,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-spin:disabled {
    filter: saturate(0.3) brightness(0.6);
    cursor: not-allowed;
    transform: none;
}

.btn-spin:disabled::before { animation: none; }

.btn-max-bet,
.btn-auto {
    flex: 1;
    height: 56px;
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-max-bet:hover,
.btn-auto:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}

.btn-auto.active {
    background: rgba(233,69,96,0.2);
    border-color: rgba(233,69,96,0.5);
    color: #e94560;
}

/* Secondary row */
.controls-secondary {
    margin-top: 0.5rem;
    justify-content: center;
    gap: 0.5rem;
}

.btn-reset {
    flex: none;
    height: 38px;
    padding: 0 1.2rem;
    border: 2px solid rgba(100,200,136,0.3);
    border-radius: 10px;
    background: rgba(100,200,136,0.08);
    color: rgba(100,200,136,0.8);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-reset:hover {
    background: rgba(100,200,136,0.18);
    border-color: rgba(100,200,136,0.5);
    color: #64c888;
    box-shadow: 0 0 15px rgba(100,200,136,0.15);
}

.btn-reset:active { transform: scale(0.95); }

.btn-info {
    flex: none;
    width: 38px;
    height: 38px;
    border: 2px solid rgba(100,180,255,0.25);
    border-radius: 10px;
    background: rgba(100,180,255,0.06);
    color: rgba(100,180,255,0.7);
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-info:hover {
    background: rgba(100,180,255,0.15);
    border-color: rgba(100,180,255,0.4);
    color: #64b4ff;
}

.btn-sound {
    flex: none;
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sound:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
}

.btn-sound.muted { opacity: 0.4; }

/* ── Win overlay ───────────────────────────────────────────────────────────── */

.win-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s;
}

.win-overlay.show { opacity: 1; }

.win-text {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffe066;
    text-shadow: 0 0 30px rgba(255,224,102,0.8), 0 0 60px rgba(255,224,102,0.4), 0 4px 0 #b8860b;
    letter-spacing: 0.05em;
    animation: winBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    text-align: center;
    padding: 0.5rem 1.5rem;
    background: rgba(26,26,46,0.85);
    border-radius: 16px;
    border: 2px solid rgba(255,224,102,0.3);
    white-space: pre-line;
}

@keyframes winBounce {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.win-overlay.jackpot-win .win-text {
    font-size: 3rem;
    color: #e94560;
    text-shadow: 0 0 30px rgba(233,69,96,0.8), 0 0 60px rgba(233,69,96,0.4), 0 4px 0 #8b0020;
    border-color: rgba(233,69,96,0.4);
    animation: jackpotFlash 0.15s linear 6, winBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes jackpotFlash {
    0%, 100% { background: rgba(26,26,46,0.85); }
    50%      { background: rgba(233,69,96,0.3); }
}

/* ── Particles ─────────────────────────────────────────────────────────────── */

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 19;
    animation: particleFly 1.2s ease-out forwards;
}

@keyframes particleFly {
    0%   { opacity: 1; transform: translate(0,0) scale(1); }
    100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0); }
}

/* ── Shake ─────────────────────────────────────────────────────────────────── */

.shake { animation: machineShake 0.4s ease-in-out; }

@keyframes machineShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

.reel-bounce { animation: reelBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes reelBounce {
    0%   { transform: translateY(-8px); }
    60%  { transform: translateY(3px); }
    100% { transform: translateY(0); }
}

/* ── Generic overlay screen ────────────────────────────────────────────────── */

.overlay-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10,8,20,0.92);
    backdrop-filter: blur(4px);
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.overlay-screen.show {
    opacity: 1;
    pointer-events: auto;
}

.overlay-box {
    text-align: center;
    padding: 2rem;
    animation: overlayIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes overlayIn {
    0%   { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.overlay-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.overlay-title--danger {
    color: #e94560;
    text-shadow: 0 0 30px rgba(233,69,96,0.5);
}

.overlay-title--gold {
    color: #ffe066;
    text-shadow: 0 0 30px rgba(255,224,102,0.6);
    animation: goldPulse 1.5s ease-in-out infinite;
}

@keyframes goldPulse {
    0%, 100% { text-shadow: 0 0 20px rgba(255,224,102,0.4); }
    50%      { text-shadow: 0 0 40px rgba(255,224,102,0.8), 0 0 80px rgba(255,224,102,0.3); }
}

.overlay-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1.5rem;
}

.overlay-text strong {
    color: #ffe066;
    font-size: 1.1em;
}

.btn-overlay-action {
    height: 52px;
    padding: 0 2rem;
    border: 2px solid rgba(100,200,136,0.4);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(100,200,136,0.2), rgba(100,200,136,0.08));
    color: #64c888;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: resetPulse 2s ease-in-out infinite;
}

.btn-overlay-action--gold {
    border-color: rgba(255,224,102,0.4);
    background: linear-gradient(180deg, rgba(255,224,102,0.2), rgba(255,224,102,0.08));
    color: #ffe066;
}

@keyframes resetPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(100,200,136,0.3); }
    50%      { box-shadow: 0 0 20px 5px rgba(100,200,136,0.15); }
}

.btn-overlay-action:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* ── Rules panel ───────────────────────────────────────────────────────────── */

.rules-panel {
    width: 92%;
    max-width: 460px;
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #2a1a3e 0%, #1a1a2e 100%);
    border-radius: 18px;
    border: 2px solid #3d2b56;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    padding: 1.5rem;
    position: relative;
    animation: overlayIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: #3d2b56 transparent;
}

.rules-panel::-webkit-scrollbar { width: 6px; }
.rules-panel::-webkit-scrollbar-track { background: transparent; }
.rules-panel::-webkit-scrollbar-thumb { background: #3d2b56; border-radius: 3px; }

.rules-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.5);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.rules-close:hover {
    background: rgba(233,69,96,0.15);
    border-color: rgba(233,69,96,0.4);
    color: #e94560;
}

.rules-heading {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffe066;
    text-shadow: 0 0 15px rgba(255,224,102,0.4);
    margin: 0 0 1rem;
    padding-right: 2rem;
}

.rules-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.rules-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rules-section h3 {
    font-size: 0.85rem;
    font-weight: 800;
    color: #e94560;
    letter-spacing: 0.08em;
    margin: 0 0 0.5rem;
}

.rules-section p {
    font-size: 0.78rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.6);
    margin: 0 0 0.5rem;
}

.rules-section p:last-child { margin-bottom: 0; }

.rules-section strong {
    color: rgba(255,255,255,0.85);
}

.rules-section em {
    color: #ffe066;
    font-style: normal;
}

/* Rules table */
.rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

.rules-table th {
    text-align: left;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.3);
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.rules-table td {
    padding: 0.35rem 0.5rem;
    color: rgba(255,255,255,0.55);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.rules-table tr:last-child td { border-bottom: none; }

.rt-gold {
    color: #ffe066 !important;
    font-weight: 800;
    font-family: var(--font-mono, monospace);
}

/* Rules list */
.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-list li {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    padding: 0.25rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.rules-list li::before {
    content: '\25B8';
    position: absolute;
    left: 0;
    color: #e94560;
}

.rules-list kbd {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-family: var(--font-mono, monospace);
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
}

.rules-section--hint {
    background: rgba(255,224,102,0.04);
    border: 1px solid rgba(255,224,102,0.1);
    border-radius: 10px;
    padding: 0.75rem 1rem !important;
    margin-top: 0.5rem;
}

.rules-section--hint p {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 560px) {
    .jackpot-machine {
        border-radius: 16px;
        max-width: 100%;
    }

    .reels-frame { margin: 0 12px; }
    .machine-controls { padding: 0.75rem 12px 0.5rem; }
    .machine-title { font-size: 1.8rem; }
    .machine-title em { font-size: 2.1rem; }
    .reel-symbol { font-size: 2.5rem; height: 74px; }
    .reels-container { height: 222px; }
    .payline { height: 74px; }
    .btn-spin { height: 48px; }
    .spin-text { font-size: 1.1rem; }
    .btn-max-bet, .btn-auto { height: 48px; }

    .stats-bar { gap: 1rem; padding: 0.4rem 12px 0.15rem; }
    .btn-reset { height: 34px; padding: 0 0.8rem; font-size: 0.6rem; }
    .btn-info, .btn-sound { width: 34px; height: 34px; }
    .overlay-title { font-size: 1.5rem; }
    .btn-overlay-action { height: 44px; padding: 0 1.5rem; font-size: 0.8rem; }
    .rules-panel { padding: 1.2rem; max-height: 80vh; }
    .rules-heading { font-size: 1.1rem; }
    .win-text { font-size: 1.6rem; }
    .win-overlay.jackpot-win .win-text { font-size: 2rem; }
}
