body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
}

header {
    background-color: #3498db;
    padding: 0.5rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
}

.hamburger-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
    display: none;
}

.logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 8px;
    font-size: 1.5rem;
}

#cart-icon {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    margin-left: 20px;
}

.desktop-menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.desktop-menu li {
    margin-left: 20px;
}

.desktop-menu li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.mobile-menu {
    display: none;
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }

    .desktop-menu {
        display: none;
    }

    .mobile-menu {
        display: block;
        position: fixed;
        top: 50px;
        left: -250px;
        width: 250px;
        height: calc(100% - 50px);
        background-color: #2980b9;
        transition: left 0.3s ease;
        z-index: 999;
    }

    .mobile-menu.active {
        left: 0;
    }

    .mobile-menu ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu ul li {
        padding: 15px 20px;
        border-bottom: 1px solid #3498db;
    }

    .mobile-menu ul li a {
        color: white;
        text-decoration: none;
        font-weight: bold;
        display: block;
    }
}

@media (min-width: 769px) {
    .hamburger-menu {
        display: none;
    }

    .mobile-menu {
        display: none;
    }

    .nav-right {
        margin-left: auto;
    }
}

main {
    padding-top: 70px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    margin-top: 20px;
}

h2, h3 {
    color: #2c3e50;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.recipe {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.recipe img {
    max-width: 200px;
}

ul, ol {
    padding-left: 20px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

.recipe-checkbox {
    margin-right: 10px;
}

#mealPlan {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
}

.recipe-details {
    margin-bottom: 30px;
}

.instacart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

#shop-with-instacart-v1 {
    margin-top: 20px;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.recipe-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.recipe-card.selected {
    background-color: #4CAF50;
    box-shadow: 0 0 0 2px #45a049;
}

.recipe-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.recipe-info {
    flex-grow: 1;
    padding: 15px;
}

.recipe-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

.view-details {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    transition: color 0.3s ease;
}

.view-details:hover {
    color: #2980b9;
}

.recipe-card.selected .view-details {
    color: white;
}

.recipe-checkbox {
    transform: scale(1.5);
}

.create-plan-container {
    margin-top: 40px;
    text-align: center;
}

#createMealPlan {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

#createMealPlan:hover {
    background-color: #2980b9;
}

.meal-plan-options {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.meal-plan-options label {
    margin-right: 10px;
}

.meal-plan-options button {
    margin: 0 5px;
}

.meal-plan-options span {
    margin: 0 5px;
    min-width: 20px;
    text-align: center;
}

.add-recipe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #f8f9fa;
    border: 2px dashed #3498db;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.add-recipe-container:hover {
    background-color: #e9ecef;
}

#addRecipe {
    padding: 15px 30px;
    font-size: 1.2em;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#addRecipe:hover {
    background-color: #2980b9;
}

/* Overlay styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    text-align: center;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

.recipe-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.recipe-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 150px;
    text-align: center;
}

.recipe-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.recipe-item span {
    display: block;
    padding: 10px;
    font-weight: bold;
    color: #333;
}

.recipe-item:hover {
    background-color: #e0e0e0;
}

.feedback-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

#feedback-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
}

.feedback-form {
    display: none;
    background-color: white;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.feedback-form textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
}

.recipe-info {
    padding: 20px;
}

.recipe-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4em;
    color: #2c3e50;
}

.recipe-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 15px;
}

.recipe-actions {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.contact-container h1 {
    margin-bottom: 20px;
}

#contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

#response-message {
    margin-top: 20px;
    font-weight: bold;
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.about-container h1, .about-container h2 {
    color: #2c3e50;
}

.about-container p {
    margin-bottom: 20px;
}

.about-container ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.about-container li {
    margin-bottom: 10px;
}

.recipe-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.recipe-header {
    text-align: center;
    margin-bottom: 20px;
}

.recipe-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.recipe-header img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.recipe-info {
    margin-bottom: 20px;
}

.description {
    font-style: italic;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.recipe-meta span {
    background-color: #ecf0f1;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

.diet-info {
    margin-top: 10px;
}

.diet-tag {
    background-color: #2ecc71;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 5px;
    font-size: 0.8em;
}

.recipe-content {
    display: flex;
    gap: 20px;
}

.ingredients, .instructions {
    flex: 1;
}

.ingredients h2, .instructions h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.ingredients ul, .instructions ol {
    padding-left: 20px;
}

.ingredients li, .instructions li {
    margin-bottom: 5px;
}

.instacart-widget {
    margin-top: 30px;
    text-align: center;
}

.instacart-widget h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.content-box {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 20px;
}

.content-box h2 {
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
}

.content-box p, .content-box ol {
    margin-bottom: 15px;
}

.content-box ol {
    padding-left: 20px;
}

#contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

#response-message {
    margin-top: 15px;
    font-weight: bold;
    color: #2c3e50;
}

.centered-form {
    max-width: 800px;
    margin: 0 auto;
}

#contact-form {
    display: flex;
    flex-direction: column;
}

#contact-form textarea {
    width: 100%;
    margin-bottom: 15px;
}

#contact-form button {
    align-self: center;
    width: auto;
    min-width: 150px;
}

.recipe-ingredients, .recipe-steps {
    margin-top: 15px;
}

.recipe-ingredients h4, .recipe-steps h4 {
    margin-bottom: 10px;
}

.recipe-ingredients ul, .recipe-steps ol {
    padding-left: 20px;
}

.recipe-ingredients li, .recipe-steps li {
    margin-bottom: 5px;
}

#meal-plan-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.meal-plan-item {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.meal-plan-header {
    background-color: #f8f9fa;
    color: #2c3e50;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.meal-plan-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.recipe-description {
    font-style: italic;
    margin-bottom: 10px;
    color: #7f8c8d;
}

.recipe-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #34495e;
}

.meal-plan-content {
    display: flex;
    padding: 20px;
    gap: 20px;
    align-items: flex-start;
}

.recipe-image {
    flex: 0 0 250px;
    max-width: 250px;
    align-self: center;
}

.recipe-image img {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    object-fit: cover;
}

.recipe-ingredients, .recipe-steps {
    flex: 1;
}

.recipe-ingredients h3, .recipe-steps h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
}

.recipe-ingredients ul, .recipe-steps ol {
    padding-left: 20px;
    margin-top: 0;
}

.recipe-ingredients li, .recipe-steps li {
    margin-bottom: 5px;
}

.meal-plan-actions {
    padding: 0 20px 20px;
    text-align: right;
}

.remove-from-plan {
    background-color: #e74c3c;
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.remove-from-plan:hover {
    background-color: #c0392b;
}

@media (min-width: 1200px) {
    .recipe-image {
        flex: 0 0 300px;
        max-width: 300px;
    }

    .recipe-image img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .meal-plan-content {
        flex-direction: column;
    }

    .recipe-image {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .recipe-image img {
        height: auto;
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }

    .mobile-menu {
        display: block;
    }
}

@media (min-width: 769px) {
    .hamburger-menu {
        display: none;
    }

    .mobile-menu {
        display: none;
    }
}

.cart-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 16px;
    border-radius: 4px;
    z-index: 1001;
    display: none;
    animation: fadeInOut 2s ease-in-out;
}

.cart-popup.success {
    background-color: #4CAF50;
    color: white;
}

.cart-popup.warning {
    background-color: #f44336;
    color: white;
}
@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}
