html {
    min-height: 100%;
    background: #f4fbff;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    background:
        radial-gradient(circle at top left, rgba(255, 230, 168, 0.45), transparent 24%),
        radial-gradient(circle at top right, rgba(111, 188, 255, 0.28), transparent 28%),
        linear-gradient(180deg, #f4fbff 0%, #e6f4ff 52%, #f9fcff 100%);
    color: #29435c;
}

.page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0 40px;
}

.home-page {
    min-height: 100vh;
}

.header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin: 0;
    color: #24476b;
}

.header a {
    text-decoration: none;
    color: #3a78b5;
}

.header .logo a {
    font-size: 1.5em;
    font-weight: bold;
}

.header .nav {
    justify-self: center;
    display: flex;
    gap: 20px;
}

.header .user-auth {
    justify-self: end;
}

.header .nav a:hover {
    color: #ff7f50;
}

.header .user-auth a:hover {
    text-decoration: underline;
}

.recipes {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.recipe-box {
    border: 1px solid #c9e1f3;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 248, 255, 0.94) 100%);
    border-radius: 18px;
    padding: 18px;
    margin: 12px;
    width: 220px;
    text-align: center;
    box-shadow: 0 14px 30px rgba(80, 149, 214, 0.14);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
}

.tags span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e4f4ff;
    color: #2f74ad;
    border: 1px solid #c2e3f8;
}

h1 {
    color: #21486d;
    font-weight: bold;
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

h2 {
    display: flex;
    justify-content: center;
}

p {
    color: #35526f;
}

a {
    color: #3a78b5;
}

a:hover {
    color: #ff7f50;
}

.home-description {
    display: flex;
    justify-content: center;
}

.recipe-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.recipe-meta p {
    margin: 0;
}

.recipe-info p {
    margin: 5px 0;
}

.recipe-page {
    width: min(1120px, 100%);
    margin: 0 auto 48px;
}

.recipe-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 420px);
    gap: 32px;
    align-items: stretch;
    margin-top: 24px;
    padding: 32px;
    border: 1px solid #cbe1f0;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 44px rgba(93, 154, 214, 0.16);
    backdrop-filter: blur(8px);
}

.recipe-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.recipe-kicker {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ff8c61;
    font-weight: bold;
}

.recipe-hero h1 {
    justify-content: flex-start;
    margin: 0;
    font-size: clamp(2.4rem, 4vw, 4rem);
    line-height: 0.95;
    color: #21486d;
}

.recipe-description {
    margin: 0;
    max-width: 60ch;
    font-size: 1.08rem;
    line-height: 1.8;
    color: #4c6781;
}

.recipe-hero-media {
    display: flex;
    flex-direction: wrap;
    flex-direction: column;
}

.recipe-photo {
    width: 100%;
    height: 75%;
    min-height: 320px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(73, 143, 207, 0.18);
}

.recipe-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(76, 159, 224, 0.92), rgba(255, 154, 107, 0.88)),
        #4c9fe0;
    color: #f8fbff;
    font-size: 1.6rem;
    font-style: italic;
    text-align: center;
}

.recipe-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, .5fr));
    gap: 14px;
}

.recipe-stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #edf7ff 100%);
    border: 1px solid #d1e7f6;
}

.recipe-stat-card strong {
    color: #21486d;
    font-size: 1.05rem;
}

.recipe-stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5f87ab;
}

.message-stack {
    margin-top: 18px;
}

.message-banner {
    padding: 14px 18px;
    border-radius: 14px;
    background: #fff2d9;
    border: 1px solid #ffd69c;
    color: #8b5c21;
}

.recipe-panels {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.recipe-panel {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #cbe3f3;
    box-shadow: 0 12px 32px rgba(93, 154, 214, 0.12);
}

.section-heading h3 {
    margin: 0;
    color: #21486d;
}

.section-heading p {
    margin: 8px 0 0;
    color: #6a88a5;
}

.recipe-columns {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(320px, 1fr);
    gap: 28px;
    align-items: start;
    margin-top: 0;
}

.ingredients,
.steps {
    border: 1px solid #cfe5f5;
    border-radius: 18px;
    padding: 20px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%);
    box-shadow: 0 4px 14px rgba(93, 154, 214, 0.12);
}

.ingredients h3,
.steps h3 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #21486d;
}

.ingredients ul,
.steps ol {
    margin: 0;
    padding-left: 22px;
    line-height: 1.7;
}

.ingredients li,
.steps li {
    margin-bottom: 10px;
}

.js-enabled [data-rating-submit] {
    display: none;
}

.rating-status {
    min-height: 1.2rem;
    margin-top: 8px;
    color: #5f7d99;
}

.rating-status.success {
    color: #3f9b76;
}

.rating-status.error {
    color: #d16262;
}

form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.ratings-comments {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 0;
}

.rating-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.rating-summary,
.panel-note {
    margin: 0;
    line-height: 1.6;
}

textarea {
    width: 100%;
    max-width: none;
    min-height: 120px;
    padding: 14px 16px;
    margin: 0;
    border: 1px solid #cfe2f1;
    border-radius: 14px;
    resize: vertical;
    box-sizing: border-box;
    font: inherit;
    background: #fbfeff;
    color: #29435c;
}

.recipe-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    margin-left: 10%;
}

select,
button {
    font: inherit;
}

select {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #cfe2f1;
    background: #fbfeff;
    color: #29435c;
}

button {
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f9ddf 0%, #79c3f2 100%);
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(79, 157, 223, 0.24);
}

button:hover {
    filter: brightness(1.05);
}

.comment-form {
    gap: 10px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-card {
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f9ff 100%);
    border: 1px solid #d2e6f5;
}

.comment-card p {
    margin: 0;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px !important;
    color: #6a88a5;
    font-size: 0.95rem;
}

.comments-panel {
    margin-top: 24px;
}

@media (max-width: 768px) {
    body {
        min-height: 100vh;
    }

    .page-shell {
        width: calc(100% - 28px);
        max-width: 1180px;
        padding: 14px 0 28px;
    }

    .header {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }

    .header .nav,
    .header .user-auth {
        justify-self: center;
    }

    .recipe-columns,
    .recipe-hero,
    .recipe-panels {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .recipe-hero {
        padding: 20px;
    }

    .recipe-stat-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .recipe-photo {
        min-height: 100px;
    }

    .comment-meta {
        flex-direction: column;
    }
}


/* Style for search.html */
.search-block{
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.search-block p {
    padding: 20px;
    color: #6a88a5;
}

/* styling for login page */
.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%);
    border: 1px solid #d2e6f5;
    box-shadow: 0 12px 32px rgba(93, 154, 214, 0.12);
}

.profile-intro {
    text-align: center;
    color: #21486d;
}
