* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Yu Gothic", sans-serif;
  color: #23485e;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.9) 0 6px, transparent 7px),
    radial-gradient(circle at 86% 26%, rgba(39, 189, 240, 0.18) 0 10px, transparent 11px),
    radial-gradient(circle at 18% 78%, rgba(255, 255, 255, 0.85) 0 5px, transparent 6px),
    radial-gradient(circle at 78% 82%, rgba(39, 189, 240, 0.14) 0 14px, transparent 15px),
    linear-gradient(135deg, #dff6ff, #f7fbff);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.35) 45%, transparent 70%),
    radial-gradient(circle at 30% 35%, rgba(255,255,255,0.6) 0 2px, transparent 3px),
    radial-gradient(circle at 65% 55%, rgba(255,255,255,0.5) 0 2px, transparent 3px),
    radial-gradient(circle at 42% 82%, rgba(39,189,240,0.18) 0 3px, transparent 4px);
  opacity: 0.55;
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  left: -10%;
  right: -10%;
  top: 310px;
  height: 260px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.6), transparent 65%);
  transform: rotate(-4deg);
  z-index: -1;
}

.container {
  max-width: 900px;
  margin: auto;
  padding: 24px;
  position: relative;
}

.hero {
  background: linear-gradient(135deg, #dff6ff, #f7fbff);
  padding: 32px 20px 20px;
  text-align: center;
  border-radius: 0 0 32px 32px;
}

.hero-image {
  width: 100%;
  max-width: 1200px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 24px;
}

.card {
  background: white;
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.chart-box {
  background: #f2fbff;
  border-radius: 20px;
  padding: 20px;
  margin-top: 24px;
}

#scoreChart {
  width: 100%;
  max-width: 680px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.hidden {
  display: none;
}

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

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #3bc8ff, #198dd1);
  transition: 0.3s;
}

.question-number {
  color: #1797d1;
  font-weight: bold;
  margin-bottom: 12px;
}

.question {
  font-size: 24px;
  line-height: 1.6;
  margin-bottom: 24px;
  font-weight: bold;
}

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

.answer-btn {
  border: none;
  background: #eef9ff;
  border: 2px solid #b9ebff;
  color: #235978;
  padding: 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.2s;
}

.answer-btn:hover {
  background: #d2f3ff;
  transform: translateY(-2px);
}

.main-btn {
  border: none;
  background: linear-gradient(135deg, #27bdf0, #1684c4);
  color: white;
  padding: 16px 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  margin-top: 20px;
  transition: 0.2s;
}

.main-btn:hover {
  transform: translateY(-2px);
}

.result {
  text-align: center;
}

.result img {
  width: 100%;
  max-width: 300px;
  border-radius: 20px;
  margin: 20px auto;
  display: block;
}

.result img {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
  margin: 24px auto;
  display: block;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.result-type {
  font-size: clamp(28px, 5vw, 42px);
  color: #1595d0;
  margin-bottom: 20px;
}

.description {
  background: #f2fbff;
  padding: 20px;
  border-radius: 20px;
  line-height: 1.9;
  text-align: left;
}

.score-list {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.score-item {
  background: #eef9ff;
  padding: 14px 18px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

footer {
  text-align: center;
  padding: 30px;
  color: #6b8ea4;
  font-size: 13px;
}

.hero,
.container,
footer {
  position: relative;
  z-index: 1;
}

.result img {
  cursor: pointer;
  transition:
    transform 0.18s ease,
    filter 0.2s ease;
}

.result img:hover {
  transform: scale(1.02);
  filter: brightness(1.03);
}

.result img.bounce {
  animation: resultBounce 0.7s ease;
}

@keyframes resultBounce {

  0% {
    transform: scale(1);
  }

  20% {
    transform: scale(0.92, 1.08);
  }

  40% {
    transform: scale(1.10, 0.90);
  }

  55% {
    transform: scale(0.96, 1.04);
  }

  70% {
    transform: scale(1.04, 0.97);
  }

  85% {
    transform: scale(0.99, 1.01);
  }

  100% {
    transform: scale(1);
  }
}

/* シェアボタン */
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 15px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.22);
  transition: 0.25s ease;
}

.share-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.28);
}

.share-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #111827;
  border-radius: 50%;
  font-size: 15px;
}


