﻿/* ===================================
   BMI 계산기 - 개선된 디자인
   =================================== */

:root {
    --primary-color: #0EA5E9;
    --primary-dark: #0284C7;
    --primary-light: #38BDF8;
    --secondary-color: #10B981;
    --accent-color: #F59E0B;
    --danger-color: #EF4444;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #EFF6FF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main */
.main {
    padding: 60px 0;
}

.hero-section {
    text-align: center;
    margin-bottom: 60px;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Calculator Section */
.calculator-section {
    margin-bottom: 40px;
}

.calculator-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.calculator-card:hover {
    box-shadow: var(--shadow-xl);
}

/* Input Row */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* Input Group */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-weight: 600;
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.input-field::placeholder {
    color: var(--text-light);
}

/* Result Card */
.result-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--border-light);
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

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

.result-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.result-value {
    font-size: 64px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
    line-height: 1;
}

.result-category {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.result-category.underweight {
    color: #3B82F6;
}

.result-category.normal {
    color: var(--secondary-color);
}

.result-category.overweight {
    color: var(--accent-color);
}

.result-category.obese {
    color: var(--danger-color);
}

.result-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Chart Section */
.chart-section {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 40px;
}

.chart-section h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-weight: 700;
    text-align: center;
}

.bmi-chart {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.chart-item {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.chart-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
    transform: translateY(-4px);
}

.chart-underweight {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
}

.chart-normal {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
}

.chart-overweight {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
}

.chart-obese {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
}

.chart-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.chart-range {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Info Section */
.info-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 20px;
    padding: 50px 40px;
    border: 1px solid var(--border-light);
    margin-bottom: 40px;
}

.info-section h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-top: 36px;
    margin-bottom: 18px;
    font-weight: 700;
}

.info-section h2:first-of-type {
    margin-top: 0;
}

.info-section p {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 15px;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section ul li {
    padding: 12px 0 12px 32px;
    position: relative;
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 15px;
}

.info-section ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 36px;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .calculator-card {
        padding: 28px;
    }

    .result-card {
        padding: 32px 24px;
    }

    .result-value {
        font-size: 48px;
    }

    .result-category {
        font-size: 20px;
    }

    .bmi-chart {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .chart-section {
        padding: 28px;
    }

    .info-section {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 28px;
    }

    .calculator-card {
        padding: 20px;
    }

    .result-value {
        font-size: 36px;
    }

    .result-category {
        font-size: 18px;
    }

    .bmi-chart {
        grid-template-columns: 1fr;
    }

    .chart-item {
        padding: 16px;
    }

    .info-section {
        padding: 24px;
    }

    .info-section h2 {
        font-size: 22px;
    }
}
