/* --- Layout Overrides --- */
@media (min-width: 900px) {
    .module-layout {
        grid-template-columns: 260px 1fr !important; 
        gap: 2rem !important;
    }
}

/* --- Canvas Container --- */
.canvas-container {
    position: relative;
    width: 100%;
    height: 500px; 
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Sidebar Styling --- */
.data-sidebar {
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    padding-top: 2rem;
    gap: 1.5rem;
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

.data-card {
    background: rgba(255,255,255,0.92);
    padding: 1rem 1.2rem; 
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    backdrop-filter: blur(8px);
}

.data-card h3 {
    margin: 0 0 0.8rem 0;
    font-size: 1rem; 
    color: var(--primary);
    border-bottom: 2px solid rgba(59, 89, 152, 0.1);
    padding-bottom: 0.4rem;
}

.data-stack {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.8rem;
}
.data-stack:last-child { margin-bottom: 0; }

.data-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.data-val {
    align-self: flex-end; 
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.1rem; 
}

/* Buttons */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: auto; 
}

.action-btn {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-btn:hover { transform: translateY(-2px); }
.action-btn:active { transform: scale(0.98); }

.action-btn.primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.action-btn.secondary {
    background: #fff;
    color: var(--text-light);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.action-btn.secondary:hover { color: #e74c3c; border-color: rgba(231, 76, 60, 0.3); }


/* --- Controls --- */
.ui-layer {
    position: absolute;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10;
    pointer-events: none;
}

.panel-bottom {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
    border-top: 1px solid rgba(255,255,255,0.8);
    
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.control-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.slider-col { flex-grow: 1; }

.slider-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.slider-compact label { min-width: 60px; }

.val-tiny {
    font-family: 'Roboto Mono';
    font-size: 0.8rem;
    min-width: 45px;
    text-align: right;
    color: var(--text-main);
}

.panel-divider {
    width: 1px;
    height: 70px;
    background: rgba(0,0,0,0.1);
}

input[type=range] {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 5px; 
    background: #cbd5e0;
    border-radius: 3px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); 
    transition: transform 0.1s;
    margin-top: -5px; 
}

input[type=range]::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }