/* ==========================================================
   MINER WORLD 2D - Mobile Mining Adventure Style System
   Retro Pixel-Art Aesthetic & High-DPI Mobile Layout
   Palette: Dark Navy, Deep Stone, Warm Gold, Cyan Diamonds & Purple Crystals
   ========================================================== */

@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    src: url('PressStart2P.ttf') format('truetype');
    font-display: block;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 700;
    src: url('Outfit-Bold.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 800;
    src: url('Outfit-Bold.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 900;
    src: url('Outfit-Black.ttf') format('truetype');
    font-display: swap;
}

:root {
    --hd-font: 'Outfit', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bg-dark: #070a12;
    --canvas-bg: #1c1917;
    --hud-bg: rgba(9, 14, 23, 0.92);
    --gold: #f59e0b;
    --gold-bright: #fbbf24;
    --gold-glow: #fef08a;
    --green: #10b981;
    --green-bright: #34d399;
    --blue: #38bdf8;
    --blue-bright: #7dd3fc;
    --purple: #a855f7;
    --purple-bright: #c084fc;
    --red: #ef4444;
    --stone-dark: #1e293b;
    --stone-light: #64748b;
    --pixel-border: 3px solid #000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #020617;
    font-family: 'Press Start 2P', monospace;
    color: #f8fafc;
    touch-action: none;
    position: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Main Container: Fixed Portrait Ratio for Mobile */
#game-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: #090d16;
    position: relative;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

/* ==========================================================
   0. CINEMATIC SPLASH / LOADING SCREEN STYLES
   ========================================================== */
.splash-view {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: radial-gradient(ellipse 95% 70% at 50% 36%, #0b1528 0%, #050914 55%, #020409 100%);
    overflow: hidden;
    padding: max(16px, env(safe-area-inset-top)) 16px max(18px, calc(env(safe-area-inset-bottom) + 10px));
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), transform 0.65s cubic-bezier(0.4, 0, 0.2, 1), filter 0.65s ease;
}

.splash-view.splash-fade-out {
    opacity: 0;
    transform: scale(1.06);
    filter: blur(6px);
    pointer-events: none;
}

.splash-bg-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.splash-ambient-glow {
    position: absolute;
    top: 32%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(380px, 92vw);
    height: min(380px, 92vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.26) 0%, rgba(245, 158, 11, 0.16) 42%, transparent 72%);
    animation: splashGlowPulse 3.5s infinite alternate ease-in-out;
    filter: blur(14px);
}

@keyframes splashGlowPulse {
    from { transform: translate(-50%, -50%) scale(0.92); opacity: 0.65; }
    to { transform: translate(-50%, -50%) scale(1.12); opacity: 0.95; }
}

.splash-sparks-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.splash-spark-dot {
    position: absolute;
    width: 2.5px;
    height: 2.5px;
    border-radius: 50%;
    background: #fde68a;
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.9), 0 0 10px rgba(56, 189, 248, 0.6);
    animation: splashSparkFloat 4s infinite linear;
}

@keyframes splashSparkFloat {
    0% {
        transform: translateY(20px) translateX(0) scale(0.4);
        opacity: 0;
    }
    30% { opacity: 0.8; }
    70% { opacity: 0.8; }
    100% {
        transform: translateY(-90px) translateX(25px) scale(1);
        opacity: 0;
    }
}

.splash-center-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    max-width: 320px;
    gap: 16px;
    margin-top: 10px;
}

/* 3D Glowing Pickaxe & Diamond Emblem Frame */
.splash-emblem-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: splashEmblemBob 3.6s infinite ease-in-out;
}

@keyframes splashEmblemBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.splash-emblem-pulse-ring {
    position: absolute;
    width: clamp(165px, 46vw, 215px);
    height: clamp(165px, 46vw, 215px);
    border-radius: 50%;
    border: 1.5px solid rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4), inset 0 0 20px rgba(245, 158, 11, 0.3);
    animation: splashRingPulse 2.8s infinite ease-in-out;
    pointer-events: none;
}

@keyframes splashRingPulse {
    0%, 100% { transform: scale(0.96); opacity: 0.5; }
    50% { transform: scale(1.06); opacity: 0.95; }
}

.splash-emblem-frame {
    width: clamp(145px, 40vw, 195px);
    height: clamp(145px, 40vw, 195px);
    border-radius: 50%;
    border: 3px solid #f59e0b;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.5), 0 0 60px rgba(56, 189, 248, 0.35), inset 0 0 20px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    position: relative;
    background: #090e17;
}

.splash-emblem-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, transparent 50%, rgba(245, 158, 11, 0.25) 100%);
    pointer-events: none;
    z-index: 2;
}

.splash-emblem-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
}

/* Brand Typography */
.splash-brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.splash-title {
    font-family: var(--hd-font);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.92;
    margin: 0;
}

.splash-title-mini {
    font-family: var(--hd-font);
    font-size: clamp(22px, 6vw, 28px);
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 18%, #475569 32%, #f1f5f9 48%, #ffffff 52%, #64748b 66%, #1e293b 82%, #020617 100%);
    background-size: 240% 100%;
    animation: darkMetallicSweep 4s infinite ease-in-out;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(2, 6, 23, 0.9);
    filter: drop-shadow(0 2px 0 #020617) drop-shadow(0 3px 0 #000000) drop-shadow(0 0 14px rgba(56, 189, 248, 0.5));
}

.splash-title-miner {
    font-family: var(--hd-font);
    font-size: clamp(28px, 7.8vw, 36px);
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #1c0a00 0%, #451a03 18%, #78350f 32%, #fef08a 48%, #ffffff 52%, #b45309 66%, #451a03 82%, #0d0400 100%);
    background-size: 240% 100%;
    animation: darkMetallicSweep 4s infinite ease-in-out 0.4s;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(13, 4, 0, 0.95);
    filter: drop-shadow(0 2px 0 #1c0a00) drop-shadow(0 3px 0 #000000) drop-shadow(0 0 16px rgba(245, 158, 11, 0.55));
    margin-top: -2px;
}

.splash-subtitle-pill {
    font-family: var(--hd-font);
    font-size: clamp(8px, 2.2vw, 9.5px);
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
    padding: 3px 10px;
    background: rgba(3, 7, 18, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.splash-beacon {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
    animation: beaconPulse 1.8s infinite ease-in-out;
}

/* Energy Loading Bar */
.splash-loader-block {
    width: 100%;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.splash-loader-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--hd-font);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #cbd5e1;
    padding: 0 2px;
}

.splash-status-text {
    color: #7dd3fc;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.splash-percent-text {
    color: #fbbf24;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.splash-progress-track {
    width: 100%;
    height: 7px;
    background: rgba(15, 23, 42, 0.9);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), inset 0 1px 3px rgba(0, 0, 0, 0.9);
}

.splash-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8 0%, #06b6d4 35%, #f59e0b 70%, #fde047 100%);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.8), 0 0 6px rgba(251, 191, 36, 0.6);
    transition: width 0.08s linear;
}

.splash-tap-hint {
    font-family: var(--hd-font);
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #64748b;
    margin-top: 4px;
    animation: tapHintPulse 2s infinite ease-in-out;
}

@keyframes tapHintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* Footer Studio Bar */
.splash-footer-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--hd-font);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #475569;
    text-transform: uppercase;
}

.splash-footer-studio {
    color: #64748b;
}

.splash-footer-dot {
    color: #38bdf8;
}

.splash-footer-ver {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Screen Views (Home Screen vs Gameplay Screen) */
.screen-view {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    transition: opacity 0.25s ease;
}

.hidden,
.screen-view.hidden,
.modal-overlay.hidden {
    display: none !important;
}

/* ==========================================================
   1. MAIN HOME SCREEN STYLES
   ========================================================== */
#home-view {
    background: #090e17;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px 18px 14px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 10;
}

/* Scenic Mountain Forest Background with Golden Sunlight */
.menu-cave-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    background: #090e17 url('forest_mountain_bg.jpg') no-repeat center 28% / cover;
}

