:root {
  --ink: #050506;
  --paper: #f4efe4;
  --acid: #d7ff32;
  --hot: #ff3bbd;
  --cyan: #2ce9ff;
  --glow: var(--acid);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

body {
  color: var(--paper);
  font-family: "Courier New", Courier, monospace;
}

button, input { font: inherit; }

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 45%, #171522 0, #08080b 42%, #020203 100%);
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,.025) 4px
  );
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 21;
  box-shadow: inset 0 0 140px #000, inset 0 0 28px rgba(0,0,0,.8);
}

.noise {
  position: absolute;
  inset: -50%;
  z-index: 19;
  opacity: .06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  animation: grain .18s steps(2) infinite;
}

.hud {
  position: absolute;
  z-index: 30;
  top: clamp(18px, 3vw, 36px);
  left: clamp(18px, 4vw, 56px);
  right: clamp(18px, 4vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: .16em;
}

.hud p { margin: 0; color: rgba(244,239,228,.52); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 14px var(--hot);
  animation: blink 1.1s steps(1) infinite;
}

.bouncer {
  --x: 10px;
  --y: 10px;
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  width: clamp(170px, 24vw, 310px);
  aspect-ratio: 1 / 1;
  transform: translate3d(var(--x), var(--y), 0);
  will-change: transform;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--glow) 65%, transparent));
}

.meme-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border: clamp(4px, .65vw, 8px) solid var(--glow);
  border-radius: 9%;
  overflow: hidden;
  background: var(--glow);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
  transition: border-color .12s linear, background-color .12s linear;
}

.meme-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.dvd-wordmark {
  position: absolute;
  right: 7%;
  bottom: 5%;
  padding: .2em .48em;
  border-radius: 999px;
  color: #08080a;
  background: var(--glow);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(13px, 2.2vw, 24px);
  font-style: italic;
  letter-spacing: -.05em;
  line-height: 1;
  box-shadow: 0 2px 0 rgba(0,0,0,.35);
}

.coming-soon {
  position: absolute;
  z-index: 30;
  left: clamp(18px, 4vw, 56px);
  bottom: clamp(82px, 11vh, 116px);
  margin: 0;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(34px, 6vw, 82px);
  line-height: .82;
  letter-spacing: -.075em;
  color: var(--glow);
  text-shadow: 0 0 28px color-mix(in srgb, var(--glow) 55%, transparent);
  text-transform: uppercase;
}

.controls {
  position: absolute;
  z-index: 30;
  right: clamp(18px, 4vw, 56px);
  bottom: clamp(28px, 4vw, 54px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 10px 9px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  background: rgba(12,12,16,.72);
  backdrop-filter: blur(16px);
}

.controls button {
  border: 0;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .1em;
  font-weight: 700;
}

#playButton {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 7px 9px;
}

#fullscreenButton {
  padding: 8px 12px;
  border-radius: 999px;
  color: #070708;
  background: var(--paper);
}

.controls label {
  color: rgba(244,239,228,.5);
  font-size: 9px;
  letter-spacing: .14em;
}

input[type="range"] {
  width: clamp(72px, 11vw, 130px);
  accent-color: var(--glow);
  cursor: ew-resize;
}

.hint {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: 18px;
  margin: 0;
  transform: translateX(-50%);
  color: rgba(244,239,228,.28);
  font-size: 8px;
  letter-spacing: .14em;
  white-space: nowrap;
}

.screen.impact {
  animation: flash .16s ease-out;
}

button:focus-visible, input:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 4px;
}

@keyframes grain {
  0% { transform: translate(0,0); }
  25% { transform: translate(3%,-2%); }
  50% { transform: translate(-2%,3%); }
  75% { transform: translate(2%,2%); }
  100% { transform: translate(-3%,-3%); }
}

@keyframes blink { 50% { opacity: .28; } }

@keyframes flash {
  0% { background-color: color-mix(in srgb, var(--glow) 18%, #000); }
  100% { background-color: transparent; }
}

@media (max-width: 650px) {
  .hud p, #fullscreenButton, .hint { display: none; }
  .controls {
    right: 16px;
    left: 16px;
    justify-content: center;
  }
  .coming-soon {
    bottom: 96px;
    font-size: clamp(32px, 12vw, 54px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .noise, .live-dot { animation: none; }
}
