:root {
  --bg: #050a05;
  --card: #0c160c;
  --neon: #33ff66;
  --neon-soft: rgba(51, 255, 102, 0.4);
  --text: #e6ffe6;
  --muted: #96c996;
  --danger: #ff5f6d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: radial-gradient(circle at top, #0b1d0b 0%, #050a05 60%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.18;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 2rem 0.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--neon));
}

.title-block h1 {
  margin: 0;
  font-size: 2.4rem;
  color: var(--neon);
  text-shadow: 0 0 8px var(--neon-soft);
}

.title-block p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.container {
  max-width: 840px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--card);
  border: 1px solid rgba(51, 255, 102, 0.2);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
  margin-bottom: 1.5rem;
  display: none;
  font-size: 1.1rem;
  line-height: 1.6;
  backdrop-filter: blur(2px);
}

.card.active {
  display: block;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--neon);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn.primary {
  background: var(--neon);
  color: #041004;
  box-shadow: 0 0 18px var(--neon-soft);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 18px var(--neon-soft);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  text-align: left;
}

.progress {
  flex: 1;
}

.bar {
  width: 100%;
  height: 10px;
  background: #102010;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.4rem;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1eff72, #2dfb8d);
  transition: width 0.3s ease;
}

.answers {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
  justify-items: center;
}

.answer {
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(51, 255, 102, 0.3);
  background: rgba(9, 18, 9, 0.8);
  color: var(--text);
  cursor: pointer;
  transition: 0.2s ease;
  width: min(520px, 100%);
  text-align: center;
  font-size: 1rem;
}

.answer.selected {
  border-color: var(--neon);
  box-shadow: 0 0 10px var(--neon-soft);
}

.answer.correct {
  border-color: #47ff9c;
  background: rgba(23, 50, 23, 0.9);
}

.answer.wrong {
  border-color: var(--danger);
  background: rgba(60, 10, 10, 0.7);
}

.reward {
  text-align: center;
  margin: 2rem 0 1rem;
}

.reward.hidden {
  display: none;
}

.hidden {
  display: none;
}

.lolly {
  width: 320px;
  margin: 1rem auto;
  display: block;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
}

.confetti {
  position: relative;
  width: 100%;
  height: 120px;
  margin-top: 1rem;
  overflow: hidden;
}

.badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: rgba(51, 255, 102, 0.15);
  border: 1px solid rgba(51, 255, 102, 0.5);
  color: var(--neon);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 0 16px rgba(51, 255, 102, 0.25);
}

.confetti::before,
.confetti::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #47ff9c 6px, transparent 7px),
    radial-gradient(circle, #ffdd57 5px, transparent 6px),
    radial-gradient(circle, #ff6ec7 4px, transparent 5px);
  background-size: 60px 60px;
  animation: confetti 1.2s linear infinite;
  opacity: 0.9;
}

.confetti::after {
  animation-delay: 0.6s;
  opacity: 0.6;
}

@keyframes confetti {
  from {
    transform: translateY(-20%);
  }
  to {
    transform: translateY(120%);
  }
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 1rem 0 2rem;
}
