/* ==========================================================================
   STARMINER IDLE - FULL RPG PIXEL ART UI SYSTEM (clicker-theme.css)
   ========================================================================== */

:root {
    /* Emerald Ancient Mine RPG Palette */
    --pixel-black: #000000;
    --pixel-darkest: #070D0C;
    --pixel-bg: #0A1413;
    --pixel-panel-bg: #12211F;
    --pixel-panel-highlight: #1E3A36;
    --pixel-panel-shadow: #060B0A;
    
    --pixel-slot-bg: #0A1312;
    --pixel-slot-border: #1B332F;
    
    --neon-gold: #F59E0B;
    --neon-gold-dark: #78350F;
    --neon-emerald: #10B981;
    --neon-emerald-dark: #064E3B;
    --neon-emerald-glow: #34D399;
    --neon-cyan: #06B6D4;
    --neon-cyan-dark: #0E7490;
    --neon-purple: #A78BFA;
    --neon-purple-dark: #5B21B6;
    --neon-red: #EF4444;
    --neon-red-dark: #991B1B;
    
    --game-font-pixel: 'Unbounded', 'Outfit', sans-serif;
    --game-font-numbers: 'Unbounded', 'Outfit', sans-serif;
}

/* Base Reset & Crisp Pixel Rendering */
*, *::before, *::after {
    box-sizing: border-box;
    image-rendering: pixelated;
}

.pixel-slot-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 0 var(--pixel-black));
}

.pixel-coin-icon-sm {
    width: 14px;
    height: 14px;
    object-fit: contain;
    image-rendering: pixelated;
    vertical-align: middle;
    margin-right: 4px;
}

.pixel-shard-icon-sm {
    width: 14px;
    height: 14px;
    object-fit: contain;
    image-rendering: pixelated;
    vertical-align: middle;
    margin-right: 4px;
}

.pixel-coin-icon-lg {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
    vertical-align: middle;
    filter: drop-shadow(3px 3px 0 var(--pixel-black));
}

body {
    background-color: var(--pixel-darkest);
    color: #F8FAFC;
    font-family: var(--game-font-pixel);
    user-select: none;
    overflow-x: hidden;
}

