* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    border: 1px solid #f0f0f0;
    position: relative;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #13c2c2;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.back-link:hover {
    color: #36cfc9;
    transform: translateX(-3px);
}

.back-link::before {
    content: '←';
    font-size: 18px;
}

h1 {
    text-align: center;
    color: #13c2c2;
    margin-bottom: 10px;
    font-size: 2em;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.input-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 1em;
}

.input-wrapper {
    position: relative;
}

input[type="number"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #13c2c2;
}

.unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.9em;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-calculate {
    background: #13c2c2;
    color: white;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(19, 194, 194, 0.4);
    background: #36cfc9;
}

.btn-reset {
    background: #f5f5f5;
    color: #333;
}

.btn-reset:hover {
    background: #e0e0e0;
}

.result-section {
    background: #f0f9ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
    display: none;
    border: 1px solid #e6f7ff;
}

.result-section.show {
    display: block;
}

.bmi-value {
    font-size: 3em;
    font-weight: bold;
    color: #333;
    margin: 15px 0;
}

.bmi-category {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
}

.bmi-description {
    color: #666;
    font-size: 0.95em;
}

.category-underweight {
    color: #40a9ff;
}

.category-normal {
    color: #13c2c2;
}

.category-overweight {
    color: #ffa940;
}

.category-obese {
    color: #ff7875;
}

.reference-section {
    background: #fafafa;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #f0f0f0;
}

.reference-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
}

.reference-table th,
.reference-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.reference-table th {
    background: #f0f0f0;
    font-weight: 600;
    color: #333;
}

.reference-table th:first-child {
    background: #13c2c2;
    color: white;
}

.reference-table tr:hover {
    background: #f5f5f5;
}

.reference-table .range {
    font-weight: 600;
}

.reference-table .status {
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    font-size: 0.9em;
}

.status-underweight {
    background: #e6f7ff;
    color: #40a9ff;
}

.status-normal {
    background: #e6fffb;
    color: #13c2c2;
}

.status-overweight {
    background: #fff7e6;
    color: #ffa940;
}

.status-obese {
    background: #fff1f0;
    color: #ff7875;
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 1.5em;
    }

    .bmi-value {
        font-size: 2.5em;
    }

    .button-group {
        flex-direction: column;
    }

    .reference-table {
        font-size: 0.9em;
    }

    .reference-table th,
    .reference-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.3em;
    }

    .bmi-value {
        font-size: 2em;
    }

    .bmi-category {
        font-size: 1.1em;
    }
}
