:root {
  color-scheme: dark;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  background: #000;
}

* {
  box-sizing: border-box;
}

html,
body,
#player {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

#player {
  position: relative;
}

#video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#gift-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 4rem 1.5rem;
  text-align: center;
  background:
    repeating-conic-gradient(#f00 0 10deg, #ff0 10deg 20deg, #0f0 20deg 30deg, #0ff 30deg 40deg, #00f 40deg 50deg, #f0f 50deg 60deg);
  background-size: 180px 180px;
  transition: opacity 300ms ease, visibility 300ms ease;
  animation: cursed-background 2s linear infinite;
}

#gift-screen.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.gift-card {
  width: min(92vw, 30rem);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 12px ridge #ff00e6;
  border-radius: 0;
  color: #0000ff;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  background: #ffff00;
  box-shadow: 15px 15px 0 #00ff00, -15px -15px 0 #ff0000;
  transform: rotate(-1.5deg);
}

.gift-icon {
  font-size: clamp(3.5rem, 14vw, 6rem);
  line-height: 1;
  filter: drop-shadow(8px 8px 0 #00ffff);
  animation: gift-bounce 350ms steps(2) infinite;
}

.eyebrow {
  margin: 1rem 0 0.45rem;
  color: #ff0000;
  font-size: clamp(0.8rem, 3vw, 1.2rem);
  font-weight: 900;
  text-decoration: underline wavy #00a800;
  animation: blink 500ms steps(1) infinite;
}

.gift-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 7vw, 3rem);
  line-height: 0.95;
  text-shadow: 3px 3px #ff0000, 6px 6px #00ff00, 9px 9px #ff00ff;
  animation: hue-spin 700ms linear infinite;
}

.gift-message {
  margin: 1.5rem 0 1.25rem;
  color: #ff0080;
  font-size: 1.15rem;
  font-weight: 900;
  transform: skew(-8deg);
}

#start {
  width: 100%;
  padding: 1rem 1.4rem;
  border: 7px outset #00ffff;
  border-radius: 0;
  color: #fff;
  font: 900 clamp(0.9rem, 3vw, 1.2rem) "Comic Sans MS", cursive;
  cursor: pointer;
  background: linear-gradient(90deg, red, orange, yellow, lime, cyan, blue, magenta, red);
  background-size: 300% 100%;
  text-shadow: 2px 2px #000;
  box-shadow: 0 0 18px 8px #ff00ff;
  animation: rainbow-button 700ms linear infinite, button-shake 180ms steps(2) infinite;
}

#start:hover {
  filter: invert(1);
}

#start:active {
  border-style: inset;
}

.safe-note {
  margin: 1rem 0 0;
  color: #006400;
  font: 900 0.85rem "Comic Sans MS", cursive;
}

.cursed-banner,
.cursed-footer {
  position: absolute;
  left: 50%;
  width: 100%;
  color: #fff;
  font: 900 clamp(1rem, 4vw, 2rem) "Comic Sans MS", cursive;
  text-shadow: 3px 3px #000;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: blink 350ms steps(1) infinite;
}

.cursed-banner {
  top: 0.75rem;
}

.cursed-footer {
  bottom: 0.75rem;
}

#fullscreen {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: none;
  padding: 0.7rem 1rem;
  border: 2px solid #fff;
  border-radius: 0.25rem;
  color: #fff;
  font: 700 0.75rem system-ui, sans-serif;
  letter-spacing: 0.12em;
  cursor: pointer;
  background: rgb(0 0 0 / 70%);
}

#fullscreen.visible {
  display: block;
}

@keyframes gift-bounce {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-0.6rem) rotate(3deg);
  }
}

@keyframes cursed-background {
  to { background-position: 180px 180px; }
}

@keyframes rainbow-button {
  to { background-position: 300% 0; }
}

@keyframes button-shake {
  0% { transform: translate(-3px, 2px) rotate(-1deg); }
  100% { transform: translate(3px, -2px) rotate(1deg); }
}

@keyframes hue-spin {
  to { filter: hue-rotate(360deg); }
}

@keyframes blink {
  50% { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  #gift-screen,
  .gift-icon,
  .eyebrow,
  .gift-card h1,
  #start,
  .cursed-banner,
  .cursed-footer {
    animation: none;
  }
}
