/* ==========================================================
   Cycle Workout App UI Style — 재배치 정리본
   정렬 기준: index.html 화면 구성 순서
   섹션 순서:
     [0] 공통 Base/Reset
     [1] 연결 화면 (#connectionScreen)
     [2] 프로필 선택 화면 (#profileScreen)
     [3] 워크아웃 선택 화면 (#workoutScreen)
     [4] 훈련 준비 화면 (#trainingReadyScreen)
     [5] 훈련 화면 (#trainingScreen) — 기본/향상, 세그먼트바, 그룹세그먼트
     [6] 결과 화면 (#resultScreen)
     [7] 워크아웃/세그먼트 관리 (관리자 UI)
     [8] 공통 오버레이/로딩/상태
     [9] 반응형 및 플랫폼별 보정
     [10] 네온/비주얼 강화 효과
   유지보수 메모:
     - 그룹세그먼트 상태 전환 시에도 왼쪽 경계선 유지 (하단 PATCH 참고)
     - 중복/구규칙은 가능한 한 하단으로 모음
========================================================== */
/* ========== BASE / RESET (공통) ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { 
  height: 100%; 
}
body {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  background: #f6f8fa;
  color: #222;
  overflow-x: hidden;
}
h1,h2,h3,h4 { font-weight: 600; }

/* 공통 레이아웃/유틸 */
.hidden { display: none !important; }
.text-center { text-align: center; }
.muted { color: #777; font-size: 0.9em; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.center { text-align: center; }

.screen {
  display: none;
  min-height: 100vh;
  padding: 20px;
  transition: opacity 0.3s ease;
}
.screen.active { display: block; }
.header { text-align: center; margin-bottom: 20px; }
.header h1 { 
  font-size: 1.8em; 
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.schedule-title-icon {
  height: 1em; /* 글자 높이에 맞춤 (1.8em * 1 = 1.8em) */
  width: auto;
  vertical-align: middle;
}

.calendar-title-icon {
  height: 1.2em; /* 글자 높이보다 20% 더 크게 (1.8em * 1.2 = 2.16em) */
  width: auto;
  vertical-align: middle;
}
.subtitle { font-size: 0.9em; color: #666; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 16px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.gap-10 { gap: 10px; }

/* 버튼 공통 */
.btn {
  background: #2e74e8; color: #fff;
  border: none; border-radius: 8px;
  padding: 10px 14px; cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: #2562c8; }
.btn-secondary { background: #6c757d; }
.btn-success { background: #28a745; }
.btn-row { display: flex; justify-content: center; gap: 10px; }

/* btn-device는 공통 버튼 스타일을 오버라이드 - 제거: 나중에 정의된 스타일이 적용되도록 */

/* 폼 공통 */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 0.9em; margin-bottom: 4px; color: #555; }
.form-group input {
  width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 6px;
}
.form-row { display: flex; justify-content: space-between; gap: 10px; }

/* 컨트롤 버튼(공통 아이콘형) */
.control-btn {
  border: none; background: #fff; font-size: 22px;
  border-radius: 50%; width: 55px; height: 55px; margin: 0 8px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  overflow: visible;   
}

.control-btn.stop { color: #d33; }
.control-btn.pause { 
   color: #f0a500;
  
  /* 추가할 부분 
  z-index: 1001 !important;
  pointer-events: auto;
  isolation: isolate; */  
}

/* ========== 인증완료 후 화면 전환 ========== */

/* connectionScreen 특별 처리 - 컴팩트한 블럭 구조 */
#connectionScreen.active {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-attachment: fixed;
  padding: 20px;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 1000 !important;
}

/* 컴팩트한 블럭 구조 (사용자 인증 화면과 유사) */
.connection-main-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.connection-form-container {
  animation: slideInUp 0.6s ease;
}

.connection-form-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  padding: 40px 35px;
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.connection-header {
  text-align: center;
  margin-bottom: 30px;
}

.connection-header h1 {
  font-size: 1.8em;
  margin-bottom: 5px;
  color: #1e293b;
}

.connection-header .subtitle {
  font-size: 0.9em;
  color: #666;
}

.connection-device-section {
  margin-bottom: 20px;
}

.connection-device-section h3 {
  font-size: 1.1em;
  color: #1e293b;
  margin-bottom: 15px;
}

.connection-status-card,
.connection-summary-card {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 18px;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 다음 단계로 & 나가기 버튼 컨테이너 */
.connection-exit-container {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 다음 단계로 버튼 (녹색톤) */
.connection-exit-container .btn-next-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  color: #16a34a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.connection-exit-container .btn-next-inline:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.connection-exit-container .btn-next-inline:active {
  transform: translateY(0);
}

/* 나가기 버튼 (빨간색톤) */
.connection-exit-container .btn-exit-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.connection-exit-container .btn-exit-inline:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.connection-exit-container .btn-exit-inline:active {
  transform: translateY(0);
}

#connectionScreen .header,
#connectionScreen .card,
#connectionScreen .btn {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* ========== 1) 연결 화면 (#connectionScreen) ========== */
/* 연결 화면 이미지톤 - 훈련 스케줄/캘린더와 동일한 스타일 */
#connectionScreen .connection-header h1 img,
#connectionScreen .connection-device-section h3 img {
  filter: none;
  opacity: 1;
}

/* 블루투스 기기 연결 버튼 스타일 - 연결 전: 반투명 파랑색 계열 */
#connectionScreen .btn-device {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 20px;
  min-height: 160px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.2) 100%);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  overflow: visible;
  color: #2563eb;
}

#connectionScreen .btn-device::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#connectionScreen .btn-device:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.25) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

#connectionScreen .btn-device:hover::before {
  opacity: 1;
}

#connectionScreen .btn-device:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

#connectionScreen .btn-device .device-btn-icon {
  order: 1 !important; /* span 아래에 표시 */
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease, filter 0.3s ease;
  flex-shrink: 0;
  align-self: center;
}

#connectionScreen .btn-device:hover .device-btn-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* 기기 연결 버튼의 span - 이미지 위에 표시되도록 order 설정 */
#connectionScreen .btn-device span {
  order: -1 !important; /* 이미지 위에 표시 */
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #2563eb !important;
  text-align: center !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  line-height: 1.4 !important;
  width: 100% !important;
  display: block !important;
  margin-bottom: 0 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* 연결된 상태 스타일 - 반투명 녹색 계열, 폰트 크기 유지, 텍스트 색깔만 진한 녹색 */
#connectionScreen .btn-device.connected {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.2) 100%);
  border-color: rgba(34, 197, 94, 0.3);
  color: #15803d;
}

#connectionScreen .btn-device.connected:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.25) 100%);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

/* 연결된 상태의 span - 위치와 크기는 연결 전과 동일, 색상만 녹색으로 변경 */
#connectionScreen .btn-device.connected span {
  order: -1 !important; /* 이미지 위에 표시 */
  color: #15803d !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  line-height: 1.4 !important;
  width: 100% !important;
  display: block !important;
  margin-bottom: 0 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* iOS 안내/아이콘 카드 */
#connectionScreen .ios-info{
  background:#fff; border:1px solid #e5e7eb; border-radius:12px;
  padding:14px 16px; margin:10px 0 16px;
  box-shadow:0 4px 16px rgba(0,0,0,.06); color:#4b5563;
}
#connectionScreen .ios-indicator{
  display:inline-flex; align-items:center; gap:8px; padding:6px 10px;
  border-radius:999px; background:#f3f4f6; color:#374151; font-weight:700; font-size:12px;
  margin-bottom:8px; border:1px solid #e5e7eb;
}
#connectionScreen .ios-indicator svg{ color:#111827; }
#connectionScreen .ios-text{ margin:6px 0 10px; color:#6b7280; font-size:10px; }
#connectionScreen .btn-ios-continue{
  display:inline-flex; align-items:center; justify-content:center; padding:8px 14px;
  font-weight:700; border-radius:10px; border:1px solid transparent;
  background:#22c55e; color:#fff; cursor:pointer;
  transition: transform .05s ease, filter .15s ease, box-shadow .15s ease;
  box-shadow:0 2px 8px rgba(34,197,94,.25);
}
#connectionScreen .btn-ios-continue:hover{ filter:brightness(1.03); }
#connectionScreen .btn-ios-continue:active{ transform:translateY(1px); }

/* iOS에서 BLE 선택 비활성화 스타일 */
.ios-disabled {
  pointer-events: none !important;
  opacity: 0.45;
  filter: grayscale(45%);
}
.ios-disabled .btn,
.ios-disabled button,
button[aria-disabled="true"] {
  pointer-events: none !important;
  cursor: not-allowed !important;
  opacity: 0.55;
}

/* 연결된 기기 카드 */
.device-card{
  display:flex; justify-content:space-between; align-items:center;
  padding:15px; margin-bottom:10px; background:transparent; border-radius:10px; transition:.3s;
}
.device-card.connected{ background:transparent; border:1px solid transparent; }
.device-info{ display:flex; align-items:center; gap:15px; }
.device-icon{
  width:72px; height:72px;
  display:flex; align-items:center; justify-content:center;
  flex-shrink: 0;
  background: transparent !important;
}
.device-icon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: transparent !important;
}
.device-details h3{ margin:0; font-size:16px; font-weight:600; }
.device-details p{ margin:2px 0 0 0; font-size:14px; color:#666; }
#connectedDevicesList{ margin:20px 0; }
#connectedDevicesSummary{ margin-top:20px; }
#connectedDevicesSummary h3{ display:flex; align-items:center; gap:10px; }

/* ========== 2) 프로필 선택 화면 (#profileScreen) ========== */

/* 프로필 선택 화면 헤더 아이콘 */
#profileScreen .header h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.profile-select-icon {
  height: 2.52em; /* 1.8em (글자 크기) * 2 * 0.7 = 2.52em (70%) */
  width: auto;
  vertical-align: middle;
}

/* 프로필 선택 화면 나가기 버튼 - 기기연결 화면과 동일한 스타일 */
.profile-exit-container {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-exit-container .btn-exit-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-exit-container .btn-exit-inline:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.profile-exit-container .btn-exit-inline:active {
  transform: translateY(0);
}

/* 캘린더 관련 버튼 이미지 스타일 - 기기선택 화면과 동일한 패턴 */
.btn-icon-image {
  width: 21px;
  height: 21px;
  margin-right: 6px;
  vertical-align: middle;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}

/* 캘린더 관련 화면 버튼 스타일 - 기기연결 버튼 패턴 적용 */
.btn-with-icon,
.btn-refresh {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
}

/* 새로고침 버튼 - 민트색톤 */
.btn-refresh {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15) 0%, rgba(20, 184, 166, 0.2) 100%) !important;
  border: 2px solid rgba(45, 212, 191, 0.3) !important;
  color: #0d9488 !important;
}

.btn-refresh:hover {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.2) 0%, rgba(20, 184, 166, 0.25) 100%) !important;
  border-color: rgba(45, 212, 191, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 212, 191, 0.2);
}

.btn-refresh:active {
  transform: translateY(0);
}

/* 저장 버튼 - 녹색톤 */
.btn-success.btn-with-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.2) 100%) !important;
  border: 2px solid rgba(34, 197, 94, 0.3) !important;
  color: #15803d !important;
}

.btn-success.btn-with-icon:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.25) 100%) !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.btn-success.btn-with-icon:active {
  transform: translateY(0);
}

/* 파랑색톤 버튼 (primary) */
.btn-primary.btn-with-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.2) 100%) !important;
  border: 2px solid rgba(59, 130, 246, 0.3) !important;
  color: #2563eb !important;
}

.btn-primary.btn-with-icon:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.25) 100%) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-primary.btn-with-icon:active {
  transform: translateY(0);
}

/* 캘린더 관련 화면의 기본 버튼 스타일 - 기기연결 버튼 패턴 적용 */
.btn-default-style {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid transparent;
}

/* 기본 버튼 (검색, 목록으로 등) - 회색톤 */
.btn-default-style:not(.btn-success):not(.btn-danger):not(.btn-primary):not(.btn-secondary) {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.15) 0%, rgba(75, 85, 99, 0.2) 100%) !important;
  border-color: rgba(107, 114, 128, 0.3) !important;
  color: #374151 !important;
}

.btn-default-style:not(.btn-success):not(.btn-danger):not(.btn-primary):not(.btn-secondary):hover {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(75, 85, 99, 0.25) 100%) !important;
  border-color: rgba(107, 114, 128, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2);
}

/* btn-secondary 기본 스타일 (샘플파일 다운로드, 파일 선택 등) - 회색톤 */
.btn-secondary.btn-default-style {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.15) 0%, rgba(75, 85, 99, 0.2) 100%) !important;
  border-color: rgba(107, 114, 128, 0.3) !important;
  color: #374151 !important;
}

.btn-secondary.btn-default-style:hover {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(75, 85, 99, 0.25) 100%) !important;
  border-color: rgba(107, 114, 128, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2);
}

/* btn-success 기본 스타일 (+ 새 워크아웃 등) - 녹색톤 */
.btn-success.btn-default-style {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.2) 100%) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  color: #15803d !important;
}

.btn-success.btn-default-style:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.25) 100%) !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

/* btn-danger 기본 스타일 (나가기, 삭제 등) - 빨간색톤 */
.btn-danger.btn-default-style {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.2) 100%) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #dc2626 !important;
}

.btn-danger.btn-default-style:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.25) 100%) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* btn-primary 기본 스타일 (적용 등) - 파랑색톤 */
.btn-primary.btn-default-style {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.2) 100%) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  color: #2563eb !important;
}

.btn-primary.btn-default-style:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.25) 100%) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* 모든 btn-default-style의 active 상태 */
.btn-default-style:active {
  transform: translateY(0);
}

/* 작은 버튼(btn-sm)에도 동일한 스타일 적용 */
.btn-sm.btn-default-style {
  padding: 8px 14px;
  font-size: 13px;
}

/* 패스워드 확인 모달 스타일 */
.schedule-password-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.schedule-password-modal-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  padding: 40px 35px;
  backdrop-filter: blur(25px);
  border: 2px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  max-width: 450px;
  width: 90%;
  animation: slideInUp 0.4s ease;
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.schedule-password-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.schedule-password-modal-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.schedule-password-modal-header h3 {
  font-size: 1.5em;
  color: #1e293b;
  margin: 0;
  font-weight: 700;
}

.schedule-password-modal-body {
  margin-bottom: 24px;
}

.schedule-password-modal-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  margin-bottom: 8px;
}

.schedule-password-modal-message {
  font-size: 0.9em;
  color: #666;
  text-align: center;
  margin-bottom: 20px;
}

.schedule-password-input-container {
  margin-bottom: 12px;
}

.schedule-password-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.schedule-password-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.schedule-password-error {
  color: #dc2626;
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.schedule-password-modal-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 모바일 반응형 */
@media (max-width: 600px) {
  .schedule-password-modal-card {
    padding: 24px;
    max-width: 95%;
  }
  
  .schedule-password-modal-icon {
    width: 40px;
    height: 40px;
  }
  
  .schedule-password-modal-header h3 {
    font-size: 1.3em;
  }
}

/* 관리자용 추가 필드 가독성 향상 */
#adminFields .form-row label { font-weight: 600; }
#adminFields .form-row select,
#adminFields .form-row input[type="date"] { min-height: 36px; }

/* 폼 행 간격 정돈(없다면 추가) */
.form-row { margin-bottom: 10px; }
.form-actions { margin-top: 12px; }

#profileScreen {
  --card-bg:#fff; --card-border:#e5e7eb;
  --text-strong:#111827; --text:#374151; --text-muted:#6b7280;
  --brand:#2e74e8; --accent-ok:#22c55e;
}
#profileScreen #userList{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
  gap:12px; margin-bottom:16px;
}
#profileScreen .user-card{
  background:var(--card-bg); border:1px solid var(--card-border); border-radius:14px;
  padding:14px; color:var(--text);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
#profileScreen .user-card:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(0,0,0,.08); border-color:#d1d5db; }
#profileScreen .user-card .user-name{ 
  font-weight:700; 
  font-size:16px; 
  color:var(--text-strong); 
  margin-bottom:4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-name-icon {
  height: 2em; /* 16px (글자 크기) * 2 = 2배 크기 */
  width: auto;
  vertical-align: middle;
}
#profileScreen .user-card .user-meta{ color:var(--text-muted); font-size:13px; }

#profileScreen .btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 12px; font-weight:700; border-radius:10px; border:1px solid transparent; cursor:pointer;
}
#profileScreen .btn.btn-primary{ background:var(--accent-ok); color:#fff; box-shadow:0 2px 8px rgba(34,197,94,.20); }
#profileScreen .btn.btn-primary:hover{ filter:brightness(1.03); }
#profileScreen .btn.btn-primary:active{ transform:translateY(1px); }
#profileScreen .user-card:focus-within,
#profileScreen .user-card:has(.btn:focus){ border-color:var(--brand); box-shadow:0 0 0 3px rgba(46,116,232,.18); }

#profileScreen #cardAddUser{
  background:#fff; border:1px dashed var(--card-border); border-radius:14px;
  text-align:center; padding:18px; color:var(--text);
}

