.join {
  position: relative;
  width: 100%;
  padding-top: 150px;
}

/* 회원가입 컨테이너 */
.join__container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 40px 140px;
}

/* 회원가입 타이틀 */
.join__title {
  font-family: 'Urbanist', 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 40px;
  color: #333333;
  margin-bottom: 89px;
  line-height: 1;
}

/* 회원가입 폼 */
.join__form {
  width: 100%;
  max-width: 727px;
  display: flex;
  flex-direction: column;
  gap: 23px;
  margin-bottom: 90px;
}

.join__form__row {
  display: flex;
  align-items: center;
  gap: 37px;
  width: 100%;
}

.join__form__label {
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #868686;
  white-space: nowrap;
  min-width: 74px;
}

/* 입력 필드 */
.join__form__input {
  height: 63px;
  padding: 0 20px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  font-family: 'Urbanist', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #383838;
  outline: none;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.join__form__input:focus {
  border: 2px solid #00b6c1;
}

.join__form__input--small {
  width: 105px;
}

.join__form__input--medium {
  width: 151px;
}

.join__form__input--large {
  flex: 1;
  max-width: 427px;
}

/* 전화번호 입력 */
.join__form__phone {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 인증번호 입력 */
.join__form__verification {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
}

/* 폼 버튼 */
.join__form__button {
  width: 151px;
  height: 63px;
  border-radius: 10px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 500;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  white-space: nowrap;
}

.join__form__button--disabled {
  background-color: #d5d5d5;
  color: #707070;
  cursor: not-allowed;
}

.join__form__button--active {
  background-color: #5bccd3;
  color: #fff;
}

.join__form__button--active:hover {
  background-color: #4db8bf;
}

/* 체크박스 그룹 */
.join__form__checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  flex: 1;
}

.join__checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}

.join__checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.join__checkbox__box {
  width: 24px;
  height: 24px;
  border: 2px solid #d9d9d9;
  border-radius: 4px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
}

.join__checkbox__box::after {
  content: '✓';
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s;
}

.join__checkbox input[type="checkbox"]:checked + .join__checkbox__box {
  background-color: #00b6c1;
  border-color: #00b6c1;
}

.join__checkbox input[type="checkbox"]:checked + .join__checkbox__box::after {
  opacity: 1;
}

.join__checkbox__text {
  font-family: 'Pretendard', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #868686;
  white-space: nowrap;
}

/* 이용약관 타이틀 */
.join__agreement-title {
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #444444;
  margin-bottom: 21px;
  text-align: center;
}

/* 이용약관 동의 박스 */
.join__agreement {
  width: 100%;
  max-width: 667px;
  background-color: #f3fcfd;
  border-radius: 21px;
  padding: 48px 42px;
  margin-bottom: 43px;
}

.join__agreement__all {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  margin-bottom: 36px;
}

.join__agreement__all input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.join__agreement__all .join__checkbox__box {
  width: 24px;
  height: 24px;
}

.join__agreement__all .join__checkbox__text {
  font-size: 16px;
}

.join__agreement__list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding-left: 32px;
}

.join__agreement__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.join__agreement__detail {
  width: 77px;
  height: 33px;
  background-color: #6eced1;
  border: none;
  border-radius: 8px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #eeeeee;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.join__agreement__detail:hover {
  background-color: #5bbec1;
}

/* 가입하기 버튼 */
.join__buttons {
  display: flex;
  gap: 21px;
}

.join__button {
  width: 323px;
  height: 59px;
  border-radius: 10px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.join__button--primary {
  background-color: #5bccd3;
  color: #fff;
}

.join__button--primary:hover {
  background-color: #4db8bf;
}

.join__button--secondary {
  background-color: transparent;
  border: 2px solid #c3c3c3;
  color: #979797;
}

.join__button--secondary:hover {
  border-color: #a0a0a0;
  color: #808080;
}

.agreement-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
}

.agreement-modal.is-open {
  display: flex;
}

.agreement-modal__overlay {
  position: absolute;
  inset: 0;
}

.agreement-modal__dialog {
  position: relative;
  width: min(92vw, 520px);
  max-height: 70vh;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

.agreement-modal__title {
  margin: 0;
  font-family: 'Urbanist', 'Pretendard', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1f1f1f;
}

.agreement-modal__content {
  flex: 1;
  overflow-y: auto;
  font-family: 'Pretendard', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #4a4a4a;
  padding-right: 6px;
}

.agreement-modal__section {
  padding: 12px 0 14px;
  border-bottom: 1px solid #e9ecef;
}

.agreement-modal__section:last-child {
  border-bottom: none;
}

.agreement-modal__section h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #1f1f1f;
}

.agreement-modal__section p {
  margin: 0 0 10px;
}

.agreement-modal__section ul {
  margin: 8px 0 0;
  padding-left: 18px;
  list-style: disc;
}

.agreement-modal__section li {
  margin-bottom: 6px;
}

.agreement-modal__content ul {
  margin: 10px 0 0;
  padding-left: 20px;
  list-style: disc;
}

.agreement-modal__content li {
  margin-bottom: 6px;
}

.agreement-modal__actions {
  display: flex;
  justify-content: flex-end;
}

.agreement-modal__button {
  height: 46px;
  min-width: 120px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  background: #00b6c1;
  color: #ffffff;
  font-family: 'Pretendard', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.agreement-modal__button:hover {
  background: #0096a0;
}

.agreement-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f2f2f2;
  font-size: 20px;
  font-weight: 700;
  color: #333333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.agreement-modal__close:hover {
  background: #e6e6e6;
}

@media (max-width: 768px) {
  .join__container {
    padding: 0 20px 100px;
  }
  
  .join__title {
    font-size: 32px;
    margin-bottom: 60px;
  }
  
  .join__form__label {
    font-size: 18px;
    min-width: 60px;
    gap: 20px;
  }

  .join__form__phone,
  .join__form__verification {
    flex-wrap: wrap;
  }
  
  .join__form__input {
    font-size: 18px;
    height: 55px;
    padding: 0 10px;
  }

  .join__form__input--small {
    width: 50px;
  }
  .join__form__input--medium {
    width: 70px;
  }
  .join__form__input--large {
    width: 100%;
  }
  
  .join__form__button {
    width: 130px;
    height: 55px;
    font-size: 18px;
  }

  .join__agreement {
    padding: 30px 20px;
  }

  .join__agreement__list {
    padding-left: 0;
  }

  .join__agreement__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .join__buttons {
    width: 100%;
    flex-direction: column;
    gap: 15px;
  }
  
  .join__button {
    width: 100%;
  }
}
