
body {
    font-family: Arial, sans-serif;
    background-color: white;
    color: rgb(24, 23, 23);
    line-height: 1.5;
}

a{
    color: mediumpurple;
    text-decoration: none;
}

a:hover { text-decoration: underline;}

header {
    background: white;
    border-bottom: 1px solid rgb(208, 206, 206);
    padding: 0.75rem 1rem;
}

.header-inner {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.header-brand a {
    font-size: 1.25rem;
    font-weight: bold;
    color: mediumpurple;
}

nav {
    display: flex;
    gap: 1rem;
    flex: 1;
}

nav a {
    color: mediumpurple;
}

.header-account {
    font-size: 1rem;
    white-space: nowrap;
}

.container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: .5rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: .5rem;
}

.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.recipe-card {
    background: white;
    border: 1px solid rgb(208, 206, 206);
    border-radius: 5px;
    padding: 1rem 1.25rem;
}

.recipe-card h2 {
    margin-bottom: 0.25rem;
}

.recipe-card img{
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.recipe-card p {
    margin-bottom: 0.5rem;
    color: rgb(24, 23, 23);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.tag{
    background: rgb(249, 210, 216);
    color:rgb(129, 19, 129);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1000px;
}

.search-block {
    margin: 1.5rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-block input[type="search"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgb(208, 206, 206);
    border-radius: 4px;
    font-size: 1rem;
}

.search-block button, .login-form button {
    padding: 0.5rem 1rem;
    background: mediumpurple;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.search-block button:hover, .login-form button:hover {
    background: rgb(129, 19, 129);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: white;
    border: 1px solid rgb(208, 206, 206);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.profile-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgb(129, 19, 129);
    color: white;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-details h1{
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.profile-details p {
    color: black;
    font-size: 0.9rem;
}

.recipe-author {
    color:grey;
    margin-bottom: .25rem;
}

.rating-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: .75rem;
}

.recipe-photo {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 6px;
    margin: 1rem 0;
}

.recipe-description {
    margin: 1rem 0;
}

.recipe-info {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    background: white;
    border: 1px solid rgb(208, 206, 206);
    border-radius: 5px;
    padding: .75rem 1rem;
    margin: 1rem 0;
    font-size: .9rem;
}

.recipe-columns {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.recipe-columns section {
    flex: 1;
    min-width: 220px;
    background: white;
    border: 1px solid rgb(208, 206, 206);
    border-radius: 5px;
    padding: 1rem 1.25rem;
}

.recipe-columns ul, .recipe-columns ol {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.recipe-columns li { margin-bottom: 0.5rem;}

.recipe-photo-placeholder {
    width: 100px;
    height: 100px;
    background: rgb(249, 210, 216);
    border: 1px solid rgb(208, 206, 206);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: grey;
    font-size: 0.95rem;
    margin: 1rem 0;
}

.login-form{
    max-width: 360px;
}

.login-form p {
    margin-bottom: 1rem;
}

.login-form input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgb(208, 206, 206);
    border-radius: 4px;
    font-size: 1rem;
    margin-top: .25rem;
}

.error {
    color: red;
    margin-bottom: 1rem;
}

@media(max-width: 600px) {
    .header-inner {
        gap: 0.75rem;
    }

    .recipe-columns {
        flex-direction: column;
        gap: 1rem;
    }

    .recipe-info { 
        gap: 0.75; 
        font-size: 0.85;
    }


}

/* ── Star ratings ─────────────────────────────────── */

.star {
    display: inline-block;
    position: relative;
    font-size: 1.5rem;
    color: #ddd;
    line-height: 1;
    cursor: default;
}

.star.full {
    color: #f5a623;
}

.star.half::after {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    color: #f5a623;
    clip-path: inset(0 50% 0 0);
}

.rating-section {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: white;
    border: 1px solid rgb(208, 206, 206);
    border-radius: 6px;
}

.rating-section h2 {
    margin-bottom: 0.5rem;
}

.stars-display {
    display: flex;
    gap: 0.05rem;
    margin-bottom: 0.25rem;
}

.rating-count {
    color: grey;
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.rating-unrated {
    color: grey;
    font-style: italic;
    margin: 0;
}

.rating-picker {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgb(208, 206, 206);
}

.rating-picker-label {
    font-size: 0.9rem;
    color: grey;
    margin-bottom: 0.25rem;
}

.stars-picker {
    display: flex;
    gap: 0.05rem;
    cursor: pointer;
}

.stars-picker .star {
    font-size: 2rem;
    cursor: pointer;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 0.05rem;
    margin-top: 0.5rem;
}

.card-rating .star {
    font-size: 1rem;
}

.card-rating .rating-unrated {
    color: grey;
    font-size: 0.8rem;
    font-style: italic;
}