#cv-app-wrapper, #cv-app-wrapper * {
    font-family: 'Inter', sans-serif !important;
    box-sizing: border-box;
}

#cv-app-wrapper {
    --hud-color: #4df8ff;
    --hud-warn: #ff3333;
    --hud-bg: rgba(0, 15, 25, 0.75);
    --glass-border: rgba(77, 248, 255, 0.5);
    
    position: relative; 
    width: 100%; 
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden; 
    color: var(--hud-color); 
    user-select: none; 
    background-color: #000;
}

#cv-app-wrapper .mono-text, #cv-app-wrapper .mono-text *,
#cv-app-wrapper #reticle, #cv-app-wrapper #reticle *,
#cv-app-wrapper .nav-btn, #cv-app-wrapper .nav-btn * {
    font-family: 'Roboto Mono', monospace !important;
}

#cv-app-wrapper button { background-image: none !important; text-shadow: none !important; }
#cv-app-wrapper h1, #cv-app-wrapper h2, #cv-app-wrapper h3, #cv-app-wrapper p { line-height: 1.5 !important; margin: 0 0 10px 0 !important; }

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

#cockpit-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none;
    box-shadow: inset 0 0 150px rgba(0,0,0,1);
    background: linear-gradient(to bottom, rgba(0,20,30,0.9) 0%, transparent 15%, transparent 85%, rgba(0,20,30,0.9) 100%),
                linear-gradient(to right, rgba(0,20,30,0.9) 0%, transparent 10%, transparent 90%, rgba(0,20,30,0.9) 100%);
}

.hud-glass {
    background: var(--hud-bg); backdrop-filter: blur(8px); border: 1px solid var(--glass-border);
    box-shadow: 0 0 20px rgba(77, 248, 255, 0.2); position: relative;
}
.hud-glass::before { content: ''; position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-top: 3px solid var(--hud-color); border-left: 3px solid var(--hud-color); }
.hud-glass::after { content: ''; position: absolute; bottom: 0; right: 0; width: 15px; height: 15px; border-bottom: 3px solid var(--hud-color); border-right: 3px solid var(--hud-color); }

.scanlines {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 15; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
}

#ai-interface {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 1000px;
    z-index: 30; display: flex; flex-direction: column; align-items: center; opacity: 0; transition: opacity 1s; pointer-events: none;
}

.ai-voice-wave { display: flex; gap: 4px; height: 30px; align-items: center; margin-bottom: 10px; }
.wave-bar { width: 4px; background: var(--hud-color); border-radius: 2px; animation: wave 1s infinite ease-in-out; }
.wave-bar:nth-child(1) { animation-delay: 0.1s; height: 10px;} .wave-bar:nth-child(2) { animation-delay: 0.2s; height: 20px;}
.wave-bar:nth-child(3) { animation-delay: 0.3s; height: 30px;} .wave-bar:nth-child(4) { animation-delay: 0.2s; height: 20px;}
.wave-bar:nth-child(5) { animation-delay: 0.1s; height: 10px;}
@keyframes wave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1.5); } }

.ai-text-box {
    background: rgba(0, 10, 15, 0.9) !important; border: 1px solid var(--hud-color) !important;
    padding: 15px 30px !important; border-radius: 4px !important; text-align: left !important;
    font-size: 1.2rem !important; min-height: 80px !important; display: block !important; width: 100% !important;
    box-shadow: 0 0 15px rgba(77, 248, 255, 0.2) !important; position: relative !important; line-height: 1.6 !important; pointer-events: auto !important;
}

#ai-dialogue { display: inline !important; color: #fff !important; font-family: 'Inter', sans-serif !important; white-space: pre-wrap !important; word-wrap: break-word !important; }

#hud-controls { display: flex; gap: 20px; margin-top: 20px; opacity: 0; transition: opacity 0.3s; pointer-events: auto; }

