:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --background-color: rgba(247, 249, 252, 0.75);
    --surface-color: #ffffff;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e2e2e2;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.dark-mode {
    --background-color: rgba(26, 33, 46, 0.7);
    --surface-color: #16213e;
    --text-color: #e0e0e0;
    --text-light: #a7a7a7;
    --border-color: #2c3e50;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

html {
    font-size: 62.5%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-image: url('../img/food_pattern_bg.png');
    background-repeat: repeat;
    background-size: 200px;
    background-attachment: fixed;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: color 0.3s;
    position: relative;
    font-size: 1.6rem;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: -1;
    transition: background-color 0.3s;
}

header {
    background-color: var(--surface-color);
    padding: 1rem 5%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 2.4rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 0.5rem;
    font-size: 1.6rem;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

main {
    flex-grow: 1;
    position: relative;
    z-index: 0;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

h1, h2, h3, h4 {
    color: var(--text-color);
}

.search-container {
    display: flex;
    gap: 1rem;
    max-width: 800px;
    margin: 2rem auto 3rem;
    box-shadow: var(--shadow);
    border-radius: 50px;
    overflow: hidden;
    background-color: var(--surface-color);
    transition: background-color 0.3s;
}

.search-container input {
    flex-grow: 1;
    border: none;
    padding: 1.25rem 1.5rem;
    font-size: 1.6rem;
    outline: none;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s;
    background-color: transparent;
    color: var(--text-color);
}

.search-container button {
    padding: 0 2.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-container button:hover {
    background-color: var(--primary-dark);
}

/* NEW ZOMATO-STYLE CARD STYLES */
.recipe-block {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    height: 100%;
}
.recipe-block:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}
.card-image-container {
    position: relative;
}
.card-image-container img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.card-content {
    padding: 1rem 1.5rem;
}
.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.card-title-row h4 {
    font-size: 1.7rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}
.card-info-row {
    margin-top: 0.5rem;
}
.card-info-row p {
    font-size: 1.4rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* END NEW CARD STYLES */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease, background-color 0.3s;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
}

/* Home Page Styles */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}
.hero p {
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 1rem 0 2rem;
}
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.6rem;
    transition: background-color 0.2s, transform 0.2s;
}
.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}
.featured-recipes {
    margin-top: 4rem;
}
.featured-recipes h2 {
    font-size: 3.2rem;
    margin-bottom: 2rem;
}
.recipe-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Theme Toggle Switch */
.theme-switch {
    display: flex;
    align-items: center;
}
.theme-switch input {
    display: none;
}
.theme-switch label {
    display: block;
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}
.theme-switch label::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}
.theme-switch input:checked + label {
    background-color: var(--primary-color);
}
.theme-switch input:checked + label::after {
    transform: translateX(24px);
}

/* NEW FOOTER STYLES */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 4rem 5% 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.footer-column h4 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-about {
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--text-light);
}

.footer-quick-links a,
.footer-social a {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    transition: color 0.2s, padding-left 0.2s;
}

.footer-quick-links a:hover,
.footer-social a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social {
    margin-top: 1.5rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid #4a4a5e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    color: var(--text-light);
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        margin-top: 1rem;
    }
}

/* Login Page Styles */
.login-container {
    max-width: 500px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
}
.form-group label {
    font-weight: 600;
}
.form-control {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}
.form-control:focus {
    background-color: var(--background-color);
    border-color: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
/* Profile Page Styles */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
/* Save Recipe Button in Modal */
.modal-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}