/* style.css - v13 */
:root {
    --bg-color: #090c11;
    --bg-color-2: #121824;
    --felt-green: #0d5c33;
    --felt-green-light: #12753f;
    --gold: #d9b44a;
    --gold-light: #f3d783;
    --gold-dark: #9c7a24;
    --wood: #3a2620;
    --wood-dark: #19100d;
    --red: #c8102e;
    --black: #161616;
    --text-color: #f3f5f7;
    --text-muted: #8c9bad;
    --panel-bg: #121a24;
    --panel-border: rgba(255, 255, 255, 0.08);
    --chip-1: #ffffff;
    --chip-5: #e8453f;
    --chip-25: #2fa96b;
    --chip-100: #2c3e50;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 15% 0%, rgba(217, 180, 74, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 100%, rgba(13, 92, 51, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, var(--bg-color-2) 0%, var(--bg-color) 70%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

.casino-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1380px;
    padding: clamp(16px, 3vw, 32px);
}

/* =========================================
   HEADER
   ========================================= */
.app-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 4px 8px 22px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--panel-border);
}

.brand h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-family: 'Rye', cursive;
    font-weight: 400;
    color: var(--gold);
    background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.subtitle {
    margin: 4px 0 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.balance-box {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700;
    color: var(--gold-light);
    background: rgba(0, 0, 0, 0.35);
    padding: 12px 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gold-dark);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.4);
}

.balance-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* =========================================
   LAYOUT
   ========================================= */
.game-layout {
    display: flex;
    flex-direction: row;
    gap: clamp(20px, 3vw, 40px);
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

/* =========================================
   WHEEL & PHYSICS CONTAINER
   ========================================= */
.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 500px;
    max-width: 100%;
}

.wheel-box {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
}

.wheel-outer-rim {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #4a2e15 0%, #2f1a08 10%, #5c3a1b 25%, #2f1a08 40%, #4a2e15 50%, #2f1a08 60%, #5c3a1b 75%, #2f1a08 90%, #4a2e15 100%);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9), inset 0 0 15px rgba(0, 0, 0, 0.8), inset 0 0 0 12px rgba(255, 255, 255, 0.05);
    border: 8px solid var(--wood-dark);
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel-container {
    position: absolute;
    width: 88%;
    height: 88%;
    border-radius: 50%;
    background: #000;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 1);
}

#rouletteCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.ball-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 10;
}

.ball {
    position: absolute;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e0e5e8 40%, #8b9295 100%);
    border-radius: 50%;
    box-shadow: -2px 3px 5px rgba(0, 0, 0, 0.6), inset -1px -1px 3px rgba(0, 0, 0, 0.3);
}

.ball.speeding {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 17%;
    height: 17%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f0f0f0 0%, #a0a0a0 40%, #404040 100%);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.6), inset 0 0 0 4px var(--gold-dark);
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-dome {
    width: 34%;
    height: 34%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--gold-light) 0%, #6e5616 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.crosshairs {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.crosshairs::before,
.crosshairs::after {
    content: '';
    position: absolute;
    background: rgba(0, 0, 0, 0.2);
}

.crosshairs::before {
    top: 0;
    bottom: 0;
    left: 44px;
    width: 2px;
}

.crosshairs::after {
    left: 0;
    right: 0;
    top: 44px;
    height: 2px;
}

/* =========================================
   CONTROLS PANEL
   ========================================= */
.controls-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--panel-bg);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--panel-border);
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

.result-display {
    height: 68px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    border: 1px solid var(--gold-dark);
}

.result-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.result-red {
    color: var(--red);
}

.result-black {
    color: #aaa;
}

.result-green {
    color: #27c96a;
}

.bet-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.chip-selector {
    display: flex;
    gap: 10px;
}

.chip {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px dashed rgba(0, 0, 0, 0.5);
    font-weight: 800;
    font-size: 1.05rem;
    color: #000;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4), inset 0 0 0 3px rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.15s ease;
    background-color: var(--chip-1);
}

.chip-5 {
    background-color: var(--chip-5);
    color: #fff;
}

.chip-25 {
    background-color: var(--chip-25);
    color: #fff;
}

.chip-100 {
    background-color: var(--chip-100);
    color: #fff;
}

.chip:hover {
    transform: scale(1.08);
}

.chip.selected {
    transform: scale(1.14) translateY(-4px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6), inset 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 15px var(--gold);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 160px;
}

.row-btns {
    display: flex;
    gap: 10px;
}

.action-btn,
.spin-btn {
    padding: 12px 18px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.1s;
}

.action-btn {
    flex: 1;
    font-size: 0.85rem;
    background: #263544;
    color: #fff;
    box-shadow: 0 3px 0 #17212b;
}

.action-btn:hover:not(:disabled) {
    background: #314458;
    transform: translateY(1px);
    box-shadow: 0 2px 0 #17212b;
}

.action-btn:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 0 0 #17212b;
}

.action-btn:disabled {
    background: #1a1f26;
    color: #4a5560;
    box-shadow: 0 3px 0 #10141a;
    cursor: not-allowed;
}

