:root {
  --bg: #091122;
  --card: #111827;
  --accent: #dc2626;
  --accent-2: #16a34a;
  --text: #e5e7eb;
  --muted: #9ca3af;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 20px;
}

/* Snow and decorations */
/* Container for falling icons */
.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.flake {
  position: absolute;
  top: -5vh;
  font-size: 20px;
  opacity: 0.9;
  animation-name: fall, sway;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
  will-change: transform;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

@keyframes fall {
  to {
    transform: translateY(110vh);
  }
}

@keyframes sway {
  0% {
    margin-left: 0;
  }
  50% {
    margin-left: 40px;
  }
  100% {
    margin-left: 0;
  }
}

.santa-deco {
  margin: 0 auto;
  background: var(--bg);
  max-width: 760px;
  width: 100%;
  height: 196px;
  pointer-events: none;
}

.santa-deco img {
  width: 250px;
  height: 196px;
  object-fit: cover;
  display: block;
}

.quiz {
  margin: 0 auto;
  max-width: 760px;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
}

header {
  margin: auto;
  width: 93%;
  margin-top: -90px;
  padding: 20px 24px;
  background: linear-gradient(90deg, var(--accent), #b91c1c);
  border-radius: 14px;
}

header h1 {
  margin: 0;
  text-align: center;
  font-size: 1.6rem;
  font-family: "Merienda", cursive;
  letter-spacing: 0.3px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

header p {
  text-align: center;
  margin: 6px 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.content {
  padding: 24px;
}

.progress {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.image-wrap {
  border-radius: 12px;
  overflow: hidden;
  max-height: 280px;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.question {
  font-size: 1.1rem;
  line-height: 1.4;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border 0.15s ease;
  background: #0b1220;
}

.option:hover {
  transform: translateY(-1px);
  background: #0d1628;
}

.option.correct {
  border-color: var(--accent-2);
  background: rgba(22, 163, 74, 0.15);
}

.option.wrong {
  border-color: var(--accent);
  background: rgba(220, 38, 38, 0.15);
}

.option.disabled {
  cursor: default;
  pointer-events: none;
  opacity: 0.9;
}

.feedback {
  font-size: 0.95rem;
  padding-top: 6px;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 10px;
}

button {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--accent-2), #22c55e);
  color: #052e16;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  background: #1f2937;
  color: var(--text);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.result {
  text-align: center;
  padding: 40px 20px;
  display: none;
}

.result h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.score {
  font-size: 1.2rem;
  margin: 12px 0 20px;
}

footer {
  padding: 14px 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  header h1 {
    font-size: 1.15rem;
  }

  header p {
    font-size: 0.85rem;
  }

  .content {
    padding: 16px;
  }

  .question {
    font-size: 1rem;
  }

  .image-wrap {
    max-height: 200px;
  }

  .option {
    padding: 12px;
    font-size: 0.95rem;
  }

  /* Stack buttons but keep logical order: Next first */
  .controls {
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
  }

  button {
    width: 100%;
  }
}