body {
    font-family: Arial, sans-serif;
    background-color: #e5d6bc;
    color: black;
    font-size: 16px;
    line-height: 1.7;
}

a {
    color: brown;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.top {
    background: white;
    border-bottom: 1px solid brown;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 52px;
}

.title {
    font-size: 1.3rem;
    font-weight: bold;
    color: black;
}

.loginlogout {
    font-size: 0.9rem;
    color: gray;
}

.nav {
    background: white;
    padding: 0 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.nav a {
    font-size: 0.9rem;
    color: gray;
}

.nav a:hover {
    color: brown;
    text-decoration: underline;
}

@media (max-width: 700px) {
    .recipe-columns {
        flex-direction: column;
    }

    .profile-intro {
        flex-direction: column;
    }

    .recipe-card {
        max-width: 100%;
    }
}

/* Also using auto feels wrong but it seems to be the easiest way to center */
.page_content {
    margin: 2rem auto;
    padding: 0 1.5rem;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: black;
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: black;
}

.recipes, .recipes-list, .cards-area {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.recipe-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    flex: 260px;
    max-width: 340px; /* keeps them from stretching across the page */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recipe-card h2 {
    font-size: 1.1rem;
    margin: 0;
}

.recipe-card img {
    width: 100%;
    border-radius: 4px;
    object-fit: cover;
    height: 180px;
}

.recipe-card p {
    font-size: 0.9rem;
    color: gray;
    flex: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tags span {
    background: white;
    color: brown;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
}

.login-form {
    max-width: 400px;
    margin: 2rem;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.login-form label {
    font-size: 0.9rem;
    color: gray;
}

.login-form input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid lightgray;
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 0.3rem;
}

.login-form button {
    padding: 0.6rem 1.2rem;
    background: brown;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    align-self: flex-start;
}

.profile-intro {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.profile-intro img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.recipe-info {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 2rem;
}

.recipe-info p {
    font-size: 0.9rem;
    color: darkgray;
    margin: 0;
}

.recipe-columns {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.recipe-columns div {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 1.2rem;
}

.recipe-columns ul,
.recipe-columns ol {
    padding-left: 1.2rem;
    font-size: 0.95rem;
    color: darkgray;
}

.recipe-columns li {
    margin-bottom: 0.5rem;
}

.search-block {
    max-width: 600px;
    margin-bottom: 2rem;
}

.search-block form {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.search-block label {
    font-size: 0.9rem;
    color: darkgray;
}

.search-block input {
    flex: 1;
    padding: 0.5rem 0.7rem;
    border: 1px solid lightgray;
    border-radius: 4px;
    font-size: 1rem;
}

.search-block button {
    padding: 0.5rem 1rem;
    background: brown;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

/* rating stuff below here */
.rating-widget {
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    display: inline-block;
}

.stars {
    display: flex;
    gap: 0.2rem;
    margin-bottom: 0.4rem;
}

.star {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: lightgray;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.1s;
}

.star.filled {
    color: goldenrod;
}

.star:disabled {
    cursor: default;
}

.rating-summary {
    font-size: 0.9rem;
    color: gray;
    margin: 0;
}

.stars-display {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.star-display {
    font-size: 1.2rem;
    color: lightgray;
    line-height: 1;
}

.star-display.filled {
    color: goldenrod;
}

.star-display.half {
    /* Clip the left half only to gold using a gradient */
    background: linear-gradient(90deg, goldenrod 50%, lightgray 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star-count {
    font-size: 0.85rem;
    color: gray;
    margin-left: 0.3rem;
}