@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #708238; /* Olive Green */
    --primary-dark-hover: #5a6b2c; /* Darker Olive for hover */
    --secondary-color: #D8EAD3; /* Brighter Light Green */
    --background-color: #E9F2E9; /* Slightly darker background */
    --text-color: #2F4F4F;      /* Dark Slate Gray */
    --light-gray: #E0E0E0;      /* Light Gray for borders */
    --dark-gray: #708238;      /* Olive Green for secondary text/headings */
    --white-color: #fff;
    --black-color: #000;
    --google-red: #DB4437;
    --facebook-blue: #4267B2;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

header {
    background: var(--white-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: var(--primary-color);
    margin: 0;
    font-size: 2rem;
}

.logo-lets, .logo-it {
    color: var(--primary-color);
}

.logo-eat {
    color: var(--text-color);
}

.logo-link {
    text-decoration: none;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.language-selector {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.language-selector img {
    width: 24px;
    height: auto;
    border: 1px solid var(--light-gray);
    transition: transform 0.2s, box-shadow 0.2s;
}

.language-selector a:hover img {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

nav a {
    color: var(--dark-gray);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

main {
    flex-grow: 1;
    padding: 2rem 0;
}

.search-section {
    text-align: center;
    padding: 4rem 0;
    background: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.search-section h2 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: var(--dark-gray);
}

.search-container {
    position: relative;
    width: 80%;
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    width: 100%;
    padding: 1rem 4rem 1rem 1.5rem;
    font-size: 1.2rem;
    border-radius: 50px;
    border: 2px solid var(--light-gray);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: var(--primary-dark-hover); /* Darker olive */
}

.info-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: var(--secondary-color);
    border-radius: 12px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.info-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-weight: bold;
    flex-shrink: 0;
    margin-left: 1rem;
    margin-right: 1rem;
}

.info-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.info-text li {
    margin-bottom: 0.25em;
}

.info-text li:last-child {
    margin-bottom: 0;
}

.top-meals-section {
    margin-top: 3rem;
    text-align: center;
}

.top-meals-section h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark-gray);
}

.top-meals-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.top-meal-item {
    background: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 200px;
    text-align: left;
    overflow: hidden;
}

.top-meal-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.top-meal-details {
    padding: 1rem;
}

.top-meal-title {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.top-meal-meta {
    font-size: 0.85rem;
    color: var(--dark-gray);
    margin: 0;
}

.top-meal-link {
    text-decoration: none;
    color: inherit;
}

.login-container {
    text-align: center;
    padding: 4rem 0;
    background: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.login-container h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark-gray);
    font-weight: 600;
}

.sso-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.sso-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    color: var(--white-color);
    font-weight: 500;
    width: 80%;
    max-width: 300px;
    transition: transform 0.2s;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.sso-button:hover {
    transform: translateY(-2px);
}

.sso-button.google {
    background-color: var(--google-red);
}

.sso-button.facebook {
    background-color: var(--facebook-blue);
}

.sso-button.apple {
    background-color: var(--black-color);
}

.sso-button.custom-login {
    background-color: var(--primary-color);
    margin-top: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.sso-button.register-button {
    background-color: var(--primary-color);
    border-radius: 50px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2rem;
    width: 100%;
}

.login-form {
    margin-top: 2rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    row-gap: 1rem;
    column-gap: 1.5rem;
    align-items: center;
}

.form-group {
    display: contents;
}

.form-group label {
    display: block;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--dark-gray);
    justify-self: end;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.form-group input[type="email"],
.form-group input[type="password"] {
    min-height: 48px;
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.login-form > .sso-button,
.login-form > .register-link {
    grid-column: 1 / -1;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white-color);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.scrollable-text {
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 1rem;
    white-space: pre-wrap;
    color: var(--text-color);
    flex-grow: 1;
}

#close-recipe-text-btn {
    align-self: center;
    width: 50%;
    max-width: 200px;
}

.register-link {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: var(--text-color);
    text-align: center;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2.5rem auto;
    color: var(--dark-gray);
    max-width: 300px;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--light-gray);
}

.separator:not(:empty)::before {
    margin-right: 1em;
}

.separator:not(:empty)::after {
    margin-left: 1em;
}

.separator span {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--dark-gray);
}

footer {
    background: var(--dark-gray);
    color: var(--white-color);
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

.db-search-section {
    margin-bottom: 2rem;
}

.db-container {
    display: flex;
    gap: 2rem;
}

.filter-sidebar {
    width: 200px;
    flex-shrink: 0;
}

.filter-sidebar h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.favs-input {
    width: 60px;
    margin: 0 0.5rem;
}

.filter-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.results-area {
    flex-grow: 1;
}

.result-item {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: var(--white-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result-image,
.result-image-placeholder {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background-color: var(--secondary-color);
    border-radius: 8px;
    flex-shrink: 0;
}

.result-details {
    flex-grow: 1;
}

.result-title {
    margin: 0 0 0.25rem;
}

.result-meta {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin: 0 0 0.5rem;
}

.result-description {
    margin: 0;
    font-size: 0.95rem;
}

.cook-now-button {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    white-space: nowrap;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a {
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
}

.pagination a.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    nav {
        margin-top: 1rem;
    }
    .search-section h2 {
        font-size: 2rem;
    }
    .search-box {
        width: 90%;
    }
    .db-container {
        flex-direction: column;
    }
    .filter-sidebar {
        width: 100%;
        margin-bottom: 2rem;
    }
}

.assistant-body {
    background-color: var(--background-color);
    margin: 0;
    padding: 0rem;
    box-sizing: border-box;
}

.assistant-container {
    background-color: var(--white-color);
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 2rem);
    width: 100%;
}

.assistant-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}

.back-link {
    text-decoration: none;
    color: var(--dark-gray);
    margin-right: 2rem;
}

.meal-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
}

.meal-thumb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.meal-info h2 {
    margin: 0;
    font-size: 1.5rem;
}
.meal-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.action-btn, .fav-btn {
    background: var(--secondary-color);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
}

.fav-btn {
    background: transparent;
    font-size: 1.5rem;
    padding: 0.5rem;
    color: var(--dark-gray);
}

.step-display {
    flex-grow: 1;
    padding: 2rem 4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.step-zero-content h1, .step-content h2 {
    font-size: 2.5rem;
    margin: 0 0 1rem;
}

.step-zero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.ingredient-list {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 0;
}

.summary-box {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: left;
}

.summary-box .info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    background-color: transparent;
}

.summary-box .info-text h3 {
    margin-top: 0;
}

#timer-container {
    align-items: center;
    gap: 2rem;
}

