        :root {
            --primary-color: #2c7da0;
            --secondary-color: #a9d6e5;
            --accent-color: #01497c;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --chemistry-green: #4caf50;
            --chemistry-blue: #2196f3;
            --chemistry-red: #f44336;
        }
         
        .page-header {
            background: linear-gradient(135deg, rgba(169, 214, 229, 0.4) 0%, rgba(44, 125, 160, 0.4) 100%);
            padding: 1.5rem 0;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(44, 125, 160, 0.2);
            position: relative;
            overflow: hidden;    color: var(--text-color);
        }
        
 
        
        .breadcrumb {
            background-color: transparent;
            padding: 0.5rem 0;
            margin-bottom: 0.5rem;
        }
        
        .breadcrumb-item a {
            color: var(--text-muted);
            text-decoration: none;
        }
        
        .breadcrumb-item.active {
            color: var(--text-color);
        }
       
        /* Chemical Reaction Styles */
        .reaction-container {
            background-color: var(--light-gray);
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            border: 1px solid var(--border-color);
        }
        
        .reaction-equation {
            font-size: 1.5rem;
            text-align: center;
            margin: 1.5rem 0;
            padding: 1rem;
            background-color: white;
            border-radius: 6px;
            border: 1px solid #eee;
        }
        
        .reactant, .product {
            display: inline-block;
            margin: 0 0.5rem;
        }
        
        .coefficient {
            font-weight: bold;
            margin-right: 0.25rem;
        }
        
        .reaction-arrow {
            margin: 0 1rem;
            font-weight: bold;
            color: var(--primary-color);
        }
        
        /* Result Area */
        .result-container {
            background-color: var(--light-gray);
            border-radius: 6px;
            padding: 1.5rem;
            margin-top: 1.5rem;
            position: relative;
            border: 1px solid var(--border-color);
        }
        
        .result-title {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--primary-color);
        }
        
        .summary-card {
            background: white;
            border-radius: 8px;
            padding: 1.5rem;
            border: 1px solid var(--border-color);
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        .summary-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }
        
        .summary-label {
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        
        /* Chart Container */
        .chart-container {
            position: relative;
            height: 400px;
            width: 100%;
            margin: 2rem 0;
        }
        
        /* Financial Summary */
        .financial-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
            margin: 2rem 0;
        }
        
        .financial-item {
            background: white;
            border-radius: 8px;
            padding: 1.5rem;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        .financial-item h4 {
            font-size: 1rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        
        .financial-item .value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
        }
        
        .financial-item .detail {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-top: 0.5rem;
        }
         
        
        /* Responsive Adjustments */
        @media (max-width: 768px) { 
            .financial-summary {
                grid-template-columns: 1fr;
            }
        }
        
        /* Toggle switch for calculation modes */
        .calculation-modes {
            display: flex;
            background-color: var(--light-gray);
            border-radius: 6px;
            padding: 4px;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }
        
        .mode-btn {
            flex: 1;
            text-align: center;
            padding: 0.75rem;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 600;
            min-width: 120px;
            margin: 2px;
        }
        
        .mode-btn.active {
            background-color: var(--primary-color);
            color: white;
        }
        
        /* Chemical-specific styles */
        .chemical-input-group {
            display: flex;
            margin-bottom: 1rem;
            align-items: center;
        }
        
        .chemical-input-group .form-control {
            flex: 1;
            margin-right: 0.5rem;
        }
        
        .chemical-input-group .coefficient-input {
            width: 70px;
            margin-right: 0.5rem;
        }
        
        .chemical-input-group .form-select {
            width: 120px;
        }
        
        .add-chemical-btn {
            margin-top: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .phase-badge {
            display: inline-block;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            margin-left: 0.5rem;
        }
        
        .phase-solid {
            background-color: #e0e0e0;
            color: #616161;
        }
        
        .phase-liquid {
            background-color: #bbdefb;
            color: #1976d2;
        }
        
        .phase-gas {
            background-color: #ffcdd2;
            color: #d32f2f;
        }
        
        .phase-aqueous {
            background-color: #c8e6c9;
            color: #388e3c;
        }
        
        .generating-indicator {
            display: none;
            background-color: rgba(44, 125, 160, 0.1);
            padding: 1rem;
            border-radius: 6px;
            text-align: center;
            margin: 1rem 0;
            color: var(--primary-color);
        }
        
        /* Reaction Quotient specific styles */
        .known-k-input {
            margin-top: 1rem;
            padding: 1rem;
            background-color: rgba(44, 125, 160, 0.05);
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        
        .direction-indicator {
            display: inline-block;
            padding: 0.5rem 1rem;
            border-radius: 4px;
            font-weight: bold;
            margin: 0.5rem 0;
        }
        
        .forward-direction {
            background-color: rgba(76, 175, 80, 0.2);
            color: #2e7d32;
            border: 1px solid #4caf50;
        }
        
        .reverse-direction {
            background-color: rgba(244, 67, 54, 0.2);
            color: #c62828;
            border: 1px solid #f44336;
        }
        
        .equilibrium-direction {
            background-color: rgba(33, 150, 243, 0.2);
            color: #1565c0;
            border: 1px solid #2196f3;
        }
        
        /* Q vs K Comparison */
        .comparison-container {
            display: flex;
            justify-content: space-between;
            margin: 1.5rem 0;
            flex-wrap: wrap;
        }
        
        .comparison-box {
            flex: 1;
            min-width: 200px;
            padding: 1rem;
            border-radius: 6px;
            text-align: center;
            margin: 0.5rem;
        }
        
        .q-box {
            background-color: rgba(33, 150, 243, 0.1);
            border: 1px solid #2196f3;
        }
        
        .k-box {
            background-color: rgba(76, 175, 80, 0.1);
            border: 1px solid #4caf50;
        }
        
        .comparison-value {
            font-size: 1.5rem;
            font-weight: 700;
            margin: 0.5rem 0;
        }
        
        .q-value {
            color: #2196f3;
        }
        
        .k-value {
            color: #4caf50;
        }
        
        /* Progress Visualization */
        .progress-visualization {
            margin: 1.5rem 0;
            padding: 1rem;
            background-color: white;
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        
        .progress-bar-container {
            height: 30px;
            background-color: #e9ecef;
            border-radius: 15px;
            margin: 1rem 0;
            position: relative;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            border-radius: 15px;
            transition: width 0.5s ease;
        }
        
        .progress-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 0.5rem;
            font-size: 0.9rem;
            color: var(--text-muted);
        }
        
        .equilibrium-marker {
            position: absolute;
            top: 0;
            height: 100%;
            width: 2px;
            background-color: #4caf50;
            z-index: 10;
        }
        
        .current-position {
            position: absolute;
            top: 0;
            height: 100%;
            width: 4px;
            background-color: #2196f3;
            z-index: 20;
            transform: translateX(-50%);
        }
        
        .progress-legend {
            display: flex;
            justify-content: center;
            margin-top: 1rem;
            gap: 1rem;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            font-size: 0.9rem;
        }
        
        .legend-color {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin-right: 0.5rem;
        }
        
        .legend-q {
            background-color: #2196f3;
        }
        
        .legend-k {
            background-color: #4caf50;
        }
        
        /* Example Reactions */
        .example-reactions {
            margin-top: 1.5rem;
        }
        .result-container{display:none}
        .example-reaction {
            padding: 0.75rem;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .example-reaction:hover {
            background-color: var(--light-gray);
        }
        
        .example-title {
            font-weight: 600;
            margin-bottom: 0.25rem;
        }
        
        .example-equation {
            font-size: 0.9rem;
            color: var(--text-muted);
        }
    