/* ===== PaperMod 기본 헤더 완전 제거 ===== */
.header {
  display: none !important;
}

.footer {
  display: none !important;
}

body {
  padding-top: 0 !important;
}

.main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.home-wrapper {
  margin-top: 0;
  padding-top: 0;
}

/* ===== 전역 스타일 ===== */
:root {
  --primary: #FC4C02;
  --secondary: #667eea;
  --success: #00D084;
  --warning: #FFB020;
  --danger: #FC4C02;
  --dark: #2D2D2D;
  --light: #F7F7F7;
  --white: #FFFFFF;
  --border: #E5E5E5;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: #FAFAFA;
}

/* ===== Minimal Header (그라디언트 배경) ===== */
.minimal-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  padding: 1.5rem 1rem 1rem;
  text-align: center;
  border-bottom: none;
  margin-top: 1rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.25rem 0;
  color: var(--white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  font-weight: 500;
}

/* ===== Calculator Section ===== */
.calculator-section {
  max-width: 800px;
  margin: 1.5rem auto 0;
  padding: 0 1rem 3rem;
}

.calculator-container {
  background: var(--white);
  border-radius: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ===== Tab Navigation ===== */
.tab-navigation {
  display: flex;
  background: var(--light);
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.tab-btn:hover {
  background: rgba(102, 126, 234, 0.05);
  color: var(--secondary);
}

.tab-btn.active {
  background: var(--white);
  color: #C03A00;
  border-bottom-color: #C03A00;
}

/* ===== Tab Content ===== */
.tab-pane {
  display: none;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

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

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

/* ===== Calculator Form ===== */
.calculator-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.form-description {
  color: #666;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-size: 0.9rem;
}

.input-with-unit {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.input-with-unit:focus-within {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-with-unit input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: none;
  font-size: 1rem;
  background: transparent;
}

.input-with-unit input:focus {
  outline: none;
}

.unit-label {
  min-width: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  font-weight: 600;
  color: #666;
  font-size: 0.9rem;
  border-left: 2px solid var(--border);
}

.help-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #999;
}

/* ===== 단위 토글 (컴팩트) ===== */
.unit-toggle-compact {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.375rem;
  background: var(--light);
  border-radius: 0.625rem;
  border: 1px solid var(--border);
}

.unit-option-compact {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.unit-option-compact:hover {
  background: rgba(102, 126, 234, 0.05);
}

.unit-option-compact input[type="radio"] {
  cursor: pointer;
  width: 16px !important;
  height: 16px !important;
  accent-color: var(--secondary);
  margin: 0 !important;
}

.unit-option-compact:has(input:checked) {
  background: var(--white);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ===== 성별 선택 (컴팩트) ===== */
.gender-options-compact {
  display: flex;
  gap: 0.5rem;
}

.gender-option-compact {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.gender-option-compact:hover {
  border-color: var(--secondary);
  background: rgba(102, 126, 234, 0.03);
}

.gender-option-compact:has(input:checked) {
  border-color: var(--secondary);
  background: rgba(102, 126, 234, 0.1);
  font-weight: 600;
}

.gender-option-compact input[type="radio"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--secondary);
}

/* ===== 시간 입력 ===== */
.time-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  max-width: 450px;
}

.time-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.time-input-group input {
  width: 70px;
  padding: 0.875rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  transition: border-color 0.2s ease;
}

.time-input-group input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.time-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 600;
  min-width: 32px;
}

/* ===== 빠른 버튼 ===== */
.quick-btn {
  padding: 0.4rem 0.9rem;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
  font-weight: 600;
}

.quick-btn:hover {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
  transform: translateY(-1px);
}

/* ===== 계산 버튼 ===== */
.calculate-btn {
  width: 100%;
  padding: 1.125rem 2rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: var(--white);
  border: none;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(252, 76, 2, 0.25);
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(252, 76, 2, 0.35);
}

.calculate-btn:active {
  transform: translateY(0);
}

/* ===== Results Section ===== */
.results-section {
  margin-top: 2rem;
  padding: 2rem 1rem;
  background: var(--light);
  border-top: 2px solid var(--border);
}

.results-section.hidden {
  display: none;
}

.result-card {
  background: var(--white);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  max-width: 800px;
  margin: 0 auto;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.result-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #999;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-btn:hover {
  color: var(--danger);
  background: rgba(252, 76, 2, 0.1);
}

.result-section {
  margin-bottom: 2rem;
}

.result-section.hidden {
  display: none;
}

.result-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

/* ===== BMI 디스플레이 ===== */
.bmi-display {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(252, 76, 2, 0.05) 100%);
  border-radius: 1rem;
}

.bmi-value-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.bmi-label {
  font-size: 1rem;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bmi-value {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  font-family: 'Roboto Mono', monospace;
}

.bmi-category {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.625rem 1.75rem;
  border-radius: 2rem;
  margin-top: 1rem;
}

.bmi-category.underweight {
  background: rgba(66, 153, 225, 0.15);
  color: #2B6CB0;
}

.bmi-category.normal {
  background: rgba(72, 187, 120, 0.15);
  color: #276749;
}

.bmi-category.overweight {
  background: rgba(237, 137, 54, 0.15);
  color: #C05621;
}

.bmi-category.obese {
  background: rgba(245, 101, 101, 0.15);
  color: #C53030;
}

/* ===== BMI 게이지 ===== */
.bmi-gauge {
  margin: 2rem 0;
}

.gauge-bar {
  height: 0.875rem;
  background: linear-gradient(to right, 
    #4299E1 0%, 
    #48BB78 33%, 
    #ED8936 66%, 
    #F56565 100%
  );
  border-radius: 0.5rem;
  position: relative;
  margin-bottom: 0.75rem;
}

.gauge-indicator {
  position: absolute;
  top: -0.5rem;
  width: 0;
  height: 0;
  border-left: 0.5rem solid transparent;
  border-right: 0.5rem solid transparent;
  border-top: 0.75rem solid var(--dark);
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #666;
  font-weight: 600;
}

/* ===== 상세 정보 ===== */
.result-details {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.125rem 1.25rem;
  background: var(--light);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.detail-label {
  font-weight: 600;
  color: #666;
  font-size: 0.95rem;
}

.detail-value {
  font-weight: 700;
  color: var(--dark);
  font-size: 1.05rem;
}

/* ===== 조언 박스 ===== */
.advice-box {
  padding: 1.5rem;
  background: rgba(102, 126, 234, 0.08);
  border-left: 4px solid var(--secondary);
  border-radius: 0.75rem;
  margin-top: 2rem;
}

.advice-box p {
  margin: 0;
  line-height: 1.8;
  color: var(--dark);
  font-size: 0.95rem;
}

/* ===== 러닝 메트릭 ===== */
.running-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--light);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.metric-icon {
  font-size: 2rem;
}

.metric-content {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Roboto Mono', monospace;
}

/* ===== 레이스 예측 ===== */
.race-predictions {
  margin: 2rem 0;
}

.predictions-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-start;
}

.predictions-title .info-btn {
  margin-left: 0.25rem;
}

.predictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.prediction-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  background: var(--light);
  border-radius: 0.75rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.prediction-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.race-distance {
  font-size: 0.85rem;
  color: #666;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.race-time {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--dark);
  font-family: 'Roboto Mono', monospace;
}

/* ===== 훈련 존 ===== */
.training-zones {
  margin: 2rem 0;
}

.zone-list {
  display: grid;
  gap: 0.75rem;
}

.zone-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--light);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.zone-name {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
}

.zone-range {
  font-weight: 700;
  color: var(--primary);
  font-family: 'Roboto Mono', monospace;
}

/* ===== 공유 버튼 ===== */
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.share-btn {
  flex: 1;
  min-width: 150px;
  padding: 0.875rem 1.5rem;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.share-btn:hover {
  background: var(--light);
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.share-btn.primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.share-btn.primary:hover {
  background: #E04402;
  box-shadow: 0 4px 12px rgba(252, 76, 2, 0.3);
}

/* 카카오톡 공유 버튼 */
.share-btn.kakao-share {
  background: #FEE500;
  color: #000000;
  border-color: #FEE500;
  font-weight: 700;
}

.share-btn.kakao-share:hover {
  background: #FFEB00;
  border-color: #FFEB00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
}

.kakao-icon {
  font-size: 1.125rem;
  margin-right: 0.25rem;
}

/* ===== Hidden 클래스 ===== */
.hidden {
  display: none !important;
}

/* ===== VO2max 정보 버튼 ===== */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.375rem;
  padding: 0;
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.info-btn:hover {
  color: var(--secondary);
  transform: scale(1.1);
}

.info-btn:active {
  transform: scale(0.95);
}

.info-btn svg {
  display: block;
}

/* ===== 툴팁 오버레이 ===== */
.info-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.info-tooltip.hidden {
  display: none;
}

/* ===== 툴팁 콘텐츠 ===== */
.tooltip-content {
  background: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideUp 0.3s ease;
}

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

.tooltip-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.tooltip-close:hover {
  color: var(--danger);
  background: rgba(252, 76, 2, 0.1);
}

.tooltip-content h4 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--dark);
  padding-right: 2rem;
}

.tooltip-content h5 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--secondary);
}