.menu-cave-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(9, 14, 23, 0.45) 0%,
        rgba(9, 14, 23, 0.08) 22%,
        rgba(251, 191, 36, 0.04) 55%,
        rgba(5, 9, 18, 0.38) 80%,
        rgba(3, 7, 18, 0.90) 100%
    );
    pointer-events: none;
}

.cave-crystal {
    display: none !important;
}

.hanging-lantern {
    display: none !important;
}

/* Floating Sparkles & Dust Motes */
.sparks-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.spark-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fde68a;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(251, 191, 36, 0.4);
    animation: floatSpark 5s infinite linear;
}

@keyframes floatSpark {
    0% {
        transform: translateY(100vh) translateX(0) scale(0.5);
        opacity: 0;
    }
    30% { opacity: 0.35; }
    70% { opacity: 0.35; }
    100% {
        transform: translateY(-20px) translateX(15px) scale(0.9);
        opacity: 0;
    }
}

/* Title Header - High-Definition Dark Gaming Plaque Presentation */
.menu-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 5;
    margin-top: 0;
    gap: 1px;
    padding: 4px 14px 6px 14px;
    background: linear-gradient(180deg, rgba(13, 20, 36, 0.90) 0%, rgba(3, 7, 18, 0.96) 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.85), 
                0 0 14px rgba(56, 189, 248, 0.16), 
                inset 0 1px 0 rgba(255, 255, 255, 0.14);
    max-width: 100%;
    box-sizing: border-box;
    animation: darkBannerBob 3.6s infinite ease-in-out, darkAuraPulse 3.6s infinite ease-in-out;
}

.menu-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.85), transparent);
    border-radius: 2px;
    pointer-events: none;
}

.menu-tag-pill {
    font-family: var(--hd-font);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 58, 138, 0.5) 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.7);
    color: #7dd3fc;
    padding: 5px 16px;
    border-radius: 20px;
    letter-spacing: 2px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 16px rgba(56, 189, 248, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.menu-title {
    font-family: var(--hd-font);
    line-height: 0.92;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    margin: 1px 0 1px 0;
}

/* Dark Obsidian Metallic Typography with Specular Light Sweep */
.title-mini {
    font-family: var(--hd-font);
    font-size: clamp(20px, 5.2vw, 26px);
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(
        135deg,
        #0f172a 0%,
        #1e293b 18%,
        #475569 32%,
        #f1f5f9 48%,
        #ffffff 52%,
        #64748b 66%,
        #1e293b 82%,
        #020617 100%
    );
    background-size: 240% 100%;
    animation: darkMetallicSweep 4s infinite ease-in-out;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(2, 6, 23, 0.9);
    filter: drop-shadow(0 2px 0 #020617) 
            drop-shadow(0 3px 0 #000000) 
            drop-shadow(0 0 12px rgba(56, 189, 248, 0.5));
    transform: translateZ(0);
}

.title-miner {
    font-family: var(--hd-font);
    font-size: clamp(25px, 6.6vw, 32px);
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    background: linear-gradient(
        135deg,
        #1c0a00 0%,
        #451a03 18%,
        #78350f 32%,
        #fef08a 48%,
        #ffffff 52%,
        #b45309 66%,
        #451a03 82%,
        #0d0400 100%
    );
    background-size: 240% 100%;
    animation: darkMetallicSweep 4s infinite ease-in-out 0.4s;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(13, 4, 0, 0.95);
    filter: drop-shadow(0 2px 0 #1c0a00) 
            drop-shadow(0 3px 0 #000000) 
            drop-shadow(0 0 14px rgba(245, 158, 11, 0.5));
    transform: translateZ(0);
    margin-top: -2px;
}

.menu-subtitle {
    font-family: var(--hd-font);
    font-size: clamp(7.5px, 2vw, 8.5px);
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 1px;
    padding: 2px 8px;
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.subtitle-beacon {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
    animation: beaconPulse 1.8s infinite ease-in-out;
}

/* Animations for Dark Banner & Typography */
@keyframes darkBannerBob {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes darkAuraPulse {
    0%, 100% {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.90), 
                    0 0 16px rgba(56, 189, 248, 0.18), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.14);
        border-color: rgba(56, 189, 248, 0.32);
    }
    50% {
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.96), 
                    0 0 28px rgba(56, 189, 248, 0.48), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.24);
        border-color: rgba(56, 189, 248, 0.60);
    }
}

@keyframes darkMetallicSweep {
    0%, 15% {
        background-position: 0% 50%;
    }
    50%, 65% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes beaconPulse {
    0%, 100% {
        transform: scale(0.85);
        opacity: 0.5;
        box-shadow: 0 0 4px #38bdf8;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
        box-shadow: 0 0 10px #38bdf8, 0 0 16px #0284c7;
    }
}

/* Cute Miner Showcase - Fully Flexible & Responsive */
.menu-miner-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    flex: 1 1 0;
    min-height: 140px;
    max-height: clamp(220px, 54vh, 460px);
    width: 100%;
    margin: 2px 0 4px 0;
    transform: none;
    box-sizing: border-box;
}

.showcase-glow-ring {
    position: absolute;
    width: min(380px, 92vw);
    height: min(380px, 92vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.14) 0%, rgba(56, 189, 248, 0.05) 50%, transparent 70%);
    animation: ringGlow 4s infinite alternate ease-in-out;
    opacity: 0.50;
    pointer-events: none !important;
}

@keyframes ringGlow {
    from { transform: scale(0.95); opacity: 0.25; }
    to { transform: scale(1.08); opacity: 0.45; }
}

#menu-miner-canvas {
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    aspect-ratio: 440 / 460;
    object-fit: contain;
    display: block;
    z-index: 2;
    image-rendering: auto;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.showcase-platform {
    display: none !important;
}

/* Navigation Controls on Home Menu - Ultra-HD Tactile Gaming UI */
.menu-navigation {
    width: 100%;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    position: relative;
    pointer-events: auto;
    flex-shrink: 0;
    margin: 0 auto;
    margin-bottom: 2px;
    align-items: center;
    box-sizing: border-box;
}

/* Large Hero Menu Buttons - Compact, Non-Overflowing & Animated */
.btn-menu-hero {
    font-family: var(--hd-font);
    width: 100%;
    max-width: 260px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
    border: none;
    flex-shrink: 0;
}

/* Specular Gloss Overlay for Hero Buttons */
.btn-menu-hero::before {
    content: '';
    position: absolute;
    top: 1.5px;
    left: 6px;
    right: 6px;
    height: 42%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.40) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-radius: 10px 10px 14px 14px;
    pointer-events: none;
    z-index: 2;
}

/* Dynamic Shimmer Light-Sweep Animation across buttons */
.btn-menu-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 4;
}

#btn-menu-play::after {
    animation: btnShimmerSweep 3.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

#btn-menu-continue:not(.disabled)::after {
    animation: btnShimmerSweep 3.2s infinite cubic-bezier(0.4, 0, 0.2, 1) 1.6s;
}

@keyframes btnShimmerSweep {
    0% {
        left: -120%;
    }
    30%, 100% {
        left: 200%;
    }
}

.btn-menu-hero .hero-icon {
    font-size: 18px;
    z-index: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.hero-icon-svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    z-index: 3;
    display: inline-block;
    flex-shrink: 0;
}

#btn-menu-play .hero-icon-svg {
    animation: playIconNudge 1.8s infinite ease-in-out;
}

@keyframes playIconNudge {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(2.5px);
    }
}

.btn-menu-hero .hero-text {
    font-family: var(--hd-font);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #ffffff;
    z-index: 3;
    text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.7);
    line-height: 1;
}

.btn-menu-hero .hero-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5px;
    line-height: 1.1;
    z-index: 3;
}

.btn-menu-hero .hero-subtext {
    font-family: var(--hd-font);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fef3c7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    white-space: nowrap;
    line-height: 1;
}

/* Play Button: Emerald HD Gemstone 3D - Matching Heroic Size & Aura */
#btn-menu-play {
    height: 50px;
    width: 100%;
    max-width: 260px;
    border-radius: 13px;
    background: linear-gradient(180deg, #34d399 0%, #10b981 35%, #059669 75%, #047857 100%);
    border-top: 2px solid #d1fae5;
    border-left: 1.5px solid #6ee7b7;
    border-right: 1.5px solid #6ee7b7;
    border-bottom: 4px solid #064e3b;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.45), 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1.5px 0 rgba(255, 255, 255, 0.7);
    animation: playBtnHeroPulse 2.4s infinite ease-in-out;
    transform-origin: center center;
}

