*{
  box-sizing:border-box;
}

:root{
  --bg1:#07192f;
  --bg2:#112b4a;
  --primary:#3aa7ff;
  --primary-soft:#6ec1ff;
  --text:#eef6ff;
  --sub:#b8d3ef;
  --muted:#8fb2d5;
  --card:rgba(255,255,255,.08);
  --card-border:rgba(255,255,255,.13);
  --shadow:0 18px 45px rgba(0,0,0,.28);
}

body{
  margin:0;
  min-height:100vh;
  font-family:-apple-system,BlinkMacSystemFont,"Noto Sans KR","Pretendard",Arial,sans-serif;
  background:
    radial-gradient(circle at 20% 10%,rgba(58,167,255,.18),transparent 28%),
    radial-gradient(circle at 80% 0%,rgba(110,193,255,.13),transparent 26%),
    linear-gradient(160deg,var(--bg1),var(--bg2) 58%,var(--bg1));
  color:var(--text);
}

button,select{
  font-family:inherit;
}

.app{
  width:min(760px,100%);
  margin:0 auto;
  padding:32px 18px 52px;
}

.hero{
  min-height:calc(100vh - 64px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:26px;
}

.brand-row{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-mark{
  width:44px;
  height:44px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,var(--primary),var(--primary-soft));
  color:#061a2f;
  font-size:26px;
  font-weight:950;
  box-shadow:0 12px 28px rgba(58,167,255,.28);
}

.brand-name{
  font-size:19px;
  font-weight:900;
}

.brand-sub{
  margin-top:2px;
  color:var(--muted);
  font-size:13px;
}

.hero-card,
.card{
  background:var(--card);
  border:1px solid var(--card-border);
  border-radius:28px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(10px);
}

.hero-card{
  padding:32px 26px 28px;
}

.badge{
  width:max-content;
  padding:8px 13px;
  border:1px solid rgba(110,193,255,.45);
  border-radius:999px;
  color:var(--primary-soft);
  font-size:12px;
  font-weight:900;
  margin-bottom:20px;
}

h1{
  font-size:44px;
  line-height:1.12;
  margin:0 0 20px;
  letter-spacing:-1.7px;
}

.hero-card p{
  color:var(--sub);
  font-size:17px;
  line-height:1.65;
  margin:0 0 30px;
}

.hero-buttons{
  display:grid;
  gap:12px;
  margin-bottom:20px;
}

.primary-btn,
.secondary-btn{
  width:100%;
  border-radius:17px;
  padding:17px 20px;
  font-size:17px;
  font-weight:900;
  cursor:pointer;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease;
}

.primary-btn{
  border:0;
  background:linear-gradient(135deg,var(--primary),var(--primary-soft));
  color:#061a2f;
  box-shadow:0 14px 30px rgba(58,167,255,.24);
}

.secondary-btn{
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.13);
  color:var(--text);
}

.primary-btn:hover,
.secondary-btn:hover{
  transform:translateY(-1px);
}

.secondary-btn:hover{
  background:rgba(58,167,255,.14);
  border-color:rgba(58,167,255,.45);
}

.hero-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:22px;
}

.hero-grid div{
  padding:16px 10px;
  border-radius:16px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.09);
  text-align:center;
}

.hero-grid strong{
  display:block;
  font-size:19px;
  color:var(--primary-soft);
}

.hero-grid span{
  display:block;
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
}

.card{
  margin-top:36px;
  padding:26px;
}

.hidden{
  display:none !important;
}

.progress{
  margin-bottom:28px;
}

.progress-top{
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:14px;
  margin-bottom:12px;
}

.progress-track{
  height:8px;
  background:rgba(255,255,255,.12);
  border-radius:999px;
  overflow:hidden;
}

.progress-track i{
  display:block;
  width:0;
  height:100%;
  background:linear-gradient(90deg,var(--primary),var(--primary-soft));
  transition:width .26s ease;
}

.question-label{
  color:var(--primary-soft);
  font-size:12px;
  font-weight:900;
  margin-bottom:16px;
  letter-spacing:1px;
}

#questionText{
  min-height:92px;
  font-size:27px;
  line-height:1.38;
  margin:0 0 28px;
}

.answers{
  display:grid;
  gap:12px;
}

.answers button{
  border:1px solid rgba(255,255,255,.13);
  background:rgba(255,255,255,.075);
  color:var(--text);
  border-radius:17px;
  padding:17px 16px;
  font-size:16px;
  font-weight:750;
  cursor:pointer;
}

.answers button:hover,
.answers button.active{
  border-color:rgba(58,167,255,.7);
  background:rgba(58,167,255,.18);
}

.small{
  color:var(--muted);
  margin:0 0 14px;
}

.result-head{
  padding:28px 22px;
  border-radius:24px;
  background:
    radial-gradient(circle at 20% 20%,rgba(110,193,255,.18),transparent 35%),
    rgba(58,167,255,.10);
  border:1px solid rgba(110,193,255,.24);
  text-align:center;
  margin-bottom:22px;
}

.result-type{
  font-size:66px;
  font-weight:950;
  color:var(--primary-soft);
}

.result-title{
  margin-top:12px;
  font-size:23px;
  font-weight:850;
}

.result-summary{
  margin-top:14px;
  color:var(--sub);
  line-height:1.7;
}

.result-card{
  margin-top:18px;
  padding:20px;
  border-radius:19px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.09);
}

.result-card h3{
  margin:0 0 12px;
  color:var(--primary-soft);
  font-size:16px;
}

.result-card p{
  margin:0;
  line-height:1.72;
  color:#dbe9f7;
}

.type-select{
  width:100%;
  margin-top:12px;
  padding:15px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background:#102943;
  color:var(--text);
  font-size:16px;
  font-weight:800;
}

.mbti-bars{
  margin-top:24px;
  padding-top:2px;
}

.mbti-bar{
  margin-top:18px;
}

.mbti-bar-top{
  display:flex;
  justify-content:space-between;
  margin-bottom:9px;
  color:var(--sub);
  font-size:14px;
}

.mbti-track{
  height:10px;
  background:rgba(255,255,255,.10);
  border-radius:999px;
  overflow:hidden;
}

.mbti-track i{
  display:block;
  height:100%;
  background:linear-gradient(90deg,var(--primary),var(--primary-soft));
}

.compatibility-box,
.compatibility-result{
  margin-top:28px;
}

.compatibility-label{
  color:var(--primary-soft);
  font-size:12px;
  font-weight:900;
  margin-bottom:12px;
}

.compatibility-title{
  font-size:22px;
  line-height:1.4;
  margin-bottom:20px;
}

.result-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:26px;
}

@media(max-width:520px){
  .app{
    padding:24px 14px 40px;
  }

  .hero{
    min-height:calc(100vh - 48px);
  }

  .hero-card,
  .card{
    border-radius:23px;
  }

  .hero-card,
  .card{
    padding:22px;
  }

  h1{
    font-size:36px;
  }

  .hero-card p{
    font-size:15.5px;
  }

  #questionText{
    font-size:24px;
    min-height:86px;
  }

  .hero-grid{
    grid-template-columns:1fr;
  }

  .result-type{
    font-size:54px;
  }

  .result-actions{
    grid-template-columns:1fr;
  }
}