/* Retro Dither Grid Background (Emerald Mine Ambience) */
.clicker-page-wrapper {
    min-height: 100vh;
    padding-top: 84px;
    padding-bottom: 20px;
    background-color: #070D0C;
    background-image: 
        radial-gradient(circle at 50% 10%, rgba(16, 185, 129, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 85% 40%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 15% 40%, rgba(245, 158, 11, 0.1) 0%, transparent 40%),
        linear-gradient(rgba(52, 211, 153, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 211, 153, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 16px 16px, 16px 16px;
}

/* ==========================================================================
   DESKTOP SCREEN VIEWPORT LOCK (Prevents mouse wheel scrolling entire page)
   ========================================================================== */
.game-stage-zone-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

@media (min-width: 992px) {
    html.clicker-mode,
    body.clicker-body,
    body:has(.clicker-page-wrapper) {
        overflow: hidden !important;
        height: 100vh !important;
        max-height: 100vh !important;
    }

    .clicker-page-wrapper {
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;
        overflow: hidden !important;
        padding-top: 80px;
        padding-bottom: 0 !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }

    .clicker-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .game-stage-zone-wrapper {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        width: 100%;
    }

    .game-2panel-layout {
        flex: 1;
        min-height: 0;
        margin-bottom: 0 !important;
        height: 100%;
        width: 100%;
    }

    .game-hub-panel,
    .game-mining-arena {
        height: 100% !important;
        max-height: calc(100vh - 175px) !important;
    }

    .clicker-page-wrapper ~ .footer,
    body.clicker-body .footer,
    body:has(.clicker-page-wrapper) .footer {
        display: none !important;
    }
}

.clicker-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 16px;
    transition: margin 0.15s ease, max-width 0.15s ease;
}

@media (min-width: 1200px) and (max-width: 1680px) {
    .clicker-container {
        margin-left: 244px !important;
        margin-right: auto !important;
        max-width: calc(100% - 268px) !important;
        padding-left: 0 !important;
    }
}

/* Pixel Top Header Bar (RPG Inventory Banner Style) */
.game-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: var(--pixel-panel-bg);
    border: 4px solid var(--pixel-black);
    border-radius: 0;
    padding: 12px 18px;
    margin-bottom: 18px;
    box-shadow: 
        inset 4px 4px 0px var(--pixel-panel-highlight),
        inset -4px -4px 0px var(--pixel-panel-shadow),
        0 6px 0px var(--pixel-black),
        0 14px 28px rgba(0,0,0,0.85);
    position: relative;
}

.game-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.game-brand-icon {
    font-size: 2.2rem;
    color: var(--neon-gold);
    filter: drop-shadow(3px 3px 0 var(--pixel-black)) drop-shadow(0 0 12px rgba(255, 199, 0, 0.7));
    animation: pixelFloat 2s infinite ease-in-out;
}

@keyframes pixelFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.game-title {
    font-family: var(--game-font-pixel);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
    color: #FFF;
    text-shadow: 3px 3px 0 var(--pixel-black);
}

.game-title span {
    color: var(--neon-gold);
    text-shadow: 3px 3px 0 var(--pixel-black), 0 0 14px rgba(255, 199, 0, 0.8);
}

.game-top-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 3D Chunky RPG Push-Buttons */
.game-control-btn, .btn-pixel {
    background: #1C2742;
    border: 3px solid var(--pixel-black);
    border-radius: 0;
    color: #F1F5F9;
    font-family: var(--game-font-pixel);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    padding: 8px 14px;
    cursor: pointer;
    transition: transform 0.05s ease, background 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 
        inset 2px 2px 0px rgba(255,255,255,0.22),
        inset -2px -2px 0px rgba(0,0,0,0.6),
        0 4px 0px var(--pixel-black);
    text-shadow: 2px 2px 0 var(--pixel-black);
}

.game-control-btn:hover, .btn-pixel:hover {
    background: #20453F;
    color: #FFF;
    transform: translateY(-2px);
    box-shadow: 
        inset 2px 2px 0px rgba(255,255,255,0.3),
        inset -2px -2px 0px rgba(0,0,0,0.6),
        0 6px 0px var(--pixel-black);
}

.game-control-btn:active, .btn-pixel:active {
    transform: translateY(4px);
    box-shadow: 
        inset 2px 2px 0px rgba(0,0,0,0.7),
        0 0 0px var(--pixel-black);
}

.sync-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--pixel-slot-bg);
    border: 3px solid var(--pixel-black);
    border-radius: 0;
    font-family: var(--game-font-pixel);
    font-size: 0.68rem;
    color: var(--neon-emerald);
    box-shadow: 
        inset 2px 2px 0px var(--pixel-panel-highlight),
        inset -2px -2px 0px var(--pixel-panel-shadow),
        0 3px 0px var(--pixel-black);
    text-shadow: 1px 1px 0 var(--pixel-black);
}

.sync-status-badge.saving {
    color: var(--neon-gold);
}

/* 2-Panel RPG Layout */
.game-2panel-layout {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 22px;
}

@media (max-width: 1024px) {
    .game-2panel-layout {
        grid-template-columns: 1fr;
    }
}