#btn-menu-play .hero-text {
    font-size: 16px;
    letter-spacing: 2px;
    font-weight: 900;
}

#btn-menu-play .hero-subtext {
    color: #d1fae5;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

#btn-menu-play .hero-icon-svg {
    width: 22px;
    height: 22px;
    animation: playIconBounce 1.5s infinite ease-in-out;
}

@keyframes playBtnHeroPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 16px rgba(5, 150, 105, 0.40), 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1.5px 0 rgba(255, 255, 255, 0.7);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.70), 0 0 16px rgba(52, 211, 153, 0.50), inset 0 2px 0 rgba(255, 255, 255, 0.95);
        filter: brightness(1.08);
    }
}

@keyframes playIconBounce {
    0%, 100% {
        transform: translateX(0) scale(1);
    }
    50% {
        transform: translateX(3px) scale(1.1);
    }
}

#btn-menu-play:active {
    transform: translateY(2px) scale(0.98) !important;
    border-bottom-width: 2px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35), 0 1px 3px rgba(0, 0, 0, 0.5);
    animation: none !important;
}

/* Continue Button: Molten Amber Treasure 3D - Matching 50px Height & 260px Width */
#btn-menu-continue {
    height: 50px;
    width: 100%;
    max-width: 260px;
    border-radius: 13px;
    background: linear-gradient(180deg, #fde047 0%, #f59e0b 38%, #d97706 80%, #b45309 100%);
    border-top: 1.5px solid #fef08a;
    border-left: 1.5px solid #fde68a;
    border-right: 1.5px solid #fde68a;
    border-bottom: 4px solid #78350f;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.40), 0 2px 5px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#btn-menu-continue .hero-text {
    font-size: 16px;
    letter-spacing: 1.8px;
    font-weight: 900;
}

#btn-menu-continue .hero-subtext {
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #fef3c7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

#btn-menu-continue .hero-icon-svg {
    width: 22px;
    height: 22px;
}

#btn-menu-continue:not(.disabled) {
    animation: continueBtnPulse 2.6s infinite ease-in-out 1.3s;
}

@keyframes continueBtnPulse {
    0%, 100% {
        box-shadow: 0 5px 14px rgba(217, 119, 6, 0.40), 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }
    50% {
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.60), 0 0 14px rgba(254, 240, 138, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
}

#btn-menu-continue:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35), 0 1px 3px rgba(0, 0, 0, 0.5);
    animation: none !important;
}

/* Disabled State for Continue Button - Clean Obsidian Slate Finish */
#btn-menu-continue.disabled {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border: 1.5px solid rgba(148, 163, 184, 0.28) !important;
    border-bottom: 4px solid #090d16 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    opacity: 0.80;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
    transform: none !important;
}

#btn-menu-continue.disabled .hero-icon-svg {
    opacity: 0.45;
}

#btn-menu-continue.disabled .hero-text {
    color: #94a3b8 !important;
    text-shadow: none !important;
}

#btn-menu-continue.disabled .hero-subtext {
    color: #64748b !important;
    text-shadow: none !important;
}

.menu-top-section {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 5;
    margin-top: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Compact Top Action Bars - Top Left Achievements & Top Right Settings */
.menu-top-left-bar {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    left: 12px;
    display: flex;
    align-items: center;
    z-index: 25;
    padding: 0;
    box-sizing: border-box;
}

.menu-top-right-bar,
.menu-top-bar {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 25;
    padding: 0;
    box-sizing: border-box;
}

.menu-top-btn {
    font-family: var(--hd-font);
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.menu-top-btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 2px;
    right: 2px;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 8px 8px 10px 10px;
    pointer-events: none;
    z-index: 2;
}

.menu-top-btn:active {
    transform: translateY(2px);
    border-bottom-width: 2px !important;
}

.menu-top-btn .top-btn-icon {
    font-size: 16px;
    line-height: 1;
    z-index: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Sub-btn Specific Color Schemes */
#btn-menu-upgrades {
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 45%, #0369a1 85%, #0c4a6e 100%);
    border-top: 1px solid #bae6fd;
    border-left: 1px solid #7dd3fc;
    border-right: 1px solid #7dd3fc;
    border-bottom: 3.5px solid #082f49;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4), 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

#btn-menu-achievements {
    background: linear-gradient(180deg, #c084fc 0%, #9333ea 45%, #7e22ce 85%, #581c87 100%);
    border-top: 1px solid #f3e8ff;
    border-left: 1px solid #d8b4fe;
    border-right: 1px solid #d8b4fe;
    border-bottom: 3.5px solid #3b0764;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4), 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

#btn-menu-settings {
    background: linear-gradient(180deg, #64748b 0%, #475569 45%, #334155 85%, #1e293b 100%);
    border-top: 1px solid #cbd5e1;
    border-left: 1px solid #94a3b8;
    border-right: 1px solid #94a3b8;
    border-bottom: 3.5px solid #0f172a;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.4), 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Menu Footer Tag (Deleted as requested) */
.menu-footer-bar {
    display: none !important;
}

/* ==========================================================
   2. GAMEPLAY VIEW (UNDERGROUND MINING SCREEN)
   ========================================================== */
#gameplay-view {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    z-index: 20;
}

/* HALF SCREEN MODE (50% Mining Canvas, 50% Gamepad Console Deck) */
#gameplay-view.half-screen-mode #hud {
    flex: 0 0 46px;
    height: 46px;
    padding: 0 8px;
}

#gameplay-view.half-screen-mode #canvas-wrapper {
    flex: 0 0 calc(50% - 46px);
    height: calc(50% - 46px);
    border-bottom: 4px solid #334155;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
}

#gameplay-view.half-screen-mode #controls {
    flex: 0 0 50%;
    height: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: radial-gradient(circle at 50% 0%, #172554 0%, #090e17 55%, #030712 100%);
    border-top: 3px solid #1e293b;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08);
}

#gameplay-view.half-screen-mode .controls-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 8px;
}

#gameplay-view.half-screen-mode .move-arrow-btn {
    width: 64px;
    height: 72px;
}

#gameplay-view.half-screen-mode .dig-btn {
    width: 98px;
    height: 94px;
}

#gameplay-view.half-screen-mode .sub-btn {
    width: 70px;
    height: 80px;
}

/* Console Deck Top Bar */
.deck-top-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    margin-bottom: 4px;
}

.deck-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.deck-led {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: ledPulse 1.8s infinite alternate ease-in-out;
}

@keyframes ledPulse {
    from { opacity: 0.6; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.15); box-shadow: 0 0 12px #34d399; }
}

.deck-title {
    font-size: 7px;
    letter-spacing: 1px;
    color: #94a3b8;
    font-weight: bold;
}

.deck-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.deck-pill-btn {
    font-size: 7px !important;
    padding: 5px 8px !important;
    border-radius: 6px !important;
    letter-spacing: 0.5px;
}

.controls-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Fallback Full Screen */
#gameplay-view:not(.half-screen-mode) .deck-top-bar {
    display: none;
}

/* Top HUD Bar - Hidden per user request */
#hud {
    display: none !important;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.hud-item:active {
    transform: scale(0.95);
}

