:root {
    --primary-color: #ff6b6b;
    --primary-dark: #ee5253;
    --primary-light: #ff9a9e;
    --secondary-color: #54a0ff;
    --secondary-dark: #2e86de;
    --accent-color: #5f27cd;
    --success-color: #10ac84;
    --warning-color: #ff9f43;
    --error-color: #ee5253;
    --background-color: #ffffff;
    --background-alt: #f8f9fa;
    --text-color: #2d3436;
    --text-muted: #636e72;
    --border-color: #dfe6e9;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --container-width: 1200px;
    --header-height: 70px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 1rem auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.btn-social:hover {
    background-color: var(--background-alt);
}

.social-icon {
    margin-right: 10px;
    font-weight: bold;
}

.btn-google .social-icon {
    color: #DB4437;
}

.btn-facebook .social-icon {
    color: #4267B2;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
}

.nav-links a {
    margin: 0 1rem;
    color: var(--text-color);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    background-color: var(--background-alt);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Features Section */
.features {
    padding: 5rem 0;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

/* CTA Section */
.cta {
    padding: 5rem 0;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta .btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.cta .btn-primary:hover {
    background-color: var(--background-alt);
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: var(--background-alt);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: #2d3436;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.footer-logo h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-column h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Authentication Pages */
.auth-section {
    padding: 5rem 0;
    background-color: var(--background-alt);
    min-height: calc(100vh - var(--header-height) - 400px);
    display: flex;
    align-items: center;
}

.auth-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
}

.auth-form-container {
    flex: 1;
    padding: 3rem;
}

.auth-form-container h2 {
    margin-bottom: 0.5rem;
}

.auth-form-container>p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.forgot-password {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-password a {
    font-size: 0.9rem;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.auth-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.auth-divider span {
    position: relative;
    background-color: white;
    padding: 0 1rem;
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
}

.auth-image {
    flex: 1;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-image img {
    max-width: 100%;
    height: auto;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group.checkbox input {
    width: auto;
}

.password-requirements {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Dashboard Styles */
.dashboard-body {
    background-color: var(--background-alt);
}

.dashboard-header {
    background-color: white;
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 0.5rem 0;
    min-width: 150px;
    display: none;
}

.user-menu:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-color);
}

.dropdown-menu a:hover {
    background-color: var(--background-alt);
}

.dashboard-main {
    padding: 2rem 0;
    min-height: calc(100vh - var(--header-height) - 200px);
}

.dashboard-welcome {
    margin-bottom: 2rem;
}

.diet-creator {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.diet-creator-header {
    margin-bottom: 1.5rem;
}

.diet-creator-header p {
    color: var(--text-muted);
}

.diet-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
}

.diet-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.diet-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.diet-form-tips {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.quick-access {
    margin-top: 3rem;
}

.quick-access-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.quick-access-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    color: var(--text-color);
}

.quick-access-card:hover {
    transform: translateY(-5px);
}

.quick-access-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.quick-access-content h4 {
    margin-bottom: 0.25rem;
}

.quick-access-content p {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* History Page */
.history-header {
    margin-bottom: 2rem;
}

.history-filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 500px;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}

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

.search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-options select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    background-color: white;
}

.filter-options select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.diet-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.diet-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    transition: var(--transition);
    color: var(--text-color);
    display: block;
}

.diet-card:hover {
    transform: translateY(-5px);
}

.diet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.diet-card-header h3 {
    margin-bottom: 0;
    font-size: 1.2rem;
}

.diet-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.diet-prompt {
    margin-bottom: 1rem;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.diet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.diet-tag {
    background-color: var(--primary-light);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    margin: 0 1rem;
}

.pagination-numbers a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: var(--text-color);
    font-weight: 500;
}

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

.pagination-prev,
.pagination-next {
    padding: 0.5rem 1rem;
    background-color: white;
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-weight: 500;
}

/* Diet Detail Page */
.diet-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-button {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.diet-detail-title h2 {
    margin-bottom: 0.25rem;
}

.diet-actions {
    display: flex;
    gap: 1rem;
}

.chat-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.chat-messages {
    padding: 2rem;
    max-height: 600px;
    overflow-y: auto;
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar.ai {
    background-color: var(--primary-color);
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.message-author {
    font-weight: 600;
}

.message-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.message-body {
    background-color: var(--background-alt);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.message-body h4,
.message-body h5 {
    color: var(--text-color);
}

.message-body p {
    margin-bottom: 0.75rem;
}

.message-body p:last-child {
    margin-bottom: 0;
}

.user-message .message-body {
    background-color: var(--background-alt);
}

.ai-message .message-body {
    background-color: rgba(255, 107, 107, 0.05);
}

.chat-input {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.chat-form {
    display: flex;
    gap: 1rem;
}

.chat-form textarea {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    height: 60px;
}

.chat-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.15); /* Glass effect */
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    width: 300px; /* Adjust width as needed */
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-bottom: 15px;
    font-size: 20px;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
}

.modal-content button {
    background-color: #ff5722;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.modal-content button:hover {
    background-color: #e64a19;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
    }

    .about-content {
        flex-direction: column;
    }

    .auth-container {
        flex-direction: column;
    }

    .auth-image {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .diet-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-filters {
        flex-direction: column;
    }

    .search-bar {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .auth-form-container {
        padding: 2rem 1.5rem;
    }

    .diet-cards {
        grid-template-columns: 1fr;
    }

    .chat-form {
        flex-direction: column;
    }
}