:root {
    --primary-color: #2979FF; /* A vibrant blue */
    --background-color: #f4f7f6;
    --card-background: #ffffff;
    --text-color: #333;
    --light-text-color: #777;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
}

.app-container {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: var(#0097b2);
    margin: 0 0 1.5rem 0;
    font-size: 1.8rem;
}

/* --- Search Bar --- */
.search-bar input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 1.5rem;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 121, 255, 0.2);
}

/* --- Food Grid --- */
.food-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 1rem;
}

.food-card {
    background-color: var(--card-background);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.food-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* NEW: Styles for the letter icon */
.food-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
}

.food-card-info h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}
.food-card-info p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--light-text-color);
}

/* --- Load More Button --- */
.load-more-container { text-align: center; margin-top: 2rem; }
#load-more-btn { padding: 0.8rem 2rem; font-size: 1rem; font-weight: 600; color: white; background-color: var(--primary-color); border: none; border-radius: 50px; cursor: pointer; transition: background-color 0.2s ease; }
#load-more-btn:hover { background-color: #2962FF; }
.load-more-container.hidden { display: none; }

/* --- Modal Styles --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; z-index: 1000; padding: 20px; box-sizing: border-box; }
.modal-overlay.hidden { display: none; }
.modal-content { background: white; padding: 2rem; border-radius: 15px; width: 100%; max-width: 500px; position: relative; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.close-btn { position: absolute; top: 10px; right: 15px; background: transparent; border: none; font-size: 2rem; color: var(--light-text-color); cursor: pointer; }

/* Modal body updated for no image */
#modal-body h2 { text-align: center; margin: 0 0 0.5rem 0; color: var(--primary-color); }
#modal-body .serving-size { text-align: center; color: var(--light-text-color); font-style: italic; margin-bottom: 1.5rem; }
.nutrition-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; text-align: center; }
.fact { background: var(--background-color); padding: 0.8rem; border-radius: 8px; }
.fact-value { font-size: 1.5rem; font-weight: 700; }
.fact-label { font-size: 0.9rem; color: var(--light-text-color); }
.vitamins-list { margin-top: 1.5rem; }
.vitamins-list h4 { margin-bottom: 0.5rem; }
.vitamins-list ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vitamins-list li { background: #e3f2fd; color: #1e88e5; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }