body{
    max-width: 700px;
    margin: 0;
    padding: 0 1rem;
    font-size: 1rem;
}


header {
    display: flex;
    justify-content: center;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    font-size: 2em;
}

.nav {
    display: flex;
    gap: 1rem;
}


.top{
    display: flex;
    justify-content: space-between; 
    align-items: center;
    gap: 1rem;
}

main {
    display: block;
}

.recipes {
    display: flex;
    flex-wrap: wrap;     
    gap: 1rem;
    justify-content: center;
}

.recipe-box {
    display: flex;
    flex-direction: column;
    border: 1px solid black;
    gap: 1rem;
    padding: 1rem;
    flex: 1 1 250px;  
    max-width: 300px; 
    background-color: yellow;
}

.recipe-info {
    background-color: yellow;
    border: 1px solid black;
    padding: 1rem;
}

.ingredients {
    background-color: blue;
    border: 1px solid black;
}

.ingredients h2 {
    text-decoration: underline;
}

.steps {
    background-color: green;
    border: 1px solid black;
}

.steps h2 {
    text-decoration: underline;
}

#recipe-title {
    text-decoration: underline;
}

#recipe-tags {
    font-weight: bold;
}

#recipe-description {
    font-style: italic;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================
   Guestbook Container (FIXED)
========================= */
.guestbook {
    width: 100%;
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background: #f9f9fb;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

/* =========================
   Sign Book Section
========================= */
.sign-book {
    margin-bottom: 20px;
    padding: 15px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e6e6e6;
}

/* form */
.guestbook-form p {
    margin: 0;
}

/* textarea fix (important) */
.guestbook-form textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
    font-size: 14px;
    margin-top: 8px;
    outline: none;
}

.guestbook-form textarea:focus {
    border-color: #4a90e2;
}

/* button */
.guestbook-form button {
    margin-top: 10px;
    padding: 8px 16px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

.guestbook-form button:hover {
    background: #357ac8;
}

/* =========================
   Sort Controls (FIXED spacing)
========================= */
.guestbook > p {
    font-weight: bold;
    margin: 20px 0 10px;
}

.guestbook label {
    margin-right: 12px;
    font-size: 14px;
    cursor: pointer;
}

.guestbook input[type="radio"] {
    margin-right: 4px;
}

/* =========================
   Comments Container
========================= */
#comments-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* =========================
   Comment Box (FIXED layout consistency)
========================= */
.comment-box {
    background: #ffffff;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #eaeaea;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.comment-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.comment-box h2 {
    font-size: 16px;
    margin: 0 0 6px;
    color: #333;
}

.comment-box p {
    margin: 4px 0;
    font-size: 14px;
    color: #444;
}

.comment-box .timestamp {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    .nav {
        flex-direction: column;
        align-items: center;
    }

    .top {
        flex-direction: column;
        align-items: center;
    }
}

* {
    box-sizing: border-box;
    font-family: arial, sans-serif;
}