/* Nyquist simulator page styles */
.main-content {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.page-header {
    width: 100%;
    text-align: center;
    margin: 10px auto 25px;
}

.page-header h1 {
    color: #0f172a;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 650px;
}

/* =========================================
   Nyquist UI Components
   ========================================= */

.nyquist-card,
.nyquist-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.nyquist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.nyquist-ctrl {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
}

/* Slider Customization */
.nyquist-ctrl input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: calc(100% + 16px);
    margin: 8px -8px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.nyquist-ctrl input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 9999px;
    margin: 0 8px;
}

.nyquist-ctrl input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    margin-top: -5px;
    cursor: pointer;
}

.nyquist-ctrl input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 9999px;
    margin: 0 8px;
}

.nyquist-ctrl input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

/* Dropdowns & Labels */
.nyquist-ctrl label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.nyquist-select {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px;
    font-size: 12px;
    background: #fff;
    outline: none;
}

.nyquist-badge {
    background: #e2e8f0;
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    width: 65px;
    text-align: right;
    outline: none;
    box-sizing: border-box;
}

input.nyquist-badge::-webkit-inner-spin-button,
input.nyquist-badge::-webkit-outer-spin-button {
    opacity: 1;
}

/* Metrics Bar */
.nyquist-metrics-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.nyquist-metric-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nyquist-metric-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.5px;
}

.nyquist-metric-val {
    font-size: 15px;
    font-family: monospace;
    font-weight: 700;
}

.nyquist-metric-detail {
    font-size: 10px;
    color: #94a3b8;
}

/* Toolbar Controls */
.nyquist-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.nyquist-btn {
    background: #fff;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
}

.nyquist-btn:hover,
.nyquist-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Scrollable Graph Area */
.nyquist-scroll {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.nyquist-scroll::-webkit-scrollbar {
    height: 8px;
}

.nyquist-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

canvas {
    display: block;
    background: #fff;
}

/* =========================================
   Learning Panel
   ========================================= */

.learning-panel {
    margin-top: 25px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.learning-panel h2 {
    text-align: center;
    color: #0f172a;
    font-size: 21px;
    margin: 0 0 22px;
}

.learning-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.learning-grid article {
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #2563eb;
    border-radius: 9px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learning-grid article:nth-child(2) {
    border-top-color: #7c3aed;
}

.learning-grid article:nth-child(3) {
    border-top-color: #16a34a;
}

.learning-grid article:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
}

.learning-grid h3 {
    color: #1e293b;
    font-size: 15px;
    margin: 0 0 10px;
}

.learning-grid p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}

.technical-note {
    margin-top: 20px;
    padding: 15px 18px;
    background: #f1f5f9;
    border-left: 4px solid #64748b;
    border-radius: 6px;
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
}

.technical-note strong {
    color: #1e293b;
}

@media (max-width: 700px) {
    .learning-grid {
        grid-template-columns: 1fr;
    }
    .learning-panel {
        padding: 16px;
    }
}

/* =========================================
   Footer Formatting
   ========================================= */

footer {
    position: absolute; 
    left: 0;
    right: 0;
    margin-top: 60px;
    background-color: #3b0799;
    border-top: 1px solid #e2e8f0; 
    padding: 24px 0;
}

.footer-container {
    text-align: center;
    width: 100%;
}

.footer-links {
    display: inline-block;
    text-align: center;
    color: #ffffff; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px; 
    font-weight: 600; 
}

.footer-links a {
    color: #ffffff; 
    text-decoration: none;
    padding: 0 15px; 
    transition: opacity 0.15s ease; 
}

.footer-links a:hover {
    opacity: 0.8; 
}