/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00ffff;
    --secondary: #0099ff;
    --accent: #ff6b00;
    --danger: #ff0055;
    --success: #00ff88;
    --warning: #ffaa00;
    --dark: #0a0e27;
    --darker: #050814;
    --light: #ffffff;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --animation-speed: 1;
}

body {
    font-family: 'Segoe UI', 'Roboto', -apple-system, sans-serif;
    background: var(--darker);
    color: var(--light);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ===== PARTICLE BACKGROUND ===== */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #0a0e27 0%, #050814 50%, #0a0e27 100%);
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    position: relative;
    z-index: 1;
    padding: 15px;
    max-width: 2400px;
    margin: 0 auto;
}

/* ===== ENHANCED HEADER ===== */
.header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 15px 25px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.1);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.arc-reactor {
    position: relative;
    width: 50px;
    height: 50px;
    animation: reactorPulse 2s ease-in-out infinite;
}

@keyframes reactorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.reactor-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: radial-gradient(circle, #fff 0%, var(--primary) 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary), 0 0 60px var(--primary);
    animation: coreGlow 1.5s ease-in-out infinite;
}

@keyframes coreGlow {
    0%, 100% { 
        box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary);
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        box-shadow: 0 0 30px var(--primary), 0 0 60px var(--primary), 0 0 90px var(--primary);
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.reactor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: ringExpand 3s ease-in-out infinite;
}

.reactor-ring:nth-child(2) {
    width: 25px;
    height: 25px;
    animation-delay: 0s;
}

.reactor-ring:nth-child(3) {
    width: 38px;
    height: 38px;
    animation-delay: 0.5s;
}

.reactor-ring:nth-child(4) {
    width: 50px;
    height: 50px;
    animation-delay: 1s;
}

@keyframes ringExpand {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.08); }
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2px;
}

.version {
    font-size: 10px;
    color: var(--primary);
    opacity: 0.7;
    letter-spacing: 1px;
}

.header-center {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.weather-widget,
.location-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 13px;
}

.weather-widget i,
.location-widget i {
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.system-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: 'Courier New', monospace;
}

#currentTime {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

#currentDate {
    font-size: 11px;
    opacity: 0.7;
}

.battery-status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
    font-size: 12px;
}

.battery-status i {
    color: var(--success);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--glass);
    border: 1px solid var(--primary);
    border-radius: 25px;
}

.user-avatar {
    position: relative;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-avatar i {
    font-size: 20px;
    color: var(--primary);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.btn-fullscreen {
    width: 35px;
    height: 35px;
    background: var(--glass);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-fullscreen:hover {
    background: var(--primary);
    color: var(--dark);
    transform: scale(1.1);
}

/* ===== VOICE COMMAND ===== */
.voice-command {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 30px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: 0 0 80px rgba(0, 255, 255, 0.6);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}

.voice-command.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.voice-wave {
    display: flex;
    gap: 5px;
    align-items: center;
    height: 40px;
}

.voice-wave span {
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    animation: waveAnimation 1s ease-in-out infinite;
}

.voice-wave span:nth-child(1) { animation-delay: 0s; }
.voice-wave span:nth-child(2) { animation-delay: 0.1s; }
.voice-wave span:nth-child(3) { animation-delay: 0.2s; }

@keyframes waveAnimation {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

#voiceText {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary);
    letter-spacing: 1px;
    text-align: center;
}

.voice-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50%;
    color: var(--dark);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--primary);
}

.voice-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--primary);
}

/* ===== CONTROL PANEL ===== */
.control-panel {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: slideLeft 0.6s ease-out 0.3s backwards;
}

