/* ================================================================
   BET WITH NET — PREMIUM GAME ENGINE CSS v7.0
   Responsive styling for the installed virtual-credit game catalog
   Game types: crash, limbo, mines, sweeper, tower, keno, scratch, dice, coin,
               roulette, card, penalty, plinko, wheel, arcade, slot, hook, box, thimbles
   ================================================================ */

/* ================================================================
   GAME PAGE LAYOUT
   ================================================================ */
.game-stage-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    min-width: 0;
    animation: fadeInUp 0.4s ease;
}

/* Top bar */
.game-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--r-md);
    padding: 12px 18px;
    flex-wrap: wrap;
}
.game-info { display: flex; align-items: center; gap: 14px; min-width: 0; }
.back-btn { flex-shrink: 0; }
.game-titles h1 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
    margin: 0 0 2px;
}
.game-badge-tag {
    font-size: 11px;
    color: var(--accent-green);
    font-weight: 700;
    background: var(--accent-green-bg);
    border: 1px solid var(--border-green);
    padding: 2px 8px;
    border-radius: var(--r-full);
}
.game-user-wallet {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0,230,118,0.12), rgba(0,229,255,0.08));
    border: 1px solid var(--border-green);
    border-radius: var(--r-md);
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}
.game-user-wallet strong {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 900;
    color: var(--accent-green);
}

/* Arena Wrapper */
.game-arena-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    width: 100%;
    align-items: start;
}
@media (max-width: 1100px) { .game-arena-wrapper { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 900px)  { .game-arena-wrapper { grid-template-columns: 1fr; } }

/* Canvas Card — full premium visual area */
.game-canvas-card {
    position: relative;
    background: linear-gradient(160deg, #020c1a 0%, #050f22 100%);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0, 230, 118, 0.12);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 20px 60px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    min-height: 420px;
    width: 100%;
}
.game-canvas-card canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    display: block;
    border-radius: 18px;
}

/* Control Panel */
.game-control-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: sticky;
    top: 80px;
}
.panel-section {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.panel-section:last-child { border-bottom: none; }
.panel-section label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.panel-action { padding: 14px 16px; }

/* Bet Input Row */
.bet-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.bet-input-wrap input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--r-sm);
    color: var(--text-main);
    font-size: 20px;
    font-weight: 900;
    font-family: var(--font-display);
    outline: none;
    text-align: center;
    transition: all 0.22s ease;
}
.bet-input-wrap input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(0,230,118,0.12);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--r-sm);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-sans);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234d6b88' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    transition: all 0.2s ease;
}
.form-control:focus { border-color: var(--accent-green); }
.form-control option { background: #071428; }

/* Action Play/Cashout Buttons */
.action-play-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: var(--r-sm);
    font-family: var(--font-display);
    letter-spacing: 1px;
}
.action-cashout-btn {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    border-radius: var(--r-sm);
    font-family: var(--font-display);
    background: linear-gradient(135deg, var(--accent-gold), #ff8f00);
    color: #010c18;
    border: none;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.22s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.action-cashout-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--accent-gold-glow); }
.action-cashout-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Result Overlay */
.game-overlay-result {
    position: absolute;
    inset: 0;
    background: rgba(1,4,9,0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: var(--r-lg);
    animation: fadeInUp 0.3s ease;
}
.result-box {
    text-align: center;
    padding: 32px 28px;
}
.result-box #resultIcon { font-size: 56px; display: block; margin-bottom: 12px; }
.result-box h2 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 8px;
}
.result-box p { font-size: 16px; color: var(--text-sub); }

/* ================================================================
   MINES GAME — 5×5 GRID
   ================================================================ */
.mines-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 24px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}
@media (max-width: 480px) { .mines-grid-container { gap: 6px; padding: 14px; } }

