/* styles.css */

@import url('https://fonts.googleapis.com/css2?family=Lobster&family=Open+Sans:wght@300;400;600&family=Roboto+Mono&display=swap');

body {
    font-family: 'Roboto Mono', sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    color: #333;
}

header {
    background-color: #344955;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-family: 'Lobster', cursive;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #f9aa33;
    border: none;
    color: #fff;
    border-radius: 5px;
    transition: background-color 0.3s;
}

header button:hover {
    background-color: #d98d22;
}

main {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

.recipes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.recipe {
    margin-bottom: 30px;
    padding-bottom: 20px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 10px;
}

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

.recipe img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 2px solid #ffccd5;
}

.recipe h2 {
    margin: 10px 0;
    font-size: 20px;
    color: #344955;
    text-align: center;
}

.recipe-details {
    display: none;
    padding: 10px 20px;
}

.recipe-details.show {
    display: block;
    max-height: 500px;
    transition: max-height 0.3s ease-out;
}

.recipe-details h3 {
    margin-bottom: 5px;
    color: #555;
}

.recipe-details ul, .recipe-details ol {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.recipe-details ul li::before {
    content: "•";
    color: #f9aa33;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.recipe-details ol {
    counter-reset: step-counter;
}

.recipe-details ol li {
    counter-increment: step-counter;
}

.recipe-details ol li::before {
    content: counter(step-counter) ". ";
    color: #f9aa33;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.recipe-details p {
    margin: 0;
    line-height: 1.6;
}

.recipe .delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 16px;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

label, textarea, input {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    font-family: 'Roboto Mono', sans-serif;
}

button[type="submit"] {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #344955;
    border: none;
    color: #fff;
    border-radius: 5px;
    transition: background-color 0.3s;
}

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