/* FitzHugh–Nagumo simulation – local styles, no global collision */

#content_sim {
    overflow: visible;
}

#content_sim .fhn-lab {
    font-family: 'Courier New', monospace;
    max-width: 800px;
    margin: 0 auto;
    background: #0a0a0a;
    color: #ddd;
    padding: 12px;
    box-sizing: border-box;
    overflow: visible;
}

#content_sim .fhn-lab * {
    box-sizing: border-box;
}

#content_sim .fhn-split {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 800px;
    min-height: 270px;
}

#content_sim .fhn-panel {
    flex: 1;
    min-width: 0;
    min-height: 260px;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    overflow: visible;
}

#content_sim .fhn-lab .fhn-panel.spike {
    border-color: #f84;
    box-shadow: 0 0 12px rgba(255, 136, 68, 0.4);
}

#content_sim .fhn-panel h3 {
    margin: 0;
    padding: 6px 10px;
    font-size: 12px;
    color: #8cf;
    border-bottom: 1px solid #333;
    font-weight: normal;
}

#content_sim .fhn-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 240px;
}

#content_sim .fhn-canvas-wrap canvas {
    display: block;
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #444;
}

/* Phase plane height – overridden by JS PHASE_PLOT_HEIGHT; keep as fallback */
#content_sim .fhn-panel:first-child .fhn-canvas-wrap canvas {
    height: 240px;
}

/* Time series (v, w) plot height – overridden by JS TIME_PLOT_HEIGHT; keep as fallback */
#content_sim .fhn-timeseries-main {
    height: 180px;
}

#content_sim .fhn-timeseries-main canvas {
    height: 180px;
}

/* Impulse (stimulus I) plot height – overridden by JS INPUT_PLOT_HEIGHT; keep as fallback */
#content_sim .fhn-timeseries-input {
    height: 50px;
    border-top: 1px solid #333;
}

#content_sim .fhn-timeseries-input canvas {
    height: 50px;
}

#content_sim .fhn-controls {
    margin-top: 12px;
    padding: 12px;
    background: #141414;
    border: 1px solid #333;
    border-radius: 6px;
    max-width: 800px;
}

#content_sim .fhn-controls .fhn-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

#content_sim .fhn-controls .fhn-row:last-child {
    margin-bottom: 0;
    justify-content: center;
}

#content_sim .fhn-controls label {
    min-width: 80px;
    font-size: 12px;
    color: #aaa;
}

#content_sim .fhn-controls input[type="range"] {
    width: 100px;
    accent-color: #4a9eff;
}

#content_sim .fhn-controls .fhn-val {
    min-width: 48px;
    font-size: 12px;
    color: #0cf;
}

#content_sim .fhn-controls select {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 4px 8px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    min-width: 140px;
}

#content_sim .fhn-controls #fhn-preset {
    min-width: 165px;
}

#content_sim .fhn-controls .fhn-btn {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 6px 12px;
    background: #1a2a3a;
    color: #8cf;
    border: 1px solid #4a9eff;
    border-radius: 4px;
    cursor: pointer;
}

#content_sim .fhn-controls .fhn-btn:hover {
    background: #243a4a;
}

#content_sim .fhn-controls .fhn-btn.danger {
    border-color: #c44;
    color: #f88;
}

#content_sim .fhn-controls .fhn-btn.danger:hover {
    background: #3a2020;
}

