/* ==========================================================================
   Reels page: the public feed from the in-game phone, one reel at a time
   ========================================================================== */

.feed-page {
  --nav-h: 72px;
  /* The page scrolls reel by reel. The site's scroll-padding would offset every stop. */
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
}

.nav--solid {
  background: rgba(11, 10, 9, .96);
  border-bottom-color: var(--line);
}

/* ---------- Game picker: pinned over the top of the feed ---------- */

.feed__games {
  position: fixed;
  top: calc(var(--nav-h) + 14px);
  left: 50%;
  z-index: 45;
  display: flex;
  gap: 4px;
  max-width: calc(100% - 32px);
  padding: 4px;
  overflow-x: auto;
  border: 1px solid rgba(247, 242, 232, .12);
  border-radius: 999px;
  background: rgba(11, 10, 9, .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  scrollbar-width: none;
}
.feed__games::-webkit-scrollbar { display: none; }
.feed__game {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #d6cfc3;
  font: 700 .68rem/1.2 var(--font-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.feed__game:hover { color: var(--cream); }
.feed__game[aria-selected="true"] { background: var(--fuse); color: var(--ink); }

/* ---------- The feed ---------- */

.feed__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feed__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100vh;
  height: 100svh;
  padding: calc(var(--nav-h) + 12px) 16px 16px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.clip {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  isolation: isolate;
  cursor: pointer;
}
.clip__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.clip--ghost {
  cursor: default;
  background: linear-gradient(110deg, var(--ink-2) 30%, var(--ink-3) 50%, var(--ink-2) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }

/* Shown while a reel is paused - tap it again to carry on. */
.clip__paused {
  position: absolute;
  left: 50%; top: 50%;
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 50%;
  background: rgba(11, 10, 9, .55);
  opacity: 0;
  transform: scale(.8);
  pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease-out);
}
.clip__paused svg { width: 34px; height: 34px; margin-left: 4px; fill: var(--cream); }
.clip.is-paused .clip__paused { opacity: 1; transform: none; }

.clip__info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 70px 76px 18px 18px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .78));
  pointer-events: none;
}
.clip__game {
  margin: 0 0 2px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fuse-hot);
}
.clip__author {
  margin: 0;
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.clip__meta { margin: 0; font-size: .82rem; color: #d6cfc3; }

/* Beside the reel on a wide screen, over its right edge on a phone. */
.clip__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  align-self: flex-end;
  padding-bottom: 18px;
}
.clip__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: .75rem;
  font-weight: 700;
}

.feed__btn {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ink-2);
  color: var(--cream);
  cursor: pointer;
  transition: border-color .2s, background-color .2s, opacity .2s;
}
.feed__btn:hover:not(:disabled) { border-color: var(--fuse); background: var(--ink-3); }
.feed__btn:disabled { opacity: .3; cursor: default; }
.feed__btn svg,
.clip__stat svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.clip__stat svg { width: 26px; height: 26px; }

.feed__step {
  position: fixed;
  right: clamp(16px, 3vw, 40px);
  top: 50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(-50%);
}

.feed__status {
  position: fixed;
  left: 50%; top: 50%;
  width: min(24rem, calc(100% - 32px));
  margin: 0;
  color: var(--muted);
  text-align: center;
  transform: translate(-50%, -50%);
}

.feed__toast {
  position: fixed;
  left: 50%; bottom: 28px;
  z-index: 60;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 10px 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fuse);
  color: var(--ink);
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease-out);
}
.feed__toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* Phones: each reel fills the screen under the nav; swipe instead of buttons. */
@media (max-width: 640px) {
  .feed-page { --nav-h: 68px; }
  .feed__games { top: calc(var(--nav-h) + 10px); gap: 0; }
  .feed__game { padding: 7px 10px; font-size: .62rem; letter-spacing: .1em; }
  .feed__item { padding: var(--nav-h) 0 0; }
  .clip { width: 100%; border-radius: 0; }
  .clip__info { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .clip__actions {
    position: absolute;
    right: 10px;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
  }
  .clip__actions .feed__btn { background: rgba(20, 18, 16, .6); }
  .feed__step { display: none; }
}
@media (max-width: 360px) {
  .feed__game { padding: 7px 8px; letter-spacing: .05em; }
}