.mine-tile {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #0d1f3c, #071428);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(20px, 4vw, 30px);
    cursor: pointer;
    transition: all 0.2s var(--ease-swift);
    position: relative;
    overflow: hidden;
    outline: none;
    padding: 0;
}
.mine-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent);
    border-radius: inherit;
}
.mine-tile.disabled { cursor: not-allowed; opacity: 0.5; }
.mine-tile.active-tile { cursor: pointer; border-color: rgba(0,230,118,0.2); }
.mine-tile.active-tile:hover {
    border-color: var(--accent-green);
    background: rgba(0,230,118,0.1);
    transform: scale(1.04);
    box-shadow: 0 0 18px rgba(0,230,118,0.3);
}
.mine-tile.revealed-gem {
    background: linear-gradient(135deg, rgba(0,230,118,0.2), rgba(0,229,255,0.15));
    border-color: var(--accent-green);
    box-shadow: 0 0 18px rgba(0,230,118,0.4);
    cursor: not-allowed;
    animation: pulseGreen 2s ease infinite;
}
.mine-tile.revealed-mine {
    background: linear-gradient(135deg, rgba(255,23,68,0.25), rgba(255,23,68,0.1));
    border-color: var(--accent-red);
    box-shadow: 0 0 18px rgba(255,23,68,0.4);
    cursor: not-allowed;
    animation: pulseRed 0.5s ease 3;
}
.tile-front { font-size: clamp(18px, 3.5vw, 28px); line-height: 1; }

/* Mines multiplier display */
.mines-multiplier-display {
    text-align: center;
    padding: 12px;
    background: rgba(0,230,118,0.06);
    border: 1px solid var(--border-green);
    border-radius: var(--r-sm);
    margin: 0 24px 16px;
}
.mines-mult-value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 900;
    color: var(--accent-green);
    display: block;
}
.mines-mult-label { font-size: 11px; color: var(--text-muted); }

/* ================================================================
   TOWER CLIMBING GAME — 8 ROWS × 4 COLUMNS
   ================================================================ */
.tower-grid-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.tower-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--r-sm);
    padding: 6px 8px;
    transition: all 0.3s ease;
    position: relative;
}
.tower-row.locked-row { opacity: 0.4; }
.tower-row.active-row {
    opacity: 1;
    background: rgba(0,230,118,0.08);
    border: 1px solid rgba(0,230,118,0.3);
    box-shadow: 0 0 16px rgba(0,230,118,0.15);
}
.tower-row.cleared-row { opacity: 0.8; }

.row-mult {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 900;
    color: var(--accent-green);
    width: 46px;
    flex-shrink: 0;
    text-align: right;
}
.row-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    flex: 1;
}
.tower-tile {
    aspect-ratio: 2;
    background: linear-gradient(135deg, #0d1f3c, #071428);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: var(--r-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 2vw, 22px);
    cursor: pointer;
    transition: all 0.18s var(--ease-swift);
    outline: none;
    padding: 0;
}
.tower-row.active-row .tower-tile:hover {
    border-color: var(--accent-green);
    background: rgba(0,230,118,0.15);
    transform: scale(1.06);
    box-shadow: 0 0 12px rgba(0,230,118,0.3);
}
.tower-row.locked-row .tower-tile { cursor: not-allowed; }
.tower-tile.safe-step {
    background: linear-gradient(135deg, rgba(0,230,118,0.25), rgba(0,229,255,0.15));
    border-color: var(--accent-green);
}
.tower-tile.trap-step {
    background: linear-gradient(135deg, rgba(255,23,68,0.25), rgba(255,23,68,0.1));
    border-color: var(--accent-red);
}

/* ================================================================
   VAULT / BOX / THIMBLES — 3 SAFES
   ================================================================ */
.vault-stage-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 40px 24px;
    min-height: 300px;
    flex-wrap: wrap;
}

.vault-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s var(--ease-swift);
}
.vault-item:hover { transform: translateY(-8px); }

