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

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

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

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

#control-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 20, 0.9);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 20px;
    min-width: 320px;
    pointer-events: auto;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.panel-header h2 {
    color: #00ffff;
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 2px;
}

.connection-status {
    color: #00ff41;
    font-size: 12px;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.control-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    color: #00ffff;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-bar {
    flex: 1;
    height: 20px;
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid #00ffff;
    border-radius: 4px;
    overflow: hidden;
}

.status-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff41, #00ffff);
    width: 96%;
    transition: width 0.3s ease;
    animation: pulse 2s infinite;
}

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

#speed-slider {
    background: rgba(0, 255, 255, 0.2);
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

#speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
}

#speed-value {
    color: #00ff41;
    font-size: 12px;
}

.tower-controls, .view-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tower-btn, .view-controls button {
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    transition: all 0.3s ease;
}

.tower-btn:hover, .view-controls button:hover {
    background: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.tower-btn.active {
    background: #00ffff;
    color: #000011;
}

#info-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 20, 0.9);
    border: 2px solid #00ff41;
    border-radius: 10px;
    padding: 20px;
    min-width: 320px;
    pointer-events: auto;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.tesla-quote {
    color: #00ff41;
    font-style: italic;
    text-align: center;
    margin-bottom: 15px;
    font-size: 12px;
    line-height: 1.4;
    transition: opacity 0.5s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    color: #00ffff;
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    color: #00ff41;
    font-size: 16px;
    font-weight: bold;
}

#easter-egg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 20, 0.95);
    border: 2px solid #ffff00;
    border-radius: 10px;
    padding: 20px;
    color: #ffff00;
    font-size: 18px;
    text-align: center;
    pointer-events: auto;
    animation: float 2s ease-in-out infinite;
    z-index: 100;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
}

.hidden {
    display: none !important;
}

footer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 20;
    pointer-events: auto;
}

.footer-link {
    color: #00ffff;
    text-decoration: none;
    font-size: 12px;
    background: rgba(0, 0, 20, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #00ffff;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.footer-link:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    text-shadow: 0 0 5px #00ffff;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #control-panel, #info-panel {
        left: 10px;
        right: 10px;
        min-width: auto;
        width: calc(100% - 20px);
    }
    
    #control-panel {
        top: 10px;
    }
    
    #info-panel {
        bottom: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tower-controls {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    #control-panel, #info-panel {
        font-size: 11px;
        padding: 15px;
    }
    
    .tesla-quote {
        font-size: 11px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}