:root {
  --sky-top: #ead9d6;
  --sky-bottom: #a9cbbd;
  --mint: #a9cbbd;
  --peach: #e2a07d;
  --sun: #f0c277;
  --coral: #d87890;
  --berry: #e59ab3;
  --leaf: #8cc9b0;
  --lavender: #b3a7c9;
  --ink: #2e2a2c;
  --card: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 40px rgba(45, 42, 50, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Baloo 2", "Nunito", "Comic Neue", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: #f1eae9;
  position: relative;
  overflow-x: hidden;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.rainbow-glow {
  position: absolute;
  width: 2600px;
  height: 2400px;
  right: -1080px;
  top: -100px;
  background: radial-gradient(
    circle at 65% 60%,
    #d8748f 0 12%,
    #d8748f 12% 17%,
    #d98c7c 17% 23%,
    #e2a07d 23% 29%,
    #f0c277 29% 35%,
    #a9cbbd 35% 41%,
    #8cc9b0 41% 47%,
    #b3a7c9 47% 53%,
    #d6c1d1 53% 59%,
    #edd7cf 59% 65%,
    transparent 65% 100%
  );
  opacity: 0.9;
  z-index: 1;
}

.daisies {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  width: 100%;
  height: 280px;
  pointer-events: none;
  z-index: 2;
}

.horizon {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20%;
  background: linear-gradient(
    180deg,
    rgba(169, 203, 189, 0) 0%,
    rgba(169, 203, 189, 0.5) 50px,
    #a9cbbd 50px
  );
  z-index: 3;
}

.daisy {
  position: absolute;
  width: var(--size, 72px);
  aspect-ratio: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-15%20-15%20130%20130'><g fill='%23fff'><ellipse cx='50' cy='16' rx='12' ry='26'/><ellipse cx='84' cy='36' rx='12' ry='26' transform='rotate(72 84 36)'/><ellipse cx='72' cy='78' rx='12' ry='26' transform='rotate(144 72 78)'/><ellipse cx='28' cy='78' rx='12' ry='26' transform='rotate(216 28 78)'/><ellipse cx='16' cy='36' rx='12' ry='26' transform='rotate(288 16 36)'/></g><circle cx='50' cy='50' r='14' fill='%23f6b21a'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.95;
  filter: drop-shadow(0 8px 12px rgba(230, 197, 171, 0.35));
  transform: rotate(var(--rot, 0deg));
}

.daisy.d1 {
  --size: 110px;
  --rot: -10deg;
  left: 1%;
  top: 5px;
}
.daisy.d2 {
  --size: 75px;
  --rot: 8deg;
  left: 13%;
  top: 125px;
}
.daisy.d3 {
  --size: 90px;
  --rot: -6deg;
  left: 32%;
  top: 10px;
}
.daisy.d4 {
  --size: 70px;
  --rot: 12deg;
  left: 48%;
  top: 140px;
}
.daisy.d5 {
  --size: 105px;
  --rot: -14deg;
  left: 66%;
  top: 0px;
}
.daisy.d6 {
  --size: 85px;
  --rot: 6deg;
  left: 81%;
  top: 110px;
}
.daisy.d7 {
  --size: 95px;
  --rot: -8deg;
  left: 22%;
  top: 35px;
}
.daisy.d8 {
  --size: 65px;
  --rot: 15deg;
  left: 56%;
  top: 65px;
}
.daisy.d9 {
  --size: 80px;
  --rot: -12deg;
  left: 8%;
  top: 180px;
}
.daisy.d10 {
  --size: 100px;
  --rot: 10deg;
  left: 89%;
  top: 25px;
}

.app {
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  position: relative;
  z-index: 10;
}

.hero {
  text-align: left;
  margin-bottom: 32px;
}

.prize-banner {
  display: inline-block;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.hero h1 {
  font-size: clamp(2rem, 2vw + 2rem, 3.2rem);
  margin: 12px 0 8px;
}

.hero p {
  font-size: 1.1rem;
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun), var(--peach));
  font-size: 0.95rem;
  letter-spacing: 0.4px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 24px;
}

.card {
  background: var(--card);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.subtle {
  margin-top: 0;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

input[type="text"] {
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(45, 42, 50, 0.1);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 143, 171, 0.25);
}

.primary {
  border: none;
  background: linear-gradient(135deg, var(--coral), var(--berry));
  color: #fff;
  font-size: 1rem;
  padding: 12px 20px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(255, 143, 171, 0.4);
}

.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.primary:hover:not(:disabled) {
  transform: translateY(-2px);
}

.secondary {
  border: none;
  background: linear-gradient(135deg, #f5c68a, #f0b876);
  color: #fff;
  font-size: 1rem;
  padding: 12px 20px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(245, 198, 138, 0.3);
}

.secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.secondary:hover:not(:disabled) {
  transform: translateY(-2px);
}

.note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: rgba(45, 42, 50, 0.7);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress {
  font-size: 0.95rem;
}

.timer {
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.image-wrap {
  margin: 18px 0;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.6);
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-wrap img,
.image-wrap video {
  width: 100%;
  display: block;
}

.media-spinner {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 4px solid rgba(216, 116, 143, 0.2);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.answers {
  display: grid;
  gap: 12px;
  margin: 16px 0 20px;
}

.answer-option {
  border: 2px solid rgba(45, 42, 50, 0.1);
  background: rgba(255, 255, 255, 0.8);
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.answer-option:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 143, 171, 0.6);
}

.answer-option.is-selected {
  border-color: var(--coral);
  background: rgba(255, 205, 219, 0.6);
  box-shadow: 0 12px 18px rgba(255, 143, 171, 0.25);
}

.answer-checkbox-label {
  border: 2px solid rgba(45, 42, 50, 0.1);
  background: rgba(255, 255, 255, 0.8);
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.answer-checkbox-label:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 143, 171, 0.6);
}

.answer-checkbox-label:has(input[type="checkbox"]:checked) {
  border-color: var(--coral);
  background: rgba(255, 205, 219, 0.6);
  box-shadow: 0 12px 18px rgba(255, 143, 171, 0.25);
}

.answer-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--coral);
}

.answer-checkbox-label input[type="checkbox"]:checked + div span,
.answer-checkbox-label input[type="checkbox"]:checked + span {
  color: var(--coral);
  font-weight: 600;
}

.status {
  min-height: 20px;
  font-size: 0.9rem;
  color: rgba(45, 42, 50, 0.7);
  margin-bottom: 12px;
}

.result .score {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.score-meta {
  font-size: 1rem;
  margin-bottom: 16px;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pill {
  background: rgba(255, 214, 165, 0.8);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.leaderboard-item strong {
  font-size: 1rem;
}

.leaderboard-item span {
  font-size: 0.85rem;
  color: rgba(45, 42, 50, 0.7);
}

.is-hidden {
  display: none;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .hero {
    text-align: center;
    margin-top: 100px;
  }

  .daisies {
    height: 220px;
    top: 24px;
  }

  .daisy.d1 {
    --size: 72px;
    left: 2%;
    top: 10px;
  }
  .daisy.d2 {
    --size: 46px;
    left: 18%;
    top: 90px;
  }
  .daisy.d3 {
    --size: 52px;
    left: 38%;
    top: 20px;
  }
  .daisy.d4 {
    --size: 44px;
    left: 56%;
    top: 100px;
  }
  .daisy.d5 {
    --size: 66px;
    left: 74%;
    top: 5px;
  }
  .daisy.d6 {
    --size: 50px;
    left: 88%;
    top: 85px;
  }
  .daisy.d7 {
    display: none;
  }
  .daisy.d8 {
    display: none;
  }
  .daisy.d9 {
    display: none;
  }
  .daisy.d10 {
    display: none;
  }
}