.spin-btn {
    background: linear-gradient(to bottom, var(--gold-light), var(--gold-dark));
    color: #201804;
    font-size: 1.05rem;
    box-shadow: 0 4px 0 #6f5817;
}

.spin-btn:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(2px);
    box-shadow: 0 2px 0 #6f5817;
}

.spin-btn:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: 0 0 0 #6f5817;
}

.spin-btn:disabled {
    filter: grayscale(1);
    cursor: not-allowed;
}

/* =========================================
   BETTING BOARD (LAYERED GRID)
   ========================================= */
.board-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* betting-board is content-box: 700 content + 20 padding + 16 border = 736 rendered */
    width: 736px;
    max-width: 100%;
}

.board-scroll {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}

.betting-board {
    /* content-box is required here: the hitbox grid math below assumes
       `width` refers to the content area only, not border+padding */
    box-sizing: content-box;
    background: linear-gradient(160deg, var(--felt-green-light) 0%, var(--felt-green) 60%);
    border: 8px solid var(--wood);
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5), 0 15px 30px rgba(0, 0, 0, 0.6);
    position: relative;
    width: 700px;
    height: 230px;
    user-select: none;
    flex-shrink: 0;
}

.cells-layer,
.hitbox-layer,
.chips-layer {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: grid;
    grid-template-columns: 50px repeat(12, 50px) 50px;
    grid-template-rows: repeat(3, 50px) 30px 30px;
    gap: 0px;
}

.hitbox-layer {
    z-index: 2;
    pointer-events: none;
}

.chips-layer {
    z-index: 3;
    pointer-events: none;
}

.board-cell {
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    position: relative;
    box-sizing: border-box;
    transition: background 0.2s, box-shadow 0.2s;
}

.board-cell.highlight-cell {
    background-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.8);
    z-index: 1;
}

@keyframes flashWin {
    0% {
        box-shadow: inset 0 0 0 4px var(--gold);
    }

    50% {
        box-shadow: inset 0 0 20px 4px var(--gold-light);
    }

    100% {
        box-shadow: inset 0 0 0 4px var(--gold);
    }
}

.board-cell.winning-cell {
    animation: flashWin 1s infinite alternate;
    z-index: 5;
    background-color: rgba(217, 180, 74, 0.4) !important;
}

.hitbox-cell {
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
}

.hitbox-cell:hover {
    background: rgba(255, 255, 255, 0.18) !important;
}

.complex-hitbox {
    position: absolute;
    background: transparent;
    pointer-events: auto;
    cursor: pointer;
    z-index: 5;
    border-radius: 50%;
}

.complex-hitbox:hover {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 0%, transparent 60%);
}

.cell-zero {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    border-radius: 14px 0 0 0;
}

.cell-double-zero {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    border-radius: 0 0 0 14px;
}

.cell-red {
    background-color: var(--red);
}

.cell-black {
    background-color: var(--black);
}

.cell-dozen {
    grid-row: 4 / 5;
    grid-column: span 4;
    font-size: 0.95rem;
}

.cell-outside {
    grid-row: 5 / 6;
    grid-column: span 2;
    font-size: 0.95rem;
}

.cell-2to1 {
    grid-column: 14 / 15;
    font-size: 0.75rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.current-bet-info {
    margin-top: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

#totalBetDisplay {
    color: var(--gold-light);
    font-size: 1.3rem;
    font-weight: 700;
}

.placed-chip {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: #000;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5), inset 0 0 3px rgba(255, 255, 255, 0.4);
    z-index: 10;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

/* =========================================
   ZOOM MODAL
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--gold-dark);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-title {
    margin: 0 0 20px 0;
    font-family: 'Rye', cursive;
    font-weight: 400;
    font-size: 2.2rem;
    color: var(--gold);
    text-shadow: 2px 2px 4px #000;
}

.zoom-box {
    /* content-box: the ball-alignment offsets assume a 300x300 clip area,
       not 300px minus the 8px border */
    box-sizing: content-box;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 8px solid var(--wood-dark);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    background: #000;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zoom-rotator {
    position: absolute;
    width: 600px;
    height: 600px;
    top: 50px;
    left: -150px;
    transform-origin: 50% 50%;
}

#zoomCanvas {
    position: absolute;
    width: 600px;
    height: 600px;
    top: 0;
    left: 0;
}

.zoom-ball {
    position: absolute;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e0e5e8 40%, #8b9295 100%);
    border-radius: 50%;
    box-shadow: -2px 3px 5px rgba(0, 0, 0, 0.6), inset -1px -1px 3px rgba(0, 0, 0, 0.3);
    top: 215px;
    left: 143px;
    z-index: 10;
}

.modal-win-text {
    margin: 20px 0 0 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: #27c96a;
    min-height: 30px;
    display: block;
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    max-width: calc(100vw - 48px);
}

.toast {
    background: #16202b;
    color: #fff;
    border-left: 4px solid var(--gold);
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    font-size: 1rem;
    font-weight: 600;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInToast 0.4s forwards;
    display: flex;
    align-items: center;
}

.toast.error {
    border-left-color: var(--red);
    color: #ffcccc;
}

