
/* 모달 전체 배경 */
.otp_modal_overlay {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(33, 35, 43, 0.336);
  backdrop-filter: blur(10px);
}

/* 모달 본체 */
.otp_modal_content {
  max-height: calc(100vh - 40px);
  overflow-y: auto;

  width: calc(100% - 40px);
  background: #16191c;
  color: #fff;
  margin: 20px auto;
  padding: 30px 24px;
  border-radius: 28px;
  max-width: 550px; /* 2열 배치를 위해 약간 넓힘 */
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.otp_modal_header {
  text-align: center;
  margin-bottom: 25px;
}
.otp_modal_header h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  font-weight: 700;
}
.otp_modal_header p {
  color: #8e9297;
  font-size: 0.95rem;
  font-weight: 400;
}

/* 1행 2열 그리드 레이아웃 */
.otp_grid_container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.otp_selection_card {
  background: #26292c;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.4s ease;
  will-change: transform;
}

.otp_selection_card:hover {
  background: #23272a;
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.otp_selection_card.discord {
  border-color: #5865f2;
}
.otp_selection_card.discord:hover {
  border-color: #5865f2;
  box-shadow: 0 15px 30px rgba(88, 101, 242, 0.2);
}
.otp_selection_card.quick {
  border-color: #f1c40f;
}
.otp_selection_card.quick:hover {
  border-color: #f1c40f;
  box-shadow: 0 15px 30px rgba(241, 196, 15, 0.2);
}

.otp_selection_card.discord:hover {
  border-color: #5865f2;
}
.otp_selection_card.quick:hover {
  border-color: #f1c40f;
}

.otp_icon_wrapper {
  font-size: 40px;
  margin-bottom: 15px;
}
.discord .otp_icon_wrapper {
  color: #5865f2;
}
.quick .otp_icon_wrapper {
  color: #f1c40f;
}

.otp_selection_card h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

/* OTP 입력 영역 애니메이션 */
.otp_fade_in {
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.otp_divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 30px 0;
}
.otp_helper_text {
  font-size: 0.85rem;
  color: #b5bac1;
  text-align: center;
  margin-bottom: 15px;
  font-weight: 400;
}

.otp_helper_text span {
  background: #313131;
  border: 1px solid #5865f2;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffffff;
  
}

.otp_input_row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
#otp_entry_field {
  flex: 2;
  background: #0c0d0e;
  border: 1px solid #2f3136;
  border-radius: 12px;
  color: #fff;
  font-size: 24px;
  text-align: center;
  letter-spacing: 5px;
  font-weight: bold;
}

.otp_submit_glow_btn {
  flex: 1;
  background: #5865f2;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.otp_cancel_text {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #8e95a1;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
}

.otp_newlogin {
  color: #f1c40f;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 600; 
  text-shadow: 0 0 8px rgba(241, 196, 15, 0.6); 
}

.otp_oldlogin {
  color: #5865f2;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(88, 101, 242, 0.6);
}

.otp_description {
  font-size: 0.8rem;
  color: #b5bac1;
  text-align: center;
  margin-top: 15px;
  font-weight: 400;
}
/* [1. 공통 스타일: PC/태블릿 기준] */
.otp_modal_overlay {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 11, 14, 0.85); /* 배경 조금 더 어둡게 */
  backdrop-filter: blur(10px);
}

.otp_modal_content {
  background: #16191c;
  color: #fff;
  padding: 40px;
  border-radius: 28px;
  max-width: 550px;
  width: calc(100% - 40px);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.otp_modal_header { text-align: center; margin-bottom: 30px; }
.otp_modal_header h2 { font-size: 1.6rem; margin-bottom: 8px; font-weight: 700; }
.otp_modal_header p { color: #8e9297; font-size: 0.95rem; }

.otp_grid_container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.otp_selection_card {
  background: #26292c;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.otp_selection_card:hover {
  transform: scale(1.02);
  background: #2d3135;
}

.otp_selection_card.discord { border-color: #5865f2; }
.otp_selection_card.quick { border-color: #f1c40f; }

.otp_icon_wrapper { font-size: 40px; margin-bottom: 15px; }
.discord .otp_icon_wrapper { color: #5865f2; }
.quick .otp_icon_wrapper { color: #f1c40f; }

/* 뱃지 스타일 */
.otp_newlogin, .otp_oldlogin {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 10px;
  display: inline-block;
}
.otp_newlogin { color: #f1c40f; text-shadow: 0 0 8px rgba(241, 196, 15, 0.5); }
.otp_oldlogin { color: #5865f2; text-shadow: 0 0 8px rgba(88, 101, 242, 0.5); }

/* 입력창 영역 */
.otp_divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 30px 0; }
.otp_input_row { display: flex; gap: 10px; margin-bottom: 20px; }
#otp_entry_field {
  flex: 2; background: #0c0d0e; border: 1px solid #2f3136;
  border-radius: 12px; color: #fff; font-size: 24px;
  text-align: center; letter-spacing: 5px; font-weight: bold;
}
.otp_submit_glow_btn {
  flex: 1; background: #5865f2; color: #fff; border: none;
  border-radius: 12px; font-weight: bold; cursor: pointer; margin-top: 5px;
  padding: 10px 0;;
}

@media (max-width: 600px) {
  /* 1. 모달 여백 최소화 (가로 공간 확보) */
  .otp_modal_content {
    margin: 10px;
    padding: 25px 15px; /* 좌우 패딩을 줄여서 그리드 공간 확보 */
    width: calc(100% - 20px);
  }

  .otp_modal_header h2 { font-size: 1.2rem; }
  .otp_modal_header p { font-size: 0.8rem; }

  /* 2. [핵심] 모바일에서도 2열(1fr 1fr) 유지 */
  .otp_grid_container {
    grid-template-columns: 1fr 1fr; 
    gap: 10px; /* 카드 사이 간격을 좁게 */
  }

  /* 3. 카드 내부 요소 수직 정렬 */
  .otp_selection_card {
    display: flex;
    flex-direction: column; /* 세로로 쌓기 */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 10px;    /* 내부 패딩 축소 */
    min-height: 160px;     /* 두 카드의 높이를 통일 */
    border-radius: 16px;
  }

  .otp_icon_wrapper {
    margin-right: 0;       /* 가로 마진 제거 */
    margin-bottom: 10px;   /* 아이콘 아래 여백 */
    font-size: 32px;       /* 아이콘 크기 최적화 */
  }

  .otp_selection_card h3 {
    font-size: 1rem;       /* 폰트 크기 줄임 (안 깨지게) */
    margin-bottom: 4px;
    width: 100%;
    word-break: keep-all;  /* 한글 줄바꿈 방지 */
  }

  .otp_description {
    font-size: 0.75rem;    /* 설명 텍스트 축소 */
    line-height: 1.2;
    margin-bottom: 8px;
    opacity: 0.8;
  }

  /* 4. 뱃지(신규/기존) 스타일 최적화 */
  .otp_newlogin, .otp_oldlogin {
    display: inline-block;
    font-size: 0.65rem;    /* 좁은 공간을 위해 폰트 축소 */
    padding: 2px 6px;
    margin-top: auto;      /* 뱃지를 카드 하단으로 밀어냄 */
    white-space: nowrap;
  }

  /* 5. 하단 입력창 영역 슬림화 */
  .otp_divider { margin: 20px 0; }
  .otp_input_row { gap: 6px; }
  #otp_entry_field { font-size: 18px; padding: 10px 0; }
  .otp_submit_glow_btn { font-size: 0.85rem;}
}