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

body {
    font-family: 'Orbitron', sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
}

#scene-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loading-content {
    text-align: center;
}

.circuit-loader {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 51, 204, 0.3);
    border-top: 3px solid #FF33CC;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    letter-spacing: 2px;
    color: #FF33CC;
    margin-bottom: 20px;
}

.dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 51, 204, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF33CC, #33CCFF);
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Header */
.app-header {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 51, 204, 0.3);
    z-index: 100;
}

.title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(90deg, #FF33CC, #33CCFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* Control Panel */
.control-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 51, 204, 0.3);
    width: 320px;
    z-index: 100;
}

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

.control-label {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    font-weight: 700;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.slider-marker {
    font-size: 9px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    min-width: 70px;
}

.slider-marker:last-child {
    text-align: right;
}

.slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #FF33CC, #33CCFF);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 51, 204, 0.8);
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(255, 51, 204, 0.8);
}

.color-preview {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #FF33CC, #33CCFF);
}

.speed-value {
    text-align: center;
    font-size: 14px;
    color: #33CCFF;
    font-family: 'Roboto Mono', monospace;
}

/* Preset Buttons */
.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.preset-btn {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.preset-btn.energetic:hover { border-color: #FF33CC; color: #FF33CC; }
.preset-btn.meditative:hover { border-color: #33CCFF; color: #33CCFF; }
.preset-btn.spectrum:hover { border-color: #9933FF; color: #9933FF; }
.preset-btn.focused:hover { border-color: #FF66FF; color: #FF66FF; }

/* View Controls */
.view-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.view-btn {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #33CCFF;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    cursor: pointer;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Info Panel */
.info-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(51, 204, 255, 0.3);
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    z-index: 100;
    transition: opacity 0.3s;
}

.info-panel.hidden .info-content {
    display: none;
}

.info-toggle {
    cursor: pointer;
    font-size: 20px;
    margin-bottom: 10px;
}

.stat-line {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    gap: 20px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
}

.stat-value {
    color: #33CCFF;
}

/* Footer */
.app-footer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.footer-link {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-link:hover {
    color: #FF33CC;
    text-shadow: 0 0 10px rgba(255, 51, 204, 0.8);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .app-header {
        top: 10px;
        left: 10px;
        padding: 10px 15px;
    }
    
    .title {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 10px;
    }
    
    .control-panel {
        top: auto;
        bottom: 60px;
        right: 10px;
        left: 10px;
        width: auto;
        transform: none;
        padding: 15px;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .info-panel {
        left: 10px;
        bottom: 10px;
        font-size: 10px;
        padding: 10px;
    }
    
    .app-footer {
        right: 10px;
        bottom: 10px;
    }
}