:root {
    --primary: #2A9D8F;
    --secondary: #E9C46A;
    --accent: #E76F51;
    --dark: #264653;
    --light: #F4F1DE;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, var(--primary), #45B7AF);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    color: var(--primary);
    font-size: 1.8rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: rgba(42, 157, 143, 0.1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('https://images.unsplash.com/photo-1543353071-087092ec393a?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.search-container {
    margin-bottom: 2rem;
}

.search-container h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.search-container p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.searchBox {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.searchBox:focus {
    outline: none;
    background: var(--white);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.searchBtn {
    position: absolute;
    right: 5px;
    top: 5px;
    padding: 1rem 2rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.searchBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(42, 157, 143, 0.4);
}

.featured-categories {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.category-pill {
    padding: 0.8rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-pill:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
    transform: translateY(-2px);
}

.category-pill i {
    margin-right: 0.5rem;
}

/* Featured Section */
.featured-section {
    padding: 5rem 2rem;
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

.featured-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.featured-card {
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-10px);
}

.featured-card.breakfast {
    background: url('https://images.unsplash.com/photo-1533089860892-a7c6f0a88666?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover;
}

.featured-card.dinner {
    background: url('https://images.unsplash.com/photo-1547592180-85f173990554?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover;
}

.featured-card.dessert {
    background: url('https://images.unsplash.com/photo-1488477181946-6428a0291777?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
}

.overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Recipes Section */
.recipes-section {
    padding: 2rem;
    background-color: var(--light);
}

.recipe-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.recipe-container h2 {
    grid-column: 1/-1;
    text-align: center;
    color: #666;
}

.recipe {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.recipe-content {
    padding: 1.5rem;
}

.recipe h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.recipe p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.recipe span {
    color: var(--primary);
    font-weight: 600;
}

.recipe button {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recipe button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 157, 143, 0.4);
}

/* Recipe Details Modal */
.recipe-details {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--white);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 1001;
}

.recipe-details::-webkit-scrollbar {
    width: 8px;
}

.recipe-details::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
}

.recipe-details::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

.recipe-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1002;
}

.recipe-close-btn:hover {
    transform: rotate(90deg);
    background-color: var(--accent);
}

.recipe-details-content {
    padding: 2rem;
}

.recipeName {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.ingredientsList {
    list-style-type: none;
    margin: 1rem 0;
}

.ingredientsList li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ingredientsList li i {
    color: var(--secondary);
}

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

.recipeInstructions {
    margin-top: 2rem;
    white-space: pre-line;
}

.recipeInstructions h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.footer-section p {
    color: #aaa;
    margin-bottom: 1rem;
}

.footer-section a {
    color: #aaa;
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom i {
    color: var(--primary);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading::after {
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 6rem 1rem 3rem;
    }

    .search-container h2 {
        font-size: 2.5rem;
    }

    .searchBtn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .recipe-details {
        width: 95%;
        max-height: 95vh;
    }

    .featured-card {
        height: 250px;
    }
}

@media screen and (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .search-container h2 {
        font-size: 2rem;
    }

    .search-container p {
        font-size: 1rem;
    }

    .searchBox {
        font-size: 1rem;
        padding: 0.8rem 1rem 0.8rem 2.5rem;
    }

    .category-pill {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .recipe-details-content {
        padding: 1.5rem;
    }

    .recipeName {
        font-size: 1.5rem;
    }

    .featured-card {
        height: 200px;
    }
}