/* 팝업 콘텐츠 */
.popup-content {
  max-height: 500px;
  overflow-y: auto;
  padding: 20px;
}

/* 팝업 내 폼 요소 */
.popup-content .write-box .input-row {
  margin-bottom: 15px;
}

.popup-content .write-box .input-row dl {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.popup-content .write-box .input-row dl.w100 {
  width: 100%;
}

.popup-content .write-box .input-row dl.w33 {
  width: calc(33.33% - 10px);
}

.popup-content .write-box .input-row dl.w50 {
  width: calc(50% - 7px);
}

.popup-content .write-box .input-row dl dt {
  font-size: 14px;
  font-weight: 500;
  color: #222;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.popup-content .write-box .input-row dl dt .essential {
  color: #ff3e3e;
  margin-left: 2px;
}

.popup-content .write-box .input-row dl dd {
  position: relative;
}

.popup-content .write-box .input-row dl dd input[type='text'],
.popup-content .write-box .input-row dl dd input[type='password'],
.popup-content .write-box .input-row dl dd input[type='email'],
.popup-content .write-box .input-row dl dd input[type='tel'],
.popup-content .write-box .input-row dl dd input[type='number'] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.popup-content .write-box .input-row dl dd textarea {
  width: 100%;
  height: 120px;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  resize: none;
}

.popup-content .write-box .input-row dl dd input::placeholder {
  color: #999;
}

.popup-content .write-box .input-row dl dd .end-txt {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 14px;
}

.popup-content .write-box .input-row dl.w100 dd input[type='text'] {
  width: 100%;
}

.popup-content .write-box .input-row label {
  display: inline-flex;
  align-items: center;
  margin-right: 20px;
  cursor: pointer;
}

.popup-content .write-box .input-row label input[type='checkbox'],
.popup-content .write-box .input-row label input[type='radio'] {
  width: 18px;
  height: 18px;
  margin-right: 6px;
}

.popup-content .write-box .input-row label span {
  font-size: 14px;
  color: #333;
}

/* 개인정보 및 마케팅 동의 */
.popup-police-con {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.popup-police-con label {
  position: relative;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
}

.popup-police-con input {
  position: absolute;
  opacity: 0;
}

.popup-police-con label:before {
  content: '';
  position: absolute;
  left: -25px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 1px solid #ddd;
  border-radius: 2px;
}

.popup-police-con label span {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
}

.popup-police-con label span b {
  color: #4d3dbf;
  margin-left: 5px;
  text-decoration: underline;
}

.popup-police-con input:checked + label:before {
  background: #4d3dbf;
  border-color: #4d3dbf;
  position: relative;
}

.popup-police-con input:checked + label:after {
  content: '';
  position: absolute;
  left: -21px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-50%) rotate(-45deg);
}

.popup-submit-btn-con button {
  width: 100%;
  padding: 15px;
  background: #4d3dbf;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.popup-submit-btn-con button:hover {
  background: #3f31a0;
}

/* 스크롤바 스타일 */
.popup-content::-webkit-scrollbar {
  width: 5px;
}

.popup-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 5px;
}

.popup-content::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 5px;
}

/* 로그인 폼 */
.login-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 50px 20px;
}

.login-top-con {
  text-align: center;
  margin-bottom: 40px;
}

.login-top-con h2 {
  font-size: 28px;
  font-weight: 600;
  color: #222;
  margin-bottom: 15px;
}

.login-form-con {
  margin-bottom: 30px;
}

.login-form .input-row {
  margin-bottom: 15px;
}

.login-form .input-row input {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.login-form .input-row input::placeholder {
  color: #999;
}

.login-form .input-row input:focus {
  border-color: #4d3dbf;
  outline: none;
  box-shadow: 0 0 0 2px rgba(77, 61, 191, 0.1);
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.save-id {
  display: flex;
  align-items: center;
}

.save-id input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

.save-id span {
  font-size: 14px;
  color: #666;
}

.find-links {
  display: flex;
  align-items: center;
}

.find-links a {
  color: #666;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.find-links a:hover {
  color: #4d3dbf;
  text-decoration: underline;
}

.find-links .divider {
  margin: 0 8px;
  color: #ddd;
}

.login-submit-btn {
  width: 100%;
  padding: 15px;
  background: #4d3dbf;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.login-submit-btn:hover {
  background: #3f31a0;
}

.signup-link-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: #fff;
  color: #4d3dbf;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid #4d3dbf;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.signup-link-btn:hover {
  background: #f9f8ff;
}

/* 회원가입 폼 */
.signup-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 50px 20px;
}

.signup-top-con {
  text-align: center;
  margin-bottom: 40px;
}

.signup-top-con h2 {
  font-size: 28px;
  font-weight: 600;
  color: #222;
  margin-bottom: 15px;
}

.signup-form .input-row {
  margin-bottom: 20px;
}

