/* =========================================
   SKULLSCAN PRO - STYLESHEET
   Version: 15.5.0 (iPhone 16 Pro Optimized)
   ========================================= */

/* =========================================
   1. BASE STYLES & RESET
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100dvh !important;
    width: 100vw !important;
    background-color: #050a0f;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center;
}
#ar-viewport {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

h1 {
    font-size: 1.5rem;
    color: #00ffcc;
    text-transform: uppercase;
    letter-spacing: 2px;
}

p {
    font-size: 0.9rem;
    color: #8b949e;
    margin: 0 0 15px 0;
    max-width: 85vw;
}

.divider {
    color: #8b949e;
    font-size: 0.75rem;
    margin: 30px 0 10px 0;
    text-transform: uppercase;
    text-align: center;
    font-weight: bold;
}

/* =========================================
   2. STANDARD BUTTONS & TYPOGRAPHY
   ========================================= */
.action-btn {
    background-color: rgba(20, 20, 25, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 204, 0.3);
    color: #fff;
    border-radius: 8px;
    font-size: clamp(12px, 3vw, 15px);
    padding: 12px 16px;
    width: 100%;
    text-align: center;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 10px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: #00ffcc;
    color: #00ffcc;
}

.primary-btn {
    background-color: #238636;
    border-color: #2ea44f;
    color: #ffffff;
}

.api-btn {
    background-color: rgba(40, 44, 52, 0.9);
    color: #00ffcc;
    border: 1.5px solid rgba(0, 255, 204, 0.8);
    border-radius: 8px;
    padding: 10px 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.2);
    width: 100%;
}

.api-btn:hover {
    background-color: rgba(0, 255, 204, 0.15);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
    transform: translateY(-1px);
}

.api-btn:active {
    transform: translateY(1px);
}

.api-btn-danger {
    background-color: rgba(255, 50, 50, 0.2);
    border-color: rgba(255, 50, 50, 0.8);
    color: #ff6666;
    box-shadow: 0 0 8px rgba(255, 50, 50, 0.2);
}

.api-btn-danger:hover {
    background-color: rgba(255, 50, 50, 0.3);
    box-shadow: 0 0 15px rgba(255, 50, 50, 0.5);
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.app-header {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    min-height: 60px;
    box-sizing: border-box;
    padding-top: max(15px, env(safe-area-inset-top));
    padding-bottom: 15px;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100; 
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
    border: none;
}

.app-header h1, .app-header h2, .app-header h3, .app-header p {
    margin: 0;
    padding: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
}

.logo-icon { font-size: 1.5rem; }

.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: #c9d1d9;
    letter-spacing: 1px;
}

.pro-badge {
    color: #00ffcc;
    font-weight: bold;
    margin-left: 2px;
}

.nav-btn {
    background: transparent;
    border: 2px solid #30363d;
    color: #8b949e;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    border-color: #00ffcc;
    color: #00ffcc;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
}

/* =========================================
   4. FULL-SCREEN CAMERA CANVAS
   ========================================= */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none; 
    background: #000;
    border: none;
    border-radius: 0;
    overflow: hidden;
    z-index: 1;
}

#canvas-cage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#examinerCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    filter: contrast(1.1) brightness(0.95);
    transition: filter 0.3s ease;
}
/* =========================================
   THE X-RAY SHUTTER FLASH
   ========================================= */
/* =========================================
   THE TRUE MONOCHROME X-RAY FLASH
   ========================================= */
#shutter-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* The Ultimate X-Ray Filter Chain */
    backdrop-filter: grayscale(100%) invert(100%) sepia(100%) hue-rotate(130deg) saturate(300%) brightness(1.2);
    -webkit-backdrop-filter: grayscale(100%) invert(100%) sepia(100%) hue-rotate(130deg) saturate(300%) brightness(1.2);
    
    opacity: 0;
    z-index: 50; 
    pointer-events: none; 
}
/* =========================================
   5. DASHBOARD CONTROLS (BOTTOM HUD)
   ========================================= */