/* 만료일 표시 */
.user-meta .expiry.is-soon   { color:#d97706; font-weight:600; } /* 임박 */
.user-meta .expiry.is-expired{ color:#dc2626; font-weight:700; } /* 만료 */




/* ========== 3) 워크아웃 선택 화면 (#workoutScreen) ========== */
.workout-list { 
  overflow-x: auto;
  width: 100%;
}

/* 워크아웃 테이블 스타일 */
.workout-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.workout-table thead {
  background: linear-gradient(135deg, #2e74e8 0%, #1e5bb8 100%);
  color: #fff;
}

.workout-table thead th {
  padding: 14px 12px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 2px solid #1e5bb8;
}

.workout-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.workout-table tbody tr:hover {
  background-color: #f9fafb;
}

.workout-table tbody tr:last-child {
  border-bottom: none;
}

.workout-table td {
  padding: 12px;
  font-size: 14px;
  color: #374151;
  vertical-align: middle;
}

.workout-table .text-center {
  text-align: center;
}

.workout-title-cell {
  font-weight: 600;
  color: #111827;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.workout-title-cell .group-room-badge {
  align-self: flex-start;
}

/* 그룹 훈련방 개설 아이콘 스타일 */
.group-room-open-icon {
  display: inline-block;
  cursor: help;
  transition: transform 0.2s ease;
}

.group-room-open-icon img {
  display: block;
  transition: transform 0.2s ease;
}

.group-room-open-icon.clickable {
  cursor: pointer;
}

.group-room-open-icon.clickable:hover {
  transform: scale(1.1);
}

.group-room-open-icon.clickable:hover img {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* 이미지 버튼 스타일 */
.btn-image {
  padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-image:hover {
  background: #f0f0f0;
  border-color: #e5e7eb;
}

.btn-image:active {
  transform: scale(0.95);
}

.workout-actions-wrapper .group-room-open-icon {
  margin-left: 6px;
  vertical-align: middle;
}

.workout-description-cell {
  color: #6b7280;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workout-actions-cell {
  white-space: nowrap;
}

.workout-actions-wrapper {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.workout-actions-wrapper .btn-edit,
.workout-actions-wrapper .btn-delete {
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.workout-actions-wrapper .btn-edit:hover {
  background: #eff6ff;
  border-color: #2e74e8;
  color: #2e74e8;
}

.workout-actions-wrapper .btn-delete:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
}

.workout-actions-wrapper .btn-edit.is-disabled,
.workout-actions-wrapper .btn-delete.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.workout-actions-wrapper .btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

/* 반응형 처리 */
@media (max-width: 1200px) {
  .workout-table {
    font-size: 13px;
  }
  
  .workout-table thead th,
  .workout-table td {
    padding: 10px 8px;
  }
  
  .workout-description-cell {
    max-width: 200px;
  }
}

@media (max-width: 768px) {
  .workout-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .workout-table {
    min-width: 800px;
  }
  
  .workout-actions-wrapper {
    flex-wrap: nowrap;
    gap: 4px;
  }
  
  .workout-actions-wrapper .btn-sm {
    padding: 5px 8px;
    font-size: 12px;
    white-space: nowrap;
  }
}

/* ==== Workout Builder: 하단 액션 바 고정 & 덮임 방지 ==== */
.builder-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 12px 0 16px;
  z-index: 50;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
}
.builder-actions .btn-row { justify-content: center; gap: 12px; }
.builder-actions, 
.builder-actions * { pointer-events: auto; }

/* ========== 4) 훈련 준비 화면 (#trainingReadyScreen) ========== */
.workout-preview {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
  z-index: 1;
  -webkit-overflow-scrolling: touch;
}
.workout-preview h2{ text-align:center; color:#2e74e8; margin-bottom:20px; font-size:24px; }
.preview-stats{
  display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:20px; text-align:center;
}
.preview-stats > div{ 
  padding:12px; 
  background: rgba(248, 249, 250, 0.6);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius:8px; 
}
.preview-stats strong{ font-size:28px; color:#2e74e8; display:block; margin-bottom:5px; }

/* 세그먼트 프리뷰 영역 개선 - 반투명 스타일 */
.segment-preview {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding: 12px;
  background: rgba(248, 249, 250, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow-x: auto;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.segment-item{
  padding:12px 16px; 
  border-radius:10px; 
  min-width:110px; 
  text-align:center; 
  color:#fff;
  display:flex; 
  flex-direction:column; 
  align-items:center; 
  justify-content:center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.segment-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
  z-index: 0;
}
.segment-item > * {
  position: relative;
  z-index: 1;
}
.segment-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}
.segment-item h4{ font-size:13px; margin:0 0 8px; font-weight:500; }
.segment-item .ftp-percent{ font-size:24px; font-weight:700; margin:4px 0; line-height:1; }
.segment-item .duration{ font-size:12px; opacity:.9; margin-top:4px; }
.segment-item.warmup{ 
  background: rgba(76, 175, 80, 0.65);
  border-color: rgba(76, 175, 80, 0.35);
}
.segment-item.interval{ 
  background: rgba(33, 150, 243, 0.65);
  border-color: rgba(33, 150, 243, 0.35);
}
.segment-item.rest{ 
  background: rgba(158, 158, 158, 0.65);
  border-color: rgba(158, 158, 158, 0.35);
}
.segment-item.cooldown {
  background: rgba(156, 39, 176, 0.65);
  border-color: rgba(156, 39, 176, 0.35);
}
.segment-item.sweetspot {
  background: rgba(255, 152, 0, 0.65);
  border-color: rgba(255, 152, 0, 0.35);
}

/* 훈련 준비 화면 전체 컨테이너 */
.training-ready {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  position: relative;
  z-index: 1;
  padding-bottom: 100px;
}

/* 훈련 방식 선택 영역 */
.training-mode-selection {
  margin-top: 20px;
}

.training-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

/* 개인훈련/그룹훈련 블럭 - 반투명, 얇은 실선 테두리, 컴팩트 */
.training-mode-card {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.training-mode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.15);
}

/* 개인훈련 블럭 - 민트색톤 */
.training-mode-card.individual-training {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.25);
}

.training-mode-card.individual-training:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.35);
}

/* 그룹훈련 블럭 - 주황색톤 반투명 */
.training-mode-card.group-training {
  background: rgba(251, 146, 60, 0.15) !important;
  border-color: rgba(251, 146, 60, 0.25) !important;
}

.training-mode-card.group-training:hover {
  background: rgba(251, 146, 60, 0.2) !important;
  border-color: rgba(251, 146, 60, 0.35) !important;
}

.training-mode-card .mode-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.training-mode-card .mode-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.training-mode-card h4 {
  font-size: 16px;
  margin-bottom: 6px;
  color: #1e3a8a !important;
  font-weight: 600;
}

/* 개인훈련/그룹훈련 블럭 제목 색상 명시적 지정 */
.training-mode-card.individual-training h4,
.training-mode-card.group-training h4 {
  color: #1e3a8a !important;
}

.training-mode-card p {
  font-size: 13px;
  color: #475569;
  margin-bottom: 12px;
  line-height: 1.4;
}

.training-mode-card .mode-features {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  text-align: left;
}

.training-mode-card .mode-features li {
  padding: 4px 0;
  font-size: 12px;
  color: #475569;
  position: relative;
  padding-left: 18px;
  line-height: 1.4;
}

.training-mode-card .mode-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2e74e8;
  font-weight: bold;
  font-size: 13px;
}

.training-mode-card .btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
}

/* 그룹훈련 블럭 내 버튼 - 주황색톤으로 고정 */
.training-mode-card.group-training .btn-primary.btn-default-style {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.15) 0%, rgba(234, 88, 12, 0.2) 100%) !important;
  border-color: rgba(251, 146, 60, 0.3) !important;
  color: #ea580c !important;
}

.training-mode-card.group-training .btn-primary.btn-default-style:hover {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2) 0%, rgba(234, 88, 12, 0.25) 100%) !important;
  border-color: rgba(251, 146, 60, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.2);
}

.btn-row.center {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 20px auto !important;
  width: 100% !important;
  text-align: center !important;
  position: relative;
  z-index: 100;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  border-radius: 8px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

/* ========== 5) 훈련 화면 (#trainingScreen) ========== */
#trainingScreen{
  background:#0f111a; color:#f3f3f3; padding:20px; min-height:100vh;
}

#trainingScreen.active {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
}

/* 상단 사용자 정보(아이콘은 ::before로 1개만) */
#trainingScreen .training-header{
  display:grid; gap:8px; align-items:center; background:#181a22; padding:8px 12px;
  border-radius:10px; margin:10px 0 16px; box-shadow:0 2px 6px rgba(0,0,0,.35);
}
#trainingScreen #userInfo::before{ content:"👤"; margin-right:8px; }

/* 시간/세그먼트 3분할 */
#trainingScreen .segment-details1{
  display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; align-items:center;
  background:#181a22; color:#f3f3f3; padding:8px 12px; border-radius:10px;
  margin:10px 0 16px; box-shadow:0 2px 6px rgba(0,0,0,.35);
}
#trainingScreen .segment-details1 > div{ min-width:0; }
#trainingScreen .segment-details1 > div > span{
  display:inline-block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
#trainingScreen .seg-left1{text-align:left;} .seg-center1{text-align:center;} .seg-right1{text-align:right;}
#trainingScreen .elapsed-wrap1::before{ content:"⏱"; margin-right:6px; }
#trainingScreen #nextSegment::before{ content:"⭐"; margin-right:6px; }

/* 메트릭 그리드 */
#trainingScreen .metrics-grid{
  display:grid; grid-template-columns:1fr 1.2fr 1fr; gap:15px; margin-bottom:20px;
}
#trainingScreen .metric-card{
  background:#1b1e2b; padding:15px; border-radius:15px; box-shadow:inset 0 0 12px rgba(255,255,255,0.05);
  text-align:center;
}
#trainingScreen .metric-card .metric-value{ font-size:40px; font-weight:700; }
#trainingScreen .metric-card .metric-label{ font-size:13px; color:#aaa; }

/* 중앙 파워 디스플레이 */
#trainingScreen .power-display{
  background:linear-gradient(180deg,#22283b,#1a1d2a);
  border-radius:20px; text-align:center; padding:20px;
  box-shadow:0 3px 10px rgba(0,0,0,0.5);
}
#trainingScreen .current-power{ font-size:80px; font-weight:800; color:#00d9ff; }
#trainingScreen .unit-dim{ font-size:14px; color:#aaa; }

/* 파워 달성도 바(높이 크게) */
#trainingScreen .power-progress{
  height:30px; background:#202331; border-radius:10px;
  margin:16px 0 10px; overflow:hidden; position:relative;
}
#trainingScreen .power-progress-bar{
  height:100%; width:0%; border-radius:10px;
  transition: width .35s ease, background .25s ease;
}
#trainingScreen .power-progress-label{
  margin-top:8px; font-size:.13px; color:#cfd3da;
  display:flex; justify-content:space-between;
}

/* 우측 심박/케이던스/칼로리 */
#trainingScreen .dual-metric .metric-item{ margin-bottom:10px; }
#trainingScreen .dual-metric .metric-value{ font-size:40px; font-weight:bold; color:#ff3c6a; }
#trainingScreen .dual-metric .metric-label{ font-size:13px; color:#ccc; }



@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes pulse-edge {
  0%, 100% { opacity: 0.8; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(1.5); }
}

/* 타임라인 전체 컨테이너 */
.timeline-wrap {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.timeline-legend {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

/* 컨트롤 버튼 */
#trainingScreen .training-controls{
  display:flex; justify-content:center; gap:25px; margin-top:20px;
}
#trainingScreen .control-btn{
  width:60px; height:60px; border-radius:50%; border:none;
  background:#2b2e3e; color:#fff; font-size:22px; cursor:pointer;
  transition: transform .2s, background .2s;
}
#trainingScreen .control-btn:hover{ background:#39405b; transform:scale(1.1); }
#trainingScreen .control-btn.stop{ background:#ff4c4c; }
#trainingScreen .control-btn.pause{ background:#ffaa00; }

/* === 미니 차트 공통 === */
.chart-area {
  width: 100%;
  height: 170px;
  margin-top: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}
.chart-area canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== Chart card: header + bottom-aligned canvas ===== */
.chart-card{
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 170px;                /* 필요하면 160~200px 사이로 조정 */
  margin-top: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}

/* 상단 제목 라벨 */
.chart-card .chart-header{
  display: flex;
  align-items: center;
  justify-content: space-between; /* 제목 좌 / 수치 우 */
}
.chart-card .chart-header .chart-stats{
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
}

/* 하단 정렬 바디(캔버스 컨테이너) */
.chart-card .chart-body{
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;         /* ⬅ 하단 정렬 핵심 */
  padding: 6px 6px 6px 6px;
}

/* 캔버스는 가로/세로 100%로 채우되, 하단에 밀착 */
.chart-card .chart-body canvas{
  display: block;
  width: 100%;
  height: 100%;
}

/* 훈련/생체 패널 내부에서만 더 촘촘하게 보이도록 약간 보조 */
#trainingScreen .chart-card{
  background: rgba(0,0,0,0.18);
  border-color: rgba(255,255,255,0.06);
}

/* 그래프 하단 시간 표시 블록 */
.chart-time-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-time-labels span {
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af;
  line-height: 1;
}

/* 시작 시간: 왼쪽 끝 */
.chart-time-labels span:first-child {
  flex: 0 0 auto;
  text-align: left;
}

/* 중간 시간: 가운데 */
.chart-time-labels span:nth-child(2) {
  flex: 1;
  text-align: center;
}

/* 현재 누적 시간: 오른쪽 끝 */
.chart-time-labels span:last-child {
  flex: 0 0 auto;
  text-align: right;
}





/* ========== 6) 결과 화면 (#resultScreen) ========== */
.achievement-circle{
  width:150px; height:150px; border-radius:50%;
  background:linear-gradient(135deg, #2e74e8, #00c6ff);
  margin:0 auto 20px; display:flex; align-items:center; justify-content:center;
  color:#fff; box-shadow:0 3px 8px rgba(0,0,0,0.2);
}
.achievement-text{ font-size:2.2em; font-weight:700; }
.result-stats{
  display:flex; justify-content:space-around; flex-wrap:wrap; margin:15px 0;
}
.result-stat{ text-align:center; width:45%; margin-bottom:15px; }
.result-stat-value{ font-size:28px; font-weight:600; color:#2e74e8; }
.result-stat-label{ font-size:0.9em; color:#777; }

/* ========== 카운트다운 오버레이 (공통) ========== */
.countdown-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,0.6);
  display:flex; align-items:center; justify-content:center; z-index:999;
}
.countdown-number{
  font-size:220px; font-weight:bold; color:#fff; text-shadow:0 0 10px #000;
  animation: pop 250ms ease;
}
@keyframes pop{
  0% { transform: scale(0.9); opacity: .8; }
  60% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1.0); opacity: 1; }
}

/* ========== 워크아웃 관리 스타일 ========== */
.workout-card {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: all 0.2s ease;
}

.workout-card:hover {
  border-color: #2e74e8;
  box-shadow: 0 4px 12px rgba(46, 116, 232, 0.1);
}

.workout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.workout-title {
  font-weight: 600;
  font-size: 16px;
  color: #111827;
}

.workout-actions {
  display: flex;
  gap: 8px;
}

.workout-details {
  margin-bottom: 12px;
}

.workout-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.workout-meta .author {
  font-size: 14px;
  color: #374151;
}

.workout-meta .duration {
  font-size: 14px;
  color: #374151;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 12px;
}

.workout-description {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}

.publish-date {
  font-size: 12px;
  color: #9ca3af;
}

.status-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.status-badge.visible {
  background: #dcfce7;
  color: #166534;
}

.status-badge.hidden {
  background: #fee2e2;
  color: #991b1b;
}