.toast.success {
    border-left-color: var(--felt-green-light);
    color: #cdf5dd;
}

@keyframes slideInToast {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.fade-out {
    animation: fadeOutToast 0.4s forwards;
}

@keyframes fadeOutToast {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* =========================================
   SIDE PANELS: RECENT RESULTS + MINI GAMES
   ========================================= */
.side-panels {
    display: flex;
    gap: 20px;
    width: 736px;
    max-width: 100%;
    margin-top: 16px;
    align-items: stretch;
    flex-wrap: wrap;
}

.history-panel,
.minigames-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.history-panel {
    flex: 1;
    min-width: 160px;
    overflow: hidden;
}

.minigames-panel {
    width: 380px;
    flex-shrink: 0;
    align-items: stretch;
}

.panel-title {
    margin: 0 0 14px 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 10px;
}

.history-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) #000;
}

.history-track:empty::after {
    content: 'No spins yet — place a bet to begin.';
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.history-ball {
    min-width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.15);
    animation: popInBall 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

@keyframes popInBall {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.hist-red {
    background-color: var(--red);
}

.hist-black {
    background-color: var(--black);
}

.hist-green {
    background-color: var(--felt-green);
}

/* ---------- Tab bar ---------- */
.tab-bar {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.tab-btn {
    flex: 1;
    padding: 9px 6px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    background: linear-gradient(to bottom, var(--gold-light), var(--gold-dark));
    color: #201804;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---------- Shared mini-game controls ---------- */
.bet-adjuster {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--gold-dark);
}

.bet-adj-btn {
    background: #2a2f36;
    color: #fff;
    border: 1px solid #444c55;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.bet-adj-btn:hover {
    background: var(--gold-dark);
    color: #000;
    border-color: var(--gold);
}

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

.bet-cost {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--gold-light);
    min-width: 30px;
    text-align: center;
}

.slot-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
    gap: 8px;
}

.mini-play-btn {
    padding: 8px 18px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    background: linear-gradient(to bottom, var(--felt-green-light), #146b3c);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 0 #0c4a29;
    transition: all 0.1s;
    text-transform: uppercase;
}

.mini-play-btn:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(2px);
    box-shadow: 0 2px 0 #0c4a29;
}

.mini-play-btn:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: 0 0 0 #0c4a29;
}

.mini-play-btn:disabled {
    background: #444;
    color: #888;
    box-shadow: 0 4px 0 #222;
    cursor: not-allowed;
}

.mini-result-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    min-height: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Win legend / paytable ---------- */
.paytable {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.paytable-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 3px 9px 3px 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-light);
}

.paytable-item .paytable-symbol {
    font-size: 0.95rem;
}

/* ---------- Slot machine ---------- */
.slot-machine {
    background: #000;
    border: 4px solid var(--gold-dark);
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.slot-reels {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.reel {
    width: 74px;
    height: 74px;
    font-size: 2.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-top: 3px solid #666;
    border-bottom: 3px solid #666;
    border-radius: 4px;
    user-select: none;
}

/* ---------- Scratch card ---------- */
.scratch-card {
    background: #000;
    border: 4px solid var(--gold-dark);
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.scratch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 12px;
}

.scratch-cell {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    perspective: 400px;
    background: #f0f0f0;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
}

.scratch-cell-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.scratch-cell.revealed .scratch-cell-inner {
    transform: rotateY(180deg);
}

.scratch-face {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    font-size: 2.1rem;
    border-radius: 6px;
}

.scratch-cover {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light) 45%, var(--gold-dark));
    color: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    font-size: 1.3rem;
}

.scratch-cell.disabled .scratch-cover {
    cursor: default;
}

.scratch-cover:active {
    filter: brightness(0.92);
}

.scratch-symbol {
    background: #fff;
    transform: rotateY(180deg);
}

.scratch-cell.win .scratch-symbol {
    background: rgba(217, 180, 74, 0.35);
    box-shadow: inset 0 0 0 2px var(--gold);
}

.reveal-all-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    background: #2a2f36;
    color: #fff;
    border: 1px solid #444c55;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.15s;
}

.reveal-all-btn:hover:not(:disabled) {
    background: var(--gold-dark);
    color: #000;
}

.reveal-all-btn:disabled {
    color: #555;
    cursor: not-allowed;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1260px) {
    .game-layout {
        justify-content: center;
    }
}

@media (max-width: 860px) {
    .app-header {
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }

    .side-panels {
        flex-direction: column;
    }

    .minigames-panel {
        width: 100%;
    }
}

@media (max-width: 540px) {

    .chip {
        width: 42px;
        height: 42px;
        font-size: 0.9rem;
    }

    /* Scaled 0.75x from the 300/600 base — keeps the ball aligned to the pocket groove */
    .zoom-box {
        width: 225px;
        height: 225px;
    }

    .zoom-rotator,
    #zoomCanvas {
        width: 450px;
        height: 450px;
    }

    .zoom-rotator {
        top: 37.5px;
        left: -112.5px;
    }

    .zoom-ball {
        width: 10.5px;
        height: 10.5px;
        top: 161px;
        left: 107px;
    }
}
