/* ===== BASE / LAYOUT ===== */

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER ===== */

header {
    background-color: #0880bd;
    color: white;
    text-align: center;
    padding: 1.5rem;
    width: 100%;
    max-width: 900px;
    border-radius: 12px;
    margin: 0 auto;
}

header h1 {
    font-size: 2.2rem;
}

/* ===== FOOTER ===== */

footer {
    background-color: #0880bd;
    color: white;
    margin-top: auto;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

footer p {
    margin: 0;
}

.contact-btn {
    padding: 0.4rem 1rem;
    background-color: white;
    color: #0880bd;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.contact-btn:hover {
    background-color: #e0e0e0;
}

/* ===== SHARED BUTTON (used for "back" links on any page) ===== */
/* Uses "a.btn-primary" (element + class) so it isn't accidentally
   overridden by more specific rules like ".contact-page a" */

a.btn-primary {
    display: inline-block;
    margin: 1rem;
    padding: 0.5rem 1.2rem;
    background-color: #0880bd;
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

a.btn-primary:hover {
    background-color: #029ceb;
}

/* ===== HOMEPAGE ===== */

#ingredient-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
}

#ingredients {
    width: 90%;
    max-width: 400px;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#search-btn {
    padding: 0.75rem 1.5rem;
    background-color: #0880bd;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

#search-btn:hover {
    background-color: #029ceb;
}

#recipe-results {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.recipe-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 150px;
}

.recipe-card img {
    width: 100%;
    border-radius: 6px;
}

#featured-results {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

#featured h2 {
    text-align: center;
    color: #0880bd;
    margin: 1.5rem 0 0.5rem;
}

/* ===== RECIPE PAGE ===== */

.recipe-page {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.recipe-hero {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
    text-align: center;
}

.recipe-hero img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.recipe-hero h2 {
    padding: 1.25rem;
    color: #0880bd;
    font-size: 1.6rem;
}

.recipe-instructions {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.recipe-instructions h3 {
    color: #0880bd;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 0.5rem;
}

.recipe-instructions p {
    line-height: 1.8;
    white-space: pre-line;
    color: #333;
}

.steps-list {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
    line-height: 1.6;
    color: #333;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background-color: #0880bd;
    color: white;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* ===== CONTACT PAGE ===== */

.contact-page {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.contact-page h2 {
    color: #0880bd;
    margin-bottom: 1rem;
}

.contact-page p {
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

.contact-page a {
    color: #0880bd;
    font-weight: bold;
    text-decoration: none;
}

.contact-page a:hover {
    text-decoration: underline;
}

#message-bottom p {
    color: darkgray;
}


.auth-page {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.auth-page h2 {
    color: #0880bd;
    margin-bottom: 1.5rem;
}

.auth-page form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.auth-page label {
    font-weight: bold;
    font-size: 0.9rem;
}

.auth-page input {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.auth-page button {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #0880bd;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}

.auth-page button:hover {
    background-color: #029ceb;
}

.auth-page p {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-page a {
    color: #0880bd;
    font-weight: bold;
    text-decoration: none;
}

.auth-page a:hover {
    text-decoration: underline;
}


.google-btn {
    display: block;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: white;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
}

.google-btn:hover {
    background-color: #f4f4f4;
}

.profile-btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 1rem;
    background-color: white;
    color: #0880bd;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
}

.profile-btn:hover {
    background-color: #e0e0e0;
}