.form-help {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.form-group select:focus {
  outline: none;
  border-color: #2e74e8;
  box-shadow: 0 0 0 3px rgba(46, 116, 232, 0.1);
}

/* ========== 세그먼트 관리 스타일 ========== */
.segment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.segment-summary {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #6b7280;
}

.segment-summary strong {
  color: #2e74e8;
}

.segments-list {
  min-height: 120px;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.segments-empty {
  text-align: center;
  color: #9ca3af;
  padding: 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.segments-empty p {
  margin: 4px 0;
}

.segments-empty .muted {
  font-size: 14px;
}

.segment-card {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.segment-card:hover {
  border-color: #2e74e8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(46, 116, 232, 0.1);
}

.segment-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.segment-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.segment-type-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.segment-type-badge.warmup { background: #fef3c7; color: #92400e; }
.segment-type-badge.interval { background: #fecaca; color: #991b1b; }
.segment-type-badge.rest { background: #dbeafe; color: #1d4ed8; }
.segment-type-badge.sweetspot { background: #f3e8ff; color: #7c3aed; }
.segment-type-badge.tempo { background: #d1fae5; color: #065f46; }
.segment-type-badge.threshold { background: #fed7aa; color: #c2410c; }
.segment-type-badge.vo2max { background: #fce7f3; color: #be185d; }
.segment-type-badge.cooldown { background: #e0f2fe; color: #0c4a6e; }

.segment-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.segment-label {
  font-weight: 600;
  color: #111827;
}

.segment-meta {
  font-size: 14px;
  color: #6b7280;
}

.segment-intensity {
  font-weight: 600;
  color: #2e74e8;
}

.segment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segment-drag-handle {
  cursor: grab;
  color: #9ca3af;
  padding: 4px;
}

.segment-drag-handle:active {
  cursor: grabbing;
}

.segment-edit-btn, .segment-delete-btn {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.segment-edit-btn:hover { background: #e0f2fe; }
.segment-delete-btn:hover { background: #fee2e2; }

.quick-add-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  margin-right: 4px;
}

/* 세그먼트 편집 모달 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 100000;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
}

.modal-close:hover {
  color: #374151;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 25px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.modal-footer .btn {
  min-height: 50px;
  min-width: 100px;
  padding: 15px 25px;
  font-size: 16px;
  position: relative;
  z-index: 100001;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.duration-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.duration-input input {
  width: 60px;
}

.intensity-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.intensity-input input {
  width: 80px;
}

.input-suffix {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.ramp-settings {
  margin-top: 12px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.ramp-settings.hidden {
  display: none;
}

/* ========== 로딩 및 상태 스타일 ========== */
.loading-container {
  animation: fadeIn 0.3s ease-in;
}

/* 진행 표시가 포함된 로딩 컨테이너 */
.loading-container-with-progress {
  padding: 40px 20px;
  text-align: center;
  animation: fadeIn 0.3s ease-in;
}

.loading-container-with-progress .loading-spinner {
  margin-bottom: 30px;
}

.loading-container-with-progress .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e9ecef;
  border-top-color: #2e74e8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 훈련일지 로딩 스피너 */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  animation: fadeIn 0.3s ease-in;
}

.loading-spinner .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e9ecef;
  border-top-color: #2e74e8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-spinner .loading-text {
  color: #666;
  font-size: 16px;
  font-weight: 500;
  margin-top: 12px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading-progress-section {
  max-width: 400px;
  margin: 0 auto;
}

.loading-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.loading-progress-message {
  color: #555;
  font-weight: 500;
}

.loading-progress-text {
  color: #2e74e8;
  font-weight: 600;
  font-size: 16px;
}

.loading-progress-bar-container {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2e74e8 0%, #4a90e2 50%, #2e74e8 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  transition: width 0.3s ease-out;
  animation: progress-shimmer 2s ease-in-out infinite;
  position: relative;
}

.loading-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progress-glow 1.5s ease-in-out infinite;
}

@keyframes progress-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes progress-glow {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* 스케줄 생성/저장 진행 오버레이 */
.schedule-create-progress-overlay,
.schedule-save-progress-overlay,
.schedule-training-progress-overlay,
.schedule-delete-progress-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-in;
}

.schedule-create-progress-container,
.schedule-save-progress-container,
.schedule-training-progress-container,
.schedule-delete-progress-container {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.schedule-delete-progress-container h3 {
  margin: 20px 0 10px;
  color: #dc2626;
  font-size: 1.5em;
  font-weight: 700;
}

.schedule-delete-progress-container .schedule-delete-message {
  color: #666;
  font-size: 1em;
  margin-top: 10px;
}

.schedule-delete-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.schedule-delete-spinner .spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #dc2626;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* 일별 워크아웃 지정 - 날짜 입력 필드 */
.day-date-section {
  margin-bottom: 15px;
}

.day-date-section label {
  display: block;
  font-size: 0.9em;
  margin-bottom: 4px;
  color: #555;
  font-weight: 500;
}

.day-date-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.day-date-input:focus {
  outline: none;
  border-color: #2e74e8;
  box-shadow: 0 0 0 3px rgba(46, 116, 232, 0.1);
}

/* 버튼 로딩 스피너 */
.btn-loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.empty-state {
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-card, .workout-card {
  transition: all 0.2s ease;
}

.user-card:hover, .workout-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 116, 232, 0.15);
}

.loading-text {
  animation: pulse 1.5s ease-in-out infinite;
}

.success-state {
  text-align: center;
  padding: 40px 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  margin: 20px 0;
}

.success-state-icon {
  font-size: 32px;
  color: #22c55e;
  margin-bottom: 12px;
}

.success-state-title {
  font-size: 16px;
  font-weight: 600;
  color: #16a34a;
  margin-bottom: 8px;
}

.saving-state {
  position: relative;
  overflow: hidden;
}

.saving-state::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: saving-shimmer 1.5s infinite;
}

@keyframes saving-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.btn-saving {
  background: #6c757d !important;
  cursor: not-allowed !important;
  opacity: 0.8;
}

.btn-saving .saving-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: btn-loading 0.8s linear infinite;
}

@keyframes btn-loading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ========== 그룹화된 세그먼트 스타일 ========== */
.grouped-segment {
  border: none;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 8px;
}

.group-header h4 {
  margin: 0 0 2px 0;
  font-size: 14px;
  font-weight: 600;
  color: white;
  line-height: 1.2;
  text-align: center;
  width: 100%;
  display: block;
}

.repeat-badge {
  background: #007bff;
  color: white;
  padding: 1px 4px;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 500;
  display: block;
  text-align: center;
  margin: 2px auto 0 auto;
  width: fit-content;
}

.group-pattern {
  font-size: 11px;
  line-height: 1.3;
  color: #495057;
  margin-bottom: 4px;
  background: rgba(255,255,255,0.7);
  padding: 5px 6px;
  border-radius: 4px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.group-total {
  text-align: center;
  font-size: 12px;
  color: #ffffff !important;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

.repeat-badge-inline {
  background: #007bff;
  color: white;
  padding: 1px 4px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 4px;
  display: inline;
  vertical-align: middle;
}

/* ========== 개선된 훈련 화면 스타일 ========== */
#trainingScreen {
  background: #0f111a;
  color: #f3f3f3;
  padding: 16px 20px;
  min-height: 100vh;
  flex-direction: column;
  gap: 16px;
}

#trainingScreen.active {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
}

/* 1. 최상단 사용자 정보 */
.enhanced-training-user-info {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 16px;
  padding: 12px 20px;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.enhanced-training-user-info #userInfo {
  font-size: 16px;
  font-weight: 600;
  color: #e2e8f0;
}

.enhanced-training-user-info #userInfo::before {
  content: "👤";
  margin-right: 8px;
  font-size: 18px;
}

/* 2. 경과시간 및 다음 세그먼트 정보 */
.enhanced-training-time-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.enhanced-time-elapsed, .enhanced-next-segment-info {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.enhanced-time-elapsed {
  text-align: left;
}

.enhanced-next-segment-info {
  text-align: right;
}

.enhanced-time-label, .enhanced-next-label {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/*.enhanced-time-value {
  font-size: 24px;
  font-weight: 700;
  color: #00d4aa;
  margin-right: 8px;
}*/

/* 경과 시간 */
.enhanced-time-value {
  font-size: 32px;           /* 또는 clamp(28px, 3.2vw, 36px) */
  font-weight: 700;
  color: #00d4aa;
  margin-right: 8px;
  letter-spacing: .5px;       /* 선택: 가독성 */
  line-height: 1.1;           /* 선택 */
}

.enhanced-time-percent {
  font-size: 14px;
  color: #64748b;
  display:none;  /* ← 퍼센트 표시 숨김 */
}

.enhanced-next-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fbbf24;
  margin-top: 2px;
}

/* 3. 메인 메트릭 그리드 (3열) */
.enhanced-metrics-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.8fr 0.7fr;
  gap: 20px;
  margin-bottom: 20px;
}
 /*grid-template-columns: 1fr 2fr 1fr;*/

/* 공통 패널 스타일 */
.enhanced-metric-panel {
  background: #1a1d29;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
}

.enhanced-metric-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #3b82f6;
  opacity: 0.6;
}

.enhanced-panel-header {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-align: center;
}

/* 왼쪽 패널 - TSS & 칼로리 */
.enhanced-left-panel .enhanced-metric-item {
  text-align: center;
  margin-bottom: 20px;
}

.enhanced-left-panel .enhanced-metric-item:last-child {
  margin-bottom: 0;
}

.enhanced-left-panel .enhanced-metric-label {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.enhanced-left-panel .enhanced-metric-value {
  font-size: 32px;
  font-weight: 800;
  color: #e5e7eb;
  line-height: 1;
  margin-bottom: 2px;
}

.enhanced-left-panel .enhanced-metric-unit {
  font-size: 14px;
  color: #9ca3af;
  font-weight: 500;
}

/* 중앙 패널 - 메인 파워 디스플레이 */
.enhanced-main-power-display {
  text-align: center;
  position: relative;
}

/* 세그먼트 카운트다운 (더 크게) */
.enhanced-segment-countdown {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.enhanced-countdown-label {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.enhanced-countdown-value {
  font-size: 50px;
  font-weight: 700;
  color: #3b82f6;
}

/* 목표 파워와 세그먼트 평균 파워 같은 라인 - 동일한 크기 */
.enhanced-power-targets-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

/* 목표 파워 블록 - 주황색 투명 색감 */
.enhanced-target-power-section {
  flex: 1;
  padding: 12px;
  background: rgba(251, 146, 60, 0.08); /* 주황색 투명 배경 */
  border-radius: 10px;
  border: 1px solid rgba(251, 146, 60, 0.2); /* 주황색 테두리 */
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(251, 146, 60, 0.1); /* 주황색 그림자 */
}

.enhanced-target-value {
  color: #fb923c; /* 주황색 텍스트 */
  font-size: 50px;
  font-weight: 700;
  line-height: 1;
}

.enhanced-target-label {
  font-size: 11px;
  color: rgba(251, 146, 60, 0.8); /* 주황색 라벨 */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.enhanced-target-unit {
  font-size: 12px;
  color: rgba(251, 146, 60, 0.7); /* 주황색 단위 */
  font-weight: 500;
  margin-left: 2px;
}

/* 세그먼트 평균 파워 - 파란색 투명 색감톤 */
.enhanced-segment-avg-power {
  flex: 1;
  padding: 12px;
  background: rgba(59, 130, 246, 0.08); /* 파란색 투명 배경 */
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.2); /* 파란색 테두리 */
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1); /* 파란색 그림자 */
}

.enhanced-avg-value {
  color: #3b82f6; /* 파란색 텍스트 */
  font-size: 50px;
  font-weight: 700;
  line-height: 1;
}

.enhanced-avg-label {
  font-size: 11px;
  color: rgba(59, 130, 246, 0.8); /* 파란색 라벨 */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.enhanced-avg-unit {
  font-size: 12px;
  color: rgba(59, 130, 246, 0.7); /* 파란색 단위 */
  font-weight: 500;
  margin-left: 2px;
}

/* 현재 파워 섹션 - 녹색 투명 색깔 톤 */
.enhanced-current-power-section {
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(34, 197, 94, 0.08); /* 녹색 투명 배경 */
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.25); /* 녹색 테두리 */
  position: relative;
  text-align: center;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15); /* 녹색 그림자 */
}

.enhanced-current-power-value {
  font-size: 90px;
  font-weight: 900;
  color: #22c55e; /* 녹색 현재 파워 텍스트 */
  line-height: 0.9;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(34, 197, 94, 0.3); /* 녹색 텍스트 그림자 */
}

.enhanced-current-power-unit {
  font-size: 16px;
  color: rgba(34, 197, 94, 0.8); /* 녹색 단위 텍스트 */
  font-weight: 600;
  letter-spacing: 2px;
  margin-top: 8px;
}

/* 프로그래스바 - 녹색 투명 색깔 톤 */
.enhanced-power-progress {
  margin: 16px 0;
  padding: 12px;
  background: rgba(34, 197, 94, 0.05); /* 녹색 투명 배경 */
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, 0.15); /* 녹색 테두리 */
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.1); /* 녹색 그림자 */
}

.enhanced-power-progress-bar {
  height: 8px; /* 높이 약간 증가 */
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%); /* 녹색 그라데이션 */
  border-radius: 4px;
  margin-bottom: 8px;
  transition: width 0.3s ease, background-color 0.3s ease;
  width: 0%;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.4); /* 녹색 바 그림자 */
}

.enhanced-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(34, 197, 94, 0.8); /* 녹색 라벨 텍스트 */
  font-weight: 500;
}

/* 프로그래스바 달성도별 색상 (녹색 톤 유지하면서 밝기 조정) */
.enhanced-power-progress-bar.achievement-low {
  background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%); /* 빨간색 */
}

.enhanced-power-progress-bar.achievement-good {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%); /* 기본 녹색 */
}

.enhanced-power-progress-bar.achievement-high {
  background: linear-gradient(90deg, #2dd4bf 0%, #14b8a6 100%); /* 민트색 */
}

.enhanced-power-progress-bar.achievement-over {
  background: linear-gradient(90deg, #2dd4bf 0%, #14b8a6 100%); /* 민트색 */
}

/* 현재 파워 상태별 색상 변화 (녹색 톤 기반) */
.enhanced-current-power-value.power-low {
  color: #86efac; /* 연한 녹색 */
  text-shadow: 0 2px 4px rgba(134, 239, 172, 0.3);
}

.enhanced-current-power-value.power-mid {
  color: #22c55e; /* 기본 녹색 */
  text-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.enhanced-current-power-value.power-high {
  color: #16a34a; /* 진한 녹색 */
  text-shadow: 0 2px 4px rgba(22, 163, 74, 0.3);
}

.enhanced-current-power-value.power-max {
  color: #15803d; /* 매우 진한 녹색 */
  text-shadow: 0 2px 4px rgba(21, 128, 61, 0.3);
}

/* 호버 효과 추가 */
.enhanced-target-power-section:hover {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.2);
}

.enhanced-segment-avg-power:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.enhanced-current-power-section:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.25);
}

/* 현재 세그먼트 이름 */
.enhanced-current-segment-name {
  font-size: 16px;
  font-weight: 600;
  color: #e5e7eb;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 오른쪽 패널 - 심박수 & 케이던스 */
.enhanced-right-panel .enhanced-metric-item {
  text-align: center;
  margin-bottom: 20px;
}

.enhanced-right-panel .enhanced-metric-item:last-child {
  margin-bottom: 0;
}

.enhanced-right-panel .enhanced-metric-label {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.enhanced-right-panel .enhanced-metric-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
  color: #e5e7eb;
}

.enhanced-right-panel .enhanced-metric-unit {
  font-size: 14px;
  color: #9ca3af;
  font-weight: 500;
}

/* 심박수 존별 색상 (기존 스타일 유지) */
.enhanced-heart-rate.hr-zone1 { color: #64748b; }
.enhanced-heart-rate.hr-zone2 { color: #06b6d4; }
.enhanced-heart-rate.hr-zone3 { color: #10b981; }
.enhanced-heart-rate.hr-zone4 { color: #f59e0b; }
.enhanced-heart-rate.hr-zone5 { color: #ef4444; }

/* 애니메이션 효과 */
.enhanced-metric-value {
  transition: all 0.3s ease;
}

.enhanced-metric-panel {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.enhanced-metric-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ===================== 나가기 버튼 공통 스타일 ===================== */
.exit-container.bottom-center {
  text-align: center;
  margin-top: 20px;
  position: relative;
  z-index: 100;
}

.btn-exit {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(220,38,38,0.3);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s ease;
}
.btn-exit:hover { background: linear-gradient(135deg,#ef4444 0%,#dc2626 100%); transform: translateY(-1px); }
.btn-exit:active { transform: translateY(1px); }

.btn-exit-small {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  margin-left: 6px;
  box-shadow: 0 2px 6px rgba(220,38,38,0.3);
  cursor: pointer;
  transition: 0.25s;
}
.btn-exit-small:hover { background:#dc2626; transform:scale(1.05); }

/* 공통: 나가기 버튼을 아이콘+텍스트 정렬 */
.btn-exit {
  display: inline-flex;
  align-items: center;
  gap: 8px;                 /* 아이콘-텍스트 간격 */
  padding: 10px 16px;       /* 버튼 높이/여백 */
  line-height: 1;           /* 세로 정렬 안정화 */
}

/* 아이콘 크기 고정: 버튼에 맞춰 축소/확대 금지 */
.btn-exit .btn-exit-icon {
  width: 18px;              /* ← 원하는 크기 */
  height: 18px;             /* ← 원하는 크기 */
  flex: 0 0 auto;           /* 늘어나지 않도록 */
  display: inline-block;
  object-fit: contain;      /* 비율 유지 */
  max-width: 100%;
  max-height: 100%;
}

/* 텍스트 줄바꿈 방지 (모바일에서 버튼 폭 좁을 때 깔끔) */
.btn-exit .btn-exit-label {
  white-space: nowrap;
}

/* 아이콘만 쓰는 소형 버튼(상단바 등)에 사용 */
.btn-exit.icon-only {
  padding: 10px 12px;
}
.btn-exit.icon-only .btn-exit-icon {
  width: 20px;
  height: 20px;
}

/* ========== 반응형 디자인 (태블릿/모바일) ========== */

/* 태블릿 가로 모드 (1024px 이하) - 3열 유지하되 간격 조정 */
@media (max-width: 1024px) and (min-width: 769px) {
  .enhanced-metrics-grid {
    grid-template-columns: 0.7fr 1.8fr 0.7fr; /* 중앙 패널 비율 약간 축소 */
    gap: 16px;
  }
  
  .enhanced-current-power-value {
    font-size: 80px; /* 파워 텍스트 크기 약간 축소 */
  }
  
  .enhanced-target-value, .enhanced-avg-value {
    font-size: 48px;
  }
  
  .enhanced-countdown-value {
    font-size: 48px;
  }
}

/* 태블릿 세로 모드 (768px 이하 1024px 이상) - 여전히 3열 유지 */
@media (max-width: 1024px) and (min-width: 481px) {
  .enhanced-metrics-grid {
    grid-template-columns: 0.7fr 1.8fr 0.7fr; /* 중앙 패널 비율 더 축소 */
    gap: 12px;
  }
   /*grid-template-columns: 1fr 1.5fr 1fr;  중앙 패널 비율 더 축소 */

   
  .enhanced-metric-panel {
    padding: 16px 12px; /* 패딩 축소 */
  }
  
  .enhanced-current-power-value {
    font-size: 64px;
  }
  
  .enhanced-target-value, .enhanced-avg-value {
    font-size: 46px;
  }
  
  .enhanced-countdown-value {
    font-size: 46px;
  }
  
  .enhanced-left-panel .enhanced-metric-value,
  .enhanced-right-panel .enhanced-metric-value {
    font-size: 28px;
  }
}

/* 시간 정보 영역도 태블릿에서 2열 유지 */
@media (max-width: 1024px) and (min-width: 481px) {
  .enhanced-training-time-info {
    grid-template-columns: 1fr 1fr; /* 2열 유지 */
    gap: 12px;
  }
}

/* 모바일 세로 모드 (480px 이하)에서만 1열로 변경 */
@media (max-width: 480px) {
  .enhanced-metrics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .enhanced-training-time-info {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .enhanced-current-power-value {
    font-size: 56px;
  }
  
  .enhanced-target-value, .enhanced-avg-value {
    font-size: 44px;
  }
  
  .enhanced-countdown-value {
    font-size: 44px;
  }
  
  .enhanced-left-panel .enhanced-metric-value,
  .enhanced-right-panel .enhanced-metric-value {
    font-size: 24px;
  }
}

/* 매우 작은 모바일 화면 (360px 이하) */
@media (max-width: 360px) {
  #trainingScreen {
    padding: 8px 12px;
    gap: 8px;
  }
  
  .enhanced-metric-panel {
    padding: 12px 8px;
  }
  
  .enhanced-current-power-value {
    font-size: 48px;
  }
  
  .enhanced-target-value, .enhanced-avg-value {
    font-size: 40px;
  }
  
  .enhanced-countdown-value {
    font-size: 40px;
  }
}

/* 기존 반응형 */
@media (max-width: 768px) {
  #profileScreen #userList { grid-template-columns: 1fr; }
  #trainingScreen .current-power { font-size: 48px; }
  #trainingScreen .segment-details1 { font-size: 14px; }
  .timeline-progress.timeline--xl {
    height: 45px;
  }
  
  .segment-labels {
    gap: 0;
  }
  
  .segment-number {
    font-size: 9px;
  }
  
  .segment-time {
    font-size: 8px;
  }
  
  .repeat-count {
    font-size: 7px;
    padding: 1px 3px;
  }
  
  .timeline-wrap {
    padding: 12px 16px;
  }
}

/* iOS Safari 전용 개선 */
@supports (-webkit-touch-callout: none) {
  .modal-footer .btn {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  
  .modal-footer .btn:active {
    background-color: rgba(0, 0, 0, 0.1) !important;
    transform: scale(0.98) !important;
  }
}

.modal {
  -webkit-tap-highlight-color: transparent !important;
  touch-action: none !important;
}

.modal-content {
  touch-action: auto !important;
}

/* ========== 파워 달성도 네온 효과 ========== */

/* 키프레임 애니메이션 정의 */
@keyframes neonPulse {
  0%, 100% { 
    box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
    border-color: currentColor;
  }
  50% { 
    box-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor;
    border-color: currentColor;
  }
}

@keyframes neonFlow {
  0% { 
    background-position: 0% 50%;
  }
  50% { 
    background-position: 100% 50%;
  }
  100% { 
    background-position: 0% 50%;
  }
}

/* 기본 네온 스타일 */
.enhanced-metric-panel.neon-active {
  border: 2px solid;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.enhanced-metric-panel.neon-active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, currentColor, transparent);
  background-size: 400% 400%;
  border-radius: 14px;
  z-index: -1;
  animation: neonFlow 3s ease-in-out infinite;
  opacity: 0.3;
}

/* 달성도별 네온 색상 및 효과 */

/* 낮은 달성도 (< 85%) - 빨간색 네온 */
.enhanced-metric-panel.achievement-low {
  color: #ef4444;
  border-color: #ef4444;
  animation: neonPulse 2s ease-in-out infinite;
  box-shadow: 
    0 0 10px rgba(239, 68, 68, 0.5),
    0 0 20px rgba(239, 68, 68, 0.3),
    0 0 30px rgba(239, 68, 68, 0.1);
}

.enhanced-metric-panel.achievement-low::before {
  background: linear-gradient(45deg, 
    transparent, 
    rgba(239, 68, 68, 0.6), 
    rgba(220, 38, 38, 0.4), 
    transparent
  );
  background-size: 400% 400%;
}

/* 좋은 달성도 (85-115%) - 초록색 네온 */
.enhanced-metric-panel.achievement-good {
  color: #10b981;
  border-color: #10b981;
  animation: neonPulse 1.5s ease-in-out infinite;
  box-shadow: 
    0 0 15px rgba(16, 185, 129, 0.6),
    0 0 25px rgba(16, 185, 129, 0.4),
    0 0 35px rgba(16, 185, 129, 0.2);
}

.enhanced-metric-panel.achievement-good::before {
  background: linear-gradient(45deg, 
    transparent, 
    rgba(16, 185, 129, 0.7), 
    rgba(5, 150, 105, 0.5), 
    transparent
  );
  background-size: 400% 400%;
}

/* 높은 달성도 (115-130%) - 주황색 네온 */
.enhanced-metric-panel.achievement-high {
  color: #f59e0b;
  border-color: #f59e0b;
  animation: neonPulse 1.2s ease-in-out infinite;
  box-shadow: 
    0 0 12px rgba(245, 158, 11, 0.6),
    0 0 22px rgba(245, 158, 11, 0.4),
    0 0 32px rgba(245, 158, 11, 0.2);
}

.enhanced-metric-panel.achievement-high::before {
  background: linear-gradient(45deg, 
    transparent, 
    rgba(245, 158, 11, 0.7), 
    rgba(217, 119, 6, 0.5), 
    transparent
  );
  background-size: 400% 400%;
}

/* 과도한 달성도 (> 130%) - 보라색 네온 */
.enhanced-metric-panel.achievement-over {
  color: #a855f7;
  border-color: #a855f7;
  animation: neonPulse 1s ease-in-out infinite;
  box-shadow: 
    0 0 20px rgba(168, 85, 247, 0.7),
    0 0 30px rgba(168, 85, 247, 0.5),
    0 0 40px rgba(168, 85, 247, 0.3);
}

.enhanced-metric-panel.achievement-over::before {
  background: linear-gradient(45deg, 
    transparent, 
    rgba(168, 85, 247, 0.8), 
    rgba(124, 58, 237, 0.6), 
    transparent
  );
  background-size: 400% 400%;
}

/* 중앙 파워 패널 특별 효과 */
.enhanced-center-panel.achievement-good {
  box-shadow: 
    0 0 20px rgba(16, 185, 129, 0.4),
    0 0 40px rgba(16, 185, 129, 0.2),
    0 0 60px rgba(16, 185, 129, 0.1),
    inset 0 0 20px rgba(16, 185, 129, 0.1);
}

.enhanced-center-panel.achievement-over {
  box-shadow: 
    0 0 25px rgba(168, 85, 247, 0.5),
    0 0 50px rgba(168, 85, 247, 0.3),
    0 0 75px rgba(168, 85, 247, 0.15),
    inset 0 0 25px rgba(168, 85, 247, 0.1);
}

/* 파워 값에 따른 텍스트 글로우 효과 */
.enhanced-current-power-value.achievement-good {
  text-shadow: 
    0 0 10px rgba(16, 185, 129, 0.8),
    0 0 20px rgba(16, 185, 129, 0.4),
    0 0 30px rgba(16, 185, 129, 0.2);
}

.enhanced-current-power-value.achievement-high {
  text-shadow: 
    0 0 10px rgba(245, 158, 11, 0.8),
    0 0 20px rgba(245, 158, 11, 0.4),
    0 0 30px rgba(245, 158, 11, 0.2);
}

.enhanced-current-power-value.achievement-over {
  text-shadow: 
    0 0 15px rgba(168, 85, 247, 0.9),
    0 0 25px rgba(168, 85, 247, 0.5),
    0 0 35px rgba(168, 85, 247, 0.3);
}

/* 모바일 최적화 - 효과 축소 */
@media (max-width: 768px) {
  .enhanced-metric-panel.neon-active {
    animation-duration: 3s; /* 느리게 */
  }
  
  .enhanced-metric-panel.achievement-good,
  .enhanced-metric-panel.achievement-high,
  .enhanced-metric-panel.achievement-over,
  .enhanced-metric-panel.achievement-low {
    box-shadow: 
      0 0 8px currentColor,
      0 0 16px rgba(0,0,0,0.1); /* 단순화 */
  }
}

/* 성능 최적화 */
.enhanced-metric-panel {
  will-change: box-shadow, border-color;
  transform: translateZ(0); /* 하드웨어 가속 */
}

/* === 중앙 메인 파워 패널 네온 전용 규칙 === */
#trainingScreen .power-display.neon-active {
  position: relative;
  /* 기본 그림자 + 네온 테두리 겹치기 */
  box-shadow:
    0 3px 10px rgba(0,0,0,0.5),
    0 0 14px var(--neon-color, rgba(59,130,246,0.55)),
    0 0 28px var(--neon-color, rgba(59,130,246,0.35));
  outline: 1px solid color-mix(in srgb, var(--neon-color, #3b82f6) 55%, transparent);
  outline-offset: -2px;
  transition: box-shadow .25s ease, outline-color .25s ease;
}

/* 값(달성도)에 따라 색만 바꾼다: JS가 achievement-*를 같이 붙임 */
#trainingScreen .power-display.achievement-bad  { --neon-color: rgba(239, 68, 68, 0.90); }  /* 빨강: #ef4444 */
#trainingScreen .power-display.achievement-low  { --neon-color: rgba(245,158, 11, 0.85); }  /* 주황: #f59e0b */
#trainingScreen .power-display.achievement-good { --neon-color: rgba( 34,197, 94, 0.85); }  /* 초록: #22c55e */
#trainingScreen .power-display.achievement-high { --neon-color: rgba( 45, 212,191, 0.90); }  /* 민트: #2dd4bf */
#trainingScreen .power-display.achievement-over { --neon-color: rgba(168, 85,247, 0.85); }  /* 보라: #a855f7 */

/* ── 사용자 판넬 네온 (W/kg 등급) ───────────────────────── */
/* ========== 사용자 정보 패널 W/kg 네온 ========== */
/* 공통 네온 프레임 */
#trainingScreen #userPanel.neon-active {
  position: relative;
  box-shadow:
    0 3px 10px rgba(0,0,0,0.45),
    0 0 14px var(--neon-color, rgba(59,130,246,0.55)),
    0 0 28px var(--neon-color, rgba(59,130,246,0.35));
  outline: 1px solid color-mix(in srgb, var(--neon-color, #3b82f6) 55%, transparent);
  outline-offset: -2px;
  transition: box-shadow .25s ease, outline-color .25s ease;
}

/* 등급별 색상 (요청 기준) */
#trainingScreen #userPanel.neon-active.wkg-elite        { --neon-color: rgba(255, 56, 56, 0.90); } /* 상급: 빨강 */
#trainingScreen #userPanel.neon-active.wkg-advanced     { --neon-color: rgba(255,149,  0, 0.90); } /* 중급: 주황 */
#trainingScreen #userPanel.neon-active.wkg-intermediate { --neon-color: rgba(168, 85,247, 0.90); } /* 초중급: 보라 */
#trainingScreen #userPanel.neon-active.wkg-novice       { --neon-color: rgba( 34,197, 94, 0.90); } /* 초급: 초록 */
#trainingScreen #userPanel.neon-active.wkg-beginner     { --neon-color: rgba(251,191, 36, 0.95); } /* 입문: 노랑 */

/* 훈련 컨트롤 버튼 개선된 디자인 */
.enhanced-control-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.enhanced-control-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.enhanced-control-btn:active {
  transform: translateY(0);
}

/* 일시정지 아이콘
.enhanced-control-btn.pause::before {
  content: '';
  width: 4px;
  height: 20px;
  background: #fbbf24;
  border-radius: 2px;
  box-shadow: 8px 0 0 #fbbf24;
}*/

/* 위치: style (16).css - 개선형 컨트롤 버튼 아이콘 정의 구역(의사요소) */
.enhanced-control-btn.pause::before {
  content: "";
  width: 4px;
  height: 22px;
  /* 여기가 핵심 보정 ① */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%); /* 정확히 중앙 정렬 */

  /* 여기가 아이콘 도형(두 막대) */
  box-shadow: -5px 0 0 0 currentColor, 5px 0 0 0 currentColor;
  border-radius: 2px;
}

.enhanced-control-btn.pause:hover {
  border-color: #fbbf24;
  box-shadow: 
    0 8px 25px rgba(251, 191, 36, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 재생 아이콘 (일시정지 해제시) */
.enhanced-control-btn.play::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 16px solid #22c55e;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 3px;
}

.enhanced-control-btn.play:hover {
  border-color: #22c55e;
  box-shadow: 
    0 8px 25px rgba(34, 197, 94, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 건너뛰기 아이콘 */
.enhanced-control-btn.skip::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 12px solid #3b82f6;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-right: 2px;
}

.enhanced-control-btn.skip::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 12px solid #3b82f6;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: -2px;
}

.enhanced-control-btn.skip:hover {
  border-color: #3b82f6;
  box-shadow: 
    0 8px 25px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 정지 아이콘 */
.enhanced-control-btn.stop::before {
  content: '';
  width: 18px;
  height: 18px;
  background: #ef4444;
  border-radius: 3px;
}

.enhanced-control-btn.stop:hover {
  border-color: #ef4444;
  box-shadow: 
    0 8px 25px rgba(239, 68, 68, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 네온 글로우 효과 (활성화시) */
.enhanced-control-btn.active {
  box-shadow: 
    0 0 20px currentColor,
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* [훈련화면] 현재 세그먼트 진행율 그래프 */
/* 진행바를 담을 컨테이너 역할 */
.enhanced-current-segment-name{
  position: relative;
  overflow: hidden;
  border-radius: 10px;            /* 모서리 라운드(원하시면 조정) */
  padding: 6px 10px;              /* 텍스트 숨김 방지용 약간의 여백 */
}

/* 파란 투명 진행 채움 (width는 CSS 변수로 제어) */
/* 모니터링 화면에 영향을 주지 않도록 #trainingScreen 내부에서만 적용 */
#trainingScreen .enhanced-current-segment-name::before,
.training-screen .enhanced-current-segment-name::before{
  content:"";
  position:absolute; inset:0;
  width: var(--name-progress, 0%);   /* ⬅ 이 값을 JS에서 0~100%로 변경 */
   background: linear-gradient(90deg,
               rgba(245,158,11,0.22) 0%,    /* 밝은 주황 #f59e0b / 22% 투명 */
               rgba(245,158,11,0.14) 100%);
   border-right: 1px solid rgba(245,158,11,0.35);
  pointer-events:none;
  z-index:0;
  transition: width 160ms linear;    /* 부드러운 진행 */
}

/* 텍스트는 항상 채움 위에 보이도록 */
.enhanced-current-segment-name,
.enhanced-current-segment-name *{
  position: relative;
  z-index: 1;
}

/* 2-1) 타임라인 컨테이너가 오버레이 기준점이 되도록 */
#trainingScreen .timeline-progress.timeline--xl {
  position: relative;
}

/* 2-2) 마스코트/깃발을 진행바 '위'에 겹치기 (레이아웃 높이 증가 없음) */
#timelineMascotLayer {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% + 6px);          /* 진행바 위로 6px 떠서 표시 */
  height: 0;                         /* 공간 차지 X → 레이아웃 변화 없음 */
  pointer-events: none;              /* 클릭 막지 않음 */
  z-index: 5;                        /* 진행 채움보다 위 */
}

/* 100% 지점 깃발(고정) — 진행바 우측 끝에 핀 고정 */
#goalFlag {
  position: absolute;
  left: calc(100% - 1px);
  transform: translateX(-50%) translateY(0);
  bottom: 2px;
  width: 16px;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}

/* 진행바 위 마스코트/깃발 레이어 */
#trainingScreen .timeline-wrap { position: relative; }

#trainingScreen .timeline-progress.timeline--xl {
  position: relative;
  overflow: visible; /* 마스코트가 위로 튀어나와도 보이도록 */
}

#timelineMascotLayer {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% + 6px); /* 막대 바로 위에 붙임 */
  height: 0;
  pointer-events: none;
  z-index: 5;
}

#timelineMascotLayer img { position: absolute; display: block; }

/* 진행률에 맞춰 수평 이동할 요소 */
#progressMascot {
  position: absolute;
  /*transform: translateX(var(--mascot-x, 0)) translateY(0);
  /* [변경 후 - 마스코트 중심을 진행율 위치에 정렬]*/ 
  left: var(--mascot-x);
  transform: translateX(-50%) translateY(0);  
  bottom: -2px;                      /* 살짝 내려서 붙여 보이게 */
  width: clamp(38px, 6vw, 68px);     /* 화면 크기 대응, 너무 커지지 않게 */
  image-rendering: auto;
  /* 배경 투명 파일을 가정. 혹시 잔여 테두리 있으면 아래 한 줄로 은근히 블렌딩 가능 */
  /* mix-blend-mode: lighten; */
}

/*#progressMascot {
  width: clamp(36px, 5vw, 54px);   
  bottom: -2px;
  transform: translateX(var(--mascot-x, 0px));
}*/

#goalFlag {
  width: clamp(18px, 2.5vw, 28px);
  bottom: -4px;
  right: 0; /* 진행바 100% 지점 */
}

/* === [PATCH] 그룹 세그먼트 왼쪽 실선 복원 === */
/* 상태 클래스 적용 시에도 유지 
.timeline-group.is-upcoming,
.timeline-group.is-current,
.timeline-group.is-complete {
  border-left: 1px solid rgba(148,163,184,0.18) !important;
}*/

/* ==========================================================
   [PATCH] 메인 인증 화면 / 사용자 인증 로그인
========================================================== */

#authScreen {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-main-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.auth-hero-section {
  text-align: center;
  margin-bottom: 40px;
}

.auth-hero-icon {
  width: 100%; /* 전화번호 입력 블럭과 같은 넓이 */
  margin-bottom: 15px;  /* 기존 25px와 비슷하게 유지 */
  display: flex;
  justify-content: center;
  /* padding: 0 35px;*/ 
}

.hero-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.hero-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* 모바일 반응형 */
@media (max-width: 600px) {
  .hero-image {
    height: 150px;
  }
  .auth-form-card {
    padding: 24px;              /* 기존 40px 35px → 모바일 24px로 다운 */
  }
  .auth-hero-icon {
    padding: 0 24px;            /* 카드 좌우 패딩과 동일하게 유지 */
  } 
  .auth-title-image {
    margin-bottom: 24px;
  }
  .auth-title-image img,
  .auth-title-image video {
    border-width: 2px;
  }
  /* 연결 화면 모바일 스타일 */
  .connection-form-card {
    padding: 24px;              /* 모바일에서 패딩 축소 */
  }
  .connection-header h1 {
    font-size: 1.5em;
  }
  #connectionScreen .btn-device {
    min-height: 140px;
    padding: 20px 16px;
  }
  #connectionScreen .btn-device .device-btn-icon {
    order: 1 !important; /* span 아래에 표시 */
    width: 60px;
    height: 60px;
  }
  #connectionScreen .btn-device span {
    order: -1 !important; /* 이미지 위에 표시 */
    font-size: 16px !important;
    text-align: center !important;
    line-height: 1.4 !important;
    width: 100% !important;
    display: block !important;
  }
  /* 연결된 상태의 span도 모바일에서 동일하게 적용 */
  #connectionScreen .btn-device.connected span {
    order: -1 !important; /* 이미지 위에 표시 */
    font-size: 18px !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
    line-height: 1.4 !important;
    width: 100% !important;
    display: block !important;
    margin-bottom: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    color: #15803d !important;
  }
}

/* 시각적으로 더 동일해 보이도록 히어로 이미지를 카드처럼 */
.auth-hero-icon .hero-image {
  border-radius: 12px;          /* 카드와 동일 라운드 */
  box-shadow: 0 8px 25px rgba(0,0,0,0.15); /* 카드와 비슷한 그림자 */
}

.auth-hero-section h1 {
  color: white;
  font-size: 2.5em;
  margin-bottom: 15px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-hero-section .subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2em;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.auth-form-container {
  animation: slideInUp 0.6s ease;
}

.auth-form-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  padding: 40px 35px;
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.auth-title-image {
  margin-bottom: 30px;
}

.auth-title-image img,
.auth-title-image video {
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 3px solid #e2e8f0;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.auth-form-header {
  margin-bottom: 35px;
}

.form-icon {
  font-size: 3em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-form-header h3 {
  color: #2d3748;
  margin-bottom: 10px;
  font-size: 1.8em;
  font-weight: 700;
}

.auth-form-header p {
  color: #718096;
  font-size: 1.1em;
}

.phone-input-section {
  margin-bottom: 20px; /* 기존 30px에서 20px로 축소 */
}

.phone-input-section label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #2d3748;
  text-align: left;
}

.phone-input-container {
  position: relative;
  margin-bottom: 15px; /* 기존 20px에서 15px로 축소 */
}

.phone-input {
  width: 100%;
  padding: 20px 24px;
  border: 3px solid #e2e8f0;
  border-radius: 16px;
  font-size: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  letter-spacing: 2px;
  font-weight: 600;
}

.phone-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.2);
  background: white;
  transform: translateY(-2px);
}

.phone-input.valid {
  border-color: #68d391;
  background: rgba(104, 211, 145, 0.1);
  box-shadow: 0 0 0 5px rgba(104, 211, 145, 0.2);
}

.phone-input.error {
  border-color: #f56565;
  background: rgba(245, 101, 101, 0.1);
  box-shadow: 0 0 0 5px rgba(245, 101, 101, 0.2);
  animation: shake 0.6s ease-in-out;
}

.auth-status {
  margin: 12px 0; /* 기존 18px 0에서 12px 0으로 축소 */
  font-size: 15px;
  font-weight: 600;
  min-height: 20px; /* 기존 26px에서 20px로 축소 */
  transition: all 0.3s ease;
}

.auth-status.success {
  color: #38a169;
  animation: fadeInUp 0.4s ease;
}

.auth-status.error {
  color: #e53e3e;
  animation: fadeInUp 0.4s ease;
}

.auth-btn {
  width: 100%;
  padding: 16px 24px; /* 기존 20px에서 16px로 축소 */
  font-size: 18px;
  font-weight: 700;
  border-radius: 16px;
  margin-bottom: 20px; /* 기존 30px에서 20px로 축소 */
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
  position: relative;
  overflow: hidden;
  margin-top: 5px;
}

.auth-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.auth-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.7);
}

.auth-btn:hover:not(:disabled)::before {
  left: 100%;
}

.auth-btn:disabled {
  background: linear-gradient(135deg, #a0aec0, #cbd5e0);
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(160, 174, 192, 0.4);
}

.auth-help-card {
  background: rgba(102, 126, 234, 0.08);
  padding: 20px; /* 기존 25px에서 20px로 축소 */
  border-radius: 16px;
  border: 2px solid rgba(102, 126, 234, 0.15);
  margin-top: 15px; /* 새로 추가: 위쪽 여백 축소 */
}

.auth-help-card h4 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.1em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.user-reg-icon {
  height: 2em;
  width: auto;
  vertical-align: middle;
}

.test-numbers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.test-number {
  display: inline-block;
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.test-number:hover {
  background: rgba(102, 126, 234, 0.25);
  transform: translateY(-1px);
}

.help-note {
  color: #667eea;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
  font-weight: 500;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 반응형 */
@media (max-width: 480px) {
  .hero-image {
    height: 140px;  /* 작은 모바일에서는 더 컴팩트하게 */
  }
  
  .auth-hero-icon {
    margin-bottom: 10px;  /* 마진도 약간 줄임 */
  }
  
  .auth-hero-section h1 {
    font-size: 2em;
  }
  
  .auth-form-card {
    padding: 30px 25px;
    margin: 15px;
  }
  
  .phone-input {
    font-size: 18px;
    padding: 18px 20px;
  }
  
  .test-numbers {
    flex-direction: column;
    align-items: center;
  }
}

/* ========== 사용자 인증 >>>>   새 사용자 추가 폼 스타일 ========== */

.new-user-btn {
  width: 100%;
  padding: 12px 20px;
  margin-top: 5px;
  background: linear-gradient(135deg, #68d391, #38b2ac);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(104, 211, 145, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.new-user-icon {
  height: 2em;
  width: auto;
  vertical-align: middle;
}

.new-user-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(104, 211, 145, 0.5);
}

.new-user-form-container {
  margin-top: 15px; /* 새로 추가: 위쪽 여백 축소 */
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  padding: 30px;
  backdrop-filter: blur(25px);
  border: 2px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  animation: slideDownFade 0.4s ease;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px;
  }
}

.new-user-form {
  width: 100%;
}

.form-header {
  text-align: center;
  margin-bottom: 25px;
}

.form-header h3 {
  color: #2d3748;
  font-size: 1.5em;
  margin-bottom: 8px;
  font-weight: 700;
}

.form-header p {
  color: #718096;
  font-size: 0.95em;
  line-height: 1.5;
}

.user-registration-form {
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #2d3748;
  text-align: left;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

.form-group input.valid {
  border-color: #68d391;
  background: rgba(104, 211, 145, 0.05);
}

.form-hint {
  font-size: 11px;
  color: #718096;
  margin-top: 4px;
  line-height: 1.3;
  display: block;
}

.ai-preview-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.15);
  margin: 20px 0;
}

.ai-preview-card h4 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.1em;
  font-weight: 700;
  text-align: center;
}

.preview-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.preview-item {
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.preview-label {
  display: block;
  font-size: 12px;
  color: #718096;
  margin-bottom: 6px;
  font-weight: 500;
}

.preview-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #667eea;
}

.form-actions {
  margin-top: 20px; /* 기존 보다 축소 */
  display: flex;
  gap: 10px;
  justify-content: center;
}

.form-actions .btn {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.form-actions .btn-secondary {
  background: linear-gradient(135deg, #a0aec0, #718096);
  color: white;
  border: none;
  box-shadow: 0 3px 12px rgba(160, 174, 192, 0.4);
}

.form-actions .btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(160, 174, 192, 0.6);
}

.form-actions .btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
}

.form-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(102, 126, 234, 0.6);
}

/* 폼 숨기기 애니메이션 */
.new-user-form-container.hiding {
  animation: slideUpFade 0.3s ease forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px;
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
  }
}

/* 반응형 */
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .preview-items {
    grid-template-columns: 1fr;
  }
  
  .new-user-form-container {
    padding: 20px;
   margin-top: 15px; /* 새로 추가: 위쪽 여백 축소 */
  }
  
  .form-actions {
    grid-template-columns: 1fr;
  }
}