.hud-coins {
    color: #fde047;
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(180deg, rgba(30, 27, 75, 0.5), rgba(15, 23, 42, 0.85));
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.hud-cargo {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.45);
    background: linear-gradient(180deg, rgba(12, 74, 110, 0.4), rgba(15, 23, 42, 0.85));
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.hud-depth {
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.45);
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.4), rgba(15, 23, 42, 0.85));
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.hud-icon {
    font-size: 14px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.hud-btn {
    background: linear-gradient(180deg, #475569, #334155);
    border: 2px solid #64748b;
    border-bottom: 3px solid #1e293b;
    color: #fff;
    font-size: 15px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.05s ease;
}

.hud-btn:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
    background: #1e293b;
}

.hud-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-home-btn {
    background: linear-gradient(180deg, #1e3a8a, #172554);
    border: 2px solid #3b82f6;
    border-bottom: 3px solid #1d4ed8;
}

.hud-home-btn:active {
    background: #0f172a;
}

/* Main Canvas Wrapper */
#canvas-wrapper {
    flex: 1 1 auto;
    width: 100%;
    position: relative;
    background: #090e17;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Surface Depot Prompt Banner - Hidden */
.surface-banner, #surface-prompt {
    display: none !important;
}

.surface-banner .banner-text {
    font-size: 8px;
    color: #fef08a;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Bag Full Alert Banner */
.bag-full-alert {
    position: absolute;
    top: 60px;
    left: 12px;
    right: 12px;
    background: rgba(220, 38, 38, 0.95);
    border: 3px solid #fecaca;
    color: #fff;
    font-size: 9px;
    line-height: 1.4;
    padding: 8px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    z-index: 15;
    pointer-events: none;
    animation: flashAlert 0.8s infinite alternate;
}

@keyframes flashAlert {
    from { opacity: 0.85; transform: scale(0.98); }
    to { opacity: 1.0; transform: scale(1.02); }
}

/* ==========================================================
   3. LARGE TOUCH CONTROLS (PORTRAIT FINGER FRIENDLY)
   ========================================================== */
#controls {
    flex: 0 0 auto;
    min-height: 104px;
    height: auto;
    background: linear-gradient(180deg, #0e1726 0%, #080d18 55%, #030712 100%);
    border-top: 2px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    padding-bottom: max(10px, calc(env(safe-area-inset-bottom) + 8px));
    z-index: 20;
    gap: clamp(4px, 1.5vw, 8px);
    box-sizing: border-box;
    width: 100%;
}

/* Base Touch Button styling */
.touch-btn {
    border: none;
    outline: none;
    cursor: pointer;
    touch-action: none;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.06s ease, filter 0.06s ease, box-shadow 0.06s ease, border-bottom-width 0.06s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

/* ==========================================================
   MOVEMENT CONTROLS (TACTILE SQUIRCLE D-PAD)
   ========================================================== */
.dpad-cluster {
    display: flex;
    align-items: center;
    gap: clamp(5px, 1.5vw, 8px);
    height: 72px;
    flex-shrink: 0;
}

/* Dedicated Arrow-Only Movement Buttons */
.move-arrow-btn {
    width: clamp(52px, 14.5vw, 64px);
    height: 72px;
    background: linear-gradient(180deg, #243247 0%, #131b29 100%);
    border: 1.5px solid #475569;
    border-bottom: 4px solid #090e17;
    border-radius: 16px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

.move-arrow-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    border-radius: inherit;
}

#btn-left {
    border-radius: 16px;
}

#btn-right {
    border-radius: 16px;
}

.move-arrow-btn .dpad-arrow {
    font-size: 26px;
    line-height: 1;
    color: #38bdf8;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    font-weight: 900;
    transition: transform 0.08s ease;
}

.move-arrow-btn:active,
.move-arrow-btn.active {
    transform: translateY(2px) scale(0.97);
    border-bottom-width: 2px;
    background: linear-gradient(180deg, #1b2637 0%, #0c121c 100%);
    filter: brightness(1.25);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.move-arrow-btn:active .dpad-arrow,
.move-arrow-btn.active .dpad-arrow {
    transform: scale(0.92);
    color: #7dd3fc;
}

/* D-Pad Active Press state */
.dpad-btn:active,
.dpad-btn.active {
    transform: translateY(2px) scale(0.97);
    border-bottom-width: 2px;
    background: linear-gradient(180deg, #1d283a 0%, #0d131e 100%);
    filter: brightness(1.2);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.dpad-btn:active .dpad-arrow,
.dpad-btn.active .dpad-arrow,
.dpad-btn:active .vpad-arrow,
.dpad-btn.active .vpad-arrow {
    color: #7dd3fc;
    filter: drop-shadow(0 0 6px #38bdf8);
}

/* ==========================================================
   ACTION CLUSTER (SURFACE RECALL & PRIMARY DIG)
   ========================================================== */
.action-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.8vw, 10px);
    height: 84px;
    width: 100%;
    max-width: 480px;
    flex-shrink: 0;
}

/* SURFACE RECALL BUTTON */
.sub-btn {
    width: clamp(54px, 15vw, 68px);
    height: 84px;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 50%, #1e3a8a 100%);
    border: 1.5px solid #93c5fd;
    border-bottom: 4px solid #0f172a;
    border-radius: 16px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    position: relative;
    overflow: hidden;
    padding: 0;
}

.sub-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 38%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    border-radius: inherit;
}

.btn-subicon {
    font-size: 18px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
    line-height: 1;
}

.btn-subtext {
    font-size: 7.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

.sub-btn:active,
.sub-btn.active {
    transform: translateY(2px) scale(0.97);
    border-bottom-width: 2px;
    background: linear-gradient(180deg, #1d4ed8 0%, #172554 100%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.4);
    filter: brightness(1.15);
}

/* Surface Button active state when laborer is sent to surface */
#btn-surface.active-surface {
    background: linear-gradient(180deg, #10b981 0%, #059669 45%, #047857 85%, #064e3b 100%) !important;
    border-color: #6ee7b7 !important;
    border-bottom: 4px solid #022c22 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.65), 0 4px 12px rgba(5, 150, 105, 0.45), inset 0 1.5px 0 rgba(255, 255, 255, 0.5) !important;
    animation: pulseSurfaceGlow 2s infinite ease-in-out;
}

#btn-surface.active-surface:active {
    transform: translateY(2px) scale(0.97);
    border-bottom-width: 2px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

@keyframes pulseSurfaceGlow {
    0%, 100% {
        box-shadow: 0 0 14px rgba(16, 185, 129, 0.6), 0 4px 12px rgba(5, 150, 105, 0.4), inset 0 1.5px 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 22px rgba(52, 211, 153, 0.95), 0 4px 16px rgba(5, 150, 105, 0.65), inset 0 1.5px 0 rgba(255, 255, 255, 0.7);
    }
}

/* ==========================================================
   DIRECTIONAL DIGGING CLUSTER (LEFT, DOWN, RIGHT, FACING)
   ========================================================== */
.dig-cluster {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.8vw, 10px);
    height: 84px;
    flex-shrink: 0;
}

/* Base style for all buttons in dig-cluster */
.dig-btn {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 35%, #d97706 75%, #b45309 100%);
    border: 1.5px solid #fef08a;
    border-bottom: 4px solid #78350f;
    border-radius: 16px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    position: relative;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

.dig-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 38%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    border-radius: inherit;
}

/* Side Dig Buttons: LEFT and RIGHT */
.dig-side-btn {
    width: clamp(68px, 19vw, 92px);
    height: 84px;
    gap: 3px;
    border-radius: 16px;
}

#btn-dig-left {
    border-radius: 16px;
}

#btn-dig-right {
    border-radius: 16px;
}

.dig-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}

.dig-side-btn .dig-arrow {
    font-size: 24px;
    line-height: 1;
    color: #fef08a;
    filter: drop-shadow(0 1px 3px rgba(120, 53, 15, 0.9));
    font-weight: 900;
}

.dig-side-btn .dig-subtext {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.8px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(120, 53, 15, 0.95);
    line-height: 1;
    margin-top: 3px;
}

/* Center Column: PRIMARY DIG (BADA & PROMINENT) */
.dig-vcol {
    display: flex;
    flex-direction: column;
    height: 84px;
    width: clamp(105px, 30vw, 150px);
    justify-content: center;
    align-items: center;
}

.dig-center-btn {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dig-main-btn {
    width: 100%;
    height: 84px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fef08a 0%, #f59e0b 38%, #d97706 72%, #b45309 100%);
    border: 2px solid #fffbeb;
    border-bottom: 5px solid #78350f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.7);
    animation: digGlow 2.5s infinite alternate ease-in-out;
}

.dig-main-btn .btn-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    line-height: 1;
}

.dig-main-btn .btn-label {
    font-size: 13px;
    letter-spacing: 1.2px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(120, 53, 15, 0.95);
    line-height: 1;
}

/* Active Pressed States for Dig Buttons */
.dig-btn:active,
.dig-btn.active {
    transform: translateY(2px) scale(0.97);
    border-bottom-width: 2px;
    background: linear-gradient(180deg, #d97706 0%, #92400e 100%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.4);
    filter: brightness(1.15);
}

@keyframes digGlow {
    from {
        box-shadow: 0 4px 10px rgba(245, 158, 11, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    to {
        box-shadow: 0 4px 16px rgba(251, 191, 36, 0.70), 0 0 10px rgba(254, 240, 138, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    }
}

/* ==========================================================
   4. MODALS (UPGRADES, ACHIEVEMENTS, SETTINGS, PAUSE)
   ========================================================== */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 15, 0.88);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50;
    transition: opacity 0.2s ease;
}

.modal-box {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    background: #0f172a;
    border: 4px solid #38bdf8;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    background: #1e293b;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #334155;
}

.modal-header h2 {
    font-size: 10px;
    color: #f8fafc;
    letter-spacing: 0.5px;
}

.close-btn {
    background: #ef4444;
    border: 2px solid #fecaca;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:active {
    transform: scale(0.9);
}

.modal-wallet-bar {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 8px;
    border-bottom: 2px solid #1e293b;
}

.wallet-label {
    color: #94a3b8;
}

.wallet-amount {
    color: #fbbf24;
    font-size: 10px;
    font-weight: bold;
}

.modal-body-scroll {
    overflow-y: auto;
    padding: 12px;
    max-height: 55vh;
}

.modal-footer {
    padding: 10px 14px;
    background: #1e293b;
    border-top: 2px solid #334155;
    display: flex;
    justify-content: center;
}

/* ==========================================================
   5. UPGRADE & SHOP STYLES
   ========================================================== */
.shop-section {
    padding: 12px;
    overflow-y: auto;
    max-height: 55vh;
}

.shop-section h3 {
    font-size: 9px;
    color: #94a3b8;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.loot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.loot-card {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 8px;
}

.upgrade-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upgrade-card {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.upg-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upg-icon {
    font-size: 20px;
}

.upg-name {
    font-size: 9px;
    font-weight: bold;
    color: #f8fafc;
    margin-bottom: 3px;
}

.upg-desc {
    font-size: 7px;
    color: #94a3b8;
    line-height: 1.3;
}

.upg-buy-btn {
    min-width: 76px;
    padding: 8px 6px;
    font-size: 8px;
    background: linear-gradient(180deg, #059669, #047857);
    border: 2px solid #6ee7b7;
    border-bottom: 4px solid #064e3b;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.upg-buy-btn:disabled {
    background: #475569;
    border-color: #64748b;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==========================================================
   6. PREMIUM ACHIEVEMENTS MODAL STYLES (GOLD & OBSIDIAN THEME)
   ========================================================== */
.achieve-modal-box {
    max-width: 420px;
    width: 92%;
    max-height: 90vh;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.18) 0%, rgba(15, 23, 42, 0) 65%),
                linear-gradient(180deg, #0d1527 0%, #060a14 100%) !important;
    border: 2px solid #f59e0b !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 
                0 0 35px rgba(245, 158, 11, 0.35),
                inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    overflow: hidden;
    animation: achieveModalPop 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

@keyframes achieveModalPop {
    0% { transform: scale(0.9) translateY(12px); opacity: 0; }
    100% { transform: scale(1.0) translateY(0); opacity: 1; }
}

.achieve-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px !important;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.2) 0%, rgba(14, 23, 42, 0.6) 100%) !important;
    border-bottom: 2px solid rgba(245, 158, 11, 0.4) !important;
}

.achieve-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.achieve-header-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.8));
}

.achieve-modal-header h2 {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #fef3c7;
    margin: 0;
    text-shadow: 0 0 14px rgba(245, 158, 11, 0.85);
}

/* ==========================================================
   MINING STATS WIDGET (DIAMONDS & PIT DEPTH SUMMARY)
   ========================================================== */
.achieve-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 10px;
    margin: 10px 14px 4px 14px;
    background: linear-gradient(135deg, rgba(22, 34, 58, 0.95) 0%, rgba(11, 19, 34, 0.98) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.achieve-stat-item {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    justify-content: center;
}

.achieve-stat-icon {
    font-size: 19px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.achieve-stat-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.achieve-stat-val {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 0.4px;
    color: #f8fafc;
    line-height: 1.1;
}

#stat-diamonds-count {
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

#stat-current-depth {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}


.achieve-stat-lbl {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #94a3b8;
    margin-top: 1px;
}

.achieve-stat-divider {
    width: 1px;
    height: 24px;
    background: rgba(245, 158, 11, 0.25);
    margin: 0 2px;
}

.achieve-body-scroll {
    overflow-y: auto;
    padding: 8px 14px 10px;
    max-height: 56vh;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.achieve-body-scroll::-webkit-scrollbar {
    display: none;
}

.achieve-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.achieve-card {
    background: linear-gradient(135deg, rgba(22, 34, 58, 0.9) 0%, rgba(11, 19, 34, 0.96) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.26);
    border-radius: 14px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.achieve-card.completed {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(50, 32, 16, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.3), 0 4px 16px rgba(0, 0, 0, 0.5);
}

.achieve-card.claimed {
    border-color: rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(11, 19, 34, 0.92) 100%);
    opacity: 0.85;
}

.achieve-icon-badge {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(30, 41, 59, 0.8) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.achieve-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.achieve-title {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #f8fafc;
    line-height: 1.2;
    white-space: nowrap;
}

.achieve-desc {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.2;
}

.achieve-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.achieve-bar-wrapper {
    flex: 1;
    height: 5px;
    background: rgba(15, 23, 42, 0.85);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.achieve-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.achieve-card.claimed .achieve-bar-fill {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.achieve-progress-text {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 9.5px;
    font-weight: 800;
    color: #cbd5e1;
    flex-shrink: 0;
}

.achieve-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.achieve-claim-btn {
    font-family: var(--hd-font, 'Outfit', sans-serif) !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
    letter-spacing: 0.5px;
    padding: 6px 10px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 1.5px solid #6ee7b7 !important;
    border-bottom: 2.5px solid #047857 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5) !important;
    cursor: pointer;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: transform 0.08s ease;
}

.achieve-claim-btn:active {
    transform: translateY(2px);
    border-bottom: 1.5px solid #047857 !important;
}

.achieve-claimed-badge {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
    padding: 5px 8px;
    white-space: nowrap;
}

.achieve-progress-badge {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 5px 8px;
    white-space: nowrap;
}

.achieve-modal-footer {
    padding: 10px 16px 14px;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1.5px solid rgba(245, 158, 11, 0.25);
}

.achieve-back-btn {
    font-family: var(--hd-font, 'Outfit', sans-serif) !important;
    font-size: 13.5px !important;
    font-weight: 900 !important;
    letter-spacing: 1.2px;
    padding: 11px 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
    border: 2px solid #fde68a !important;
    border-bottom: 4px solid #92400e !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    width: 100% !important;
}

.achieve-back-btn:active {
    transform: translateY(2px);
    border-bottom: 2px solid #92400e !important;
}

/* ==========================================================
   7. PREMIUM SETTINGS MODAL STYLES (CYAN & OBSIDIAN SLIDER THEME)
   ========================================================== */
.settings-modal-box {
    max-width: 380px;
    width: 90%;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.22) 0%, rgba(15, 23, 42, 0) 65%),
                linear-gradient(180deg, #0d1527 0%, #060a14 100%) !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 
                0 0 35px rgba(56, 189, 248, 0.35),
                inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    overflow: hidden;
    animation: settingsModalPop 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

@keyframes settingsModalPop {
    0% { transform: scale(0.9) translateY(12px); opacity: 0; }
    100% { transform: scale(1.0) translateY(0); opacity: 1; }
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px !important;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 23, 42, 0.6) 100%) !important;
    border-bottom: 2px solid rgba(56, 189, 248, 0.4) !important;
}

.settings-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-header-icon {
    font-size: 22px;
    filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.8));
    animation: spinGear 14s linear infinite;
}

@keyframes spinGear {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.settings-modal-header h2 {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #f0f9ff;
    margin: 0;
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.85);
}

.settings-content {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(22, 34, 58, 0.9) 0%, rgba(11, 19, 34, 0.95) 100%) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.3) !important;
    border-radius: 16px !important;
    padding: 13px 15px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.setting-row:hover {
    border-color: rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.25) !important;
}

.setting-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Vibrant Icon Thumbnails */
.setting-thumb {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.thumb-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

.thumb-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.5);
}

