        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background-color: #f8f9fa;
            color: #333;
            padding: 20px;
            margin: 0;
        }
        .app-wrapper {
            display: flex;
            flex-direction: row;
            gap: 25px;
            width: 100%;
            max-width: 1600px;
            margin: 0 auto;
            align-items: flex-start;
        }
        .controls-panel, .plots-panel {
            background-color: #fff;
            padding: 25px 35px;
            border-radius: 12px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
        }
        .controls-panel {
            flex: 0 0 400px;
            display: flex;
            flex-direction: column;
            text-align: center;
        }
        .plots-panel {
            flex: 1 1 auto;
            text-align: center;
        }
        h1, h2 {
            color: #2c3e50;
            font-weight: 600;
        }
        h2 {
            margin-top: 25px;
            margin-bottom: 0;
            border-bottom: 2px solid #e9ecef;
            padding-bottom: 8px;
        }

        /* Layout for physiological ion/anion parameters section */
        .ion-parameters-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 20px;
        }
        @media (max-width: 768px) {
            .ion-parameters-grid {
                grid-template-columns: 1fr;
            }
        }
        .controls {
            display: grid;
            grid-template-columns: 1fr;
            gap: 18px;
            margin-top: 20px;
            padding: 20px;
            background-color: #f1f3f5;
            border-radius: 8px;
            text-align: left;
        }
        .control-group {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
        }
        .control-group label, .channel-toggle label[for] {
            font-weight: 500;
            color: #555;
            width: 100%;
            text-align: left;
        }
        .control-group > div {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
        }
        input[type="range"] {
            flex-grow: 1;
            cursor: pointer;
        }
        .value-display {
            font-weight: bold;
            color: #007bff;
            min-width: 65px;
            text-align: center;
            background-color: #e9ecef;
            padding: 2px 5px;
            border-radius: 4px;
            font-size: 0.9em;
        }

        /* Slider container for ion channel activity controls */
        .channel-slider {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
        }
        .channel-slider input[type="range"] {
            flex-grow: 1;
        }
        .chart-container {
            position: relative;
            height: 280px;
            width: 100%;
            margin-top: 15px;
        }
        .description {
            margin-top: 30px;
            text-align: left;
            border-top: 1px solid #e0e0e0;
            padding-top: 20px;
        }
        .credits {
            margin-top: 25px;
            text-align: center;
            font-size: 0.9em;
            color: #888;
        }
        .action-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 10px;
        }
        .action-buttons button {
            padding: 10px 20px;
            border: none;
            background-color: #007bff;
            color: white;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 500;
            transition: background-color 0.3s;
            font-size: 1em;
        }
        .action-buttons button:hover {
            background-color: #0056b3;
        }
        .action-buttons button#resetBtn {
            background-color: #6c757d;
        }
        .action-buttons button#resetBtn:hover {
            background-color: #5a6268;
        }

        /* --- Toggle Switch Styles --- */
        .channel-toggle {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            padding: 5px 0;
        }
        .switch {
            position: relative;
            display: inline-block;
            width: 40px;
            height: 20px;
        }
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 20px;
        }
        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        input:checked + .slider {
            background-color: #28a745;
        }
        input:checked + .slider:before {
            transform: translateX(20px);
        }

        /* --- START: NEW PLOT BUTTON STYLES --- */
        .plot-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 15px;
        }
        .plot-actions button {
            padding: 8px 16px;
            border: 1px solid #ddd;
            background-color: #f8f9fa;
            color: #333;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 500;
            transition: background-color 0.3s, border-color 0.3s;
            font-size: 0.9em;
        }
        .plot-actions button:hover {
            background-color: #e9ecef;
            border-color: #ccc;
        }
        /* --- END: NEW PLOT BUTTON STYLES --- */
        
        /* --- START: COLLAPSIBLE PANEL STYLES --- */
        .collapsible-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            padding: 10px 15px;
            background-color: #e9ecef;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            margin-bottom: 10px;
            transition: background-color 0.3s;
        }
        .collapsible-header:hover {
            background-color: #dee2e6;
        }
        .collapsible-header h2 {
            margin: 0;
            color: #2c3e50;
            font-weight: 600;
            border: none;
            padding: 0;
        }
        .collapsible-icon {
            font-size: 1.2em;
            color: #6c757d;
            transition: transform 0.3s;
        }
        .collapsible-icon.collapsed {
            transform: rotate(-90deg);
        }
        .collapsible-content {
            overflow: hidden;
            transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
            max-height: 2000px;
            opacity: 1;
        }
        .collapsible-content.collapsed {
            max-height: 0;
            opacity: 0;
        }
        .controls-panel.collapsed .collapsible-content {
            display: none;
        }
        /* --- END: COLLAPSIBLE PANEL STYLES --- */
        
        /* Legends for global behavior plots */
        .phase-legend {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 8px;
            margin-top: 5px;
            font-size: 0.8em;
        }
        .phase-legend .legend-item {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 2px 6px;
            border-radius: 4px;
            background-color: #f7f7f7;
            border: 1px solid #ddd;
        }
        .phase-legend .color-box {
            width: 12px;
            height: 12px;
            border-radius: 2px;
        }
