* {
  box-sizing: border-box;
  font-family: 'Noto Sans KR', sans-serif;
}

html, body {
  min-width:280px;
  margin:0;
  height:100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* HEADER */
.login-header {
  padding: 20px 40px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  width: 200px;
  height: auto;
}


.logo img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
}

/* MAIN */
.login-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

/* LOGIN BOX */
.login-box {
  width: 360px;
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.login-box h2 {
  margin-bottom: 24px;
  text-align: center;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.login-box input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
  border: none;
}

.remember-id {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.remember-id input[type="checkbox"] {
  margin: 0;
}

#loginBtn {
  width: 100%;
  padding: 12px;
  background: #3b5cff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  margin-top: 16px;
  cursor: pointer;
}

#loginBtn.active {
  opacity: 1;
}

/* LINKS */
.login-links {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
}

.login-links a {
  color: #555;
  text-decoration: none;
}

/* SIGNUP */
.signup-box {
  margin-top: 20px;
}

.signup-btn {
  display: block;
  width: 360px;
  text-align: center;
  padding: 14px;
  border: 1px solid #3b5cff;
  border-radius: 6px;
  color: #3b5cff;
  font-weight: 600;
  text-decoration: none;
}

/* FOOTER */
.login-footer {
  padding: 20px;
  background: #fafafa;
  border-top: 1px solid #eaeaea;
}

.footer-content {
  text-align: center;
  font-size: 13px;
  color: #777;
}

.auth-box {
  width: 360px;
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.auth-box h2 {
  text-align: center;
  margin-bottom: 24px;
}

.auth-box input {
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.auth-box button {
  width: 14%;
  background: #000000;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.auth-links {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
}

.auth-links a {
  color: #555;
  text-decoration: none;
}

.warn {
  margin-top: -4px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #e64545;
}

/* 회원가입 */

.auth-box {
  width: 360px;
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.auth-box input[type="text"],
.auth-box input[type="password"],
.auth-box input[type="date"],
.auth-box input[type="tel"],
.auth-box input[type="input"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.gender-group {
  display: flex;
  gap: 16px;
  margin: 8px 0;
}

.warn {
  min-height: 16px;
  font-size: 12px;
  color: #e74c3c;
  margin-bottom: 8px;
}

.terms {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.terms button {
  background: none;
  border: none;
  color: #0066cc;
  cursor: pointer;
  padding: 0;
}

.auth-box button[type="submit"] {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  font-size: 16px;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 성별 선택 */
.gender-select {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 8px 0;

}

.gender-select li {
  flex: 1;
}

.gender-select label {
  display: block;
  text-align: center;
  padding: 12px 0;
  border: 1px solid #ddd;
  cursor: pointer;
  user-select: none;
}

.gender-select li:first-child label {
  border-radius: 4px 0 0 4px;
}

.gender-select li:last-child label {
  border-radius: 0 4px 4px 0;
  border-left: none;
}

/* 선택 상태 */
.gender-select input:checked + label {
  background: #222;
  color: #fff;
  border-color: #222;
}

/* 실제 라디오는 숨김 */
.blind {
  position: absolute;
  opacity: 0;
}



/* 약관 */
.terms-container {
  margin: 16px 0px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}

.terms-title {
  font-size: 18px;
  font-weight: 600;
  margin: 7px 0px;
}

.terms-all {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #ddd;
}

.terms-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.terms-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.terms-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.terms-list input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
}

.terms-view {
  font-size: 13px;
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
}

.terms-view:hover {
  text-decoration: underline;
}

.terms-warn {
  margin-top: 12px;
  font-size: 13px;
  color: #dc2626;
}





/* 모달 */
  .terms-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.terms-modal.show {
  display: block;
}

.terms-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.terms-modal-content {
  position: relative;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  background: #fff;
  border-radius: 10px;
  margin: 10vh auto;
  display: flex;
  flex-direction: column;
}

.terms-modal-header {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terms-modal-header h4 {
  margin: 0;
  font-size: 16px;
}

.terms-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

.terms-modal-body {
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  overflow-y: auto;
  white-space: pre-line;
}

.terms-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  text-align: right;
}

.terms-modal-confirm {
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

@media (max-width: 480px) {
  .login-header {
  justify-content: center;
}

  .login-wrapper {
    justify-content: flex-start; /* 🔥 중앙 정렬 해제 */
    padding: 0;
  }

  .auth-box {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    padding: 24px 16px;         /* 🔥 auth-box 안쪽만 여백 */
  }
}