* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #0a0a0f;
    color: #fff;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
.header {
    background: linear-gradient(135deg, #1a472a, #2d7d46);
    padding: 8px 12px;
    flex-shrink: 0;
}
.header-title {
    text-align: center;
    margin-bottom: 6px;
}
.lang-buttons {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}
.btn-lang {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
}
.btn-lang:hover { background: rgba(255,255,255,0.25); }
.header h1 { font-size: 16px; font-weight: 700; letter-spacing: -0.5px; }
.header h1 span { color: #90EE90; }
.week-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}
.badge {
    background: rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
}
.badge span { font-weight: 600; }
.calorie-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 6px;
}
.nutri-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 9px;
    color: rgba(255,255,255,0.8);
}
.nutri-label { color: #90EE90; font-weight: 600; }
}
.cal-item {
    text-align: center;
    flex: 1;
}
.cal-item .num { font-size: 14px; font-weight: 700; color: #90EE90; }
.cal-item .label { font-size: 8px; color: rgba(255,255,255,0.7); text-transform: uppercase; }
.controls {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: #111;
    flex-shrink: 0;
}
select {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
}
.summary-card .week-summary {
    background: linear-gradient(145deg, #1a2a1a, #1f3d1f);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #2d7d46;
    display: flex;
    flex-direction: column;
    min-height: auto;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    justify-content: center;
}
.summary-card .week-summary h3 {
    font-size: 13px;
    color: #90EE90;
    text-align: center;
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid #333;
}
.summary-card .week-summary .summary-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    text-align: center;
    justify-content: center;
}
.summary-card .week-summary .stat-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.summary-card .week-summary .stat-item .stat-label {
    color: rgba(255,255,255,0.8);
}
.summary-card .week-summary .stat-item span:last-child {
    color: #4ecdc4;
    font-weight: 600;
}
.btn {
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.btn-green { background: linear-gradient(135deg, #1a472a, #2d7d46); color: #fff; }
.btn-dark { background: #1a1a1a; color: #fff; border: 1px solid #333; }
.menu-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    flex: 1;
    justify-content: center;
}
.day-card {
    background: linear-gradient(145deg, #141414, #1a1a1a);
    border-radius: 12px;
    padding: 8px;
    border: 1px solid #222;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s;
    width: 23%;
    min-height: 100px;
    box-sizing: border-box;
}
.day-card.today {
    border: 2px solid #90EE90;
    box-shadow: 0 0 10px rgba(144, 238, 144, 0.3);
}
.day-card.today h3 {
    color: #90EE90;
}
.summary-card {
    width: 23%;
    min-height: 100px;
    box-sizing: border-box;
}
.day-card:active { transform: scale(0.97); }
.day-card h3 {
    font-size: 11px;
    color: #2d7d46;
    text-align: center;
    padding-bottom: 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid #222;
}
.meal-item { margin-bottom: 4px; }
.meal-item .type { font-size: 8px; color: #666; }
.meal-item .name { font-size: 9px; color: #ddd; }
.meal-item .cal { font-size: 8px; color: #4ecdc4; }

.footer {
    padding: 8px;
    background: #0a0a0f;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.footer .btn { width: 100%; max-width: 300px; }
.footer-info {
    font-size: 11px;
    color: #666;
    display: flex;
    gap: 8px;
    align-items: center;
}
.footer-divider { color: #333; }

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #1a2e1a, #1f3d1f);
    border: 1px solid #2d7d46;
    border-radius: 16px;
    padding: 24px 28px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    max-width: 90%;
    width: 320px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 10000;
    display: none;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    animation: toastIn 0.3s ease;
}

.toast.show { display: flex; }

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

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

.toast-title {
    font-size: 16px;
    font-weight: 600;
    color: #90EE90;
}

.toast-message {
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
}

.toast-btn {
    background: linear-gradient(135deg, #1a472a, #2d7d46);
    border: none;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.toast-btn:hover {
    background: linear-gradient(135deg, #1f5530, #3a9056);
}

.toast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: none;
}

.toast-overlay.show { display: block; }
.day-detail, .shopping-section {
    display: none;
    flex-direction: column;
    flex: 1;
    padding: 10px;
    overflow: hidden;
}
.day-detail.active, .shopping-section.active { display: flex; }
.detail-header, .shopping-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}
.detail-header h2 { font-size: 16px; color: #2d7d46; }
.back-btn {
    background: linear-gradient(135deg, #1a472a, #2d7d46);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
}
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.tab {
    flex: 1;
    padding: 8px;
    background: #141414;
    border-radius: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    border: 1px solid #222;
}
.tab.active { background: #2d7d46; color: #fff; border-color: #2d7d46; }
.meals-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    flex: 1;
    overflow: hidden;
}
.meal-card {
    background: #141414;
    border-radius: 10px;
    padding: 8px;
    border: 1px solid #222;
    overflow: hidden;
}
.meal-card .icon { font-size: 20px; text-align: center; }
.meal-card .title { font-size: 11px; color: #fff; text-align: center; margin: 4px 0; font-weight: 600; }
.meal-card .macros {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.meal-card .macro-tag {
    font-size: 8px;
    background: rgba(78,205,196,0.15);
    color: #4ecdc4;
    padding: 2px 5px;
    border-radius: 10px;
}
.meal-card .section { margin-top: 4px; }
.meal-card .section-title { font-size: 9px; color: #2d7d46; margin-bottom: 3px; font-weight: 600; }
.meal-card .tags { display: flex; flex-wrap: wrap; gap: 3px; }
.tag {
    font-size: 8px;
    background: #222;
    color: #aaa;
    padding: 2px 5px;
    border-radius: 8px;
}
.meal-card .steps { padding-left: 12px; }
.meal-card .steps li { font-size: 8px; color: #888; margin-bottom: 2px; }
.shopping-header h2 { font-size: 14px; color: #2d7d46; }
.shopping-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    flex: 1;
    overflow-y: auto;
    margin-bottom: 8px;
}
.shop-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #141414;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #222;
}
.shop-item .check {
    width: 18px;
    height: 18px;
    border: 2px solid #2d7d46;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #2d7d46;
}
.shop-item.checked .check { background: #2d7d46; }
.shop-item.checked { opacity: 0.5; text-decoration: line-through; }
.shop-item .name { font-size: 10px; flex: 1; }
.shop-item .qty { font-size: 9px; color: #4ecdc4; background: rgba(78,205,196,0.1); padding: 2px 5px; border-radius: 4px; }
.nutri-box {
    background: #141414;
    border-radius: 10px;
    padding: 8px;
    border: 1px solid #222;
}
.nutri-box h3 { font-size: 11px; color: #2d7d46; margin-bottom: 6px; }
.nutri-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid #222; font-size: 10px; }
.nutri-row:last-child { border: none; }
.nutri-row .label { color: #888; }
.nutri-row .val { color: #fff; font-weight: 600; }
.prep-card {
    background: #141414;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid #222;
    margin-bottom: 6px;
}
.prep-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #333;
}
.prep-icon { font-size: 16px; }
.prep-name { font-size: 11px; color: #fff; font-weight: 600; }
.steps-list { display: flex; flex-direction: column; gap: 5px; }
.step-item { display: flex; align-items: flex-start; gap: 8px; }
.step-num {
    background: linear-gradient(135deg, #1a472a, #2d7d46);
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
}
.step-text { font-size: 10px; color: #ccc; line-height: 1.4; }

@media (min-width: 320px) {
    .header h1 { font-size: 14px; }
    .badge { font-size: 9px; padding: 2px 8px; }
    .cal-item .num { font-size: 12px; }
    .cal-item .label { font-size: 7px; }
    .btn { padding: 6px 12px; font-size: 11px; }
    select { padding: 5px 8px; font-size: 11px; }
    .day-card { padding: 6px; border-radius: 10px; }
    .day-card h3 { font-size: 10px; }
    .meal-item .type { font-size: 7px; }
    .meal-item .name { font-size: 8px; }
    .meal-item .cal { font-size: 7px; }
    .tab { padding: 6px; font-size: 10px; }
    .meal-card { padding: 6px; }
    .meal-card .icon { font-size: 18px; }
    .meal-card .title { font-size: 10px; }
    .meal-card .macro-tag { font-size: 7px; padding: 2px 4px; }
    .meal-card .section-title { font-size: 8px; }
    .tag { font-size: 7px; padding: 2px 4px; }
    .shop-item { padding: 5px 6px; }
    .shop-item .name { font-size: 9px; }
    .shop-item .qty { font-size: 8px; }
    .nutri-box h3 { font-size: 10px; }
    .nutri-row { font-size: 9px; }
    .prep-card { padding: 8px; }
    .prep-icon { font-size: 14px; }
    .prep-name { font-size: 10px; }
    .step-num { width: 16px; height: 16px; font-size: 8px; }
    .step-text { font-size: 9px; }
    .detail-header h2 { font-size: 14px; }
    .back-btn { padding: 6px 12px; font-size: 11px; }
    .footer { padding: 6px; }
}

@media (min-width: 480px) {
    .header h1 { font-size: 18px; }
    .header { padding: 10px 16px; }
    .week-badges { margin-bottom: 8px; }
    .badge { font-size: 11px; padding: 4px 12px; }
    .calorie-bar { padding: 8px; }
    .cal-item .num { font-size: 16px; }
    .cal-item .label { font-size: 9px; }
    .controls { padding: 10px; gap: 8px; }
    .btn { padding: 8px 16px; font-size: 12px; }
    select { padding: 6px 10px; font-size: 12px; }
    .menu-grid { gap: 8px; padding: 8px; display: flex; flex-wrap: wrap; justify-content: center; }
    .day-card { 
        padding: 10px; border-radius: 12px; 
        width: 23%;
    }
    .summary-card { 
        width: 23%;
    }
    .day-card h3 { font-size: 13px; margin-bottom: 6px; }
    .meal-item { margin-bottom: 6px; }
    .meal-item .type { font-size: 9px; }
    .meal-item .name { font-size: 11px; }
    .meal-item .cal { font-size: 9px; }
    .tabs { gap: 8px; margin-bottom: 10px; }
    .tab { padding: 10px; font-size: 12px; border-radius: 10px; }
    .meals-row { gap: 8px; }
    .meal-card { padding: 10px; border-radius: 12px; }
    .meal-card .icon { font-size: 24px; }
    .meal-card .title { font-size: 12px; margin: 6px 0; }
    .meal-card .macros { gap: 5px; margin-bottom: 8px; }
    .meal-card .macro-tag { font-size: 9px; padding: 3px 6px; }
    .meal-card .section { margin-top: 6px; }
    .meal-card .section-title { font-size: 10px; margin-bottom: 4px; }
    .meal-card .tags { gap: 4px; }
    .tag { font-size: 9px; padding: 3px 6px; border-radius: 10px; }
    .shopping-header h2 { font-size: 16px; }
    .shopping-list { gap: 6px; }
    .shop-item { padding: 8px 10px; gap: 8px; }
    .shop-item .check { width: 20px; height: 20px; font-size: 11px; }
    .shop-item .name { font-size: 11px; }
    .shop-item .qty { font-size: 10px; padding: 3px 6px; }
    .nutri-box { padding: 10px; border-radius: 12px; }
    .nutri-box h3 { font-size: 12px; margin-bottom: 8px; }
    .nutri-row { font-size: 11px; padding: 4px 0; }
    .prep-card { padding: 12px; margin-bottom: 8px; border-radius: 12px; }
    .prep-header { margin-bottom: 10px; padding-bottom: 8px; }
    .prep-icon { font-size: 18px; }
    .prep-name { font-size: 12px; }
    .steps-list { gap: 6px; }
    .step-item { gap: 10px; }
    .step-num { width: 20px; height: 20px; font-size: 10px; }
    .step-text { font-size: 11px; }
    .detail-header h2 { font-size: 18px; }
    .detail-header { margin-bottom: 12px; }
    .back-btn { padding: 10px 16px; font-size: 12px; }
    .footer { padding: 10px; }
}

@media (min-width: 768px) {
    .header h1 { font-size: 22px; }
    .header { padding: 12px 20px; }
    .week-badges { gap: 12px; margin-bottom: 10px; }
    .badge { font-size: 13px; padding: 5px 16px; }
    .calorie-bar { padding: 10px; border-radius: 16px; }
    .cal-item .num { font-size: 20px; }
    .cal-item .label { font-size: 11px; }
    .controls { padding: 12px; gap: 12px; }
    .btn { padding: 10px 20px; font-size: 14px; }
    select { padding: 8px 14px; font-size: 14px; }
    .menu-grid { gap: 12px; padding: 12px; display: flex; flex-wrap: wrap; justify-content: center; }
    .day-card { 
        padding: 14px; border-radius: 14px; 
        width: 23%;
    }
    .summary-card { 
        width: 23%;
    }
    .day-card h3 { font-size: 16px; margin-bottom: 8px; }
    .meal-item { margin-bottom: 8px; }
    .meal-item .type { font-size: 11px; }
    .meal-item .name { font-size: 13px; }
    .meal-item .cal { font-size: 11px; }
    .tabs { gap: 10px; margin-bottom: 12px; }
    .tab { padding: 12px; font-size: 14px; border-radius: 12px; }
    .meals-row { gap: 12px; }
    .meal-card { padding: 14px; border-radius: 14px; }
    .meal-card .icon { font-size: 28px; }
    .meal-card .title { font-size: 14px; margin: 8px 0; }
    .meal-card .macros { gap: 6px; margin-bottom: 10px; }
    .meal-card .macro-tag { font-size: 11px; padding: 4px 8px; }
    .meal-card .section { margin-top: 8px; }
    .meal-card .section-title { font-size: 12px; margin-bottom: 6px; }
    .meal-card .tags { gap: 5px; }
    .tag { font-size: 11px; padding: 4px 8px; border-radius: 12px; }
    .shopping-header h2 { font-size: 20px; }
    .shopping-list { gap: 8px; }
    .shop-item { padding: 10px 12px; gap: 10px; }
    .shop-item .check { width: 24px; height: 24px; font-size: 12px; }
    .shop-item .name { font-size: 13px; }
    .shop-item .qty { font-size: 12px; padding: 4px 8px; }
    .nutri-box { padding: 14px; border-radius: 14px; }
    .nutri-box h3 { font-size: 14px; margin-bottom: 10px; }
    .nutri-row { font-size: 13px; padding: 6px 0; }
    .prep-card { padding: 16px; margin-bottom: 10px; border-radius: 14px; }
    .prep-header { margin-bottom: 12px; padding-bottom: 10px; }
    .prep-icon { font-size: 22px; }
    .prep-name { font-size: 15px; }
    .steps-list { gap: 8px; }
    .step-item { gap: 12px; }
    .step-num { width: 24px; height: 24px; font-size: 12px; }
    .step-text { font-size: 13px; }
    .detail-header h2 { font-size: 22px; }
    .detail-header { margin-bottom: 14px; gap: 14px; }
    .back-btn { padding: 12px 20px; font-size: 14px; }
    .footer { padding: 12px; }
}

@media (min-width: 1024px) {
    .header h1 { font-size: 26px; }
    .header { padding: 16px 24px; }
    .week-badges { gap: 16px; margin-bottom: 12px; }
    .badge { font-size: 15px; padding: 6px 20px; }
    .calorie-bar { padding: 14px; border-radius: 20px; }
    .cal-item .num { font-size: 24px; }
    .cal-item .label { font-size: 13px; }
    .controls { padding: 14px; gap: 14px; }
    .btn { padding: 12px 24px; font-size: 16px; }
    select { padding: 10px 16px; font-size: 16px; }
    .menu-grid { gap: 16px; padding: 16px; display: flex; flex-wrap: wrap; justify-content: center; }
    .day-card { 
        padding: 18px; border-radius: 16px; 
        width: 23%;
    }
    .summary-card { 
        width: 23%;
    }
    .day-card h3 { font-size: 18px; margin-bottom: 10px; }
    .meal-item { margin-bottom: 10px; }
    .meal-item .type { font-size: 13px; }
    .meal-item .name { font-size: 15px; }
    .meal-item .cal { font-size: 13px; }
    .tabs { gap: 12px; margin-bottom: 14px; }
    .tab { padding: 14px; font-size: 16px; border-radius: 14px; }
    .meals-row { gap: 14px; }
    .meal-card { padding: 18px; border-radius: 16px; }
    .meal-card .icon { font-size: 32px; }
    .meal-card .title { font-size: 16px; margin: 10px 0; }
    .meal-card .macros { gap: 8px; margin-bottom: 12px; }
    .meal-card .macro-tag { font-size: 13px; padding: 5px 10px; }
    .meal-card .section { margin-top: 10px; }
    .meal-card .section-title { font-size: 14px; margin-bottom: 8px; }
    .meal-card .tags { gap: 6px; }
    .tag { font-size: 13px; padding: 5px 10px; border-radius: 14px; }
    .shopping-header h2 { font-size: 24px; }
    .shopping-list { gap: 10px; }
    .shop-item { padding: 12px 14px; gap: 12px; }
    .shop-item .check { width: 28px; height: 28px; font-size: 14px; }
    .shop-item .name { font-size: 15px; }
    .shop-item .qty { font-size: 14px; padding: 5px 10px; }
    .nutri-box { padding: 18px; border-radius: 16px; }
    .nutri-box h3 { font-size: 16px; margin-bottom: 12px; }
    .nutri-row { font-size: 15px; padding: 8px 0; }
    .prep-card { padding: 20px; margin-bottom: 12px; border-radius: 16px; }
    .prep-header { margin-bottom: 14px; padding-bottom: 12px; }
    .prep-icon { font-size: 26px; }
    .prep-name { font-size: 18px; }
    .steps-list { gap: 10px; }
    .step-item { gap: 14px; }
    .step-num { width: 28px; height: 28px; font-size: 14px; }
    .step-text { font-size: 15px; }
    .detail-header h2 { font-size: 26px; }
    .detail-header { margin-bottom: 16px; gap: 16px; }
    .back-btn { padding: 14px 24px; font-size: 16px; }
    .footer { padding: 14px; }
}

@media only screen and (max-width: 900px) {
    .menu-grid { 
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .day-card {
        width: 23%;
        min-height: 90px;
    }
    .summary-card {
        width: 23%;
        min-height: 90px;
    }
    .meals-row { grid-template-columns: 1fr; }
    .shopping-list { grid-template-columns: 1fr; }
}
@media only screen and (max-width: 500px) {
    .menu-grid { 
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .day-card {
        width: 48%;
    }
    .summary-card {
        width: 48%;
    }
}

body.splash-screen {
    background: linear-gradient(180deg, #1a472a 0%, #0d1f14 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

body.splash-screen::before {
    content: "🥗";
    font-size: 80px;
    animation: pulse 2s infinite;
}

body.splash-screen::after {
    content: "OpenCode";
    color: #90EE90;
    font-size: 18px;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}