        /* Fuentes auto-hospedadas (vendor/fonts/, licencia SIL OFL — ver CREDITS.md).
           Antes venían del CDN de Google Fonts, lo que rompía el modo offline. */
        @font-face { font-family: 'Lexend'; font-style: normal; font-weight: 400; font-display: swap; src: url('vendor/fonts/Lexend-Regular.ttf') format('truetype'); }
        @font-face { font-family: 'Lexend'; font-style: normal; font-weight: 600; font-display: swap; src: url('vendor/fonts/Lexend-SemiBold.ttf') format('truetype'); }
        @font-face { font-family: 'Lexend'; font-style: normal; font-weight: 700; font-display: swap; src: url('vendor/fonts/Lexend-Bold.ttf') format('truetype'); }
        @font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('vendor/fonts/Rajdhani-SemiBold.ttf') format('truetype'); }
        @font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 700; font-display: swap; src: url('vendor/fonts/Rajdhani-Bold.ttf') format('truetype'); }
        @font-face { font-family: 'Press Start 2P'; font-style: normal; font-weight: 400; font-display: swap; src: url('vendor/fonts/PressStart2P-Regular.ttf') format('truetype'); }
:root {
            --neon-blue: #00e5ff;
            --neon-pink: #ff3366;
            --neon-green: #39ff14;
            --neon-yellow: #ffd700;
            --neon-purple: #c77dff;
            --text-dark: #0a0a0c;
            --text-light: #f0f0f5;
            --bg-dark: #0b0b12;
            --bg-gradient-start: #0b0b12;
            --bg-gradient-end: #1a1a2e;

            --glass-bg: rgba(10, 15, 25, 0.75);
            --glass-border: rgba(0, 229, 255, 0.25);
            --glass-glow: 0 4px 30px rgba(0, 229, 255, 0.1);
            --char-limit-width: 60ch;
        }

        body,
        html {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: var(--bg-dark);
            font-family: 'Lexend', sans-serif;
            color: var(--text-light);
            cursor: none;
        }

        #game-container {
            position: relative;
            width: 100vw;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* 4-Zone Layout Styles */
        #hud-top {
            position: absolute;
            top: 15px;
            left: 50%;
            transform: translateX(-50%);
            width: 95%;
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 100;
            pointer-events: none;
        }

        #hud-bottom {
            position: absolute;
            bottom: 25px;
            left: 50%;
            transform: translateX(-50%);
            width: 92%;
            max-width: var(--char-limit-width);
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            box-shadow: var(--glass-glow);
            padding: 20px;
            border-radius: 20px;
            z-index: 100;
            backdrop-filter: blur(25px) saturate(180%);
            display: flex;
            flex-direction: column;
            gap: 12px;
            animation: slide-up 0.6s cubic-bezier(0.19, 1, 0.22, 1);
        }

        @keyframes slide-up {
            0% { transform: translate(-50%, 100px); opacity: 0; }
            100% { transform: translate(-50%, 0); opacity: 1; }
        }

        /* Unified Top Stats */
        .top-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--glass-bg);
            padding: 10px 20px;
            border-radius: 12px;
            border: 1px solid var(--glass-border);
            backdrop-filter: blur(10px);
        }

        #hud { display: none; } /* Deprecated in favor of zones */

        /* Dual-Layer UI: Summary (Level 1) */
        #case-summary {
            font-family: 'Rajdhani', sans-serif;
            font-size: clamp(0.9rem, 3vw, 1.1rem);
            color: var(--neon-blue);
            opacity: 1;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 3px;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 10px;
            text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
        }

        #case-enunciado {
            font-size: clamp(0.85rem, 2.5vw, 1.15rem);
            line-height: 1.6;
            color: #d1d9e0;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.05);
            padding: 1.4rem;
            border-radius: 12px;
            margin-bottom: 10px;
            text-align: left;
            max-width: 55ch;
            animation: fadeIn 0.4s ease;
            position: relative;
            overflow: hidden;
        }

        #case-enunciado::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 4px;
            height: 100%;
            background: var(--neon-blue);
            box-shadow: 0 0 10px var(--neon-blue);
        }

        #case-enunciado b {
            font-weight: 700;
        }

        .q-ask {
            font-weight: 700;
        }

        .q-value {
            font-weight: 700;
        }

        .q-threshold {
            font-weight: 700;
        }

        .q-critical {
            font-weight: 800;
        }

        #decision-hint {
            margin-top: 8px;
            font-size: clamp(0.6rem, 2vw, 0.75rem);
            color: #888;
            opacity: 0.6;
            text-transform: uppercase;
            font-weight: 700;
            letter-spacing: 1px;
            text-align: center;
        }

        #game-canvas {
            position: relative;
            z-index: 5;
            width: 100%;
            height: 100%;
            cursor: none;
        }

        #blitz-ui {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 20;
            pointer-events: none;
        }

        #blitz-ui.active {
            display: flex;
        }

        #blitz-case-container {
            width: 90%;
            max-width: 600px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            padding: 30px;
            border-radius: 32px;
            text-align: center;
            margin-bottom: 40px;
            pointer-events: auto;
        }

        #blitz-case-text {
            font-size: clamp(1.2rem, 5vw, 1.8rem);
            font-weight: 600;
            color: var(--text-light);
            line-height: 1.4;
        }

        #blitz-options {
            display: flex;
            flex-direction: column;
            gap: 15px;
            width: 90%;
            max-width: 500px;
            pointer-events: auto;
        }

        .blitz-btn {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            color: var(--text-light);
            padding: 20px;
            font-size: 1.2rem;
            font-weight: 600;
            border-radius: 24px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }

        .blitz-btn:active {
            transform: translateY(2px);
            background: var(--pastel-blue);
        }

        #blitz-stats {
            position: absolute;
            top: 100px;
            right: 20px;
            text-align: right;
            pointer-events: none;
        }

        .streak-label {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .streak-count {
            font-size: 3.5rem;
            font-weight: 900;
        }

        #flashcard {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.8);
            width: 80%;
            max-width: 400px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            padding: 30px;
            border-radius: 32px;
            z-index: 100;
            display: none;
            flex-direction: column;
            align-items: center;
            text-align: center;
            opacity: 0;
            transition: all 0.3s ease;
        }

        #flashcard.active {
            display: flex;
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        .fc-header {
            font-weight: 700;
            font-size: 1.5rem;
            margin-bottom: 10px;
        }

        .fc-correct {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 20px;
        }

        .fc-fact {
            font-size: 1rem;
            font-style: italic;
        }

        #loot-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.9);
            z-index: 200;
            display: none;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .btn-loot {
            padding: 12px 30px;
            font-size: 1.1rem;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            cursor: pointer;
            border-radius: 20px;
            transition: 0.3s;
            text-transform: uppercase;
            font-weight: bold;
            margin-top: 15px;
            display: none;
        }

        #loot-stepper {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 30px;
            z-index: 250;
        }

        .step-node {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            border: 2px solid var(--glass-border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            background: var(--glass-bg);
            transition: all 0.4s ease;
            position: relative;
        }

        .step-node.active {
            border-color: var(--pastel-blue);
            transform: scale(1.1);
        }

        .step-node.complete {
            background: var(--pastel-blue);
            border-color: var(--pastel-blue);
        }

        .step-connector {
            width: 40px;
            height: 2px;
            background: var(--glass-border);
        }

        .step-label {
            position: absolute;
            top: 45px;
            font-size: 0.7rem;
            white-space: nowrap;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        #equipment-modal {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 380px;
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            border: 1px solid var(--glass-border);
            padding: 30px;
            display: none;
            flex-direction: column;
            z-index: 500;
            border-radius: 32px;
        }

        .equip-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin: 15px 0;
        }

        .equip-item {
            aspect-ratio: 1;
            background: rgba(255, 255, 255, 0.5);
            border: 1px solid var(--glass-border);
            border-radius: 12px;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            opacity: 0.5;
            transition: 0.3s;
        }

        .equip-item.owned {
            opacity: 1;
            border-color: var(--pastel-yellow);
        }

        #stats {
            position: absolute;
            bottom: 25px;
            left: 25px;
            font-family: 'Rajdhani', sans-serif;
            color: var(--text-light);
            z-index: 10;
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: var(--glass-bg);
            padding: 18px 24px;
            border-radius: 12px;
            border: 1px solid var(--glass-border);
            box-shadow: var(--glass-glow);
        }

        #progress-container {
            width: 150px;
            height: 8px;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 4px;
            overflow: hidden;
        }

        #progress-bar {
            width: 0%;
            height: 100%;
            background: var(--neon-green);
            box-shadow: 0 0 10px var(--neon-green);
            transition: width 0.3s ease;
        }

        #health-container {
            width: 100%;
            height: 12px;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        #health-fill {
            height: 100%;
            background: var(--neon-pink);
            box-shadow: 0 0 10px var(--neon-pink);
            width: 100%;
            transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        #health-label {
            position: absolute;
            top: -18px;
            right: 0;
            font-size: 0.75rem;
            color: var(--text-light);
            opacity: 0.6;
            text-transform: uppercase;
            font-weight: 700;
        }

        #terminal-log {
            width: 100%;
            height: 45px;
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(0, 229, 255, 0.1);
            border-radius: 8px;
            padding: 5px 15px;
            font-family: 'Rajdhani', sans-serif;
            font-size: 0.9rem;
            color: var(--neon-blue);
            opacity: 0.9;
            overflow: hidden;
            display: flex;
            align-items: center;
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 1px;
        }

        #powerups-hud {
            display: flex;
            gap: 8px;
            height: 25px;
        }

        .powerup-icon {
            min-width: 52px;
            min-height: 48px;
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            font-size: 10px;
            font-weight: bold;
            opacity: 0.3;
            transition: 0.3s;
            padding: 4px 6px;
            text-align: center;
            line-height: 1.2;
            cursor: default;
        }

        .powerup-icon.active {
            opacity: 1;
            animation: powerup-entry 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        @keyframes powerup-entry {
            0% { transform: scale(0.5) rotateY(90deg); opacity: 0; }
            100% { transform: scale(1) rotateY(0deg); opacity: 1; }
        }

        /* Anomaly alert: pulsing neon glow for critical values */
        @keyframes anomaly-pulse {
            0%   { text-shadow: 0 0 8px var(--neon-pink), 0 0 16px rgba(255,0,80,0.5); }
            50%  { text-shadow: 0 0 20px var(--neon-pink), 0 0 40px rgba(255,0,80,0.8), 0 0 60px rgba(255,0,80,0.3); }
            100% { text-shadow: 0 0 8px var(--neon-pink), 0 0 16px rgba(255,0,80,0.5); }
        }

        .reticle-anomaly {
            animation: anomaly-pulse 0.8s infinite ease-in-out;
            color: var(--neon-pink) !important;
            font-weight: 900 !important;
        }

        #combo-hud.active { opacity: 0.9; }

        #combo-number {
            font-family: 'Rajdhani', sans-serif;
            font-weight: 700;
            color: var(--neon-yellow);
            text-shadow: 0 0 10px var(--neon-yellow);
        }

        #combo-number.pop {
            animation: combo-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        @keyframes combo-pop {
            0%   { transform: scale(1.8); }
            60%  { transform: scale(0.9); }
            100% { transform: scale(1); }
        }

        #combo-label {
            font-family: 'Lexend', sans-serif;
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--text-light);
            opacity: 0.5;
            margin-top: 4px;
            font-weight: 700;
        }

        #combo-xp-bonus {
            font-family: 'Rajdhani', sans-serif;
            font-size: 0.85rem;
            color: var(--neon-purple);
            font-weight: 700;
            margin-top: 6px;
            text-shadow: 0 0 5px var(--neon-purple);
        }

        #combo-drain-bar {
            width: 8px;
            height: 100px;
            background: rgba(0, 0, 0, 0.05);
            border-radius: 4px;
            overflow: hidden;
            margin-top: 15px;
            position: relative;
        }

        #combo-drain-fill {
            width: 100%;
            background: linear-gradient(to top, var(--neon-blue), var(--neon-green));
            box-shadow: 0 0 10px var(--neon-blue);
            position: absolute;
            bottom: 0;
            border-radius: 4px;
            transition: height 0.1s linear;
        }

        /* ===================== KILL STREAK MESSAGES ===================== */
        #killstreak-display {
            position: absolute;
            top: 35%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 600;
            pointer-events: none;
            text-align: center;
        }

        .killstreak-msg {
            font-family: 'Lexend', sans-serif;
            font-size: 2rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            font-weight: 700;
            color: var(--text-light);
            opacity: 0.8;
            animation: killstreak-anim 1.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
            display: block;
        }

        @keyframes killstreak-anim {
            0%   { opacity: 0; transform: scale(0.5) translateY(20px); }
            15%  { opacity: 1; transform: scale(1.15) translateY(0); }
            70%  { opacity: 1; transform: scale(1) translateY(-10px); }
            100% { opacity: 0; transform: scale(0.9) translateY(-30px); }
        }

        /* ===================== MUSIC TOGGLE ===================== */
        #music-toggle {
            position: absolute;
            bottom: 20px;
            right: 20px;
            width: 36px;
            height: 36px;
            background: rgba(10,10,18,0.7);
            border: 1px solid rgba(0, 229, 255,0.3);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 25;
            font-size: 1rem;
            transition: all 0.3s;
            color: rgba(0, 229, 255,0.7);
        }

        #music-toggle:hover {
            border-color: var(--neon-blue);
            box-shadow: 0 0 15px rgba(0, 229, 255,0.3);
            color: white;
        }

        /* ===================== SCREEN FLASH ===================== */
        #screen-flash {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 999;
            opacity: 0;
        }

        /* TURBO 2.0: Estilos Neon y Animaciones */
        #combo-number.pop {
            animation: combo-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        @keyframes combo-pop {
            0% { transform: scale(1.8); }
            60% { transform: scale(0.9); }
            100% { transform: scale(1); }
        }

        /* Efecto de brillo para modo frenesí */
        .frenzy-active body {
            animation: frenzy-glow 2s infinite alternate;
        }

        @keyframes frenzy-glow {
            from { filter: hue-rotate(0deg) brightness(1); }
            to { filter: hue-rotate(15deg) brightness(1.2); }
        }

        #combo-hud {
            text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
            transition: all 0.3s ease;
        }

        #combo-hud.active {
            transform: translateY(-50%) scale(1.1);
        }

        #combo-drain-fill {
            box-shadow: 0 0 15px var(--neon-blue);
            background: linear-gradient(to top, var(--neon-blue), var(--neon-green));
        }

        /* Feedback visual al recibir daño */
        .damage-flash {
            animation: damage-anim 0.2s;
        }

        @keyframes damage-anim {
            0% { filter: invert(0); }
            50% { filter: invert(0.5) sepia(1) saturate(5) hue-rotate(-50deg); }
            100% { filter: invert(0); }
        }
        /* ===================== INTRO SPLASH ===================== */
        @keyframes intro-fadein {
            from { opacity: 0; }
            to   { opacity: 1; }
        }

        @keyframes btn-pulse {
            from { box-shadow: 0 0 10px rgba(255, 51, 102,0.3); }
            to   { box-shadow: 0 0 30px rgba(255, 51, 102,0.7); }
        }

        /* ===================== UPDATE NOTIFICATION ===================== */
        #update-notification {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(150%);
            background: var(--glass-bg);
            border: 1px solid var(--neon-blue);
            box-shadow: 0 0 25px rgba(0, 229, 255, 0.4);
            padding: 15px 25px;
            border-radius: 15px;
            z-index: 10000;
            display: flex;
            align-items: center;
            gap: 20px;
            backdrop-filter: blur(15px);
            transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
        }

        #update-notification.active {
            transform: translateX(-50%) translateY(0);
        }

        .update-text {
            font-family: 'Rajdhani', sans-serif;
            font-size: 0.9rem;
            color: var(--text-light);
            font-weight: 600;
            letter-spacing: 1px;
        }

        .update-btn {
            background: var(--neon-blue);
            color: var(--text-dark);
            border: none;
            padding: 8px 15px;
            border-radius: 8px;
            font-family: 'Rajdhani', sans-serif;
            font-weight: 700;
            font-size: 0.8rem;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            text-transform: uppercase;
        }

        .update-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 0 15px var(--neon-blue);
        }

        /* Clinical Validator HUD */
        #validator-alerts {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 5px;
        }

        .validator-alert {
            font-size: 0.7rem;
            padding: 4px 10px;
            border-radius: 6px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            animation: slideInLeft 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .val-warning {
            background: rgba(255, 209, 102, 0.15);
            color: #ffd166;
            border: 1px solid rgba(255, 209, 102, 0.3);
        }

        .val-error {
            background: rgba(255, 51, 102, 0.15);
            color: #ff3366;
            border: 1px solid rgba(255, 51, 102, 0.3);
        }

        @keyframes slideInLeft {
            from { opacity: 0; transform: translateX(-10px); }
            to { opacity: 1; transform: translateX(0); }
        }

        /* Educational Autopsy Overlay */
        @keyframes scanMove {
            from { top: 20%; }
            to { top: 80%; }
        }

        @keyframes autopsySlideDown {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* CRT scanlines sutiles sobre el espacio de juego (bajo el HUD) */
        #scanlines {
            position: absolute;
            inset: 0;
            z-index: 6;
            pointer-events: none;
            background: repeating-linear-gradient(
                0deg,
                rgba(0, 0, 0, 0.18) 0px,
                rgba(0, 0, 0, 0.18) 1px,
                transparent 1px,
                transparent 3px
            );
            opacity: 0.30;
        }

        /* Pause Menu */
        #pause-menu {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            backdrop-filter: blur(20px);
            border-radius: 24px;
            padding: 40px;
            z-index: 500;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            min-width: 320px;
        }

        #pause-menu.visible {
            display: flex;
        }

        .pause-title {
            font-family: 'Press Start 2P', monospace;
            font-size: 1.4rem;
            color: var(--neon-blue);
            text-shadow: 0 0 15px var(--neon-blue);
        }

        .pause-subtitle {
            font-size: 0.75rem;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .pause-stats-row {
            display: flex;
            gap: 30px;
            font-family: 'Rajdhani', sans-serif;
        }

        .pause-stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            font-size: 0.7rem;
            color: #888;
            text-transform: uppercase;
        }

        .pause-stat-item strong {
            font-size: 1.6rem;
            color: var(--neon-blue);
        }

        .pause-btn-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
            width: 100%;
        }

        .pause-btn {
            padding: 12px 20px;
            border: 1px solid var(--glass-border);
            background: rgba(0,0,0,0.4);
            color: var(--text-light);
            border-radius: 12px;
            cursor: pointer;
            font-family: 'Rajdhani', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: all 0.2s;
        }

        .pause-btn:hover { background: rgba(0,229,255,0.1); border-color: var(--neon-blue); }
        .pause-btn.primary { border-color: var(--neon-green); color: var(--neon-green); }
        .pause-btn.primary:hover { background: rgba(57,255,20,0.1); }
        .pause-btn.danger { border-color: var(--neon-pink); color: var(--neon-pink); }
        .pause-btn.danger:hover { background: rgba(255,51,102,0.1); }

        /* Clinical Feedback Overlay */
        #clinical-feedback-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(10, 15, 25, 0.6);
            backdrop-filter: blur(15px) saturate(160%);
            z-index: 800;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .feedback-card {
            background: var(--glass-bg);
            border: 2px solid var(--glass-border);
            border-radius: 24px;
            padding: 30px;
            max-width: 450px;
            width: 90%;
            text-align: center;
            display: flex;
            flex-direction: column;
            gap: 15px;
            color: var(--text-light);
            box-shadow: 0 0 40px rgba(0, 229, 255, 0.15);
            animation: slideDown 0.4s ease;
        }

        .feedback-title {
            font-family: 'Rajdhani', sans-serif;
            font-size: 1.6rem;
            font-weight: 700;
            letter-spacing: 2px;
            margin: 0;
            text-transform: uppercase;
        }

        .feedback-body {
            font-size: 0.95rem;
            color: #d1d9e0;
            text-align: left;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            padding-bottom: 10px;
        }

        .feedback-rationale {
            font-size: 0.9rem;
            line-height: 1.5;
            color: #a0aec0;
            text-align: left;
        }

        .feedback-close-btn {
            padding: 12px 24px;
            font-size: 0.95rem;
            font-family: 'Rajdhani', sans-serif;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            background: rgba(0, 229, 255, 0.1);
            border: 1px solid var(--neon-blue);
            color: var(--neon-blue);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-top: 10px;
        }

        .feedback-close-btn:hover {
            background: rgba(0, 229, 255, 0.2);
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
            border-color: #fff;
            color: #fff;
        }

        /* Flash Consultation Card */
        #flash-consult {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 90%;
            max-width: 450px;
            background: var(--glass-bg);
            backdrop-filter: blur(25px) saturate(160%);
            border: 2px solid var(--glass-border);
            border-radius: 28px;
            padding: 35px;
            z-index: 750;
            flex-direction: column;
            align-items: center;
            text-align: center;
            box-shadow: 0 0 50px rgba(255, 51, 102, 0.2);
            animation: slideDown 0.4s ease;
        }
        /* ===================== VIRTUAL JOYSTICK & MOBILE BUTTONS ===================== */
        #virtual-joystick-zone {
            display: none;
            position: absolute;
            bottom: 30px;
            left: 30px;
            width: 150px;
            height: 150px;
            z-index: 1000;
            align-items: center;
            justify-content: center;
            touch-action: none;
            -webkit-user-select: none;
            user-select: none;
        }
        #joystick-base {
            width: 110px;
            height: 110px;
            border: 3px solid rgba(0, 229, 255, 0.4);
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        #joystick-stick {
            width: 44px;
            height: 44px;
            background: linear-gradient(135deg, var(--neon-blue), #00b0ff);
            border-radius: 50%;
            box-shadow: 0 0 15px var(--neon-blue);
            position: absolute;
            transition: transform 0.05s ease-out;
        }
        .mobile-action-btn {
            width: 65px;
            height: 65px;
            border-radius: 50%;
            border: 2px solid rgba(0, 229, 255, 0.4);
            background: rgba(0, 0, 0, 0.5);
            color: #fff;
            font-family: 'Rajdhani', sans-serif;
            font-weight: 700;
            font-size: 0.65rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
            cursor: pointer;
            user-select: none;
            -webkit-user-select: none;
            outline: none;
            transition: transform 0.1s ease, border-color 0.2s;
        }
        .mobile-action-btn:active {
            transform: scale(0.9);
            border-color: var(--neon-blue);
            background: rgba(0, 229, 255, 0.2);
        }
        #mobile-action-buttons {
            display: none;
            position: absolute;
            bottom: 25px;
            right: 25px;
            z-index: 1000;
            grid-template-columns: repeat(2, 70px);
            grid-template-rows: repeat(2, 70px);
            gap: 12px;
            touch-action: none;
            justify-items: center;
            align-items: center;
        }
        #mobile-btn-pause {
            width: 55px;
            height: 55px;
            border-color: rgba(255, 209, 102, 0.4);
            box-shadow: 0 0 10px rgba(255, 209, 102, 0.2);
            font-size: 0.8rem;
        }
        #mobile-btn-pause:active {
            border-color: var(--neon-yellow);
            background: rgba(255, 209, 102, 0.2);
        }
        .btn-start {
            padding: 12px 24px;
            font-family: 'Rajdhani', sans-serif;
            font-size: 0.95rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 2px;
            background: rgba(0, 229, 255, 0.1);
            border: 2px solid var(--neon-blue);
            color: #fff;
            border-radius: 12px;
            cursor: pointer;
            box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
            transition: all 0.3s ease;
        }
        .btn-start:hover {
            background: rgba(0, 229, 255, 0.25);
            box-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
            border-color: #fff;
        }
        #main-start-btn {
            animation: main-btn-pulse 2s infinite alternate ease-in-out;
        }
        @keyframes main-btn-pulse {
            0% { opacity: 0.7; box-shadow: 0 0 10px rgba(0, 229, 255, 0.3); }
            100% { opacity: 1; box-shadow: 0 0 20px rgba(0, 229, 255, 0.8); }
        }

            @keyframes scanMove {
                from { top: 20%; }
                to { top: 80%; }
            }
            @keyframes slideDown {
                from { opacity: 0; transform: translateY(-30px); }
                to { opacity: 1; transform: translateY(0); }
            }
            
            .medical-report-container {
                animation: thermal-print 2.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
                overflow: hidden;
                position: relative;
            }
            
            @keyframes thermal-print {
                0% { max-height: 0; opacity: 0; filter: brightness(2); }
                100% { max-height: 1000px; opacity: 1; filter: brightness(1); }
            }
            
            .thermal-line {
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                height: 2px;
                background: rgba(255,255,255,0.5);
                box-shadow: 0 0 10px white;
                animation: thermal-line-move 2.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
            }
            
            @keyframes thermal-line-move {
                0% { bottom: 100%; }
                100% { bottom: 0%; opacity: 0; }
            }

            /* ===================== STAGE INTRO RETRO ZOOM ===================== */
            @keyframes stage-intro-zoom {
                0% {
                    transform: scale(0.5);
                    opacity: 0;
                }
                15% {
                    transform: scale(1);
                    opacity: 1;
                }
                85% {
                    transform: scale(1.05);
                    opacity: 1;
                }
                100% {
                    transform: scale(1.5);
                    opacity: 0;
                }
            }

            .stage-intro-active {
                display: block !important;
                animation: stage-intro-zoom 1.5s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
            }
