/* =========================================================================
   The drop stage (#dropStage): canvas + overlay UI. Everything is scoped to
   .drop-stage; tokens are --ds-* so nothing leaks into the page.
   Look: the Creator Merch Shelf's liquid glass, EVADE-flavoured (Cola Run's
   teal glow, gold accents).
   ========================================================================= */
.drop-stage {
  --ds-gold: #f6c344;
  --ds-gold-2: #ffe08a;
  --ds-cyan: #36e6ff;
  --ds-fg: #f4f6f8;
  --ds-muted: #a9b6bd;
  --ds-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ds-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ds-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ds-glass: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.05) 38%,
      rgba(255, 255, 255, 0.02) 70%,
      rgba(255, 255, 255, 0.045) 100%
    ),
    rgba(10, 18, 24, 0.55);
  --ds-blur: blur(20px) saturate(170%) brightness(0.75);
  --ds-edges: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.06)
    rgba(255, 255, 255, 0.16);
  --ds-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 18px 44px rgba(0, 4, 8, 0.42), 0 2px 6px rgba(0, 4, 8, 0.24);
  --ds-pad: 16px;

  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 80% at 50% 38%, #1b2a33 0%, #0c141a 55%, #05080b 100%);
  color: var(--ds-fg);
  font-family: var(--ds-sans);
  border-radius: inherit;
  -webkit-tap-highlight-color: transparent;
}
.drop-stage *,
.drop-stage *::before,
.drop-stage *::after {
  box-sizing: border-box;
}
.drop-stage [hidden] {
  display: none !important;
}
.drop-stage .ds-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* vertical swipes scroll the page; horizontal drags look around */
  touch-action: pan-y;
  outline: none;
}

