/* ============================================
   인증 모달 스타일 (로그인/회원가입)
   ============================================ */

/* 헤더 로그인/회원가입 버튼 */
.auth-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-login,
.btn-signup {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
}

.btn-login:hover,
.btn-signup:hover {
  background: linear-gradient(135deg, #357abd, #2868a8);
}

/* 로그인 후 사용자 정보 */
.user-info {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* 모달 컨테이너 */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 모달 오버레이 */
.auth-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* 모달 콘텐츠 */
.auth-modal-content {
  position: relative;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: white;
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 모달 닫기 버튼 */
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.auth-modal-close:hover {
  color: #333;
}

/* 모달 제목 */
.auth-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #0f0f0f;
  margin-bottom: 8px;
  text-align: center;
}

.auth-modal-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 32px;
  text-align: center;
}

/* 회원가입 유형 선택 버튼 */
.signup-type-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}

.signup-type-btn {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.signup-type-btn:hover {
  border-color: #4a90e2;
  color: #4a90e2;
}

.signup-type-btn.active {
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  border-color: #4a90e2;
}

/* 인증 폼 */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form .form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.auth-form .form-group input,
.auth-form .form-group select {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background-color: #ffffff;
  color: #333;
  transition: border-color 0.2s;
}

.auth-form .form-group input:focus,
.auth-form .form-group select:focus {
  outline: none;
  border-color: #4a90e2;
  background-color: #ffffff;
}

/* 체크박스 그룹 */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.checkbox-item:hover {
  background-color: #f5f5f5;
}

.checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-label {
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

/* 제출 버튼 */
.btn-auth-submit {
  padding: 14px 24px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, #357abd, #2868a8);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-auth-submit:active {
  transform: translateY(1px);
}

/* 모달 푸터 */
.auth-modal-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eee;
  text-align: center;
}

.auth-modal-footer p {
  font-size: 14px;
  color: #666;
}

.auth-modal-footer a {
  color: #4a90e2;
  text-decoration: none;
  font-weight: 500;
}

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

/* ============================================
   아이디/비밀번호 찾기 스타일
   ============================================ */

/* 도움말 링크 */
.auth-help-links {
  text-align: center;
  margin: 16px 0;
  font-size: 13px;
}

.auth-help-links a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-help-links a:hover {
  color: #4a90e2;
  text-decoration: underline;
}

.auth-help-links .divider {
  margin: 0 12px;
  color: #ddd;
}

/* 폼 섹션 */
.auth-form-section h3 {
  display: none;
}

.auth-form-section .form-description {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
  text-align: center;
}

/* 돌아가기 링크 */
.auth-back-link {
  text-align: center;
  margin-top: 20px;
}

.auth-back-link a {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-back-link a:hover {
  color: #4a90e2;
}

/* 결과 표시 */
.find-result {
  margin: 16px 0;
  padding: 16px;
  border-radius: 8px;
}

.find-success {
  background: #e8f5e9;
  color: #2e7d32;
  text-align: center;
}

.find-success p {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.find-success strong {
  display: block;
  font-size: 18px;
}

.find-error {
  background: #ffebee;
  color: #c62828;
  text-align: center;
}

.find-error p {
  margin: 0;
  font-size: 14px;
}

/* ============================================
   약관 동의 섹션 스타일
   ============================================ */

.terms-agreement-section {
  margin: 20px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.terms-all-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 12px;
}

.terms-all-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.terms-all-check label {
  font-size: 14px;
  cursor: pointer;
  color: #333;
}

.terms-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.term-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.term-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.term-item span {
  flex: 1;
  font-size: 13px;
  color: #495057;
}

.btn-term-view {
  padding: 4px 10px;
  font-size: 12px;
  color: #4a90e2;
  background: transparent;
  border: 1px solid #4a90e2;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-term-view:hover {
  background: #4a90e2;
  color: white;
}

/* ============================================
   약관 상세 모달 스타일
   ============================================ */

.term-detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  align-items: center;
  justify-content: center;
}

.term-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.term-detail-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.term-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
}

.term-detail-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #212529;
}

.term-detail-header button {
  width: 32px;
  height: 32px;
  border: none;
  background: #f1f3f4;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.term-detail-header button:hover {
  background: #e0e0e0;
}

.term-detail-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.8;
  color: #495057;
}

.term-detail-footer {
  padding: 16px 20px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.term-detail-footer button {
  padding: 10px 32px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.term-detail-footer button:hover {
  background: linear-gradient(135deg, #357abd, #2868a8);
}

/* 반응형 */
@media (max-width: 768px) {
  .auth-buttons {
    gap: 8px;
  }

  .btn-login,
  .btn-signup {
    padding: 6px 16px;
    font-size: 13px;
  }

  .auth-modal-content {
    padding: 32px 24px;
    width: 95%;
  }

  .auth-modal-title {
    font-size: 20px;
  }

  .signup-type-buttons {
    grid-template-columns: 1fr;
  }

  .terms-agreement-section {
    padding: 12px;
  }

  .term-item span {
    font-size: 12px;
  }

  .term-detail-content {
    width: 95%;
    max-height: 85vh;
  }
}
