.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}
.modal-content {
  display: flex;
  position: relative;
  background: #1a1a1a;
  border-radius: 10px;
  width: 90%;
  max-width: 1000px;
  z-index: 2;
  padding: 20px;
  color: #fff;
}
.modal-body {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 20px;
  margin: 15px 0;
}

.modal-title {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  color: white;
}

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

.modal-list li {
  padding: 12px 16px;
  margin-bottom: 8px;
  background-color: #222;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-list li > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 250px;
}

.modal-list li.selected {
  background: linear-gradient(to right, #f72585, #b5179e);
  font-weight: bold;
}

.modal-left {
  flex: 1;
  border-right: 1px solid #444;
  padding-right: 20px;
}
.modal-left ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.modal-left li {
  padding: 10px;
  cursor: pointer;
}
.modal-left li:hover {
  background: #333;
}
.modal-right {
  flex: 2;
}
#modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .modal-body {
    flex-direction: column;
  }
  .modal-left,
  .modal-right {
    flex: none;
    width: 100%;
  }
  .modal-left {
    border-right: none;
    border-bottom: 1px solid #444;
  }
}

/* 로그인 & 등록 모달 */
.custom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.hidden {
  display: none;
}

.custom-modal-content {
  background: #1c1c1e;
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 450px;
  color: #fff;
  position: relative;
  box-sizing: border-box;
  margin: 0 1rem;
}

.modal-logo {
  display: block;
  margin: 0 auto 1rem;
  width: 120px;
  max-width: 40vw;
}

.modal-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.input-group {
  position: relative;
  margin-bottom: 1.25rem;
}

.input-group input {
  width: 100%;
  padding: 0.75rem 2.5rem;
  border: none;
  border-bottom: 1px solid #444;
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
}

.input-group i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

.input-group .fa-user,
.input-group .fa-lock,
.input-group .fa-phone-alt,
.input-group .fa-shield-alt,
.input-group .fa-user-tag {
  left: 0.75rem;
}

.input-group .toggle-password {
  right: 0.75rem;
  cursor: pointer;
}

.sms-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sms-group input {
  flex: 1;
  min-width: 0;
}

.btn-verify {
  background: #fce045;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 30px;
  font-weight: bold;
  font-size: 0.85rem;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s;
}

.btn-verify:hover {
  background: #ffe000;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: start;
  font-size: 14px;
  color: #ffe000 !important;
  padding: 10px;
}

.custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.custom-checkbox input {
  display: none;
}

.custom-checkbox .checkmark {
  width: 16px;
  height: 16px;
  border: 2px solid #ffe000;
  border-radius: 3px;
  position: relative;
  margin-top: 2px;
  flex-shrink: 0;
}

.custom-checkbox input:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0px;
  width: 4px;
  height: 8px;
  border: solid #ffe000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.label-text {
  color: #fff;
  line-height: 1.4;
  color: #ffe000 !important;
}

.btn-modal-submit {
  width: 100%;
  background: linear-gradient(180deg, #bc9638, #e0d10c);
  border: none;
  color: #000;
  font-weight: bold;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  cursor: pointer;
  transition: filter 0.3s;
}

.btn-modal-submit:hover {
  filter: brightness(1.1);
}

.register-info {
  text-align: center;
  font-size: 14px;
}

.register-info a {
  color: #ffe000;
  font-weight: bold;
  text-decoration: none;
}

/* ✅ 반응형 스타일 */
@media (max-width: 768px) {
  .custom-modal-content {
    padding: 1.5rem;
    max-width: 90%;
  }

  .modal-title {
    font-size: 1.3rem;
  }

  .btn-modal-submit {
    font-size: 0.95rem;
    padding: 0.65rem;
  }

  .btn-verify {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .custom-modal-content {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .modal-logo {
    width: 90px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .input-group input {
    font-size: 0.9rem;
    padding: 0.65rem 2rem;
  }

  .btn-modal-submit {
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .register-info {
    font-size: 0.85rem;
  }
}
