/* Basic reset to remove default browser styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    --slider-knob-width: 5px !important;
    --number-color: #000 !important;
    --text-color: #000 !important;
    --widget-color: #fff !important;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevents scrollbars */
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

html {
    background-color: #f9f9f3;
}

body {
    background-color: transparent;
}

/* Canvas styles */
#gl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    display: block;
}

/* ✨ Pure Black & White GUI Theme */
.lil-gui.root {
    position: fixed !important;
    top: 1.5rem;
    right: 1.5rem !important;
    left: auto !important;
    z-index: 10;
    
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    border: 2px solid #000;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);

    --background-color: #fff !important;
    --title-background-color: #000 !important;
    --title-text-color: #fff !important;
    --widget-color: #fff !important;
    --hover-color: #f0f0f0 !important;
    --focus-color: #e0e0e0 !important;
    --number-color: #000 !important;
    --string-color: #000 !important;
    --font-size: 12px !important;
    --input-font-size: 12px !important;
    --font-mono: 'Monaco', 'Consolas', 'Courier New', monospace !important;
    --padding: 8px !important;
    --spacing: 8px !important;
    --widget-height: 22px !important;
    --name-width: 45% !important;
}

.lil-gui .title {
    background-color: #000 !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lil-gui .controller > .name {
    color: #000 !important;
    font-weight: 500;
    font-size: 11px !important;
}

.lil-gui .controller.number input,
.lil-gui .controller.string input {
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
}

/* Sliders */
.lil-gui .controller.number .slider {
    background-color: #e0e0e0 !important;
    border-radius: 2px;
    cursor: ew-resize;
    height: 4px !important;
}

/* ✨ FIX: Slider knob is now white with a black border */
.lil-gui .controller.number input[type="range"]::-webkit-slider-thumb {
    background: #fff !important;
    border: 2px solid #000 !important;
    border-radius: 50%;
    cursor: ew-resize;
    width: 14px !important;
    height: 14px !important;
    margin-top: -5px !important; /* Vertically center the larger knob */
}

.lil-gui .controller.number input[type="range"]::-moz-range-thumb {
    background: #fff !important;
    border: 2px solid #000 !important;
    border-radius: 50%;
    cursor: ew-resize;
    width: 14px !important;
    height: 14px !important;
}


/* Buttons */
.lil-gui .controller.function .widget {
    background-color: #fff !important;
    border: 2px solid #000 !important;
    color: #000 !important; /* ✨ FIX: Ensure button text is black */
    font-weight: 600 !important;
    text-align: center;
    width: 100% !important;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.1s ease-in-out;
}

.lil-gui .controller.function:hover .widget {
    background-color: #000 !important;
    color: #fff !important;
}

/* Color picker */
.lil-gui .controller.color .display {
    border: 2px solid #000 !important;
    border-radius: 2px;
}

.lil-gui .children {
    background-color: #fff !important;
    border-left: 2px solid #000;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
}

/* ✨ FIX: Scrollbar is thicker and black */
.lil-gui .children::-webkit-scrollbar {
    width: 12px;
}
.lil-gui .children::-webkit-scrollbar-track {
    background: #f0f0f0;
}
.lil-gui .children::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 0;
}
.lil-gui .children::-webkit-scrollbar-thumb:hover {
    background: #333;
}