/* ---- poster / loader / fallback ------------------------------------------ */
.ds-poster {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 80% at 50% 38%, #1b2a33 0%, #0c141a 55%, #05080b 100%);
  transition: opacity 0.8s var(--ds-ease);
}
.ds-poster.out {
  opacity: 0;
  pointer-events: none;
}
.ds-poster-grid {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: 0;
  height: 42%;
  background-image: linear-gradient(rgba(54, 230, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 230, 255, 0.28) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(380px) rotateX(58deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 10%, transparent 95%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 95%);
}
.ds-poster-glow {
  position: absolute;
  width: min(70vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 230, 255, 0.28), rgba(54, 230, 255, 0) 65%);
  filter: blur(6px);
}
.ds-poster-art {
  position: relative;
  width: min(62%, 420px);
  aspect-ratio: 1.25;
  margin-top: -6%;
}
.ds-poster-ring {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -4%;
  height: 18%;
  border-radius: 50%;
  border: 3px solid rgba(140, 245, 255, 0.9);
  box-shadow: 0 0 22px rgba(54, 230, 255, 0.8), inset 0 0 18px rgba(54, 230, 255, 0.5);
}
.ds-poster-bobo,
.ds-poster-can {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 0 16px rgba(54, 230, 255, 0.45)) drop-shadow(0 18px 26px rgba(0, 0, 0, 0.45));
}
.ds-poster-bobo {
  left: 6%;
  bottom: 2%;
  width: 54%;
  animation: ds-bob 3.2s ease-in-out infinite;
}
.ds-poster-can {
  right: 6%;
  bottom: 14%;
  width: 36%;
  transform: rotate(8deg);
  animation: ds-bob 3.6s ease-in-out -1.2s infinite;
}
@keyframes ds-bob {
  50% {
    translate: 0 -8px;
  }
}
.ds-loader {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: min(220px, 50%);
  height: 3px;
  translate: -50% 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.ds-loader span {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: linear-gradient(90deg, var(--ds-cyan), var(--ds-gold));
  transition: width 0.4s var(--ds-ease);
}
.ds-poster.is-fallback {
  grid-template-rows: auto auto;
  align-content: center;
  padding: 24px var(--ds-pad) 28px;
}
.ds-poster.is-fallback .ds-poster-art {
  margin-top: 0;
}
.ds-poster.is-fallback .ds-pill-soon {
  white-space: normal;
  text-align: center;
  max-width: 100%;
  line-height: 1.5;
}
.ds-poster-labels {
  position: relative;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 28px;
}
.ds-poster-name {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 600;
}
.ds-poster-line {
  margin: 0;
  color: var(--ds-muted);
  font-size: 14px;
}

/* ---- overlay ------------------------------------------------------------- */
.ds-ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.ds-ui > * {
  pointer-events: auto;
}
.drop-stage:not(.is-ready) .ds-ui {
  opacity: 0;
  visibility: hidden;
}
.drop-stage.is-ready .ds-ui {
  animation: ds-in 0.6s var(--ds-ease) both;
}
@keyframes ds-in {
  from {
    opacity: 0;
  }
}
.drop-stage button {
  font: inherit;
  color: inherit;
}
.drop-stage :focus-visible {
  outline: 2px solid var(--ds-gold);
  outline-offset: 2px;
}

.ds-glass,
.ds-bar,
.ds-caption,
.ds-hint,
.ds-toast {
  background: var(--ds-glass);
  backdrop-filter: var(--ds-blur);
  -webkit-backdrop-filter: var(--ds-blur);
  border: 1px solid;
  border-color: var(--ds-edges);
  box-shadow: var(--ds-shadow);
}

/* the selector bar */
.ds-bar {
  position: absolute;
  left: 50%;
  bottom: 14px;
  translate: -50% 0;
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 8px;
  border-radius: 22px;
  max-width: calc(100% - var(--ds-pad) * 2);
}
.ds-group {
  display: grid;
  gap: 5px;
  align-content: start;
}
.ds-group-soon {
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.ds-group-label {
  margin: 0;
  padding: 0 4px;
  font-family: var(--ds-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ds-muted);
  white-space: nowrap;
}
.ds-group-live .ds-group-label {
  color: var(--ds-gold);
}
.ds-group-label span {
  opacity: 0.7;
}
.ds-row {
  display: flex;
  gap: 4px;
}
.ds-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px 6px 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s var(--ds-ease), border-color 0.25s var(--ds-ease), transform 0.2s;
}
.ds-opt:hover {
  background: rgba(255, 255, 255, 0.07);
}
.ds-opt:active {
  transform: scale(0.97);
}
.ds-opt-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}
.ds-opt svg,
.ds-hint svg,
.ds-close svg,
.ds-cap-cta svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ds-opt-label {
  font-size: 14px;
  font-weight: 500;
}
.ds-opt-soon {
  color: #cfe3e8;
}
.ds-opt-soon .ds-opt-label {
  opacity: 0.85;
}
.ds-opt-live {
  padding-right: 14px;
  background: linear-gradient(135deg, rgba(246, 195, 68, 0.22), rgba(54, 230, 255, 0.12));
  border-color: rgba(246, 195, 68, 0.45);
}
.ds-opt-live .ds-opt-icon {
  background: rgba(246, 195, 68, 0.2);
  color: var(--ds-gold-2);
}
.ds-opt-live .ds-opt-label {
  font-weight: 600;
}
.ds-opt-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--ds-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ds-gold);
}
.ds-opt[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.ds-opt-live[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(246, 195, 68, 0.38), rgba(54, 230, 255, 0.18));
  border-color: var(--ds-gold);
}
.ds-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: ds-pulse 2s ease-out infinite;
}
@keyframes ds-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(246, 195, 68, 0.6);
  }
  100% {
    box-shadow: 0 0 0 7px rgba(246, 195, 68, 0);
  }
}

