html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}


.iqtest-wrap {
  background: #c0c0c0;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  margin: 0;
  padding: 0;
}

.iqtest-wrap .logo a {
  text-decoration: none;
  color: inherit; /* 부모의 색상 상속 (원래 색상 유지) */
}

/* 메인 */
.iqtest-wrap .main-container {
    max-width: 400px;
    margin: 20px auto 0 auto;
    padding: 10px 10px 10px 10px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 6px 32px #0001;
    text-align: center;
}
.iqtest-wrap .title {
    font-size: 2rem;
    font-weight: bold;
    color: #6366f1;
    margin-bottom: 8px;
}
.iqtest-wrap .subtitle {
    font-size: 1.08rem;
    color: #64748b;
    margin-bottom: 38px;
}
.iqtest-wrap .version-btns {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.iqtest-wrap .version-btn {
    padding: 20px 0;
    font-size: 1.18rem;
    font-weight: bold;
    border: none;
    border-radius: 13px;
    background: linear-gradient(90deg,#6366f1,#60a5fa);
    color: #fff;
    box-shadow: 0 2px 8px #6366f111;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.iqtest-wrap .version-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 18px #6366f133;
    background: linear-gradient(90deg,#6366f1,#38bdf8);
}

/* 테스트 */
.iqtest-wrap .info {
    margin-top: 32px;
    font-size: 0.98rem;
    color: #888;
    line-height: 1.5;
}
.iqtest-wrap .container {
  max-width: 420px;
  width: 100%;
  margin: 32px auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 32px #0001;
  padding: 32px 24px 24px 24px;
  /* height 지정 없음 (PC) */
}

@media (max-width: 600px) {
  .iqtest-wrap .container {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;

    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;

    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: auto !important;
    /* 필요하다면 display: flex; flex-direction: column; 등 추가 가능 */
  }
}
.iqtest-wrap .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.iqtest-wrap .logo {
  font-weight: bold;
  font-size: 1.5rem;
  color: #4f46e5;
}
.iqtest-wrap .timer {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  color: #dc2626;
}
.iqtest-wrap .progress-info {
  text-align: right;
  font-size: 0.98rem;
  margin-bottom: 8px;
  color: #64748b;
}
.iqtest-wrap .question-box {
  background: #f3f4f6;
  border-radius: 15px;
  padding: 22px 12px;
  font-size: 1.07rem;
  min-height: 80px;
  margin-bottom: 28px;
}
.iqtest-wrap .choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  justify-content: center;
}
.iqtest-wrap .choice-btn {
  flex: 1 1 28%;
  min-width: 80px;
  padding: 18px 0;
  background: #fff;
  border: 2px solid #d1d5db;
  border-radius: 13px;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: border 0.17s, background 0.17s;
  text-align: center;
  box-shadow: 0 2px 7px #0001;
}
.iqtest-wrap .choice-btn.selected, .choice-btn:hover {
  border: 2.5px solid #6366f1;
  background: #eef2ff;
}
.iqtest-wrap .nav-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 22px;
}
.iqtest-wrap .nav-btns button {
  flex: 1 1 30%;
  min-width: 85px;
  padding: 13px 0;
  border-radius: 9px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: border 0.15s, background 0.15s;
}
.iqtest-wrap .nav-btns button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.iqtest-wrap .next-btn {
  width: 32%;
  padding: 15px 0;
  font-size: 1.15rem;
  font-weight: bold;
  background: linear-gradient(90deg, #6366f1, #60a5fa);
  color: #fff;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  margin-top: 2px;
  margin-bottom: 18px;
  transition: background 0.17s;
}
.iqtest-wrap .next-btn:active {
  background: #6366f1;
}
.iqtest-wrap .progress-bar-bg {
  background: #e5e7eb;
  border-radius: 6px;
  height: 9px;
  width: 100%;
  overflow: hidden;
  margin-bottom: 4px;
}
.iqtest-wrap .progress-bar-fill {
  background: #6366f1;
  height: 100%;
  width: 2%; /* 기본 1/50 */
  border-radius: 6px;
  transition: width 0.23s;
}
.iqtest-wrap .progress-bottom {
  text-align: right;
  color: #64748b;
  font-size: 0.94rem;
}
/* 결과 */
.iqtest-wrap .result-container {
    max-width: 410px;
    margin: 56px auto 0 auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 6px 28px #0002;
    text-align: center;
    padding: 36px 20px 32px 20px;
}
.iqtest-wrap .result-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #6366f1;
    margin-bottom: 7px;
}
.iqtest-wrap .desc {
    font-size: 1.13rem;
    color: #52525b;
    margin-bottom: 18px;
}
.iqtest-wrap .name-form-wrap {
    margin-bottom: 18px;
}
.iqtest-wrap .name-label {
    font-size: 1.04rem;
    color: #64748b;
    font-weight: 600;
    margin-right: 7px;
}
.iqtest-wrap .name-input {
    padding: 7px 12px;
    font-size: 1.08rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    width: 150px;
}
.iqtest-wrap .brain-img-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 28px;
    width: 240px;
    background: #f0f9ff;
    border-radius: 19px;
    box-shadow: 0 4px 14px #60a5fa22;
    padding-top: 28px;
    padding-bottom: 65px;
    overflow: visible;
}
.iqtest-wrap .brain-img-wrap img {
    width: 210px;
    height: auto;
    border-radius: 19px;
    background: #f0f9ff;
    display: block;
    margin: 0 auto;
    z-index: 1;
}
.iqtest-wrap .score-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffea00;
    text-shadow: 0 2px 8px #fff8, 0 1px 8px #60a5fa22;
    letter-spacing: 2px;
    white-space: nowrap;
    user-select: none;
    animation: popIn 1.1s cubic-bezier(0.4, 2, 0.3, 1) 0.25s both;
    z-index: 2;
}
@keyframes popIn {
    0% { transform: translate(-50%, -50%) scale(0.3) rotate(-20deg); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.12) rotate(3deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}
.iqtest-wrap .badge-label {
    position: absolute;
    top: 8px;
    right: 15px;
    font-size: 1.15rem;
    background: linear-gradient(90deg,#60a5fa,#6366f1);
    color: #fff;
    font-weight: bold;
    border-radius: 11px;
    padding: 7px 17px 7px 14px;
    box-shadow: 0 2px 7px #6366f133;
    letter-spacing: 0.7px;
    animation: badgePop .95s cubic-bezier(.6,2,.35,1) 0.18s both;
    user-select: none;
    z-index: 3;
}
@keyframes badgePop {
    0% { transform: scale(0.4) rotate(-16deg); opacity: 0;}
    60% { transform: scale(1.18) rotate(2deg); opacity: 1;}
    100% { transform: scale(1) rotate(0deg);}
}
.iqtest-wrap .name-label-img {
    position: absolute;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    font-size: 1.14rem;
    color: #000000;
    font-weight: 700;
    background: #f0f9ffcc;
    border-radius: 8px;
    padding: 4px 18px 4px 18px;
    letter-spacing: 0.6px;
    user-select: none;
    box-shadow: 0 2px 12px #6366f111;
    max-width: 92%;
    min-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
    pointer-events: none;
    text-align: center;
    border: 1px solid #a5b4fc33;
}
.iqtest-wrap .site-address {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: 96%;
    text-align: center;
    font-size: 0.97rem;
    color: #94a3b8;
    font-weight: 500;
    user-select: none;
    letter-spacing: 1px;
    background: #e0f2fe88;
    border-radius: 5px;
    padding: 1px 0;
    z-index: 2;
}
.iqtest-wrap .download-btn {
    background: linear-gradient(90deg,#60a5fa,#6366f1);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 16px 0;
    width: 100%;
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px #6366f122;
    transition: background 0.15s, transform 0.13s;
}
.iqtest-wrap .download-btn:hover { background: linear-gradient(90deg,#38bdf8,#6366f1);}
.iqtest-wrap .result-msg {
    color: #0ea5e9;
    font-size: 1.07rem;
    margin-top: 24px;
    margin-bottom: 19px;
}
.iqtest-wrap .social-wrap {
    display: flex;
    justify-content: center;
    gap: 11px;
    margin-top: 15px;
    margin-bottom: 8px;
}
.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; }