@import "/shared/base.css";

:root {
  color-scheme: dark;
  --red: #ff2a2a;
  --green: #39ff14;
  --gold: #ffe14a;
  --ice: #9ad7ff;
  --orange: #ff8a1e;
}

body {
  min-height: 100vh;
  background: #000;
  color: #fff;
  font-family: Nunito, "Trebuchet MS", sans-serif;
}

.sprite {
  position: absolute;
}

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

.tube {
  position: absolute;
  width: 64px;
  height: 86px;
  overflow: visible;
}

.tube .halo,
.tube .core {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tube .halo {
  stroke: var(--neon);
  stroke-width: 5.5;
  filter:
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 0 2px var(--neon))
    drop-shadow(0 0 6px var(--neon))
    drop-shadow(0 0 12px var(--neon));
}

.tube .core {
  stroke: #fff;
  stroke-width: 1.6;
}

.red { --neon: var(--red); }
.green { --neon: var(--green); }
.gold { --neon: var(--gold); }
.ice { --neon: var(--ice); }
.orange { --neon: var(--orange); }

.a1 { top: -6px; left: -4px; }
.a2 { top: 8px; left: 18%; width: 52px; height: 70px; }
.a3 { top: -8px; left: 40%; }
.a4 { top: 10px; left: 64%; width: 52px; height: 70px; }
.a5 { top: -4px; right: -6px; }
.s1 { top: 118px; left: -30px; }
.s2 { top: 248px; left: -32px; }
.s3 { top: 390px; left: -30px; }
.s4 { top: 540px; left: -32px; }
.s5 { top: 690px; left: -30px; }
.r1 { top: 150px; right: -32px; }
.r2 { top: 290px; right: -30px; }
.r3 { top: 440px; right: -32px; }
.r4 { top: 590px; right: -30px; }
.r5 { top: 730px; right: -28px; }
.b1 { bottom: 0; left: -22px; }
.b2 { display: none; }
.b3 { bottom: 0; right: -22px; }

.flicker {
  animation: tube-flicker 6.8s linear infinite;
}

.s3 { animation-delay: 1.4s; }
.r2 { animation-delay: 3.1s; }

@keyframes tube-flicker {
  0%, 16%, 19%, 22%, 62%, 64%, 100% { opacity: 1; }
  17%, 21%, 63% { opacity: 0.45; }
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 72px));
}

.hero {
  text-align: center;
  padding-top: 78px;
}

h1 {
  margin: 0;
  font-family: Yellowtail, cursive;
  font-weight: 400;
  font-size: clamp(2.45rem, 11vw, 4.6rem);
  line-height: 0.95;
  text-wrap: balance;
  color: #fff;
  text-shadow:
    0 0 1px #fff,
    0 0 4px #fff,
    0 0 10px var(--red),
    0 0 20px var(--red),
    0 0 34px var(--green),
    0 0 48px var(--red);
}

.toolbar {
  justify-content: center;
}

.sound-toggle,
.owner-open,
.retry,
.claim {
  background: #000;
  color: #fff;
  border: 2px solid var(--green);
  box-shadow:
    0 0 2px #fff,
    0 0 8px var(--green),
    0 0 16px var(--green);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.owner-open {
  border-color: var(--red);
  box-shadow:
    0 0 2px #fff,
    0 0 8px var(--red),
    0 0 16px var(--red);
}

.banner,
.empty {
  background: #000;
  border: 2px solid var(--gold);
  box-shadow:
    0 0 2px #fff,
    0 0 10px var(--gold),
    inset 0 0 10px rgba(255, 225, 74, 0.25);
}

.gift {
  padding: 14px;
  background: #000;
  border: 3px solid var(--red);
  border-radius: 16px;
  box-shadow:
    0 0 2px #fff,
    0 0 6px var(--red),
    0 0 14px var(--red),
    0 0 28px var(--red),
    inset 0 0 2px #fff,
    inset 0 0 14px rgba(255, 42, 42, 0.4);
  cursor: pointer;
}

.gift:nth-child(even) {
  border-color: var(--green);
  box-shadow:
    0 0 2px #fff,
    0 0 6px var(--green),
    0 0 14px var(--green),
    0 0 28px var(--green),
    inset 0 0 2px #fff,
    inset 0 0 14px rgba(57, 255, 20, 0.28);
}

.gift:nth-child(4) {
  animation: tube-flicker 8.5s linear infinite;
}

.gift.boing {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-2deg) scale(1.03); }
  60% { transform: rotate(2deg) scale(1.04); }
  100% { transform: rotate(0) scale(1); }
}

.kicker {
  display: inline-block;
  padding: 2px 8px;
  border: 2px solid var(--red);
  border-radius: 999px;
  color: #fff;
  background: #000;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 0 2px #fff, 0 0 8px var(--red);
}

.gift[data-priority="nice-to-have"] .kicker {
  border-color: var(--green);
  box-shadow: 0 0 2px #fff, 0 0 8px var(--green);
}

.sample-tag {
  float: right;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 2px #fff, 0 0 8px var(--gold);
}

.name {
  clear: both;
  margin-top: 8px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}

.price {
  margin-top: 6px;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  text-shadow: 0 0 2px #fff, 0 0 8px var(--gold);
}

.note {
  color: #f4f4f4;
}

.preview {
  background: #000;
  border: 2px solid var(--green);
  border-radius: 12px;
  box-shadow:
    0 0 2px #fff,
    0 0 8px var(--green),
    inset 0 0 8px rgba(57, 255, 20, 0.22);
}

.preview-photo.is-fallback {
  background: #000;
  color: #fff;
  box-shadow: inset 0 0 12px var(--red);
}

.site-name,
.preview-flag {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 6px var(--red);
}

.preview-title {
  font-weight: 800;
  line-height: 1.15;
}

.preview-price {
  color: #fff;
  font-weight: 800;
  text-shadow: 0 0 6px var(--green);
}

.claim {
  border-color: var(--green);
  box-shadow: 0 0 2px #fff, 0 0 10px var(--green);
}

.page-footer {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  text-shadow: 0 0 8px var(--gold);
  padding-bottom: 28px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (min-width: 800px) {
  .tube { width: 84px; height: 112px; }
  .b2 { display: block; bottom: -16px; left: 44%; }
  .wrap { width: min(640px, calc(100% - 150px)); }
}
