
        :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;
            --error-color: #dc3545;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: white;
            color: var(--text-color);
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
        }
        
        /* Header Styles */
        .navbar {
            background-color: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            border-bottom: 1px solid var(--border-color);
            padding: 0.75rem 0;
        }
        
        .navbar-brand {
            font-weight: 700;
            color: var(--primary-color);
            font-size: 1.5rem;
        }
        
        .nav-link {
            color: #555;
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: 6px;
        }
        
        .nav-link:hover, .nav-link.active {
            color: var(--primary-color);
            background-color: rgba(44, 125, 160, 0.1);
        }
        
        .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;
        }
        
        .page-header::before {
            content: "";
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background-image: radial-gradient(rgba(255,255,255,0.8) 1px, transparent 1px);
            background-size: 20px 20px;
            opacity: 0.3;
            transform: rotate(30deg);
        }
        
        .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);
        }
        
        /* Tool Card Styles */
        .tool-card {
            background: white;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            padding: 2rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        .tool-header {
            position: relative;
            padding-bottom: 15px;
            margin-bottom: 25px;
            border-bottom: 1px solid var(--border-color);
        }
        
        .tool-header h2 {
            font-weight: 600;
            color: var(--primary-color);
        }
        
        /* Form Styles */
        .form-label {
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-color);
        }
        
        .form-control {
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 0.75rem;
            transition: all 0.3s;
        }
        
        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.15);
        }
        
        .input-group-text {
            background-color: var(--light-gray);
            border: 1px solid #ddd;
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
            font-weight: 600;
            padding: 0.75rem 1.5rem;
            border-radius: 6px;
            transition: all 0.3s;
        }
        
        .btn-primary:hover {
            background-color: var(--accent-color);
            border-color: var(--accent-color);
            transform: translateY(-1px);
        }
        
        .btn-outline-secondary {
            font-weight: 600;
            border-radius: 6px;
            padding: 0.75rem 1.5rem;
        }
        
        /* 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);
        }
        
        .result-content {
            word-break: break-all;
            padding: 12px;
            background-color: white;
            border-radius: 4px;
            border: 1px solid #eee;
            font-size: 0.95rem;
        }
        
        .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;
        }
        
        /* Content Sections */
        .section-title {
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary-color);
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-color);
        }
        
        .usage-step {
            display: flex;
            margin-bottom: 1.5rem;
            align-items: flex-start;
        }
        
        .step-number {
            width: 28px;
            height: 28px;
            background-color: var(--primary-color);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 1rem;
            flex-shrink: 0;
            font-weight: 600;
            font-size: 0.9rem;
        }
        
        .info-box {
            background-color: rgba(44, 125, 160, 0.05);
            border-left: 3px solid var(--primary-color);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1.5rem 0;
        }
        
        /* Related Tools */
        .related-tools {
            background-color: white;
            border-radius: 8px;
            border: 1px solid var(--border-color); 
            margin-bottom: 1.5rem;
        }
        
        .related-title {
            font-weight: 600;
            margin-bottom: 1.25rem;
            padding-bottom: 0.75rem; 
            color: var(--primary-color);
        }
        
        .related-tool {
            display: flex;
            align-items: center;
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--border-color);
            transition: background-color 0.3s;
        }
        
        .related-tool:hover {
            background-color: var(--light-gray);
        }
        
        .related-tool:last-child {
            border-bottom: none;
        }
        
        .related-icon {
            width: 36px;
            height: 36px;
            border-radius: 6px;
            background-color: rgba(44, 125, 160, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 1rem;
            color: var(--primary-color);
        }
        
        .related-name {
            font-weight: 500;
            margin-bottom: 0.25rem;
        }
        
        .related-desc {
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        
        /* Ad Container */
        .ad-container {
            background-color: var(--light-gray);
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            text-align: center;
            border: 1px solid var(--border-color);
        }
        
        .ad-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 0.5rem;
        }
        
        .ad-placeholder {
            width: 100%;
            height: 250px;
            background-color: #f0f4f8;
            border: 1px dashed #dee2e6;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            font-weight: 500;
        }
        
        /* Footer */
        .footer {
            background-color: var(--light-gray); 
            margin-top: 3rem;
            border-top: 1px solid var(--border-color);
        }
        
        /* Responsive Adjustments */
        @media (max-width: 768px) {
            .tool-card {
                padding: 1.5rem;
            }
            
            .financial-summary {
                grid-template-columns: 1fr;
            }
            
            .chart-container {
                height: 300px;
            }
            
            .reaction-input {
                flex-direction: column;
                align-items: center;
            }
            
            .reaction-arrow {
                margin: 1rem 0;
                transform: rotate(90deg);
            }
        }
        
        /* 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;
        }
        
        /* Toast notifications */
        .toast-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1050;
        }
        
        .toast {
            display: flex;
            align-items: center;
            background-color: white;
            border-left: 4px solid var(--primary-color);
            border-radius: 4px;
            padding: 0.75rem 1rem;
            margin-bottom: 0.5rem;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            max-width: 350px;
            opacity: 0;
            transform: translateX(100%);
            transition: all 0.3s ease;
        }
        
        .toast.show {
            opacity: 1;
            transform: translateX(0);
        }
        
        .toast-success {
            border-left-color: var(--success-color);
        }
        
        .toast-error {
            border-left-color: var(--error-color);
        }
        
        .toast-icon {
            margin-right: 0.75rem;
            font-size: 1.25rem;
        }
        
        .toast-success .toast-icon {
            color: var(--success-color);
        }
        
        .toast-error .toast-icon {
            color: var(--error-color);
        }
        
        /* Action buttons */
        .action-btn {
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 0.5rem 1rem;
            margin-left: 0.5rem;
            transition: all 0.3s;
            color: var(--text-color);
        }
        
        .action-btn:hover {
            background-color: var(--light-gray);
            color: var(--primary-color);
        }
        
        /* Range slider styling */
        .form-range {
            width: 100%;
            height: 1rem;
            padding: 0;
            background-color: transparent;
            -webkit-appearance: none;
        }
        
        .form-range:focus {
            outline: none;
        }
        
        .form-range::-webkit-slider-thumb {
            width: 1rem;
            height: 1rem;
            margin-top: -0.5rem;
            background-color: var(--primary-color);
            border: 0;
            border-radius: 1rem;
            -webkit-appearance: none;
        }
        
        .form-range::-webkit-slider-runnable-track {
            width: 100%;
            height: 0.5rem;
            cursor: pointer;
            animate: 0.2s;
            background: var(--light-gray);
            border-radius: 0.5rem;
        }
        
        .slider-value {
            background-color: var(--primary-color);
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.8rem;
            margin-left: 0.5rem;
        }
        
        /* Input group styling */
        .input-group {
            margin-bottom: 1rem;
        }
        
        /* Mode-specific form styling */
        .mode-form {
            display: none;
        }
        
        .mode-form.active {
            display: block;
        }
        
        /* Comparison table */
        .comparison-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
        }
        
        .comparison-table th, .comparison-table td {
            padding: 0.75rem;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
        }
        
        .comparison-table th {
            background-color: var(--light-gray);
            font-weight: 600;
        }
        
        .comparison-table tr:hover {
            background-color: rgba(44, 125, 160, 0.05);
        }
        
        /* Reaction input styling */
        .reaction-input {
            display: flex;
            align-items: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }
        
        .reaction-compound {
            display: flex;
            align-items: center;
            margin: 0.5rem;
        }
        
        .coefficient-input {
            width: 60px;
            margin-right: 0.5rem;
        }
        
        .compound-select {
            min-width: 150px;
        }
        
        .reaction-arrow {
            margin: 0 1rem;
            font-weight: bold;
            color: var(--primary-color);
        }
        
        .phase-badge {
            margin-left: 0.5rem;
            font-size: 0.8rem;
            background-color: var(--light-gray);
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
        }
        
        .generating-indicator {
            display: none;
            text-align: center;
            padding: 1rem;
            font-weight: 600;
            color: var(--primary-color);
        }
        
        /* Thermodynamic property badges */
        .property-badge {
            display: inline-block;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-weight: 600;
            margin: 0.25rem;
        }
        
        .enthalpy-badge {
            background-color: rgba(255, 99, 132, 0.1);
            color: #ff6384;
        }
        
        .entropy-badge {
            background-color: rgba(54, 162, 235, 0.1);
            color: #36a2eb;
        }
        
        .gibbs-badge {
            background-color: rgba(75, 192, 192, 0.1);
            color: #4bc0c0;
        }
        
        /* Export button */
        .export-btn {
            background-color: var(--success-color);
            border-color: var(--success-color);
            color: white;
        }
        
        .export-btn:hover {
            background-color: #218838;
            border-color: #1e7e34;
        }
        
        /* Error styling */
        .is-invalid {
            border-color: var(--error-color);
        }
        
        .invalid-feedback {
            display: none;
            width: 100%;
            margin-top: 0.25rem;
            font-size: 0.875rem;
            color: var(--error-color);
        }
        
        .is-invalid + .invalid-feedback {
            display: block;
        }
    