/* --- 전체 레이아웃 --- */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  margin: 0;
  padding: 20px 10px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

/* 컨테이너 */
.wrap {
  background: #fff;
  padding: 36px 32px 40px;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  max-width: 420px;
  width: 100%;
  box-sizing: border-box;
  transition: box-shadow 0.3s ease;
}

.wrap:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* 제목 */
.wrap h1 {
  font-weight: 700;
  font-size: 30px;
  color: #1e3a8a;
  margin-bottom: 28px;
  text-align: center;
  letter-spacing: 1px;
}

/* 버튼 */
button,
.form_btn {
  background-color: #3498db;
  color: white;
  padding: 12px;
  width: 100%;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}


/* 필드셋으로 그룹 묶기 스타일 */
fieldset {
  border: 1px solid #cbd5e1;
  padding: 20px 24px 24px;
  margin-bottom: 28px;
  border-radius: 12px;
}

fieldset legend {
  font-weight: 600;
  color: #2563eb;
  padding: 0 8px;
  font-size: 16px;
}

/* 라벨 */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
  font-size: 15px;
}

/* 인풋 공통 */
input[type="text"],
input[type="password"],
.styled-select,
input[type="tel"],
input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1.8px solid #d1d5db;
  border-radius: 10px;
  background-color: #f9fafb;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
  margin-bottom: 18px;
}

input[type="text"]:focus,
input[type="password"]:focus,
.styled-select:focus,
input[type="tel"]:focus,
input[type="email"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
  outline: none;
}

/* 성별 라디오 그룹 */
.gender-group {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
}

.gender-group label {
  cursor: pointer;
  font-weight: 600;
  color: #374151;
}

input[type="radio"] {
  accent-color: #2563eb;
  margin-right: 8px;
}

/* 인증 관련 영역 */
.auth-container {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.auth-container input[type="text"] {
  flex: 1 1 auto;
  min-width: 150px;
  margin-bottom: 0;
}

.auth-container button {
  flex-shrink: 0;
  min-width: 130px;
  padding: 11px 16px;
  font-size: 15px;
  border-radius: 10px;
  border: none;
  background-color: #2563eb;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.auth-container button:hover:not(:disabled) {
  background-color: #1e40af;
}

/* 인증 결과 텍스트 */
#authResult {
  min-width: 90px;
  font-weight: 700;
  font-size: 15px;
}

#authResult.success {
  color: #16a34a; /* 초록 */
}

#authResult.fail {
  color: #dc2626; /* 빨강 */
}

/* 중복검사 & 인증요청 버튼 */
#check_button,
.auth-request-btn {
  padding: 11px 18px;
  font-size: 15px;
  background-color: #2563eb;
  color: #fff;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#check_button:hover:not(:disabled),
.auth-request-btn:hover:not(:disabled) {
  background-color: #1e40af;
}

/* 비활성화 버튼 */
button:disabled,
button[disabled] {
  background-color: #9ca3af;
  cursor: not-allowed;
}

/* 회원가입 버튼 */
button[type="submit"] {
  margin-top: 24px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 14px 0;
  border-radius: 14px;
}

/* 선택 셀렉트 박스 */
.styled-select {
  cursor: pointer;
}

/* 학년, 반 선택 */
select.styled-select {
  margin-bottom: 18px;
}

/* 에러 메시지 */
.err_id,
.err_pw {
  font-size: 13px;
  color: #dc2626;
  margin-bottom: 10px;
}

/* 회원가입 하단 링크 */
.pre_btn {
  text-align: center;
  margin-top: 18px;
}

.pre_btn a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.pre_btn a:hover {
  color: #1e40af;
}

/* 반응형: 모바일 최적화 */
@media screen and (max-width: 480px) {
  body {
    padding: 10px 6px;
    align-items: center;
  }

  .wrap {
    padding: 28px 20px 32px;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  }

  .wrap h1 {
    font-size: 26px;
  }

  label {
    font-size: 14px;
  }

  input[type="text"],
  input[type="password"],
  .styled-select,
  input[type="tel"],
  input[type="email"] {
    font-size: 14px;
    padding: 10px 12px;
  }

  .auth-container {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-container input[type="text"],
  .auth-container button,
  #authResult {
    width: 100%;
    margin: 6px 0;
  }

  #check_button,
  .auth-request-btn {
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }
}
.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 25px 30px;
  border-radius: 10px;
  max-width: 350px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  font-size: 16px;
  color: #333;
  position: relative;
}

.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
  color: #999;
}

.close:hover {
  color: #555;
}

