/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1e1e1e, #3c3c3c);
    color: #fff;
}

/* Navbar */
header nav {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav h1 {
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ff5f5f;
}

header nav form {
    display: flex;
    gap: 10px;
}

/* Search Bar */
form input[type="text"] {
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid white;
    outline: none;
    /* background: rgba(255, 255, 255, 0.1); */
    color: #fff;
    color: white;
    transition: all 0.3s ease-in-out;
}

form input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

form button[type="submit"] {
    background: linear-gradient(135deg, #ff5f5f, #ff1e1e);
    color: #fff;
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff1e1e, #b30000);
}

/* Recipe Grid */
.recipe-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px;
}

/* Recipe Card */
.recipe {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
}

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

.recipe img {
    height: 220px;
    object-fit: cover;
}

.recipe h3 {
    margin: 15px 0 5px;
    font-size: 20px;
    font-weight: 600;
}

.recipe p {
    font-size: 15px;
    color: #ddd;
    margin-bottom: 10px;
}

.recipe button {
    margin: 15px auto 20px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #ff5f5f, #ff1e1e);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.recipe button:hover {
    background: linear-gradient(135deg, #ff1e1e, #b30000);
}

/* Recipe Details Modal */
.recipe-details {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.recipe-details-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    color: #fff;
    animation: fadeIn 0.3s ease-in-out;
}

.recipeName {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.recipe-closebtn {
    background: #ff5f5f;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    width: 32px;
    height: 32px;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.recipe-closebtn:hover {
    background: #b30000;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #ff5f5f;
    border-radius: 4px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 600px) {
    header nav {
        flex-direction: column;
        gap: 15px;
    }
    form input[type="text"] {
        width: 100%;
    }
}