.vault-door {
    width: clamp(100px, 20vw, 140px);
    height: clamp(120px, 22vw, 160px);
    background: linear-gradient(160deg, #1a3a5c, #0d1f3c);
    border: 3px solid rgba(0,229,255,0.3);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    font-size: 28px;
    color: var(--accent-cyan);
    font-weight: 900;
    font-size: 12px;
    font-family: var(--font-display);
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,229,255,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.vault-door::before {
    content: '🔒';
    font-size: 36px;
    display: block;
    margin-bottom: 6px;
}
.vault-door-number {
    position: absolute;
    bottom: 10px;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.vault-item:hover .vault-door {
    border-color: var(--accent-cyan);
    box-shadow: 0 12px 32px rgba(0,229,255,0.3), inset 0 0 30px rgba(0,229,255,0.1);
}
.vault-item.open .vault-door {
    background: linear-gradient(160deg, rgba(0,230,118,0.2), rgba(0,229,255,0.1));
    border-color: var(--accent-green);
}
.vault-prize {
    font-size: 36px;
    text-align: center;
    animation: floatUp 2s ease infinite;
}

/* ================================================================
   SCRATCH CARD — 3×3 GRID
   ================================================================ */
.scratch-stage-wrapper {
    padding: 20px;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}
.scratch-progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
}
.scratch-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.scratch-tile {
    aspect-ratio: 1;
    border-radius: var(--r-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.scratch-tile:hover { transform: scale(1.03); }
.scratch-tile.disabled { cursor: not-allowed; opacity: 0.6; }

.scratch-foil-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a3a5c, #0d2a4a, #1e4060);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.4s ease, transform 0.4s ease;
    border: 2px solid rgba(0,229,255,0.2);
}
.foil-icon { font-size: clamp(20px, 5vw, 32px); }
.foil-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.scratch-tile.scratched .scratch-foil-layer {
    opacity: 0;
    transform: rotateY(90deg);
}

.scratch-content-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0d1f3c, #071428);
    border: 2px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
}
.symbol-icon { font-size: clamp(24px, 6vw, 42px); }

.scratch-tile.win-tile .scratch-content-layer {
    background: linear-gradient(135deg, rgba(0,230,118,0.2), rgba(0,229,255,0.12));
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(0,230,118,0.3);
}

/* ================================================================
   KENO — 80-BALL GRID
   ================================================================ */
.keno-board-wrapper {
    padding: 16px 20px;
    width: 100%;
}
.keno-status-bar {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 14px;
    padding: 8px;
    background: var(--accent-cyan-bg);
    border: 1px solid var(--border-cyan);
    border-radius: var(--r-sm);
}
.keno-grid-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
}
@media (max-width: 640px) { .keno-grid-container { grid-template-columns: repeat(8, 1fr); } }
@media (max-width: 400px) { .keno-grid-container { grid-template-columns: repeat(7, 1fr); } }

.keno-num-btn {
    aspect-ratio: 1;
    background: rgba(13,31,60,0.9);
    border: 1.5px solid rgba(255,255,255,0.07);
    border-radius: var(--r-xs);
    color: var(--text-sub);
    font-size: clamp(9px, 1.5vw, 13px);
    font-weight: 700;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all 0.15s var(--ease-swift);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    padding: 0;
}
.keno-num-btn:hover {
    background: rgba(0,229,255,0.12);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: scale(1.08);
}
.keno-num-btn.selected {
    background: linear-gradient(135deg, rgba(0,229,255,0.25), rgba(0,229,255,0.15));
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0,229,255,0.3);
}
.keno-num-btn.hit {
    background: linear-gradient(135deg, rgba(0,230,118,0.3), rgba(0,230,118,0.15));
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: 0 0 14px rgba(0,230,118,0.5);
    animation: pulseGreen 1s ease 3;
}
.keno-num-btn.drawn {
    background: rgba(255,193,7,0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ================================================================
   CRASH MULTIPLIER OVERLAY — centered inside SVG wrapper
   ================================================================ */
.crash-multiplier-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    z-index: 5;
    padding: 16px;
    overflow: hidden;
}
.crash-mult-value {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    color: var(--accent-green);
    text-shadow: 0 0 30px rgba(0,230,118,0.6);
    display: block;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    max-width: 100%;
    text-align: center;
}
.crash-mult-value.crashed {
    color: var(--accent-red);
    text-shadow: 0 0 30px rgba(255,23,68,0.6);
}
.crash-status-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

/* ================================================================
   PLINKO VISUAL DISPLAY
   ================================================================ */
.plinko-stage {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}
.plinko-pegs {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}
.plinko-row { display: flex; gap: 22px; justify-content: center; }
.peg {
    width: 10px; height: 10px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-cyan);
}
.plinko-buckets {
    display: flex;
    gap: 4px;
    margin-top: 12px;
}
.plinko-bucket {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border-radius: var(--r-xs);
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-display);
}
.plinko-bucket.low { background: rgba(255,23,68,0.15); color: var(--accent-red); border: 1px solid rgba(255,23,68,0.3); }
.plinko-bucket.mid { background: rgba(255,193,7,0.12); color: var(--accent-gold); border: 1px solid rgba(255,193,7,0.3); }
.plinko-bucket.high { background: rgba(0,230,118,0.15); color: var(--accent-green); border: 1px solid var(--border-green); }