.nav-btn {
    background: rgba(0, 30, 45, 0.8); border: 1px solid var(--hud-color); color: var(--hud-color); padding: 10px 25px;
    font-size: 1rem; cursor: pointer; transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px;
    box-shadow: inset 0 0 10px rgba(77,248,255,0.1); pointer-events: auto;
}
.nav-btn:hover { background: var(--hud-color); color: #000; box-shadow: 0 0 15px var(--hud-color); }
.nav-btn:disabled { opacity: 0.3; pointer-events: none; border-color: #555; color: #555; box-shadow: none; }
.blink { animation: blink-fast 1s infinite; display: inline-block; margin-left: 5px;}
@keyframes blink-fast { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

#panels-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; }

.large-panel {
    position: absolute; top: 45%; left: 50%; transform: translate(-50%, -35%);
    width: 85%; max-width: 1100px; height: 60vh; min-height: 400px; opacity: 0; pointer-events: none;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.1); display: flex; flex-direction: column;
}
.large-panel.visible { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }

.panel-header {
    background: rgba(77, 248, 255, 0.2); border-bottom: 1px solid var(--hud-color); padding: 12px 20px;
    font-weight: 700; font-size: 1.2rem; letter-spacing: 2px; display: flex; justify-content: space-between; align-items: center; text-transform: uppercase;
}

.panel-body { display: flex; flex: 1; overflow: hidden; background: rgba(0, 0, 0, 0.6); }
.panel-img { flex: 1; background-size: cover; background-position: center; border-right: 1px solid var(--glass-border); position: relative; }
.panel-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(0, 255, 255, 0.1), rgba(0, 0, 0, 0.4)); mix-blend-mode: overlay; }

.panel-data { flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: flex-start; overflow-y: auto; }
.panel-data::-webkit-scrollbar { width: 6px; }
.panel-data::-webkit-scrollbar-track { background: rgba(0, 20, 30, 0.5); }
.panel-data::-webkit-scrollbar-thumb { background: var(--hud-color); }

.warning-state { --hud-color: var(--hud-warn); --glass-border: rgba(255, 51, 51, 0.6); }
.warning-state .scanlines { background: rgba(255, 0, 0, 0.05); }
.warning-state .ai-text-box { box-shadow: 0 0 20px rgba(255, 51, 51, 0.5); }
.warning-state .panel-img::after { background: linear-gradient(to right, rgba(255, 0, 0, 0.2), rgba(0, 0, 0, 0.6)); }
.warning-state .nav-btn { border-color: var(--hud-warn); color: var(--hud-warn); box-shadow: inset 0 0 10px rgba(255,51,51,0.1); }
.warning-state .nav-btn:hover { background: var(--hud-warn); color: #000; box-shadow: 0 0 15px var(--hud-warn); }

.warning-flash {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 14; pointer-events: none;
    background: rgba(255, 0, 0, 0.15); opacity: 0; animation: alarmFlash 1.5s infinite;
}
@keyframes alarmFlash { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

#reticle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 150px; height: 150px; z-index: 12; opacity: 0; pointer-events: none; transition: opacity 0.5s; }
.reticle-part { position: absolute; border: 2px solid var(--hud-color); width: 40px; height: 40px; }
.r-tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.r-tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.r-bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.r-br { bottom: 0; right: 0; border-left: none; border-top: none; }
.r-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 6px; height: 6px; background: var(--hud-color); border-radius: 50%; box-shadow: 0 0 10px var(--hud-color); }

.data-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(77, 248, 255, 0.2); font-size: 1.1rem; }
.data-label { opacity: 0.8; }
.data-value { color: #fff; font-weight: 600; text-align: right; }
.typing-cursor::after { content: '█'; animation: blink 1s step-start infinite; }

@media (max-width: 768px) {
    .large-panel { width: 95%; height: 75vh; }
    .panel-body { flex-direction: column; }
    .panel-img { flex: 0.4; border-right: none; border-bottom: 1px solid var(--glass-border); }
    .panel-data { flex: 0.6; padding: 20px; font-size: 0.9rem; }
    .data-row { font-size: 1rem; padding: 8px 0; }
    #ai-interface { bottom: 15px; width: 95%; }
    .ai-text-box { font-size: 1rem !important; padding: 15px !important; min-height: 70px !important;}
}