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

body {
    font-family: 'VT323', 'Courier New', monospace;
    background: #000;
    color: #00FF00;
    overflow: hidden;
    font-size: 18px;
}

#terminal-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#scene-container {
    width: 100%;
    height: 100%;
}

#header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 10;
    pointer-events: none;
}

.header-item {
    font-size: 20px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.header-item.sigma {
    color: #FF4500;
}

#footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    color: #FFB000;
    font-size: 18px;
}

.footer-right {
    pointer-events: all;
}

#scanner-readouts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.scanner-readout {
    position: absolute;
    font-size: 16px;
    color: #00FF00;
    letter-spacing: 2px;
    animation: pulse 2s ease-in-out infinite;
}

.readout-value {
    font-size: 18px;
    font-weight: bold;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

#warning-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    color: #000;
    padding: 30px 60px;
    font-size: 32px;
    font-weight: bold;
    border: 3px solid #FF0000;
    box-shadow: 0 0 30px #FF0000;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#warning-flash.show {
    opacity: 1;
    animation: flash 0.3s ease-in-out 3;
}

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

#magi-voting {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00FF00;
    padding: 20px;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

#magi-voting.show {
    opacity: 1;
}

.magi-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #FFB000;
}

.magi-bar {
    margin-bottom: 12px;
    font-size: 16px;
}

.magi-bar span {
    display: inline-block;
    width: 120px;
}

.bar {
    display: inline-block;
    width: 200px;
    height: 20px;
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00FF00;
    vertical-align: middle;
    margin-left: 10px;
}

.bar-fill {
    height: 100%;
    background: #00FF00;
    transition: width 2s ease-in-out;
    width: 0;
}

#pattern-detection {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: #FFB000;
    text-shadow: 0 0 10px #FFB000;
    pointer-events: none;
    z-index: 10;
}

#control-panel {
    position: absolute;
    top: 100px;
    left: 30px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00FF00;
    padding: 25px;
    z-index: 20;
    min-width: 350px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#control-panel.show {
    opacity: 1;
    pointer-events: all;
}

.panel-header {
    font-size: 24px;
    margin-bottom: 20px;
    color: #FFB000;
    text-align: center;
    border-bottom: 1px solid #00FF00;
    padding-bottom: 10px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(0, 255, 0, 0.3);
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #00FF00;
    cursor: pointer;
    border: 2px solid #000;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #00FF00;
    cursor: pointer;
    border: 2px solid #000;
}

.control-group select {
    width: 100%;
    background: #000;
    color: #00FF00;
    border: 2px solid #00FF00;
    padding: 8px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    cursor: pointer;
}

.control-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.control-buttons button {
    flex: 1;
    background: #000;
    color: #00FF00;
    border: 2px solid #00FF00;
    padding: 12px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.control-buttons button:hover {
    background: #00FF00;
    color: #000;
}

.control-buttons button:active {
    transform: scale(0.95);
}

.keyboard-hints {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.6;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 0, 0.3);
    padding-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    #header {
        font-size: 14px;
        padding: 10px;
    }
    
    .header-item {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    #footer {
        font-size: 12px;
        padding: 10px;
    }
    
    .footer-left {
        font-size: 14px;
    }
    
    #control-panel {
        left: 10px;
        top: 80px;
        min-width: 280px;
        padding: 15px;
    }
    
    .scanner-readout {
        font-size: 12px;
    }
    
    #pattern-detection {
        font-size: 18px;
        bottom: 60px;
    }
    
    #warning-flash {
        font-size: 24px;
        padding: 20px 40px;
    }
}