body {
            margin: 0;
            padding: 20px 0;
            background-color: #050505;
            color: #fff;
            font-family: 'Courier New', Courier, monospace;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            overflow: auto;
            user-select: none;
        }

        #game-container {
            position: relative;
            display: flex;
            gap: 20px;
            align-items: flex-start;
            margin: auto;
        }

        canvas#gameCanvas {
            background-color: #111;
            border: 2px solid #333;
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
            cursor: crosshair;
            position: relative;
            z-index: 1;
        }

        #ui-panel {
            width: 220px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .stat-box {
            background: #1a1a1a;
            border: 1px solid #444;
            padding: 15px;
            border-radius: 4px;
            box-shadow: 0 0 10px rgba(0,0,0,0.5);
            text-align: center;
        }

        .stat-label { color: #888; font-size: 12px; margin-bottom: 5px; display: block;}
        .stat-value { font-size: 24px; font-weight: bold; color: #0ff; text-shadow: 0 0 5px #0ff; }

        .action-btn {
            background: #00ffcc;
            color: #000;
            border: none;
            padding: 15px 10px;
            font-family: inherit;
            font-weight: bold;
            font-size: 16px;
            cursor: pointer;
            text-transform: uppercase;
            border-radius: 4px;
            box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
            transition: all 0.2s;
            margin-bottom: 5px;
        }

        .action-btn:hover { background: #fff; transform: scale(1.05); }
        .action-btn:disabled { background: #333; color: #555; box-shadow: none; cursor: not-allowed; transform: none; }

        #overclock-btn {
            background: #ff0055;
            color: #fff;
            box-shadow: 0 0 15px rgba(255, 0, 85, 0.3);
            display: none; /* Hidden until unlocked */
        }
        
        #overclock-btn.active {
            animation: pulse-red 0.5s infinite;
            background: #fff;
            color: #ff0055;
        }

        @keyframes pulse-red {
            0% { box-shadow: 0 0 15px rgba(255, 0, 85, 0.5); }
            50% { box-shadow: 0 0 30px rgba(255, 0, 85, 0.9); }
            100% { box-shadow: 0 0 15px rgba(255, 0, 85, 0.5); }
        }

        #upgrade-panel {
            display: none;
            background: #222;
            border: 1px solid #00ffcc;
            padding: 10px;
            flex-direction: column;
            gap: 8px;
            border-radius: 4px;
        }

        .upgrade-header {
            font-size: 14px;
            color: #00ffcc;
            text-align: center;
            margin-bottom: 5px;
            font-weight: bold;
            border-bottom: 1px solid #444;
            padding-bottom: 5px;
        }

        .upgrade-btn {
            background: #333;
            color: #fff;
            border: 1px solid #555;
            padding: 8px;
            cursor: pointer;
            font-size: 11px;
            text-align: left;
            display: flex;
            justify-content: space-between;
            transition: background 0.2s;
        }

        .upgrade-btn:hover { background: #444; }
        .upgrade-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .upgrade-cost { color: #ffff00; font-weight: bold; }

        #controls-info {
            margin-top: auto;
            font-size: 12px;
            color: #666;
            line-height: 1.5;
            background: #0f0f0f;
            padding: 10px;
            border: 1px solid #333;
        }

        .highlight { color: #ff00ff; font-weight: bold; }

        /* Game Over Overlay & Shop */
        #game-over-overlay, #pause-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 800px;
            height: 600px;
            background: rgba(0, 0, 0, 0.95);
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 10;
            backdrop-filter: blur(8px);
        }

        #game-over-overlay h1, #pause-overlay h1 {
            font-size: 36px;
            color: #ff0055;
            text-shadow: 0 0 20px #ff0055;
            margin-bottom: 5px;
            margin-top: 0;
        }
        
        #pause-overlay h1 {
            color: #00ffcc;
            text-shadow: 0 0 20px #00ffcc;
        }

        #shop-section {
            background: #111;
            border: 2px solid #333;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 15px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            width: 85%;
            max-height: 75vh;
            overflow-y: auto;
        }
        
        .shop-title { font-size: 24px; color: #ffd700; text-transform: uppercase; letter-spacing: 2px; border-bottom: 1px solid #333; padding-bottom: 5px; width: 100%; text-align: center; font-weight: bold; }
        .tech-points { font-size: 16px; color: #fff; margin-bottom: 5px; }
        .ascension-info { font-size: 12px; color: #aaa; }
        
        /* TALENT TREE STYLES */
        .talent-tree {
            display: flex;
            flex-direction: column;
            gap: 30px;
            position: relative;
            padding: 10px;
        }

        .talent-tier {
            display: flex;
            justify-content: center;
            gap: 20px;
            position: relative;
            z-index: 2;
        }
        
        .talent-tier-label {
            position: absolute;
            left: -80px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 10px;
            color: #555;
            text-transform: uppercase;
            width: 70px;
            text-align: right;
        }

        .talent-node {
            background: #222;
            border: 2px solid #444;
            width: 60px;
            height: 60px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            position: relative;
            transition: all 0.2s;
            border-radius: 4px;
            z-index: 2;
        }

        .talent-node:hover { border-color: #fff; z-index: 3; }
        .talent-node.locked { opacity: 0.3; cursor: not-allowed; filter: grayscale(1); }
        .talent-node.maxed { border-color: #ffd700; background: #332b00; }
        
        .talent-icon { font-size: 18px; margin-bottom: 2px; }
        .talent-ranks { font-size: 10px; color: #aaa; background: rgba(0,0,0,0.5); padding: 1px 4px; border-radius: 2px; }
        .talent-node.maxed .talent-ranks { color: #ffd700; }

        /* SVG Container for connection lines */
        #tree-connections {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }

        /* Tooltip */
        .talent-node:hover::before {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 110%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.95);
            border: 1px solid #555;
            color: #fff;
            padding: 8px;
            border-radius: 4px;
            font-size: 11px;
            width: 180px;
            text-align: center;
            z-index: 100;
            pointer-events: none;
            white-space: pre-line;
        }

        .req-text { color: #ff5555; font-size: 12px; margin-top: 5px; }

        #restart-btn, #resume-btn, #quit-run-btn {
            padding: 10px 30px;
            font-size: 18px;
            background: #ff0055;
            color: #fff;
            border: none;
            cursor: pointer;
            font-family: inherit;
            text-transform: uppercase;
            font-weight: bold;
            border-radius: 4px;
            transition: all 0.2s;
            box-shadow: 0 0 20px rgba(255, 0, 85, 0.4);
        }
        
        #resume-btn {
            background: #00ffcc;
            color: #000;
            box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
        }

        #restart-btn:hover, #quit-run-btn:hover {
            background: #fff;
            color: #ff0055;
            box-shadow: 0 0 40px rgba(255, 0, 85, 0.8);
        }
        
        #resume-btn:hover {
            background: #fff;
            color: #000;
            box-shadow: 0 0 40px rgba(0, 255, 204, 0.8);
        }

        #ascend-btn {
            display: none; 
            margin-top: 10px;
            padding: 10px 20px;
            font-size: 14px;
            background: transparent;
            color: #ffd700; 
            border: 2px solid #ffd700;
            cursor: pointer;
            font-family: inherit;
            text-transform: uppercase;
            font-weight: bold;
            border-radius: 4px;
            transition: all 0.2s;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
            animation: pulse-gold 2s infinite;
        }

        @keyframes pulse-gold {
            0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.2); }
            50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.5); }
            100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.2); }
        }

        @media (max-width: 1050px) {
            #game-container {
                flex-direction: column;
                align-items: center;
                transform: scale(0.7); 
                transform-origin: top center;
            }
            #ui-panel {
                flex-direction: row;
                width: 800px;
                justify-content: center;
            }
        }