.scan-controls-layout {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    box-sizing: border-box;
    padding: 20px 15px calc(15px + env(safe-area-inset-bottom)) 15px;
    background: linear-gradient(to top, rgba(5, 10, 15, 0.95) 0%, rgba(5, 10, 15, 0.6) 60%, transparent 100%);
    border: none;
}

.action-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    flex: 0 0 65px;
}

.round-btn {
    width: 65px !important;
    height: 65px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    border-radius: 50%;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scan-btn {
    background-color: rgba(40, 44, 52, 0.9);
    color: #00ffcc;
    border: 1.5px solid rgba(0, 255, 204, 0.8);
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.2);
}

.scan-btn:active {
    background-color: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 0 25px #ffffff, inset 0 0 10px #00ffcc !important;
    transform: scale(0.92);
    transition: none !important;
}

.reset-btn {
    background-color: rgba(255, 50, 50, 0.1);
    color: #ff6666;
    border: 1.5px solid rgba(255, 50, 50, 0.6);
}

.reset-btn:active {
    background-color: rgba(255, 50, 50, 0.3);
    transform: scale(0.95);
}

#trackpad.compact-trackpad {
    flex: 1;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(40, 44, 52, 0.8);
    border: 1px dashed rgba(0, 255, 204, 0.5);
    border-radius: 12px;
    touch-action: none;
    box-sizing: border-box;
    gap: 10px;
}

.trackpad-label {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    color: #00ffcc;
    font-family: sans-serif;
    text-transform: uppercase;
}

.trackpad-label.title {
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 16px;
}

.trackpad-label.instruction {
    font-size: 12px;
    opacity: 0.7;
}

/* Slider Controls */
.slider-container {
    flex: 0 0 45px;
    height: 140px;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: #00ffcc;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.7;
    user-select: none;
    -webkit-user-select: none;
    text-align: center;
    order: 2 !important;
    margin-left: 12px !important;
    margin-right: 0 !important;
}

.vertical-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 15px;
    height: 130px;
    accent-color: #00ffcc;
    cursor: pointer;
    margin: 0;
    order: 1 !important;
}

/* =========================================
   6. FLOATING HUD ELEMENTS
   ========================================= */
#btn-reset {
    position: absolute;
    z-index: 1000;
    top: calc(75px + env(safe-area-inset-top)); 
    left: 15px;
    bottom: auto; 
    transform: none; 
    display: inline-block !important;
    width: max-content !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px 18px !important;
    background: rgba(10, 15, 25, 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ff0055 !important;
    border: 1px solid rgba(255, 0, 85, 0.4) !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hud-floating-btn {
    position: absolute;
    top: calc(75px + env(safe-area-inset-top)); 
    right: 15px;
    z-index: 1000;
    width: auto !important;
    padding: 8px 15px !important;
    background: rgba(10, 15, 25, 0.6) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 255, 204, 0.4) !important;
    border-radius: 20px !important;
    color: #00ffcc !important;
    font-size: 0.75rem !important;
    font-family: monospace;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hud-floating-btn:active {
    background: rgba(0, 255, 204, 0.2) !important;
    transform: scale(0.95);
}

.center-screen-btn {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1000 !important;
    background: rgba(10, 15, 25, 0.7) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px 30px !important;
    font-size: 1.1rem !important;
    letter-spacing: 2px;
    border: 1px solid rgba(0, 255, 204, 0.4) !important;
}

/* =========================================
   7. MODALS (SCAN CAPTURED & WARNINGS)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 11, 15, 0.95);
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    padding-top: 12vh; 
    box-sizing: border-box; 
    z-index: 999999;
}

.modal-content {
    background: #161b22;
    border: 2px solid #30363d;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh; 
    overflow-y: auto; 
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(0, 255, 204, 0.05);
}

.modal-content h3 {
    color: #00ffcc;
    margin-top: 0;
    font-family: monospace;
    letter-spacing: 2px;
}

#snapshot-preview-img {
    width: 100%;
    height: auto;
    max-height: 40vh; 
    object-fit: contain; 
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #21262d;
}

.modal-actions {
    display: flex;
    flex-direction: column; 
    gap: 12px; 
    width: 100%;
}

.modal-actions button {
    width: 100%;
    margin-bottom: 0 !important; 
}

#portrait-lock-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    color: #ff0055;
    text-align: center;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: monospace;
}

.warning-content h2 { margin: 10px 0; letter-spacing: 2px; }
.warning-content p { color: #00ffcc; font-size: 0.9rem; line-height: 1.5; }
.warning-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    animation: rotateIcon 2s infinite ease-in-out;
}

@media screen and (orientation: landscape) and (max-height: 600px) {
    #portrait-lock-warning { display: flex; }
    #canvas-container, .scan-controls-layout { visibility: hidden; }
}

/* =========================================
   8. SPLASH SCREEN (V14 GLASSMORPHISM)
   ========================================= */
.glass-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #050a0f;
    background-image: url('assets/lab-background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.glass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 16, 0.75); 
    z-index: 1;
}

.glass-card {
    position: relative;
    z-index: 2;
    background: rgba(25, 30, 40, 0.45);
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    width: 85%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container img {
    width: 200px; 
    height: 200px; 
    object-fit: cover; 
    border-radius: 35px; 
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
}

.app-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
}

.app-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 5px;
    margin-bottom: 30px;
}

