:root {
    --primary: #2d3436;
    --accent: #00b894; /* Healthy green for nutrition */
    --accent-light: #55efc4;
    --bg: #f4fbf9;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text: #2d3436;
    --text-muted: #636e72;
    --border: #dfe6e9;
    --shadow-bold: 0 20px 40px rgba(0, 184, 148, 0.08);
    
    /* Macro Colors */
    --color-carb: #ff7675;
    --color-protein: #0984e3;
    --color-fat: #fdcb6e;
}

[data-theme="dark"] {
    --primary: #dfe6e9;
    --bg: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.95);
    --text: #f0f6fc;
    --text-muted: #8b949e;
    --border: #30363d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

header {
    height: 70px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 1000;
    background: var(--card-bg);
    display: flex; align-items: center;
}

.nav-container {
    max-width: 1000px; margin: 0 auto; width: 100%; padding: 0 2rem;
    display: flex; justify-content: space-between; align-items: center;
}

.logo { font-size: 1.1rem; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.lang-selector { display: flex; background: var(--border); border-radius: 20px; padding: 2px; }
.lang-selector button { border: none; background: none; padding: 4px 10px; border-radius: 18px; font-size: 0.75rem; font-weight: 700; cursor: pointer; color: var(--text-muted); }
.lang-selector button.active { background: var(--accent); color: white; }
.icon-btn { background: none; border: 1px solid var(--border); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Hero */
.hero-section { max-width: 800px; margin: 4rem auto 3rem; text-align: center; padding: 0 2rem; }
.hero-badge { display: inline-block; padding: 0.5rem 1.2rem; background: var(--accent); color: white; font-weight: 800; border-radius: 30px; font-size: 0.8rem; margin-bottom: 1.5rem; }
.hero-title { font-size: 2.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; word-break: keep-all; }
.hero-title span { color: var(--accent); }
.hero-subtitle { font-size: 1.15rem; color: var(--text-muted); max-width: 800px; margin: 0 auto; word-break: keep-all; }

/* Tool */
.tool-section { max-width: 600px; margin: 0 auto; padding: 0 2rem; }
.card-glass { background: var(--card-bg); border: 1px solid var(--border); border-radius: 32px; padding: 2.5rem; box-shadow: var(--shadow-bold); }

.input-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.input-group label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--text-muted); }
.input-group input { width: 100%; padding: 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 1.1rem; font-weight: 700; }

.goal-selector { display: flex; gap: 0.5rem; }
.goal-btn { flex: 1; padding: 0.8rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-weight: 700; color: var(--text-muted); font-size: 0.85rem; }
.goal-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

.primary-btn { width: 100%; background: var(--accent); color: white; border: none; padding: 1.2rem; font-size: 1.1rem; font-weight: 700; border-radius: 16px; cursor: pointer; box-shadow: 0 10px 20px rgba(0, 184, 148, 0.2); }
.primary-btn:hover { transform: translateY(-3px); filter: brightness(1.1); }

/* Result Area */
.result-box { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); animation: fadeIn 0.5s ease-out; }

/* Donut Chart (CSS Only) */
.chart-container { display: flex; justify-content: center; margin-bottom: 3rem; }
.donut-chart {
    width: 200px; height: 200px; border-radius: 50%;
    background: conic-gradient(var(--color-carb) 0% 40%, var(--color-protein) 40% 70%, var(--color-fat) 70% 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.donut-inner {
    width: 140px; height: 140px; border-radius: 50%;
    background: var(--card-bg);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 2;
}
#center-kcal { font-size: 1.8rem; font-weight: 800; }
.donut-inner small { color: var(--text-muted); font-weight: 700; }

/* Macro Grid */
.macro-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.macro-card { padding: 1.2rem; border-radius: 16px; text-align: center; color: white; }
.carb { background: var(--color-carb); }
.protein { background: var(--color-protein); }
.fat { background: var(--color-fat); }

.macro-label { font-size: 0.75rem; font-weight: 700; margin-bottom: 0.2rem; opacity: 0.9; }
.macro-val { font-size: 1.2rem; font-weight: 800; }
.macro-percent { font-size: 0.8rem; font-weight: 700; opacity: 0.8; }

.info-alert { background: rgba(0, 184, 148, 0.05); padding: 1.5rem; border-radius: 16px; border-left: 4px solid var(--accent); text-align: left; }
.info-alert h4 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--accent); }
.info-alert p { font-size: 0.9rem; color: var(--text-muted); }

/* Compliance */
.compliance-info { max-width: 600px; margin: 4rem auto; padding: 0 2rem; display: grid; gap: 1rem; }
.info-card { background: rgba(0,0,0,0.02); padding: 1.5rem; border-radius: 16px; }
.info-card h4 { font-size: 0.9rem; margin-bottom: 0.4rem; }
.info-card p { font-size: 0.85rem; color: var(--text-muted); }

footer { padding: 4rem 2rem; text-align: center; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.8rem; }
.footer-logo { font-weight: 800; margin-bottom: 0.5rem; }

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

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .macro-grid { grid-template-columns: 1fr; }
}