/* Main RPG Panel Container */
.game-panel {
    background: var(--pixel-panel-bg);
    border: 4px solid var(--pixel-black);
    border-radius: 0;
    padding: 16px;
    box-shadow: 
        inset 4px 4px 0px var(--pixel-panel-highlight),
        inset -4px -4px 0px var(--pixel-panel-shadow),
        0 6px 0px var(--pixel-black),
        0 14px 36px rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Mobile View Switcher */
.game-mobile-view-tabs {
    display: none;
    gap: 8px;
    margin-bottom: 14px;
}

@media (max-width: 992px) {
    .game-mobile-view-tabs {
        display: flex;
    }
    
    .game-panel {
        display: none !important;
    }
    
    .game-panel.mobile-active {
        display: flex !important;
    }
}

.mobile-view-btn {
    flex: 1;
    background: #141D33;
    border: 3px solid var(--pixel-black);
    border-radius: 0;
    color: #94A3B8;
    padding: 10px 12px;
    font-family: var(--game-font-pixel);
    font-size: 0.72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 
        inset 2px 2px 0px rgba(255,255,255,0.1),
        inset -2px -2px 0px #000,
        0 4px 0px var(--pixel-black);
    text-shadow: 1px 1px 0 var(--pixel-black);
}

.mobile-view-btn.active {
    background: #24345B;
    border-color: var(--pixel-black);
    color: #FFF;
    box-shadow: 
        inset 2px 2px 0px rgba(255,255,255,0.25),
        inset 0 0 0 2px var(--neon-gold),
        0 4px 0px var(--pixel-black),
        0 0 12px rgba(255, 199, 0, 0.4);
}

/* Pixel RPG Tooltip (Compact, Non-Intrusive Modern Frame) */
.game-global-fixed-tooltip {
    position: fixed;
    z-index: 999999;
    background: #091210;
    border: 2px solid var(--neon-emerald);
    border-radius: 0;
    padding: 7px 10px;
    width: 215px;
    max-width: 85vw;
    box-shadow: 
        0 0 0 2px var(--pixel-black),
        inset 0 0 0 1px rgba(16, 185, 129, 0.25),
        0 6px 18px rgba(0,0,0,0.92);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.game-global-fixed-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.game-global-fixed-tooltip .mod-tt-title {
    font-family: var(--game-font-pixel);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
    text-shadow: 1px 1px 0 var(--pixel-black);
}

.game-global-fixed-tooltip .mod-tt-desc {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.72rem;
    color: #CBD5E1;
    line-height: 1.35;
    margin-bottom: 5px;
    font-weight: 500;
}

.game-global-fixed-tooltip .mod-tt-cost {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--neon-gold);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-global-fixed-tooltip .mod-tt-locked {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #EF4444;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-global-fixed-tooltip .mod-tt-max {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--neon-emerald);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Floating Fixed Balance HUD (Bottom-Left: aligned with left menu sidebar) */
.game-fixed-floating-hud {
    position: fixed;
    bottom: 16px;
    left: 24px;
    z-index: 99990;
    width: 204px;
    max-width: 204px;
    box-sizing: border-box;
    background: var(--pixel-panel-bg);
    border: 3px solid var(--pixel-black);
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 
        inset 2px 2px 0px var(--pixel-panel-highlight),
        inset -2px -2px 0px var(--pixel-panel-shadow),
        0 5px 0px var(--pixel-black),
        0 12px 28px rgba(0,0,0,0.85);
    font-family: var(--game-font-pixel);
    pointer-events: auto;
    user-select: none;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    overflow: hidden;
}

.game-fixed-floating-hud:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 2px 2px 0px var(--pixel-panel-highlight),
        inset -2px -2px 0px var(--pixel-panel-shadow),
        0 7px 0px var(--pixel-black),
        0 16px 32px rgba(0,0,0,0.95);
}

.floating-hud-row {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.floating-hud-row-top {
    justify-content: space-between;
    gap: 4px;
}

.floating-hud-row-bottom {
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 3px;
}

.floating-hud-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
}

.floating-hud-stat.stat-coins {
    flex: 1 1 auto;
    justify-content: flex-start;
}

.floating-hud-stat.stat-shards {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.floating-hud-stat.stat-dps {
    justify-content: center;
    width: 100%;
}

.floating-hud-val {
    font-size: 0.72rem;
    font-weight: 800;
    text-shadow: 1px 1px 0 var(--pixel-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 86px;
}

.floating-hud-val.val-coins {
    color: var(--neon-gold);
}

.floating-hud-val.val-shards {
    color: var(--neon-purple);
}

.floating-hud-dps-val {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--neon-emerald);
    white-space: nowrap;
    text-shadow: 1px 1px 0 var(--pixel-black);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-hud-divider {
    display: none;
}

@media (min-width: 1200px) {
    .game-fixed-floating-hud {
        width: 204px !important;
        max-width: 204px !important;
        left: 24px !important;
        bottom: 16px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 991px) {
    .game-fixed-floating-hud {
        bottom: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
        flex-direction: row;
        justify-content: space-around;
        padding: 5px 8px;
    }
    .floating-hud-row-top {
        width: auto;
        gap: 12px;
    }
    .floating-hud-row-bottom {
        width: auto;
        border-top: none;
        padding-top: 0;
        border-left: 1px solid rgba(255,255,255,0.1);
        padding-left: 12px;
    }
    .floating-hud-val {
        font-size: 0.68rem;
        max-width: none;
    }
}

/* Pixel Notification Toasts */
.game-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.game-toast {
    background: var(--pixel-panel-bg);
    border: 3px solid var(--pixel-black);
    border-radius: 0;
    padding: 12px 16px;
    box-shadow: 
        inset 3px 3px 0px var(--pixel-panel-highlight),
        inset -3px -3px 0px var(--pixel-panel-shadow),
        inset 0 0 0 1px var(--neon-gold),
        0 6px 0px var(--pixel-black),
        0 14px 36px rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 420px;
    animation: toastSlideIn 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    pointer-events: auto;
    font-family: var(--game-font-pixel);
    text-shadow: 1px 1px 0 var(--pixel-black);
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.game-toast.fade-out {
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

/* Pixel Modal Overlay & Windows */
.game-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 4, 8, 0.88);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.18s ease;
}

.game-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.game-modal-box {
    background: var(--pixel-panel-bg);
    border: 4px solid var(--pixel-black);
    border-radius: 0;
    padding: 24px;
    width: 92%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 
        inset 4px 4px 0px var(--pixel-panel-highlight),
        inset -4px -4px 0px var(--pixel-panel-shadow),
        0 8px 0px var(--pixel-black),
        0 24px 60px rgba(0,0,0,0.95);
    transform: scale(0.92);
    transition: transform 0.18s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    font-family: var(--game-font-pixel);
}

.game-modal-overlay.open .game-modal-box {
    transform: scale(1);
}

/* Skill Node Confirmation Mini Modal */
.skill-node-confirm-box {
    max-width: 420px;
    text-align: center;
    position: relative;
    padding: 20px 24px;
    border: 3px solid var(--pixel-black);
    box-shadow: 
        inset 3px 3px 0px var(--pixel-panel-highlight),
        inset -3px -3px 0px var(--pixel-panel-shadow),
        0 8px 0px var(--pixel-black),
        0 16px 40px rgba(0,0,0,0.95);
}

.skill-node-confirm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.skill-node-branch-badge {
    font-family: var(--game-font-pixel);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border: 2px solid var(--pixel-black);
    box-shadow: 0 2px 0 var(--pixel-black);
    border-radius: 0;
}

.btn-close-modal-icon,
.skill-node-close-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    background: #11182B !important;
    color: #94A3B8 !important;
    border: 2px solid var(--pixel-black) !important;
    border-radius: 4px !important;
    font-size: 1.15rem !important;
    cursor: pointer !important;
    box-shadow: 
        inset 1px 1px 0 rgba(255, 255, 255, 0.15),
        0 3px 0 var(--pixel-black) !important;
    transition: all 0.12s ease !important;
    padding: 0 !important;
    line-height: 1 !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    flex-shrink: 0 !important;
}

.btn-close-modal-icon:hover,
.skill-node-close-btn:hover {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    border-color: var(--pixel-black) !important;
    transform: translateY(-1px) !important;
    box-shadow: 
        inset 1px 1px 0 rgba(255, 255, 255, 0.35),
        0 4px 0 var(--pixel-black),
        0 0 14px rgba(220, 38, 38, 0.6) !important;
}

.btn-close-modal-icon:active,
.skill-node-close-btn:active {
    transform: translateY(2px) !important;
    box-shadow: 
        inset 1px 1px 0 rgba(0, 0, 0, 0.4),
        0 1px 0 var(--pixel-black) !important;
    background: #B91C1C !important;
    color: #FFFFFF !important;
}

.btn-close-modal-icon i,
.skill-node-close-btn i {
    pointer-events: none;
    line-height: 1;
}

.skill-node-icon-circle {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background: #0D1526;
    border: 3px solid var(--pixel-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 
        inset 2px 2px 0 rgba(255,255,255,0.2),
        0 4px 0 var(--pixel-black);
}

.skill-node-confirm-title {
    font-family: var(--game-font-pixel);
    font-size: 1.05rem;
    font-weight: 800;
    color: #FFF;
    margin: 0 0 6px;
    text-shadow: 2px 2px 0 var(--pixel-black);
    letter-spacing: 0.3px;
}

.skill-node-lvl-pill {
    display: inline-block;
    font-family: var(--game-font-pixel);
    font-size: 0.62rem;
    color: var(--neon-gold);
    background: var(--pixel-slot-bg);
    border: 2px solid var(--pixel-black);
    padding: 2px 8px;
    margin-bottom: 14px;
    box-shadow: 0 2px 0 var(--pixel-black);
}

.skill-node-desc-card {
    background: var(--pixel-slot-bg);
    border: 2px solid var(--pixel-black);
    padding: 10px 12px;
    margin-bottom: 14px;
    box-shadow: inset 2px 2px 0 #000;
    text-align: left;
}

.skill-node-desc-label {
    font-family: var(--game-font-pixel);
    font-size: 0.58rem;
    color: #64748B;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.skill-node-desc-text {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #F1F5F9;
    line-height: 1.4;
}

.skill-node-cost-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.4);
    border: 2px solid var(--pixel-black);
    padding: 8px 12px;
    margin-bottom: 16px;
}

.skill-node-cost-label {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #94A3B8;
}

.skill-node-cost-val {
    font-family: var(--game-font-pixel);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--neon-purple);
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 1px 1px 0 var(--pixel-black);
}

.skill-node-modal-actions {
    display: flex;
    gap: 8px;
}

.btn-cancel-modal {
    flex: 1;
    padding: 10px;
    font-family: var(--game-font-pixel);
    font-size: 0.72rem;
    font-weight: 700;
    color: #94A3B8;
    background: #1E293B;
    border: 2px solid var(--pixel-black);
    cursor: pointer;
    box-shadow: 0 3px 0 var(--pixel-black);
}

.btn-cancel-modal:hover {
    background: #334155;
    color: #FFF;
}

.btn-confirm-skill {
    flex: 2;
    padding: 10px;
    font-family: var(--game-font-pixel);
    font-size: 0.75rem;
    font-weight: 800;
    color: #030712 !important;
    background: var(--neon-emerald);
    border: 2px solid var(--pixel-black);
    cursor: pointer;
    box-shadow: 
        inset 1px 1px 0 rgba(255,255,255,0.5),
        0 4px 0 var(--pixel-black);
    transition: transform 0.05s ease, filter 0.1s ease;
}

.btn-confirm-skill:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.btn-confirm-skill:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--pixel-black);
}

