@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(160deg, #eef2f6 0%, #e2e8f0 50%, #f0f4f8 100%);
  background-attachment: fixed;
  color: #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  line-height: 1.5;
}

.container {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 24px;
  max-width: 720px;
  width: 100%;
  border: 1px solid rgba(37, 99, 235, 0.06);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  position: relative;
  overflow: hidden;
}

/* Soft glow behind card */
.container::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container > * {
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

h1 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.subtitle {
  color: #64748b;
  font-size: 1rem;
  font-weight: 400;
}

/* Progress */
.progress-container {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.28);
}

#progress-text {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.75rem;
  text-align: right;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Question transitions */
#question-text,
#answers-container {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#question-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.75rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

#answers-container {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.answer-btn {
  display: block;
  width: 100%;
  padding: 1.15rem 1.5rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 14px;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  position: relative;
}

.answer-btn:hover {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff, #f0f7ff);
  color: #1e40af;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12), 0 2px 8px rgba(37, 99, 235, 0.08);
}

.answer-btn:active {
  transform: translateY(0) scale(0.995);
  box-shadow: none;
  transition-duration: 0.1s;
}

/* Ripple-ish highlight line on hover */
.answer-btn::after {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: #2563eb;
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transform: scaleY(0);
  transition: opacity 0.2s, transform 0.2s;
}

.answer-btn:hover::after {
  opacity: 1;
  transform: scaleY(1);
}

.hidden {
  display: none;
}

/* Result animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#result-content {
  animation: fadeInUp 0.55s ease forwards;
}

/* Result typography */
#result-content h2 {
  margin-bottom: 1rem;
  color: #0f172a;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#result-content p {
  color: #475569;
  margin-bottom: 1rem;
  line-height: 1.65;
}

#result-content p strong {
  display: block;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

#result-content ul {
  list-style: none;
  padding: 0;
}

#result-content li {
  margin: 0.55rem 0;
  padding-left: 1.35rem;
  position: relative;
  color: #334155;
}

#result-content li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #3b82f6;
  font-weight: 600;
}

#result-content a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

#result-content a:hover {
  border-bottom-color: #2563eb;
  color: #1d4ed8;
}

/* Profile blocks */
.profile-block {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.profile-block:last-child {
  border-bottom: none;
}

/* Winner profile — more life */
.profile-block.winner {
  background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 5px solid #2563eb;
  border-radius: 16px;
  padding: 2rem 2rem 1.5rem 2rem;
  margin-bottom: 2rem;
  border-bottom: none;
  box-shadow:
    0 4px 24px rgba(37, 99, 235, 0.07),
    0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.profile-block.winner::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.profile-badge {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.22);
}

/* Score gauges */
.score-gauges {
  margin: 1.5rem 0;
  padding: 1.5rem 2rem;
  background: #f8fafc;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
}

.score-gauges-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gauge {
  margin-bottom: 0.875rem;
}

.gauge:last-child {
  margin-bottom: 0;
}

.gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.gauge-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
}

.gauge-score {
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.gauge-score--highlight {
  color: #2563eb;
}

.gauge-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  background: #94a3b8;
  border-radius: 5px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.gauge-fill--highlight {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.other-profiles-title {
  margin-top: 2rem;
  margin-bottom: 1.25rem;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.other-profile {
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 0.875rem;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.other-profile:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.other-profile summary {
  padding: 1.1rem 1.5rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  transition: background 0.2s, color 0.2s;
}

.other-profile summary:hover {
  background: #f8fafc;
  color: #334155;
}

.other-profile summary::-webkit-details-marker {
  display: none;
}

.other-profile summary::after {
  content: "›";
  font-size: 1.4rem;
  color: #94a3b8;
  transform: rotate(90deg);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
  display: inline-block;
  margin-left: 0.5rem;
  line-height: 1;
}

.other-profile[open] summary::after {
  transform: rotate(-90deg);
  color: #2563eb;
}

.other-profile[open] {
  border-color: #93c5fd;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.07);
}

.other-profile summary:hover::after {
  color: #2563eb;
}

.other-profile .other-profile-content {
  padding: 0 1.5rem 1.5rem;
  color: #475569;
  line-height: 1.65;
  border-top: 1px solid #f1f5f9;
}

.other-profile .other-profile-content p {
  margin: 1rem 0;
}

.other-profile .other-profile-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.other-profile .other-profile-content li {
  margin: 0.55rem 0;
  padding-left: 1.35rem;
  position: relative;
  color: #334155;
}

.other-profile .other-profile-content li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #3b82f6;
  font-weight: 600;
}

.other-profile .other-profile-content a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.other-profile .other-profile-content a:hover {
  border-bottom-color: #2563eb;
}

/* Restart button */
#restart-btn,
.restart-btn {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  color: #2563eb;
  border-radius: 14px;
  margin: 1.5rem 0;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  letter-spacing: 0.01em;
}

#restart-btn:hover,
.restart-btn:hover {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.18);
}

#restart-btn:active,
.restart-btn:active {
  transform: translateY(0) scale(0.995);
  box-shadow: none;
  transition-duration: 0.1s;
}

@media (max-width: 640px) {
  .container {
    padding: 1.75rem;
    border-radius: 18px;
  }

  h1 {
    font-size: 1.5rem;
  }

  #question-text {
    font-size: 1.15rem;
  }

  .profile-block.winner {
    padding: 1.5rem;
  }
}