/* 반응형 */
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .preview-items {
    grid-template-columns: 1fr;
  }
  
  .new-user-form-container {
    padding: 20px;
    margin-bottom: 15px; /* 기존 보다 축소 */
  }
  
  .form-actions {
    grid-template-columns: 1fr;
  }
}


/* ===== Ocean Segment Design (drop-in) ===== */
/* 컨테이너: 녹색톤 투명 배경 + 미묘한 그림자 */
.timeline-progress.timeline--xl{
  height: 50px;                    /* 기본값 50px */
  border-radius: 16px;             /* 라운드 16px */
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.15);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.06), 0 4px 12px rgba(34,197,94,0.08);
  overflow: hidden;
}


/* 세그먼트 래퍼 */
.timeline-segments{
  display:flex; height:100%; position:relative;
}

/* 개별 세그먼트 */
.timeline-segment{
  position:relative; 
  display:flex; 
  flex-direction:column;
  align-items:center; 
  justify-content:center; /* 세로 중앙 정렬 */
  padding:0; 
  background:transparent; 
  font-size:11px; 
  font-weight:500; 
  color:#cbd5e1;
  transition:all .3s ease; 
  overflow:hidden; 
  min-width:0; 
  flex:0 0 auto;
  border-right:none !important;
  height:100%; /* 전체 높이 사용 */
}
.timeline-segment + .timeline-segment{
  border-left:1px solid rgba(148,163,184,0.18);
}

