html,
body {
    max-width: 100%;
    overflow-x: hidden; 
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.site-header,
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    margin-top: 24px;
    margin-bottom: 24px;
    border: 1px solid black;
    border-radius: 12px;
    padding: 18px 20px;
}

.site-header .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.site-header .brand a {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid white;
}

.site-nav a,
.account-links a {
    text-decoration: none;
    color: #2f5d50;
    font-weight: 600;
}

.site-nav a:hover,
.account-links a:hover,
.brand a:hover {
    text-decoration: underline;
}

/* Main */
main {
    background: #ffffff;
    border: 1px solid gainsboro;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 32px;
}

h1, h2, h3 {
    margin-bottom: 8px;
    line-height: 1.2;
}

/* Recipe List */
.recipes-list,
.cards-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Recipe Cards */
.recipe-card,
.recipe-box,
.card {
    background: white;
    border: 1px solid gainsboro;
    border-radius: 12px;
    padding: 16px;
    flex: 1 1 280px;
    min-width: 0px;
}

.recipe-card img,
.recipe-box img,
.card img,
.profile-intro img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* Tags */
.recipe-tags,
.card ul {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-tags li,
.card ul li,
.recipe-box span,
.recipe-info span {
    background: white;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.9rem;
}

/* Profile intro */
.profile-intro {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 20px;
}

.profile-intro > div {
    flex: 1 1 280px;
}

/* Recipe Detail */
.recipe-detail {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.recipe-hero {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recipe-author {
    margin: 0;
    color: black;
}

.recipe-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.recipe-image {
    flex: 1 1 320px;
}

.recipe-image img {
    max-width: 100%;
    display: block;
    border-radius: 12px;
}

.recipe-summary-text {
    flex: 1 1 320px;
}

.recipe-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 16px;
    padding: 16px;
    background: antiquewhite;
    border: 1px solid antiquewhite;
    border-radius: 12px;
}

.recipe-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.recipe-panel {
    flex: 1 1 320px;
    background: antiquewhite;
    border: 1px solid antiquewhite;
    border-radius: 12px;
    padding: 20px;
}

/* Forms */
form {
    margin-top: 16px;
}

input,
button {
    font: inherit;
}

input[type="text"],
input[type="search"],
input[type="password"],
textarea {
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid black;
    border-radius: 8px;
    box-sizing: border-box;
}

textarea {
    max-width: none;
    resize: vertical;
    min-height: 120px;
}

button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: teal;
    color: white;
    cursor: pointer;
}

button:hover {
    background: gray;
}

button:disabled {
    background: #8da8a1;
    cursor: not-allowed;
}

.comments-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comments-header h2,
.comments-header p {
    margin: 0;
}

.comments-subtitle {
    color: #4a4a4a;
}

.comment-form-card,
.comment-card {
    background: #f5efe4;
    border: 1px solid #eadcc2;
    border-radius: 12px;
    padding: 20px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-form label {
    font-weight: 600;
}

.comment-form textarea {
    background: white;
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.comment-feedback {
    margin: 0;
    color: #35564c;
}

.comment-feedback.is-error {
    color: #8a3b2b;
}

.comment-signin-note,
.comment-empty,
.comment-card p {
    margin: 0;
}

.comment-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    color: #4a4a4a;
}
