/* --- Global Reset and Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent scrolling, as the 3D scene fills the viewport */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #E0E0FF; /* Light blue/white text color */
}

/* --- 3D Container (WebGL Canvas) --- */
#webgl-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Lower than UI overlay */
}

/* --- 2D UI Overlay (Must be on top of the 3D scene) --- */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20; /* Ensures UI is on top */
    pointer-events: none; /* Allows mouse events to pass through unless over a specific UI element */
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.4); /* Subtle transparent background */
    backdrop-filter: blur(5px);
    pointer-events: all; /* Re-enable mouse interaction for controls */
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    letter-spacing: 2px;
    color: #00FFC0; /* Cyan/Green accent for branding */
}

nav button {
    background: #00FFC0;
    color: #000020;
    border: none;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-weight: 600;
}

nav button:hover {
    background: #00E5AA;
    transform: translateY(-1px);
}

/* --- Sidebar for Controls and Exploration --- */
#sidebar {
    position: fixed;
    top: 60px; /* Below the header */
    left: 0;
    width: 300px;
    height: calc(100% - 60px);
    padding: 20px;
    background: rgba(0, 0, 20, 0.85); /* Very dark, opaque background */
    border-right: 2px solid #00FFC0;
    transition: transform 0.3s ease-in-out;
    pointer-events: all;
    overflow-y: auto;
}

#sidebar.hidden {
    transform: translateX(-100%);
}

#sidebar h3, #sidebar h4 {
    color: #FFD700; /* Gold accent for headings */
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

#sidebar label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 0.95em;
}

#sidebar input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #00FFC0;
    color: #E0E0FF;
    border-radius: 3px;
}

#sidebar button {
    width: 100%;
    padding: 10px;
    background: #00FFC0;
    color: #000020;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

#sidebar hr {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}