#cv-app-wrapper, #cv-app-wrapper * { font-family: 'Inter', sans-serif !important; box-sizing: border-box; }
#cv-app-wrapper { position: relative; width: 100%; height: 100vh; overflow: hidden; color: #4df8ff; background-color: #000; }
#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); }

.hud-glass { background: rgba(0, 15, 25, 0.75); backdrop-filter: blur(8px); border: 1px solid rgba(77, 248, 255, 0.5); }
.hud-glass-alert { background: rgba(30, 0, 0, 0.85); backdrop-filter: blur(8px); border: 1px solid rgba(255, 50, 50, 0.8); box-shadow: 0 0 20px rgba(255, 0, 0, 0.4); }

.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; }

/* Cấu trúc Panels */
.large-panel { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) scale(0.95); width: 85%; max-width: 950px; opacity: 0; pointer-events: none; transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 20; }
.large-panel.visible { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.panel-header { background: rgba(77, 248, 255, 0.2); padding: 12px 20px; font-weight: 700; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.panel-header-alert { background: rgba(255, 50, 50, 0.4); color: #ff5555; }
.panel-body { display: flex; flex: 1; overflow: hidden; background: rgba(0, 0, 0, 0.6); min-height: 380px;}
.panel-img { flex: 1; background-size: cover; background-position: center; border-right: 1px solid rgba(77, 248, 255, 0.5); }
.panel-img-alert { border-right: 1px solid rgba(255, 50, 50, 0.5); }
.panel-data { flex: 1.2; padding: 30px; overflow-y: auto; display: flex; flex-direction: column; justify-content: center;}

/* Hiển thị dữ liệu */
.data-row { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(77, 248, 255, 0.3); padding: 10px 0; }
.data-label { color: rgba(255,255,255,0.6); text-transform: uppercase; font-size: 0.85rem; }
.data-value { font-weight: 600; text-align: right; max-width: 70%;}

/* Reticle (Ống ngắm) */
#reticle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 300px; height: 300px; z-index: 12; pointer-events: none; opacity: 0.3; transition: all 1s ease-in-out; }
.reticle-zoomed { width: 450px !important; height: 450px !important; opacity: 0.6 !important; }
.reticle-part { position: absolute; width: 30px; height: 30px; border: 2px solid #4df8ff; }
.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: 4px; height: 4px; background: #4df8ff; border-radius: 50%; box-shadow: 0 0 10px #4df8ff;}

/* AI Interface & Controls */
#ai-interface { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); width: 90%; max-width: 850px; z-index: 30; display: flex; flex-direction: column; align-items: center; }
.ai-text-box { width: 100%; padding: 20px 30px; border-radius: 8px; font-family: 'Roboto Mono', monospace; font-size: 1.1rem; min-height: 85px; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.5; }
.typing-cursor { display: inline-block; width: 10px; height: 1.2em; background-color: #4df8ff; margin-left: 5px; vertical-align: middle; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

#hud-controls { display: flex; gap: 20px; margin-top: 20px; opacity: 0; pointer-events: none; transition: opacity 0.5s; }
.nav-btn { background: rgba(0, 15, 25, 0.8); border: 1px solid #4df8ff; color: #4df8ff; padding: 12px 25px; cursor: pointer; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; transition: all 0.2s; font-family: 'Inter', sans-serif; }
.nav-btn:hover { background: #4df8ff; color: #000; box-shadow: 0 0 15px #4df8ff; }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; border-color: rgba(77, 248, 255, 0.3); color: rgba(77, 248, 255, 0.3); background: transparent; box-shadow: none;}

.mono-text { font-family: 'Roboto Mono', monospace; }
#alarm-layer { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(255,0,0,0.15); z-index: 5; pointer-events: none; opacity: 0; transition: 0.5s; }
.alarm-active { animation: alarmPulse 2s infinite; }
@keyframes alarmPulse { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 768px) {
    .panel-body { flex-direction: column; }
    .panel-img { min-height: 180px; border-right: none; border-bottom: 1px solid rgba(77, 248, 255, 0.5); }
    .large-panel { top: 42%; max-height: 65vh; overflow-y: auto; }
    #ai-interface { bottom: 5%; }
    .ai-text-box { font-size: 0.95rem; padding: 15px; }
    #reticle { width: 200px; height: 200px; }
    .reticle-zoomed { width: 300px !important; height: 300px !important; }
}