/* ================================================================
   WHEEL / ROULETTE DISPLAY
   ================================================================ */
.wheel-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    gap: 16px;
    min-height: 320px;
}
.wheel-visual {
    width: clamp(180px, 40vw, 260px);
    height: clamp(180px, 40vw, 260px);
    border-radius: 50%;
    border: 6px solid rgba(255,255,255,0.15);
    position: relative;
    transition: transform 0.1s linear;
    background: conic-gradient(
        #ff1744 0deg 30deg, #1b5e20 30deg 60deg,
        #ff1744 60deg 90deg, #0d47a1 90deg 120deg,
        #ff1744 120deg 150deg, #1b5e20 150deg 180deg,
        #ff1744 180deg 210deg, #0d47a1 210deg 240deg,
        #ff1744 240deg 270deg, #1b5e20 270deg 300deg,
        #ff1744 300deg 330deg, #0d47a1 330deg 360deg
    );
    box-shadow: 0 0 40px rgba(0,0,0,0.6), inset 0 0 20px rgba(0,0,0,0.3);
}
.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 28px solid var(--accent-gold);
    filter: drop-shadow(0 0 8px rgba(255,193,7,0.6));
}
.wheel-center {
    position: absolute;
    inset: 30%;
    background: #020c1a;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 900;
    color: #fff;
}
.wheel-number-display {
    font-family: var(--font-display);
    font-size: 52px;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(255,193,7,0.5);
}

/* ================================================================
   ROULETTE TABLE
   ================================================================ */