.btn-confirm-skill.disabled {
    background: #334155 !important;
    color: #64748B !important;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: 0 2px 0 var(--pixel-black);
}

/* Offline Earnings Welcome Modal (Pixel Vault Style) */
#offlineModal .game-modal-box {
    max-width: 480px;
    text-align: center;
    border-color: var(--pixel-black);
    box-shadow: 
        inset 4px 4px 0px var(--pixel-panel-highlight),
        inset -4px -4px 0px var(--pixel-panel-shadow),
        0 8px 0px var(--pixel-black),
        0 0 30px rgba(16, 185, 129, 0.2);
}

.offline-modal-icon {
    font-size: 3rem;
    color: var(--neon-gold);
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 0 var(--pixel-black)) drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
    animation: bounceSlow 2s infinite ease-in-out;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.offline-modal-title {
    font-family: var(--game-font-pixel);
    font-size: 1.15rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 10px;
    text-shadow: 2px 2px 0 var(--pixel-black);
    letter-spacing: 0.5px;
}

.offline-modal-desc {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: #CBD5E1;
    margin: 0 0 16px;
    line-height: 1.45;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.offline-reward-slot {
    background: var(--pixel-slot-bg);
    border: 3px solid var(--pixel-black);
    padding: 14px 16px;
    margin-bottom: 18px;
    box-shadow: inset 3px 3px 0px #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.offline-reward-label {
    font-size: 0.68rem;
    color: #94A3B8;
    letter-spacing: 0.5px;
}

.offline-reward-value {
    font-family: var(--game-font-pixel);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--neon-gold);
    text-shadow: 2px 2px 0 var(--pixel-black), 0 0 12px rgba(245, 158, 11, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-claim-reward {
    width: 100%;
    padding: 12px;
    font-family: var(--game-font-pixel);
    font-size: 0.85rem;
    font-weight: 800;
    color: #030712 !important;
    background: var(--neon-emerald);
    border: 3px solid var(--pixel-black);
    cursor: pointer;
    box-shadow: 
        inset 2px 2px 0px rgba(255,255,255,0.5),
        inset -2px -2px 0px rgba(0,0,0,0.5),
        0 5px 0px var(--pixel-black);
    text-shadow: none !important;
    transition: transform 0.05s ease, filter 0.1s ease;
}

.btn-claim-reward:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 
        inset 2px 2px 0px rgba(255,255,255,0.6),
        inset -2px -2px 0px rgba(0,0,0,0.5),
        0 7px 0px var(--pixel-black),
        0 0 15px rgba(16, 185, 129, 0.6);
}

.btn-claim-reward:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0px var(--pixel-black);
}

