/* Root font settings */
:root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #f5f5f5;
    font-family: serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

.sticky-header {
    position: sticky;
    top: 0;
    background: rgb(183, 241, 208);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Adjust existing container styles */
.container {
    padding-top: 20px;
    padding-left: 15px;
    padding-right: 15px;
}

.foodbot-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}


.foodbot-card h2 {
    margin: 0 0 15px 0;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.foodbot-card h3 {
    color: #444;
    margin: 10px 0;
}

.foodbot-card h4 {
    margin: 0 0 10px 0;
    color: #555;
}

.foodbot-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.foodbot-card li {
    font-weight: 500;
}

.notes {
    font-style: italic;
    color: #666;
    margin: 10px 0;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #ddd;
}

.ingredients {
    margin-top: 15px;
}

.ingredients h4 {
    color: #555;
    margin: 0 0 10px 0;
}

.ingredients ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.ingredients li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    gap: 20px;
}

.ingredient-name {
    font-weight: 500;
    flex: 1;
}

.ingredient-quantity {
    color: #666;
    min-width: 80px;
    text-align: right;
}

.meal-details {
    margin-top: 10px;
}

.calories {
    font-weight: bold;
    color: #666;
}

.food-items {
    margin-top: 10px;
}

.food-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.food-name {
    font-weight: 500;
}

.food-amount {
    color: #666;
}

.date-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 10px 0;
    border-bottom: 2px solid #eee;
}

.date-navigation h1 {
    margin: 0;
    font-size: 1.5rem;
}

.nav-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background: #e5e5e5;
}

.no-meals {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.daily-summary {
    margin-top: 40px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calorie-bar-container {
    margin: 20px 0;
}

.calorie-bar {
    width: 80%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    margin: 10px auto;
}

.calorie-segment {
    height: 100%;
    transition: width 0.3s ease;
}

/* Meal type colors */
.breakfast {
    background-color: #FF9F1C;
}

.lunch {
    background-color: #2EC4B6;
}

.dinner {
    background-color: #E71D36;
}

.snack {
    background-color: #7209B7;
}

.calorie-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.legend-text {
    font-size: 0.9rem;
    color: #666;
}

.meal-planned {
    border: 2px dashed #ccc;
    background-color: #fafafa;
}

.meal-consumed {
    border: 2px solid #ddd;
    background-color: #fff;
}

.planned-nutrients {
    opacity: 0.7;
}

.calories-consumed {
    font-weight: bold;
}

.calories-planned {
    opacity: 0.7;
    font-weight: normal;
}

.calorie-segment.planned {
    opacity: 0.5;
}

.legend-color.planned {
    opacity: 0.5;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.qr-container a {
    display: block;
}

.qr-code {
    width: 100%;
    height: auto;
}

.telegram-link {
    text-align: center;
    margin-top: 15px;
}

.telegram-link a {
    color: #0088cc;
    text-decoration: none;
    font-size: 1.2rem;
}

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

.nutrients-summary {
    margin: 15px 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.nutrients-summary h4 {
    margin: 0 0 10px 0;
    color: #555;
}

.nutrient-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.nutrient-table th,
.nutrient-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.nutrient-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #444;
}

.nutrient-table tr:hover {
    background-color: #f9f9f9;
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-right: 10px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.main-nav {
    margin-left: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 5px 10px;
    border-radius: 4px;
}

.main-nav a:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

.main-nav a.active {
    color: #2EC4B6;
    background: rgba(46, 196, 182, 0.1);
    font-weight: 600;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgb(183, 241, 208);
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav a {
        display: block;
        padding: 10px 0;
    }

    /* Hamburger animation */
    .menu-toggle.active .hamburger:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .hamburger:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Text Card Styles */
.text-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.text-card h2 {
    margin: 0 0 15px 0;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.text-card h3 {
    color: #2EC4B6;
    margin: 25px 0 15px 0;
    font-size: 1.3em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.text-card p {
    color: #666;
    line-height: 1.6;
    margin: 15px 0;
}

.text-card ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-card ul li {
    position: relative;
    padding-left: 28px;
    line-height: 1.5;
    color: #444;
    font-weight: 500;
}

.text-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: rgb(183, 241, 208);
    font-size: 1.5em;
    line-height: 1;
    top: -2px;
}

.text-card .notes {
    font-style: italic;
    color: #666;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-left: 3px solid #ddd;
}

.text-card .telegram-link {
    text-align: center;
    margin-top: 25px;
}

.text-card .telegram-link a {
    color: #0088cc;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
}

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

.logout-btn {
    color: #666 !important;
    font-size: 0.9em;
    opacity: 0.8;
}

.logout-btn:hover {
    opacity: 1;
    color: #333 !important;
}

.flash-message {
    margin: 20px auto;
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 600px;
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.flash-message.error {
    background-color: #fff3f3;
    color: #d63031;
    border: 1px solid #ff7675;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.error-actions {
    margin-top: 20px;
    text-align: center;
}

.error-actions .nav-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2EC4B6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.error-actions .nav-btn:hover {
    background: #28b3a6;
}

.feature-card {
    height: 100%;
    transition: transform 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
}
.feature-card img {
    width: 40%;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: cover;
    border-radius: 8px;
}
.feature-card .card-body {
    padding: 1.25rem;
}
.feature-card .card-body p {
    margin-bottom: 0;
}
.feature-card h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Override Bootstrap card styles */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: #fff;
    margin-bottom: 1rem;
}

.card-body {
    padding: 1.25rem;
}

/* Override Bootstrap text colors */
.text-muted {
    color: #666 !important;
}

.nutrient-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 0.25rem;
}

.nutrient-item:not(:last-child) {
    margin-right: 0.5rem;
}