        /* ========================================
           STYLES - UI and Visual Design
           Mobile-Optimized with Safe Area Support
           ======================================== */
        :root {
            --safe-area-inset-top: env(safe-area-inset-top, 0px);
            --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
            --safe-area-inset-left: env(safe-area-inset-left, 0px);
            --safe-area-inset-right: env(safe-area-inset-right, 0px);
            --top-bar-max-width: 760px;
            --top-bar-side-gap: 24px;
            --top-bar-icon-size: 52px;
            --top-bar-icon-font: 20px;
            --top-bar-gap: 12px;
            --top-bar-stat-gap: 10px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            overflow: hidden;
            background: #000;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            touch-action: none;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        #game-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        /* Loading Screen */
        #loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(ellipse at center, rgba(20, 0, 40, 1) 0%, rgba(0, 0, 0, 1) 100%);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.6s ease;
        }

        #loading-screen.fade-out {
            opacity: 0;
            pointer-events: none;
        }

        .loading-content {
            text-align: center;
        }

        .loading-title {
            font-size: 42px;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 6px;
            margin-bottom: 30px;
            text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff, 0 0 40px #ff00ff;
        }

        .loading-bar-container {
            width: 240px;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            margin: 0 auto 16px;
            overflow: hidden;
        }

        .loading-bar {
            width: 0%;
            height: 100%;
            background: linear-gradient(90deg, #ff00ff, #00ffff);
            border-radius: 2px;
            transition: width 0.3s ease;
        }

        .loading-text {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.5);
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        /* Screen transitions */
        .screen-fade-in {
            animation: screenFadeIn 0.35s ease-out;
        }

        @keyframes screenFadeIn {
            from { opacity: 0; transform: scale(0.97); }
            to { opacity: 1; transform: scale(1); }
        }

