/* Shared design system loaded via shared.css */

:root {
            --bg-dark: #11111b;
            --bg-panel: #1e1e2e;
            --bg-input: #313244;
            --text-main: #cdd6f4;
            --text-muted: #a6adc8;
            --color-signal: #89b4fa;
            /* Blue */
            --color-samples: #f9e2af;
            /* Yellow */
            --color-alias: #f38ba8;
            /* Pink/Red */
            --color-grid: #45475a;
            --color-nyquist: rgba(166, 227, 161, 0.15);
            /* Greenish shading */
            --color-nyquist-border: #a6e3a1;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--bg-dark);
            color: var(--text-main);
            margin: 0;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        h1 {
            color: var(--color-signal);
            margin-bottom: 5px;
            text-align: center;
        }

        .subtitle {
            color: var(--text-muted);
            margin-bottom: 20px;
            font-size: 15px;
            text-align: center;
        }

        .dashboard {
            display: flex;
            gap: 20px;
            max-width: 1200px;
            width: 100%;
            flex-wrap: wrap;
            justify-content: center;
        }

        .panel {
            background-color: var(--bg-panel);
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            border: 1px solid var(--bg-input);
        }

        .controls-panel {
            flex: 1;
            min-width: 320px;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .input-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        label {
            color: var(--text-main);
            font-weight: bold;
            font-size: 15px;
            display: flex;
            justify-content: space-between;
        }

        input[type="range"] {
            width: 100%;
            cursor: pointer;
            accent-color: var(--color-signal);
        }

        .metrics-box {
            background-color: var(--bg-dark);
            padding: 15px;
            border-radius: 8px;
            font-size: 15px;
            line-height: 1.6;
            border-left: 4px solid var(--color-signal);
            margin-top: auto;
        }

        .highlight-sig {
            color: var(--color-signal);
            font-weight: bold;
        }

        .highlight-samp {
            color: var(--color-samples);
            font-weight: bold;
        }

        .highlight-alias {
            color: var(--color-alias);
            font-weight: bold;
        }

        .visual-panel {
            flex: 2;
            display: flex;
            flex-direction: column;
            gap: 15px;
            min-width: 600px;
            align-items: center;
        }

        .canvas-container {
            background-color: var(--bg-dark);
            padding: 15px;
            border-radius: 8px;
            border: 1px solid var(--color-grid);
            width: 100%;
            box-sizing: border-box;
            position: relative;
        }

        .canvas-title {
            position: absolute;
            top: 20px;
            left: 20px;
            font-weight: bold;
            color: var(--text-muted);
            background: rgba(17, 17, 27, 0.8);
            padding: 2px 8px;
            border-radius: 4px;
        }

        canvas {
            width: 100%;
            height: 250px;
            /* Adjusted to fit two canvases nicely */
            display: block;
            background-color: #000;
            border-radius: 4px;
        }

        .legend {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 5px;
            font-size: 13px;
            font-weight: bold;
            flex-wrap: wrap;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .color-box {
            width: 14px;
            height: 14px;
            border-radius: 3px;
        }




/* Ensure the body allows absolute positioning */



/* ================================================================
   DESIGN SYSTEM OVERRIDE — Applied via shared.css variables
   These overrides unify all pages to the shared dark-lab aesthetic
   ================================================================ */

/* Reset old colors to use CSS variables from shared.css */
body {
  font-family: var(--font-sans) !important;
  background-color: var(--bg) !important;
  color: var(--text-primary) !important;
  padding-top: 72px !important;
}

h1, h2, h3 {
  font-family: var(--font-mono) !important;
}

h1 { color: var(--text-primary) !important; }
h2 { color: var(--cyan) !important; }

/* Panel backgrounds */
.controls-panel, .panel, .dashboard > *, .grid-container > *,
.info-panel, .visualizer-panel, aside, section.panel {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-panel) !important;
  color: var(--text-primary) !important;
}

.panel-header, header.panel-header {
  background: var(--panel-2) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 12px 16px !important;
}

/* Inputs */
input[type="text"], input[type="number"], select, textarea {
  background: var(--bg-2) !important;
  border: 1px solid var(--border-2) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-mono) !important;
  border-radius: var(--radius-sm) !important;
}

label {
  color: var(--text-secondary) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

/* Buttons */
button {
  font-family: var(--font-mono) !important;
  border-radius: var(--radius-sm) !important;
}

/* Canvas containers */
.canvas-container, .canvas-wrapper {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
}

/* Metrics / data boxes */
.metrics-box, .data-box, .explanation-panel,
.instruction-box, .dynamic-explanation {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
}

/* Highlights */
.highlight, .highlight-k { color: var(--amber) !important; }
span[style*="color: #89b4fa"], .text-blue { color: var(--cyan) !important; }

/* Subtitles */
.subtitle, .page-subtitle, p.subtitle {
  color: var(--text-secondary) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.82rem !important;
}

/* Fix dashboard flex → still works but adds top padding spacing */
.dashboard {
  padding-top: 8px;
}

/* ── SCROLL & HOME-BTN FIX ── */
body {
  padding: 72px 20px 20px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  font-family: var(--font-sans) !important;
  background: var(--bg) !important;
  color: var(--text-primary) !important;
}
h1 { color: var(--cyan) !important; font-family: var(--font-mono) !important; }
.panel {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-panel) !important;
}
canvas { max-width: 100% !important; }
@media (max-width: 900px) {
  .dashboard { flex-direction: column !important; }
  .controls-panel { min-width: 0 !important; width: 100% !important; }
}

