/* register.css — pages/auth/register.html 전용 스타일 */

.register-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
}

/* 상단 배너 */
.register-top-banner {
  background: var(--sage-dark);
  padding: 48px var(--space-6) var(--space-8);
  position: relative;
  overflow: hidden;
}

.register-top-banner::after {
  content: '🏸';
  position: absolute;
  right: var(--space-5);
  bottom: -4px;
  font-size: 4rem;
  opacity: 0.12;
  transform: rotate(-15deg);
}

.register-brand__name {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--sage-light);
  letter-spacing: 0.02em;
}

.register-title {
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  color: #fff;
  letter-spacing: -0.035em;
  line-height: var(--lh-tight);
}

/* 폼 영역 */
.register-form-area {
  padding: var(--space-6) var(--space-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* 섹션 타이틀 */
.form-section-title {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--border-light);
}

/* 아이디 중복확인 */
.username-check-group {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.username-check-group .form-group {
  flex: 1;
}

.btn-check {
  height: 48px;
  padding: 0 var(--space-4);
  border-radius: var(--border-radius);
  background: var(--sage-light);
  color: var(--sage-dark);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  margin-top: 24px; /* label 높이만큼 */
  -webkit-tap-highlight-color: transparent;
}

.btn-check:active { background: #B5CEC5; }
.btn-check:disabled { opacity: 0.5; cursor: not-allowed; }

/* 비밀번호 강도 표시 */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: var(--space-2);
}

.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--gray-200);
  transition: background 0.3s ease;
}

.strength-bar.weak   { background: var(--color-error); }
.strength-bar.medium { background: var(--color-warning); }
.strength-bar.strong { background: var(--color-success); }

.strength-label {
  font-size: var(--text-xs);
  margin-top: 4px;
}

.strength-label.weak   { color: var(--color-error); }
.strength-label.medium { color: #9A7A10; }
.strength-label.strong { color: var(--color-success); }

/* 성별 선택 */
.gender-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.gender-option {
  position: relative;
}

.gender-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.gender-label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: var(--border-radius);
  border: 1.5px solid var(--border-medium);
  background: var(--bg-surface);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}


.gender-option input:checked + .gender-label {
  border-color: var(--sage);
  background: rgba(123,158,135,0.08);
  color: var(--sage-dark);
  font-weight: var(--fw-semibold);
}

/* 급수 선택 */
.grade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.grade-option {
  position: relative;
}

.grade-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.grade-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--border-radius);
  border: 1.5px solid var(--border-light);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.grade-label__name {
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--text-secondary);
}

.grade-option input:checked + .grade-label {
  border-color: var(--sage);
  background: rgba(123,158,135,0.08);
}

.grade-option input:checked + .grade-label .grade-label__name {
  color: var(--sage-dark);
}

/* 급수 안내 */
.grade-notice {
  display: flex;
  gap: var(--space-1);
  align-items: flex-start;
  padding: var(--space-3);
  background: #FEF9E7;
  border-radius: var(--border-radius);
  font-size: var(--text-xs);
  color: #7B6B10;
  line-height: var(--lh-relaxed);
}

/* 하단 고정 버튼 */
.register-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  padding: var(--space-4) var(--space-6);
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  background: var(--bg-base);
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.login-link {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.login-link a {
  color: var(--sage);
  font-weight: var(--fw-bold);
}

/* 로딩 스피너 */
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 성공 화면 */
.success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: var(--space-8) var(--space-6);
  gap: var(--space-5);
}

.success-title {
  font-size: var(--text-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--sage-dark);
  letter-spacing: -0.03em;
}

.success-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

/* 모바일 성별/급수 버튼 탭 터치 영역 보장 */
.gender-label,
.grade-btn {
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
