:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --accent: #f5c518;
  --phone: 430px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: #050505;
}

.feed {
  position: relative;
  width: 100%;
  max-width: var(--phone);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior: none;
  background: #000;
  -webkit-overflow-scrolling: touch;
}

.feed::-webkit-scrollbar {
  display: none;
}

.feed:focus {
  outline: none;
}

.reel {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
}

.reel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.45) 0%,
      transparent 18%,
      transparent 58%,
      rgba(0, 0, 0, 0.78) 100%
    );
}

.top-bar {
  position: absolute;
  top: calc(12px + var(--safe-top));
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.counter {
  font-size: 12px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: 999px;
}

.mute {
  position: absolute;
  right: 14px;
  bottom: calc(108px + var(--safe-bottom));
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
}

.mute svg {
  width: 22px;
  height: 22px;
}

.caption {
  position: absolute;
  left: 16px;
  right: 72px;
  bottom: calc(28px + var(--safe-bottom));
  z-index: 2;
  pointer-events: none;
}

.caption h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.caption p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px;
  max-width: var(--phone);
  margin: 0 auto;
  z-index: 4;
}

.status[hidden] {
  display: none;
}

.status-card {
  max-width: 280px;
}

.status-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.status-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hint {
  position: absolute;
  inset: 0;
  max-width: var(--phone);
  margin: 0 auto;
  display: grid;
  place-items: center;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.18) 50%,
    transparent 100%
  );
}

.hint[hidden] {
  display: none;
}

.hint-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hint-chevron {
  width: 28px;
  height: 28px;
  animation: bounce 1.15s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(6px);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@media (min-width: 720px) {
  .shell {
    background: radial-gradient(circle at top, #1a1a1a, #000 55%);
  }

  .feed,
  .hint,
  .status {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 80px rgba(0, 0, 0, 0.55);
    border-radius: 24px;
  }

  .feed {
    height: min(100dvh, 860px);
    margin: 16px 0;
    overflow: hidden;
    overflow-y: auto;
  }

  .shell {
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feed {
    scroll-behavior: auto;
  }

  .spinner,
  .hint-chevron {
    animation: none;
  }
}