.timer-display {
    font-size: 4rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.timer-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#start-timer, #reset-timer {
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
}

#start-timer {
    background-color: var(--primary-color);
    color: var(--white-color);
}

#reset-timer {
    background-color: var(--secondary-color);
}

.assistant-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-size: 1.5rem;
}

.assistant-footer .logo-lets,
.assistant-footer .logo-it {
    color: var(--white-color);
}

.assistant-footer .logo-eat {
    color: var(--text-color);
}

.step-counter {
    color: var(--dark-gray);
    text-align: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--light-gray);
}

.step-counter span {
    display: block;
}

.navigation-buttons button {
    padding: 0.75rem 2rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#prev-step {
    background-color: var(--secondary-color);
}

#next-step {
    background-color: var(--secondary-color);
}

#prev-step:not(:disabled):hover,
#next-step:not(:disabled):hover {
    background-color: var(--black-color);
    color: var(--white-color);
}

#prev-step:disabled {
    background-color: #eee;
    cursor: not-allowed;
}

.step-zero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    align-items: stretch;
}

.step-zero-left, .step-zero-right {
    text-align: left;
}

.step-zero-left {
    display: flex;
    flex-direction: column;
}

.step-zero-right .summary-box {
    height: 100%;
}

.step-zero-left .summary-box {
    margin-top: auto;
}

.step-zero-time {
    margin-top: 4rem;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
}