/* 라벨 스택 */
.segment-labels{ 
  display:flex !important; 
  flex-direction:column !important; 
  align-items:center !important; 
  justify-content:center !important; 
  gap:1px; 
  z-index:3; 
  position:relative; 
  height:100% !important; /* 전체 높이 사용 */
  width:100%; 
  margin:0;
  padding:0;
}
.segment-number{ font-size:10px; font-weight:600; color:#475569; line-height:1; opacity:.8; }
.segment-time{ font-size:9px; font-weight:400; color:#64748b; line-height:1; margin-top:1px; }
.repeat-count{ font-size:8px; font-weight:600; color:#0ea5e9; background:rgba(14,165,233,.1); padding:1px 4px; border-radius:6px; line-height:1; margin:1px 0; }

/* 진행 채움바 */
.progress-fill{
  --pf-alpha:0.28;
  opacity:0.32; 
  position:absolute; 
  top:0 !important; 
  left:0; 
  bottom:0 !important; 
  right:auto; 
  height:100% !important; 
  width:0%;
  z-index:1; 
  transition:width .4s ease-out, background .3s ease, opacity .3s ease; 
  border-radius:inherit;
  background: linear-gradient(90deg,
              rgba(148,163,184,0.32) 0%,
              rgba(148,163,184,0.12) 100%);
  border-right: 1px solid rgba(148,163,184,0.35);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.08);
}

/* 현재 세그먼트가 아닐 때만 기본 스타일 적용 */
.timeline-segment:not(.is-current) .progress-fill,
.timeline-group:not(.is-current) .progress-fill {
  opacity: 0.32;
  background: linear-gradient(90deg,
              rgba(148,163,184,0.32) 0%,
              rgba(148,163,184,0.12) 100%);
}
.timeline-segment:first-child .progress-fill{ border-radius:16px 0 0 16px; }
.timeline-segment:last-child  .progress-fill{ border-radius:0 16px 16px 0; }

/* 상태별: 대기/현재/완료 */
/* 1) 단일 세그먼트: 휴식/쿨다운 제외 → 대기 중 주황 30% 고정 */
.timeline-segment.is-upcoming:not([data-type="rest"]):not([data-type="cooldown"]) {
  background: rgba(34,197,94,.08) !important;
  box-shadow: inset 0 0 0 1px rgba(34,197,94,.25) !important;
  border-left: 1px solid rgba(148,163,184,0.18) !important;                       /* 오션 기본 유지 */
}

/* (선택) 텍스트 대비 향상: 필요 없으면 이 블록은 삭제 가능 */
.timeline-segment.is-upcoming .segment-number,
.timeline-segment.is-upcoming .segment-time{
  color: rgba(34,197,94,.75);
}

.timeline-segment.is-current{
  border-top:1px solid rgba(34,197,94,.25) !important;
  border-bottom:1px solid rgba(34,197,94,.25) !important;
}
.timeline-segment.is-current .segment-number,
.timeline-segment.is-current .segment-time{ color:#15803d; font-weight:600; }
.timeline-segment.is-current::after{
  content:""; position:absolute; bottom:-3px; left:50%; transform:translateX(-50%);
  width:60%; height:3px; background:linear-gradient(90deg,transparent,#22c55e,transparent); border-radius:2px;
}

/* 완료 */
.timeline-segment.is-complete .progress-fill{ width:100% !important; }
.timeline-segment.is-complete{ color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.3); }
.timeline-segment.is-complete .segment-number,
.timeline-segment.is-complete .segment-time,
.timeline-segment.is-complete .repeat-count{ color:#fff; }

/* 달성도 버킷 */
.timeline-segment.is-complete.timeline-ach-low .progress-fill{
  background: linear-gradient(90deg,
              rgba(249,115,22,0.55) 0%,
              rgba(234,88,12,0.40) 100%) !important;
  opacity:.9;
}
.timeline-segment.is-complete.timeline-ach-good .progress-fill{
  background: linear-gradient(90deg,
              rgba(52,211,153,0.55) 0%,
              rgba(16,185,129,0.35) 100%) !important;
  opacity:.9;
}

/* 그룹 세그먼트 */
/* 대기(그룹) — 연녹색 톤 배경 */
.timeline-group.is-upcoming{
  background: rgba(34,197,94,.08) !important;
  box-shadow: inset 0 0 0 1px rgba(34,197,94,.25) !important;
  border-left: 1px solid rgba(148,163,184,0.18) !important;
}
.timeline-group.is-current{
  background:transparent !important;
  box-shadow:inset 0 0 0 1px rgba(34,197,94,.22) !important;
  border-left:1px solid rgba(148,163,184,0.18) !important;
  border-top:none !important; border-right:none !important; border-bottom:none !important;
}
.timeline-group.is-complete{
  background:transparent !important; border-left:1px solid rgba(148,163,184,0.18) !important;
  border-top:none !important; border-right:none !important; border-bottom:none !important;
}
.timeline-group.is-complete.timeline-ach-low .progress-fill{
  background: linear-gradient(90deg,
              rgba(249,115,22,0.55) 0%,
              rgba(234,88,12,0.40) 100%) !important;
  opacity:.9;
}
.timeline-group.is-complete.timeline-ach-good .progress-fill{
  background: linear-gradient(90deg,
              rgba(52,211,153,0.55) 0%,
              rgba(16,185,129,0.35) 100%) !important;
  opacity:.9;
}

/* 쉼머 비활성화 */
.timeline-segment:not(.is-current) .progress-fill::before{ content:""; display:none !important; opacity:0 !important; animation:none !important; background:none !important; }
.timeline-segment.is-complete .progress-fill::before,
.timeline-segment.is-complete .progress-fill::after{ content:""; display:none !important; opacity:0 !important; animation:none !important; background:none !important; }


/* 진행 중(현재) 세그먼트/그룹 공통: 투명 노란색 - 최우선 적용 */
.timeline-segment.is-current .progress-fill,
.timeline-group.is-current .progress-fill{
  background: linear-gradient(90deg,
              rgba(255,255,0,0.3) 0%,
              rgba(255,255,0,0.2) 100%) !important;
  background-image: none !important;
  background-color: rgba(255,255,0,0.25) !important;
  opacity: 1 !important;
  border-right: 1px solid rgba(255,255,0,0.4) !important;
  box-shadow: inset 0 0 6px rgba(255,255,0,0.15) !important;
}

/* 현재 세그먼트 인라인 스타일 덮어쓰기 (JS에서 설정하는 색상 무시) */
.timeline-segment.is-current .progress-fill[style*="background"],
.timeline-group.is-current .progress-fill[style*="background"] {
  background: linear-gradient(90deg,
              rgba(255,255,0,0.3) 0%,
              rgba(255,255,0,0.2) 100%) !important;
  background-color: rgba(255,255,0,0.25) !important;
  opacity: 1 !important;
}

/* 현재 세그먼트의 progress-fill에 대한 모든 스타일 강제 적용 */
#timelineSegments .timeline-segment.is-current .progress-fill,
#timelineSegments .timeline-group.is-current .progress-fill {
  background: linear-gradient(90deg,
              rgba(255,255,0,0.3) 0%,
              rgba(255,255,0,0.2) 100%) !important;
  background-color: rgba(255,255,0,0.25) !important;
  opacity: 1 !important;
  border-right: 1px solid rgba(255,255,0,0.4) !important;
  box-shadow: inset 0 0 6px rgba(255,255,0,0.15) !important;
}


/* ===== Always-on vertical divider (top layer) ===== */
:root{
  --tl-divider: rgba(148,163,184,0.18); /* 테두리 색과 동일 */
}

/* 기본 경계선(호환) */
.timeline-segment + .timeline-segment{
  border-left: 1px solid var(--tl-divider);
}

/* 세로줄이 progress-fill 위에 항상 보이도록 */
.timeline-segment{
  position: relative; /* ::before 기준점 */
}

.timeline-segment + .timeline-segment::before{
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--tl-divider);
  z-index: 4;           /* progress-fill(z-index:1)보다 높게 */
  pointer-events: none;
}

/* (옵션) 그룹 세그먼트에도 동일 처리 */
.timeline-group{
  position: relative;
}
.timeline-group + .timeline-group::before{
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--tl-divider);
  z-index: 4;
  pointer-events: none;
}

/* 둥근 라운드 캡을 가리는 상/하 테두리 제거 */
.timeline-segment.is-current{
  border-top: none !important;
  border-bottom: none !important;
}

/* 그룹 세그먼트도 동일 처리(있다면) */
.timeline-group.is-current{
  border-top: none !important;
  border-bottom: none !important;
}

/* 혹시 모를 넘침 방지: 컨테이너 라운드 + 클리핑 유지(이미 있다면 생략 가능) */
.timeline-progress.timeline--xl{
  overflow: hidden;
  border-radius: 16px;
}

/* 라운드 캡 확실히: 맨 앞/뒤 세그먼트의 fill에 둥근 모서리 적용(이미 있다면 생략 가능) */
.timeline-segment:first-child .progress-fill{ border-radius:16px 0 0 16px; }
.timeline-segment:last-child  .progress-fill{ border-radius:0 16px 16px 0; }


/* 1) 컨테이너/래퍼에서 클리핑을 확실히 */
.timeline-progress.timeline--xl{
  border-radius:16px;            /* 라운드 유지 */
  overflow:hidden;               /* 컨테이너 차원에서 클립 */
}
.timeline-segments{
  border-radius:16px;            /* 내부 래퍼도 라운드 동일 적용 */
  overflow:hidden;               /* 추가 클립(브라우저별 안정화) */
}

/* 2) 맨 앞/맨 뒤 세그먼트 자체에 라운드 + 클리핑 부여
      → 각 세그먼트 박스가 자체적으로 둥근 마스크가 되어 채움바가 절대 넘치지 않음 */
.timeline-segment:first-child{
  border-top-left-radius:16px;
  border-bottom-left-radius:16px;
  overflow:hidden;               /* 자식(progress-fill) 클립 */
}
.timeline-segment:last-child{
  border-top-right-radius:16px;
  border-bottom-right-radius:16px;
  overflow:hidden;
}

/* 3) 진행 채움바의 모서리 라운드(이미 있다면 중복 OK) */
.timeline-segment:first-child .progress-fill{ border-radius:16px 0 0 16px; }
.timeline-segment:last-child  .progress-fill{ border-radius:0 16px 16px 0; }

/* 4) (선택) 웹킷 일부 환경에서의 서브픽셀 ‘새어 나옴’ 보정
      → 아주 얇은 바깥쪽 bleeding을 방지 */
@supports (-webkit-touch-callout: none) {
  .timeline-segment:first-child .progress-fill{
    clip-path: inset(0 0 0 0 round 16px 0 0 16px);
  }
  .timeline-segment:last-child .progress-fill{
    clip-path: inset(0 0 0 0 round 0 16px 16px 0);
  }
}

/* 5) 현재 세그먼트의 가로줄 제거(이미 적용했으면 생략 가능)
      → 라운드 캡과 시각 충돌 방지 */
.timeline-segment.is-current,
.timeline-group.is-current{
  border-top:none !important;
  border-bottom:none !important;
}


/* =========================
   중앙 파워패널 네온 브리지
   - 세그먼트 구조 변경 후에도 동작하도록
   - 대상: #powerPanel, .current-power, .enhanced-current-power-section
   ========================= */

/* 기본 박스(흰 테두리 유지 + 네온용 레이어 구조) */
#trainingScreen #powerPanel,
#trainingScreen .current-power,
#trainingScreen .enhanced-current-power-section {
  position: relative;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  transition: border-color .25s ease, box-shadow .25s ease, filter .25s ease;
  overflow: visible;      /* 네온 흐림 효과 잘 보이게 */
  isolation: isolate;     /* ::before 레이어 분리 */
}