.tooltip-content p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #555;
  margin: 0 0 1rem 0;
}

.tooltip-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.tooltip-content ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
  list-style: none;
}

.tooltip-content ul li {
  position: relative;
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #555;
}

.tooltip-content ul li::before {
  content: "•";
  position: absolute;
  left: -1rem;
  color: var(--primary);
  font-weight: bold;
}

.tooltip-content code {
  display: block;
  background: #F7F7F7;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.875rem;
  color: var(--secondary);
  margin: 0.75rem 0;
  border-left: 3px solid var(--secondary);
}

.tooltip-note {
  font-size: 0.875rem !important;
  color: #999 !important;
  font-style: italic;
}

/* ===== Simple Footer ===== */
.simple-footer {
  background: var(--light);
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  margin-top: 3rem;
  text-align: center;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-links {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.footer-links a {
  color: #1F1F1F;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #C03A00;
}

.separator {
  margin: 0 0.5rem;
  color: #999;
}

.footer-copyright {
  font-size: 0.875rem;
  color: #555;
}

.footer-copyright p {
  margin: 0.25rem 0;
}

.footer-email a {
  color: #5566D8;
  text-decoration: none;
}

.footer-email a:hover {
  text-decoration: underline;
}

/* ===== 라디오 버튼 크기 강제 고정 ===== */
input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

/* ===== 2열 그리드 레이아웃 ===== */
.form-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group-half {
  display: flex;
  flex-direction: column;
}

.form-group-half label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-size: 0.9rem;
}

/* help-text를 그리드 바깥으로 */
.form-group-grid + .help-text {
  display: block;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #999;
}