        :root { 
            --accent-color: #01497c;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --nutrition-green: #198754;
            --nutrition-yellow: #ffc107;
            --nutrition-orange: #fd7e14;
            --nutrition-red: #dc3545;
        }
          
         
        /* Nutritional Summary */
        .nutritional-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
            margin: 2rem 0;
        }
        
        .nutritional-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);
        }
        
        .nutritional-item h4 {
            font-size: 1rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        
        .nutritional-item .value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
        }
        
        .nutritional-item .detail {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-top: 0.5rem;
        }
         
        .nutrition-info-box {
            background-color: rgba(40, 167, 69, 0.05);
            border-left: 3px solid var(--nutrition-green);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1.5rem 0;
        }
         
        /* Food Search */
        .food-search-container {
            position: relative;
            margin-bottom: 1.5rem;
        }
        
        .food-search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid var(--border-color);
            border-radius: 0 0 6px 6px;
            max-height: 300px;
            overflow-y: auto;
            z-index: 1000;
            display: none;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        .food-search-result {
            padding: 0.75rem 1rem;
            cursor: pointer;
            border-bottom: 1px solid var(--border-color);
            transition: background-color 0.2s;
        }
        
        .food-search-result:hover {
            background-color: var(--light-gray);
        }
        
        .food-search-result:last-child {
            border-bottom: none;
        }
        
        .food-name {
            font-weight: 500;
            margin-bottom: 0.25rem;
        }
        
        .food-details {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        
        /* GI Classification */
        .gi-classification {
            padding: 1rem;
            border-radius: 8px;
            margin: 1rem 0;
            border-left: 5px solid;
        }
        
        .gi-low {
            background-color: rgba(40, 167, 69, 0.1);
            border-left-color: var(--nutrition-green);
        }
        
        .gi-medium {
            background-color: rgba(255, 193, 7, 0.1);
            border-left-color: var(--nutrition-yellow);
        }
        
        .gi-high {
            background-color: rgba(220, 53, 69, 0.1);
            border-left-color: var(--nutrition-red);
        }
        
        .gi-status-indicator {
            display: inline-block;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin-right: 8px;
        }
        
        .status-low {
            background-color: var(--nutrition-green);
        }
        
        .status-medium {
            background-color: var(--nutrition-yellow);
        }
        
        .status-high {
            background-color: var(--nutrition-red);
        }
        
        /* 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);
        }
        
        /* Reference table */
        .reference-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
        }
        
        .reference-table th, .reference-table td {
            padding: 0.75rem;
            text-align: left;
            border: 1px solid var(--border-color);
        }
        
        .reference-table th {
            background-color: var(--light-gray);
            font-weight: 600;
        }
        
        .reference-table tr:nth-child(even) {
            background-color: rgba(44, 125, 160, 0.05);
        }
        
        .generating-indicator {
            display: none;
            text-align: center;
            padding: 1rem;
            color: var(--text-muted);
        }
        
        /* 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;
            }
            
            .nutritional-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;
        }
        
        /* Toast notifications */
        .toast-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1050;
        }
        
        /* 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);
        }
        
        /* Meal builder */
        .meal-item {
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 1rem;
            margin-bottom: 1rem;
            position: relative;
        }
        
        .remove-meal-item {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            background: none;
            border: none;
            color: var(--danger-color);
            cursor: pointer;
        }
        
        .meal-total {
            background-color: var(--light-gray);
            border-radius: 6px;
            padding: 1rem;
            margin-top: 1rem;
            font-weight: 600;
        }
        
        /* Food database table */
        .food-db-table {
            font-size: 0.9rem;
        }
        
        .food-db-table td {
            vertical-align: middle;
        }
        
        .badge-gi {
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        
        .badge-low {
            background-color: rgba(40, 167, 69, 0.1);
            color: var(--nutrition-green);
        }
        
        .badge-medium {
            background-color: rgba(255, 193, 7, 0.1);
            color: var(--nutrition-yellow);
        }
        
        .badge-high {
            background-color: rgba(220, 53, 69, 0.1);
            color: var(--nutrition-red);
        }
        
        /* Empty state for meal builder */
        .empty-meal-state {
            text-align: center;
            padding: 2rem;
            color: var(--text-muted);
            border: 2px dashed var(--border-color);
            border-radius: 8px;
            margin-bottom: 1rem;
        }
        
        .empty-meal-state i {
            font-size: 2rem;
            margin-bottom: 1rem;
            color: var(--primary-color);
            opacity: 0.5;
        }
        
        /* Print styles */
        @media print {
            .navbar, .page-header, .action-btn, .related-tools, 
            .ad-container, .footer, .calculation-modes,
            .food-search-container, .btn {
                display: none !important;
            }
            
            .tool-card {
                box-shadow: none;
                border: 1px solid #ddd;
            }
            
            .result-container {
                break-inside: avoid;
            }
        }
        
        /* Food comparison table */
        .food-comparison-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
        }
        
        .food-comparison-table th, .food-comparison-table td {
            padding: 0.75rem;
            border: 1px solid var(--border-color);
            text-align: center;
        }
        
        .food-comparison-table th {
            background-color: var(--light-gray);
        }
        .mode-form{display:none} .active{display:block}
        /* Save food button */
        .save-food-btn {
            margin-top: 0.5rem;
            font-size: 0.85rem;
        }
        
        /* Custom food list */
        .custom-food-list {
            max-height: 200px;
            overflow-y: auto;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 0.5rem;
            margin-top: 1rem;
        }
        
        .custom-food-item {
            padding: 0.5rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .custom-food-item:last-child {
            border-bottom: none;
        }
    