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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    overflow: hidden;
    background: linear-gradient(to bottom, #e0e8f0, #ffffff);
}

#scene-container {
    width: 100vw;
    height: 100vh;
}

/* Custom toggle switch */
input[type="checkbox"].toggle {
    appearance: none;
    width: 48px;
    height: 24px;
    background: #4b5563;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="checkbox"].toggle:checked {
    background: #3b82f6;
}

input[type="checkbox"].toggle::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

input[type="checkbox"].toggle:checked::before {
    transform: translateX(24px);
}

/* Custom range slider */
input[type="range"] {
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #4b5563;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: all 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

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

/* Select styling */
select {
    cursor: pointer;
    border: none;
    outline: none;
}

select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Button hover effects */
button {
    transition: all 0.2s;
}

button:active {
    transform: scale(0.98);
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(10px)) {
    #control-panel,
    #info-card {
        backdrop-filter: blur(10px);
    }
}

/* Smooth transitions */
.hidden {
    display: none !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    #control-panel {
        left: 50%;
        transform: translateX(-50%);
        max-width: 90vw;
        bottom: 1rem;
    }
    
    #info-card {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    #easter-egg {
        max-width: 90vw;
        padding: 1.5rem;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}