*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}



body {
    background-color: #f4f4f4;
    color: #333;
}

header nav {
    background-color: #212121;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header nav h1 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

header nav form {
    display: flex;
    justify-content: center;
}

form input[type="text"], form button[type="submit"] {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}




form input[type="text"] {
    flex-grow: 1;
    margin-right: 10px;
}

form button[type="submit"] {
    background-color: #ff6347;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button[type="submit"]:hover {
    background-color: #e5533d;
}




/* Main Section */
.recipe-container {
    text-align: center;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 40px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    place-items: center;
}

.recipe {
    background-color: white;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 350px;
    animation: fadeInUp 0.6s ease forwards;
}

.recipe:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.recipe img {
    width: 100%;
    height: auto;
    border-radius: 10px 10px 0 0;
    transition: transform 0.4s ease;
}

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

.recipe-content {
    padding: 15px;
    text-align: center;
}

.recipe h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.recipe p {
    font-size: 14px;
    color: #666;
    margin: 2px 0;
    line-height: 1.4;
}

.recipe span {
    font-weight: 600;
    color: #ff6347;
}

.recipe button {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background-color: #ff6347;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.recipe button:hover {
    background-color: #e5533d;
}

.recipe-details {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 100;
}

.recipe-details.active {
    display: block;
}

.recipe-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}


.recipe-details img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 10px;
}

@media screen and (max-width: 600px) {
    header nav {
        flex-direction: column;
    }
    header nav form {
        width: 80%;
        margin-top: 20px;
    }
}

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





