/* Window Functions & Spectral Leakage - Dark Engineering Theme */

.window-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 12px;
    padding: 12px;
    background: #1a1a1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 640px;
    height: 670px;
    max-width: 900px;
}

.window-sidebar {
    grid-column: 1;
    grid-row: 1 / -1;
    background: #252525;
    border-radius: 8px;
    padding: 14px;
    overflow-y: auto;
    height: 640px; 
}

.window-sidebar h3 {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #00d4aa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.window-control-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.window-control-row label {
    font-size: 11px;
    min-width: 70px;
    color: #aaa;
}

.window-control-row input[type="range"] {
    flex: 1;
    height: 4px;
    width: 50px;
    background: #444;
    border-radius: 2px;
    outline: none;
}

.window-control-row input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #00d4aa;
    border-radius: 50%;
    cursor: pointer;
}

.window-control-row input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #00d4aa;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.window-value {
    flex-shrink: 0;
    min-width: 48px;
    font-size: 11px;
    color: #fff;
    text-align: right;
}

.window-control-row select {
    flex: 1;
    padding: 4px 6px;
    background: #333;
    color: #eee;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 11px;
}

.window-presets {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.window-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    background: #333;
    color: #00d4aa;
    transition: background 0.2s;
}

.window-btn:hover {
    background: #3a3a3a;
}

.window-btn.active {
    background: #00d4aa;
    color: #1a1a1a;
}

.window-metrics {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #444;
}

.window-metrics h3 {
    margin-bottom: 8px;
}

.window-metric-row {
    font-size: 11px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.window-metric-label {
    color: #888;
}

.window-metric-value {
    color: #fff;
    font-weight: 600;
}

.window-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.window-toggle-row input[type="checkbox"] {
    accent-color: #00d4aa;
    cursor: pointer;
}

#freq-row.disabled,
#beta-row.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.window-main {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.window-plot-box {
    background: #252525;
    border-radius: 8px;
    padding: 10px;
    min-height: 180px;
}

.window-plot-box h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #00d4aa;
}

#timeCanvas, #freqCanvas {
    display: block;
    width: 100%;
    height: 220px;
    background: #1e1e1e;
    border-radius: 4px;
}

.window-formula-panel {
    background: #252525;
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid #333;
}

.window-formula-panel h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #00d4aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.window-formula-equation {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #e0e0e0;
    margin-bottom: 8px;
    line-height: 1.5;
    word-break: break-all;
}

.window-formula-desc {
    font-size: 13px;
    color: #bbb;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 700px) {
    .window-container {
        grid-template-columns: 1fr;
    }
    .window-sidebar {
        grid-row: auto;
    }
}
