body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.app {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    padding: 15px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .app {
        border-radius: 10px;
        padding: 10px;
        margin: 0 5px;
    }

    .header {
        padding-left: 0;
    }
}

/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0 10px 20px;
    border-bottom: 1px solid #ddd;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.nutrition-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.nutrition-btn:hover {
    background: #229954;
}

.log-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.log-btn:hover {
    background: #138496;
}

.hamburger-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.hamburger-btn:hover {
    background: #0056b3;
}

h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recipe-list, .calendar, .inventory, .shopping-list {
    margin-bottom: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mobile Styles */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .main-content {
        gap: 20px;
    }

    .recipe-list, .calendar, .inventory, .shopping-list {
        margin-bottom: 20px;
        padding: 15px;
        border-radius: 10px;
    }
}

.recipe-list h2, .calendar h2, .inventory h2, .shopping-list h2 {
    color: #34495e;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}





form {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

input, select, textarea {
    padding: 12px 16px;
    margin-right: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    min-height: 44px; /* Minimum touch target size */
}

button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

/* Mobile Styles */
@media (max-width: 768px) {
    form {
        margin-bottom: 20px;
        padding: 15px;
    }

    input, select, textarea {
        padding: 14px 16px; /* Larger touch targets */
        margin-right: 8px;
        margin-bottom: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    button {
        padding: 14px 20px;
        width: 100%;
        margin-top: 10px;
        font-size: 16px;
    }

    /* Stack form elements vertically on mobile */
    form > * {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    form > button:last-child {
        margin-top: 15px;
    }
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 44px; /* Minimum touch target */
}

.tab:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    transform: translateY(-1px);
}

.tab.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.tab.always-active {
    cursor: default;
    opacity: 0.8;
}

.tab.always-active:hover {
    background-color: transparent;
    transform: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .tabs {
        margin-bottom: 20px;
        padding: 3px;
        border-radius: 8px;
    }

    .tab {
        padding: 12px 8px;
        font-size: 14px;
        letter-spacing: 0.3px;
    }

    /* Recipe items mobile styles */
    .recipe-item {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .recipe-actions {
        align-self: flex-end;
        gap: 6px;
    }

    .edit-btn, .delete-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 36px;
    }

    /* Inventory and shopping items mobile styles */
    .inventory-item, .shopping-item {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .inventory-controls {
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
    }

    .quantity-controls {
        margin: 0;
    }

    .shopping-checkbox {
        align-self: flex-start;
        margin-bottom: 8px;
    }

    /* Modal mobile styles */
    .modal-overlay {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .modal {
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .modal-buttons button {
        width: 100%;
        min-height: 44px;
    }

    /* Ingredient row mobile styles */
    .ingredient-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .ingredient-row input {
        margin: 0;
        width: 80px;
    }

    .ingredient-row input[type="number"] {
        flex: none;
    }

    .ingredient-row input[type="text"]:nth-child(3) {
        flex: none;
        width: 80px;
    }

    /* Method row mobile styles */
    .method-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .step-number {
        align-self: flex-start;
        margin-top: 0;
    }

    .method-row textarea {
        width: 100%;
        margin: 0;
    }

    /* AI settings mobile styles */
    .ai-settings-toggle {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .mode-toggle {
        align-self: center;
    }

    .setting-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .setting-row label {
        min-width: auto;
        text-align: left;
    }

    /* Recipe select modal mobile styles */
    .recipe-select-list {
        max-height: 300px;
    }

    .recipe-select-item {
        padding: 14px 16px;
        font-size: 16px;
        min-height: 48px;
    }
}





/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-sizing: border-box;
    overflow-y: auto;
    backdrop-filter: blur(2px);
}

.modal {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.modal p {
    margin-bottom: 20px;
    color: #34495e;
}

.modal ul {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.modal li {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    color: #2c3e50;
}

.modal li:last-child {
    border-bottom: none;
}

.sufficient {
    color: #27ae60;
    font-weight: bold;
}

.insufficient {
    color: #e74c3c;
    font-weight: bold;
}

.insufficient-recipe {
    color: #e74c3c;
    font-weight: bold;
}

.insufficient-ingredient {
    color: #e74c3c;
    font-weight: bold;
}

.inventory-status {
    font-size: 0.9em;
    color: #7f8c8d;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-buttons button:first-child {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.modal-buttons button:last-child {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.modal-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Edit Modal Styles */
.edit-modal {
    max-width: 800px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
}

/* Cook Modal Styles */
.cook-modal {
    max-width: 700px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
}

.cook-method {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cook-method h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.cook-method ol {
    padding-left: 20px;
    margin: 0;
}

.method-step {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #34495e;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.method-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.edit-recipe-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-recipe-form .modal-buttons {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
    justify-content: center;
    gap: 20px;
}

.recipe-name-input {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.recipe-name-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.add-ingredient-btn {
    align-self: flex-start;
    padding: 6px 12px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.add-ingredient-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.remove-ingredient-btn {
    padding: 4px 8px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.remove-ingredient-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.4);
}

/* Method Styles */
.method-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.method-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.step-number {
    font-weight: bold;
    color: #2c3e50;
    min-width: 25px;
    font-size: 16px;
    margin-top: 8px;
}

.method-row textarea {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.method-row textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

.remove-method-btn {
    padding: 6px 10px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
    align-self: flex-start;
    margin-top: 8px;
}

.remove-method-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.4);
}

.add-method-btn {
    align-self: flex-start;
    padding: 6px 12px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.add-method-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* AI Settings Styles */
.ai-settings-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.settings-toggle-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
}

.settings-toggle-btn:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.4);
}

.mode-toggle {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.mode-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.mode-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.ai-settings {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-row label {
    min-width: 120px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.setting-row input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.setting-row input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

/* AI Form Styles */
.ai-form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.copy-prompt-btn, .paste-result-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
    text-transform: none;
}

.copy-prompt-btn:hover, .paste-result-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.paste-result-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.paste-result-btn:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

/* Paste Modal Styles */
.paste-modal {
    max-width: 600px;
    width: 95%;
}

.paste-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    min-height: 300px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.paste-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

/* Recipe Select Button */
.select-recipe-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.select-recipe-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* Recipe Select Modal */
.recipe-select-modal {
    max-width: 700px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

.recipe-select-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    margin: 25px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.recipe-select-item {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
    text-align: left;
    min-height: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.recipe-select-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(52, 152, 219, 0.2);
}

/* Recipe Select Modal Buttons */
.recipe-select-modal .modal-buttons {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
    justify-content: center;
    gap: 20px;
}

/* Missing Ingredient Styles */
.missing-ingredient {
    color: #e74c3c;
}

.recipe-usage {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.inventory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.recipe-nutritional {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nutrition-charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.nutrition-chart-container {
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nutrition-chart-container canvas {
    max-width: 100%;
    height: 300px !important;
}

/* Mobile: stack charts vertically */
@media (max-width: 768px) {
    .nutrition-charts-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Cook Button Styles */
.cook-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    min-height: 44px;
}

.cook-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.cook-btn.insufficient {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.cook-btn.insufficient:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Data Management Modal Styles */
.data-modal {
    max-width: 600px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

.data-status {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.data-status h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.data-status p {
    margin: 5px 0;
    color: #34495e;
    font-size: 0.95rem;
}

.data-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.data-actions h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-btn {
    padding: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 60px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.data-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-common {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.reset-sample {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.export {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.import {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

.cleanup {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-description {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
}

.import-section {
    position: relative;
}

.import-section input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.status-message {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
}

.status-message:contains("✅") {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.status-message:contains("❌") {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* LLM Configuration Styles */
.llm-config {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.preset-buttons {
    margin-top: 15px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.preset-buttons h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.preset-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
    text-align: center;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preset-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
}

.preset-btn.selected {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.preset-btn.selected:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5);
}

.refresh-btn-small {
    padding: 6px 10px;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(127, 140, 141, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn-small:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(127, 140, 141, 0.4);
}

.model-loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.model-fallback {
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.model-fallback input {
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Model Selection Styles */
.refresh-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(127, 140, 141, 0.3);
    margin-left: 8px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(127, 140, 141, 0.4);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.model-error {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}