.signup-form .input-row label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 10px;
}

.signup-form .input-row input {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.signup-form .input-row input:focus {
  border-color: #4d3dbf;
  outline: none;
  box-shadow: 0 0 0 2px rgba(77, 61, 191, 0.1);
}

.signup-form .input-row.with-button .input-button-wrap {
  display: flex;
  gap: 10px;
}

.signup-form .input-row.with-button input {
  flex-grow: 1;
}

.signup-form .check-button,
.signup-form .verification-button {
  padding: 15px;
  background: #4d3dbf;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.signup-form .check-button:hover,
.signup-form .verification-button:hover {
  background: #3f31a0;
}

.signup-form .input-guide {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}

.signup-form .timer {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: #ff3e3e;
  font-weight: 500;
}

.terms-section {
  margin-bottom: 30px;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 20px;
}

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

.terms-all label {
  font-size: 15px;
  font-weight: 600;
  color: #222;
}

.terms-list label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: #666;
}

.terms-list label:last-child {
  margin-bottom: 0;
}

.terms-list input[type='checkbox'] {
  margin-right: 8px;
}

.terms-list em {
  color: #ff3e3e;
  font-style: normal;
}

.terms-detail {
  height: 80px;
  overflow-y: auto;
  margin-top: 10px;
  padding: 10px;
  background: #f7f7f7;
  border-radius: 5px;
  font-size: 12px;
  color: #666;
}

.signup-submit-btn {
  width: 100%;
  padding: 15px;
  background: #4d3dbf;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.signup-submit-btn:hover {
  background: #3f31a0;
}

/* 반응형 폼 */
@media screen and (max-width: 767px) {
  .login-container,
  .signup-container {
    padding: 30px 15px;
  }

  .login-top-con h2,
  .signup-top-con h2 {
    font-size: 24px;
  }

  .login-form .input-row input,
  .signup-form .input-row input {
    padding: 12px;
    font-size: 14px;
  }

  .login-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .login-submit-btn,
  .signup-link-btn,
  .signup-submit-btn {
    padding: 12px;
    font-size: 15px;
  }

  .signup-form .check-button,
  .signup-form .verification-button {
    padding: 12px;
    font-size: 13px;
  }
}

@media screen and (max-width: 375px) {
  .login-container,
  .signup-container {
    padding: 20px 10px;
  }

  .login-top-con h2,
  .signup-top-con h2 {
    font-size: 22px;
  }

  .login-form .input-row input,
  .signup-form .input-row input {
    padding: 10px;
    font-size: 13px;
  }

  .login-options {
    margin-bottom: 20px;
  }

  .find-links {
    flex-wrap: wrap;
  }

  .login-submit-btn,
  .signup-link-btn,
  .signup-submit-btn {
    padding: 10px;
    font-size: 14px;
  }
}

/* ===== 커스텀 체크박스: 흰 배경, 까만 체크, 테두리 없음, 중앙 정렬 ===== */
.checkbox-label input[type='checkbox'] {
  display: none;
}

.checkbox-label .label-text {
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label .label-text::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border: 1px solid #4d3dbf;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}

.checkbox-label input[type='checkbox']:checked + .label-text::before {
  background: #fff;
  border: 1px solid #4d3dbf;
}

.checkbox-label input[type='checkbox']:checked + .label-text::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  width: 10px;
  height: 6px;
  border-left: 3px solid #4d3dbf;
  border-bottom: 3px solid #4d3dbf;
  transform: rotate(-45deg);
}

.terms-accordion-box {
  background: #faf9ff;
  border: 1px solid #e0e0ef;
  border-radius: 5px;
  margin: 8px 0 0 0;
  padding: 14px 16px 14px 16px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  color: #4d3dbf;
  transition: max-height 0.3s;
}

.terms-accordion-content {
  line-height: 1.7;
  font-size: 14px;
}

.terms-accordion-btn {
  background: none;
  border: none;
  color: #4d3dbf;
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  margin-left: 6px;
  padding: 0;
}

/* 개인정보 수집 및 이용 동의 모달 스타일 */
.terms-text {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  color: #333;
  line-height: 1.8;
}

.terms-text > p {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.terms-text .section-title {
  font-size: 17px;
  font-weight: 600;
  margin: 30px 0 15px;
  color: #222;
  line-height: 1.6;
}

.terms-text .section-title:first-child {
  margin-top: 0;
}

.terms-text .sub-list {
  padding-left: 20px;
  margin: 15px 0 25px;
}

.terms-text .sub-list li {
  position: relative;
  padding-left: 12px;
  margin: 12px 0;
  line-height: 1.8;
  word-break: keep-all;
}

.terms-text .sub-list li::before {
  content: '-';
  position: absolute;
  left: 0;
  top: 0;
}

.terms-text .info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 30px;
  border: 1px solid #ddd;
}

.terms-text .info-table th,
.terms-text .info-table td {
  padding: 16px;
  border: 1px solid #ddd;
  text-align: left;
  font-size: 15px;
  line-height: 1.6;
  word-break: keep-all;
}

.terms-text .info-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #222;
}

