/* =============== 모바일 Mini RIASEC 전용 스타일 =============== */
@font-face {
    font-family: 'GongGothicMedium';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10@1.0/GongGothicMedium.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* 전체 배경 및 폰트 */
body {
  background: #f8f9fc;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  margin: 0;
  min-height: 100vh;
}
.iqtest-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding-top: 16px;
  box-sizing: border-box;
}

/* 컨테이너 */
.iqtest-container {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 6px 28px #a5b4fc13;
  padding: 24px 18px 18px 18px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 헤더 : 로고, 사용자 정보 */
.iqtest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.iqtest-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #4c00ff;
  letter-spacing: 1.2px;
  text-shadow: 0 2px 8px #f0f9ff66;
}

/* index 폼 */

.form-wrap {
    max-width: 390px; margin: 45px auto 0 auto; padding: 24px 16px 32px 16px;
    background: #fff; border-radius: 18px; box-shadow: 0 6px 28px #a5b4fc11;
    display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.form-title { font-size: 1.35rem; font-weight: 700; color: #6366f1; margin-bottom: 18px; }
.form-row { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 1.07rem; color: #64748b; font-weight: 500; }
.form-input {
    font-size: 1.09rem; border: 1.4px solid #cbd5e1; border-radius: 7px;
    padding: 9px 12px; outline: none; background: #f3f4f6; color: #334155;
    transition: border .14s;
}
.form-input:focus { border-color: #6366f1; background: #eef2ff; }
.form-btn {
    margin-top: 18px; font-size: 1.11rem; font-weight: 700; padding: 12px 0;
    border-radius: 10px; border: none; width: 32%; background: linear-gradient(90deg,#fbff09,#0ea5e9);
    color: #fff; cursor: pointer; transition: background .13s, box-shadow .12s;
    box-shadow: 0 2px 12px #6366f111; gap: 5px;
}
.form-btn:disabled { background: #cbd5e1; color: #ffffff; cursor: not-allowed; }
@media (max-width: 450px) {
    .form-wrap { padding: 18px 4vw 20px 4vw; }
    .form-title { font-size: 1.13rem; }
}
/* 진행바 및 상태 */
.iqtest-progress-bar-bg {
  background: #e5e7eb;
  border-radius: 8px;
  height: 11px;
  width: 100%;
  overflow: hidden;
  margin-bottom: 10px;
}
.iqtest-progress-bar-fill {
  background: linear-gradient(90deg, #6366f1 60%, #0ea5e9 100%);
  height: 100%;
  width: 0;
  border-radius: 8px;
  transition: width 0.21s cubic-bezier(.38,1.4,.51,1.01);
}
.iqtest-progress {
  font-size: 1.08rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 15px;
}

/* 질문박스 */
.iqtest-question-box {
  background: #ffe600f4;
  border-radius: 15px;
  padding: 20px 10px 20px 10px;
  font-family: 'GongGothicMedium', sans-serif;
  font-size: 1.5rem;
  color: hsl(53, 79%, 19%);
  margin-bottom: 4px;
  min-height: 100px;
  word-break: keep-all;
  box-shadow: 0 1px 8px #3636361a;
}

/* 이미지 선택지(5점) */
.iqtest-choices.image-choices {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 10px;
  justify-items: stretch;
  align-items: stretch;
  min-height: 80px;
  padding: 20px 10px 20px 10px;
}
.choice-img-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform .12s;
  outline: none;
}
.choice-img-btn img {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  filter: grayscale(.17) drop-shadow(0 1.5px 6px #0001);
  transition: filter 0.15s, box-shadow 0.15s, transform 0.14s;
  background: #e0e7ef;
  box-shadow: 0 2px 10px #6366f108;
}
.choice-img-btn.selected img,
.choice-img-btn:active img {
  transform: scale(1.13);
  filter: none;
  box-shadow: 0 6px 22px #6366f10d;
}
.no-underline {
  text-decoration: none;
  color: inherit; /* 기존 텍스트 색상 유지 (선택사항) */
}
/* 네비게이션 버튼 (이전/다음) */
.iqtest-nav-btns {
  display: flex;
  gap: 13px;
  justify-content: center;
  margin: 10px 0 20px 0;
}
.iqtest-nav-btns button {
  flex: 1 1 38%;
  min-width: 90px;
  padding: 12px 0;
  border-radius: 9px;
  border: 1.4px solid #d1d5db;
  background: #f1f5ff;
  font-weight: 600;
  cursor: pointer;
  font-size: 1.03rem;
  transition: border 0.13s, background 0.13s, transform 0.10s;
  color: #888887;
}
.iqtest-nav-btns button:active, 
.iqtest-nav-btns button:focus {
  background: #e0e7ef;
  border-color: #6366f1;
}
.iqtest-nav-btns button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

/* 푸터 */
.iqtest-footer {
  margin: 10px 0 10px 0;
  font-size: 0.97rem;
  color: #94a3b8;
  text-align: center;
  letter-spacing: 0.05em;
}

/* 결과 */
.result-container { max-width: 410px; margin: 38px auto 0 auto; background: #fff; border-radius: 18px; box-shadow: 0 6px 28px #a5b4fc11; padding: 20px 16px 24px 16px; text-align: center; }
.result-title { font-size: 1.34rem; font-weight: 700; color: #6366f1; margin-bottom: 15px; }
.score-table { margin: 20px auto 8px auto; border-collapse: collapse; font-size: 1.06rem; }
.score-table td { padding: 4px 10px; }


.score-table {
  width: 100%;
  margin: 20px auto 8px auto;
  border-collapse: collapse;
  font-size: 1.06rem;
  text-align: center;
}
.score-table td {
  padding: 8px 2px 7px 2px;
  border-bottom: 1px solid #e0e7ef;
  min-width: 60px;
}



.iqtest-wrap .download-btn {
  background: linear-gradient(90deg,#60a5fa,#6366f1);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.09rem;
  font-weight: 600;
  padding: 10px 0;
  width: 45%;
  cursor: pointer;
  margin-top: 5px;
  margin-bottom: 5px;
  box-shadow: 0 4px 12px #6366f122;
  transition: background 0.15s, transform 0.13s;
}

#saveFooter {
  font-size: .97rem;
  color: #94a3b8;
  margin: 6px auto 0 auto;
  letter-spacing: 0.01em;
}
.choice-img-btn span {
  margin-top: 4px;
  font-size: .95rem;
  color: #6366f1;
  font-weight: 500;
  letter-spacing: 0.01em;
}


.iqtest-wrap .download-btn:hover { background: linear-gradient(90deg,#38bdf8,#6366f1);}
.iqtest-wrap .result-msg {
  color: #0ea5e9;
  font-size: 1.04rem;
  margin-top: 5px;
  margin-bottom: 5px;
}
.iqtest-wrap .social-wrap {
  display: flex;
  justify-content: center;
  gap: 11px;
  margin-top: 10px;
  margin-bottom: 5px;
}
.iqtest-wrap .social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 8px #0001;
  transition: background .17s, box-shadow .16s;
}
.iqtest-wrap .social-btn:hover {
  background: #bae6fd;
  box-shadow: 0 4px 16px #6366f122;
}
.iqtest-wrap .social-btn svg { vertical-align: middle; }

@keyframes pulseRadar {
  0%   { transform: scale(1);}
  45%  { transform: scale(1.07);}
  70%  { transform: scale(1);}
  100% { transform: scale(1);}
}
#riasecChart.animated {
  animation: pulseRadar 1.2s cubic-bezier(.32,1.6,.55,1.02) infinite;
}



@media (max-width: 440px) { .result-container { padding: 10px 2vw 14px 2vw; } }

/* -------- 반응형 -------- */
@media (max-width: 650px) {
  .iqtest-container {
    max-width: 95vw;
    border-radius: 13px;
    padding: 10vw 5vw 10vw 5vw;
    margin: 0 20px 0 20px;
  }
  .iqtest-header {
    font-size: 1.08rem;
    margin-bottom: 10px;
  }
  .iqtest-choices.image-choices {
    gap: 10px;
    min-height: 54px;
  }
  .choice-img-btn img {
    width: 35px;
    height: 35px;
    border-radius: 8px;
  }
}

@media (max-width: 400px) {
  .iqtest-container {
    padding: 10vw 5vw 10vw 5vw;
    font-size: .93rem;
  }
  .iqtest-question-box {
    padding: 15px 10px 15px 10px;
    font-size: 1.5rem;
  }
  .iqtest-choices.image-choices {
    gap: 10px;
    min-height: 40px;
  }
  .choice-img-btn img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
  }
  .iqtest-nav-btns button {
    min-width: 66px;
    font-size: 0.95rem;
    padding: 10px 0;
  }
}
