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

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

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

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

#scene-container canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#terminal-header {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

#terminal-footer {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

.header-left, .header-right, .footer-left, .footer-right {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 5px #00FF00;
}

#status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.status-playing {
    background: #00FF00;
    color: #00FF00;
}

.status-paused {
    background: #FF0000;
    color: #FF0000;
}

#control-panel {
    position: absolute;
    top: 50px;
    right: 10px;
    width: 280px;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    z-index: 200;
}

#control-panel.collapsed {
    transform: translateX(calc(100% - 40px));
}

#panel-toggle {
    position: absolute;
    left: -30px;
    top: 10px;
    width: 30px;
    height: 30px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #00FF00;
    transition: background 0.2s ease;
}

#panel-toggle:hover {
    background: #333;
}

.panel-content {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.control-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.control-section:last-child {
    border-bottom: none;
}

.control-section h3 {
    color: #00FF00;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shape-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 10px;
}

.shape-btn {
    background: #1a1a1a;
    color: #ccc;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.shape-btn:hover {
    background: #2a2a2a;
    color: #00FF00;
    border-color: #00FF00;
}

.shape-btn.active {
    background: #00FF00;
    color: #000;
    border-color: #00FF00;
}

.retro-btn {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    color: #00FF00;
    border: 1px solid #00FF00;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 5px 5px 5px 0;
    transition: all 0.2s ease;
}

.retro-btn:hover {
    background: linear-gradient(145deg, #00FF00, #00CC00);
    color: #000;
    box-shadow: 0 0 10px #00FF00;
}

input[type="range"] {
    width: 100%;
    margin: 5px 0;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #00FF00;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #00FF00;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="text"], select {
    width: 100%;
    background: #1a1a1a;
    color: #00FF00;
    border: 1px solid #444;
    padding: 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin: 5px 0;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #00FF00;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

label {
    display: block;
    color: #ccc;
    font-size: 12px;
    margin: 8px 0 4px 0;
}

/* Scrollbar styling */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.panel-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Scanline effect (optional) */
#scene-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 50;
}

/* Responsive design */
@media (max-width: 768px) {
    #control-panel {
        width: 250px;
        top: 60px;
    }
    
    .shape-grid {
        grid-template-columns: 1fr;
    }
    
    #terminal-header, #terminal-footer {
        font-size: 12px;
    }
}