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

body {
    font-family: 'Courier New', monospace;
    background: #0a0e1a;
    color: #ffffff;
    overflow: hidden;
    cursor: crosshair;
}

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

.control-panels {
    position: fixed;
    z-index: 100;
    pointer-events: none;
}

.panel {
    position: fixed;
    background: rgba(10, 14, 26, 0.9);
    border: 2px solid #00f5ff;
    border-radius: 8px;
    padding: 15px;
    min-width: 250px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
    pointer-events: auto;
    transition: all 0.3s ease;
}

.panel:hover {
    border-color: #8b5cf6;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

.reality-panel {
    top: 20px;
    left: 20px;
}

.view-panel {
    top: 20px;
    right: 20px;
}

.console-panel {
    bottom: 120px;
    left: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
}

.panel h3 {
    color: #00f5ff;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
    font-size: 1.1em;
}

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

.control-group label {
    display: block;
    margin-bottom: 5px;
    color: #e5e7eb;
    font-size: 0.9em;
}

.control-group input[type="range"] {
    width: 100%;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: linear-gradient(90deg, #00f5ff, #8b5cf6);
    border-radius: 2px;
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.control-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}

.control-group select {
    width: 100%;
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00f5ff;
    border-radius: 4px;
    color: #ffffff;
    font-family: inherit;
}

.control-group select option {
    background: #1a1a2e;
    color: #ffffff;
}

.glitch-btn, .cycle-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(45deg, #ff0080, #ff8000);
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.glitch-btn:hover, .cycle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
}

.cycle-btn {
    background: linear-gradient(45deg, #00f5ff, #8b5cf6);
}

.cycle-btn:hover {
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

#commandInput {
    width: 100%;
    padding: 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00f5ff;
    border-radius: 4px;
    color: #00ff00;
    font-family: inherit;
    font-size: 0.9em;
    margin-bottom: 5px;
}

#commandInput:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

#commandSuggestions {
    margin-bottom: 10px;
}

.suggestion {
    padding: 4px 8px;
    background: rgba(0, 245, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    margin-bottom: 2px;
    transition: background 0.2s ease;
}

.suggestion:hover {
    background: rgba(0, 245, 255, 0.4);
}

#consoleOutput {
    height: 120px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
    font-size: 0.8em;
    color: #00ff00;
}

.output-line {
    margin-bottom: 2px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.hdmi-label {
    position: fixed;
    bottom: 40%;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #00f5ff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    border: 1px solid #00f5ff;
    z-index: 50;
    pointer-events: none;
}

.status-panel {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid #00f5ff;
    border-radius: 20px;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
    z-index: 50;
    pointer-events: none;
}

.status-item {
    font-size: 0.8em;
    color: #e5e7eb;
}

.status-item span {
    color: #00ff00;
    font-weight: bold;
}

.footer {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7em;
    z-index: 50;
    pointer-events: none;
}

.footer a {
    color: #00f5ff;
    text-decoration: none;
}

.footer a:hover {
    text-shadow: 0 0 5px rgba(0, 245, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .panel {
        min-width: 200px;
        padding: 10px;
    }
    
    .reality-panel, .view-panel {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin: 10px;
        float: left;
        clear: both;
    }
    
    .console-panel {
        position: relative;
        bottom: auto;
        left: auto;
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .status-panel {
        flex-direction: column;
        gap: 5px;
        top: auto;
        bottom: 10px;
        left: 10px;
        transform: none;
    }
}

/* Glitch animation */
@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); }
}

.panel.glitch {
    animation: glitch 0.3s infinite;
}

/* Scan line effect */
@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f5ff, transparent);
    animation: scanline 3s linear infinite;
    z-index: 1000;
    pointer-events: none;
}

/* Particle trail effect */
@keyframes particle {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0); }
}