/* 공통 네온 베이스(기존 .enhanced-metric-panel.neon-active 대체) */
#trainingScreen #powerPanel.neon--on,
#trainingScreen #powerPanel.neon--under,
#trainingScreen #powerPanel.neon--over,
#trainingScreen .current-power.neon--on,
#trainingScreen .current-power.neon--under,
#trainingScreen .current-power.neon--over,
#trainingScreen .enhanced-current-power-section.neon--on,
#trainingScreen .enhanced-current-power-section.neon--under,
#trainingScreen .enhanced-current-power-section.neon--over {
  /* 기존 neon-active와 동일 개념 */
  animation: neonPulse 1.8s ease-in-out infinite;
}

/* 흐르는 하이라이트(기존 ::before 유사) */
#trainingScreen #powerPanel.neon--on::before,
#trainingScreen #powerPanel.neon--under::before,
#trainingScreen #powerPanel.neon--over::before,
#trainingScreen .current-power.neon--on::before,
#trainingScreen .current-power.neon--under::before,
#trainingScreen .current-power.neon--over::before,
#trainingScreen .enhanced-current-power-section.neon--on::before,
#trainingScreen .enhanced-current-power-section.neon--under::before,
#trainingScreen .enhanced-current-power-section.neon--over::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: linear-gradient(45deg, transparent, currentColor, transparent);
  background-size: 400% 400%;
  animation: neonFlow 3s ease-in-out infinite;
  opacity: .30;
  z-index: -1;
}

/* === 상태별 색상 맵핑 ================== */
/* 정타(±3%) → 민트 */
#trainingScreen #powerPanel.neon--on,
#trainingScreen .current-power.neon--on,
#trainingScreen .enhanced-current-power-section.neon--on {
  color: #10b981;
  border-color: #10b981 !important;
  box-shadow:
    0 0 12px rgba(16,185,129,.60),
    0 0 28px rgba(16,185,129,.35),
    inset 0 0 8px rgba(16,185,129,.25);
}

/* 언더(목표 미달) → 블루 */
#trainingScreen #powerPanel.neon--under,
#trainingScreen .current-power.neon--under,
#trainingScreen .enhanced-current-power-section.neon--under {
  color: #3b82f6;
  border-color: #3b82f6 !important;
  box-shadow:
    0 0 12px rgba(59,130,246,.60),
    0 0 28px rgba(59,130,246,.35),
    inset 0 0 8px rgba(59,130,246,.25);
}

/* 오버(과한 출력) → 오렌지 */
#trainingScreen #powerPanel.neon--over,
#trainingScreen .current-power.neon--over,
#trainingScreen .enhanced-current-power-section.neon--over {
  color: #f59e0b;
  border-color: #f59e0b !important;
  box-shadow:
    0 0 12px rgba(245,158,11,.65),
    0 0 28px rgba(245,158,11,.38),
    inset 0 0 8px rgba(245,158,11,.28);
}

/* 내부에 테두리 요소가 있을 때 함께 따라가도록(선택) */
#trainingScreen #powerPanel.neon--on .gauge-ring,
#trainingScreen #powerPanel.neon--under .gauge-ring,
#trainingScreen #powerPanel.neon--over .gauge-ring,
#trainingScreen .current-power.neon--on .gauge-ring,
#trainingScreen .current-power.neon--under .gauge-ring,
#trainingScreen .current-power.neon--over .gauge-ring {
  border-color: inherit !important;
  box-shadow: inherit !important;
}


/* =========================================================
   중앙 메인 파워 패널 네온 (브리지 포함)
   - 기존 코드와의 호환을 위해 대상 선택자를 확장했습니다.
   - JS는 중앙 패널에 neon-active + achievement-* 를 붙입니다.
   ========================================================= */

/* 0) 대상: 실제 중앙 파워 요소에 모두 대응 */
#trainingScreen .power-display,
#trainingScreen #powerPanel,
#trainingScreen .current-power,
#trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display {
  /* 기본 틀 – 기존 흰 테두리/레이아웃은 유지 */
  position: relative;
  border-radius: 12px;
  transition: box-shadow .25s ease, outline-color .25s ease, border-color .25s ease, filter .25s ease;
  isolation: isolate; /* 네온 레이어 겹침 안정화 */
}

/* 1) 네온 on: 올려주신 디자인을 그대로 매핑 */
#trainingScreen .power-display.neon-active,
#trainingScreen #powerPanel.neon-active,
#trainingScreen .current-power.neon-active,
#trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display.neon-active {
  /* 기본 그림자 + 네온 테두리 겹치기 */
  box-shadow:
    0 3px 10px rgba(0,0,0,0.5),
    0 0 14px var(--neon-color, rgba(59,130,246,0.55)),
    0 0 28px var(--neon-color, rgba(59,130,246,0.35));
  outline: 1px solid color-mix(in srgb, var(--neon-color, #3b82f6) 55%, transparent);
  outline-offset: -2px;
}

/* (옵션) 흐르는 하이라이트 레이어 – 시각 강화 */
#trainingScreen .power-display.neon-active::before,
#trainingScreen #powerPanel.neon-active::before,
#trainingScreen .current-power.neon-active::before,
#trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display.neon-active::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: linear-gradient(45deg, transparent, var(--neon-color, rgba(59,130,246,0.8)), transparent);
  background-size: 400% 400%;
  animation: neonFlow 3s ease-in-out infinite;
  opacity: .28;
  z-index: -1;
}

/* 2) 달성도별 색 매핑 (JS가 achievement-* 클래스를 같이 붙임) */
#trainingScreen .power-display.achievement-bad,
#trainingScreen #powerPanel.achievement-bad,
#trainingScreen .current-power.achievement-bad,
#trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display.achievement-bad {
  --neon-color: rgba(239, 68,  68, 0.90); /* 빨강 #ef4444 */
}
#trainingScreen .power-display.achievement-low,
#trainingScreen #powerPanel.achievement-low,
#trainingScreen .current-power.achievement-low,
#trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display.achievement-low {
  --neon-color: rgba(245,158, 11, 0.85); /* 주황 #f59e0b */
}
#trainingScreen .power-display.achievement-good,
#trainingScreen #powerPanel.achievement-good,
#trainingScreen .current-power.achievement-good,
#trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display.achievement-good {
  --neon-color: rgba( 34,197, 94, 0.85); /* 초록 #22c55e */
}
#trainingScreen .power-display.achievement-high,
#trainingScreen #powerPanel.achievement-high,
#trainingScreen .current-power.achievement-high,
#trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display.achievement-high {
  --neon-color: rgba( 45,212,191, 0.90); /* 민트 #2dd4bf */
}
#trainingScreen .power-display.achievement-over,
#trainingScreen #powerPanel.achievement-over,
#trainingScreen .current-power.achievement-over,
#trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display.achievement-over {
  --neon-color: rgba(168, 85,247, 0.85); /* 보라 #a855f7 */
}

/* (선택) 내부 링/테두리 요소도 네온 컬러를 상속받게 */
#trainingScreen .power-display.neon-active .gauge-ring,
#trainingScreen #powerPanel.neon-active .gauge-ring,
#trainingScreen .current-power.neon-active .gauge-ring,
#trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display.neon-active .gauge-ring {
  border-color: color-mix(in srgb, var(--neon-color, #3b82f6) 75%, rgba(255,255,255,0)) !important;
  box-shadow:
    0 0 8px  color-mix(in srgb, var(--neon-color, #3b82f6) 60%, transparent),
    inset 0 0 6px color-mix(in srgb, var(--neon-color, #3b82f6) 35%, transparent) !important;
}

/* (안드로이드 웹뷰/사파리 일부 보정) */
@supports (-webkit-touch-callout: none) {
  #trainingScreen .power-display.neon-active::before,
  #trainingScreen #powerPanel.neon-active::before,
  #trainingScreen .current-power.neon-active::before,
  #trainingScreen .enhanced-metric-panel.enhanced-center-panel.enhanced-main-power-display.neon-active::before {
    filter: blur(0.3px);
  }
}

/* ========== 훈련 스케줄 관련 스타일 ========== */

/* 스케줄 목록 */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.schedule-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.2) 100%);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 20px;
  color: #064e3b;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
  backdrop-filter: blur(10px);
}

/* 비밀번호가 설정된 스케줄 - 주황색 반투명 */
.schedule-card.has-password {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.15) 0%, rgba(249, 115, 22, 0.2) 100%);
  border: 2px solid rgba(251, 146, 60, 0.3);
  color: #7c2d12;
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.15);
}

.schedule-card.has-password:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(251, 146, 60, 0.25);
  border-color: rgba(251, 146, 60, 0.5);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2) 0%, rgba(249, 115, 22, 0.25) 100%);
}

.schedule-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.25) 100%);
}

.schedule-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.schedule-icon {
  font-size: 48px;
  line-height: 1;
}

.schedule-title-section {
  flex: 1;
}

.schedule-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #064e3b;
}

.schedule-card.has-password .schedule-title {
  color: #7c2d12;
}

.schedule-meta {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: #047857;
  opacity: 0.9;
}

.schedule-progress-section {
  margin: 16px 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.progress-percentage {
  font-weight: 700;
  font-size: 18px;
  color: #059669;
}

.progress-bar-container {
  height: 8px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #047857;
  opacity: 0.9;
}

.schedule-dates {
  margin: 12px 0;
  font-size: 14px;
  color: #047857;
  opacity: 0.9;
}

.schedule-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

/* 일별 워크아웃 지정 */
.schedule-days-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 일별 워크아웃 목록 그리드 */
.schedule-days-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

/* 반응형: 작은 화면에서는 2개씩, 매우 작은 화면에서는 1개씩 */
@media (max-width: 1024px) {
  .schedule-days-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .schedule-days-grid {
    grid-template-columns: 1fr;
  }
}

.schedule-day-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 2px solid #e5e7eb;
  transition: all 0.2s;
}

.schedule-day-card.today {
  border-color: #2e74e8;
  box-shadow: 0 0 0 3px rgba(46, 116, 232, 0.1);
}

.schedule-day-card.past {
  opacity: 0.7;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.day-date {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.day-number {
  font-size: 32px;
  font-weight: 700;
  color: #2e74e8;
}

.day-name {
  font-size: 16px;
  color: #6b7280;
}

.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.today-badge {
  background: #dbeafe;
  color: #1e40af;
}

.past-badge {
  background: #fee2e2;
  color: #991b1b;
}

.day-workout-section,
.day-note-section {
  margin-bottom: 16px;
}

.day-workout-section label,
.day-note-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
}

.workout-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

/* 워크아웃 선택 리스트 컨테이너 */
.workout-select-container {
  width: 100%;
}

.workout-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

/* 워크아웃 옵션 리스트 아이템 */
.workout-option-item {
  position: relative;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
}

.workout-option-item:hover {
  border-color: #2e74e8;
  background: #f0f7ff;
  box-shadow: 0 2px 4px rgba(46, 116, 232, 0.1);
}

.workout-option-item.selected {
  border-color: #2e74e8;
  background: #e8f2ff;
  box-shadow: 0 0 0 2px rgba(46, 116, 232, 0.1);
}

.workout-option-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.workout-option-title {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.4;
  word-break: break-word;
  flex: 1;
}

.workout-option-duration {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  padding: 4px 8px;
  background: #f3f4f6;
  border-radius: 4px;
}

.workout-option-item.selected .workout-option-duration {
  background: #dbeafe;
  color: #1e40af;
}

.workout-option-check {
  width: 24px;
  height: 24px;
  background: #2e74e8;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
  margin-left: 8px;
}

.workout-select-hidden {
  display: none;
}

.day-note {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

/* 캘린더 */
.training-calendar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.calendar-month {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 253, 244, 0.7) 100%);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.1);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(16, 185, 129, 0.15);
}

.calendar-month-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
  color: #064e3b;
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
  border: 2px solid rgba(16, 185, 129, 0.2);
}

/* 캘린더 표 형식 */
.calendar-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  margin-top: 20px;
  table-layout: fixed;
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.3) 0%, rgba(219, 234, 254, 0.3) 100%);
  border-radius: 16px;
  padding: 8px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1);
}

.calendar-table-header {
  font-size: 16px;
  font-weight: 700;
  color: #064e3b;
  text-align: center;
  padding: 14px 8px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(59, 130, 246, 0.2) 100%);
  border: none;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(15px);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
  transition: all 0.3s ease;
}

.calendar-table-header:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(59, 130, 246, 0.3) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.calendar-table-cell {
  border: none;
  padding: 4px;
  vertical-align: top;
  width: calc(100% / 7);
  aspect-ratio: 1;
  position: relative;
}

/* 요일 고정 타입 캘린더 (호환성 유지) */
.calendar-weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.calendar-weekday-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.calendar-weekday-header {
  font-size: 16px;
  font-weight: 700;
  color: #064e3b;
  text-align: center;
  padding: 12px 8px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.2) 100%);
  border-radius: 8px;
  margin-bottom: 12px;
  border: 2px solid rgba(16, 185, 129, 0.3);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.calendar-weekday-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
}

/* 기존 캘린더 그리드 (호환성 유지) */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.calendar-day {
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.8) 0%, rgba(243, 244, 246, 0.8) 100%);
  border-radius: 12px;
  padding: clamp(4px, 1.2vw, 10px);
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
  aspect-ratio: 1;
  min-height: 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  /* 블록 크기에 비례하는 기본 폰트 크기 설정 */
  font-size: clamp(8px, 1.5vw, 14px);
}

.calendar-day.today {
  border: 2px solid rgba(251, 146, 60, 0.6);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15), 0 4px 12px rgba(251, 146, 60, 0.2);
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.6) 0%, rgba(254, 215, 170, 0.6) 100%);
}

.calendar-day.completed {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(52, 211, 153, 0.3) 100%);
  border: 2px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* 훈련일지 캘린더 스타일 */
