/* ==========================================================================
   GYANSOPAN AI STUDIO – MODERN REFRESH
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(145deg, #e8f0fe 0%, #d4e0f0 100%);
    color: #1e293b;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================================================
   SIDEBAR – CLEAN CARD STYLE
   ========================================================================== */
.sidebar {
    width: 360px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-right: 1px solid #cbd5e1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c2410c, #9a3412);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 0 0.25rem 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #c2410c;
    margin: 0 0 0.5rem 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 0.5rem 0;
}

/* ==========================================================================
   FORM ELEMENTS, TABS, & BUTTONS
   ========================================================================== */
select, input, button {
    padding: 0.6rem 0.8rem;
    background: white;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

select:focus, input:focus {
    border-color: #c2410c;
    box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.2);
}

/* Tab Navigation buttons */
.tab-btn {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    font-weight: 600;
    cursor: pointer;
}

.tab-btn:hover {
    background-color: #e2e8f0;
    transform: translateY(-1px);
}

.tab-active {
    background-color: #c2410c;
    border-color: #c2410c;
    color: white;
}

.tab-active:hover {
    background-color: #9a3412;
}

/* Range Sliders custom styling */
input[type="range"] {
    padding: 0;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #c2410c;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    border: none;
}

input[type="range"]:focus::-webkit-slider-runnable-track {
    background: #cbd5e1;
}

/* ==========================================================================
   ENVIRONMENT CHECKBOX CONTAINERS
   ========================================================================== */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #c2410c;
    margin: 0;
}

/* Conic section display (if present) */
#conicLabel {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fef3c7;
    border-radius: 12px;
    text-align: center;
}

/* Utility Helpers */
.hidden {
    display: none !important;
}

/* ==========================================================================
   MAIN VIEWPORT – CLEAN CANVAS
   ========================================================================== */
.viewport-container {
    flex-grow: 1;
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    margin: 12px 12px 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

#canvas3d {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 700px) {
    .sidebar {
        width: 280px;
        padding: 1rem;
    }
    h2 {
        font-size: 1.3rem;
    }
    .viewport-container {
        margin: 8px;
        border-radius: 16px;
    }
}