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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background: #000;
    cursor: crosshair;
}

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

/* HUD Panels */
.hud-panel {
    position: fixed;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(156, 39, 176, 0.3);
    font-size: 14px;
    z-index: 100;
    transition: all 0.3s ease;
}

.hud-panel:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(156, 39, 176, 0.6);
}

.top-left {
    top: 20px;
    left: 20px;
}

.bottom-right {
    bottom: 20px;
    right: 20px;
}

.bottom-right div {
    margin: 5px 0;
    opacity: 0.8;
}

#performance-monitor div {
    margin: 5px 0;
    font-family: monospace;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 30, 50, 0.95);
    color: white;
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(156, 39, 176, 0.4);
    min-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 20px 60px rgba(156, 39, 176, 0.3);
    transition: all 0.3s ease;
}

.settings-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

.settings-panel h3 {
    color: #ba68c8;
    margin-bottom: 25px;
    text-align: center;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(186, 104, 200, 0.5);
}

.setting-group {
    margin: 20px 0;
    padding: 15px;
    background: rgba(156, 39, 176, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(156, 39, 176, 0.2);
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    color: #e1bee7;
    font-weight: 500;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(156, 39, 176, 0.3);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #9c27b0, #e91e63);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(156, 39, 176, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #9c27b0, #e91e63);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(156, 39, 176, 0.5);
}

/* Color Swatches */
.color-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.swatch {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.swatch.active {
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

/* Compass */
.compass {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(156, 39, 176, 0.5);
    border-radius: 50%;
    position: relative;
    margin: 10px auto;
    background: radial-gradient(circle, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.05));
}

.compass-needle {
    position: absolute;
    top: 5px;
    left: 50%;
    width: 3px;
    height: 50px;
    background: linear-gradient(to bottom, #fff, #9c27b0);
    transform: translateX(-50%);
    border-radius: 2px;
    transform-origin: center bottom;
    box-shadow: 0 0 5px rgba(156, 39, 176, 0.7);
}

/* Buttons */
button {
    background: linear-gradient(45deg, #9c27b0, #e91e63);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    margin: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.5);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(156, 39, 176, 0.4);
}

/* Scrollbar */
.settings-panel::-webkit-scrollbar {
    width: 8px;
}

.settings-panel::-webkit-scrollbar-track {
    background: rgba(156, 39, 176, 0.1);
    border-radius: 4px;
}

.settings-panel::-webkit-scrollbar-thumb {
    background: rgba(156, 39, 176, 0.5);
    border-radius: 4px;
}

.settings-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 39, 176, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-panel {
        width: 90vw;
        padding: 20px;
        min-width: unset;
    }
    
    .hud-panel {
        padding: 10px;
        font-size: 12px;
    }
    
    .color-swatches {
        justify-content: center;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.hud-panel {
    animation: shimmer 2s infinite ease-in-out;
}

/* Purple Glow Effects */
.settings-panel::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #9c27b0, #e91e63, #3f51b5, #9c27b0);
    border-radius: 17px;
    z-index: -1;
    filter: blur(10px);
    opacity: 0.7;
    animation: shimmer 3s infinite;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(156, 39, 176, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}