#trainingJournalScreen .calendar-day.completed {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(74, 222, 128, 0.35) 100%);
  border: 2px solid rgba(34, 197, 94, 0.5);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

/* 훈련일지 컨트롤 버튼 레이아웃 */
.training-journal-controls {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.journal-nav-left {
  flex: 1;
  display: flex;
  justify-content: flex-start;
}

.journal-nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.journal-nav-prev {
  order: 1;
}

.journal-month-label {
  order: 2;
  font-weight: 700;
  font-size: 18px;
  min-width: 150px;
  text-align: center;
  flex-shrink: 0;
}

.journal-nav-next {
  order: 3;
}

.journal-nav-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 훈련일지 워크아웃명 */
.journal-workout-name {
  font-size: 0.7em;
  font-weight: 700;
  color: #1e3a8a; /* 남색 */
  margin-bottom: 4px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* 훈련일지 통계 표시 */
.training-journal-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  font-size: 0.65em;
  margin-top: 4px;
}

/* 훈련시간 배지 (둥근사각 녹색 바탕에 흰색) */
.journal-duration-badge {
  display: inline-block;
  padding: 2px 6px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.9) 0%, rgba(22, 163, 74, 0.9) 100%);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.05em; /* 현재 크기의 40% 더 크게 (0.75em * 1.4 = 1.05em) */
  text-align: center;
  margin-bottom: 4px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.3);
}

.journal-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px;
  background: rgba(240, 253, 244, 0.8); /* 흰색에 가까운 연한 녹색 바탕 */
  border-radius: 4px;
  margin-bottom: 2px;
}

.journal-stat-item .stat-label {
  font-weight: 600;
  color: #064e3b; /* 훈련 캘린더와 동일한 색상 */
  font-size: 0.9em; /* 훈련 캘린더와 동일한 크기 */
}

.journal-stat-item .stat-value {
  font-weight: 700;
  color: #059669; /* 훈련 캘린더와 동일한 색상 */
  font-size: 1em; /* 훈련 캘린더와 동일한 크기 */
}

/* 훈련 캘린더 및 훈련일지 주말/공휴일 주황색 표시 */
.calendar-day.holiday-weekend .calendar-day-number {
  color: #f97316; /* 주황색 */
  font-weight: 700;
}

/* 훈련일지 클릭 가능한 훈련일 스타일 */
.calendar-day.clickable-training-day {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calendar-day.clickable-training-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* 훈련 분석 모달 스타일 */
#trainingAnalysisModal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

#trainingAnalysisModal .modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

#trainingAnalysisModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

#trainingAnalysisModal .modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #064e3b;
}

#trainingAnalysisModal .modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
}

#trainingAnalysisModal .modal-close:hover {
  background: #f3f4f6;
  color: #333;
}

#trainingAnalysisModal .modal-body {
  padding: 24px;
}

#trainingAnalysisModal .analysis-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

#trainingAnalysisModal .analysis-header h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 700;
  color: #064e3b;
}

#trainingAnalysisModal .analysis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9em;
  color: #666;
}

#trainingAnalysisModal .analysis-meta span {
  padding: 4px 8px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 4px;
  color: #059669;
  font-weight: 500;
}

#trainingAnalysisModal .analysis-content {
  line-height: 1.8;
  color: #333;
}

#trainingAnalysisModal .analysis-content h1,
#trainingAnalysisModal .analysis-content h2,
#trainingAnalysisModal .analysis-content h3 {
  margin-top: 24px;
  margin-bottom: 12px;
  color: #064e3b;
  font-weight: 700;
}

#trainingAnalysisModal .analysis-content h1 {
  font-size: 1.5em;
}

#trainingAnalysisModal .analysis-content h2 {
  font-size: 1.3em;
}

#trainingAnalysisModal .analysis-content h3 {
  font-size: 1.1em;
}

#trainingAnalysisModal .analysis-content p {
  margin-bottom: 12px;
}

#trainingAnalysisModal .analysis-content strong {
  color: #059669;
  font-weight: 600;
}

#trainingAnalysisModal .analysis-content ul {
  margin: 12px 0;
  padding-left: 24px;
}

#trainingAnalysisModal .analysis-content li {
  margin-bottom: 8px;
}

#trainingAnalysisModal .error-message {
  padding: 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
}

#trainingAnalysisModal .loading-message {
  padding: 20px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
  text-align: center;
  font-size: 1em;
}


/* 시각화된 분석 결과 스타일 */
.analysis-visualized {
  padding: 20px 0;
}

.analysis-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1f2937;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
}

/* 지표 카드 */
.metric-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.metric-label {
  font-size: 0.9em;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 500;
}

.metric-value {
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 4px;
}

.metric-score {
  font-size: 0.85em;
  color: #9ca3af;
  margin-top: 4px;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* 차트 컨테이너 */
.analysis-charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-wrapper {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 상세 지표 카드 */
.metric-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.detail-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px;
}

.detail-label {
  font-size: 0.9em;
  color: #3b82f6;
  font-weight: 600;
  margin-bottom: 8px;
}

.detail-value {
  font-size: 1.3em;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 4px;
}

.detail-sub {
  font-size: 0.85em;
  color: #6b7280;
  margin-bottom: 8px;
}

.detail-score {
  font-size: 1.1em;
  font-weight: 600;
  margin-top: 8px;
}

/* 코칭 피드백 */
.coaching-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.coaching-card {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  width: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.coaching-card.positive {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.coaching-card.improvement {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.coaching-card.recommendation {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.coaching-icon {
  font-size: 2em;
  margin-bottom: 8px;
}

.coaching-title {
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1f2937;
}

.coaching-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.coaching-list li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: #4b5563;
  line-height: 1.6;
}

.coaching-list li::before {
  content: '•';
  position: absolute;
  left: 8px;
  color: #9ca3af;
  font-weight: bold;
}

.coaching-card.positive .coaching-list li::before {
  color: #10b981;
}

.coaching-card.improvement .coaching-list li::before {
  color: #f59e0b;
}

.coaching-card.recommendation .coaching-list li::before {
  color: #3b82f6;
}

/* 종합 분석 텍스트 */
.overall-analysis-text {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  line-height: 1.8;
  color: #374151;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.overall-analysis-text p {
  margin-bottom: 12px;
}

.overall-analysis-text strong {
  color: #1f2937;
  font-weight: 600;
}

#trainingAnalysisModal .error-message h3 {
  margin-top: 0;
  color: #dc2626;
}

/* 훈련일지 캘린더에서 휴식 이미지 제거 */
#trainingJournalScreen .calendar-day.rest,
#trainingJournalScreen .calendar-day .calendar-status-icon {
  display: none;
}

/* 훈련일지 캘린더 날짜 셀 스타일 개선 */
#trainingJournalScreen .calendar-day {
  min-height: 80px;
  padding: 4px;
}

#trainingJournalScreen .calendar-day-content {
  margin-top: 2px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
}

.calendar-day.completed .calendar-status-icon img {
  filter: hue-rotate(0deg) saturate(1.2) brightness(1.1);
}

.calendar-day.partial {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(245, 158, 11, 0.3) 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.calendar-day.skipped {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.6) 0%, rgba(239, 68, 68, 0.2) 100%);
  border: 2px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.calendar-day.missed {
  background: linear-gradient(135deg, rgba(243, 244, 246, 0.5) 0%, rgba(156, 163, 175, 0.3) 100%);
  border: 2px solid rgba(156, 163, 175, 0.3);
  opacity: 0.6;
}

.calendar-day.planned {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.25) 100%);
  border: 2px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.calendar-day.today.planned {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.6) 0%, rgba(254, 215, 170, 0.6) 100%);
  border: 2px solid rgba(251, 146, 60, 0.6);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15), 0 4px 12px rgba(251, 146, 60, 0.2);
}

.calendar-day.today.planned .calendar-status-icon img {
  filter: hue-rotate(-20deg) saturate(1.3) brightness(1.1);
}

.calendar-day.rest {
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.4) 0%, rgba(243, 244, 246, 0.4) 100%);
  opacity: 0.5;
  cursor: default;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border: 2px solid rgba(156, 163, 175, 0.2);
}

/* 훈련일지 캘린더 - 훈련 이력이 없는 날짜의 STELVIO AI 로고 */
.calendar-day-content.journal-no-training {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.journal-stelvio-logo {
  width: 50%;
  height: 50%;
  object-fit: contain;
  opacity: 0.15;
  filter: blur(0.5px);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* AI 추천 버튼 스타일 */
.ai-recommend-btn {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4px;
  transition: all 0.3s ease;
  animation: aiRecommendButtonFloat 3s ease-in-out infinite;
}

.ai-recommend-btn:hover {
  background: rgba(46, 116, 232, 0.1);
  border-radius: 4px;
  animation: aiRecommendButtonFloatHover 2s ease-in-out infinite;
}

@keyframes aiRecommendButtonFloatHover {
  0%, 100% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(-4px);
  }
}

.ai-recommend-icon {
  height: 5em;
  width: auto;
  margin-bottom: 4px;
  z-index: 2;
  position: relative;
}

.ai-recommend-btn .journal-stelvio-logo {
  opacity: 0.3;
  filter: blur(0.3px);
  transition: all 0.3s ease;
}

.ai-recommend-btn:hover .journal-stelvio-logo {
  opacity: 0.5;
  filter: blur(0px);
}

.ai-recommend-text {
  font-size: 0.91em;
  color: #2e74e8;
  font-weight: 600;
  margin-top: 2px;
  text-align: center;
  white-space: nowrap;
  z-index: 1;
  position: relative;
  animation: aiRecommendPulse 2s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(46, 116, 232, 0.5);
  transition: all 0.3s ease;
}

/* AI 추천 텍스트 애니메이션 */
@keyframes aiRecommendPulse {
  0%, 100% {
    transform: scale(1);
    color: #2e74e8;
    text-shadow: 
      0 0 8px rgba(46, 116, 232, 0.5),
      0 0 12px rgba(46, 116, 232, 0.3);
  }
  50% {
    transform: scale(1.05);
    color: #3b82f6;
    text-shadow: 
      0 0 12px rgba(59, 130, 246, 0.7),
      0 0 18px rgba(59, 130, 246, 0.5),
      0 0 24px rgba(59, 130, 246, 0.3);
  }
}

/* 추가 글로우 효과 */
.ai-recommend-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(46, 116, 232, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: aiRecommendGlow 2s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes aiRecommendGlow {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(0.9);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* 호버 시 더 강한 효과 */
.ai-recommend-btn:hover .ai-recommend-text {
  animation: aiRecommendPulseHover 1s ease-in-out infinite;
  transform: scale(1.1);
}

@keyframes aiRecommendPulseHover {
  0%, 100% {
    color: #3b82f6;
    text-shadow: 
      0 0 15px rgba(59, 130, 246, 0.8),
      0 0 25px rgba(59, 130, 246, 0.6),
      0 0 35px rgba(59, 130, 246, 0.4);
  }
  50% {
    color: #60a5fa;
    text-shadow: 
      0 0 20px rgba(96, 165, 250, 1),
      0 0 30px rgba(96, 165, 250, 0.7),
      0 0 40px rgba(96, 165, 250, 0.5);
  }
}

/* 버튼 전체에 부드러운 움직임 추가 */
@keyframes aiRecommendButtonFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* 워크아웃 추천 모달 스타일 */
.workout-recommendation-container {
  padding: 20px;
}

.recommendation-header {
  margin-bottom: 24px;
  text-align: center;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 16px;
}

.recommendation-header h3 {
  margin: 0 0 8px 0;
  color: #2e74e8;
  font-size: 1.5em;
}

.recommendation-date {
  color: #666;
  font-size: 0.9em;
  margin: 0;
}

.category-info {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.category-info h4 {
  margin: 0 0 8px 0;
  font-size: 1.1em;
}

.category-name {
  color: #2e74e8;
  font-weight: 700;
}

.category-reason {
  margin: 8px 0 0 0;
  color: #555;
  line-height: 1.6;
}

.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recommendation-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  transition: all 0.3s ease;
}

.recommendation-item:hover {
  border-color: #2e74e8;
  box-shadow: 0 4px 12px rgba(46, 116, 232, 0.15);
  transform: translateY(-2px);
}

.recommendation-rank {
  font-size: 2em;
  line-height: 1;
  flex-shrink: 0;
}

.recommendation-content {
  flex: 1;
  min-width: 0;
}

.workout-title {
  margin: 0 0 8px 0;
  font-size: 1.2em;
  color: #333;
  font-weight: 600;
}

.workout-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.workout-category {
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 500;
}

.workout-duration {
  background: #f5f5f5;
  color: #666;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
}

.recommendation-reason {
  margin: 0 0 8px 0;
  color: #555;
  line-height: 1.6;
  font-size: 0.95em;
}

.workout-description {
  margin: 8px 0 0 0;
  color: #777;
  font-size: 0.9em;
  line-height: 1.5;
}

.recommendation-action {
  flex-shrink: 0;
}

.recommendation-item.error {
  border-color: #f44336;
  background: #ffebee;
}

.recommendation-item.error p {
  margin: 0;
  color: #c62828;
}

@media (max-width: 768px) {
  .recommendation-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .recommendation-rank {
    text-align: center;
  }
  
  .recommendation-action {
    width: 100%;
  }
  
  .recommendation-action .btn {
    width: 100%;
  }
}

/* 훈련 캘린더 - 휴식일의 STELVIO AI 로고 */
.calendar-day-content.rest-day {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.calendar-stelvio-logo {
  width: 50%;
  height: 50%;
  object-fit: contain;
  opacity: 0.15;
  filter: blur(0.5px);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.calendar-day-empty {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  visibility: hidden;
  background: transparent;
}

.calendar-day:hover:not(.rest) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
}

.calendar-day-number {
  font-size: 0.84em; /* 부모 폰트 크기의 1.4배 * 0.6 = 0.84em (60% 축소) */
  font-weight: 800;
  color: #064e3b;
  margin-bottom: 0.15em; /* 여백 최소화 */
  text-align: center;
  padding: 0.1em 0.35em; /* 여백 최소화 (60% 축소) */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  border-radius: 0.3em; /* 여백 최소화 */
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* 그림자 축소 */
  border: 1px solid rgba(16, 185, 129, 0.2);
  min-width: 1.2em; /* 60% 축소 */
}

.calendar-day-content {
  margin-top: 0.3em;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  overflow: hidden;
}

.calendar-status-icon {
  font-size: 1.5em; /* 부모 폰트 크기의 1.5배 (블록 크기에 비례) */
  margin-bottom: 0.3em;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  line-height: 1;
}

.calendar-status-icon img {
  width: 1.5em; /* 부모 폰트 크기의 1.5배 (블록 크기에 비례) */
  height: 1.5em;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.calendar-workout-title {
  font-size: 0.9em; /* 부모 폰트 크기의 0.9배 (블록 크기에 비례) */
  font-weight: 700;
  color: #064e3b;
  margin: 0.3em 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.calendar-workout-duration {
  font-size: 0.8em; /* 부모 폰트 크기의 0.8배 (블록 크기에 비례) */
  font-weight: 600;
  color: #ffffff;
  flex-shrink: 0;
  padding: 0.25em 0.6em;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.8) 0%, rgba(52, 211, 153, 0.8) 100%);
  border-radius: 0.8em;
  margin-top: 0.3em;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  min-width: fit-content;
  display: inline-block;
}

.calendar-day.planned .calendar-workout-duration {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(96, 165, 250, 0.8) 100%);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.calendar-day.missed .calendar-workout-duration {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.8) 0%, rgba(156, 163, 175, 0.8) 100%);
  box-shadow: 0 2px 6px rgba(107, 114, 128, 0.3);
}

.calendar-no-workout {
  font-size: 0.8em; /* 부모 폰트 크기의 0.8배 (블록 크기에 비례) */
  font-weight: 600;
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 0.3em 0.5em;
  background: rgba(156, 163, 175, 0.15);
  border-radius: 0.6em;
  margin-top: 0.3em;
}

.calendar-result-stats {
  margin-top: 0.4em;
  padding-top: 0.4em;
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  width: 100%;
}

.result-stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.7em; /* 부모 폰트 크기의 0.7배 (블록 크기에 비례) */
  margin-bottom: 0.2em;
  padding: 0.15em 0.3em;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0.4em;
}

.result-label {
  color: #064e3b;
  font-size: 0.9em; /* 부모 폰트 크기의 0.9배 (블록 크기에 비례) */
  font-weight: 600;
}

.result-value {
  font-weight: 700;
  color: #059669;
  font-size: 1em; /* 부모 폰트 크기와 동일 (블록 크기에 비례) */
}

.calendar-note {
  font-size: 0.7em; /* 부모 폰트 크기의 0.7배 (블록 크기에 비례) */
  font-weight: 500;
  color: #047857;
  margin-top: 0.3em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  padding: 0.2em 0.4em;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 0.4em;
  border-left: 0.2em solid rgba(16, 185, 129, 0.4);
}

.rest-day {
  text-align: center;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.rest-day-text {
  font-size: 0.85em; /* 부모 폰트 크기의 0.85배 (블록 크기에 비례) */
  font-weight: 600;
  color: #6b7280;
  margin-top: 0.3em;
  padding: 0.3em 0.5em;
  background: rgba(156, 163, 175, 0.15);
  border-radius: 0.6em;
}

/* 반응형 - 테블릿 및 작은 화면 대응 */
@media (max-width: 1024px) {
  .calendar-day {
    padding: clamp(4px, 0.8vw, 8px);
    font-size: clamp(7px, 1.3vw, 12px); /* 부모 폰트 크기 조정 - 자식 요소들이 자동으로 비례 조정됨 */
  }
}

/* 480px 이상 테블릿 - 모든 정보 표시하되 크기 조정 */
@media (max-width: 768px) and (min-width: 481px) {
  .calendar-table {
    font-size: 12px;
    border-spacing: 2px;
    padding: 4px;
  }
  
  .calendar-table-header {
    font-size: 13px;
    padding: 8px 4px;
  }
  
  .calendar-month-title {
    font-size: 20px;
    padding: 10px;
    margin-bottom: 16px;
  }
  
  .calendar-day {
    padding: clamp(4px, 0.6vw, 6px);
    border-radius: 10px;
    font-size: clamp(6px, 1.1vw, 11px); /* 부모 폰트 크기 조정 - 자식 요소들이 자동으로 비례 조정됨 */
  }
  
  .calendar-weekday-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .calendar-weekday-header {
    font-size: 13px;
    padding: 8px 4px;
  }
  
  .calendar-weekday-days {
    min-height: 150px;
  }
  
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .schedule-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .schedule-actions {
    flex-direction: column;
  }
}

/* 480px 이하 모바일 - 날짜와 훈련 시간만 표시 */
@media (max-width: 480px) {
  .calendar-table {
    font-size: 10px;
    border-spacing: 1px;
    padding: 2px;
  }
  
  .calendar-table-header {
    font-size: 11px;
    padding: 6px 3px;
  }
  
  .calendar-month-title {
    font-size: 16px;
    padding: 8px;
    margin-bottom: 12px;
  }
  
  .calendar-day {
    padding: clamp(3px, 0.5vw, 4px);
    border-radius: 8px;
    font-size: clamp(5px, 0.9vw, 9px); /* 부모 폰트 크기 조정 - 자식 요소들이 자동으로 비례 조정됨 */
  }
  
  /* 워크아웃 제목 숨김 */
  .calendar-workout-title {
    display: none;
  }
  
  /* 훈련 시간만 표시 */
  .calendar-workout-duration {
    display: block;
  }
  
  /* 평균파워, TSS 등 결과 통계 숨김 */
  .calendar-result-stats {
    display: none;
  }
  
  /* 노트 숨김 */
  .calendar-note {
    display: none;
  }
  
  .calendar-weekday-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== 훈련 요일 선택 체크박스 스타일 ========== */
.weekday-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.weekday-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #f9fafb;
  transition: all 0.2s ease;
  user-select: none;
}

.weekday-checkbox-label:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.weekday-checkbox-label input[type="checkbox"] {
  margin-right: 6px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.weekday-checkbox-label input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: #3b82f6;
}

.weekday-checkbox-label:has(input[type="checkbox"]:checked) {
  border-color: #3b82f6;
  background: #dbeafe;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.weekday-checkbox-label span {
  font-size: 14px;
  color: #374151;
  transition: all 0.2s ease;
}

/* ========== AI 분석 로딩 애니메이션 ========== */
.ai-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: 400px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: aiGradientShift 8s ease infinite;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

@keyframes aiGradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* AI 뇌 네트워크 애니메이션 */
.ai-brain-animation {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 40px;
}

.ai-neural-network {
  position: relative;
  width: 100%;
  height: 100%;
}

.neural-node {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff, #5b86e5);
  box-shadow: 
    0 0 20px rgba(0, 212, 255, 0.8),
    0 0 40px rgba(91, 134, 229, 0.6),
    inset 0 0 10px rgba(255, 255, 255, 0.3);
  animation: neuralPulse 2s ease-in-out infinite;
}

.neural-node.node-1 {
  top: 20%;
  left: 30%;
  animation-delay: 0s;
}

.neural-node.node-2 {
  top: 20%;
  right: 30%;
  animation-delay: 0.3s;
}

.neural-node.node-3 {
  top: 50%;
  left: 10%;
  animation-delay: 0.6s;
}

.neural-node.node-4 {
  top: 50%;
  right: 10%;
  animation-delay: 0.9s;
}

.neural-node.node-5 {
  bottom: 20%;
  left: 30%;
  animation-delay: 1.2s;
}

.neural-node.node-6 {
  bottom: 20%;
  right: 30%;
  animation-delay: 1.5s;
}

@keyframes neuralPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 
      0 0 20px rgba(0, 212, 255, 0.8),
      0 0 40px rgba(91, 134, 229, 0.6),
      inset 0 0 10px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: scale(1.3);
    opacity: 0.8;
    box-shadow: 
      0 0 30px rgba(0, 212, 255, 1),
      0 0 60px rgba(91, 134, 229, 0.8),
      inset 0 0 15px rgba(255, 255, 255, 0.5);
  }
}

