:root {
    --bg-color: #f8f9fa;       /* Light gray/white */
    --panel-bg: rgba(255, 255, 255, 0.8);
    --accent: #007bff;         /* Professional Blue */
    --text: #212529;           /* Dark slate */
    --border: #dee2e6;
}

html, body {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none; /* Critical for 3D on mobile */
}

body {
    margin: 0;
    background: var(--bg-color);
    color: var(--text);
    font-family: system-ui, sans-serif;
}

header-interface {
    display: block;
    position: relative;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Dialog Styling */
dialog {
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    width: 320px;
    max-width: 90vw;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* The dimming effect behind the dialog */
dialog::backdrop {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.close-btn {
    background: none;
    color: #888;
    font-size: 1.5rem;
    padding: 0;
    width: 30px;
    height: 30px;
}

checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

main-viewer {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#render-canvas {
    display: block; /* Removes weird bottom padding */
    width: 100% !important;
    height: 100% !important;
}

control-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); /* Shadow is key for light mode */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 260px;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: filter 0.2s;
}

button:hover {
    filter: brightness(0.9);
}

input[type="checkbox"] {
    accent-color: var(--accent);
}