

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}


header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(51, 51, 51, 0.95);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #ff9800;
    letter-spacing: 1px;
}

nav {
    flex: 1;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff9800;
    transition: width 0.3s;
}

nav ul li a:hover {
    color: #ff9800;
}

nav ul li a:hover::after {
    width: 100%;
}

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

.profile-btn {
    color: #fff;
    font-size: 24px;
    transition: color 0.3s ease;
}

.profile-btn:hover {
    color: #ff9800;
}


.search-section {
    height: 70vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://img.freepik.com/free-photo/top-view-flour-with-baking-tools-table_23-2148461115.jpg?t=st=1741690288~exp=1741693888~hmac=483835e447cadf2d0dec37961f84a9135a8fdb5f0e326697605358c748efaef8&w=2000') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
    padding-top: 60px;
}

.search-content {
    max-width: 800px;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out forwards;
}

.search-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.search-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}


.search-container {
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.search-wrapper {
    width: 100%;
    display: flex;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    outline: none;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}

.search-input::placeholder {
    color: #777;
    font-style: italic;
}

.search-button {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #e68900;
}

.search-recommendations {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    animation: fadeInUp 1s ease-out forwards 0.3s;
    opacity: 0;
}

.recommendation-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recommendation-btn:hover {
    background-color: #ff9800;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}


footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 0; 
}


@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@media screen and (max-width: 768px) {
    header {
        padding: 10px 15px;
    }

    .logo {
        font-size: 22px;
    }

    nav ul li {
        margin: 0 10px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .search-input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .search-button {
        padding: 0 15px;
    }

    .recommendation-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media screen and (max-width: 576px) {
    nav ul li {
        margin: 0 8px;
    }

    nav ul li a {
        font-size: 14px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .search-recommendations {
        gap: 6px;
    }
}


.search-results-section {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-results-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #ff9800;
    padding-bottom: 10px;
}


.error-container {
    text-align: center;
    padding: 20px;
    background-color: #fff9c4;
    border-radius: 8px;
    margin-bottom: 20px;
}

.error-container h3 {
    color: #f57c00;
    margin-bottom: 10px;
}

.mock-data-notice {
    font-style: italic;
    color: #757575;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}


.ingredients-container {
    margin-bottom: 20px;
}

.ingredients-list {
    list-style: none;
    padding: 0;
}

.ingredient-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.ingredient-item:last-child {
    border-bottom: none;
}

.ingredient-item:hover {
    background-color: #f9f9f9;
}

.ingredient-name {
    font-size: 16px;
    text-transform: capitalize;
    color: #333;
}

.ingredient-quantity {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.try-cooking-btn, .new-search-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-cooking-btn {
    background-color: #ff9800;
    color: white;
}

.try-cooking-btn:hover {
    background-color: #e68a00;
    transform: translateY(-2px);
}

.new-search-btn {
    background-color: #f2f2f2;
    color: #333;
}

.new-search-btn:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.recipe-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.recipe-image {
    height: 200px;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.05);
}

.recipe-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.recipe-details h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.recipe-category {
    color: #ff9800;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}

.recipe-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 13px;
    color: #777;
}

.recipe-meta span {
    display: flex;
    align-items: center;
}

.recipe-meta i {
    margin-right: 5px;
}

.view-recipe-btn {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.view-recipe-btn:hover {
    background-color: #f57c00;
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .search-results-section {
        padding: 15px;
    }
}


.converter-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
    margin-top: 20px;
}

.converter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background-color: #ff9800;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.converter-btn i {
    font-size: 18px;
}

.converter-btn:hover {
    background-color: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.converter-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


@media screen and (max-width: 576px) {
    .converter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .converter-btn i {
        font-size: 16px;
    }
}


.home-link {
    color: #fff;
    font-size: 20px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.home-link:hover {
    color: #ff9800;
}

.converter-btn{
    text-decoration: none;
}