*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: #1f2937;
  min-height: 100vh;
}

.splash-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, rgba(248, 250, 252, 0.95), rgba(226, 232, 240, 0.95));
  z-index: 999;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.splash-card {
  background: #ffffff;
  border-radius: 1.75rem;
  padding: 2.6rem 3rem;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 32px 60px -35px rgba(59, 130, 246, 0.35);
  display: grid;
  gap: 1rem;
  min-width: clamp(260px, 40vw, 360px);
}

.splash-icon {
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  animation: splash-bounce 1.4s ease-in-out infinite;
}

.splash-title {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #1f2937;
}

.splash-subtitle {
  margin: 0;
  font-size: 1rem;
  color: #475569;
  letter-spacing: 0.02em;
}

.splash-trail {
  display: inline-flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.splash-trail span {
  width: 0.8rem;
  height: 0.8rem;
  background: linear-gradient(135deg, #60a5fa, #a855f7);
  border-radius: 999px;
  opacity: 0.35;
  animation: splash-trail 1.2s ease-in-out infinite;
}

.splash-trail span:nth-child(2) {
  animation-delay: 0.15s;
}

.splash-trail span:nth-child(3) {
  animation-delay: 0.3s;
}

.splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

@keyframes splash-trail {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-icon,
  .splash-trail span {
    animation: none;
  }
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  display: grid;
  place-items: center;
  font-size: 1.9rem;
}

.brand-title {
  margin: 0;
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  font-weight: 800;
  background: linear-gradient(120deg, #fb7185, #f97316, #c026d3);
  -webkit-background-clip: text;
  color: transparent;
}

.language-select {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  min-width: 120px;
}

.app-root {
  margin: 3.5rem 0 5rem;
}

.hero {
  display: grid;
  gap: 2.4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.08;
  font-weight: 800;
  color: #111827;
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: #334155;
  line-height: 1.5;
}

.hero-info-card {
  background: #ffffff;
  border-radius: 1.5rem;
  padding: clamp(1.4rem, 2vw, 1.9rem);
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.9rem, 3.1vw, 2.4rem);
  font-weight: 800;
  color: #0f172a;
}

.section-subtitle {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: #475569;
  line-height: 1.6;
}

.info-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1f2937;
}

.info-body {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.info-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.7rem;
}

.info-list li {
  color: #0f172a;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}

.info-list li::before {
  content: "✨";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.75rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: #fff;
  box-shadow: 0 18px 30px -18px rgba(236, 72, 153, 0.8);
}

.btn-outline {
  background: transparent;
  color: #ec4899;
  border: 2px solid rgba(236, 72, 153, 0.4);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px -20px rgba(236, 72, 153, 0.9);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.categories {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.insights-section {
  margin-top: 3.2rem;
  display: grid;
  gap: 1.5rem;
}

.insight-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.insight-card {
  background: #ffffff;
  border-radius: 1.4rem;
  padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: grid;
  gap: 0.6rem;
}

.insight-card h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.insight-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}

.categories-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.category-card {
  background: #ffffff;
  border-radius: 1.4rem;
  padding: 1.5rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(236, 72, 153, 0.45);
}

.category-card.selected {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(59, 130, 246, 0.08);
}

.category-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.category-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}

.quiz-card,
.result-card {
  background: #ffffff;
  border-radius: 1.6rem;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: grid;
  gap: 1.5rem;
}

.quiz-progress {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #1e293b;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #60a5fa, #a855f7);
  transition: width 0.4s ease;
}

.question-text {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 800;
  color: #0f172a;
}

.options-grid {
  display: grid;
  gap: 0.9rem;
}

.option-button {
  padding: 1.2rem 1.5rem;
  border-radius: 1rem;
  border: 2px solid transparent;
  background: #f8fafc;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.option-button:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(219, 234, 254, 0.6);
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.result-header {
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

.result-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #0f172a;
}

.result-subtitle {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: #475569;
}

.result-body {
  display: grid;
  gap: 2rem;
}

.result-image {
  width: min(320px, 60vw);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 1.4rem;
  margin: 0 auto;
  box-shadow: 0 24px 56px -30px rgba(14, 116, 144, 0.6);
}

.trait-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.trait-pill {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #0f172a;
  font-weight: 600;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.toast {
  position: fixed;
  top: 6.5rem;
  right: 50%;
  transform: translateX(50%);
  padding: 0.75rem 1.5rem;
  background: rgba(59, 130, 246, 0.95);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 16px 30px -18px rgba(59, 130, 246, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  font-weight: 600;
}

.toast.visible {
  opacity: 1;
}

.site-footer {
  padding: 2rem 0;
  background: rgba(15, 23, 42, 0.05);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: #475569;
  text-align: center;
  font-size: 0.95rem;
}

.site-footer .footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.site-footer .footer-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.site-footer .footer-link:hover {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 760px) {
  .hero {
    gap: 2rem;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .quiz-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .toast {
    top: unset;
    bottom: 1.5rem;
  }
}