.terms-text .info-table td {
  color: #444;
}

.terms-text .notice-text {
  margin-top: 25px;
  color: #555;
  font-size: 15px;
  line-height: 1.8;
  word-break: keep-all;
}

.terms-text .notice-text br {
  display: block;
  margin: 12px 0;
  content: '';
}

.terms-text .date-text {
  margin-top: 30px;
  color: #666;
  font-size: 14px;
  text-align: right;
}

.privacy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.privacy-table th,
.privacy-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  font-size: 14px;
}

.privacy-table th {
  background-color: #f8f8f8;
  font-weight: 600;
  color: #333;
}

.privacy-table td {
  color: #666;
}

.terms-text strong {
  color: #333;
  font-weight: 600;
}

/* 모바일 대응 */
@media (max-width: 768px) {
  .terms-text {
    padding: 15px;
    max-height: 350px;
    line-height: 1.7;
  }

  .privacy-table th,
  .privacy-table td {
    padding: 8px;
    font-size: 13px;
  }

  .terms-text h4 {
    font-size: 15px;
  }

  .terms-text p,
  .terms-text li {
    font-size: 13px;
  }

  .terms-text .section-title {
    font-size: 16px;
    margin: 25px 0 12px;
  }

  .terms-text .info-table th,
  .terms-text .info-table td {
    padding: 14px;
    font-size: 14px;
  }

  .terms-text .sub-list li {
    margin: 10px 0;
  }

  .terms-text .notice-text {
    font-size: 14px;
  }

  .terms-text .notice-text br {
    margin: 10px 0;
  }
}

.modal-footer {
  padding: 20px 28px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.modal-footer button {
  background: linear-gradient(95deg, #ff66cc 5.7%, #4d3dbf 84.87%);
  color: white;
  border: none;
  padding: 14px 40px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.modal-footer button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 61, 191, 0.3);
}

/* 모달 버튼 클래스 추가 */
.modal-agree-btn {
  background: linear-gradient(95deg, #ff66cc 5.7%, #4d3dbf 84.87%);
  color: white;
  border: none;
  padding: 14px 40px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  margin: 0 auto; /* 가운데 정렬을 위해 추가 */
  display: block; /* 가운데 정렬을 위해 추가 */
}

.modal-agree-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 61, 191, 0.3);
}

/* 모바일 대응 */
@media (max-width: 768px) {
  .modal-content {
    margin: 8% auto;
    width: 95%;
    max-height: 88vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 20px 22px;
  }

  .modal-header h3 {
    font-size: 18px;
  }

  .modal-close {
    width: 28px;
    height: 28px;
    font-size: 24px;
  }

  .terms-text h4 {
    font-size: 16px;
    margin: 20px 0 10px 0;
  }

  .terms-text p,
  .terms-text li {
    font-size: 14px;
  }

  .modal-footer button,
  .modal-agree-btn {
    padding: 12px 30px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 5% auto;
    width: 95%;
    max-height: 90vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 16px 18px;
  }

  .terms-text h4 {
    font-size: 15px;
  }

  .terms-text p,
  .terms-text li {
    font-size: 13px;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  position: relative;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  width: 100%;
  text-align: center;
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: #000;
  background-color: #f0f0f0;
}

.modal-body {
  padding: 28px;
  max-height: 50vh;
  overflow-y: auto;
}

.terms-text {
  color: #333;
}

.terms-text .section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: #222;
}

.terms-text .section-title:first-child {
  margin-top: 0;
}

.terms-text .sub-list {
  padding-left: 20px;
  margin: 10px 0;
}

.terms-text .sub-list li {
  position: relative;
  padding-left: 12px;
  margin: 5px 0;
  line-height: 1.6;
}

.terms-text .sub-list li::before {
  content: '-';
  position: absolute;
  left: 0;
}

.terms-text .info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  border: 1px solid #ddd;
}

.terms-text .info-table th,
.terms-text .info-table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
}

.terms-text .info-table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.terms-text .notice-text {
  margin-top: 20px;
  color: #666;
  font-size: 14px;
}

.terms-text .date-text {
  margin-top: 20px;
  color: #666;
  font-size: 14px;
  text-align: right;
}

@media (max-width: 768px) {
  .modal-header {
    padding: 20px;
  }

  .modal-close {
    right: 15px;
  }

  .modal-body {
    padding: 20px;
  }

  .terms-text .section-title {
    font-size: 15px;
  }

  .terms-text .info-table th,
  .terms-text .info-table td {
    padding: 10px;
    font-size: 13px;
  }
}
