/* Import common styles */
/* CSS Reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

body {
  width: 100%;
}

a {
  color: black;
  text-decoration: none;
}

body {
  font-family: "Pretendard", sans-serif;
  color: #444444;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Anchor link offset to account for fixed header */
section[id] {
  scroll-margin-top: 40px;
}

@media (min-width: 768px) {
  section[id] {
    scroll-margin-top: 44px;
  }
}
@media (min-width: 1024px) {
  section[id] {
    scroll-margin-top: 80px;
  }
}
/* Keyframes */
@keyframes move {
  100% {
    transform: translateX(-350%);
  }
}
/* Reset and Base Styles */
body {
  overflow-x: hidden;
}

/* Common utility classes */
.up_image_box {
  width: 50px;
  height: 50px;
  position: fixed;
  bottom: 10px;
  right: 10px;
  display: none;
  z-index: 15;
  cursor: pointer;
}
.up_image_box img {
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .up_image_box {
    display: none;
  }
}
/* Header Styles */
header {
  background-color: white;
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  width: 100%;
  height: 40px;
  border-bottom: 1px solid rgb(206, 206, 206);
  z-index: 10;
}
header h1 {
  display: inline-block;
  height: 26px;
}
header h1 img {
  display: block;
  width: 100%;
  height: 100%;
}
header h1 span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
header .mobile_burger {
  background-color: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0;
  width: 20px;
  height: 10px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}
header .mobile_burger::before {
  content: "";
  background-color: black;
  height: 2px;
  width: 100%;
  transition: all 0.3s ease;
}
header .mobile_burger::after {
  content: "";
  background-color: black;
  height: 2px;
  width: 100%;
  transition: all 0.3s ease;
}
header #mobile_menu_toggle:checked ~ .mobile_burger {
  justify-content: center;
}
header #mobile_menu_toggle:checked ~ .mobile_burger::before {
  transform: rotate(45deg) translateY(1px);
}
header #mobile_menu_toggle:checked ~ .mobile_burger::after {
  transform: rotate(-45deg) translateY(-1px);
}
header .bg_back {
  display: none;
  position: fixed;
  top: 40px;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5019607843);
  z-index: 9;
}
header .bg_back .bg_overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
  pointer-events: none;
}
header .bg_back .mobile_nav {
  background-color: white;
  pointer-events: auto;
}
header .bg_back .mobile_nav a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 36px;
  font-size: 20px;
}
header #mobile_menu_toggle:checked ~ .bg_back {
  display: block;
}
header .pc_nav {
  display: none;
}

/* Header Responsive Styles */
@media (min-width: 768px) {
  header {
    height: 80px;
  }
  header h1 {
    width: auto;
    height: 56px;
  }
  header .mobile_burger,
  header .bg_back.on {
    display: none;
  }
  header .pc_nav {
    display: block;
  }
  header .pc_nav a {
    font-size: 20px;
    width: 100px;
  }
  header .pc_nav a:hover {
    background-color: #eff4ff;
    color: #2c72ff;
  }
  header .pc_nav a + a {
    margin-left: 10px;
  }
}
/* Footer Styles */
footer {
  background-color: #323232;
  padding: 92px 0 92px 16px;
}
footer h2 img {
  width: 155px;
  height: 40px;
}
footer .footer_contents {
  margin-top: 16px;
  color: #787878;
  font-size: 12px;
}
footer .footer_contents p {
  margin: 10px 0;
}
footer .footer_contents a {
  color: #787878;
}

/* Footer Responsive Styles */
@media (min-width: 768px) {
  footer h2 img {
    width: 263px;
    height: 63px;
  }
  footer .footer_contents {
    font-size: 16px;
  }
  footer .footer_contents a {
    font-size: 16px;
  }
}
@media (min-width: 1024px) {
  footer {
    padding: 193px 210px;
  }
  footer h2 img {
    width: 312px;
    height: 80px;
  }
  footer .footer_contents {
    margin-top: 50px;
  }
}
/* Auth Page Styles */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
  background-color: #f8f9fa;
}

.auth-container {
  background: white;
  padding: 80px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 600px;
}
.auth-container h1 {
  text-align: center;
  margin-bottom: 60px;
  color: #333;
  font-size: 28px;
  font-weight: 600;
}

.auth-tab {
  display: none;
}

input#login:not(:checked) ~ .auth-tab.link-account {
  display: block;
}

input#login:checked ~ .auth-tab.login {
  display: block;
}

