@charset "UTF-8";

/* 1. 모든 페이지 공통 초기화 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
}

/* 2. 중앙 컨테이너 (레이아웃 일관성 유지) */
.container {
    background: white;
    padding: 2.5rem 2rem; /* 위아래 패딩을 조금 더 여유있게 */
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    text-align: center;
    width: 400px;
    min-height: 500px;
    max-width: calc(100% - 40px);

    display: flex;
    flex-direction: column;
    /* justify-content: center; 를 삭제하고 아래 설정을 사용합니다 */
    justify-content: flex-start; 
}

/* 제목과 푸터 사이의 본문 영역이 가변적으로 늘어나게 설정 */
.input-group {
    flex-grow: 1; /* 이 설정이 본문 영역을 채워 푸터를 바닥으로 밀어냅니다 */
    display: flex;
    align-items: center; /* 입력창들을 세로 중앙에 정렬 */
    justify-content: center;
}

/* 푸터를 항상 컨테이너 맨 바닥에 붙이기 */
.footer, .disclaimer {
    margin-top: auto; /* 남는 공간을 모두 위로 밀어내어 바닥 고정 */
    padding-top: 15px;
}

/* 3. 타이틀 및 텍스트 공통 */
h1 { color: #333; margin-bottom: 2rem; font-size: 1.5rem; }
h2 { color: #333; margin-bottom: 10px; }
.nav-link { margin-bottom: 20px; }
.nav-link a { text-decoration: none; font-size: 0.9rem; color: #666; }

/* 4. 입력창(Input) 공통 구조 */
.input-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    width: 100%;
}

.input-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.input-item label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

/* (BMI 전용) */
.input-group.vertical {
    flex-direction: column;
    align-items: center; /* 한 줄일 때 중앙으로 모음 */
}

/* (BMI 전용) input-item: 기존 설정을 덮어씌워 가로 길이를 제한함 */
.input-group.vertical .input-item {
    flex: none;         /* 가로로 꽉 채우려는 성질을 끎 */
    width: 100%;
    max-width: 280px;   /* 여기서 길이를 제한함 */
}
/* ------------------------------------------- */

input[type="number"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

/* 숫자 입력창 화살표 제거 */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 5. 버튼 공통 기본 스타일 (색상은 각 HTML에서 지정) */
button {
    padding: 12px 20px;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    filter: brightness(90%); /* 마우스 올렸을 때 살짝 어둡게 (공통 효과) */
}

/* 6. 결과 노출창 공통 스타일 */
#result {
    margin-top: 25px;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
}

/* 7. 하단 푸터 및 안내문구 */
.footer, .disclaimer {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 15px;
}