* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --vh: 100dvh; }

html, body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: -apple-system, system-ui, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

#feed {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#feed::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* subtle loading shimmer before a clip is ready */
.slide.loading::after {
  content: "";
  position: absolute;
  width: 42px; height: 42px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* paused overlay (tap to resume) */
.slide.paused::before {
  content: "▶";
  position: absolute;
  font-size: 64px;
  color: rgba(255,255,255,.85);
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  pointer-events: none;
}

.btn {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  z-index: 10;
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

#hint {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  font-size: 14px;
  font-weight: 600;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
#hint.hidden { display: none; }

/* clip failed to load — don't hang on the spinner */
.slide.error::after {
  content: "couldn't load — swipe on";
  position: absolute;
  color: rgba(255,255,255,.7);
  font-size: 15px;
}

/* welcome splash */
#splash {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #ff5a91, #b0407a);
  transition: opacity .4s ease;
}
#splash.gone { opacity: 0; pointer-events: none; }
.splash-inner { text-align: center; padding: 24px; }
.splash-mark {
  width: 92px; height: 92px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 26px; background: rgba(255,255,255,.16);
  font-size: 46px; font-weight: 700;
}
.splash-inner h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.splash-inner p { margin-top: 8px; font-size: 15px; opacity: .9; }
#enter {
  margin-top: 28px; padding: 14px 34px;
  border: none; border-radius: 999px;
  background: #fff; color: #b0407a;
  font-size: 16px; font-weight: 700; cursor: pointer;
}

/* desktop / landscape: frame the feed in a phone-width column on a dark backdrop */
@media (min-width: 620px) and (min-aspect-ratio: 3/4) {
  body { background: #0c0c0e; }
  #feed {
    width: min(430px, 46vh);
    height: 100dvh;
    margin: 0 auto;
    box-shadow: 0 0 60px rgba(0,0,0,.6);
  }
  .slide { width: 100%; }
  .btn { right: calc(50% - min(215px, 23vh) + 14px); }
}
