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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow: hidden;
    position: relative;
}

#header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px 20px;
}

#header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 14px;
    opacity: 0.8;
    color: #cccccc;
}

#controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 280px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 100%);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
    font-size: 16px;
    padding: 12px 20px;
}

.btn.primary:hover {
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.4);
}

label {
    font-size: 14px;
    font-weight: 500;
    color: #cccccc;
    min-width: 60px;
}

input[type="range"] {
    flex: 1;
    min-width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
}

select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

select option {
    background: #1a1a2e;
    color: white;
}

input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

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

.settings-panel {
    position: absolute;
    top: 120px;
    right: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    min-width: 280px;
    transition: all 0.3s ease;
}

.settings-panel.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

#footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 15px;
}

#footer a {
    color: #00ffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

#footer a:hover {
    color: #ff00ff;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #controls {
        position: relative;
        top: auto;
        right: auto;
        margin: 20px;
        width: calc(100% - 40px);
        min-width: auto;
    }
    
    #header {
        position: relative;
        top: auto;
        left: auto;
        margin: 20px 20px 0 20px;
        text-align: center;
    }
    
    .settings-panel {
        position: relative;
        top: auto;
        right: auto;
        margin: 20px;
        width: calc(100% - 40px);
        min-width: auto;
    }
    
    #scene-container {
        height: 60vh;
        position: relative;
    }
    
    body {
        overflow-y: auto;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn.primary:hover {
    animation: pulse 1s infinite;
}

/* Custom scrollbar for mobile */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
}