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

body {
  margin: 0;
  font-family: "Manrope", "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
  background: var(--bg);
  color: #f8fafc;
  min-height: 100vh;
  overflow-x: hidden;
}

.background-gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(120% 80% at 20% 20%, rgba(255, 189, 189, 0.28), transparent 60%),
              radial-gradient(120% 90% at 80% 10%, rgba(224, 58, 58, 0.28), transparent 55%),
              radial-gradient(80% 70% at 50% 70%, rgba(255, 209, 102, 0.18), transparent 65%),
              linear-gradient(135deg, rgba(12, 14, 35, 0.9), rgba(34, 9, 27, 0.92));
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 10px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  width: 108px;
  height: 108px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), 0 0 0 6px rgba(224, 58, 58, 0.08);
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.logo-text h1 {
  margin: 4px 0 4px;
  font-size: 34px;
  letter-spacing: -0.5px;
}

.tagline,
.eyebrow {
  color: rgba(248, 250, 252, 0.8);
  margin: 0;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.tagline {
  font-size: 15px;
}

.cta {
  margin-left: auto;
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.85);
  font-size: 14px;
  line-height: 1.5;
}

.game-card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  padding: 26px 26px 32px;
  overflow: hidden;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(180% 120% at 100% 0%, rgba(224, 58, 58, 0.12), transparent 52%),
              radial-gradient(120% 120% at 0% 100%, rgba(255, 209, 102, 0.1), transparent 55%);
  mix-blend-mode: screen;
}

.game-card {
  margin-bottom: 24px;
  display: grid;
  gap: 16px;
}

.gift-peek {
  margin-bottom: 18px;
}

.gift-visual {
  position: relative;
  --cover: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
  min-height: 240px;
}

.gift-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.gift-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  padding: 0;
  display: block;
  cursor: pointer;
}

.gift-photo-final {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  margin-bottom: 14px;
}

.gift-photo-final img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.gift-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(255, 209, 102, 0.32) 0%, rgba(255, 209, 102, 0.05) 50%, rgba(255, 209, 102, 0.32) 100%),
    linear-gradient(135deg, rgba(224, 58, 58, 0.9), rgba(160, 30, 50, 0.9));
  display: grid;
  place-items: center;
}

.gift-bow {
  width: 90%;
  height: 60%;
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.gift-bow::before,
.gift-bow::after {
  content: "";
  position: absolute;
  background: rgba(255, 209, 102, 0.92);
}

.gift-bow::before {
  width: 10px;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
}

.gift-bow::after {
  height: 10px;
  inset: 0;
  top: 50%;
  transform: translateY(-50%);
}

.gift-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(12, 14, 35, 1), rgba(34, 9, 27, 0.96));
  display: grid;
  place-items: center;
  z-index: 2;
  overflow: hidden;
  transition: opacity 240ms ease;
}

.gift-tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--gift-cols, 5), 1fr);
  grid-template-rows: repeat(var(--gift-rows, 5), 1fr);
  gap: 0;
  padding: 0;
  z-index: 1;
}

.gift-tile {
  background:
    linear-gradient(135deg, rgba(224, 58, 58, 1), rgba(160, 30, 50, 1)),
    radial-gradient(circle at 20% 20%, rgba(255, 209, 102, 0.35), transparent 55%);
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: opacity 260ms ease, transform 260ms ease;
}

.gift-tile.revealed {
  opacity: 0;
  transform: scale(0.9);
}

.gift-cover.open {
  opacity: 0;
  pointer-events: none;
}

.cover-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 20% 20%, rgba(255, 209, 102, 0.16), transparent 60%),
              radial-gradient(120% 120% at 80% 10%, rgba(224, 58, 58, 0.18), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.8;
}

.cover-label {
  position: relative;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(248, 250, 252, 0.9);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(248, 250, 252, 0.86);
  margin: 0 0 6px;
}

.pill::before {
  content: "*";
  color: var(--accent);
  font-size: 13px;
}

.label {
  margin: 0;
  font-size: 16px;
  color: rgba(248, 250, 252, 0.9);
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.label-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.sub {
  margin: 0;
  color: rgba(248, 250, 252, 0.76);
  font-size: 15px;
}

.question {
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 700;
  color: #fefefe;
  line-height: 1.3;
}

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

.option {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  color: #fefefe;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease, background 160ms ease, box-shadow 160ms ease;
}

.option:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.option.selected {
  border-color: var(--accent);
  background: rgba(224, 58, 58, 0.2);
  box-shadow: 0 14px 32px rgba(224, 58, 58, 0.3);
}

.quiz-footer {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(224, 58, 58, 0.12);
}

.quiz-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.validate-btn,
.next-btn {
  margin-left: auto;
  background: linear-gradient(145deg, var(--accent), #ffd166);
  color: #0b1220;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.validate-btn:disabled,
.next-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.validate-btn:not(:disabled):hover,
.next-btn:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.quiz-feedback {
  margin: 0;
  font-weight: 700;
  color: #fefefe;
}

.quiz-feedback.ok {
  color: #ffd166;
}

.quiz-feedback.bad {
  color: #f6a0a0;
}

.lives {
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fefefe;
  font-size: 13px;
}

.hidden {
  display: none;
}

.floaters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.floater {
  position: absolute;
  opacity: 0;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
  animation: rise linear forwards, twinkle ease-in-out forwards;
  pointer-events: none;
  transition: transform 180ms ease, filter 180ms ease;
}

.floater.photo {
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 220ms ease, transform 240ms ease;
  pointer-events: none;
}

.lightbox.hidden {
  display: none;
}

.lightbox.open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  opacity: 0.8;
  transition: opacity 220ms ease;
}

.lightbox.open .lightbox-backdrop {
  opacity: 1;
}

.lightbox-card {
  position: relative;
  max-width: min(90vw, 780px);
  max-height: 90vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 16px 16px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(10px) scale(0.97);
  opacity: 0;
  transition: transform 260ms ease, opacity 220ms ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lightbox.open .lightbox-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lightbox img {
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  border-radius: 14px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  background: #0b1220;
}

.lightbox-caption {
  margin: 12px 8px 4px;
  font-size: 16px;
  color: rgba(248, 250, 252, 0.92);
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
}

@keyframes rise {
  0% { transform: translateY(20px) scale(0.9); opacity: 0; }
  20% { opacity: 0.9; }
  80% { opacity: 0.8; }
  100% { transform: translateY(-120vh) scale(1.05); opacity: 0; }
}

@keyframes twinkle {
  0% { filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3)) brightness(1); }
  50% { filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4)) brightness(1.1); }
  100% { filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35)) brightness(1); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta {
    margin-left: 0;
  }

  .gift-heading h2 {
    font-size: 22px;
  }
}
