/* ===== Layout ===== */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
}

.main-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 16px;
}

/* ===== Header ===== */
header {
    background: white;
    border-bottom: 1px solid #ddd;
}

.header-content {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
}

/* ===== Links ===== */
a {
    color: #0077cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== Cards ===== */
.cards-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recipe-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
}

.recipe-card img {
    width: 100%;
    border-radius: 6px;
}

/* ===== Sections ===== */
h1, h2 {
    margin-top: 0;
}

section {
    margin-bottom: 24px;
}

/* Recipe page layout */
.recipe-info {
    background: white;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 16px 0;
    border-radius: 6px;
}

#rating button {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.3;
}

#rating button.active {
    opacity: 1;
}

#rating button:hover {
    opacity: 0.7;
}

.recipe-columns {
    display: flex;
    gap: 24px;
}

.recipe-columns > div {
    flex: 1;
}



/* make columns stack on small screens */
@media (max-width: 600px) {
    .recipe-columns {
        flex-direction: column;
    }
}

/* ingredients + steps */
.recipe-columns ul,
.recipe-columns ol {
    padding-left: 20px;
}

/* ===== Responsive Design ===== */

/* Make images never overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Header stacks nicely on small screens */
@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Recipe cards spacing stays clean */
@media (max-width: 600px) {
    .cards-area {
        gap: 12px;
    }
}

/* Recipe page columns stack on mobile */
@media (max-width: 600px) {
    .recipe-columns {
        flex-direction: column;
    }
}

/* Profile layout stacks */
@media (max-width: 600px) {
    .profile-intro {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
}

/* Improve form usability on mobile */
@media (max-width: 600px) {
    input, button {
        width: 100%;
        box-sizing: border-box;
        margin-top: 6px;
    }
}