.thumb-purple {
    background: linear-gradient(135deg, #a855f7 0%, #6d28d9 100%);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.setting-title {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #f8fafc;
}

.setting-desc {
    font-family: var(--hd-font, 'Outfit', sans-serif);
    font-size: 9.5px;
    color: #94a3b8;
    line-height: 1.25;
}

/* ==========================================================
   AUTHENTIC MOBILE SLIDING THUMB TOGGLE SWITCH ("THAMBEL")
   ========================================================== */
.setting-toggle {
    width: 76px !important;
    min-width: 76px !important;
    height: 38px !important;
    border-radius: 38px !important;
    position: relative !important;
    cursor: pointer !important;
    font-family: var(--hd-font, 'Outfit', sans-serif) !important;
    letter-spacing: 1px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none !important;
}

/* Sliding Thumb Circle Knob ("thambel") */
.setting-toggle::after {
    content: '' !important;
    position: absolute !important;
    top: 4px !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* When Switch is ON */
.setting-toggle.btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 2px solid #6ee7b7 !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    justify-content: flex-start !important;
    padding-left: 14px !important;
    padding-right: 0 !important;
}

.setting-toggle.btn-green::after {
    right: 4px !important;
    left: auto !important;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e2e8f0 70%, #cbd5e1 100%) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), 0 0 6px rgba(255, 255, 255, 0.9) !important;
}

/* When Switch is OFF */
.setting-toggle.btn-slate {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border: 2px solid #475569 !important;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.6) !important;
    color: #94a3b8 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-shadow: none !important;
    justify-content: flex-end !important;
    padding-right: 14px !important;
    padding-left: 0 !important;
}

.setting-toggle.btn-slate::after {
    left: 4px !important;
    right: auto !important;
    background: radial-gradient(circle at 35% 35%, #94a3b8 0%, #64748b 70%, #475569 100%) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5) !important;
}

/* Remove default bullet markers */
.setting-toggle.btn-slate::before,
.setting-toggle.btn-green::before {
    display: none !important;
}

.settings-modal-footer {
    padding: 14px 18px 18px;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1.5px solid rgba(56, 189, 248, 0.25);
}

.settings-back-btn {
    font-family: var(--hd-font, 'Outfit', sans-serif) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    letter-spacing: 1.2px;
    padding: 13px 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%) !important;
    border: 2px solid #bae6fd !important;
    border-bottom: 4px solid #0369a1 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.45) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.settings-back-btn:active {
    transform: translateY(2px);
    border-bottom: 2px solid #0369a1 !important;
}

/* ==========================================================
   8. PIXEL BUTTON UTILITIES
   ========================================================== */
.pixel-btn {
    font-family: 'Press Start 2P', monospace;
    border: 2px solid #fff;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.05s, filter 0.05s;
}

.pixel-btn:active {
    transform: translateY(2px);
}

.btn-green {
    background: linear-gradient(180deg, #10b981, #059669);
    border-color: #a7f3d0;
    border-bottom: 5px solid #064e3b;
    color: #fff;
}

.btn-gold {
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border-color: #fde68a;
    border-bottom: 5px solid #78350f;
    color: #fff;
}

.btn-blue {
    background: linear-gradient(180deg, #0284c7, #0369a1);
    border-color: #bae6fd;
    border-bottom: 4px solid #0c4a6e;
    color: #fff;
}

.btn-purple {
    background: linear-gradient(180deg, #9333ea, #7e22ce);
    border-color: #e9d5ff;
    border-bottom: 4px solid #581c87;
    color: #fff;
}

.btn-slate {
    background: linear-gradient(180deg, #475569, #334155);
    border-color: #94a3b8;
    border-bottom: 4px solid #0f172a;
    color: #fff;
}

.btn-danger {
    background: linear-gradient(180deg, #dc2626, #b91c1c);
    border-color: #fecaca;
    border-bottom: 4px solid #7f1d1d;
    color: #fff;
    padding: 8px 12px;
    font-size: 8px;
}

.btn-large {
    width: 100%;
    padding: 12px 10px;
    font-size: 9px;
    border-bottom: 4px solid #047857;
}

.btn-full {
    width: 100%;
    padding: 12px 10px;
    font-size: 9px;
    border-bottom-width: 4px;
}

.pause-content {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Compact Mobile Screen Optimizations (Screens < 680px height) */
@media (max-height: 680px) {
    #home-view {
        padding: 6px 12px 14px 12px;
        padding-top: max(6px, env(safe-area-inset-top));
        padding-bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px));
    }
    .menu-header {
        margin-top: 0;
        padding: 3px 12px 5px 12px;
    }
    .menu-tag-pill {
        margin-bottom: 2px;
        padding: 2.5px 10px;
        font-size: 8.5px;
    }
    .title-mini {
        font-size: 20px;
        letter-spacing: 3.5px;
    }
    .title-miner {
        font-size: 25px;
        letter-spacing: 4px;
    }
    .menu-subtitle {
        font-size: 7.5px;
        margin-top: 1px;
        padding: 1.5px 6px;
    }
    .menu-miner-showcase {
        margin: 2px 0;
        max-height: clamp(160px, 46vh, 320px);
        transform: none;
    }
    #menu-miner-canvas {
        max-height: 100%;
        max-width: 100%;
        width: auto;
        height: auto;
    }
    .showcase-glow-ring {
        width: 260px;
        height: 260px;
    }
    .showcase-platform {
        display: none !important;
    }
    .btn-menu-hero {
        border-radius: 10px;
        gap: 8px;
        padding: 0 12px;
    }
    .btn-menu-hero .hero-subtext {
        font-size: 8px;
    }
    .menu-navigation {
        max-width: 250px;
        gap: 6px;
        margin-bottom: 0;
    }
    .menu-sub-row {
        max-width: 250px;
        gap: 6px;
    }
    .btn-menu-sub-btn {
        height: 32px;
        font-size: 9.5px;
    }
    #btn-menu-play {
        height: 46px;
        width: 100%;
        max-width: 250px;
        border-radius: 12px;
    }
    #btn-menu-play .hero-text {
        font-size: 15px;
        letter-spacing: 1.8px;
    }
    #btn-menu-play .hero-icon-svg {
        width: 20px;
        height: 20px;
    }
    #btn-menu-continue {
        height: 46px;
        width: 100%;
        max-width: 250px;
        border-radius: 12px;
    }
    #btn-menu-continue .hero-text {
        font-size: 15px;
        letter-spacing: 1.6px;
    }
    #btn-menu-continue .hero-icon-svg {
        width: 20px;
        height: 20px;
    }
    .menu-top-btn {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        padding: 0;
        border-radius: 8px;
    }
    .menu-top-btn .top-btn-icon {
        font-size: 15px;
    }
    #controls {
        height: auto;
        min-height: 84px;
        padding: 6px 8px;
        padding-bottom: max(10px, calc(env(safe-area-inset-bottom) + 6px));
    }
    .dpad-cluster,
    .move-arrow-btn,
    .action-cluster,
    .sub-btn,
    .dig-btn,
    .dig-cluster,
    .dig-side-btn,
    .dig-vcol {
        height: 64px;
    }
    .dig-main-btn {
        height: 34px;
    }
    .dig-down-btn {
        height: 26px;
    }
}