@keyframes slideLeft {
    from {
        transform: translateY(-50%) translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

.control-btn {
    width: 45px;
    height: 45px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: scale(1.15);
    box-shadow: 0 0 20px var(--primary);
    border-color: var(--primary);
}

.control-btn.active {
    background: var(--primary);
    color: var(--dark);
}

/* ===== GRID LAYOUT ===== */
.grid-container {
    display: grid;
    grid-template-columns: 380px 1fr 380px;
    gap: 15px;
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== PANEL STYLES ===== */
.panel {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 0;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.panel:hover {
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.15);
    transform: translateY(-2px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.panel-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.panel-status.online {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.panel-status.active {
    background: rgba(0, 255, 255, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.panel-status.standby {
    background: rgba(255, 170, 0, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.panel-status.secure {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.panel-status.armed {
    background: rgba(255, 0, 85, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-minimize,
.btn-refresh,
.btn-clear {
    width: 25px;
    height: 25px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-minimize:hover,
.btn-refresh:hover,
.btn-clear:hover {
    background: var(--primary);
    color: var(--dark);
    transform: scale(1.1);
}

.btn-refresh:hover i {
    animation: spin 0.5s linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.panel-body {
    padding: 20px;
}

/* ===== AI PANEL ===== */
.ai-avatar {
    width: 100%;
    height: 120px;
    margin-bottom: 15px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#aiWaveform {
    width: 100%;
    height: 100%;
}

.ai-status {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary);
    border-radius: 15px;
    font-size: 11px;
    color: var(--primary);
}

.ai-chat {
    height: 280px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: messageSlide 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--dark);
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.message-time {
    font-size: 10px;
    color: var(--primary);
    opacity: 0.7;
}

.chat-message.ai .message-content p {
    background: rgba(0, 255, 255, 0.1);
    border-left: 3px solid var(--primary);
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--light);
    font-size: 13px;
    line-height: 1.5;
}

.chat-message.user .message-content p {
    background: rgba(0, 153, 255, 0.1);
    border-right: 3px solid var(--secondary);
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--light);
    font-size: 13px;
    line-height: 1.5;
}

.ai-suggestions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.suggestion-btn {
    padding: 6px 12px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 15px;
    color: var(--primary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-2px);
}

.ai-input {
    display: flex;
    gap: 8px;
}

.ai-input input {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--light);
    font-size: 13px;
    transition: all 0.3s ease;
}

.ai-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.ai-input button {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 10px;
    color: var(--dark);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-input button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary);
}

#aiVoiceInput {
    background: rgba(255, 0, 85, 0.2);
    border: 1px solid var(--danger);
}

#aiVoiceInput:hover {
    background: var(--danger);
    color: var(--light);
}

/* ===== SYSTEM MONITOR ===== */
.stat-item {
    margin-bottom: 20px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stat-header label {
    font-size: 12px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--light);
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 22px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 12px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to { left: 100%; }
}

.stat-details {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    color: var(--light);
    opacity: 0.6;
}

.system-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-size: 11px;
}

.info-item i {
    color: var(--primary);
}

/* ===== REACTOR PANEL ===== */
.reactor-display {
    position: relative;
    width: 100%;
    height: 220px;
    margin-bottom: 20px;
}

#reactorCanvas {
    width: 100%;
    height: 100%;
}

.reactor-stats {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
}

.reactor-stat {
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--primary);
}

.stat-label {
    display: block;
    font-size: 9px;
    color: var(--primary);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.stat-data {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.reactor-stat .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.reactor-stat .stat-unit {
    font-size: 11px;
    color: var(--light);
    opacity: 0.7;
}

.energy-distribution {
    margin-bottom: 20px;
}

.energy-distribution h4 {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.distribution-item {
    display: grid;
    grid-template-columns: 100px 1fr 45px;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.distribution-item label {
    font-size: 11px;
    color: var(--light);
}

.energy-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    outline: none;
    border: 1px solid var(--glass-border);
}

.energy-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary);
}

.energy-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.energy-percent {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-align: right;
}

.reactor-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.reactor-btn {
    padding: 12px;
    background: var(--glass);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.reactor-btn:hover {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 20px var(--primary);
    transform: translateY(-2px);
}

.reactor-btn.emergency {
    border-color: var(--danger);
    color: var(--danger);
}

.reactor-btn.emergency:hover {
    background: var(--danger);
    color: var(--light);
    box-shadow: 0 0 20px var(--danger);
}

/* ===== HOLOGRAPHIC DISPLAY ===== */
.panel-tabs {
    display: flex;
    gap: 6px;
}

.tab-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--light);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--dark);
    border-color: var(--primary);
}

.tab-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.holo-display {
    position: relative;
    width: 100%;
    height: 450px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--glass-border);
}

#holoCanvas {
    width: 100%;
    height: 100%;
}

.holo-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 30s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    to { transform: translate(40px, 40px); }
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 20px var(--primary);
    animation: scanMove 4s linear infinite;
    pointer-events: none;
}

@keyframes scanMove {
    from { top: 0%; }
    to { top: 100%; }
}

.holo-info {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    font-size: 11px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 5px;
}

.info-row span:first-child {
    color: var(--primary);
    opacity: 0.7;
}

.info-row span:last-child {
    color: var(--light);
    font-weight: 600;
}

.holo-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.holo-btn {
    width: 45px;
    height: 45px;
    background: var(--glass);
    border: 1px solid var(--primary);
    border-radius: 50%;
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.holo-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: scale(1.15);
    box-shadow: 0 0 20px var(--primary);
}

.holo-btn:active {
    transform: scale(0.95);
}

/* ===== DATA PANEL ===== */
#dataSelect {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--light);
    font-size: 11px;
    cursor: pointer;
    outline: none;
}

