:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-dim: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

header {
    text-align: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

header p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 5px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: -15px;
    margin-bottom: 20px;
}

/* Forms */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

input[type="number"],
input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    background: white;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
}

.radio-group {
    display: flex;
    gap: 20px;
    padding: 10px 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Button */
.calc-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    transition: background 0.2s;
}

.calc-btn:hover {
    background: var(--primary-hover);
}

/* Results */
.result-box {
    margin-top: 30px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.hidden {
    display: none;
}

.result-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

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

.result-item .label {
    font-size: 0.95rem;
    color: var(--text-dim);
}

.result-item .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.result-item .unit {
    font-weight: 500;
    color: var(--text-dim);
}

.status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 5px;
}

.status.normal { background: #dcfce7; color: #166534; }
.status.warning { background: #fef9c3; color: #854d0e; }
.status.danger { background: #fee2e2; color: #991b1b; }

.diet-targets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.target-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    text-align: center;
    font-weight: 600;
}

.target-card .title {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.water-tip {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 10px;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

@media (max-width: 480px) {
    .container {
        padding: 24px;
    }
    .tabs {
        flex-wrap: wrap;
    }
    .tab-btn {
        flex: 1 1 40%;
    }
}