.tactical-readout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: monospace;
    font-size: 10px;
    color: rgba(0, 255, 204, 0.7);
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 204, 0.2);
}

.blinking-dot {
    width: 6px;
    height: 6px;
    background-color: #00ffcc;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.glass-button {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.2), rgba(0, 150, 255, 0.2));
    border: 1px solid rgba(0, 255, 204, 0.5);
    color: #00ffcc;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 18px 0;
    width: 100%;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.1);
}

.glass-button:active {
    transform: scale(0.97);
    background: rgba(0, 255, 204, 0.4);
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.4);
    color: #ffffff;
}

/* =========================================
   9. ARCHIVE TERMINAL & LOGS (OLD UI)
   ========================================= */
.patient-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
    text-align: left;
}

.patient-record {
    display: flex;
    align-items: center;
    background: rgba(10, 15, 25, 0.8);
    border: 1px solid rgba(0, 255, 204, 0.1);
    color: #e6edf3;
    padding: 10px;
    border-radius: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.patient-record:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: #4f9d8e;
    transform: translateX(5px);
}

.record-avatar {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #5a6b7c;
    filter: grayscale(100%) contrast(1.2);
}

.record-details .record-time {
    color: #8899aa !important;
    white-space: nowrap;
    text-align: right;
}

.record-name {
    color: #00ffcc;
    font-weight: bold;
    letter-spacing: 1px;
}

.sample-thumb:hover { border-color: #00ffcc; }
.sample-thumb-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
}

.sample-thumb label {
    font-size: 0.65rem;
    color: #c9d1d9;
    text-transform: uppercase;
    font-weight: bold;
}

/* Legacy Terminal Split View */
@media (max-width: 768px) {
    .terminal-split-layout {
        flex-direction: column-reverse;
        gap: 15px;
    }
    .terminal-column-right { padding: 15px; }
}

