* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #000;
    color: #00ff00;
    overflow: hidden;
}

#scene-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    padding: 15px;
    border-radius: 5px;
    backdrop-filter: blur(5px);
}

#header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

#header h1 {
    color: #00ffff;
    font-size: 24px;
    text-shadow: 0 0 10px #00ffff;
    letter-spacing: 2px;
}

#status {
    padding: 5px 10px;
    border: 1px solid #00ff00;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

#status.standby { color: #888; border-color: #888; }
#status.analysis { color: #00aaff; border-color: #00aaff; }
#status.production { color: #ffaa00; border-color: #ffaa00; }
#status.maintenance { color: #aa00ff; border-color: #aa00ff; }
#status.overcharge { 
    color: #ff0000; 
    border-color: #ff0000; 
    animation: blink 0.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

#side-panel {
    margin-bottom: 15px;
}

.metric {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.metric span:first-child {
    color: #888;
}

#log {
    width: 300px;
    height: 150px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    padding: 10px;
    font-size: 12px;
}

.log-entry {
    margin-bottom: 5px;
    color: #00ff00;
}

.log-entry:last-child {
    color: #ffff00;
}

#controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
}

.control-btn {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn.power {
    border-color: #00aaff;
    color: #00aaff;
}

.control-btn.power:hover {
    background: rgba(0, 170, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
}

.control-btn.emergency {
    border-color: #ff0000;
    color: #ff0000;
}

.control-btn.emergency:hover {
    background: rgba(255, 0, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

footer {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 100;
}

footer a {
    color: #666;
    text-decoration: none;
    font-size: 12px;
}

footer a:hover {
    color: #00ff00;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #hud {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 10px;
    }
    
    #header h1 {
        font-size: 18px;
    }
    
    #log {
        width: 100%;
        height: 100px;
    }
    
    #controls {
        bottom: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .control-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
}

/* Scrollbar styling */
#log::-webkit-scrollbar {
    width: 6px;
}

#log::-webkit-scrollbar-track {
    background: #222;
}

#log::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

#log::-webkit-scrollbar-thumb:hover {
    background: #777;
}