#dataSelect option {
    background: var(--dark);
}

.chart-container {
    width: 100%;
    height: 280px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

#chartCanvas {
    width: 100% !important;
    height: 100% !important;
}

.data-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.data-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.data-stat:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.data-stat i {
    font-size: 24px;
    color: var(--primary);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.data-stat .stat-label {
    font-size: 10px;
    color: var(--light);
    opacity: 0.7;
    text-transform: uppercase;
}

.data-stat .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* ===== MISSION PANEL ===== */
.mission-status {
    padding: 4px 12px;
    background: rgba(255, 170, 0, 0.2);
    border: 1px solid var(--warning);
    border-radius: 12px;
    font-size: 10px;
    color: var(--warning);
    font-weight: 600;
}

.mission-map {
    position: relative;
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

#mapCanvas {
    width: 100%;
    height: 100%;
}

.mission-objectives h4 {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.objective-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 3px solid;
    font-size: 12px;
}

.objective-item.complete {
    border-color: var(--success);
    color: var(--success);
}

.objective-item.active {
    border-color: var(--primary);
    color: var(--primary);
}

.objective-item.pending {
    border-color: var(--glass-border);
    color: var(--light);
    opacity: 0.5;
}

/* ===== SUIT PANEL ===== */
.suit-diagram {
    width: 100%;
    height: 350px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suit-svg {
    width: 100%;
    height: 100%;
}

#suitSvg {
    filter: drop-shadow(0 0 10px var(--primary));
}

.suit-part {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    transition: all 0.3s ease;
}

.suit-part:hover {
    fill: rgba(0, 255, 255, 0.1);
    stroke-width: 3;
    filter: drop-shadow(0 0 10px var(--primary));
}

.arc-glow {
    fill: var(--primary);
    filter: drop-shadow(0 0 15px var(--primary));
    animation: arcPulse 2s ease-in-out infinite;
}

@keyframes arcPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.repulsor {
    fill: var(--secondary);
    filter: drop-shadow(0 0 8px var(--secondary));
    animation: repulsorBlink 1.5s ease-in-out infinite;
}

@keyframes repulsorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.suit-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.suit-stat {
    text-align: center;
}

.suit-stat label {
    display: block;
    font-size: 10px;
    margin-bottom: 8px;
    color: var(--light);
    opacity: 0.7;
    text-transform: uppercase;
}

.circular-progress {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--primary) var(--value), rgba(0, 0, 0, 0.3) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.circular-progress::before {
    content: '';
    position: absolute;
    width: 55px;
    height: 55px;
    background: var(--dark);
    border-radius: 50%;
}

.circular-progress span {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.suit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.suit-action-btn {
    padding: 14px;
    border: 1px solid;
    border-radius: 8px;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.suit-action-btn i {
    font-size: 20px;
}

.suit-action-btn.deploy {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.suit-action-btn.deploy:hover {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 20px var(--primary);
}

.suit-action-btn.diagnostics {
    background: rgba(0, 153, 255, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
}

.suit-action-btn.diagnostics:hover {
    background: var(--secondary);
    color: var(--dark);
    box-shadow: 0 0 20px var(--secondary);
}

/* ===== WEAPONS PANEL ===== */
.weapon-item {
    margin-bottom: 15px;
}

.weapon-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12px;
}

.weapon-header i {
    color: var(--primary);
    font-size: 16px;
}

.weapon-header span:nth-child(2) {
    flex: 1;
}

.weapon-status {
    font-size: 10px;
    font-weight: 600;
    color: var(--success);
}

.weapon-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
}

.weapon-charge {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--primary));
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ===== SECURITY PANEL ===== */
.security-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.security-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.security-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.security-item i {
    font-size: 28px;
    color: var(--primary);
}

.security-item.active i {
    color: var(--success);
}

.security-item.secure i {
    color: var(--primary);
}

.security-label {
    font-size: 11px;
    color: var(--light);
    opacity: 0.7;
    text-transform: uppercase;
}

.security-item .security-status {
    font-size: 10px;
    font-weight: 600;
    color: var(--success);
}

.threat-analysis h4 {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.threat-meter {
    width: 100%;
    height: 25px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin-bottom: 8px;
    position: relative;
}

.threat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
    transition: width 0.5s ease;
}

.threat-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.threat-text {
    font-size: 10px;
    font-weight: 600;
}

.threat-text.low { color: var(--success); }
.threat-text.medium { color: var(--warning); }
.threat-text.high { color: var(--danger); }

.threat-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.threat-stat {
    text-align: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.threat-count {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.threat-label {
    font-size: 10px;
    color: var(--light);
    opacity: 0.7;
}

/* ===== NOTIFICATIONS ===== */
.notif-badge {
    background: var(--danger);
    color: var(--light);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}

.notif-list {
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 3px solid;
    animation: notifSlide 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    transition: all 0.3s ease;
}

@keyframes notifSlide {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notif-item:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(-5px);
}

.notif-item.priority-high {
    border-color: var(--danger);
}

.notif-item.priority-medium {
    border-color: var(--warning);
}

.notif-item.priority-low {
    border-color: var(--success);
}

.notif-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-item.priority-high .notif-icon {
    background: rgba(255, 0, 85, 0.1);
    color: var(--danger);
}

.notif-item.priority-medium .notif-icon {
    background: rgba(255, 170, 0, 0.1);
    color: var(--warning);
}

.notif-item.priority-low .notif-icon {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success);
}

.notif-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notif-time {
    font-size: 10px;
    color: var(--primary);
    opacity: 0.7;
}

.notif-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 2px;
}

.notif-desc {
    font-size: 11px;
    color: var(--light);
    opacity: 0.8;
    line-height: 1.4;
}

/* ===== QUICK ACTIONS ===== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: var(--glass);
    border: 1px solid var(--primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--light);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4);
    border-color: var(--primary);
}

.action-btn i {
    font-size: 32px;
}

.action-btn span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.action-status {
    font-size: 9px;
    padding: 3px 8px;
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border-radius: 10px;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--dark);
    border: 2px solid var(--primary);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
    animation: modalSlide 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
    font-size: 18px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 35px;
    height: 35px;
    background: transparent;
    border: 1px solid var(--danger);
    border-radius: 50%;
    color: var(--danger);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger);
    color: var(--light);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.settings-section {
    margin-bottom: 25px;
}

.settings-section h3 {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 10px;
}

.setting-item label {
    font-size: 13px;
    color: var(--light);
}

.setting-item input[type="range"],
.setting-item input[type="color"] {
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    max-width: 500px;
}

.loading-reactor {
    width: 180px;
    height: 180px;
    margin: 0 auto 40px;
    position: relative;
}

.loading-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, #fff 0%, var(--primary) 100%);
    border-radius: 50%;
    box-shadow: 0 0 50px var(--primary), 0 0 100px var(--primary), 0 0 150px var(--primary);
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

.loading-rings {
    /* Ensure the ring container is positioned and sized to the reactor
       so rotation happens around the visual center. Previously the
       element had no box (children were absolutely positioned) which
       caused the rotation origin to be offset. */
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    /* Disable rotation so the rings stay perfectly centered and static. */
    animation: none;
}

.loading-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid var(--primary);
    border-radius: 50%;
}

