* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-primary: #000;
    --text-secondary: #666;
    --border-radius: 14px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding-bottom: 40px;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    position: relative;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Screen Content */
.screen-content {
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
}

/* Back Button */
.back-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding: 8px 0;
    cursor: pointer;
    font-family: inherit;
}

/* Cards Container */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

/* Контейнер для видов спорта - два столбца */
#sport-cards-container,
#sport-type-screen .cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.card-button {
    background: var(--card-bg);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
    width: 100%;
}

.card-button:hover {
    border-color: #ccc;
    box-shadow: var(--shadow);
}

.card-button.selected {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.card-label {
    font-size: 18px;
    font-weight: 600;
}

.card-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
}

.card-button.selected .card-description {
    color: rgba(255, 255, 255, 0.8);
}

/* Allergies Screen */
.allergies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.allergy-card {
    padding: 16px;
    min-height: 60px;
}

.allergy-card .card-label {
    font-size: 16px;
    margin: 0;
}

.allergies-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.skip-btn {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.skip-btn:active {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Continue Button */
.continue-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s ease;
}

.continue-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.continue-btn:not(:disabled):active {
    opacity: 0.8;
}

/* Unit Toggle */
.unit-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.toggle-btn {
    padding: 8px 20px;
    background: var(--card-bg);
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Picker Container - для страниц анкетирования */
.picker-container {
    position: relative;
    height: 300px;
    margin-bottom: 32px;
    overflow: hidden;
}

/* Picker Container - для страниц редактирования (внутри .edit-page) */
.edit-page .picker-container {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    transform: translateY(-50%);
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    margin-bottom: 0;
    margin-top: 0;
}

/* Текст над рамкой пикера */
.edit-page .picker-label {
    position: absolute;
    top: calc(50% - 200px);
    left: 20px;
    right: 20px;
    text-align: center;
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
    z-index: 2;
    pointer-events: none;
    margin: 0;
}

.picker-wheel {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.edit-page .picker-wheel {
    width: 100%;
    max-height: 300px;
    position: relative;
}

.picker-wheel::-webkit-scrollbar {
    display: none;
}

.picker-list {
    list-style: none;
    padding: 120px 0;
}

.picker-list li {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 500;
    scroll-snap-align: center;
    color: #999;
    transition: all 0.2s ease;
}

.picker-list li.selected {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
}

.picker-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.95) 0%,
        transparent 30%,
        transparent 70%,
        rgba(255, 255, 255, 0.95) 100%
    );
    border-radius: 20px;
}

/* Loading Screen */
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.loading-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 32px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.3s ease;
}

.progress-ring-progress {
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 0.3s ease;
}

.loading-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 700;
}

.loading-text {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

/* Main Screen */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 15px;
    background: var(--card-bg);
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
}

.header-profile img {
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.main-content {
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* Daily Stats Card */
.daily-stats-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
}

/* Calories Donut */
.calories-donut {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.donut-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    position: absolute;
    top: 0;
    left: 0;
}

.donut-background {
    transition: stroke-dashoffset 0.3s ease;
}

.donut-progress {
    transition: stroke-dashoffset 0.3s ease;
}

.donut-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.calories-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1;
    color: var(--text-primary);
}

.calories-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.2;
}

/* Macros List */
.macros-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.macro-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.macro-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.macro-value {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Timezone List in Onboarding */
.timezone-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    max-height: 60vh;
    overflow-y: auto;
}

.timezone-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.timezone-item:hover {
    background: #f5f5f5;
    border-color: #000;
}

.timezone-item.selected {
    background: #000;
    color: white;
    border-color: #000;
}

/* Meal Times in Onboarding */
.meal-times-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.meal-time-item {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meal-time-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
}

.meal-time-icon {
    font-size: 24px;
}