/* ==========================================================
   6. CLEAN DIAMOND DEPOSIT CELEBRATION MODAL
   ========================================================== */
#diamond-deposit-modal {
    z-index: 5000 !important;
    pointer-events: auto !important;
}

#diamond-deposit-modal:not(.hidden) {
    display: flex !important;
}

.diamond-modal-box {
    max-width: 280px;
    width: 86%;
    padding: 0;
    border-radius: 18px;
    border: 1.5px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.9), 0 0 24px rgba(56, 189, 248, 0.22);
    background: linear-gradient(180deg, #0b1528 0%, #080f1d 100%);
    overflow: hidden;
    animation: diamondModalPop 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

@keyframes diamondModalPop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1.0); opacity: 1; }
}

.diamond-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(14, 165, 233, 0.12);
    border-bottom: 1px solid rgba(56, 189, 248, 0.25);
}

.diamond-modal-header h2 {
    font-family: var(--hd-font);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.2px;
    color: #e0f2fe;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.diamond-modal-body {
    padding: 14px 16px 10px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.diamond-gem-showcase {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 4px 0;
}

.diamond-pulse-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px dashed rgba(56, 189, 248, 0.6);
    animation: rotatePulseRing 10s linear infinite;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

@keyframes rotatePulseRing {
    0% { transform: rotate(0deg) scale(0.95); }
    50% { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(0.95); }
}

.diamond-big-icon {
    font-size: 36px;
    filter: drop-shadow(0 0 14px #38bdf8);
    animation: diamondFloat 2.2s ease-in-out infinite;
}

@keyframes diamondFloat {
    0%, 100% { transform: translateY(0) scale(1.0); }
    50% { transform: translateY(-4px) scale(1.06); }
}

.diamond-sparkle {
    position: absolute;
    font-size: 13px;
    pointer-events: none;
    animation: sparkleGlint 1.6s ease-in-out infinite;
}

.diamond-sparkle.s1 { top: -2px; left: 4px; animation-delay: 0s; }
.diamond-sparkle.s2 { bottom: 2px; right: 4px; animation-delay: 0.8s; color: #facc15; }

@keyframes sparkleGlint {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1.0; transform: scale(1.2); }
}

.diamond-reward-coins {
    font-family: var(--hd-font);
    font-size: 26px;
    font-weight: 900;
    color: #fbbf24;
    letter-spacing: 1px;
    text-shadow: 0 0 16px rgba(251, 191, 36, 0.65), 0 2px 4px rgba(0, 0, 0, 0.9);
    margin: 0;
    line-height: 1;
}

.diamond-reward-label {
    font-family: var(--hd-font);
    font-size: 9.5px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.diamond-stats-pill {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 20px;
    font-size: 8.5px;
    color: #94a3b8;
}

.diamond-stats-pill strong {
    color: #f8fafc;
    font-weight: 800;
}

.diamond-stats-pill .pill-dot {
    color: #475569;
}

.diamond-modal-footer {
    padding: 8px 16px 14px 16px;
    background: transparent;
    border-top: none;
    display: flex;
    justify-content: center;
}

.diamond-modal-footer #btn-diamond-continue {
    height: 46px;
    border-radius: 14px;
    font-family: var(--hd-font);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.2px;
    border-bottom-width: 4px;
    width: 100%;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
}

.diamond-modal-footer #btn-diamond-continue:active {
    transform: translateY(2px) scale(0.98);
}

/* ==========================================================
   9. SUB-NAVIGATION ROW (MORE GAMES & EXIT) & MODAL STYLES
   ========================================================== */
.menu-sub-row {
    width: 100%;
    max-width: 260px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-top: 3px;
    box-sizing: border-box;
}

.btn-menu-sub-btn {
    flex: 1;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--hd-font);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    padding: 0 8px;
    box-sizing: border-box;
}