.auth-form .form-group {
  margin-bottom: 1.5rem;
}
.auth-form .form-group heading {
  display: flex;
  justify-content: space-between;
}
.auth-form .form-group label {
  font-weight: 500;
}
.auth-form .form-group label span {
  color: #ff0000;
}
.auth-form .form-group .rule {
  font-weight: 500;
  font-size: 14px;
}
.auth-form .form-group .error {
  margin-top: 4px;
  color: #ff0000;
  font-size: 12px;
  font-weight: 300;
}
.auth-form .form-group input:not([type=checkbox]) {
  width: 100%;
  padding: 16px 20px;
  margin-top: 7px;
  border: 1px solid #727cf5;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}
.auth-form .form-group input:not([type=checkbox]):focus {
  outline: none;
}
.auth-form .form-group input:not([type=checkbox])::placeholder {
  font-weight: 500;
  color: #828282;
}
.auth-form .form-group label.auto-login {
  display: block;
  margin-top: 12px;
  color: #222;
}
.auth-form .line {
  width: 100%;
  height: 1px;
  background-color: #727cf5;
  margin: 14px 0 12px;
}
.auth-form .terms li {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
.auth-form .terms li a {
  font-size: 12px;
  text-decoration: underline;
}
.auth-form .terms li:first-child {
  margin-bottom: 13px;
}
.auth-form label:has(input[type=checkbox]) {
  font-size: 12px;
}
.auth-form label:has(input[type=checkbox]) input {
  margin-right: 7px;
}
.auth-form label:has(input[type=checkbox]).term-all {
  font-size: 1rem;
  font-weight: 500;
}

.auth-button-container {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 0.75rem;
  padding-top: 30px;
}
.auth-button-container button {
  width: 100%;
  max-width: 200px;
  padding: 14px;
  background-color: #e2ccff;
  color: black;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.auth-button-container button:hover {
  color: white;
  background-color: #727cf5;
}
.auth-button-container button:active {
  color: white;
  transform: translateY(1px);
}

.auth-links {
  text-align: center;
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-links .spacing {
  flex: 1;
}
.auth-links a,
.auth-links label {
  color: #222;
  text-decoration: none;
  font-size: 14px;
}
.auth-links a:hover,
.auth-links label:hover {
  color: #007bff;
  text-decoration: underline;
}
.auth-links label {
  display: block;
}

.link-type-container {
  display: flex;
  width: calc(100% - 1px);
  height: 52px;
  border: solid 1px #727cf5;
  background-color: #727cf5;
  border-radius: 8px;
  overflow: hidden;
  gap: 1px;
  margin-bottom: 2rem;
}

.link-type {
  flex: 1;
  text-align: center;
  display: block;
  padding: 14px;
  background-color: white;
  line-height: 22px;
}

input[name=link-type]:checked + .link-type {
  color: white;
  background-color: #727cf5;
}

.content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 500;
  margin-bottom: 24px;
}

.subtitle {
  margin-bottom: 20px;
}

.found-id {
  color: #ff0000;
  font-size: 1.5rem;
}

/* Responsive design */
@media (max-width: 480px) {
  .auth-page {
    padding: 20px 16px;
  }
  .auth-container {
    padding: 30px 20px;
  }
}
@media (min-width: 768px) {
  .auth-page {
    min-height: calc(100vh - 44px);
  }
}
@media (min-width: 1024px) {
  .auth-page {
    min-height: calc(100vh - 80px);
  }
}
/* 모달 전체 */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* 모달 내용 */
.modal-content {
  background: #fff;
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
  position: relative;
}

/* 닫기 버튼 */
.modal-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 32px;
  font-weight: bold;
  color: #222;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  padding: 4px 10px;
  line-height: 1;
  border-radius: 4px;
}

.modal-content .close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
}

/* 본문 텍스트 */
#terms-body {
  margin-top: 1rem;
  white-space: pre-wrap;
  line-height: 1.5;
  color: #333;
  font-size: 15px;
}

/* 스크롤 스타일 */
.modal-content::-webkit-scrollbar {
  width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: #777;
}

#terms-body {
  max-height: 70vh;
  overflow-y: auto;
  line-height: 1.6;
}

#terms-body h2, #terms-body h3 {
  margin-top: 20px;
  font-weight: bold;
  color: #222;
}

#terms-body table {
  margin-top: 10px;
  border: 1px solid #ddd;
  border-collapse: collapse;
  width: 100%;
}

#terms-body th, #terms-body td {
  border: 1px solid #ddd;
  padding: 8px;
}

#terms-body th {
  background-color: #f5f5f5;
  font-weight: bold;
}

/* 기본적으로 로그인 탭만 보이게 */
.auth-tab.link-account {
  display: none;
}

/* 활성화 시 */
.auth-tab.link-account.active {
  display: block;
}

/* 아이디/비번 찾기 모드일 때 일부만 노출 */
.auth-tab.link-account.find-only .link-type-container,
.auth-tab.link-account.find-only #birth-date,
.auth-tab.link-account.find-only .auth-button-container {
  display: none;
}

/* find-only 모드에서는 name, mobile-number만 보이게 */
.auth-tab.link-account.find-only .form-group.link-account,
.auth-tab.link-account.find-only #mobile-number {
  display: block;
}