/* GIF feed (/feed) and the homepage "Hot this week" strip. */

/* ---------- homepage strip ---------- */
.hc-hot { float: left; width: 100%; margin-bottom: 20px; }
.hc-hot .home-head .hc-hot-go {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 6px 16px;
  border-radius: 999px;
  background-image: linear-gradient(to right, #B75CD5 0%, #D662C4 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}
.hc-hot .home-head .hc-hot-go:hover { color: #fff; filter: brightness(1.1); }
.hc-hot-row {
  clear: both;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.hc-hot-row::-webkit-scrollbar { display: none; }
.hc-hot-tile {
  position: relative;
  flex: 0 0 42%;
  aspect-ratio: 9 / 16;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  background: #1f2335;
  border: 1px solid rgba(183, 92, 213, 0.18);
}
@supports not (aspect-ratio: 1) { .hc-hot-tile { height: 0; padding-top: 74.6%; } }
@media (min-width: 576px) { .hc-hot-tile { flex-basis: 30%; } }
@media (min-width: 768px) { .hc-hot-tile { flex-basis: 19%; } }
@media (min-width: 1200px) { .hc-hot-tile { flex-basis: calc((100% - 7 * 12px) / 8); } }
.hc-hot-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.hc-hot-tile:hover img { transform: scale(1.05); }
.hc-hot-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent 55%);
}
.hc-hot-play {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hc-hot-play svg { width: 12px; height: 12px; fill: #fff; margin-left: 2px; }
.hc-hot-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- feed page ---------- */
:root { --swipe-top: 72px; }
@media only screen and (min-width: 992px) { :root { --swipe-top: 90px; } }

/* The page itself never scrolls (only the feed does), so mobile browsers keep
   their address bar still and the header stays put. */
html.swipe-page, html.swipe-page body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.swipe-page body { position: fixed; inset: 0; width: 100%; }
html.swipe-page body > footer { display: none; }

#swipe-tabs {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--swipe-top);
  height: 44px;
  z-index: 30;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 28px;
  background: #11131d;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.swipe-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 0 4px;
  color: #8a8fa8;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.swipe-tab:hover { color: #fff; }
.swipe-tab:focus:not(:focus-visible) { outline: none; }
.swipe-tab.is-on { color: #fff; border-bottom-color: #D662C4; }

#swipe-feed {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--swipe-top) + 44px);
  bottom: 0;
  z-index: 10;
  background: #000;
  color: #fff;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
#swipe-feed::-webkit-scrollbar { display: none; }

.swipe-slide {
  position: relative;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #000;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  user-select: none;
}
.swipe-backdrop {
  position: absolute;
  inset: -12%;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  filter: blur(48px) saturate(1.6) brightness(.55);
  transform: translateZ(0);
}
.swipe-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.swipe-frame { position: relative; width: 100%; height: 100%; }
/* On desktop the frame takes the clip's own shape, so widescreen clips stay
   widescreen and the blurred colours fill the rest. */
@media (min-width: 768px) {
  .swipe-frame.has-ratio { width: auto; max-width: 100%; aspect-ratio: var(--swipe-ratio); }
}
.swipe-holder, .swipe-holder iframe { width: 100%; height: 100%; border: 0; display: block; }
.swipe-poster {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
/* On touch screens, catches swipes over the player so the feed still scrolls;
   a tap lifts it to reach the player's controls. With a mouse the wheel,
   arrow buttons and keys move the feed, so the player stays clickable. */
.swipe-catch { position: absolute; left: 0; right: 0; top: 0; bottom: 56px; }
@media (hover: hover) and (pointer: fine) { .swipe-catch { display: none; } }

.swipe-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, .7);
}
.swipe-info { flex: 1; min-width: 0; }
.swipe-title, .swipe-meta { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swipe-title { font-size: 14px; font-weight: 700; }
.swipe-meta { font-size: 12px; color: #9ca3af; }
.swipe-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.swipe-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.swipe-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.swipe-ad { align-items: center; justify-content: center; gap: 16px; }
.swipe-ad-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6b7280; }
.swipe-ad-box { width: 300px; height: 250px; border-radius: 10px; overflow: hidden; background: #1f2335; }
.swipe-ad-box iframe { display: block; border: 0; }
.swipe-ad-note { margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 14px; font-weight: 700; }

#swipe-nav {
  display: none;
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: 30;
  transform: translateY(-50%);
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 768px) { #swipe-nav { display: flex; } }
#swipe-nav button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
}
#swipe-nav button:hover { background: rgba(255, 255, 255, .2); }
#swipe-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#swipe-empty {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--swipe-top) + 44px);
  bottom: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 32px;
  text-align: center;
  color: #fff;
}
#swipe-empty.is-on { display: flex; }
#swipe-empty p { margin: 0; color: #9ca3af; }
#swipe-empty a { padding: 8px 18px; border-radius: 999px; background-image: linear-gradient(to right, #B75CD5 0%, #D662C4 100%); color: #fff; font-weight: 700; text-decoration: none; }

.swipe-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 50;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .85);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