/* Legacy CRT Scanner Splash UI (Fallback) */
.crt-border {
    width: 100%; height: 100%;
    border: 2px solid #00ffcc; border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4), inset 0 0 20px rgba(0, 255, 204, 0.4);
    display: flex; justify-content: center; align-items: center;
    position: relative; overflow: hidden;
    background: linear-gradient(rgba(0, 255, 204, 0.03) 50%, rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 4px;
}

.splash-content { text-align: center; color: #00ffcc; font-family: monospace; z-index: 2; }
.splash-title { font-size: 2.2rem; letter-spacing: 4px; margin: 15px 0 5px 0; text-shadow: 0 0 10px rgba(0, 255, 204, 0.8); }
.badge-handheld { display: inline-block; background: #00ffcc; color: #050a0f; padding: 4px 12px; font-weight: bold; letter-spacing: 3px; margin-bottom: 40px; border-radius: 2px; box-shadow: 0 0 10px rgba(0, 255, 204, 0.5); }
.scanner-icon { display: flex; justify-content: center; margin-bottom: 25px; }
.scanner-body { width: 54px; height: 90px; border: 2px solid #00ffcc; border-radius: 8px; display: flex; flex-direction: column; align-items: center; padding-top: 12px; box-shadow: 0 0 15px rgba(0, 255, 204, 0.2), inset 0 0 10px rgba(0, 255, 204, 0.2); background: rgba(0, 255, 204, 0.05); }
.scanner-lens { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #00ffcc; background: rgba(0, 255, 204, 0.1); box-shadow: inset 0 0 10px #00ffcc; }
.scanner-beam { width: 6px; height: 6px; background: #ff0055; border-radius: 50%; margin-top: 20px; box-shadow: 0 0 10px #ff0055; animation: pulseBeam 1s infinite alternate; }
.loading-sequence p { margin: 10px 0; font-size: 0.95rem; opacity: 0.8; letter-spacing: 1px; }

/* =========================================
   10. ANIMATIONS, VIEWS & UTILITIES
   ========================================= */
.view-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 380px;
    margin: auto;
    padding: 25px 20px;
    background: rgba(22, 27, 34, 0.95);
    border: 2px solid #30363d;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(0, 255, 204, 0.05);
    z-index: 10;
    box-sizing: border-box;
}

.view-panel h2 {
    color: #00ffcc;
    font-family: monospace;
    letter-spacing: 2px;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}

.view-panel p {
    max-width: 100%;
    line-height: 1.4;
}

.active-view { display: flex; }
#imageLoader { display: none; }
#img-preview-element { max-width: 90%; max-height: 200px; margin-bottom: 15px; }
.hidden-media-container { display: none; }
.ios-hidden-file { width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; position: absolute; z-index: -1; }
.bold-red { font-weight: bold; color: red; }

#splash-screen.hidden,
#splash-screen.hide,
#splash-screen[style*="display: none"] {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.blink {
    animation: textBlink 1s step-end infinite;
    color: #ffffff;
    text-shadow: 0 0 8px #ffffff;
    margin-top: 20px !important;
}

@keyframes rotateIcon { 0% { transform: rotate(0deg); } 100% { transform: rotate(-180deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes pulseBeam { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.4); opacity: 1; } }
@keyframes textBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes sweepBeam { 0% { top: -20px; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes pulseSkull { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes textGlitch { 0% { transform: translate(0); } 20% { transform: translate(-1px, 1px); } 40% { transform: translate(1px, -1px); } 60% { transform: translate(-1px, -1px); } 80% { transform: translate(1px, 1px); } 100% { transform: translate(0); } }
@keyframes imageGlitch { 0% { transform: translate(0); clip-path: inset(0 0 0 0); } 20% { transform: translate(-2px, 1px); clip-path: inset(20% 0 80% 0); } 40% { transform: translate(-1px, -1px); clip-path: inset(50% 0 30% 0); } 60% { transform: translate(2px, 1px); clip-path: inset(80% 0 5% 0); } 80% { transform: translate(1px, -2px); clip-path: inset(10% 0 60% 0); } 100% { transform: translate(0); clip-path: inset(0 0 0 0); } }
/* =========================================
   OVERHEAT PENALTY MODE
   ========================================= */
.overheat-canvas {
    filter: contrast(300%) sepia(100%) hue-rotate(-50deg) saturate(700%) blur(1px) !important;
    border: 8px solid #ff0000 !important;
    box-sizing: border-box;
    animation: overheatPulse 0.5s infinite alternate;
}

@keyframes overheatPulse {
    0% { box-shadow: inset 0 0 20px #ff0000; }
    100% { box-shadow: inset 0 0 80px #ff0000; }
}

#overheat-warning {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    width: 85%;
    max-width: 350px;
    text-align: center;
    background: rgba(20, 0, 0, 0.95);
    border: 2px dashed #ff0000;
    padding: 25px 15px;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.6);
}

#overheat-warning h2 { 
    margin: 0 0 15px 0; 
    color: #ff0000;
    animation: textBlink 0.5s step-end infinite; 
}

#overheat-warning p { 
    margin: 0; 
    color: #ff6666; 
    font-size: 14px; 
    font-weight: bold; 
    font-family: monospace;
    line-height: 1.4;
}

.cooldown-text { 
    margin-top: 20px !important; 
    color: #ffffff !important; 
    animation: textBlink 1s step-end infinite; 
}