
        body { margin: 0; overflow: hidden; background-color: #0c121a; font-family: 'Courier New', Courier, monospace; }
        
        .clunky-panel {
            background: linear-gradient(135deg, #5e4835 0%, #3e2e21 50%, #292017 100%);
            border: 4px ridge #8b6b4a;
            color: #d4c4a8;
            text-shadow: 1px 1px 2px #000;
            box-shadow: 4px 4px 10px rgba(0,0,0,0.8), inset 2px 2px 5px rgba(255,255,255,0.05);
            padding: 8px 15px;
            border-radius: 2px;
        }

        #ui { position: absolute; top: 20px; left: 20px; font-size: 22px; pointer-events: none; z-index: 5;}
        #timer-ui { position: absolute; top: 20px; right: 20px; font-size: 22px; z-index: 5;}
        
        #stamina-container { 
            position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); 
            width: 300px; height: 18px; 
            background: #1a1511; border: 4px ridge #5e4835; z-index: 5;
            box-shadow: 4px 4px 10px rgba(0,0,0,0.8), inset 0 0 10px #000;
        }
        #stamina-bar { 
            width: 100%; height: 100%; 
            background: linear-gradient(to bottom, #d4af37, #997a00); 
            transition: background 0.2s, width 0.1s linear; 
        }
        
        #crosshair { 
            position: absolute; top: 50%; left: 50%; width: 24px; height: 24px; transform: translate(-50%, -50%); 
            pointer-events: none; z-index: 5;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%23d4af37'/%3E%3Cstop offset='100%25' stop-color='%238b6b4a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M9 2 h6 v7 h7 v6 h-7 v7 h-6 v-7 h-7 v-6 h7 z' fill='url(%23g)' stroke='%23292017' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
            background-size: contain; background-repeat: no-repeat; filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.8));
        }

        #radar {
            position: absolute; bottom: 30px; right: 30px; width: 160px; height: 160px;
            background: radial-gradient(circle at center, #1a1e1a 0%, #050705 100%);
            border: 8px ridge #6b533d; border-radius: 50%; z-index: 5;
            box-shadow: 6px 6px 15px rgba(0, 0, 0, 0.9), inset 0 0 15px #000; pointer-events: none;
        }
        
     /* --- MECHANICAL SOFT UI --- */
        :root {
            --title-font: 'Courier New', monospace; 
            --main-font: 'Courier New', monospace;
            --clunky-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Crect x='12' y='12' width='8' height='12' fill='%233e2e21' stroke='%23110d0a' stroke-width='1'/%3E%3Cpath d='M16 2 L20 12 L12 12 Z' fill='%238b6b4a' stroke='%23110d0a'/%3E%3Crect x='10' y='24' width='12' height='4' rx='1' fill='%235e4835'/%3E%3Ccircle cx='16' cy='26' r='1' fill='%2300eeff'/%3E%3C/svg%3E") 16 2, auto;
        }

        #main-ui { 
            position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 100;
            display: flex; align-items: center; justify-content: center; 
            cursor: var(--clunky-cursor); padding: 20px; box-sizing: border-box;
            background-image: 
                radial-gradient(circle at center, rgba(62, 46, 33, 0.2) 0%, #0c121a 100%),
                repeating-linear-gradient(rgba(0,0,0,0.1) 0px, rgba(0,0,0,0.1) 1px, transparent 1px, transparent 4px);
            backdrop-filter: blur(10px); 
        }

        .grid-container {
            display: grid; grid-template-columns: 300px minmax(400px, 600px) 300px; gap: 25px;
            animation: slam 0.5s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards; 
            max-width: 1300px; width: 100%;
        }

        @keyframes screen-shake { 0% { transform: translateY(0); } 25% { transform: translateY(-4px); } 50% { transform: translateY(3px); } 75% { transform: translateY(-1px); } 100% { transform: translateY(0); } }
        .shake-active { animation: screen-shake 0.2s ease-in-out; }
        @keyframes slam { 0% { transform: scale(1.1); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

        .panel {
            background: linear-gradient(145deg, #4e3c2d, #292017); border: 3px solid #1a1511; border-top: 3px solid #8b6b4a;
            color: #d4c4a8; padding: 25px; border-radius: 15px; box-shadow: 15px 15px 35px rgba(0,0,0,0.8), inset 1px 1px 3px rgba(255,255,255,0.1);
        }

        .header-title { color: #d4af37; font-weight: bold; border-bottom: 2px solid rgba(139, 107, 74, 0.3); margin-bottom: 15px; padding-bottom: 8px; text-transform: uppercase; font-size: 1em; letter-spacing: 1px;}
        .center-col { display: flex; flex-direction: column; gap: 20px; text-align: center; }
        h1 { font-family: var(--title-font); font-size: 3.8em; margin: 0; text-shadow: 0 4px 10px #000; letter-spacing: -1px; font-weight: 900; }
        .version { font-size: 0.8em; color: #5e4835; margin-bottom: 10px; font-weight: bold; }
        .lore-box { font-style: italic; background: rgba(17, 13, 10, 0.6); border-radius: 10px; border: 2px solid #3e2e21; padding: 15px; color: #d4c4a8; line-height: 1.5; }
        
        .input-container { position: relative; width: 100%; height: 64px; background: #0c121a; border: 3px ridge #8b6b4a; border-radius: 10px; box-shadow: inset 0 0 15px rgba(0,0,0,0.8); overflow: hidden; }
        .input-plate { position: absolute; top: 0; left: 0; width: 100%; height: 100%; box-sizing: border-box; background: transparent; border: none; color: #00eeff; padding: 15px; font-size: 1.5em; text-align: center; outline: none; cursor: var(--clunky-cursor); font-family: var(--title-font); font-weight: 900; z-index: 2; caret-color: transparent; }
        .input-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; font-family: var(--title-font); font-weight: 900; font-size: 1.5em; color: rgba(0, 238, 255, 0.3); pointer-events: none; z-index: 1; }

        .dots span { animation: blink 1.4s infinite both; font-size: 1.5em; } .dots span:nth-child(2) { animation-delay: 0.2s; } .dots span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes blink { 0% { opacity: 0.2; } 20% { opacity: 1; } 100% { opacity: 0.2; } }
        
        .hazard-wrap { background: repeating-linear-gradient(45deg, #d4af37, #d4af37 10px, #110d0a 10px, #110d0a 20px); padding: 5px; border-radius: 12px; overflow: hidden; } 
        button { width: 100%; background: linear-gradient(to bottom, #8b6b4a, #5e4835); color: #110d0a; border: none; border-bottom: 6px solid #3e2e21; border-radius: 8px; padding: 22px; font-size: 1.6em; font-weight: 900; text-transform: uppercase; cursor: var(--clunky-cursor); text-shadow: 1px 1px 0 rgba(255,255,255,0.1); transition: all 0.05s; }
        button:hover { background: linear-gradient(to bottom, #d4af37, #8b6b4a); filter: brightness(1.1); }
        button:active { transform: translateY(6px); border-bottom: 0px solid #3e2e21; box-shadow: inset 0 5px 15px rgba(0,0,0,0.6); }

        @keyframes slow-tilt { 0% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } 100% { transform: rotate(-4deg); } }
        .checklist { background: #e0d8c0; color: #292017; padding: 18px; border-radius: 4px 4px 15px 15px; border-top: 8px solid #8b6b4a; font-weight: bold; box-shadow: 0 10px 20px rgba(0,0,0,0.5); animation: slow-tilt 5s ease-in-out infinite; transform-origin: top center; } 
        .key { background: #110d0a; border: 2px solid #3e2e21; border-radius: 6px; padding: 6px; color: #d4af37; }
        .setting-row { display: flex; justify-content: space-between; margin-bottom: 12px; align-items: center; font-size: 0.9em; text-transform: uppercase; }
        .right-col { display: flex; flex-direction: column; gap: 20px; }
        .stat-box { background: rgba(17, 13, 10, 0.8); border: 1px solid #3e2e21; border-radius: 10px; padding: 12px; text-align: center; } 
        .stat-val { font-size: 1.5em; color: #d4af37; display: block; margin-top: 5px; font-weight: bold; }
        .archives { height: 160px; overflow-y: auto; background: #0c121a; border-radius: 10px; border: 2px inset #110d0a; padding: 10px; } 

        #win-screen { display: none; background: rgba(10, 8, 5, 0.85); position: absolute; top: 0; left: 0; width: 100%; height: 100%; align-items: center; justify-content: center; opacity: 0; transition: opacity 3s ease-in-out; z-index: 110; flex-direction: column;}
        .overlay-box { background: linear-gradient(135deg, #4a3b2c 0%, #2a2118 100%); border: 6px ridge #7b5e40; padding: 40px 60px; text-align: center; color: #d4c4a8;}
        /* =========================================
           V3 DEATH SCREEN STYLES (SCOPED TO PREVENT BLEEDING)
           ========================================= */
        #death-screen-ui {
            display: none; /* Hidden by default */
            position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
            z-index: 9999; overflow: hidden;
            background-color: #050101; color: #cc0000;
            font-family: 'Courier New', monospace; cursor: crosshair;
        }

        #death-screen-ui .void-bg {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: radial-gradient(circle at center, #260505 0%, #030000 100%);
            animation: pulse-bg 6s infinite alternate ease-in-out; z-index: 0;
        }
        @keyframes pulse-bg { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.05); opacity: 1; } }

        #death-screen-ui .scanlines {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
            background-size: 100% 4px; pointer-events: none; z-index: 10;
            box-shadow: inset 0 0 120px rgba(0,0,0,0.95);
        }

        #death-screen-ui .death-container {
            position: relative; z-index: 5; display: flex; flex-direction: column; 
            align-items: center; justify-content: center; height: 100%;
        }

        #death-screen-ui h1 { 
            font-size: 6em; margin: 0 0 15px 0; letter-spacing: -2px; text-align: center;
            text-shadow: 4px 4px 20px rgba(255, 0, 0, 0.8), -2px -2px 10px rgba(100, 0, 0, 0.8); 
            animation: power-flicker 3s infinite; font-weight: 900; color: #ff1a1a;
        }
        @keyframes power-flicker {
            0%, 19.9%, 22%, 62.9%, 64%, 64.9%, 66%, 100% { 
                opacity: 1; color: #ff1a1a; transform: translate(0, 0); 
                text-shadow: 4px 4px 20px rgba(255, 0, 0, 0.8), -2px -2px 10px rgba(100, 0, 0, 0.8);
            }
            20%, 21.9% { opacity: 0.3; color: #4a0000; transform: translate(-2px, 1px); text-shadow: none; }
            63%, 63.9% { opacity: 0.5; color: #6a0000; transform: translate(2px, -1px); text-shadow: none; }
            65%, 65.9% { opacity: 0.2; color: #3a0000; transform: translate(-1px, 2px); text-shadow: none; }
        }

        #death-screen-ui .corrupted-panel {
            background: linear-gradient(145deg, #2e0b0b, #110202); 
            border: 3px solid #1a0505; border-top: 4px solid #730a0a;
            padding: 35px 45px; border-radius: 12px; width: 450px;
            box-shadow: 0 25px 50px rgba(0,0,0,0.95), inset 0px 0px 20px rgba(255,0,0,0.05);
            position: relative;
        }

        #death-screen-ui .corrupted-panel::before {
            content: ''; position: absolute; top: -4px; left: 10%; width: 80%; height: 4px;
            background: repeating-linear-gradient(90deg, #aa0000, #aa0000 10px, #440000 10px, #440000 20px);
            border-radius: 4px 4px 0 0; opacity: 0.6;
        }

        #death-screen-ui .post-mortem-box {
            background: rgba(15, 3, 3, 0.9); padding: 25px; 
            border-radius: 4px 4px 15px 15px; border-top: 6px solid #660505; 
            box-shadow: 0 15px 25px rgba(0,0,0,0.8), inset 0 0 12px rgba(80,0,0,0.4); 
            animation: slow-tilt 7s ease-in-out infinite; transform-origin: top center;
            margin-bottom: 35px; border-left: 1px solid #2a0000; border-right: 1px solid #2a0000; border-bottom: 1px solid #2a0000;
        }
        @keyframes slow-tilt { 0% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } 100% { transform: rotate(-2deg); } }

        #death-screen-ui .header-title { 
            color: #ff3333; font-weight: bold; border-bottom: 2px dashed rgba(200, 0, 0, 0.4); 
            margin-bottom: 20px; padding-bottom: 10px; text-transform: uppercase; font-size: 1.1em; letter-spacing: 2px; text-align: center;
        }

        #death-screen-ui .setting-row { 
            display: flex; justify-content: space-between; margin-bottom: 15px; 
            align-items: center; font-size: 0.95em; font-weight: bold; color: #aa4444; text-transform: uppercase;
        }

        #death-screen-ui .stat-val { 
            font-size: 1.4em; color: #ffcccc; text-shadow: 0 0 8px rgba(255,50,50,0.6); font-weight: 900;
        }

        #death-screen-ui button {
            width: 100%; background: linear-gradient(to bottom, #7a0000, #400000); color: #0a0000; 
            border: 2px solid #1a0000; border-bottom: 6px solid #220000; border-radius: 8px;
            padding: 20px; font-size: 1.5em; font-weight: 900; text-transform: uppercase; 
            cursor: crosshair; text-shadow: 1px 1px 0 rgba(255,100,100,0.2); transition: all 0.1s ease;
            letter-spacing: 1px; font-family: 'Courier New', monospace;
        }
        #death-screen-ui button:hover { background: linear-gradient(to bottom, #990000, #550000); box-shadow: 0 0 15px rgba(255,0,0,0.4); }
        #death-screen-ui button:active { transform: translateY(6px); border-bottom: 0px solid #220000; box-shadow: inset 0 6px 15px rgba(0,0,0,0.8); }