.loading-ring:nth-child(1) {
    width: 100px;
    height: 100px;
    animation: ringPulse 2s ease-in-out infinite;
}

.loading-ring:nth-child(2) {
    width: 140px;
    height: 140px;
    animation: ringPulse 2s ease-in-out 0.3s infinite;
}

.loading-ring:nth-child(3) {
    width: 180px;
    height: 180px;
    animation: ringPulse 2s ease-in-out 0.6s infinite;
}

@keyframes loadingSpin {
    to { transform: rotate(360deg); }
}

@keyframes ringPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.loading-content h2 {
    font-size: 42px;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
}

.loading-subtitle {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 30px;
    opacity: 0.8;
    letter-spacing: 2px;
}

.loading-steps {
    min-height: 40px;
    margin-bottom: 20px;
}

.loading-step {
    font-size: 13px;
    color: var(--light);
    opacity: 0.7;
    animation: fadeInOut 1s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.loading-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--glass-border);
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px var(--primary);
}

.loading-text {
    font-size: 16px;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1600px) {
    .grid-container {
        grid-template-columns: 340px 1fr 340px;
    }
}

@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .header {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header-center,
    .header-right {
        justify-content: center;
    }
    
    .main-container {
        padding: 10px;
    }
    
    .panel-body {
        padding: 15px;
    }
    
    .action-grid,
    .data-stats,
    .suit-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== UTILITY ANIMATIONS ===== */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.glitch {
    animation: glitch 0.3s;
}

/* ===== THEME VARIANTS ===== */
body.theme-red {
    --primary: #ff0055;
    --secondary: #ff6b00;
}

body.theme-green {
    --primary: #00ff88;
    --secondary: #00ffaa;
}

body.theme-purple {
    --primary: #aa00ff;
    --secondary: #ff00ff;
}

/* ===== PRINT STYLES ===== */
@media print {
    .control-panel,
    .voice-command,
    .loading-screen {
        display: none !important;
    }
}