.roulette-table {
    width: 100%;
    padding: 16px 20px;
    max-width: 500px;
    margin: 0 auto;
}
.roulette-number-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}
.roulette-num {
    aspect-ratio: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.roulette-num.red-num { background: rgba(255,23,68,0.2); color: #ff6b6b; }
.roulette-num.black-num { background: rgba(255,255,255,0.07); color: var(--text-sub); }
.roulette-num.zero-num { background: rgba(0,100,0,0.4); color: #66bb6a; }
.roulette-num:hover { transform: scale(1.12); border-color: rgba(255,255,255,0.3); }
.roulette-num.selected { border-color: var(--accent-gold); box-shadow: 0 0 10px rgba(255,193,7,0.4); }
.roulette-num.hit { border-color: var(--accent-green) !important; background: var(--accent-green-bg) !important; animation: pulseGreen 0.5s ease 4; }

/* ================================================================
   DICE DISPLAY
   ================================================================ */
.dice-display-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 280px;
    flex-wrap: wrap;
    padding: 20px;
}
.dice-visual {
    width: clamp(80px, 16vw, 110px);
    height: clamp(80px, 16vw, 110px);
    background: #fff;
    border-radius: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 12px;
    gap: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), inset 0 0 0 2px rgba(0,0,0,0.05);
    transition: transform 0.1s ease;
}
.dice-dot {
    background: #1a1a2e;
    border-radius: 50%;
    width: 100%;
    height: 100%;
}
.dice-dot.hidden { opacity: 0; }

/* Dice 1 */
.dice-1 .d-5 { opacity: 1; }
/* Dice 2 */
.dice-2 .d-1, .dice-2 .d-9 { opacity: 1; }
/* Dice 3 */
.dice-3 .d-1, .dice-3 .d-5, .dice-3 .d-9 { opacity: 1; }
/* Dice 4 */
.dice-4 .d-1,.dice-4 .d-3,.dice-4 .d-7,.dice-4 .d-9 { opacity: 1; }
/* Dice 5 */
.dice-5 .d-1,.dice-5 .d-3,.dice-5 .d-5,.dice-5 .d-7,.dice-5 .d-9 { opacity: 1; }
/* Dice 6 */
.dice-6 .d-1,.dice-6 .d-3,.dice-6 .d-4,.dice-6 .d-6,.dice-6 .d-7,.dice-6 .d-9 { opacity: 1; }

.dice-vs-label {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 900;
    color: var(--text-muted);
}
.dice-sum-display {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(255,193,7,0.5);
}
.dice-result-label { font-size: 13px; color: var(--text-muted); font-weight: 700; }

/* ================================================================
   COIN FLIP
   ================================================================ */
.coin-flip-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    gap: 24px;
    padding: 30px;
}
.coin-visual {
    width: clamp(120px, 25vw, 160px);
    height: clamp(120px, 25vw, 160px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: clamp(14px, 3vw, 22px);
    font-weight: 900;
    position: relative;
    transition: transform 0.1s ease;
}
.coin-heads {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #5d3a00;
    box-shadow: 0 8px 30px rgba(255,193,7,0.5), inset 0 0 20px rgba(255,255,255,0.3);
    border: 4px solid #ff8f00;
}
.coin-tails {
    background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
    color: #424242;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4), inset 0 0 20px rgba(255,255,255,0.4);
    border: 4px solid #9e9e9e;
}
.coin-result-text {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: var(--accent-gold);
}

/* ================================================================
   PENALTY SHOOT-OUT
   ================================================================ */
.penalty-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 20px;
    gap: 16px;
    position: relative;
}
.penalty-goal {
    position: relative;
    width: clamp(240px, 70%, 360px);
    aspect-ratio: 2.5;
}
.penalty-goal-frame {
    width: 100%;
    height: 100%;
    border: 5px solid #fff;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    position: relative;
    box-shadow: 0 0 30px rgba(255,255,255,0.15);
}
.penalty-net {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.1) 0, rgba(255,255,255,0.1) 1px, transparent 1px, transparent 16px),
                      repeating-linear-gradient(90deg, rgba(255,255,255,0.1) 0, rgba(255,255,255,0.1) 1px, transparent 1px, transparent 16px);
}
.goal-zones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    position: absolute;
    inset: 4px;
}
.goal-zone {
    border: 1.5px dashed rgba(255,255,255,0.2);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
}
.goal-zone:hover {
    background: rgba(0,230,118,0.2);
    border-color: var(--accent-green);
    color: var(--accent-green);
}
.goal-zone.selected {
    background: rgba(0,229,255,0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}
.goal-zone.scored {
    background: rgba(0,230,118,0.3);
    border-color: var(--accent-green);
    animation: pulseGreen 0.5s ease 3;
}
.goal-zone.missed {
    background: rgba(255,23,68,0.2);
    border-color: var(--accent-red);
}

.penalty-ball {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 28px;
    background: radial-gradient(circle at 35% 35%, #fff, #e0e0e0);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 5;
}

/* ================================================================
   GAME HISTORY BAR
   ================================================================ */
.game-history-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--r-md);
    padding: 12px 16px;
    overflow: hidden;
}
.game-history-bar > span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.history-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
}
.history-chips::-webkit-scrollbar { height: 0; }

.chip {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 900;
    font-family: var(--font-display);
    white-space: nowrap;
}
.chip.win {
    background: var(--accent-green-bg);
    color: var(--accent-green);
    border: 1px solid var(--border-green);
}
.chip.loss {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border: 1px solid rgba(255,23,68,0.35);
}
.chip.big-win {
    background: var(--accent-gold-bg);
    color: var(--accent-gold);
    border: 1px solid rgba(255,193,7,0.35);
}

/* ================================================================
   RELATED GAMES SECTION
   ================================================================ */
