/* 로그인 페이지 스타일 - member/code 페이지와 동일한 컨셉 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 20px;
  padding-bottom: 50px; /* 푸터 공간 확보 */
}

.login-container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.login-image {
  flex: 1;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.login-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url(/images/login_bg.jpg?fit=around|512:512&crop=512:512;*,*&output-format=jpg&output-quality=80) center/cover;
  opacity: 0.1;
}

.login-image-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.login-image-content h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.login-image-content p {
  font-size: 16px;
  opacity: 0.9;
}

.login-form-section {
  flex: 1;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
}

.login-header h2 {
  font-size: 18px;
  font-weight: 400;
  color: #6c757d;
  margin: 0;
}

.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s;
  background-color: #f8f9fa;
}

.form-control:focus {
  outline: none;
  border-color: #4a90e2;
  background-color: white;
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.form-control::placeholder {
  color: #adb5bd;
}

.radio-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 20px;
  margin-top: 8px;
  align-items: center;
  white-space: nowrap;
  overflow-x: auto;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #2c3e50;
  transition: color 0.3s;
  flex-shrink: 0;
  white-space: nowrap;
}

.radio-label input[type="radio"] {
  margin: 0;
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4a90e2;
}

.radio-label:hover {
  color: #4a90e2;
}

.radio-label input[type="radio"]:checked + span {
  color: #4a90e2;
  font-weight: 600;
}

.invalid-feedback {
  display: none;
  color: #dc3545;
  font-size: 13px;
  margin-top: 6px;
}

.was-validated .form-control:invalid ~ .invalid-feedback {
  display: block;
}

.was-validated .form-control:invalid {
  border-color: #dc3545;
}

.was-validated .form-control:valid {
  border-color: #28a745;
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.login-divider {
  margin: 30px 0;
  text-align: center;
  position: relative;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e9ecef;
}

.login-divider span {
  position: relative;
  background: white;
  padding: 0 15px;
  color: #6c757d;
  font-size: 13px;
}

/* ========== 입장 페이지(neoschool.php) ========== */
.landing-page .landing-container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.landing-page .landing-image {
  flex: 1;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.landing-page .landing-image-content {
  text-align: center;
  color: white;
}

.landing-page .landing-image-content h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.landing-page .landing-image-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 4px 0;
  opacity: 0.95;
}

.landing-page .landing-image-content p {
  font-size: 14px;
  margin-top: 20px;
  opacity: 0.9;
}

.landing-page .landing-form-section {
  flex: 1;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.landing-page .landing-header {
  margin-bottom: 30px;
}

.landing-page .landing-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 10px;
}

.landing-page .landing-desc {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  line-height: 1.5;
}

.landing-page .landing-search-form .form-group {
  margin-bottom: 20px;
}

.landing-page .search-results {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
}

.landing-page .results-title {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
}

.landing-page .school-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.landing-page .school-list li {
  margin-bottom: 8px;
}

.landing-page .school-list a {
  display: block;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 6px;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.landing-page .school-list a:hover {
  background: #e7f1ff;
  color: #357abd;
}

.landing-page .results-empty {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
}

@media (min-width: 992px) {
  .landing-page .landing-image {
    display: flex;
  }
}

@media (max-width: 991px) {
  .landing-page .landing-container {
    max-width: 500px;
  }
  .landing-page .landing-form-section {
    padding: 40px 30px;
  }
}

@media (max-width: 576px) {
  .landing-page .landing-form-section {
    padding: 30px 20px;
  }
  .landing-page .landing-header h1 {
    font-size: 22px;
  }
}

/* 로그인 페이지 푸터 (neoschool 루트 기준) */
.login-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.login-footer-inner {
  max-width: 1000px;
  margin: 0 auto;
}

/* 반응형 디자인 */
@media (min-width: 992px) {
  .login-image {
    display: flex;
  }
}

@media (max-width: 991px) {
  .login-container {
    max-width: 500px;
  }
  
  .login-form-section {
    padding: 40px 30px;
  }
}

@media (max-width: 576px) {
  body {
    padding: 10px;
  }
  
  .login-form-section {
    padding: 30px 20px;
  }
  
  .login-header h1 {
    font-size: 26px;
  }
  
  .login-header h2 {
    font-size: 16px;
  }
  
  .radio-group {
    gap: 12px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
  }
  
  .radio-label {
    font-size: 14px;
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* ========== 부모 인증 안내 (로그인 창 아래) ========== */
.parent-auth-notice {
  margin-top: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fff8e7 0%, #fff3d6 100%);
  border: 1px solid #f0d78c;
  border-radius: 10px;
  text-align: center;
}

.parent-auth-notice-intro {
  font-size: 13px;
  color: #856404;
  margin: 0 0 4px 0;
  font-weight: 600;
}

.parent-auth-notice-text {
  font-size: 14px;
  color: #856404;
  margin: 0 0 12px 0;
  font-weight: 500;
}

.parent-auth-notice-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, #f0b429 0%, #e09b0a 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(224, 155, 10, 0.3);
}

.parent-auth-notice-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(224, 155, 10, 0.4);
}

.student-auth-notice {
  background: linear-gradient(135deg, #e8f4fd 0%, #d6ebfa 100%);
  border-color: #7ec8f3;
}
.student-auth-notice .parent-auth-notice-intro,
.student-auth-notice .parent-auth-notice-text {
  color: #0c5a8a;
}
.student-auth-notice-btn {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}
.student-auth-notice-btn:hover {
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* ========== 부모 인증 팝업 ========== */
.parent-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.parent-auth-modal.open {
  opacity: 1;
  visibility: visible;
}

.parent-auth-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.parent-auth-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.parent-auth-modal.open .parent-auth-dialog {
  transform: scale(1);
}

.parent-auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-radius: 16px 16px 0 0;
}

.parent-auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.parent-auth-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.parent-auth-close:hover {
  background: #f1f5f9;
  color: #334155;
}

.parent-auth-body {
  padding: 24px;
}

.parent-auth-steps {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 0 4px;
}

.parent-auth-step {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  transition: color 0.2s, background 0.2s;
}

.parent-auth-step.active {
  color: #1e40af;
  background: #dbeafe;
}

.parent-auth-desc {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.parent-auth-form .form-group {
  margin-bottom: 18px;
}

.parent-auth-form .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.parent-auth-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.parent-auth-half { flex: 1; min-width: 120px; }
.parent-auth-quarter { width: calc(25% - 9px); min-width: 70px; }

@media (max-width: 480px) {
  .parent-auth-quarter { width: 100%; min-width: 0; }
}

.parent-auth-msg {
  font-size: 13px;
  margin: 0 0 12px 0;
  padding: 10px 14px;
  border-radius: 8px;
}

.parent-auth-msg.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.parent-auth-msg.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.parent-auth-submit {
  margin-top: 8px;
  width: 100%;
}

.parent-auth-success-panel {
  text-align: center;
  padding: 20px 0;
}

.parent-auth-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.parent-auth-success-text {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.parent-auth-success-sub {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px 0;
}