/* ==========================================================================
   COMPREHENSIVE MOBILE OPTIMIZATIONS (< 992px, < 768px, < 480px)
   ========================================================================== */

/* --- Global Touch & Interaction Optimization --- */
button, a, .shop-item-card, .shop-item-main-row, .mine-target-zone,
.producer-module-chip, .hub-tab-btn, .browser-tab-btn, .mobile-view-btn,
.crate-filter-btn, .leaderboard-tab-btn, .hud-btn, .btn-open-crate,
.price-tag, .crate-shop-card, .pet-item-card,
.buy-mult-btn, .btn-prestige, .btn-claim-reward, .btn-spin-crate,
.btn-confirm-skill, .btn-cancel-modal, .game-control-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Skill Tree Pan/Zoom Isolation (Prevents outer page scroll when panning tree) */
.skill-tree-interactive-viewport,
.skill-tree-galaxy-canvas,
.skill-tree-svg-layer,
#skillTreeNodesContainer,
.skill-tree-node,
.skill-tree-node-circle,
.skill-core-node {
    touch-action: none !important;
    overscroll-behavior: contain !important;
    -webkit-user-drag: none;
    -webkit-user-select: none !important;
    user-select: none !important;
}

@media (max-width: 992px) {
    .navbar {
        height: 64px !important;
    }

    .clicker-page-wrapper {
        padding-top: 76px !important;
        padding-bottom: 70px !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        overflow-x: hidden;
    }

    .game-header-bar {
        padding: 10px 12px;
        gap: 8px;
    }

    .game-title {
        font-size: 1.15rem;
    }

    .game-top-controls {
        gap: 6px;
    }

    .game-control-btn {
        padding: 6px 10px;
        font-size: 0.70rem;
    }

    .game-mobile-view-tabs {
        display: flex;
        gap: 4px;
        margin-bottom: 12px;
        position: sticky;
        top: 64px !important;
        z-index: 200;
        background: rgba(7, 13, 12, 0.98) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 4px;
        border: 2px solid var(--pixel-black);
    }

    .mobile-view-btn {
        flex: 1;
        padding: 10px 8px;
        font-family: var(--game-font-pixel);
        font-size: 0.75rem;
        font-weight: 800;
        background: #111A2C;
        border: 2px solid var(--pixel-black);
        color: #94A3B8;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
        box-shadow: inset 1px 1px 0 rgba(255,255,255,0.1), 0 2px 0 var(--pixel-black);
        touch-action: manipulation;
    }

    .mobile-view-btn.active {
        background: linear-gradient(180deg, #10382B 0%, #08221A 100%);
        border-color: var(--neon-emerald);
        color: var(--neon-emerald);
        box-shadow: inset 0 0 0 1px var(--neon-emerald), 0 3px 0 var(--pixel-black);
    }

    .game-2panel-layout {
        display: block !important;
        margin-bottom: 16px;
    }

    .game-panel {
        display: none !important;
        width: 100%;
        min-height: auto;
        height: auto;
    }

    .game-panel.mobile-active {
        display: flex !important;
    }

    /* Browser window hidden by default on mobile, shown via 3rd tab */
    .game-browser-window {
        margin-top: 12px;
    }

    .game-browser-window.mobile-hidden {
        display: none !important;
    }

    .game-browser-window.mobile-active {
        display: block !important;
    }

    .browser-window-topbar {
        padding: 6px 8px;
        gap: 4px;
        flex-wrap: wrap;
    }

    /* Hide traffic lights on mobile */
    .browser-traffic-lights {
        display: none !important;
    }

    /* Hide address bar on mobile */
    .browser-address-bar {
        display: none !important;
    }

    /* Hide right actions (duplicate shards indicator) */
    .browser-right-actions {
        display: none !important;
    }

    .browser-tabs-nav {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 4px !important;
        width: 100% !important;
        overflow-x: visible !important;
    }

    .browser-tab-btn {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        padding: 7px 4px !important;
        font-size: 0.68rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
    }

    /* Modals responsive */
    .game-modal-box {
        width: 95%;
        padding: 18px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .game-toast-container {
        top: 12px;
        right: 50%;
        transform: translateX(50%);
        align-items: center;
    }

    .game-toast {
        min-width: 260px;
        max-width: 90vw;
        padding: 10px 14px;
        font-size: 0.72rem;
    }
}

@media (max-width: 640px) {
    .game-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 10px;
    }

    .game-top-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 4px;
    }

    .game-control-btn {
        padding: 5px 8px;
        font-size: 0.65rem;
    }

    /* Floating HUD compact */
    .game-fixed-floating-hud {
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 5px 10px;
        gap: 8px;
        font-size: 0.65rem;
        justify-content: center;
    }

    .floating-hud-val {
        font-size: 0.68rem;
    }

    /* Modals tighter */
    .game-modal-box {
        width: 96%;
        padding: 14px;
    }

    /* Crate roulette compact */
    .crate-modal-box {
        padding: 14px !important;
    }

    .crate-roulette-viewport {
        height: 130px;
    }

    .crate-roulette-item-card {
        width: 95px;
        height: 110px;
    }

    .crate-item-icon {
        font-size: 1.5rem;
    }

    .crate-item-name {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 58px !important;
    }

    .clicker-page-wrapper {
        padding-top: 70px !important;
        padding-bottom: 65px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    /* Hide brand icon, compact title */
    .game-brand-icon {
        display: none;
    }

    .game-title {
        font-size: 0.95rem;
    }

    .game-brand {
        gap: 8px;
    }

    /* Sync badge icon only */
    .sync-status-badge {
        padding: 5px 8px;
        font-size: 0;
    }

    .sync-status-badge i {
        font-size: 0.75rem;
    }

    /* Mobile view tabs tighter */
    .game-mobile-view-tabs {
        gap: 3px;
        padding: 3px;
        top: 58px !important;
        z-index: 200;
    }

    .mobile-view-btn {
        padding: 8px 4px;
        font-size: 0.68rem;
        gap: 4px;
    }

    /* Floating HUD: hide DPS, keep coins + shards */
    .game-fixed-floating-hud .floating-hud-stat:last-child {
        display: none;
    }

    .game-fixed-floating-hud .floating-hud-divider:last-of-type {
        display: none;
    }

    /* Modals ultra compact */
    .game-modal-box {
        padding: 12px;
        width: 98%;
    }

    .crate-modal-box {
        padding: 10px !important;
    }

    .crate-roulette-viewport {
        height: 110px;
        margin: 10px 0;
    }

    .crate-roulette-item-card {
        width: 80px;
        height: 95px;
        padding: 4px;
    }

    .crate-item-icon {
        font-size: 1.3rem;
    }

    .crate-item-name {
        font-size: 0.55rem;
    }

    .crate-item-rarity {
        font-size: 0.5rem;
    }

    /* Skill node modal compact */
    .skill-node-confirm-box {
        padding: 14px !important;
        max-width: 92vw;
    }

    .skill-node-icon-circle {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .skill-node-confirm-title {
        font-size: 0.9rem;
    }

    /* Prestige modal compact */
    #prestigeModal .game-modal-box {
        max-width: 95vw;
        padding: 16px;
    }

    /* Toast compact */
    .game-toast {
        min-width: 220px;
        max-width: 92vw;
        padding: 8px 10px;
        font-size: 0.68rem;
    }
}