.related-games-section {
    margin-top: 8px;
}
.related-games-section h3 {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 900;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================================================
   LIVE STATS IN GAME PANEL
   ================================================================ */
.game-live-stats {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.025);
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}
.game-stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    flex: 1;
    min-width: 60px;
}
.game-stat-pill .gsp-value {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 900;
    color: var(--accent-green);
}
.game-stat-pill .gsp-label {
    font-size: 9px;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================================================
   MOBILE RESPONSIVE FOR GAME PAGES
   ================================================================ */
@media (max-width: 640px) {
    .game-top-bar { padding: 10px 12px; }
    .game-titles h1 { font-size: 15px; }
    .game-canvas-card { min-height: 250px; }
    .mines-grid-container { padding: 12px; gap: 6px; }
    .tower-grid-container { padding: 12px; gap: 6px; }
    .vault-stage-container { gap: 14px; padding: 24px 12px; }
    .vault-door { width: 90px; height: 110px; }
    .keno-grid-container { grid-template-columns: repeat(8, 1fr); gap: 3px; }
    .keno-num-btn { font-size: 9px; }
    .scratch-grid-container { gap: 8px; }
    .game-history-bar { padding: 8px 12px; gap: 8px; }
    .game-arena-wrapper { grid-template-columns: 1fr; }
}

/* ================================================================
   IDLE/LOADING STATES
   ================================================================ */
.game-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    width: 100%;
}
.game-loading-state .spinner { width: 40px; height: 40px; }
.game-loading-state p { font-size: 13px; color: var(--text-muted); }

/* Plinko Ball */
.plinko-ball {
    width: 16px; height: 16px;
    background: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-gold-glow);
    position: absolute;
    transition: top 0.15s ease, left 0.15s ease;
}


/* Game interaction & responsive hardening v7.0 */
.game-stage-container,.game-arena-wrapper,.game-canvas-card,.game-control-panel{min-width:0}
.selected-action{outline:2px solid var(--accent-green)!important;box-shadow:0 0 0 3px rgba(0,230,118,.12)!important}
.tower-grid-container,.mines-grid-container,.keno-board-wrapper,.scratch-stage-wrapper,.vault-stage-container{max-width:100%}
@media(max-width:900px){
  .game-control-panel{position:static;top:auto}
  .game-canvas-card{min-height:360px}
}
@media(max-width:640px){
  .game-info{width:100%;align-items:flex-start}
  .game-titles{min-width:0}
  .game-titles h1{overflow-wrap:anywhere}
  .game-user-wallet{width:100%;justify-content:space-between}
  .game-control-panel{width:100%}
  .dice-display-stage{gap:12px;padding-inline:10px}
  .game-overlay-result .result-box{max-width:calc(100vw - 32px)}
}
@media(max-width:420px){
  .game-canvas-card{min-height:280px;border-radius:14px}
  .keno-grid-container{grid-template-columns:repeat(8,minmax(0,1fr));padding:8px}
  .tower-grid-container,.mines-grid-container{padding:10px}
  .vault-stage-container{gap:8px;padding:18px 8px}
  .vault-door{width:78px;height:98px}
}

/* Final game arena mobile/desktop resilience v7.1 */
.game-canvas-card{overflow:hidden}.game-stage-container,.game-arena-wrapper,.game-control-panel,.game-info,.game-titles{max-width:100%}.game-control-panel input,.game-control-panel select,.game-control-panel button{max-width:100%}
@media(max-width:640px){
  .game-stage-container{padding-left:2px;padding-right:2px}
  .game-top-bar{align-items:flex-start;gap:10px;flex-wrap:wrap}
  .game-info{min-width:0;flex:1 1 100%}
  .game-user-wallet{margin-left:0;flex:1 1 100%}
  .game-control-panel input,.game-control-panel select{font-size:16px}
  .game-canvas-card{min-height:300px}
  .arcade-game-stage{min-height:320px!important}
  #hookStage{min-height:300px!important}
  .game-overlay-result .result-box{width:min(92vw,420px)}
}
@media(max-width:380px){
  .game-top-bar{padding:9px}
  .game-canvas-card{min-height:270px;border-radius:12px}
  .game-live-stats{padding:8px;gap:5px}
  .game-stat-pill{min-width:48px}
  .game-control-panel{padding-left:10px;padding-right:10px}
}

/* v7.3.0: neutral push result in recent-round history */
.history-chips .chip.push,
.chip.push {
    border-color: rgba(255, 193, 7, .55);
    background: rgba(255, 193, 7, .12);
    color: #ffd166;
}
