/* 基本スタイル */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: #f0f4f8;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 15px;
    box-sizing: border-box;
}

/* メインコンテンツのラッパー */
.main-content {
    width: 100%;
    max-width: 450px;
    flex-grow: 1;
}

/* コンテナ */
.container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #1e3a8a;
    margin-bottom: 25px;
}

h2 {
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* フォーム */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #475569;
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ボタン */
button {
    width: 100%;
    padding: 15px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #1d4ed8;
}

/* 結果表示エリア */
#result-area {
    margin-top: 30px;
    padding: 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    text-align: left;
}

#result-area p {
    margin: 10px 0;
    font-size: 16px;
}

#result-area strong {
    font-size: 1.2em;
    color: #1e3a8a;
}

.info {
    font-size: 12px !important;
    color: #64748b;
    text-align: right;
}

/* BMI判定結果のボックス */
#bmi-status-box {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    color: #fff;
    font-weight: bold;
    text-align: center;
}
#bmi-status-box p {
    margin: 0;
    font-size: 1.1em;
}

/* 判定ごとのスタイル */
.status-underweight { background-color: #3b82f6; }
.status-normal { background-color: #22c55e; }
.status-overweight { background-color: #f97316; }
.status-obese { background-color: #ef4444; }

/* エラーメッセージ */
#error-message {
    margin-top: 15px;
    padding: 10px;
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

/* 表示・非表示を制御するクラス */
.hidden {
    display: none;
}

/* 判定基準の表のスタイル */
.criteria-container {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    text-align: left;
}

thead th {
    background-color: #f1f5f9;
    font-weight: bold;
    color: #334155;
    text-align: center;
}

tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

/* 動的ハイライト用のスタイル */
.highlight-row {
    background-color: #eff6ff !important; /* !importantで他の背景色指定に打ち勝つ */
    font-weight: bold;
}
.highlight-row td:first-child {
    color: #1d4ed8;
}

/* フッター */
.footer {
    width: 100%;
    text-align: center;
    margin-top: auto; /* フッターを下に押しやる */
    padding: 30px 0 10px 0;
    font-size: 14px;
    color: #64748b;
}

.footer a {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #1e3a8a;
    text-decoration: underline;
}