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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0f;
    color: #ffffff;
    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;
}

.ui-overlay > * {
    pointer-events: auto;
}

/* Shape Title */
.shape-title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 300;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* Control Panels */
.controls-panel {
    position: absolute;
    bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.controls-left {
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controls-right {
    right: 30px;
}

/* Control Groups */
.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.switch-label {
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 80px;
}

/* Switch Styling */
.switch {
    position: relative;
    width: 50px;
    height: 25px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Shape Button */
.shape-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px 25px;
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shape-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.button-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Advanced Controls */
.advanced-controls {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
}

.toggle-advanced {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-advanced:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.advanced-panel {
    display: none;
    position: absolute;
    right: 60px;
    top: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    min-width: 250px;
}

.parameter-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.param-group label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

.param-slider {
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

.param-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.param-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .shape-title {
        font-size: 1.8rem;
        padding: 10px 20px;
        top: 20px;
    }
    
    .controls-panel {
        bottom: 20px;
        padding: 15px;
    }
    
    .controls-left {
        left: 20px;
    }
    
    .controls-right {
        right: 20px;
    }
    
    .advanced-controls {
        right: 20px;
    }
    
    .advanced-panel {
        min-width: 200px;
        right: 55px;
    }
}

/* Glow Effects */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.shape-button:focus,
.toggle-advanced:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}

/* Smooth transitions for all interactive elements */
* {
    transition: opacity 0.3s ease, transform 0.3s ease;
}