.btn-menu-sub-btn:active {
    transform: translateY(2px);
    border-bottom-width: 1.5px;
}

.btn-menu-sub-btn .sub-btn-icon {
    font-size: 12px;
    line-height: 1;
}

/* More Games Button: Cyber Arcade Cyan/Blue Accent */
.btn-menu-more-btn {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.90) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-bottom: 2.5px solid #0369a1;
    color: #38bdf8;
}

.btn-menu-more-btn:hover {
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 3px 12px rgba(56, 189, 248, 0.25);
}

/* Exit Button: Obsidian Slate Crimson Accent */
.btn-menu-exit-btn {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-bottom: 2.5px solid #090d16;
    color: #94a3b8;
}

.btn-menu-exit-btn:hover {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.45);
}

/* ==========================================================
   10. MORE GAMES SHOWCASE MODAL STYLES
   ========================================================== */
.more-games-modal-box {
    max-width: 330px;
    width: 92%;
    max-height: 84vh;
    border-radius: 20px;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.16) 0%, rgba(15, 23, 42, 0) 65%),
                linear-gradient(180deg, #161e31 0%, #090d18 100%) !important;
    border: 2px solid rgba(56, 189, 248, 0.45) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 
                0 0 30px rgba(56, 189, 248, 0.20),
                inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: exitModalPop 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

.more-games-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px !important;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.18) 0%, rgba(15, 23, 42, 0.6) 100%) !important;
    border-bottom: 1.5px solid rgba(56, 189, 248, 0.3) !important;
    flex-shrink: 0;
}

.more-games-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.more-games-header-left h2 {
    font-family: var(--hd-font);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #38bdf8;
    margin: 0;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.more-games-header-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.more-games-modal-body {
    padding: 12px 14px 8px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.more-games-intro-box {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    background: rgba(30, 41, 59, 0.5);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.intro-sparkle {
    font-size: 13px;
}

.more-games-intro {
    font-family: var(--hd-font);
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    margin: 0;
    line-height: 1.3;
}

.more-games-toast {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    font-family: var(--hd-font);
    font-size: 11px;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
    animation: exitModalPop 0.2s ease;
}

.more-games-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.more-game-featured-card {
    display: flex;
    flex-direction: column;
    padding: 14px 14px 16px;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.15) 0%, rgba(30, 41, 59, 0.7) 70%),
                rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    gap: 12px;
}

.featured-game-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.featured-game-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0284c7 0%, #0f172a 100%);
    border: 1.5px solid #38bdf8;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.featured-game-title-wrap {
    flex: 1;
    min-width: 0;
}

.featured-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.featured-game-title {
    font-family: var(--hd-font);
    font-size: 15px;
    font-weight: 900;
    color: #f8fafc;
    margin: 0;
    letter-spacing: 0.5px;
}

.featured-game-genre {
    font-family: var(--hd-font);
    font-size: 9.5px;
    color: #38bdf8;
    font-weight: 700;
}

.featured-game-desc {
    font-family: var(--hd-font);
    font-size: 10px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

.featured-tags-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.featured-tag {
    font-family: var(--hd-font);
    font-size: 8px;
    font-weight: 800;
    padding: 3px 8px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 6px;
    color: #cbd5e1;
}

.featured-play-btn {
    height: 42px;
    border-radius: 12px;
    font-family: var(--hd-font);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    border-bottom-width: 3.5px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45);
    cursor: pointer;
}

.more-game-badge {
    font-family: var(--hd-font);
    font-size: 7px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.badge-hot {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.meta-rating {
    color: #facc15;
    font-weight: 800;
    font-size: 9px;
}

.more-games-modal-footer {
    padding: 10px 14px 14px;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-shrink: 0;
}

.more-games-close-btn {
    width: 100%;
    height: 38px;
    border-radius: 11px;
    font-family: var(--hd-font);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    cursor: pointer;
}

.exit-modal-box {
    max-width: 310px;
    width: 90%;
    border-radius: 20px;
    background: radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.22) 0%, rgba(15, 23, 42, 0) 65%),
                linear-gradient(180deg, #161e31 0%, #090d18 100%) !important;
    border: 2px solid rgba(239, 68, 68, 0.55) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 
                0 0 30px rgba(239, 68, 68, 0.28),
                inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    overflow: hidden;
    animation: exitModalPop 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

@keyframes exitModalPop {
    0% { transform: scale(0.9) translateY(12px); opacity: 0; }
    100% { transform: scale(1.0) translateY(0); opacity: 1; }
}

.exit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px !important;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.2) 0%, rgba(15, 23, 42, 0.6) 100%) !important;
    border-bottom: 1.5px solid rgba(239, 68, 68, 0.35) !important;
}

.exit-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.exit-header-left h2 {
    font-family: var(--hd-font);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #f87171;
    margin: 0;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.exit-header-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}