.time-input {
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

.time-input:focus {
    outline: none;
    border-color: #000;
}

/* History Block */
.history-block {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-view-all-btn {
    background: none;
    border: none;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.history-view-all-btn:hover {
    background: #f5f5f5;
}

.history-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.history-item-photo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.history-item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f5f5f5;
}

.history-item-photo img[src*="default-sandwich"] {
    object-fit: contain;
    padding: 4px;
}

.history-item-content {
    flex: 1;
    min-width: 0;
}

.history-item-name {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.history-item-calories {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.history-item-macros {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.macro-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    color: white;
    line-height: 1;
}

.macro-protein {
    background: #FF6B6B;
}

.macro-fat {
    background: #FFA500;
}

.macro-carbs {
    background: #4ECDC4;
}

.history-placeholder {
    text-align: center;
    padding: 40px 20px;
}

.history-placeholder p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Subscription Choice Screen */
.subscription-choice-container {
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.subscription-choice-header {
    text-align: center;
    margin-bottom: 40px;
}

.subscription-choice-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.subscription-choice-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.subscription-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subscription-choice-btn {
    width: 100%;
    padding: 24px;
    border-radius: 16px;
    border: 2px solid #e0e0e0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    font-family: inherit;
}

.subscription-choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.subscription-choice-btn-primary {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.subscription-choice-btn-primary:hover {
    background: #000;
    border-color: #000;
}

.subscription-choice-btn-secondary {
    border-color: #000;
    background: white;
    color: #000;
}

.subscription-choice-btn-secondary:hover {
    background: #f5f5f5;
}

.choice-btn-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.choice-btn-content {
    flex: 1;
}

.choice-btn-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.choice-btn-description {
    font-size: 14px;
    opacity: 0.8;
}

.subscription-choice-btn-primary .choice-btn-description {
    opacity: 0.9;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    padding: 0;
    margin: 0;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
}

.fab::before {
    content: '+';
    display: block;
    transform: translateY(-2px);
}

.fab:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Success Screen */
.success-content {
    padding-bottom: 40px;
}

.success-header {
    text-align: center;
    margin-bottom: 32px;
}

.success-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.success-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Result Block */
.result-block {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.laurel-icon {
    font-size: 24px;
}

.result-text {
    text-align: center;
    flex: 1;
}

.result-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 400;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Recommendations Block */
.recommendations-block {
    margin-bottom: 24px;
}

.block-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Адаптация для 5 карточек - последняя занимает всю ширину на мобильных */
.recommendations-grid .recommendation-card:nth-child(5) {
    grid-column: 1 / -1;
}

.recommendation-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 14px;
    position: relative;
    box-shadow: var(--shadow);
}

.recommendation-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.recommendation-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.edit-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-family: inherit;
    transition: color 0.2s ease;
}

.edit-icon:active {
    color: var(--primary-color);
}

/* Goals Block */
.goals-block {
    margin-bottom: 36px;
}

.goals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow);
}

.goal-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.goal-content {
    flex: 1;
}

.goal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.goal-description {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 375px) {
    h1 {
        font-size: 28px;
    }
    
    .success-title {
        font-size: 24px;
    }
    
    .result-value {
        font-size: 20px;
    }
    
    .recommendation-value {
        font-size: 24px;
    }
    
    .daily-stats-card {
        padding: 16px;
        gap: 16px;
    }
    
    .calories-donut {
        width: 120px;
        height: 120px;
    }
    
    .calories-number {
        font-size: 32px;
    }
    
    .calories-label {
        font-size: 11px;
    }
    
    .macro-name,
    .macro-value {
        font-size: 14px;
    }
}

/* Profile Page Styles */
.top-bar {
    display: flex;
    align-items: center;
    padding: 15px;
}

.back-btn {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    margin-right: 10px;
    font-family: inherit;
    color: var(--text-primary);
}

.page-title {
    font-size: 22px;
    font-weight: 600;
}


.menu-nav-btn {
    background: var(--card-bg);
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.menu-nav-btn:hover:not(:disabled) {
    background: #f5f5f5;
}

.menu-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.menu-nav-day {
    font-size: 16px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.profile-card {
    margin: 15px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.profile-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-actions {
    padding: 20px;
    margin-top: 20px;
}

.reset-profile-btn {
    width: 100%;
    padding: 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-profile-btn:hover {
    background: #c0392b;
}

.reset-profile-btn:active {
    transform: scale(0.98);
}

.profile-row .value {
    font-weight: 600;
    margin-right: auto;
    margin-left: 10px;
}

.arrow {
    font-size: 22px;
    color: #ccc;
    margin-left: 10px;
}

/* Menu Buttons Block */
.menu-buttons-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    padding: 0 20px;
}

.menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.menu-btn:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.menu-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.menu-btn-icon {
    font-size: 24px;
}

.menu-btn-text {
    flex: 1;
    text-align: left;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Reset Profile Modal Styles */
.reset-warning-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.reset-warning-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.reset-warning-details {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.reset-warning-final {
    font-size: 13px;
    color: #e74c3c;
    font-weight: 500;
    margin: 0;
}

.modal-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-cancel {
    background: #f5f5f5;
    color: #333;
}

.modal-btn-cancel:hover {
    background: #e0e0e0;
}

.modal-btn-confirm {
    background: #e74c3c;
    color: white;
}

.modal-btn-confirm:hover {
    background: #c0392b;
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Reminder Modal Styles */
.reminder-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.reminder-setting-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.reminder-label-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.reminder-label-hint {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #34d399;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px #34d399;
}

/* Photo Upload */
.photo-upload-area {
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.photo-upload-area:hover,
.photo-upload-area.drag-over {
    border-color: var(--primary-color);
    background: #f5f5f5;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.photo-upload-area p {
    margin: 4px 0;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 14px;
}

.photo-preview {
    position: relative;
    margin-bottom: 16px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.photo-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.remove-photo-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-note {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 16px;
}

.analyze-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Analysis Result */
.analysis-item {
    margin-bottom: 20px;
}

.analysis-item h4 {
    font-size: 20px;
    margin-bottom: 16px;
}

.analysis-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
}

.meal-type-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meal-type-btn:active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Menu Display */
.menu-modal-content {
    max-width: 600px;
}

.menu-item {
    background: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.menu-item-header {
    margin-bottom: 12px;
}

.meal-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.menu-item h4,
.menu-item h5 {
    margin: 8px 0;
    font-size: 18px;
}

.menu-item h5 {
    font-size: 16px;
}

.menu-ingredients {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 8px 0;
}

.menu-nutrition {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
}

.menu-nutrition span {
    padding: 4px 8px;
    background: var(--card-bg);
    border-radius: 6px;
}

.week-day {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.week-day:last-child {
    border-bottom: none;
}

.week-day h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

/* Menu Generation Screen */
.menu-gen-content {
    text-align: center;
    padding: 40px 20px;
    max-width: 400px;
    margin: 0 auto;
}

.menu-gen-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.menu-gen-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Generated Menu Card */
.generated-menu-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 20px;
    padding: 0;
    overflow: hidden;
}

.menu-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.menu-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.menu-card-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.menu-card-close:hover {
    background: #f0f0f0;
}

.menu-card-nav,
.menu-week-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.menu-nav-btn {
    background: var(--card-bg);
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.menu-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.menu-nav-btn:not(:disabled):active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.menu-nav-day {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-card-content {
    padding: 20px;
}

/* ========== Menu Result Styles ========== */
#menuResult {
    padding: 20px;
    width: 100%;
}

/* Menu Loading */
.menu-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Menu Day Container */
.menu-day-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

/* Menu Card */
.menu-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    width: 90%;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.menu-card-header {
    margin-bottom: 12px;
}

.meal-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.menu-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.3;
}

.menu-card-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.menu-card-nutrition {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
}

.nutrition-item {
    color: var(--text-primary);
    font-weight: 500;
}

/* ========== Swiper Styles for Week Menu ========== */
.menu-week-swiper {
    width: 100%;
    height: auto;
    padding-bottom: 40px;
}

.menu-week-swiper .swiper-wrapper {
    align-items: stretch;
}

.menu-week-swiper .swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
}

.menu-day-slide {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
}

.menu-day-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
}

/* Swiper Pagination */
.menu-week-swiper .swiper-pagination {
    position: relative;
    margin-top: 20px;
    bottom: 0;
}

.menu-week-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    opacity: 0.3;
}

.menu-week-swiper .swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .menu-card {
        width: 95%;
        padding: 16px;
    }
    
    .menu-card-title {
        font-size: 16px;
    }
    
    .menu-card-description {
        font-size: 13px;
    }
    
    .menu-card-nutrition {
        font-size: 12px;
        gap: 8px;
    }
    
    .menu-day-title {
        font-size: 18px;
    }
}

