* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Noto Sans KR", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(108, 76, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #faf7ff 0%, #ffffff 100%);
  color: #222;
}

.app {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 22px 14px 70px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.hero-card,
.question-card,
.result-card,
.loading-card,
.info-card,
.basic-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #eee9ff;
  border-radius: 28px;
  padding: 30px 22px;
  margin: 18px 0;
  box-shadow: 0 14px 40px rgba(85, 66, 150, 0.12);
}

.hero-card {
  text-align: center;
  padding-top: 42px;
  padding-bottom: 38px;
}

.mini-badge {
  display: inline-block;
  background: #efeaff;
  color: #5b3df5;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
}

h1 {
  font-size: 42px;
  line-height: 1.18;
  margin: 0 0 16px;
  letter-spacing: -1px;
}

h2 {
  font-size: 26px;
  line-height: 1.4;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 20px;
  margin: 0 0 10px;
}

p,
li {
  font-size: 17px;
  line-height: 1.8;
}

ul {
  padding-left: 22px;
  margin-bottom: 0;
}

.hero-sub {
  color: #555;
  font-size: 18px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.hero-points span {
  background: #faf7ff;
  border: 1px solid #eee9ff;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 800;
}

.main-btn,
.sub-btn,
.answer-btn {
  width: 100%;
  border: none;
  border-radius: 18px;
  padding: 18px 16px;
  margin-top: 14px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.main-btn {
  background: linear-gradient(135deg, #6c4cff, #8a5cff);
  color: white;
  box-shadow: 0 10px 22px rgba(108, 76, 255, 0.25);
}

.hub-btn {
  background: linear-gradient(135deg, #ff5a5f, #ff8a65);
  box-shadow: 0 10px 22px rgba(255, 90, 95, 0.22);
}

.sub-btn {
  background: #eeeeee;
  color: #222;
}

.answer-btn {
  background: #f5f2ff;
  border: 1px solid #ebe4ff;
  color: #222;
  text-align: left;
  line-height: 1.55;
}

.answer-btn:hover,
.main-btn:hover,
.sub-btn:hover,
.small-btn:hover {
  opacity: 0.92;
}

.notice {
  color: #777;
  font-size: 13px;
  margin-top: 14px;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #777;
  font-weight: 800;
  margin-bottom: 14px;
}

.small-btn {
  border: none;
  background: #f1efff;
  color: #5b3df5;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  cursor: pointer;
}

.progress {
  width: 100%;
  height: 12px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 26px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(135deg, #6c4cff, #ff7ac8);
  transition: width 0.25s ease;
}

.answer-box {
  display: grid;
  gap: 12px;
}

.loading-card {
  text-align: center;
  padding-top: 60px;
  padding-bottom: 60px;
}

.loader {
  width: 54px;
  height: 54px;
  border: 6px solid #efeaff;
  border-top-color: #6c4cff;
  border-radius: 50%;
  margin: 0 auto 22px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-card {
  text-align: center;
}

.result-label {
  color: #777;
  font-weight: 800;
  margin-bottom: 8px;
}

#resultTitle {
  font-size: 38px;
  color: #6c4cff;
  margin-bottom: 8px;
}

.one-line {
  font-size: 18px;
  font-weight: 800;
  color: #444;
}

.score-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin: 22px 0;
}

.score-item {
  background: #faf7ff;
  border: 1px solid #eee9ff;
  border-radius: 18px;
  padding: 14px 8px;
}

.score-item strong {
  display: block;
  color: #6c4cff;
  font-size: 23px;
}

.score-item span {
  color: #666;
  font-size: 13px;
  font-weight: 800;
}

.tag-box {
  margin: 18px 0 24px;
}

.tag {
  display: inline-block;
  background: #efeaff;
  color: #4c35c9;
  padding: 8px 12px;
  border-radius: 999px;
  margin: 4px;
  font-size: 14px;
  font-weight: 900;
}

.result-section {
  text-align: left;
  background: #faf9ff;
  border-radius: 22px;
  padding: 20px;
  margin: 16px 0;
}

.result-section p {
  margin-bottom: 0;
}

.footer {
  text-align: center;
  color: #777;
  font-size: 14px;
  margin-top: 26px;
}

.footer a {
  color: #666;
  text-decoration: none;
  font-weight: 700;
}

.home-link {
  display: inline-block;
  margin-top: 20px;
  color: #6c4cff;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 520px) {
  .app {
    padding: 16px 12px 56px;
  }

  .hero-card,
  .question-card,
  .result-card,
  .loading-card,
  .info-card,
  .basic-card {
    padding: 25px 18px;
    border-radius: 24px;
  }

  h1 {
    font-size: 35px;
  }

  h2 {
    font-size: 23px;
  }

  #resultTitle {
    font-size: 32px;
  }

  p,
  li {
    font-size: 16px;
  }

  .score-box {
    grid-template-columns: 1fr;
  }
}