.neural-connection {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 212, 255, 0.6) 50%, 
    transparent 100%);
  transform-origin: left center;
  animation: neuralFlow 2s ease-in-out infinite;
}

.neural-connection.conn-1 {
  top: 25%;
  left: 35%;
  width: 60px;
  transform: rotate(15deg);
  animation-delay: 0s;
}

.neural-connection.conn-2 {
  top: 25%;
  left: 50%;
  width: 60px;
  transform: rotate(-15deg);
  animation-delay: 0.3s;
}

.neural-connection.conn-3 {
  top: 55%;
  left: 15%;
  width: 80px;
  transform: rotate(45deg);
  animation-delay: 0.6s;
}

.neural-connection.conn-4 {
  top: 55%;
  left: 50%;
  width: 80px;
  transform: rotate(-45deg);
  animation-delay: 0.9s;
}

.neural-connection.conn-5 {
  bottom: 25%;
  left: 35%;
  width: 60px;
  transform: rotate(-15deg);
  animation-delay: 1.2s;
}

.neural-connection.conn-6 {
  bottom: 25%;
  left: 50%;
  width: 60px;
  transform: rotate(15deg);
  animation-delay: 1.5s;
}

@keyframes neuralFlow {
  0% {
    opacity: 0.3;
    transform: scaleX(0.5);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
  100% {
    opacity: 0.3;
    transform: scaleX(0.5);
  }
}

/* AI 파티클 효과 */
.ai-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  animation: particleFloat 3s ease-in-out infinite;
}

.particle-1 {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.particle-2 {
  top: 30%;
  right: 15%;
  animation-delay: 0.5s;
}

.particle-3 {
  top: 60%;
  left: 25%;
  animation-delay: 1s;
}

.particle-4 {
  bottom: 20%;
  right: 30%;
  animation-delay: 1.5s;
}

.particle-5 {
  top: 15%;
  left: 50%;
  animation-delay: 2s;
}

.particle-6 {
  bottom: 15%;
  left: 45%;
  animation-delay: 2.5s;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(20px, -30px) scale(1.5);
    opacity: 1;
  }
  50% {
    transform: translate(-15px, -50px) scale(1.2);
    opacity: 0.8;
  }
  75% {
    transform: translate(25px, -20px) scale(1.3);
    opacity: 0.9;
  }
}

/* AI 로딩 텍스트 */
.ai-loading-text {
  text-align: center;
  z-index: 10;
  position: relative;
}

.ai-title {
  font-size: 1.4em;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 24px;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(0, 212, 255, 0.5),
    0 0 30px rgba(91, 134, 229, 0.3);
  animation: aiTitleGlow 2s ease-in-out infinite alternate;
}

@keyframes aiTitleGlow {
  0% {
    text-shadow: 
      0 0 10px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(0, 212, 255, 0.5),
      0 0 30px rgba(91, 134, 229, 0.3);
  }
  100% {
    text-shadow: 
      0 0 20px rgba(255, 255, 255, 0.8),
      0 0 30px rgba(0, 212, 255, 0.8),
      0 0 40px rgba(91, 134, 229, 0.6);
  }
}

.ai-status {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.ai-status-item {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.5s ease;
  opacity: 0.5;
  transform: scale(0.95);
}

.ai-status-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.25);
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 
    0 0 20px rgba(0, 212, 255, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  animation: aiStatusPulse 1.5s ease-in-out infinite;
}

@keyframes aiStatusPulse {
  0%, 100% {
    box-shadow: 
      0 0 20px rgba(0, 212, 255, 0.6),
      0 4px 12px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 
      0 0 30px rgba(0, 212, 255, 0.9),
      0 4px 16px rgba(0, 0, 0, 0.3);
  }
}

/* ========== 심박수 분석 확대 블록 (좌우 분할 레이아웃) ========== */
.hr-analysis-expanded {
  width: 100%;
  margin-top: 24px;
}

.hr-analysis-container {
  display: flex;
  gap: 20px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hr-analysis-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hr-analysis-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hr-chart-wrapper {
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
}

.hr-evaluation-result {
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 16px;
}

.hr-eval-title {
  font-size: 1.1em;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 12px;
  text-align: center;
}

.hr-eval-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hr-eval-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

.hr-eval-label {
  font-size: 0.95em;
  color: #6b7280;
  font-weight: 600;
}

.hr-eval-value {
  font-size: 1.1em;
  font-weight: 700;
  color: #dc2626;
}

.hr-chart-guide-expanded {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  height: 100%;
  overflow-y: auto;
}

.hr-guide-title {
  font-size: 1.2em;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.hr-guide-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hr-zone-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.hr-zone-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.hr-zone-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.hr-zone-info {
  flex: 1;
}

.hr-zone-name {
  font-size: 1em;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.hr-zone-range {
  font-size: 0.9em;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 4px;
}

.hr-zone-desc {
  font-size: 0.85em;
  color: #6b7280;
  line-height: 1.5;
}

.hr-current-analysis {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border: 2px solid #3b82f6;
  border-radius: 12px;
}

.hr-current-title {
  font-size: 1.1em;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 12px;
  text-align: center;
}

.hr-current-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hr-current-value {
  font-size: 1em;
  color: #374151;
  line-height: 1.6;
  text-align: center;
}

.hr-current-desc {
  font-size: 0.9em;
  color: #4b5563;
  line-height: 1.6;
  text-align: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

/* 반응형: 모바일에서는 세로 배치 */
@media (max-width: 768px) {
  .hr-analysis-container {
    flex-direction: column;
  }
  
  .hr-analysis-left,
  .hr-analysis-right {
    flex: 1;
  }
  
  .hr-chart-wrapper {
    min-height: 250px;
  }
  
  .hr-chart-guide-expanded {
    min-height: 300px;
  }
}

/* Gemini API 키 입력 필드 비활성화 스타일 */
#geminiApiKey:disabled {
  background-color: #f3f4f6 !important; /* 아주 연한 회색 */
  cursor: not-allowed;
  opacity: 1;
}

/* ========== 스플래시 화면 (STELVIO AI) ========== */
#splashScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.splash-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 동영상 배경 */
.splash-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.splash-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 동영상 오버레이 (그라데이션으로 텍스트 가독성 향상) */
.splash-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 30%,
    rgba(0, 0, 0, 0.1) 70%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
}

/* 브랜딩 콘텐츠 */
.splash-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: #ffffff;
  animation: fadeInUp 1s ease-out;
}

.splash-logo-container {
  margin-bottom: 60px;
}

.splash-title {
  font-size: 5.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
  animation: glow 2s ease-in-out infinite alternate;
  margin-bottom: 10px;
}

.splash-subtitle {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: #ffffff;
  margin-bottom: 20px;
  opacity: 0.95;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.splash-tagline {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* 로딩 인디케이터 */
.splash-loader {
  width: 300px;
  margin: 0 auto;
  margin-top: 50px;
}

.splash-loader-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.splash-loader-progress {
  height: 100%;
  background: linear-gradient(90deg, #ffffff 0%, #e0e0e0 100%);
  border-radius: 10px;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 애니메이션 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  from {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3),
                 0 0 40px rgba(255, 255, 255, 0.2);
  }
  to {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5),
                 0 0 60px rgba(255, 255, 255, 0.3);
  }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .splash-title {
    font-size: 3.5rem;
  }
  
  .splash-subtitle {
    font-size: 1.8rem;
  }
  
  .splash-tagline {
    font-size: 0.9rem;
    padding: 0 20px;
  }
  
  .splash-loader {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .splash-title {
    font-size: 2.5rem;
  }
  
  .splash-subtitle {
    font-size: 1.3rem;
  }
  
  .splash-tagline {
    font-size: 0.8rem;
  }
  
  .splash-loader {
    width: 200px;
  }
}

/* ========== RPE 컨디션 선택 모달 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

#rpeConditionModal .modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#rpeConditionModal .modal-header {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

#rpeConditionModal .modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

#rpeConditionModal .modal-body {
  padding: 24px;
}

.rpe-condition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.rpe-condition-btn {
  position: relative;
  padding: 20px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  text-align: center;
}

.rpe-condition-btn:hover {
  border-color: #2e74e8;
  background: #f0f7ff;
  box-shadow: 0 2px 8px rgba(46, 116, 232, 0.15);
  transform: translateY(-2px);
}

.rpe-condition-btn.selected {
  border-color: #2e74e8;
  background: #e8f2ff;
  box-shadow: 0 0 0 3px rgba(46, 116, 232, 0.1);
}

.rpe-condition-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 4px;
}

.rpe-condition-label {
  font-weight: 600;
  font-size: 16px;
  color: #1f2937;
  margin-bottom: 4px;
}

.rpe-condition-value {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.rpe-condition-btn.selected .rpe-condition-value {
  color: #1e40af;
  font-weight: 600;
}

.rpe-condition-btn.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: #2e74e8;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

/* 반응형 */
@media (max-width: 480px) {
  .rpe-condition-grid {
    grid-template-columns: 1fr;
  }
  
  .rpe-condition-btn {
    min-height: 100px;
  }
}

/* ========== AI 추천 확인 팝업 ========== */
.ai-confirm-modal {
  backdrop-filter: blur(8px);
  animation: aiModalFadeIn 0.3s ease-out;
}

@keyframes aiModalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

.ai-confirm-modal-content {
  background: rgba(34, 197, 94, 0.15);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(34, 197, 94, 0.3);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 
    0 20px 60px rgba(34, 197, 94, 0.3),
    0 0 40px rgba(34, 197, 94, 0.2),
    inset 0 0 20px rgba(34, 197, 94, 0.1);
  animation: aiModalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.ai-confirm-modal-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
  animation: aiModalGlow 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes aiModalSlideIn {
  from {
    transform: translateY(-30px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes aiModalGlow {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translate(20px, 20px) rotate(180deg);
    opacity: 0.6;
  }
}

.ai-confirm-header {
  padding: 30px 24px 20px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.3) 100%);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.ai-confirm-icon-wrapper {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ai-confirm-icon {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-confirm-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.3);
  animation: aiPulseRing 2s ease-out infinite;
}

@keyframes aiPulseRing {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.ai-confirm-brain {
  position: relative;
  font-size: 48px;
  z-index: 1;
  filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.6));
  animation: aiBrainFloat 3s ease-in-out infinite;
}

@keyframes aiBrainFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.ai-confirm-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5);
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.ai-confirm-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: #374151;
  border: 1px solid rgba(34, 197, 94, 0.3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.ai-confirm-close:hover {
  background: rgba(255, 255, 255, 1);
  color: #111827;
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 20px rgba(34, 197, 94, 0.3);
}

.ai-confirm-body {
  padding: 30px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
}

.ai-confirm-message {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 24px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.ai-confirm-features {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.ai-feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  min-width: 100px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

.ai-feature-item:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: rgba(34, 197, 94, 0.5);
}

.ai-feature-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.4));
}

.ai-feature-text {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}

.ai-confirm-footer {
  padding: 20px 24px 24px;
  border-top: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  gap: 12px;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.25) 100%);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.ai-confirm-btn-yes,
.ai-confirm-btn-no {
  min-width: 120px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ai-confirm-btn-yes {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: 2px solid rgba(34, 197, 94, 0.3);
  box-shadow: 
    0 4px 12px rgba(34, 197, 94, 0.3),
    0 0 20px rgba(34, 197, 94, 0.2);
}

.ai-confirm-btn-yes::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.ai-confirm-btn-yes:hover::before {
  left: 100%;
}

.ai-confirm-btn-yes:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(34, 197, 94, 0.4),
    0 0 30px rgba(34, 197, 94, 0.3);
}

.ai-confirm-btn-yes:active {
  transform: translateY(0);
}

.ai-confirm-btn-no {
  background: rgba(255, 255, 255, 0.8);
  color: #6b7280;
  border: 2px solid rgba(107, 114, 128, 0.2);
  backdrop-filter: blur(10px);
}

.ai-confirm-btn-no:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(107, 114, 128, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 반응형 */
@media (max-width: 480px) {
  .ai-confirm-modal-content {
    width: 95%;
    max-width: none;
  }
  
  .ai-confirm-title {
    font-size: 20px;
  }
  
  .ai-confirm-message {
    font-size: 16px;
  }
  
  .ai-confirm-features {
    flex-direction: column;
    gap: 12px;
  }
  
  .ai-feature-item {
    width: 100%;
  }
  
  .ai-confirm-footer {
    flex-direction: column;
  }
  
  .ai-confirm-btn-yes,
  .ai-confirm-btn-no {
    width: 100%;
  }
}

/* ========== AI 워크아웃 추천 선택 버튼 진행 애니메이션 ========== */
.workout-selecting {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.8;
}

.workout-selecting::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.select-progress-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.select-progress-text {
  display: inline-block;
  vertical-align: middle;
  font-weight: 600;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* 추천 아이템 내 버튼 스타일 개선 */
.recommendation-action .btn {
  position: relative;
  transition: all 0.3s ease;
  min-width: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.recommendation-action .btn:not(.workout-selecting):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 116, 232, 0.3);
}

.recommendation-action .btn.workout-selecting {
  background: linear-gradient(135deg, #2e74e8 0%, #1e5bb8 100%);
  cursor: wait;
}

/* 진행 상태별 색상 변화 */
.workout-selecting.selecting-loading {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.workout-selecting.selecting-preparing {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.workout-selecting.selecting-completing {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