.exit-modal-body {
    padding: 18px 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.exit-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.25) 0%, rgba(15, 23, 42, 0.9) 70%);
    border: 1.5px solid rgba(239, 68, 68, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}

.exit-confirm-heading {
    font-family: var(--hd-font);
    font-size: 14px;
    font-weight: 800;
    color: #f8fafc;
    margin: 10px 0 3px;
}

.exit-confirm-desc {
    font-family: var(--hd-font);
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.35;
}

.exit-autosave-badge {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 999px;
    font-family: var(--hd-font);
    font-size: 8.5px;
    font-weight: 800;
    color: #34d399;
}

.exit-autosave-badge .autosave-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px #34d399;
}

.exit-modal-footer {
    padding: 12px 16px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 10px;
}

.exit-btn {
    flex: 1;
    height: 42px;
    border-radius: 12px;
    font-family: var(--hd-font);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition: transform 0.08s ease;
}

.exit-btn:active {
    transform: translateY(2px);
}

/* ==========================================================
   10. REALISTIC MOBILE VIDEO / INTERSTITIAL AD MODAL
   ========================================================== */
#ad-video-modal {
    z-index: 6000 !important;
    pointer-events: auto !important;
}

#ad-video-modal:not(.hidden) {
    display: flex !important;
}

.ad-modal-box {
    max-width: 320px;
    width: 88%;
    padding: 0;
    border-radius: 20px;
    border: 1.5px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(245, 158, 11, 0.25);
    background: linear-gradient(180deg, #131a2b 0%, #0a0e18 100%);
    overflow: hidden;
    animation: diamondModalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

.ad-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ad-badge-pill {
    font-family: var(--hd-font);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #facc15;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.ad-timer-badge {
    font-family: var(--hd-font);
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.8);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-close-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ad-close-btn:active {
    transform: scale(0.9);
    background: rgba(239, 68, 68, 0.4);
}

.ad-creative-body {
    padding: 14px 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.ad-media-card {
    position: relative;
    width: 100%;
    padding: 14px 10px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.ad-media-glow {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 40px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}

.ad-banner-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ad-game-icon {
    font-size: 34px;
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.6));
    animation: bounceDrill 1.6s ease-in-out infinite;
}

@keyframes bounceDrill {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(-8deg); }
}

.ad-game-title {
    font-family: var(--hd-font);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.2px;
    color: #f8fafc;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.ad-rating {
    font-size: 10px;
    color: #cbd5e1;
    font-weight: 600;
}

.ad-feature-tag {
    margin-top: 6px;
    display: inline-block;
    font-family: var(--hd-font);
    font-size: 8px;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.8px;
}

.ad-reward-claim {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.ad-reward-title {
    font-family: var(--hd-font);
    font-size: 10px;
    font-weight: 900;
    color: #34d399;
    letter-spacing: 0.8px;
}

.ad-bonus-amount {
    font-family: var(--hd-font);
    font-size: 20px;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.ad-promo-text {
    font-size: 9px;
    color: #94a3b8;
    line-height: 1.3;
    margin: 0;
}

.ad-progress-track {
    width: 100%;
    height: 5px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ad-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #10b981);
    transition: width 0.1s linear;
}

.ad-modal-footer {
    padding: 10px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.ad-modal-footer #btn-ad-cta {
    height: 42px;
    border-radius: 12px;
    font-family: var(--hd-font);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
}

.ad-skip-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-family: var(--hd-font);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 10px;
    letter-spacing: 0.5px;
    transition: color 0.15s ease;
}

.ad-skip-btn:active {
    color: #f8fafc;
}

/* ==========================================================
   11. ADMIN DASHBOARD MODAL STYLES (CYBER RED & GOLD THEME)
   ========================================================== */
#admin-modal {
    z-index: 7000 !important;
    pointer-events: auto !important;
}

#admin-modal:not(.hidden) {
    display: flex !important;
}

.admin-modal-box {
    max-width: 390px;
    width: 92%;
    max-height: 88vh;
    border-radius: 20px;
    background: radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.22) 0%, rgba(15, 23, 42, 0) 60%),
                linear-gradient(180deg, #18111e 0%, #0a0812 100%) !important;
    border: 2px solid #ef4444 !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95),
                0 0 35px rgba(239, 68, 68, 0.35),
                inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: diamondModalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1.5px solid rgba(239, 68, 68, 0.4);
}

.admin-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-header-badge {
    background: #ef4444;
    color: #fff;
    font-family: var(--hd-font);
    font-size: 8.5px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.8px;
}

.admin-header-title h2 {
    font-family: var(--hd-font);
    font-size: 14px;
    font-weight: 900;
    color: #fca5a5;
    letter-spacing: 1px;
    margin: 0;
}

/* Live Ticker Bar */
.admin-ticker-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-stat-chip {
    font-family: var(--hd-font);
    font-size: 10px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.7);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-stat-chip strong {
    color: #38bdf8;
}

/* Scroll Content */
.admin-scroll-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Cards */
.admin-card {
    background: rgba(24, 30, 47, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--hd-font);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #94a3b8;
    text-transform: uppercase;
}

/* Button Grids */
.admin-btn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.admin-btn {
    font-family: var(--hd-font);
    font-size: 10px;
    font-weight: 800;
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    text-align: center;
    transition: transform 0.08s ease, filter 0.08s ease;
    user-select: none;
}

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

.btn-gold-pill {
    background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
    color: #fff;
    border-color: #f59e0b;
}

.btn-cyan-pill {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    border-color: #38bdf8;
}

.btn-slate-pill {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    color: #f8fafc;
    border-color: #475569;
}

.btn-blue-pill {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #60a5fa;
}

.btn-emerald-pill {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    color: #fff;
    border-color: #34d399;
}

.btn-purple-pill {
    background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff;
    border-color: #a78bfa;
}

/* Input Row */
.admin-input-row {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.admin-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    font-family: var(--hd-font);
    font-size: 11px;
    color: #f8fafc;
    outline: none;
}

.admin-input:focus {
    border-color: #f59e0b;
}

.admin-action-btn {
    font-family: var(--hd-font);
    font-size: 10px;
    font-weight: 800;
    padding: 6px 12px;
    background: #f59e0b;
    color: #0f172a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

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

/* Hero Button */
.admin-btn-hero {
    width: 100%;
    font-family: var(--hd-font);
    font-size: 11px;
    font-weight: 900;
    padding: 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.admin-btn-hero:active {
    transform: scale(0.97);
}

.btn-purple-hero {
    background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
    color: #fff;
    border: 1px solid #c4b5fd;
}

/* Upgrades Steppers */
.admin-upgrades-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.admin-upgrade-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
    padding: 6px 10px;
    border-radius: 8px;
    font-family: var(--hd-font);
    font-size: 11px;
    color: #e2e8f0;
}

.admin-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-stepper button {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #334155;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.admin-stepper button:active {
    transform: scale(0.9);
}

.admin-stepper span {
    font-weight: 900;
    color: #fbbf24;
    min-width: 14px;
    text-align: center;
}

/* Toggle List */
.admin-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
    padding: 8px 10px;
    border-radius: 8px;
}

.admin-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-toggle-info strong {
    font-family: var(--hd-font);
    font-size: 11px;
    color: #f1f5f9;
}

.admin-toggle-info small {
    font-size: 8.5px;
    color: #94a3b8;
}

.admin-toggle-btn {
    font-family: var(--hd-font);
    font-size: 10px;
    font-weight: 900;
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    min-width: 50px;
    text-align: center;
}

.admin-toggle-btn.off {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.admin-toggle-btn.on {
    background: #10b981;
    color: #fff;
    border: 1px solid #34d399;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Danger Card */
.admin-danger-card {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(45, 15, 15, 0.5);
}

.admin-btn-danger {
    width: 100%;
    font-family: var(--hd-font);
    font-size: 10.5px;
    font-weight: 800;
    padding: 9px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.2);
    border: 1.5px solid #ef4444;
    color: #fca5a5;
    cursor: pointer;
    text-align: center;
}

.admin-btn-danger:active {
    background: #ef4444;
    color: #fff;
}

/* Footer */
.admin-modal-footer {
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}



