        @font-face {
            font-family: 'CGF Locust Resistance';
            src: url('../Art/UI/CGF Locust Resistance.ttf') format('truetype');
            font-display: swap;
        }

        body {
            margin: 0;
            padding: 0;
            background: #000820;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
            font-weight: 300;
            color: #00ffff;
            overflow: hidden;
            cursor: none; /* Hide system cursor globally during gameplay */
        }

        /* Landscape orientation warning - DISABLED: Now handled by JavaScript for better reliability
        @media screen and (orientation: portrait) and (max-width: 1024px) and (pointer: coarse) {
            body::before {
                content: "Please rotate your device to landscape mode";
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: #000;
                color: #00ffff;
                display: flex;
                align-items: center;
                justify-content: center;
                text-align: center;
                font-size: 24px;
                z-index: 9999;
                text-shadow: 0 0 20px #00ffff;
                padding: 20px;
                box-sizing: border-box;
            }

            body::after {
                content: "↻";
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) rotate(90deg);
                font-size: 80px;
                color: #00ffff;
                z-index: 10000;
                margin-top: 80px;
                opacity: 0.6;
                animation: pulse 2s infinite;
            }

            #gameContainer {
                display: none;
            }
        } */

        @keyframes pulse {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 1; }
        }
        
        #gameCanvas {
            display: block;
            background: #000820;
            z-index: 1;
            position: absolute;
            top: 0;
            left: 0;
            /* Canvas fills viewport - CSS handles stretching from internal resolution to display size */
            width: 100vw;
            height: 100vh;
            cursor: none; /* Hide system cursor on canvas */
            /* Pixel-perfect scaling - no blur/smoothing */
            image-rendering: pixelated;       /* Firefox, Chrome - sharp pixel scaling */
            image-rendering: crisp-edges;     /* Safari - sharp pixel scaling */
            image-rendering: -moz-crisp-edges; /* Older Firefox - sharp pixel scaling */
        }
        
        #gameContainer {
            position: relative;
            width: 100vw;
            height: 100vh;
            cursor: none; /* Hide system cursor on game container */
        }
        
        #ui {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            /* cursor: none; */ /* Removed - cursor visibility now controlled by JavaScript based on UI state */
            z-index: 10;
        }
        
        .hud-element {
            position: absolute;
            color: #00ffff;
            font-size: 14px;
            text-shadow: 0 0 10px #00ffff;
            z-index: 10;
        }
        
        #health {
            left: 20px;
            /* top will be set dynamically by JavaScript */
        }
        
        #cargo {
            top: 60px;
            right: 25px; /* Position with gap from right edge */
            width: 50px; /* Just enough for cargo grid + padding */
            padding: 5px; /* Buffer between slots and container edge */
        }
        
        #credits {
            top: 20px;
            right: 25px;
            text-align: right;
        }
        
        #zone {
            bottom: 60px;
            left: 50%;
            transform: translateX(-50%);
        }
        
        #controls {
            bottom: 20px;
            left: 20px;
            font-size: 10px;
            line-height: 1.4;
        }
        
        #debugInfo {
            top: 10px;
            left: 10px;
            font-size: 11px;
            font-weight: 300;
            line-height: 1.3;
            text-shadow: 0 0 5px #00ffff;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
        }
        
        .health-bar, .cargo-bar, .shield-bar {
            width: 200px;
            height: 8px;
            border: 1px solid #00ffff;
            margin-top: 4px;
            position: relative;
        }
        
        .bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #00ff00, #ffff00, #ff0000);
            transition: width 0.3s;
        }
        
        .health-bar .bar-fill {
            background: #00ff00;
        }
        
        .shield-bar {
            border: 1px solid #0088ff;
        }
        
        .shield-bar .bar-fill {
            background: linear-gradient(90deg, #0088ff, #00ccff);
            box-shadow: 0 0 4px rgba(0, 136, 255, 0.4);
        }
        
        .cargo-bar .bar-fill {
            background: #ffff00;
        }
        
        .cargo-inventory {
            display: grid;
            gap: 2px;
            margin-top: 8px;
            margin: 8px auto 0 auto; /* Center the cargo grid */
            pointer-events: auto;
            max-height: calc(100vh - 160px); /* Leave room for other UI */
            overflow-y: auto; /* Scroll if needed for large cargo */
            overflow-x: hidden; /* Prevent horizontal scroll */
            scrollbar-width: thin;
            scrollbar-color: #00ffff transparent;
            width: fit-content; /* Size to content */
            padding: 3px; /* Add padding to prevent clipping */
        }
        
        .cargo-inventory::-webkit-scrollbar {
            width: 4px;
        }
        
        .cargo-inventory::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .cargo-inventory::-webkit-scrollbar-thumb {
            background: #00ffff;
            border-radius: 2px;
        }
        
        .cargo-slot {
            width: 18px;
            height: 18px;
            border: 1px solid #00ffff;
            background: rgba(0, 255, 255, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            position: relative;
        }
        
        .cargo-slot.occupied {
            background: transparent;
        }
        
        .mineral-icon {
            width: 14px;
            height: 14px;
            position: relative;
            cursor: pointer;
            user-select: none;
        }
        
        .mineral-icon svg {
            width: 100%;
            height: 100%;
        }
        
        /* Store UI Styles */
        .store-panel {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.9);
            border: 2px solid #00ffff;
            color: #00ffff;
            font-family: 'Courier New', monospace;
            padding: 40px; /* Increased padding to accommodate glows */
            min-width: 1200px;
            max-width: 1400px;
            z-index: 1000;
            pointer-events: auto;
            cursor: auto; /* Show cursor on store panel */
            box-shadow: 0 0 20px #00ffff;
            overflow: visible;
        }
        
        .store-header {
            text-align: center;
            margin-bottom: 20px;
            border-bottom: 1px solid #00ffff;
            padding-bottom: 10px;
        }
        
        .store-header h2 {
            margin: 0 0 10px 0;
            font-size: 18px;
        }
        
        .store-section {
            margin-bottom: 15px;
        }
        
        /* Multi-column store layout */
        .store-columns {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 30px;
            margin-bottom: 20px;
        }
        
        .store-column {
            background: rgba(0, 255, 255, 0.05);
            border: 1px solid rgba(0, 255, 255, 0.3);
            padding: 15px;
            border-radius: 4px;
        }
        
        .store-column h3 {
            color: #00ffcc;
            margin: 0 0 15px 0;
            font-size: 14px;
            text-align: center;
            border-bottom: 1px solid rgba(0, 255, 204, 0.3);
            padding-bottom: 8px;
        }
        
        .store-section h3 {
            margin: 0 0 8px 0;
            font-size: 14px;
            color: #00ffcc;
        }
        
        .store-button {
            background: rgba(0, 255, 255, 0.1);
            border: 1px solid #00ffff;
            color: #00ffff;
            font-family: 'Courier New', monospace;
            font-size: 12px;
            padding: 8px 12px;
            margin: 4px 0;
            cursor: pointer;
            width: 100%;
            transition: all 0.2s;
        }
        
        .store-button:hover {
            background: rgba(0, 255, 255, 0.2);
            box-shadow: 0 0 8px #00ffff;
        }
        
        .store-button:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            background: rgba(50, 50, 50, 0.5);
            border-color: #444;
            color: #666;
        }
        
        .store-button:disabled:hover {
            background: rgba(50, 50, 50, 0.5);
            box-shadow: none;
        }
        
        /* Specific disabled state for service buttons */
        .service-btn-disabled {
            opacity: 0.5 !important;
            background: rgba(50, 50, 50, 0.5) !important;
            border-color: #444 !important;
            color: #666 !important;
            cursor: not-allowed !important;
        }
        
        /* When disabled button has focus, make it more visible */
        .service-btn-disabled.store-focus {
            opacity: 0.8 !important;
            border: 3px solid #00ffff !important;
            box-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff !important;
        }
        
        /* Tutorial disabled buttons - greyed out during tutorial */
        .tutorial-disabled {
            opacity: 0.3 !important;
            filter: grayscale(70%) brightness(0.4) !important;
            cursor: not-allowed !important;
            background: rgba(50, 50, 50, 0.5) !important;
            border-color: #444 !important;
            color: #666 !important;
        }
        
        .tutorial-disabled:hover {
            opacity: 0.3 !important;
            filter: grayscale(70%) brightness(0.4) !important;
            background: rgba(50, 50, 50, 0.5) !important;
            box-shadow: none !important;
        }
        
        /* Tutorial disabled upgrade bars and weapon bars */
        .upgrade-bar.tutorial-disabled,
        .weapon-bar.tutorial-disabled,
        .equipment-item.tutorial-disabled {
            opacity: 0.3 !important;
            filter: grayscale(70%) brightness(0.4) !important;
            cursor: not-allowed !important;
        }
        
        .upgrade-bar.tutorial-disabled:hover,
        .weapon-bar.tutorial-disabled:hover,
        .equipment-item.tutorial-disabled:hover {
            background: rgba(0, 255, 204, 0.05) !important;
            border-color: rgba(0, 255, 204, 0.2) !important;
            opacity: 0.3 !important;
            filter: grayscale(70%) brightness(0.4) !important;
        }
        
        /* Tutorial disabled icons */
        .tutorial-disabled .upgrade-icon,
        .tutorial-disabled .weapon-icon,
        .tutorial-disabled .equipment-icon {
            opacity: 0.3 !important;
            filter: grayscale(70%) brightness(0.4) !important;
        }
        
        /* Alarm Off button */
        .alarm-off-btn {
            background: rgba(255, 0, 0, 0.9);
            border: 2px solid #ff0000;
            color: white;
            font-family: 'Courier New', monospace;
            font-size: 11px;
            font-weight: bold;
            padding: 6px 12px;
            margin-top: 6px;
            cursor: pointer;
            border-radius: 4px;
            animation: alarmButtonPulse 0.6s ease-in-out infinite;
            text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
            position: relative;
            z-index: 1000;
            pointer-events: auto;
        }
        
        .alarm-off-btn:hover {
            background: rgba(255, 0, 0, 1.0);
            box-shadow: 0 0 6px rgba(255, 0, 0, 0.8);
        }
        
        
        @keyframes alarmButtonPulse {
            0%, 100% {
                opacity: 0.9;
                box-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
                transform: scale(1.0);
            }
            50% {
                opacity: 1.0;
                box-shadow: 0 0 16px rgba(255, 0, 0, 1.0), 0 0 32px rgba(255, 0, 0, 0.5);
                transform: scale(1.05);
            }
        }
        
        /* Eject Cargo button */
        .eject-cargo-btn {
            background: rgba(0, 0, 0, 0.7);
            border: 1px solid rgba(0, 255, 255, 0.5);
            color: rgba(0, 255, 255, 0.9);
            font-family: 'Courier New', monospace;
            font-size: 11px;
            font-weight: normal;
            padding: 4px 0;
            margin-top: 6px;
            width: 38px; /* Match cargo grid width: 2 columns (18px each) + 2px gap */
            margin: 6px auto 0 auto; /* Center the eject button */
            cursor: pointer;
            border-radius: 2px;
            text-shadow: 0 0 2px rgba(0, 255, 255, 0.5);
            box-shadow: none;
            position: relative;
            z-index: 1000;
            pointer-events: auto;
        }
        
        .eject-cargo-btn:hover {
            background: rgba(0, 0, 0, 0.9);
            border-color: rgba(0, 255, 255, 0.8);
            color: rgba(0, 255, 255, 1.0);
            text-shadow: 0 0 4px rgba(0, 255, 255, 0.7);
        }

        /* Consumable Quick-Use Buttons */
        .consumable-buttons {
            display: flex;
            flex-direction: column;
            gap: 6px; /* Match spacing between Eject All button and cargo */
            margin-top: 6px; /* Match Eject All button spacing */
            width: 38px; /* Match cargo grid width: 2 columns * 18px + 1 gap of 2px = 38px */
            margin-left: auto;
            margin-right: auto;
        }

        .consumable-btn {
            width: 38px; /* Match eject-cargo-btn width */
            height: 32px; /* Explicit height to provide enough space for positioned elements */
            background: rgba(0, 255, 255, 0.3); /* Match cargo slot filled background */
            border: 1px solid #00ffff; /* Match cargo slot border */
            color: rgba(0, 255, 255, 0.9); /* Match eject-cargo-btn color */
            font-family: 'Courier New', monospace; /* Match eject-cargo-btn font */
            font-size: 11px; /* Match eject-cargo-btn font size */
            font-weight: normal; /* Match eject-cargo-btn font weight */
            padding: 0; /* Remove padding to use explicit height */
            cursor: pointer;
            border-radius: 2px; /* Match eject-cargo-btn border radius */
            text-shadow: 0 0 2px rgba(0, 255, 255, 0.5); /* Match eject-cargo-btn text shadow */
            box-shadow: none; /* Match eject-cargo-btn box shadow */
            position: relative; /* Required for absolutely positioned children */
            z-index: 1000; /* Match eject-cargo-btn z-index */
            pointer-events: auto; /* Match eject-cargo-btn pointer events */
            transition: all 0.1s ease;
        }

        .consumable-btn:hover {
            background: rgba(0, 255, 255, 0.5); /* Brighter cyan fill on hover */
            border-color: rgba(0, 255, 255, 1.0); /* Brighter border on hover */
            color: rgba(0, 255, 255, 1.0); /* Brighter text on hover */
            text-shadow: 0 0 4px rgba(0, 255, 255, 0.7); /* Enhanced glow on hover */
        }

        .consumable-btn:active {
            transform: scale(0.95);
            background: rgba(0, 255, 255, 0.2);
        }

        .consumable-text {
            font-family: 'Courier New', monospace;
            font-size: 8px;
            color: rgba(0, 255, 255, 0.9);
            font-weight: bold;
            line-height: 1;
            text-shadow: 0 0 2px rgba(0, 255, 255, 0.5);
            text-align: center;
            white-space: nowrap;
        }

        .consumable-icon {
            width: 14px; /* Reduced from 18px to fit better with corner text */
            height: 14px;
            position: absolute; /* Position absolutely for centering */
            top: calc(50% - 5px); /* Center vertically then move up 5px */
            left: 50%; /* Center horizontally */
            transform: translate(-50%, -50%); /* Perfect centering */
        }

        .consumable-icon svg {
            width: 100%;
            height: 100%;
            display: block;
        }

        .consumable-count {
            font-family: 'Courier New', monospace; /* Already matching */
            font-size: 12px; /* Increased by 2-3 font sizes (was 9px) */
            color: rgba(0, 255, 255, 0.9); /* Already matching */
            font-weight: bold; /* Make it more visible */
            line-height: 1;
            text-shadow: 0 0 2px rgba(0, 255, 255, 0.5); /* Already matching */
            position: absolute; /* Position absolutely */
            bottom: 1px; /* Bottom left corner */
            left: 2px; /* Bottom left corner */
        }

        .consumable-count, .consumable-total {
            color: rgba(255, 255, 255, 0.8);
        }

        .consumable-hotkey {
            font-family: 'Courier New', monospace;
            font-size: 10px;
            color: rgba(255, 255, 255, 0.7); /* Slightly dimmer than count */
            font-weight: normal;
            line-height: 1;
            text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
            position: absolute;
            bottom: 1px; /* Bottom right corner */
            right: 2px; /* Bottom right corner */
        }

            line-height: 1;
        }

        /* Consumable button flash effect when used */
        .consumable-btn.used {
            animation: consumableFlash 0.3s ease;
        }

        @keyframes consumableFlash {
            0% { background: rgba(0, 255, 255, 0.5); border-color: rgba(0, 255, 255, 1); }
            100% { background: rgba(0, 0, 0, 0.8); border-color: rgba(0, 255, 255, 0.4); }
        }
        
        /* Service buttons layout */
        .service-buttons {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }
        
        .service-buttons-left {
            display: flex;
            gap: 70px;
        }
        
        .service-buttons-right {
            display: flex;
            gap: 70px;
        }
        
        .service-btn {
            flex: 0 1 150px;
            max-width: 150px;
            min-width: 130px;
            text-align: center;
            line-height: 1.2;
        }
        
        /* Upgrade grid layout */
        .upgrade-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-top: 8px;
            max-height: 500px;
            overflow-y: auto;
        }
        
        @media (max-width: 800px) {
            .upgrade-grid {
                grid-template-columns: 1fr;
            }
        }
        
        /* Equipment grid layout */
        .equipment-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 15px;
            margin-top: 8px;
        }
        
        @media (max-width: 800px) {
            .equipment-grid {
                grid-template-columns: 1fr;
            }
        }
        
        /* Equipment Item Components - Updated Sizing */
        .equipment-item {
            display: flex;
            align-items: center;
            margin: 0;
            padding: 10px;
            background: rgba(0, 255, 204, 0.05);
            border-radius: 6px;
            border: 1px solid rgba(0, 255, 204, 0.2);
            min-height: 70px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .equipment-item:hover {
            background: rgba(0, 255, 204, 0.1);
            border-color: rgba(0, 255, 204, 0.4);
        }
        
        .equipment-item.owned {
            background: rgba(0, 255, 204, 0.15);
            border-color: rgba(0, 255, 204, 0.5);
        }
        
        .equipment-item.owned .equipment-icon {
            background: rgba(0, 255, 204, 0.3);
            border-color: #00ffcc;
        }
        
        .equipment-item.owned .equipment-cost {
            color: #00ffcc;
            font-weight: bold;
        }
        
        .equipment-icon {
            width: 45px;
            height: 45px;
            background: rgba(0, 255, 204, 0.1);
            border: 2px solid #00ffcc;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        
        .equipment-icon:hover {
            background: rgba(0, 255, 204, 0.2);
            box-shadow: 0 0 12px #00ffcc;
        }
        
        .equipment-icon svg {
            width: 24px;
            height: 24px;
            fill: #00ffcc;
        }
        
        
        /* Hexagonal weapon icons */
        .weapon-icon {
            width: 45px;
            height: 45px;
            background: rgba(0, 255, 204, 0.1);
            clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            margin-right: 15px;
            flex-shrink: 0;
            position: relative;
        }
        
        .weapon-icon::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #00ffcc;
            clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
            z-index: -1;
            transition: all 0.2s;
        }
        
        .weapon-icon::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            right: 2px;
            bottom: 2px;
            background: rgba(0, 20, 40, 0.95);
            clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
            z-index: -1;
        }
        
        .weapon-icon:hover::before {
            box-shadow: 0 0 20px #00ffcc;
        }
        
        .weapon-icon:hover {
            transform: scale(1.05);
            background: rgba(0, 255, 204, 0.2);
            box-shadow: 0 0 12px #00ffcc;
        }
        
        .weapon-icon:hover::after {
            background: rgba(0, 20, 40, 0.7); /* More transparent on hover to show background */
        }
        
        .weapon-icon svg {
            width: 24px;
            height: 24px;
            z-index: 1;
            position: relative;
        }
        
        .equipment-info {
            flex-grow: 1;
            text-align: left;
        }
        
        .equipment-name {
            color: #ffffff;
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 4px;
        }
        
        .equipment-description {
            color: #ffffff;
            font-size: 11px;
            margin-bottom: 8px;
            line-height: 1.3;
        }
        
        .equipment-cost {
            color: #ffffff;
            font-size: 12px;
            font-weight: bold;
        }
        
        
        .store-footer {
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #00ffff;
        }

        /* Upgrade Bar Components */
        .upgrade-bar {
            display: flex;
            align-items: center;
            margin: 0;
            padding: 10px;
            background: rgba(0, 255, 204, 0.05);
            border-radius: 6px;
            border: 1px solid rgba(0, 255, 204, 0.2);
            min-height: 70px;
            max-height: 70px; /* Force consistent height */
        }
        
        /* Special weapon bar to accommodate hexagonal icons */
        .weapon-bar {
            display: flex;
            align-items: center;
            margin: 0;
            padding: 10px;
            background: rgba(0, 255, 204, 0.05);
            border-radius: 6px;
            border: 1px solid rgba(0, 255, 204, 0.2);
            min-height: 70px;
            max-height: 70px; /* Force consistent height */
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .weapon-bar:hover {
            background: rgba(0, 255, 204, 0.1);
            border-color: rgba(0, 255, 204, 0.4);
        }

        .upgrade-icon {
            width: 45px;
            height: 45px;
            background: rgba(0, 255, 204, 0.1);
            border: 2px solid #00ffcc;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            margin-right: 15px;
            flex-shrink: 0;
        }

        .upgrade-icon:hover {
            background: rgba(0, 255, 204, 0.2);
            box-shadow: 0 0 12px #00ffcc;
        }

        .upgrade-icon svg {
            width: 24px;
            height: 24px;
            fill: #00ffcc;
        }

        .upgrade-info {
            flex-grow: 1;
        }

        .upgrade-name {
            font-size: 14px;
            font-weight: bold;
            margin: 0 0 4px 0;
            color: #00ffcc;
        }

        .upgrade-description {
            font-size: 11px;
            color: #888888;
            margin: 0 0 6px 0;
        }

        .upgrade-progress {
            display: flex;
            gap: 3px;
            align-items: center;
        }

        .upgrade-segment {
            width: 18px;
            height: 12px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            transition: all 0.3s;
        }

        .upgrade-segment.filled {
            background: #00ffff;
            border-color: #00ffff;
            box-shadow: 0 0 4px #00ffff;
        }

        .upgrade-segment.epic-filled {
            background: #FF8000;
            border-color: #FF8000;
            box-shadow: 0 0 6px #FF8000;
        }

        .upgrade-cost {
            margin: 8px 0 0 0;
            font-size: 12px;
            color: #ffffff;
            text-align: left;
            letter-spacing: 0.5px;
            line-height: 1.2;
        }
        
        /* Store Navigation Focus Indicators */
        .store-focus {
            border: 3px solid #00ffff !important;
            box-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff, inset 0 0 20px rgba(0, 255, 255, 0.3) !important;
            background: rgba(0, 255, 255, 0.2) !important;
            opacity: 1 !important;
            animation: storeFocusPulse 1.5s ease-in-out infinite;
            position: relative !important;
            z-index: 1000 !important;
        }
        
        @keyframes storeFocusPulse {
            0%, 100% {
                box-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff, inset 0 0 20px rgba(0, 255, 255, 0.3);
                border-width: 3px;
            }
            50% {
                box-shadow: 0 0 30px #00ffff, 0 0 60px #00ffff, inset 0 0 30px rgba(0, 255, 255, 0.4);
                border-width: 4px;
            }
        }
        
        .store-focus.service-btn {
            /* Strong glow for service buttons */
            border: 3px solid #00ffff !important;
            box-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff, inset 0 0 15px rgba(0, 255, 255, 0.3) !important;
        }
        
        .store-focus .upgrade-icon,
        .store-focus .equipment-icon {
            border: 2px solid #00ffff !important;
            box-shadow: 0 0 15px #00ffff, 0 0 25px #00ffff !important;
            opacity: 1 !important;
            animation: storeFocusPulse 1.5s ease-in-out infinite;
        }
        
        /* Hexagonal weapon icon focus */
        .store-focus .weapon-icon::before,
        .weapon-icon.store-focus::before {
            background: #00ffff !important;
            box-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff !important;
            animation: storeFocusPulse 1.5s ease-in-out infinite;
        }
        
        /* Apply focus to icon elements directly when they have the focus class */
        .upgrade-icon.store-focus,
        .equipment-icon.store-focus {
            border: 2px solid #00ffff !important;
            box-shadow: 0 0 15px #00ffff, 0 0 25px #00ffff !important;
            opacity: 1 !important;
            animation: storeFocusPulse 1.5s ease-in-out infinite;
        }
        
        /* Focus indicators for different states */
        .store-focus:disabled,
        .store-focus[disabled] {
            border: 3px solid #00ffff !important;
            box-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff, inset 0 0 15px rgba(0, 255, 255, 0.2) !important;
            background: rgba(0, 255, 255, 0.15) !important;
            animation: storeFocusPulse 1.5s ease-in-out infinite !important;
            opacity: 0.8 !important; /* More visible when focused */
        }
        
        /* Game Over UI Styles */
        .game-over-panel {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.95);
            color: #00ffff;
            font-family: 'Courier New', monospace;
            z-index: 9999;
            display: none;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            pointer-events: auto;
        }
        
        .game-over-panel.visible {
            display: flex !important;
        }
        
        .game-over-content {
            text-align: center;
            padding: 40px;
            border: 2px solid #00ffff;
            background: rgba(0, 0, 0, 0.9);
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 0 30px #00ffff, inset 0 0 20px rgba(0, 255, 255, 0.1);
            border-radius: 4px;
            animation: gameOverAppear 0.5s ease-out;
        }
        
        @keyframes gameOverAppear {
            0% {
                opacity: 0;
                transform: scale(0.8) translateY(-50px);
            }
            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }
        
        .game-over-content h1 {
            font-size: 48px;
            margin: 0 0 30px 0;
            color: #00ffcc;
            text-shadow: 0 0 10px #00ffcc, 0 0 20px #00ffcc;
            animation: pulseTeal 2s ease-in-out infinite;
        }
        
        @keyframes pulseTeal {
            0%, 100% {
                text-shadow: 0 0 10px #00ffcc, 0 0 20px #00ffcc;
            }
            50% {
                text-shadow: 0 0 20px #00ffcc, 0 0 30px #00ffcc;
            }
        }

        /* Main Menu Styles */
        .main-menu-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(5px);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: auto;
            cursor: auto; /* Show cursor on menu */

            /* Mobile touch optimization */
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
            touch-action: manipulation; /* Prevents zoom on double-tap */
        }

        .main-menu-background {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }
        
        .main-menu-background::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 255, 204, 0.02) 0%, transparent 50%),
                rgba(0, 0, 0, 0.3);
            pointer-events: none;
        }

        .main-menu-content {
            position: relative;
            z-index: 1;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            padding-left: 80px;
            pointer-events: auto;
        }

        .game-title {
            position: absolute;
            top: 60px;
            right: 80px;
            text-align: right;
        }
        
        .game-title h1 {
            font-size: 72px;
            color: #4487cf;
            margin: 0 0 10px 0;
            font-family: 'CGF Locust Resistance', 'Courier New', monospace;
            letter-spacing: 8px;
            filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.9));
            position: relative;
            background-image:
                url('../Art/UI/Paint_Scratch.jpg'),
                linear-gradient(0deg, #4487cf, #4487cf);
            background-size: 500px 375px, auto;
            background-repeat: no-repeat, no-repeat;
            background-position-x: center, center;
            background-position-y: -300px, center;
            background-blend-mode: screen;
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .game-subtitle {
            font-size: 18px;
            color: #ccd2d9;
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            letter-spacing: 4px;
            text-transform: uppercase;
            text-align: center;
            filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.9));
            position: relative;
            padding: 0 80px;
        }

        .game-subtitle::before,
        .game-subtitle::after {
            content: '';
            position: absolute;
            top: 50%;
            width: 70px;
            height: 1px;
            transform: translateY(-50%);
        }

        .game-subtitle::before {
            left: 10px;
            background: linear-gradient(to right, transparent, #ccd2d9);
        }

        .game-subtitle::after {
            right: 10px;
            background: linear-gradient(to left, transparent, #ccd2d9);
        }


        .menu-navigation {
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: flex-start;
        }

        .menu-button {
            background: rgba(0, 0, 0, 0.8) !important;
            border: 2px solid #00ffff !important;
            color: #00ffff !important;
            padding: 15px 40px;
            font-size: 18px;
            font-family: Arial, Helvetica, sans-serif;
            text-transform: uppercase;
            letter-spacing: 2px;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 300px;
            text-shadow: 0 0 10px #00ffff !important;
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.3) !important;
            text-align: left;

            /* Mobile touch optimization */
            -webkit-tap-highlight-color: rgba(0, 255, 255, 0.3);
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
            touch-action: manipulation;
        }

        .menu-button:hover,
        .menu-button.menu-focus {
            background: rgba(0, 255, 255, 0.2) !important;
            border-color: #00ffcc !important;
            color: #00ffcc !important;
            box-shadow: 
                0 0 20px rgba(0, 255, 255, 0.6),
                0 0 40px rgba(0, 255, 255, 0.3) !important;
            text-shadow: 
                0 0 15px #00ffcc,
                3px 3px 6px rgba(0, 0, 0, 1.0) !important;
            transform: scale(1.05);
        }

        .menu-button:disabled {
            background: rgba(128, 128, 128, 0.1);
            border-color: #666;
            color: #666;
            cursor: not-allowed;
            box-shadow: none;
            text-shadow: none;
            transform: none;
        }

        .back-button {
            margin-top: 40px;
            min-width: 200px;
            background: rgba(255, 165, 0, 0.1);
            border-color: #ffa500;
            color: #ffa500;
            text-shadow: 0 0 10px #ffa500;
        }

        .back-button:hover {
            background: rgba(255, 165, 0, 0.2);
            box-shadow: 
                0 0 20px rgba(255, 165, 0, 0.6),
                0 0 40px rgba(255, 165, 0, 0.3);
            text-shadow: 0 0 15px #ffa500;
        }

        /* Submenu Screens */
        .submenu-screen {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2;
            pointer-events: auto;
            background-image: url('../Art/UI/menu_art_01.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        .submenu-screen::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: -1;
            background:
                radial-gradient(ellipse at center, rgba(0, 100, 200, 0.1) 0%, rgba(0, 50, 100, 0.2) 40%, rgba(0, 0, 0, 0.6) 100%),
                linear-gradient(135deg, rgba(0, 20, 40, 0.4) 0%, rgba(0, 40, 80, 0.6) 50%, rgba(0, 10, 30, 0.8) 100%);
        }

        .submenu-screen.active {
            display: flex;
        }

        .submenu-content {
            text-align: center;
            max-width: 800px;
            width: 100%;
            padding: 0 40px;
            position: relative;
            z-index: 1;
            pointer-events: auto;
        }

        .submenu-content h2 {
            font-size: 48px;
            color: #00ffff;
            margin: 0 0 40px 0;
            text-shadow: 0 0 20px #00ffff;
            font-family: 'CGF Locust Resistance', 'Courier New', monospace;
            letter-spacing: 4px;
        }

        /* Game Over Container - Similar to main menu but distinct */
        .game-over-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(5px);
            z-index: 1000;
            display: none;
            align-items: center;
            justify-content: center;
            pointer-events: auto;
        }
        
        .game-over-container.visible {
            display: flex;
        }

        .game-over-background {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }
        
        .game-over-background::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at 20% 20%, rgba(255, 0, 0, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 0, 100, 0.02) 0%, transparent 50%),
                rgba(0, 0, 0, 0.6);
            pointer-events: none;
        }

        .game-over-main-content {
            position: relative;
            z-index: 1;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            padding-left: 80px;
            flex-direction: column;
            justify-content: center;
        }
        
        /* High Scores Screen */
        /* High Score Entry Styles for Game Over */
        .highscore-entry-new {
            margin: 20px 0;
        }
        
        .new-highscore-notification {
            text-align: center;
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid #00ffcc;
            border-radius: 10px;
            padding: 30px;
            margin: 20px 0;
            box-shadow: 0 0 30px rgba(0, 255, 204, 0.4);
        }
        
        .new-highscore-notification p {
            color: #ffffff;
            font-size: 16px;
            margin: 15px 0;
        }
        
        .highscore-input {
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid #00ffff;
            color: #00ffff;
            padding: 12px 20px;
            font-size: 16px;
            font-family: 'Courier New', monospace;
            text-align: center;
            border-radius: 5px;
            margin: 15px 10px;
            min-width: 200px;
            transition: all 0.3s ease;
        }
        
        .highscore-input:focus {
            outline: none;
            border-color: #00ffcc;
            box-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
            color: #00ffcc;
        }
        
        .highscore-input::placeholder {
            color: rgba(0, 255, 255, 0.5);
        }
        
        .final-score-display {
            margin-top: 10px;
        }
        
        .main-menu-highscore-list {
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid #00ffff;
            border-radius: 0 !important;
            padding: 30px;
            margin-bottom: 40px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 255, 255, 0.1);
            max-height: 400px;
            overflow-y: auto;
            text-align: left;
        }

        .main-menu-highscore-list-expanded {
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid #00ffff;
            border-radius: 0 !important;
            padding: 30px;
            margin: 0 auto 60px auto !important; /* Remove top margin since content has padding now */
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 255, 255, 0.1);
            text-align: center;
            width: 95%;
        }

        .main-menu-highscore-list-expanded .save-slot {
            text-align: center;
        }

        /* Make only the highscore content area scrollable with proper background coverage */
        #highScoresScreen {
            overflow-y: auto;
        }

        /* Fix the background coverage issue */
        #highScoresScreen::after {
            height: 500vh !important; /* Make background overlay much taller to cover all 19 pilots */
        }

        #highScoresScreen .submenu-content {
            padding-top: 20px !important; /* Match back button position */
            padding-bottom: 400px !important; /* Extra padding to ensure background covers all 19 pilots */
        }

        #highScoresScreen .submenu-content h2 {
            margin-top: 0 !important; /* Title at same level as back button */
            margin-bottom: 10px !important; /* Minimal gap - frame snaps right below title */
        }

        /* NUCLEAR OPTION - Override everything with maximum specificity */
        /* First, disable the flexbox centering for highscore screen */
        div#highScoresScreen.submenu-screen.active {
            align-items: flex-start !important; /* Stop vertical centering */
            justify-content: center; /* Keep horizontal centering */
        }

        div#highScoresScreen.submenu-screen div.submenu-content {
            padding-top: 20px !important;
            padding-bottom: 400px !important;
        }

        div#highScoresScreen.submenu-screen div.submenu-content h2 {
            margin-top: 0px !important;
            margin-bottom: 10px !important;
            position: relative !important;
            top: 0px !important;
        }

        div#highScoresScreen.submenu-screen div.submenu-content div#mainMenuHighScoresList {
            margin-top: 0px !important;
            position: relative !important;
            top: 0px !important;
        }

        /* Settings Screen */
        .settings-grid {
            display: flex;
            flex-direction: column;
            gap: 30px;
            margin-bottom: 40px;
            pointer-events: auto;
        }

        .setting-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid #00ffff;
            padding: 20px;
            pointer-events: auto;
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
        }

        .setting-item label {
            color: #00ffff;
            font-size: 16px;
            font-family: 'Courier New', monospace;
            text-transform: uppercase;
            letter-spacing: 2px;
            text-shadow: 0 0 15px #00ffff, 0 0 25px #00ffff;
        }

        .setting-item input[type="range"] {
            width: 200px;
            margin: 0 20px;
            pointer-events: auto !important;
            cursor: pointer;
            -webkit-appearance: none;
            appearance: none;
            height: 8px;
            background: rgba(0, 255, 255, 0.3);
            outline: none;
            border-radius: 4px;
            border: none;
            position: relative;
            z-index: 1000;
        }
        
        .setting-item input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 22px;
            height: 22px;
            background: #00ffff;
            cursor: pointer;
            border-radius: 50%;
            border: 3px solid #00ffcc;
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
            position: relative;
            z-index: 1001;
            pointer-events: auto !important;
        }
        
        .setting-item input[type="range"]::-moz-range-thumb {
            width: 22px;
            height: 22px;
            background: #00ffff;
            cursor: pointer;
            border-radius: 50%;
            border: 3px solid #00ffcc;
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
            pointer-events: auto !important;
            -moz-appearance: none;
        }
        
        .setting-item input[type="range"]::-moz-range-track {
            background: rgba(0, 255, 255, 0.3);
            height: 8px;
            border-radius: 4px;
            border: none;
        }

        .setting-item span {
            color: #00ffcc;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            min-width: 50px;
            text-align: center;
            text-shadow: 0 0 15px #00ffcc, 0 0 25px #00ffcc;
            background: rgba(0, 0, 0, 0.6);
            padding: 4px 8px;
            border: 1px solid rgba(0, 255, 204, 0.3);
        }
        
        /* Settings message for main menu */
        .settings-message {
            text-align: center;
            padding: 40px 20px;
            margin-bottom: 40px;
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid #00ffff;
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
        }
        
        .settings-message p {
            color: #ffffff;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            line-height: 1.6;
            margin-bottom: 20px;
        }
        
        .settings-message strong {
            color: #00ffff;
            font-weight: bold;
            text-shadow: 0 0 10px #00ffff;
        }

        /* Credits Screen */
        .credits-content {
            display: flex;
            flex-direction: column;
            gap: 40px;
            margin-bottom: 40px;
        }

        .credit-section {
            background: rgba(0, 0, 0, 0.8);
            border: 1px solid #00ffff;
            border-radius: 0 !important;
            padding: 30px;
            text-align: center;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 255, 255, 0.1);
        }

        .credit-section h3 {
            color: #00ffff;
            font-size: 24px;
            margin: 0 0 20px 0;
            font-family: Arial, Helvetica, sans-serif;
            text-transform: uppercase;
            letter-spacing: 2px;
            text-shadow: 0 0 15px #00ffff;
        }

        .credit-section p {
            color: #00ffcc;
            font-size: 16px;
            line-height: 1.6;
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            text-shadow: 0 0 8px #00ffcc;
        }

        /* Save Slots Styling */
        .save-slots-container {
            max-width: 700px;
            margin: 0 auto 40px;
        }

        .save-slot {
            display: block;
            width: 100%;
            margin: 10px 0;
            padding: 15px 20px;
            border: 2px solid rgba(0, 255, 255, 0.3);
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.7);
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: left;
            position: relative;
        }

        .save-slot:hover {
            border-color: #00ffff;
            background: rgba(0, 255, 255, 0.05);
            box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
        }

        .save-slot.occupied {
            border-color: rgba(0, 255, 255, 0.6);
            background: rgba(0, 20, 20, 0.8);
        }

        .save-slot.deceased {
            border-color: rgba(255, 100, 100, 0.6);
            background: rgba(20, 0, 0, 0.8);
            cursor: not-allowed;
        }

        .save-slot.deceased:hover {
            border-color: #ff6464;
            background: rgba(255, 100, 100, 0.05);
            box-shadow: 0 0 15px rgba(255, 100, 100, 0.3);
        }

        .save-slot-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .slot-number {
            color: #00ffff;
            font-weight: bold;
            font-size: 16px;
            min-width: 30px;
        }

        .slot-name {
            color: #ffffff;
            font-size: 18px;
            font-weight: bold;
            flex-grow: 1;
            margin-left: 15px;
        }

        .slot-status {
            color: rgba(255, 100, 100, 0.9);
            font-size: 14px;
            font-weight: bold;
            text-transform: uppercase;
        }

        .save-slot-details {
            color: rgba(0, 255, 255, 0.7);
            font-size: 14px;
            line-height: 1.4;
        }

        .save-slot.empty .save-slot-details {
            color: rgba(255, 255, 255, 0.5);
        }

        /* Deceased character slot styling */
        .save-slot.deceased {
            background: rgba(255, 0, 0, 0.15);
            border-color: rgba(255, 100, 100, 0.8);
            position: relative;
        }

        .save-slot.deceased::before {
            content: 'DECEASED';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            font-weight: bold;
            color: rgba(255, 50, 50, 0.3);
            text-shadow: 0 0 10px rgba(255, 50, 50, 0.5);
            pointer-events: none;
            z-index: 5;
            letter-spacing: 4px;
            transform: rotate(-15deg);
            font-family: 'Courier New', monospace;
        }

        .save-slot.deceased:hover {
            background: rgba(255, 0, 0, 0.2);
            border-color: rgba(255, 150, 150, 1.0);
        }

        .save-slot.deceased .save-slot-details {
            color: rgba(255, 200, 200, 0.8);
        }

        /* Enhanced character information styling */
        .slot-character-info {
            color: rgba(0, 255, 204, 0.8);
            font-size: 12px;
            line-height: 1.3;
            margin: 3px 0;
        }

        .slot-cargo-info {
            color: rgba(255, 215, 0, 0.8);
            font-size: 12px;
            margin: 2px 0;
        }

        .slot-meta-info {
            color: rgba(0, 255, 255, 0.6);
            font-size: 11px;
            margin: 2px 0;
            font-style: italic;
        }

        .slot-delete {
            background: transparent;
            border: 2px solid #00ffff;
            color: #00ffff;
            width: 36px;
            height: 36px;
            border-radius: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            box-shadow: 0 0 4px rgba(0, 255, 255, 0.3);
        }

        .slot-delete::before,
        .slot-delete::after {
            content: '';
            position: absolute;
            width: 16px;
            height: 2px;
            background: #00ffff;
            transition: all 0.2s ease;
        }

        .slot-delete::before {
            transform: rotate(45deg);
        }

        .slot-delete::after {
            transform: rotate(-45deg);
        }

        .slot-delete:hover {
            border-color: #00ffcc;
            color: #00ffcc;
            box-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
            transform: translateY(-50%) scale(1.1);
        }

        .slot-delete:hover::before,
        .slot-delete:hover::after {
            background: #00ffcc;
            box-shadow: 0 0 4px rgba(0, 255, 204, 0.5);
        }

        .save-slots-footer {
            text-align: center;
            margin-top: 30px;
        }

        /* Upper left back button for save slots */
        .save-slots-back-btn {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(0, 255, 255, 0.1);
            border: 1px solid #00ffff;
            color: #00ffff;
            padding: 10px 20px;
            font-size: 14px;
            cursor: pointer;
            border-radius: 5px;
            transition: all 0.3s ease;
            z-index: 10;
        }

        .save-slots-back-btn:hover {
            background: rgba(0, 255, 255, 0.2);
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
            transform: scale(1.05);
        }

        /* Clear High Scores button in bottom right corner */
        .clear-scores-btn {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: rgba(255, 68, 68, 0.1);
            border: 1px solid #ff4444;
            color: #ff4444;
            padding: 8px 12px;
            font-size: 13px;
            cursor: pointer;
            border-radius: 5px;
            transition: all 0.3s ease;
            z-index: 1000;
            white-space: nowrap;
            font-weight: bold;
            text-align: right;
            min-width: auto;
            width: auto;
        }

        .clear-scores-btn:hover {
            background: rgba(255, 68, 68, 0.2);
            box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
            transform: scale(1.05);
        }

        .save-slots-instructions {
            color: rgba(0, 255, 255, 0.7);
            font-size: 14px;
            line-height: 1.5;
            margin: 0 0 20px 0;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }
        
        /* Repair button pulse animations */
        @keyframes pulseGreenSlow {
            0%, 100% {
                box-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
            }
            50% {
                box-shadow: 0 0 20px rgba(0, 255, 0, 0.9);
            }
        }
        
        @keyframes pulseYellowMedium {
            0%, 100% {
                box-shadow: 0 0 10px rgba(255, 255, 0, 0.6);
            }
            50% {
                box-shadow: 0 0 20px rgba(255, 255, 0, 0.9);
            }
        }
        
        @keyframes pulseRedFast {
            0%, 100% {
                box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
            }
            50% {
                box-shadow: 0 0 20px rgba(255, 0, 0, 1.0);
            }
        }
        
        /* Pulse animation classes */
        .pulse-green {
            animation: pulseGreenSlow 2.5s ease-in-out infinite;
        }
        
        .pulse-yellow {
            animation: pulseYellowMedium 1.5s ease-in-out infinite;
        }
        
        .pulse-red {
            animation: pulseRedFast 0.8s ease-in-out infinite;
        }
        
        /* Health bar critical pulse animation - targets the container frame */
        .health-critical {
            animation: healthCriticalPulse 1.0s ease-in-out infinite;
        }
        
        @keyframes healthCriticalPulse {
            0%, 100% {
                border-color: #ff4444 !important;
                box-shadow: 0 0 8px rgba(255, 68, 68, 0.6), inset 0 0 8px rgba(255, 68, 68, 0.3);
            }
            50% {
                border-color: #ff0000 !important;
                box-shadow: 0 0 20px rgba(255, 0, 0, 1.0), inset 0 0 12px rgba(255, 0, 0, 0.5);
            }
        }
        
        .final-score h2 {
            font-size: 24px;
            margin: 0 0 15px 0;
        }
        
        .score-display {
            font-size: 36px;
            color: #00ffff;
            text-shadow: 0 0 8px #00ffff;
            margin-bottom: 30px;
        }
        
        .highscore-entry {
            margin: 30px 0;
            padding: 20px;
            border: 1px solid #00ffff;
            background: rgba(0, 255, 255, 0.1);
        }
        
        .highscore-entry h3 {
            color: #00ffcc;
            text-shadow: 0 0 8px #00ffcc;
            margin: 0 0 15px 0;
        }
        
        .highscore-entry input {
            background: rgba(0, 255, 255, 0.1);
            border: 1px solid #00ffff;
            color: #00ffff;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            padding: 8px 12px;
            margin: 10px;
            text-align: center;
        }
        
        .highscore-display {
            margin: 30px 0;
        }
        
        .highscore-list {
            background: rgba(0, 255, 255, 0.05);
            border: 1px solid #00ffff;
            padding: 20px;
            text-align: left;
            max-height: 500px;
            overflow-y: auto;
        }
        
        .highscore-item {
            display: grid;
            grid-template-columns: 40px 1fr 100px 200px 80px;
            gap: 10px;
            padding: 8px 0;
            border-bottom: 1px solid rgba(0, 255, 255, 0.2);
            align-items: center;
        }

        .highscore-item:last-child {
            border-bottom: none;
        }

        /* Death score styling */
        .highscore-item.death-score {
            background: rgba(255, 50, 50, 0.1);
            border-bottom: 1px solid rgba(255, 100, 100, 0.3);
        }

        .highscore-rank {
            color: #888888;
            font-weight: bold;
            text-align: center;
        }

        .highscore-name {
            color: #00ffff;
            text-align: left;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .death-score .highscore-name {
            color: rgba(255, 200, 200, 0.9);
        }

        .highscore-score {
            color: #00ffcc;
            text-align: right;
            font-weight: bold;
        }

        .death-score .highscore-score {
            color: rgba(255, 150, 150, 0.9);
        }

        .highscore-details {
            color: rgba(255, 255, 0, 0.8);
            text-align: center;
            font-size: 12px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .death-score .highscore-details {
            color: rgba(255, 100, 100, 0.8);
        }

        .highscore-date {
            color: #888888;
            text-align: right;
            font-size: 12px;
        }
        
        .game-over-button {
            background: rgba(0, 255, 255, 0.1);
            border: 1px solid #00ffff;
            color: #00ffff;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            padding: 12px 20px;
            margin: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .game-over-button:hover {
            background: rgba(0, 255, 255, 0.2);
            box-shadow: 0 0 10px #00ffff;
        }
        
        .game-over-actions {
            margin-top: 30px;
        }
        
        /* In-Game ESC Menu Styles */
        .in-game-menu-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 10000;
            display: none;
            cursor: auto; /* Show cursor on pause menu */
        }
        
        .in-game-menu-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
        }
        
        .in-game-menu-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 40px;
            text-align: center;
            min-width: 300px;
        }
        
        .in-game-menu-content h2 {
            color: #00ffff;
            font-size: 28px;
            margin-bottom: 30px;
            text-shadow: 0 0 15px #00ffff, 0 0 25px #00ffff;
            letter-spacing: 4px;
            font-family: 'Courier New', monospace;
            text-transform: uppercase;
        }
        
        .in-game-menu-buttons {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .in-game-menu-buttons .menu-button {
            width: 100%;
            min-width: 250px;
            background: rgba(0, 0, 0, 0.9);
            border: 2px solid #00ffff;
            color: #00ffff;
            padding: 15px 30px;
            font-size: 16px;
            font-family: 'Courier New', monospace;
            text-transform: uppercase;
            letter-spacing: 2px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
        }
        
        .in-game-menu-buttons .menu-button:hover {
            background: rgba(0, 255, 255, 0.1);
            box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
            transform: scale(1.05);
        }
        
        .in-game-menu-buttons .menu-button.menu-focus {
            background: rgba(0, 255, 255, 0.2);
            box-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
            border-width: 3px;
        }
        
        /* Save Indicator Animation */
        @keyframes pulse {
            0%, 100% { opacity: 0.6; transform: scale(1); }
            50% { opacity: 1; transform: scale(1.05); }
        }
        
        /* Confirmation Dialog - Redesigned to match main menu style */
        .confirmation-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(5px);
            z-index: 15000;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: auto !important; /* Force cursor visibility */
            pointer-events: auto;
        }

        .confirmation-content {
            background: rgba(0, 0, 0, 0.9);
            border: 3px solid #00ffff;
            border-radius: 0;
            padding: 40px 60px;
            text-align: center;
            box-shadow:
                0 0 40px rgba(0, 255, 255, 0.4),
                inset 0 0 60px rgba(0, 255, 255, 0.05);
            min-width: 500px;
            max-width: 700px;
            position: relative;
            cursor: auto !important; /* Force cursor visibility */
            pointer-events: auto;
        }

        /* Decorative corner accents */
        .confirmation-content::before,
        .confirmation-content::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            border: 2px solid #00ffcc;
        }

        .confirmation-content::before {
            top: 10px;
            left: 10px;
            border-right: none;
            border-bottom: none;
        }

        .confirmation-content::after {
            bottom: 10px;
            right: 10px;
            border-left: none;
            border-top: none;
        }

        .confirmation-content h3 {
            color: #00ffff;
            margin: 0 0 20px 0;
            font-size: 28px;
            font-family: Arial, Helvetica, sans-serif;
            text-transform: uppercase;
            letter-spacing: 3px;
            text-shadow:
                0 0 20px #00ffff,
                0 0 40px rgba(0, 255, 255, 0.5);
        }

        .confirmation-content p {
            color: rgba(255, 255, 255, 0.9);
            margin: 0 0 30px 0;
            font-size: 16px;
            line-height: 1.6;
            font-family: 'Courier New', monospace;
        }

        .confirmation-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            cursor: auto !important; /* Force cursor visibility */
        }

        .confirmation-buttons .menu-button {
            min-width: 150px;
            cursor: pointer !important; /* Force cursor visibility on buttons */
        }
        
        
        /* In-Game Settings - Complete Rebuild */
        .in-game-settings-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: none;
            background: rgba(0, 0, 0, 0.3);
            z-index: 10001;
            cursor: auto; /* Show cursor on settings overlay */
        }
        
        .in-game-settings-container {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 600px;
            max-width: 90vw;
            background: 
                linear-gradient(rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.95)),
                linear-gradient(90deg, #00ffff 0%, #00ffff 100%);
            background-clip: padding-box, border-box;
            border: 3px solid transparent;
            box-shadow: 
                0 0 30px rgba(0, 255, 255, 0.5),
                inset 0 0 20px rgba(0, 255, 255, 0.1);
            clip-path: polygon(
                0 20px, 20px 0,
                calc(100% - 20px) 0, 100% 20px,
                100% calc(100% - 20px), calc(100% - 20px) 100%,
                20px 100%, 0 calc(100% - 20px)
            );
        }
        
        .in-game-settings-header {
            padding: 25px 30px 15px 30px;
            border-bottom: 2px solid rgba(0, 255, 255, 0.3);
            text-align: center;
        }
        
        .in-game-settings-header h2 {
            color: #00ffff;
            font-size: 28px;
            font-family: 'CGF Locust Resistance', 'Courier New', monospace;
            text-transform: uppercase;
            letter-spacing: 3px;
            margin: 0;
            text-shadow: 0 0 20px #00ffff;
        }
        
        .in-game-settings-content {
            padding: 25px 30px;
            max-height: 400px;
            overflow-y: auto;
        }
        
        .in-game-setting-group {
            margin-bottom: 30px;
        }
        
        .in-game-setting-group h3 {
            color: #00ffcc;
            font-size: 18px;
            font-family: Arial, Helvetica, sans-serif;
            text-transform: uppercase;
            letter-spacing: 2px;
            margin: 0 0 15px 0;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(0, 255, 204, 0.3);
            text-shadow: 0 0 10px #00ffcc;
        }
        
        .in-game-setting-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 15px;
            margin-bottom: 8px;
            background: rgba(0, 0, 0, 0.6);
            border: 1px solid rgba(0, 255, 255, 0.2);
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
        }
        
        .in-game-setting-row label {
            color: #00ffff;
            font-size: 14px;
            font-family: Arial, Helvetica, sans-serif;
            text-transform: uppercase;
            letter-spacing: 1px;
            min-width: 140px;
            text-shadow: 0 0 8px #00ffff;
        }
        
        .slider-container {
            display: flex;
            align-items: center;
            gap: 15px;
            flex: 1;
            justify-content: flex-end;
        }
        
        .in-game-setting-row input[type="range"] {
            width: 200px;
            height: 6px;
            -webkit-appearance: none;
            appearance: none;
            background: rgba(0, 255, 255, 0.2);
            border: 1px solid rgba(0, 255, 255, 0.4);
            outline: none;
            cursor: pointer;
        }
        
        .in-game-setting-row input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            background: #00ffff;
            border: 2px solid #00ffcc;
            cursor: pointer;
            box-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
            transition: all 0.2s ease;
        }
        
        .in-game-setting-row input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.1);
            box-shadow: 0 0 12px rgba(0, 255, 255, 1);
        }
        
        .in-game-setting-row input[type="range"]::-moz-range-thumb {
            width: 18px;
            height: 18px;
            background: #00ffff;
            border: 2px solid #00ffcc;
            cursor: pointer;
            box-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
            -moz-appearance: none;
        }
        
        .volume-display {
            color: #00ffcc;
            font-size: 14px;
            font-family: Arial, Helvetica, sans-serif;
            min-width: 50px;
            text-align: center;
            text-shadow: 0 0 8px #00ffcc;
            font-weight: bold;
        }

        /* Mobile Controls Toggle Button */
        .toggle-container {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            flex: 1;
        }

        .toggle-button {
            padding: 8px 20px;
            background: #333333;
            border: 2px solid #00ffff;
            color: #00ffff;
            font-size: 14px;
            font-family: Arial, Helvetica, sans-serif;
            text-transform: uppercase;
            letter-spacing: 1px;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.3s ease;
            min-width: 120px;
            text-align: center;
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
        }

        .toggle-button:hover {
            transform: scale(1.05);
            box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
        }

        .toggle-button:active {
            transform: scale(0.98);
        }

        /* Description text for settings */
        .in-game-setting-description {
            padding: 8px 15px;
            margin-top: -5px;
            margin-bottom: 15px;
            color: #888888;
            font-size: 12px;
            font-style: italic;
            line-height: 1.4;
        }

        .in-game-action-button {
            padding: 8px 16px;
            font-size: 12px;
            font-family: Arial, Helvetica, sans-serif;
            text-transform: uppercase;
            letter-spacing: 1px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid;
            background: rgba(0, 0, 0, 0.8);
        }
        
        .in-game-action-button.danger {
            color: #ff4444;
            border-color: #ff4444;
            box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
        }
        
        .in-game-action-button.danger:hover {
            background: rgba(255, 68, 68, 0.1);
            box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
            transform: scale(1.05);
        }
        
        .in-game-settings-footer {
            padding: 12px 30px;
            border-top: 2px solid rgba(0, 255, 255, 0.3);
            text-align: center;
        }
        
        .in-game-back-button {
            padding: 12px 30px;
            background: rgba(0, 0, 0, 0.9);
            border: 2px solid #00ffff;
            color: #00ffff;
            font-size: 16px;
            font-family: Arial, Helvetica, sans-serif;
            text-transform: uppercase;
            letter-spacing: 2px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
        }
        
        .in-game-back-button:hover {
            background: rgba(0, 255, 255, 0.1);
            box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
            transform: scale(1.05);
        }
        
        .clear-discovery-button:hover {
            background: rgba(255, 0, 0, 0.3);
            box-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
            transform: scale(1.05);
        }

        /* Encyclopedia Styles */
        .encyclopedia-frame {
            border: 2px solid #00ffff !important;
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.3) !important;
            clip-path: none !important;
            background: rgba(0, 0, 0, 0.95) !important;
        }
        
        .encyclopedia-nav {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            padding: 0 10px;
            overflow-x: hidden;
            flex-wrap: nowrap;
            justify-content: center;
        }
        
        .encyclopedia-tab {
            padding: 8px 14px;
            background: rgba(0, 0, 0, 0.7);
            border: 1px solid rgba(0, 255, 255, 0.3);
            color: rgba(0, 255, 255, 0.7);
            font-size: 11px;
            font-family: 'Courier New', monospace;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
            flex-shrink: 0;
        }
        
        .encyclopedia-tab:hover {
            background: rgba(0, 255, 255, 0.1);
            color: #00ffff;
            border-color: #00ffff;
        }
        
        .encyclopedia-tab.active {
            background: rgba(0, 255, 255, 0.2);
            color: #00ffff;
            border-color: #00ffff;
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
        }
        
        .encyclopedia-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
        }
        
        .encyclopedia-tab-content {
            display: none;
        }
        
        .encyclopedia-tab-content.active {
            display: block;
        }
        
        .encyclopedia-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(0, 255, 255, 0.3);
        }
        
        .encyclopedia-section-header h3 {
            margin: 0;
            color: #00ffff;
            font-size: 18px;
            font-family: 'Courier New', monospace;
            text-transform: uppercase;
            letter-spacing: 2px;
        }
        
        .discovery-progress {
            color: rgba(0, 255, 255, 0.8);
            font-size: 12px;
            font-family: 'Courier New', monospace;
        }
        
        .mineral-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 8px;
            max-height: 450px;
            overflow-y: auto;
            padding-right: 10px;
        }
        
        .mineral-entry {
            background: rgba(0, 0, 0, 0.8);
            border: 1px solid rgba(0, 255, 255, 0.3);
            padding: 8px;
            border-radius: 3px;
            transition: all 0.3s ease;
        }
        
        .mineral-entry.unknown {
            opacity: 0.5;
            border-color: rgba(128, 128, 128, 0.3);
        }
        
        .mineral-entry:hover {
            border-color: #00ffff;
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
        }
        
        .mineral-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 5px;
        }
        
        .mineral-name {
            color: #00ffff;
            font-weight: bold;
            font-size: 14px;
            text-transform: uppercase;
        }
        
        .mineral-rarity {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 3px;
            text-transform: uppercase;
        }
        
        .mineral-rarity.common {
            background: rgba(128, 128, 128, 0.5);
            color: #ccc;
        }
        
        .mineral-rarity.uncommon {
            background: rgba(0, 255, 0, 0.3);
            color: #0f0;
        }
        
        .mineral-rarity.rare {
            background: rgba(0, 0, 255, 0.3);
            color: #66f;
        }
        
        .mineral-rarity.ultra-rare {
            background: rgba(128, 0, 255, 0.3);
            color: #a0f;
        }

        .mineral-rarity.epic {
            background: rgba(255, 215, 0, 0.3);
            color: #ffd700;
        }

        .mineral-rarity.legendary {
            background: rgba(220, 20, 60, 0.3);
            color: #dc143c;
        }

        .mineral-rarity.gem {
            background: rgba(255, 105, 180, 0.3);
            color: #ffb3d9;
        }

        .mineral-description {
            margin-top: 10px;
            font-size: 11px;
            color: rgba(0, 255, 255, 0.6);
            font-style: italic;
            line-height: 1.4;
        }

        /* Technology Database Styles */
        .tech-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 8px;
            margin-bottom: 10px;
        }

        .tech-upgrade-box {
            background: rgba(0, 255, 204, 0.1);
            border: 2px solid #00ffcc;
            border-radius: 8px;
            padding: 6px 12px;
            text-align: center;
            transition: all 0.3s;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 70px;
        }

        .tech-upgrade-box:hover {
            background: rgba(0, 255, 204, 0.2);
            box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
        }

        .tech-upgrade-box.undiscovered {
            background: rgba(128, 128, 128, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
            opacity: 0.5;
        }

        .tech-upgrade-box.undiscovered:hover {
            background: rgba(128, 128, 128, 0.15);
            box-shadow: none;
        }

        .tech-icon {
            width: 42px;
            height: 42px;
            margin: 0 auto 6px;
            background: rgba(0, 255, 204, 0.1);
            border: 2px solid #00ffcc;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .tech-upgrade-box.undiscovered .tech-icon {
            border-color: rgba(255, 255, 255, 0.2);
        }

        .tech-icon svg {
            width: 24px;
            height: 24px;
            fill: #00ffcc;
        }

        .tech-upgrade-box.undiscovered .tech-icon svg {
            fill: rgba(255, 255, 255, 0.3);
        }

        .tech-name {
            color: #00ffcc;
            font-size: 11px;
            font-weight: bold;
            margin-bottom: 3px;
            font-family: Arial, sans-serif;
            line-height: 1.3;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
        }

        .tech-upgrade-box.undiscovered .tech-name {
            color: rgba(255, 255, 255, 0.4);
        }

        .tech-level {
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            font-family: Arial, sans-serif;
        }

        .tech-upgrade-box.undiscovered .tech-level {
            color: rgba(255, 255, 255, 0.3);
        }

        .tech-category {
            margin-bottom: 8px;
        }

        .tech-category h4 {
            margin-bottom: 6px;
        }

        .mineral-icon-container {
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            border: 1px solid rgba(0, 255, 255, 0.3);
            border-radius: 3px;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .mineral-icon {
            display: block;
        }
        
        .mineral-info {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .mineral-value {
            font-size: 11px;
            color: rgba(0, 255, 255, 0.8);
        }
        
        .enemy-list {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .enemy-entry {
            background: rgba(0, 0, 0, 0.8);
            border: 1px solid rgba(255, 0, 0, 0.3);
            padding: 15px;
            border-radius: 5px;
            display: grid;
            grid-template-columns: 60px 1fr;
            gap: 15px;
            transition: all 0.3s ease;
        }
        
        .enemy-entry.unknown {
            opacity: 0.5;
            border-color: rgba(128, 128, 128, 0.3);
        }
        
        .enemy-entry:hover {
            border-color: #ff4444;
            box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
        }
        
        .enemy-icon {
            width: 60px;
            height: 60px;
            background: rgba(255, 0, 0, 0.1);
            border: 1px solid rgba(255, 0, 0, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ff4444;
            font-size: 24px;
            border-radius: 5px;
        }
        
        .enemy-info h4 {
            margin: 0 0 5px 0;
            color: #ff4444;
            font-size: 14px;
            text-transform: uppercase;
        }
        
        .enemy-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-top: 10px;
            font-size: 11px;
            color: rgba(255, 68, 68, 0.8);
        }
        

        /* Debug Spawn Menu Styles */
        .debug-menu {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10000;
            cursor: auto; /* Show cursor on debug menu */
            font-family: 'Courier New', monospace;
        }

        .debug-menu-content {
            background: rgba(0, 20, 40, 0.95);
            border: 2px solid #00ffcc;
            border-radius: 8px;
            padding: 20px;
            max-width: 600px;
            max-height: 80vh;
            overflow-y: auto;
            color: #00ffcc;
        }

        .debug-menu-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            border-bottom: 1px solid #00ffcc;
            padding-bottom: 10px;
        }

        .debug-menu-header h2 {
            margin: 0;
            color: #00ffff;
            font-size: 18px;
        }

        .debug-close-btn {
            background: none;
            border: 2px solid #ff4444;
            color: #ff4444;
            font-size: 20px;
            font-weight: bold;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .debug-close-btn:hover {
            background: #ff4444;
            color: white;
        }

        .debug-section {
            margin-bottom: 25px;
        }

        .debug-section h3 {
            margin: 0 0 10px 0;
            color: #ffff00;
            font-size: 14px;
            border-bottom: 1px solid rgba(255, 255, 0, 0.3);
            padding-bottom: 5px;
        }

        .debug-buttons {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 8px;
        }

        .debug-spawn-btn {
            background: rgba(0, 255, 204, 0.1);
            border: 1px solid #00ffcc;
            color: #00ffcc;
            padding: 8px 12px;
            font-size: 11px;
            font-family: 'Courier New', monospace;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .debug-spawn-btn:hover {
            background: rgba(0, 255, 204, 0.2);
            border-color: #00ffff;
            color: #00ffff;
            box-shadow: 0 0 8px rgba(0, 255, 204, 0.4);
        }

        .debug-menu-footer {
            margin-top: 20px;
            border-top: 1px solid #00ffcc;
            padding-top: 10px;
            text-align: center;
            font-size: 12px;
            color: #888;
        }

        .debug-menu-footer strong {
            color: #00ffcc;
        }

        /* Meta Loot Drop Button Styling */
        .meta-loot-common {
            background: rgba(0, 255, 0, 0.1) !important;
            border-color: #00FF00 !important;
            color: #00FF00 !important;
        }

        .meta-loot-common:hover {
            background: rgba(0, 255, 0, 0.2) !important;
            box-shadow: 0 0 8px rgba(0, 255, 0, 0.4) !important;
        }

        .meta-loot-uncommon {
            background: rgba(0, 128, 255, 0.1) !important;
            border-color: #0080FF !important;
            color: #0080FF !important;
        }

        .meta-loot-uncommon:hover {
            background: rgba(0, 128, 255, 0.2) !important;
            box-shadow: 0 0 8px rgba(0, 128, 255, 0.4) !important;
        }

        .meta-loot-rare {
            background: rgba(255, 128, 0, 0.1) !important;
            border-color: #FF8000 !important;
            color: #FF8000 !important;
        }

        .meta-loot-rare:hover {
            background: rgba(255, 128, 0, 0.2) !important;
            box-shadow: 0 0 8px rgba(255, 128, 0, 0.4) !important;
        }

        .meta-loot-epic {
            background: rgba(128, 0, 255, 0.1) !important;
            border-color: #8000FF !important;
            color: #8000FF !important;
        }

        .meta-loot-epic:hover {
            background: rgba(128, 0, 255, 0.2) !important;
            box-shadow: 0 0 8px rgba(128, 0, 255, 0.4) !important;
        }

        /* Overcharge countdown pulsing animation */
        @keyframes overchargePulse {
            0% {
                opacity: 0.8;
                transform: scale(1);
                text-shadow: 0 0 15px #ff6600, 0 0 30px #ff6600;
                box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
            }
            100% {
                opacity: 1;
                transform: scale(1.05);
                text-shadow: 0 0 25px #ff6600, 0 0 50px #ff6600;
                box-shadow: 0 0 35px rgba(255, 102, 0, 0.6);
            }
        }

        /* Player Name Entry Screen */
        #playerNameEntryScreen {
            background: rgba(0, 0, 0, 0.95);
            position: relative;
        }


        #playerNameEntryScreen .screen-header {
            display: none;
        }

        /* Ensure ship stats display vertically in pilot registration */
        #playerNameEntryScreen .ship-stats {
            display: block;
        }

        #playerNameEntryScreen .ship-stats p {
            margin: 8px 0;
        }

        .name-entry-content {
            max-width: 600px;
            margin: 0 auto;
            padding: 40px;
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid rgba(0, 255, 255, 0.3);
            border-radius: 10px;
            box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
        }

        .name-input-section {
            margin-bottom: 30px;
            text-align: center;
        }

        .screen-subtitle {
            text-align: center;
            color: rgba(255, 255, 255, 0.8);
            margin: 0;
        }

        .name-input-section label {
            display: block;
            color: #00ffff;
            font-size: 18px;
            font-family: 'Courier New', monospace;
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-bottom: 15px;
        }

        .pilot-name-input {
            width: 300px;
            padding: 12px 20px;
            font-size: 16px;
            font-family: 'Courier New', monospace;
            text-align: center;
            background: rgba(0, 0, 0, 0.7);
            border: 2px solid rgba(0, 255, 255, 0.5);
            border-radius: 5px;
            color: #00ffff;
            outline: none;
            text-transform: uppercase;
        }

        .pilot-name-input:focus {
            border-color: #00ffff;
            box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
        }

        .name-help-text {
            color: rgba(255, 255, 255, 0.7);
            font-size: 12px;
            margin-top: 10px;
            font-style: italic;
        }

        .ship-info-section {
            background: rgba(0, 255, 255, 0.1);
            border: 1px solid rgba(0, 255, 255, 0.3);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 30px;
        }

        .ship-info-section h3 {
            color: #00ffff;
            font-family: 'Courier New', monospace;
            text-align: center;
            margin-bottom: 15px;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .starting-ship-info {
            display: flex;
            gap: 20px;
            align-items: flex-start;
        }

        .ship-stats {
            flex: 1;
            min-width: 200px;
        }

        .ship-stats p {
            color: rgba(255, 255, 255, 0.9);
            font-family: 'Courier New', monospace;
            margin: 8px 0;
            font-size: 14px;
        }

        .ship-description {
            flex: 2;
            color: rgba(255, 255, 255, 0.8);
            font-size: 14px;
            line-height: 1.6;
            margin: 0;
        }

        .name-entry-buttons {
            display: flex;
            justify-content: center;
            gap: 20px;
        }

        .name-entry-buttons .menu-button {
            min-width: 150px;
        }

        /* Position back button absolutely in upper left, remove from flex flow */
        .name-entry-buttons .back-button {
            position: absolute;
            top: 20px;
            left: 20px;
            min-width: 120px;
        }

        .name-entry-buttons .menu-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            color: rgba(255, 255, 255, 0.5);
            border-color: rgba(255, 255, 255, 0.3);
        }

        .name-entry-buttons .menu-button:disabled:hover {
            background: rgba(0, 0, 0, 0.2);
            color: rgba(255, 255, 255, 0.5);
            transform: none;
        }

        /* Hangar button styling */
        .hangar-subtitle {
            font-size: 12px;
            font-style: italic;
            opacity: 0.8;
        }

        /* Hangar Interface */
        .hangar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .hangar-content {
            width: 90%;
            max-width: 1200px;
            max-height: 90%;
            background: rgba(0, 20, 40, 0.95);
            border: 2px solid rgba(0, 255, 255, 0.5);
            border-radius: 10px;
            padding: 30px;
            overflow-y: auto;
        }

        .hangar-header {
            text-align: center;
            margin-bottom: 30px;
            border-bottom: 1px solid rgba(0, 255, 255, 0.3);
            padding-bottom: 20px;
        }

        .hangar-header h2 {
            color: #00ffff;
            font-family: 'Courier New', monospace;
            font-size: 32px;
            margin: 0;
            text-transform: uppercase;
            letter-spacing: 3px;
        }

        .hangar-header .hangar-subtitle {
            color: rgba(255, 255, 255, 0.8);
            font-size: 16px;
            margin: 10px 0 0 0;
        }

        .hangar-main {
            display: grid;
            grid-template-columns: 1fr 2fr;
            grid-template-rows: auto auto;
            gap: 30px;
            margin-bottom: 30px;
        }

        .current-ship-section {
            grid-column: 1;
            grid-row: 1;
        }

        .available-ships-section {
            grid-column: 2;
            grid-row: 1 / 3;
        }

        .ship-stats-section {
            grid-column: 1;
            grid-row: 2;
        }

        .hangar-main h3 {
            color: #00ffff;
            font-family: 'Courier New', monospace;
            font-size: 18px;
            margin: 0 0 15px 0;
            text-transform: uppercase;
            letter-spacing: 2px;
            border-bottom: 1px solid rgba(0, 255, 255, 0.3);
            padding-bottom: 8px;
        }

        .ship-card {
            background: rgba(0, 255, 255, 0.1);
            border: 1px solid rgba(0, 255, 255, 0.3);
            border-radius: 8px;
            padding: 20px;
            margin: 10px 0;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .ship-card:hover {
            border-color: #00ffff;
            background: rgba(0, 255, 255, 0.2);
            box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
        }

        .ship-card.current {
            border-color: #00ffff;
            background: rgba(0, 255, 255, 0.15);
            cursor: default;
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
        }

        .ship-card.locked {
            opacity: 0.5;
            border-color: rgba(255, 255, 255, 0.3);
            background: rgba(255, 255, 255, 0.05);
            cursor: not-allowed;
        }

        .ship-name {
            color: #00ffff;
            font-family: 'Courier New', monospace;
            font-size: 18px;
            font-weight: bold;
            margin: 0 0 10px 0;
            text-transform: uppercase;
        }

        .ship-card.current .ship-name {
            color: #00ffff;
            text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
        }

        .ship-card.locked .ship-name {
            color: rgba(255, 255, 255, 0.6);
        }

        .ship-description {
            color: rgba(255, 255, 255, 0.8);
            font-size: 14px;
            margin: 0 0 15px 0;
            line-height: 1.4;
        }

        .ship-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            font-family: 'Courier New', monospace;
            font-size: 12px;
        }

        .ship-stat {
            color: rgba(255, 255, 255, 0.9);
        }

        .ship-status {
            margin-top: 15px;
            padding-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
            font-size: 12px;
            font-weight: bold;
        }

        .ship-status.current {
            color: #00ffff;
            text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
        }

        .ship-status.owned {
            color: #00ff00;
        }

        .ship-status.locked {
            color: #ff4444;
        }

        .ships-grid {
            display: flex;
            flex-direction: column;
            gap: 15px;
            max-height: 500px;
            overflow-y: auto;
            padding-right: 10px;
        }

        .stats-display {
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(0, 255, 255, 0.3);
            border-radius: 8px;
            padding: 20px;
            font-family: 'Courier New', monospace;
            color: rgba(255, 255, 255, 0.8);
        }

        .hangar-footer {
            text-align: center;
            border-top: 1px solid rgba(0, 255, 255, 0.3);
            padding-top: 20px;
        }

        .unlock-requirement {
            color: #ff4444;
            font-size: 12px;
            font-style: italic;
            margin-top: 10px;
        }

        .purchase-price {
            color: #00ffff;
            font-weight: bold;
            margin-top: 10px;
            text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
        }

        /* Save Slot Meta Progression Info */
        .slot-basic-info {
            margin-bottom: 5px;
        }

        .slot-meta-info {
            font-size: 11px;
            color: rgba(0, 255, 255, 0.8);
            font-family: 'Courier New', monospace;
            border-top: 1px solid rgba(0, 255, 255, 0.2);
            padding-top: 3px;
            margin-top: 3px;
        }

        /* Paint Station UI Styles */
        .paint-station-ui {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 2000;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: auto; /* Ensure UI is interactive */
            cursor: default; /* Show cursor in paint station */
        }

        .paint-station-ui * {
            cursor: default; /* Show cursor for all children */
        }

        .paint-station-panel {
            background: rgba(0, 20, 40, 0.98);
            border: 2px solid #00ffff;
            border-radius: 10px;
            width: 90%;
            max-width: 900px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
            position: relative; /* Ensure proper stacking context */
            z-index: 2001; /* Above background */
        }

        .paint-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            border-bottom: 1px solid #00ffff;
            background: rgba(0, 255, 255, 0.1);
        }

        .paint-header h2 {
            margin: 0;
            color: #00ffff;
            font-size: 24px;
            text-shadow: 0 0 10px #00ffff;
        }

        .close-btn {
            background: transparent;
            border: 1px solid #00ffff;
            color: #00ffff;
            font-size: 24px;
            width: 40px;
            height: 40px;
            cursor: pointer !important; /* Force pointer cursor */
            border-radius: 5px;
            transition: all 0.3s;
        }

        .close-btn:hover {
            background: rgba(0, 255, 255, 0.2);
        }

        .paint-content {
            padding: 20px;
        }

        .paint-layout {
            display: flex;
            gap: 40px;
            justify-content: center;
            margin-bottom: 20px;
        }

        .ship-preview-container {
            flex: 0 0 auto;
        }

        .color-slot-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .color-slot-middle {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Slot pair container */
        .color-slot-pair {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .color-slot-pair.left,
        .color-slot-pair.right {
            flex-direction: column;
        }

        .color-slot-pair.top,
        .color-slot-pair.bottom {
            flex-direction: row;
        }

        .color-slot {
            width: 80px;
            height: 80px;
            border: 2px solid #00ffff;
            border-radius: 10px;
            cursor: pointer !important; /* Force pointer cursor */
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 5px;
            transition: all 0.3s;
            background: rgba(0, 0, 0, 0.5);
        }

        .color-slot:hover {
            border-color: #00ff00;
            box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
        }

        .color-slot.selected {
            border-color: #ffff00;
            box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
        }

        .color-slot.changed {
            border-style: dashed;
        }

        /* Gradient end slot styles */
        .gradient-end-slot {
            border-color: #ff8800;
            opacity: 0.8;
        }

        .gradient-end-slot:hover {
            border-color: #ffaa00;
            box-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
        }

        .gradient-end-slot.selected {
            border-color: #ffcc00;
            box-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
        }

        .gradient-end-slot.disabled {
            opacity: 0.3;
            border-style: dashed;
            cursor: not-allowed !important;
        }

        .gradient-end-slot.disabled:hover {
            border-color: #ff8800;
            box-shadow: none;
        }

        .gradient-end-slot.disabled .slot-label {
            color: #666;
        }

        .slot-label {
            color: #00ffff;
            font-size: 12px;
            text-transform: uppercase;
        }

        .gradient-end-slot .slot-label {
            color: #ff8800;
        }

        .color-display {
            width: 50px;
            height: 50px;
            border: 1px solid #00ffff;
            border-radius: 5px;
            background: #00ff00;
        }

        #shipPreviewCanvas {
            border: 1px solid #00ffff;
            background: rgba(0, 0, 20, 0.5);
            border-radius: 10px;
        }

        /* Color Wheel Container */
        .color-wheel-container {
            flex: 1;
            max-width: 400px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
        }

        .color-wheel-container h3 {
            color: #00ffff;
            margin: 0;
            text-align: center;
            text-shadow: 0 0 10px #00ffff;
        }

        #colorWheelCanvas {
            border: 2px solid #00ffff;
            border-radius: 50%;
            cursor: crosshair;
            background: transparent; /* Transparent background to avoid black box */
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
            transition: box-shadow 0.3s;
            width: 300px; /* Fixed size */
            height: 300px; /* Fixed size */
            max-width: 300px; /* Prevent scaling */
            max-height: 300px; /* Prevent scaling */
            display: block; /* Remove inline spacing */
        }

        #colorWheelCanvas:hover {
            box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
        }

        /* Color Scheme Helper Buttons */
        .scheme-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: center;
            width: 100%;
            max-width: 320px;
        }

        .scheme-btn {
            background: rgba(0, 0, 0, 0.6);
            border: 1px solid #00ffff;
            color: #00ffff;
            padding: 8px 12px;
            border-radius: 20px;
            cursor: pointer !important; /* Force pointer cursor for buttons */
            font-size: 11px;
            transition: all 0.3s;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 300;
        }

        .scheme-btn:hover {
            background: rgba(0, 255, 255, 0.2);
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
            transform: translateY(-1px);
        }

        .scheme-btn.active {
            background: rgba(0, 255, 255, 0.3);
            border-color: #00ff00;
            box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
            color: #00ff00;
        }

        /* Clear Scheme Button - Visually Distinct */
        .scheme-btn-clear {
            border-color: #ff6600 !important;
            color: #ff6600 !important;
            margin-right: 10px; /* Separate from other buttons */
        }

        .scheme-btn-clear:hover {
            background: rgba(255, 102, 0, 0.2) !important;
            box-shadow: 0 0 10px rgba(255, 102, 0, 0.4) !important;
        }

        .scheme-btn-clear.active {
            background: rgba(255, 102, 0, 0.3) !important;
            border-color: #ff8800 !important;
            box-shadow: 0 0 15px rgba(255, 136, 0, 0.5) !important;
            color: #ff8800 !important;
        }

        .paint-dialog {
            display: flex;
            gap: 20px;
            padding: 20px;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid #00ffff;
            border-radius: 10px;
            margin-bottom: 20px;
        }

        .rashid-portrait {
            width: 80px;
            height: 80px;
            border: 2px solid #00ffff;
            border-radius: 10px;
            overflow: hidden;
            flex-shrink: 0;
        }

        .rashid-portrait img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .dialog-text {
            flex: 1;
            color: #00ffff;
            font-style: italic;
            font-size: 16px;
            line-height: 1.5;
            display: flex;
            align-items: center;
        }

        .paint-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            border-top: 1px solid #00ffff;
            background: rgba(0, 0, 0, 0.5);
        }

        .cost-display {
            display: flex;
            flex-direction: column;
            gap: 5px;
            color: #00ffff;
            font-size: 14px;
        }

        #totalCost {
            font-weight: bold;
            font-size: 16px;
        }

        .paint-buttons {
            display: flex;
            gap: 10px;
        }

        .paint-btn {
            padding: 10px 20px;
            border: 1px solid #00ffff;
            background: rgba(0, 255, 255, 0.1);
            color: #00ffff;
            border-radius: 5px;
            cursor: pointer !important; /* Force pointer cursor */
            font-size: 14px;
            transition: all 0.3s;
            text-transform: uppercase;
        }

        .paint-btn:hover {
            background: rgba(0, 255, 255, 0.3);
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
        }

        .paint-btn.cancel {
            border-color: #ff0000;
            color: #ff0000;
            background: rgba(255, 0, 0, 0.1);
        }

        .paint-btn.cancel:hover {
            background: rgba(255, 0, 0, 0.3);
            box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
        }

        .paint-btn.apply {
            border-color: #00ff00;
            color: #00ff00;
            background: rgba(0, 255, 0, 0.1);
        }

        .paint-btn.apply:hover {
            background: rgba(0, 255, 0, 0.3);
            box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
        }

        /* Turret slot specific styles */
        .color-slot.turret-slot {
            width: 70px;
            height: 70px;
            margin-top: 10px;
            background: rgba(0, 40, 80, 0.5);
        }

        .color-slot.turret-slot:hover {
            border-color: #cc6600;
            box-shadow: 0 0 15px rgba(204, 102, 0, 0.5);
        }

        .color-slot.turret-slot.selected {
            border-color: #ff8800;
            box-shadow: 0 0 20px rgba(255, 136, 0, 0.5);
        }

        /* Fill mode toggle styles */
        .fill-toggle-container {
            margin-top: 20px;
            padding: 15px;
            border: 1px solid #00ffff;
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.3);
        }

        .fill-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            color: #00ffff;
            font-size: 14px;
        }

        .fill-toggle input[type="checkbox"] {
            appearance: none;
            width: 20px;
            height: 20px;
            border: 2px solid #00ffff;
            border-radius: 4px;
            background: transparent;
            cursor: pointer;
            position: relative;
            transition: all 0.3s;
        }

        .fill-toggle input[type="checkbox"]:checked {
            background: rgba(0, 255, 255, 0.3);
            border-color: #00ff00;
        }

        .fill-toggle input[type="checkbox"]:checked::after {
            content: "✓";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #00ff00;
            font-size: 12px;
            font-weight: bold;
        }

        .toggle-label {
            user-select: none;
        }

        /* Gradient mode toggle styles */
        .gradient-toggle-container {
            margin-top: 15px;
            padding: 15px;
            border: 1px solid #ff8800;
            border-radius: 8px;
            background: rgba(255, 136, 0, 0.1);
        }

        .gradient-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            color: #ff8800;
            font-size: 14px;
        }

        .gradient-toggle input[type="checkbox"] {
            appearance: none;
            width: 20px;
            height: 20px;
            border: 2px solid #ff8800;
            border-radius: 4px;
            background: transparent;
            cursor: pointer;
            position: relative;
            transition: all 0.3s;
        }

        .gradient-toggle input[type="checkbox"]:checked {
            background: rgba(255, 136, 0, 0.3);
            border-color: #ffaa00;
        }

        .gradient-toggle input[type="checkbox"]:checked::after {
            content: "✓";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #ffaa00;
            font-size: 12px;
            font-weight: bold;
        }

        .gradient-info {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(255, 136, 0, 0.3);
        }

        .info-text {
            display: block;
            font-size: 12px;
            color: #ffaa00;
            margin-bottom: 8px;
        }

        .gradient-end-btn {
            width: 100%;
            padding: 8px;
            background: rgba(255, 136, 0, 0.2);
            border: 1px solid #ff8800;
            border-radius: 4px;
            color: #ffaa00;
            cursor: pointer !important;
            font-size: 13px;
            transition: all 0.3s;
        }

        .gradient-end-btn:hover {
            background: rgba(255, 136, 0, 0.3);
            border-color: #ffaa00;
            box-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
        }

        /* Resolution notification animations */
        @keyframes slideInDown {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        @keyframes slideOutUp {
            from {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
            to {
                opacity: 0;
                transform: translateX(-50%) translateY(-30px);
            }
        }