/* pills */
.ds-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--ds-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ds-pill-live {
  color: var(--ds-gold);
  background: rgba(246, 195, 68, 0.12);
  border: 1px solid rgba(246, 195, 68, 0.4);
}
.ds-pill-soon {
  color: #a6f3ff;
  background: rgba(54, 230, 255, 0.08);
  border: 1px solid rgba(54, 230, 255, 0.3);
}

/* caption */
.ds-caption {
  position: absolute;
  left: var(--ds-pad);
  bottom: 104px;
  width: min(380px, calc(100% - var(--ds-pad) * 2));
  padding: 16px 48px 16px 18px;
  border-radius: 20px;
  display: grid;
  justify-items: start;
  gap: 6px;
}
.ds-caption.in {
  animation: ds-cap 0.5s var(--ds-ease) both;
}
@keyframes ds-cap {
  from {
    opacity: 0;
    translate: 0 10px;
  }
}
.ds-cap-name {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ds-cap-line {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: #dbe8ec;
}
.ds-cap-meta {
  margin: 0;
  font-family: var(--ds-mono);
  font-size: 11px;
  color: var(--ds-muted);
}
.ds-cap-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #11100a;
  background: linear-gradient(135deg, var(--ds-gold-2), var(--ds-gold));
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.ds-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.ds-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Bobo hint + toast */
.ds-hint {
  position: absolute;
  top: 14px;
  right: var(--ds-pad);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: #ffe9b0;
  cursor: pointer;
  animation: ds-in 0.6s var(--ds-ease) both;
}
.ds-hint svg {
  fill: currentColor;
  stroke: none;
  width: 16px;
  height: 16px;
}
.drop-stage.is-focus .ds-hint {
  opacity: 0;
  pointer-events: none;
}
.ds-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  translate: -50% -10px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ds-ease), translate 0.3s var(--ds-ease);
}
.ds-toast:empty {
  display: none;
}
.ds-toast.on {
  opacity: 1;
  translate: -50% 0;
}

/* ---- phones / narrow -------------------------------------------------------- */
@media (max-width: 640px) {
  .drop-stage {
    --ds-pad: 10px;
  }
  .ds-bar {
    left: var(--ds-pad);
    right: var(--ds-pad);
    translate: none;
    max-width: none;
    padding: 7px;
    gap: 4px;
    border-radius: 20px;
  }
  .ds-group-soon {
    flex: 1;
    padding-left: 6px;
  }
  .ds-group-label {
    font-size: 9px;
    letter-spacing: 0.08em;
  }
  .ds-group-label span {
    display: none;
  }
  .ds-row {
    gap: 2px;
  }
  .ds-group-soon .ds-row {
    justify-content: space-between;
  }
  .ds-opt {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 56px;
    padding: 5px 3px 4px;
    min-width: 0;
  }
  .ds-group-soon .ds-opt {
    flex: 1;
  }
  .ds-opt-live {
    padding: 5px 9px 4px;
  }
  .ds-opt-icon {
    width: 28px;
    height: 26px;
    border-radius: 9px;
  }
  .ds-opt-label {
    font-size: 11px;
  }
  .ds-opt-live .ds-opt-label {
    display: none;
  }
  .ds-opt-tag {
    font-size: 9px;
    gap: 4px;
  }
  .ds-caption {
    bottom: 114px;
    left: var(--ds-pad);
    right: var(--ds-pad);
    width: auto;
    padding: 13px 46px 13px 15px;
    border-radius: 18px;
    gap: 4px;
  }
  .ds-cap-name {
    font-size: 18px;
  }
  .ds-cap-line {
    font-size: 14px;
  }
  .ds-cap-meta {
    display: none;
  }
  .ds-cap-cta {
    margin-top: 4px;
    padding: 7px 12px;
    font-size: 13px;
  }
  .ds-hint {
    top: 10px;
    font-size: 12px;
    padding: 7px 11px 7px 9px;
  }
  .ds-toast {
    top: 10px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drop-stage *,
  .drop-stage *::before,
  .drop-stage *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
