/* Локальные шрифты TildaSans подключены через fonts.css */

:root {
    /* Комплиментарная цветовая схема */
    --gradient-primary: linear-gradient(180deg, #E3FE14 0%, #F2FF8B 100%);
    --gradient-secondary: linear-gradient(180deg, #8B5CF6 0%, #A78BFA 100%);
    --gradient-accent: linear-gradient(180deg, #F59E0B 0%, #FCD34D 100%);
    --gradient-success: linear-gradient(180deg, #10B981 0%, #34D399 100%);
    --gradient-danger: linear-gradient(180deg, #EF4444 0%, #F87171 100%);
    --gradient-info: linear-gradient(180deg, #3B82F6 0%, #60A5FA 100%);
    
    /* Дополнительные градиенты */
    --gradient-warm: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    --gradient-cool: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    --gradient-purple: linear-gradient(135deg, #E879F9 0%, #C084FC 100%);
    --gradient-pink: linear-gradient(135deg, #F472B6 0%, #EC4899 100%);
    
    /* Основные цвета */
    --color-primary: #E3FE14;
    --color-secondary: #8B5CF6;
    --color-accent: #F59E0B;
    --color-text: #1F2937;
    --color-text-light: #6B7280;
    
    /* Фоны */
    --bg-main: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    --bg-white: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.9);
    
    /* Типографика */
    --font-family: 'TildaSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
    --font-h1: 28px;
    --font-h2: 20px;
    --font-date: 14px;
    
    /* Отступы */
    --padding-main: 20px;
    --container-width: 375px;
    
    /* Масштабирование навигации */
    --nav-scale: max(0.3, min(1, calc(100vw - 40px) / 896px));
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-main);
    color: var(--color-text);
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-weight: 400; /* TildaSans Regular */
}

/* Утилитарные классы для весов шрифтов */
.font-light { 
    font-weight: 300; 
    letter-spacing: 0.01em;
}

.font-regular { 
    font-weight: 400; 
}

.font-medium { 
    font-weight: 500; 
    letter-spacing: -0.01em;
}

.font-semibold { 
    font-weight: 600; 
    letter-spacing: -0.02em;
}

.font-bold { 
    font-weight: 700; 
    letter-spacing: -0.02em;
}

.font-extrabold { 
    font-weight: 800; 
    letter-spacing: -0.03em;
}

.font-black { 
    font-weight: 900; 
    letter-spacing: -0.04em;
}

.app-container {
    max-width: var(--container-width);
    margin: 0 auto;
    background: var(--bg-white);
    min-height: 100vh;
    position: relative;
    padding-bottom: 120px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

/* Экраны - упрощенные стили */
.screen {
    display: none;
    background: var(--bg-main);
    padding: 20px;
    min-height: 80vh;
    width: 100%;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Заголовок */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 0;
}

.header-text h1 {
    font-size: 28px;
    font-weight: 800; /* TildaSans ExtraBold */
    margin-bottom: 8px;
    color: #333;
    letter-spacing: -0.5px;
}

.date {
    color: #666;
    font-size: 14px;
}

.settings-btn, .close-btn {
    background: var(--white);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-main);
}

.settings-btn:hover, .close-btn:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.admin-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 2px solid #FF8C00;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    margin-left: 10px;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.admin-btn:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 140, 0, 0.4);
}

/* Индикатор калорий */
.calorie-indicator {
    text-align: center;
    margin-bottom: 30px;
}

.calorie-circle {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.calorie-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.percentage {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.amount {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 6px;
    font-weight: 500;
}

.norm-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.norm-dot {
    width: 12px;
    height: 12px;
    background: var(--gradient-primary);
    border-radius: 50%;
}
/* Календарь */
.calendar-section {
    margin-bottom: 25px;
}

.calendar-section h3 {
    font-size: 20px;
    font-weight: 700; /* TildaSans Bold */
    margin-bottom: 20px;
    color: #333;
    letter-spacing: -0.3px;
}

.calendar-week {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.day-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Состояния календаря с комплиментарной цветовой схемой */
.day-item.day-good {
    background: var(--gradient-success);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.day-item.day-high {
    background: var(--gradient-danger);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.day-item.day-low {
    background: var(--gradient-accent);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.day-item.day-early {
    background: var(--gradient-info);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.day-item.day-future {
    background: var(--gradient-cool);
    color: var(--color-text-light);
    opacity: 0.7;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.day-item.current-day {
    transform: scale(1.05);
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.day-item.selected {
    transform: scale(1.03);
    border: 2px solid #c4ff00;
    box-shadow: 0 4px 15px rgba(196, 255, 0, 0.4) !important;
}

/* Стили для элементов дня */
.day-name {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}

.day-number {
    font-size: 16px;
    font-weight: 700;
}

.day-percent {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.9;
}

.day-status {
    font-size: 14px;
}

/* Анимация для умных советов */
.tip-text {
    transition: opacity 0.3s ease;
}

.tip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tip-refresh {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-refresh:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(180deg);
}

/* Стили для экрана прогресса */
.progress-content {
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.stats-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.primary {
    background: var(--gradient-secondary);
    color: white;
}

.stat-card.success {
    background: var(--gradient-success);
    color: white;
}

.stat-card.info {
    background: var(--gradient-info);
    color: white;
}

.stat-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Секции */
.chart-section, .macros-section, .achievements-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

/* Легенда графика */
.chart-legend {
    display: flex;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.target {
    background: #ff6b6b;
}

.legend-color.actual {
    background: #c4ff00;
}

.chart-container {
    margin: 20px 0;
    text-align: center;
}

.chart-info {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 10px;
}

/* БЖУ бары */
.macros-total {
    font-weight: 600;
    color: #666;
}

.macro-bar {
    margin-bottom: 20px;
}

.macro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.macro-name {
    font-weight: 600;
    font-size: 14px;
}

.macro-value {
    font-weight: 700;
    color: #333;
}

.macro-percentage {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.proteins {
    background: var(--gradient-danger);
}

.progress-fill.fats {
    background: var(--gradient-accent);
}

.progress-fill.carbs {
    background: var(--gradient-info);
}

.macro-target {
    font-size: 11px;
    color: #888;
}

/* Достижения */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
}

.achievement-item {
    text-align: center;
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.achievement-item.unlocked {
    background: var(--gradient-primary);
    color: var(--color-text);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(227, 254, 20, 0.3);
}

.achievement-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.achievement-name {
    font-size: 10px;
    font-weight: 600;
}

/* Стили для экрана ассистента */
.assistant-content {
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
}

/* Баннер разработки */
.development-banner {
    background: var(--gradient-accent);
    color: white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.dev-icon {
    font-size: 32px;
}

.dev-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
}

.dev-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Превью функций */
.features-preview {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.features-preview h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.feature-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.feature-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Сетка советов */
.tips-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tips-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
}

.tips-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tip-card.modern {
    background: var(--gradient-secondary);
    color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transition: transform 0.2s ease;
}

.tip-card.modern:nth-child(2) {
    background: var(--gradient-purple);
    box-shadow: 0 4px 15px rgba(232, 121, 249, 0.3);
}

.tip-card.modern:nth-child(3) {
    background: var(--gradient-info);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.tip-card.modern:hover {
    transform: translateY(-3px);
}

.tip-card.modern .tip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tip-card.modern .tip-icon {
    font-size: 24px;
}

.tip-category {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.tip-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
}

.tip-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}

/* Секция обратной связи */
.feedback-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.feedback-card h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.feedback-card p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.feedback-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feedback-btn {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.feedback-btn:active {
    transform: translateY(0);
}



.day-item.selected {
    background: var(--gradient-primary) !important;
    box-shadow: 0 4px 15px rgba(227, 254, 20, 0.4);
}

.day-name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    opacity: 0.7;
}

.day-number {
    display: block;
    font-size: 16px;
    font-weight: 700;
}

.day-percent {
    display: block;
    font-size: 10px;
    font-weight: 600;
    opacity: 0.8;
}

.track-results {
    font-size: 14px;
    color: #666;
    text-align: left;
}

/* Совет дня */
.tip-section {
    margin-bottom: 25px;
}

.tip-card {
    background: var(--primary-gradient);
    border-radius: var(--radius-pill);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-light);
    border: 2px solid var(--accent-color);
}

.tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.tip-text {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
}

/* Секция еды */
.meals-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.meal-list {
    margin-bottom: 20px;
}

.meal-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: #FFFFFF;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(238, 238, 238, 0.5);
    transition: all 0.3s ease;
}

.meal-item:last-child {
    border-bottom: none;
}

.meal-time {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.meal-info {
    flex: 1;
}

.meal-calories {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.meal-name {
    display: block;
    font-size: 14px;
    color: #666;
}


/* Нижняя навигация адаптированная под экран */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(896px * var(--nav-scale));
    height: calc(180px * var(--nav-scale));
    pointer-events: none;
}

/* Фоновая подложка навигации */
.nav-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.nav-bg-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Контейнер кнопок - точные размеры из Figma */
.nav-buttons {
    position: absolute;
    top: calc(20px * var(--nav-scale));
    left: calc(20px * var(--nav-scale));
    right: calc(20px * var(--nav-scale));
    bottom: calc(20px * var(--nav-scale));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(20px * var(--nav-scale));
    pointer-events: auto;
}

/* Кнопки навигации - размеры из Figma */
.nav-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: calc(140px * var(--nav-scale));
    height: calc(140px * var(--nav-scale));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: calc(70px * var(--nav-scale));
}

/* Активная кнопка - размеры из Figma (374x140px) */
.nav-btn.active {
    width: calc(374px * var(--nav-scale));
    height: calc(140px * var(--nav-scale));
    border-radius: calc(70px * var(--nav-scale));
    transform: none;
    transition: all 0.3s ease;
}

/* Фон кнопок */
.nav-btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.active-bg-svg,
.inactive-bg-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
    object-fit: contain;
    object-position: center;
    z-index: 1;
}

/* Показать активный фон только для активной кнопки */
.nav-btn:not(.active) .active-bg-svg {
    opacity: 0;
}

.nav-btn.active .active-bg-svg {
    opacity: 1;
    /* Убедимся что SVG помещается в границы кнопки */
    max-width: 100%;
    max-height: 100%;
}

/* Показать неактивный фон только для неактивных кнопок */
.nav-btn:not(.active) .inactive-bg-svg {
    opacity: 1;
    max-width: 100%;
    max-height: 100%;
}

.nav-btn.active .inactive-bg-svg {
    opacity: 0;
}

/* Содержимое кнопок */
.nav-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* На неактивных кнопках иконки точно по центру */
.nav-btn:not(.active) .nav-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

/* На неактивной кнопке текст полностью исключаем из разметки */
.nav-btn:not(.active) .nav-text {
    display: none !important;
}

/* На неактивной кнопке гарантируем отсутствие сдвигов у иконки */
.nav-btn:not(.active) .nav-icon,
.nav-btn:not(.active) .nav-icon-svg {
    transform: none !important;
    position: static;
}

/* Иконки - точные размеры из Figma, без дополнительных смещений */
.nav-icon, .nav-icon-svg {
    width: calc(44px * var(--nav-scale));
    height: calc(44px * var(--nav-scale));
    display: block;
    opacity: 1;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

/* Иконки скрыты на активной кнопке - показывается только текст */

/* Скрыть обычные иконки на активной кнопке */
.nav-btn.active .nav-icon {
    opacity: 0;
    display: none;
}

/* Скрыть SVG иконки на активной кнопке */
.nav-btn.active .nav-icon-svg {
    opacity: 0;
    display: none;
}

/* Текст - скрыт по умолчанию */
.nav-text {
    font-size: calc(24px * var(--nav-scale));
    font-weight: 600; /* Будет переопределен классом font-semibold */
    color: var(--color-text);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
    text-align: center;
}

/* Показать текст только на активной кнопке */
.nav-btn.active .nav-text {
    opacity: 1;
    visibility: visible;
}

/* На активной кнопке текст точно по центру */
.nav-btn.active .nav-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Активная кнопка уже имеет правильные размеры выше */

/* Улучшенная типографика для навигации */
.nav-btn.active .nav-text {
    font-weight: 600; /* TildaSans Semibold через класс font-semibold */
}

.nav-btn:hover:not(.active) {
    transform: scale(1.02);
}

.nav-btn.active:hover {
    transform: none;
    filter: brightness(1.05);
}

/* Экран добавления еды */
.add-food-content {
    padding: 20px 0;
}

.search-section {
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-box input:focus {
    border-color: #E3FE14;
}

.search-btn {
    background: linear-gradient(180deg, #E3FE14 0%, #F2FF8B 100%);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 15px;
    background: #f8f8f8;
    padding: 10px;
}

.add-form {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    border-color: #E3FE14;
}

/* Стили для выбора порций */
.portion-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portion-input input {
    flex: 1;
    min-width: 80px;
}

.portion-input span {
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.portion-info {
    margin-top: 5px;
}

.portion-info small {
    color: #888;
    font-size: 12px;
}

/* Стили для результатов поиска */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.result-name {
    flex: 1;
    font-weight: 500;
    text-transform: capitalize;
}

.result-source {
    font-size: 14px;
    opacity: 0.7;
    margin-left: 8px;
    cursor: help;
}

.search-result-item {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: #c4ff00;
    background-color: #f9fff0;
}

.nutrition-info {
    background: #f8f8f8;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.nutrition-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.nutrition-item:last-child {
    border-bottom: none;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600; /* TildaSans Semibold */
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.02em;
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Экран прогресса */
.progress-content {
    padding: 20px 0;
}

.stats-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.chart-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.chart-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.chart-container {
    display: flex;
    justify-content: center;
}

.macros-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.macros-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.macro-bar {
    margin-bottom: 20px;
}

.macro-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.proteins {
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
}

.progress-fill.fats {
    background: linear-gradient(90deg, #4ecdc4, #7ed6cc);
}

.progress-fill.carbs {
    background: linear-gradient(90deg, #45b7d1, #6cc5d9);
}

/* Экран ассистента */
.assistant-content {
    padding: 20px 0;
}

.tips-section h3 {
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.tip-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease;
}

.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.tip-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.tip-text {
    color: #333;
    line-height: 1.5;
}

/* Экран профиля */
.profile-content {
    padding: 20px 0;
}

.form-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-section h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    background: white;
    transition: border-color 0.2s ease;
}

.form-group select:focus {
    border-color: #E3FE14;
}

.calculated-info {
    background: linear-gradient(135deg, #E3FE14, #F2FF8B);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.info-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
}

.info-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.info-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

/* Заголовки экранов */
.screen header {
    margin-bottom: 30px;
}

.screen header h1 {
    font-size: 28px;
    font-weight: 800; /* TildaSans ExtraBold */
    color: #333;
    margin: 0;
    letter-spacing: -0.5px;
}

.close-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

/* Новые современные эффекты */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.floating-animation {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Улучшенные тени */
.elevated-1 { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
.elevated-2 { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }
.elevated-3 { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); }
.elevated-4 { box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18); }

/* Адаптивность */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
        border-radius: 0;
    }
    
    .screen {
        padding: 15px;
    }
    
    .header-content {
        margin: -15px -15px 25px -15px;
        padding: 25px 20px 15px 20px;
    }
    
    .calendar-week {
        gap: 4px;
    }
    
    .day-item {
        padding: 10px 6px;
    }
    
    .bottom-nav {
        bottom: 10px;
    }
}

/* Анимации для круговой диаграммы */
.calorie-circle svg circle:last-child {
    transition: stroke-dashoffset 1s ease-in-out, stroke 0.5s ease-in-out;
}

/* Стили для текста процентов в зависимости от статуса */
.calorie-text .percentage {
    font-size: 32px;
    font-weight: 900; /* TildaSans Black */
    transition: color 0.3s ease;
    letter-spacing: -1px;
}

.calorie-text .amount {
    font-size: 14px;
    color: var(--color-text-light);
    transition: color 0.3s ease;
}

/* Динамические цвета для текста (будут применяться через JavaScript) */
.calorie-text.status-low .percentage {
    color: #F59E0B;
}

.calorie-text.status-good .percentage {
    color: #10B981;
}

.calorie-text.status-high .percentage {
    color: #EF4444;
}

/* Hover эффекты */
.day-item:hover:not(.current-day) {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 254, 20, 0.3);
}

.meal-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Экран добавления еды */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-box input:focus {
    border-color: #c4ff00;
}

.search-btn {
    background: #c4ff00;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    transform: scale(1.1);
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.search-result-item {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.search-result-item:hover {
    background: #f9f9f9;
    border-color: #c4ff00;
}

.result-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.result-nutrition {
    font-size: 12px;
    color: #666;
}

.add-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group select:focus {
    border-color: #c4ff00;
}

.nutrition-info {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}

.nutrition-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.nutrition-item:last-child {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600; /* TildaSans Semibold */
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.02em;
}

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

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 254, 20, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Экран прогресса */
.stats-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    flex: 1;
    min-width: 280px;
    max-width: 100%;
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #c4ff00;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.chart-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.chart-container {
    text-align: center;
}

.macros-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.macros-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.macro-bar {
    margin-bottom: 20px;
}

.macro-bar:last-child {
    margin-bottom: 0;
}

.macro-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.proteins {
    background: #ff6b6b;
}

.progress-fill.fats {
    background: #4ecdc4;
}

.progress-fill.carbs {
    background: #45b7d1;
}

/* Экран ассистента */
.tips-section h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Экран профиля */
.profile-content {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.form-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.calculated-info {
    background: #c4ff00;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.info-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.info-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Стили для страницы добавления еды */
.add-food-content {
    padding: 20px;
}

.search-section {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.search-box input:focus {
    border-color: #c4ff00;
}

/* Кнопка очистки поиска */
.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: #ccc;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: #999;
    transform: translateY(-50%) scale(1.1);
}

.quick-add-section {
    margin-bottom: 30px;
}

.quick-add-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.quick-add-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-add-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.quick-add-btn:hover {
    border-color: #c4ff00;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 255, 0, 0.2);
}

.quick-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.quick-add-btn span {
    font-weight: bold;
    color: #333;
}

.quick-add-btn small {
    color: #666;
    font-size: 12px;
}

.popular-foods-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.food-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.category-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.category-btn.active,
.category-btn:hover {
    background: #c4ff00;
    border-color: #c4ff00;
    color: #333;
}

.popular-foods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.food-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.food-item:hover {
    border-color: #c4ff00;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 255, 0, 0.2);
}

.food-item-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.food-item-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.food-item-calories {
    color: #666;
    font-size: 12px;
}

.search-results {
    display: none; /* скрыто по умолчанию */
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-result-item:hover {
    background: #f8f8f8;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Кнопка "Показать еще" для списка еды */
.show-more-btn {
    width: 100%;
    padding: 12px 20px;
    margin-top: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    background: #c4ff00;
    border-color: #c4ff00;
    color: #333;
    transform: translateY(-1px);
}