/* アニメーション */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.8) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 30%, rgba(39,189,240,0.25) 0 3px, transparent 4px),
    radial-gradient(circle at 60% 80%, rgba(255,255,255,0.8) 0 2px, transparent 3px);
  animation: sparkleMove 10s linear infinite;
  opacity: 0.8;
  z-index: -1;
}

@keyframes sparkleMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(-40px); }
}

.hero-image {
  animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.card {
  animation: cardIn 0.55s ease both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.answer-btn {
  position: relative;
  overflow: hidden;
}

.answer-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 10%, transparent 11%);
  transform: scale(0);
  opacity: 0;
  transition: 0.35s;
}

.answer-btn:active::after {
  transform: scale(4);
  opacity: 1;
}

.answer-btn.selected {
  background: linear-gradient(135deg, #b9efff, #dff8ff);
  transform: scale(0.97);
}

.question.change {
  animation: questionPop 0.35s ease;
}

@keyframes questionPop {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.result.show-result {
  animation: resultShow 0.8s ease both;
}

@keyframes resultShow {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(24px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.result img {
  animation: resultImagePop 0.9s ease both;
}

@keyframes resultImagePop {
  0% {
    opacity: 0;
    transform: scale(0.85) rotate(-2deg);
  }
  70% {
    transform: scale(1.03) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.result-type {
  animation: textGlow 1.4s ease both;
}

@keyframes textGlow {
  0% {
    opacity: 0;
    letter-spacing: 0.08em;
    text-shadow: 0 0 0 rgba(39,189,240,0);
  }
  100% {
    opacity: 1;
    letter-spacing: 0.02em;
    text-shadow: 0 0 18px rgba(39,189,240,0.25);
  }
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -20px;
  border-radius: 50%;
  pointer-events: none;
  animation: confettiFall 1.8s ease-in forwards;
  z-index: 9999;
}

@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}


/* =========================
   背景ふわふわ演出
========================= */
.bg-float {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: floatUp linear forwards;
}

.bg-float.blue {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(39,189,240,0.42), rgba(39,189,240,0.04));
  box-shadow: 0 0 18px rgba(39,189,240,0.35);
}

.bg-float.white {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95), rgba(255,255,255,0.08));
  box-shadow: 0 0 20px rgba(255,255,255,0.9);
}

.bg-float.ring {
  border-radius: 50%;
  border: 2px solid rgba(39,189,240,0.35);
  box-shadow: 0 0 14px rgba(39,189,240,0.2);
}

.bg-float.star {
  width: 16px !important;
  height: 16px !important;
  background: #ffffff;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  box-shadow:
    0 0 10px rgba(255,255,255,1),
    0 0 22px rgba(39,189,240,0.7);
}

@keyframes floatUp {
  0% {
    transform: translateY(0) translateX(0) scale(0.4) rotate(0deg);
    opacity: 0;
  }

  12% {
    opacity: 0.9;
  }

  60% {
    opacity: 0.75;
  }

  100% {
    transform: translateY(-115vh) translateX(var(--drift)) scale(1.25) rotate(360deg);
    opacity: 0;
  }
}






/* スマホ用 */
@media (max-width: 600px) {

  .hero {
    padding: 20px 12px 12px;
  }

  .hero-image {
    border-radius: 16px;
  }

  .container {
    padding: 16px;
  }

  .card {
    padding: 20px;
  }

  .question {
    font-size: 20px;
  }

  .answer-btn,
  .main-btn {
    width: 100%;
  }

}

