/* ============================================================
   AuthModal · 로그인 / 회원가입 / 약관 동의
   App.jsx 의 AuthModal · 회원가입 · 전문보기 팝업과 1:1.
   ============================================================ */

/* ----- 로그인 후 온보딩 (OnboardingModal · 성별/나이/국가/장르) ----- */
.cp-onb {
  position: fixed;
  inset: 0;
  z-index: 5600;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.cp-onb__card {
  width: min(100%, 420px);
  box-sizing: border-box;
  border-radius: 24px;
  background: radial-gradient(circle at top right, rgba(123, 73, 255, 0.22), transparent 55%), #111118;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  padding: 20px;
  color: #fff;
}
.cp-onb__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.cp-onb__progress {
  display: flex;
  gap: 6px;
}
.cp-onb__dot {
  width: 26px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 180ms ease;
}
.cp-onb__dot.is-on {
  background: linear-gradient(135deg, #FF1077, #7B49FF);
}
.cp-onb__skip {
  all: unset;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}
.cp-onb__title {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.cp-onb__sub {
  margin: 7px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}
.cp-onb__body {
  margin: 20px 0 4px;
  min-height: 120px;
}
.cp-onb__gender {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cp-onb__gbtn {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 15px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.75);
  transition: background 140ms ease, border-color 140ms ease;
}
.cp-onb__gbtn.is-on {
  background: rgba(255, 16, 119, 0.16);
  border-color: rgba(255, 16, 119, 0.5);
  color: #fff;
}
.cp-onb__gemoji {
  font-size: 34px;
  line-height: 1;
}
.cp-onb__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.cp-onb__foot {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.cp-onb__back {
  all: unset;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0 20px;
  min-height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
}
.cp-onb__next {
  all: unset;
  cursor: pointer;
  flex: 1;
  min-height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #FF1077, #7B49FF);
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}
.cp-onb__next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 팝업이 아닌 헤더가 있는 전체 페이지(앱 프레임 폭) */
.cp-auth-page {
  position: fixed; inset: 0; z-index: 5000;
  width: 100%; max-width: 32rem; margin: 0 auto;
  background: #07070A; color: #fff;
  display: flex; flex-direction: column;
  overflow-y: auto;
}

/* 상단 헤더 — 뒤로가기 + 가운데 제목 */
.cp-auth-topbar {
  position: sticky; top: 0; z-index: 2;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  height: 54px; padding: 0 8px;
  background: rgba(7, 7, 10, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.cp-auth-back {
  all: unset; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 999px; color: #fff;
}
.cp-auth-topbar-title { text-align: center; font-size: 16px; font-weight: 900; letter-spacing: -0.01em; }

.cp-auth-body {
  flex: 1; box-sizing: border-box;
  padding: 24px 22px calc(48px + env(safe-area-inset-bottom, 0px));
}

.cp-auth-fields { display: grid; gap: 10px; }
.cp-auth-notice {
  box-sizing: border-box;
  margin-bottom: 14px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  background: rgba(74, 222, 128, 0.10);
  color: rgba(236, 253, 245, 0.92);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}
.cp-auth-input {
  width: 100%; box-sizing: border-box; height: 46px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10); background: rgba(255, 255, 255, 0.06);
  color: #fff; padding: 0 13px; outline: none; font-size: 14px; font-weight: 700;
}
.cp-auth-input::placeholder { color: rgba(255, 255, 255, 0.38); font-weight: 600; }
.cp-auth-input:focus { border-color: rgba(255, 16, 119, 0.5); }
/* 브라우저 자동완성(아이디·비밀번호)이 흰 배경을 덮어쓰는 것 방지 */
.cp-auth-input:-webkit-autofill,
.cp-auth-input:-webkit-autofill:hover,
.cp-auth-input:-webkit-autofill:focus,
.cp-auth-input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #1b1b22 inset;
  box-shadow: 0 0 0 1000px #1b1b22 inset;
  caret-color: #fff;
  transition: background-color 9999s ease-in-out 0s;
}

.cp-auth-submit {
  all: unset; cursor: pointer; margin-top: 14px; width: 100%; height: 50px; box-sizing: border-box;
  border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, #FF1077, #7B49FF); color: #fff; font-size: 14px; font-weight: 900;
}
.cp-auth-submit[disabled] { cursor: wait; background: rgba(255, 255, 255, 0.10); }

.cp-auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; }
.cp-auth-divider::before, .cp-auth-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08); }
.cp-auth-divider span { font-size: 10px; font-weight: 800; color: rgba(255, 255, 255, 0.35); letter-spacing: 0.12em; }

.cp-auth-social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}
/* 완전 동그라미(로고 이미지) SNS 버튼 */
.cp-auth-social {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}
.cp-auth-social[disabled] { cursor: wait; opacity: 0.7; }
.cp-auth-social-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 로고 이미지가 원을 꽉 채움 → 배경색은 이미지 로딩 전 플레이스홀더 용도 */
.cp-auth-social.google { background: #fff; }
.cp-auth-social.kakao { background: #fbe300; }
.cp-auth-social.naver { background: #1ec800; }
.cp-auth-social.line { background: #00c300; }

.cp-auth-alt {
  all: unset; cursor: pointer; box-sizing: border-box; width: 100%; height: 50px; margin-top: 12px;
  border-radius: 14px; display: grid; place-items: center;
  border: 1px solid rgba(255, 16, 119, 0.45); background: rgba(255, 16, 119, 0.08);
  color: #FF7AB8; font-size: 14px; font-weight: 900;
}

.cp-auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.cp-auth-switch button { all: unset; cursor: pointer; color: #FF7AB8; font-weight: 800; margin-left: 6px; }

.cp-auth-error { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 60, 90, 0.12); color: #FF9AAF; font-size: 12px; font-weight: 700; }

/* 약관 동의 */
.cp-agree { margin-top: 14px; border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 14px; padding: 12px 13px; }
.cp-agree-all {
  display: flex; align-items: center; gap: 10px; padding-bottom: 11px; margin-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); cursor: pointer; font-size: 14px; font-weight: 800;
}
.cp-agree-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.cp-agree-row .lbl { flex: 1; color: rgba(255, 255, 255, 0.85); cursor: pointer; }
.cp-agree-tag { font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 999px; }
.cp-agree-tag.req { background: rgba(255, 16, 119, 0.18); color: #FF7AB8; }
.cp-agree-tag.opt { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.55); }
.cp-agree-view { all: unset; cursor: pointer; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, 0.5); text-decoration: underline; }
.cp-agree input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; flex-shrink: 0; margin: 0;
  border-radius: 7px; border: 1.5px solid rgba(255, 255, 255, 0.25); background: transparent; cursor: pointer; position: relative;
}
.cp-agree input[type="checkbox"]:checked { background: linear-gradient(135deg, #FF1077, #7B49FF); border-color: transparent; }
.cp-agree input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* 전문 보기 팝업 */
.cp-terms-overlay { position: fixed; inset: 0; z-index: 5200; background: rgba(0, 0, 0, 0.7); display: grid; place-items: center; padding: 18px; }
.cp-terms-card { width: min(100%, 460px); max-height: 80vh; display: flex; flex-direction: column; border-radius: 20px; background: #15151E; border: 1px solid rgba(255, 255, 255, 0.10); overflow: hidden; color: #fff; }
.cp-terms-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.cp-terms-head strong { font-size: 16px; font-weight: 900; }
.cp-terms-body { padding: 16px 18px; overflow-y: auto; font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, 0.8); white-space: pre-wrap; }
.cp-terms-close { all: unset; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
