/**
 * Media Engine V2 — Three-column grid layout
 *
 * Design reference: 51xfree_homepage_v2.html (Fintech Clean)
 *   - Pure #0d0d0d shell, #141414 side panels
 *   - Purple gradient #7c3aed → #a855f7 (brand + CTA)
 *   - 180px left-nav | fluid center feed | 200px right panel
 *   - 9:16 vertical video cards with soft purple gradient glow
 *   - Syne (display) + DM Sans (body) type system
 *
 * Fonts are imported here (self-contained, no functions.php changes needed).
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Syne:wght@700;800&display=swap');

:root {
  --vswp-bg: #0d0d0d;
  --vswp-surface: #141414;
  --vswp-surface-2: #1a1a1a;
  --vswp-surface-3: #0f0f0f;
  --vswp-border: #1e1e1e;
  --vswp-text: #fff;
  --vswp-text-dim: #a0a0a0;
  --vswp-text-muted: #555;
  --vswp-text-faint: #444;
  --vswp-accent: #a855f7;
  --vswp-accent-deep: #7c3aed;
  --vswp-accent-soft: #2d1b4e;
  --vswp-accent-bg: #1a0f2e;
  --vswp-grad: linear-gradient(135deg, #7c3aed, #a855f7);
  --vswp-grad-h: linear-gradient(90deg, #7c3aed, #a855f7);

  /* Override legacy --primary/--secondary defined in style.css (red/cyan
     TikTok palette) so any leftover var(--primary) reference in feed.css
     or the legacy modal/comment styles automatically picks up the V2
     purple palette. layout.css loads after style.css, so this wins. */
  --primary: #7c3aed;
  --secondary: #a855f7;
  --primary-dark: #6d28d9;

  /* ─────────────────────────────────────────────
     Type system — modular scale (1.25 ratio).
     Used across layout.css / pages.css / feed.css
     so every page lands on the same 7-step ramp.
     ───────────────────────────────────────────── */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Step  Use                                         px / line-height */
  --vt-display: 36px;  /* hero (author name, page title)             1.1 */
  --vt-h1:      26px;  /* primary heading (Trending in …, For You)   1.2 */
  --vt-h2:      20px;  /* section heading (Comments, Related)        1.3 */
  --vt-h3:      17px;  /* sub-section, sidebar primary, video title  1.35 */
  --vt-body:    15px;  /* nav, paragraphs, default                   1.5 */
  --vt-caption: 13px;  /* card title, creator name, supporting       1.4 */
  --vt-small:   12px;  /* card stats, tabs, dense UI                 1.45 */
  --vt-meta:    11px;  /* uppercase section labels, badges           1.4 */
  --vt-micro:   10px;  /* tertiary meta, age stamps, view counts     1.4 */

  /* Letter spacing presets */
  --vt-tracking-display: -0.02em;
  --vt-tracking-tight:   -0.01em;
  --vt-tracking-wide:     0.06em;   /* uppercase labels */
  --vt-tracking-extra:    0.12em;   /* tiny tracked labels */

  /* Weight presets */
  --vw-display: 800;
  --vw-bold:    700;
  --vw-semi:    600;
  --vw-medium:  500;
  --vw-regular: 400;
}

/* ============================================
   Global shell — pure black, DM Sans everywhere
   ============================================ */
html, body {
  background: var(--vswp-bg) !important;
  color: var(--vswp-text);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* On grid pages, strip the legacy top chrome (header/footer). The left
   nav owns the brand so the WP site-title link can no longer leak a raw
   URL into the page.
   Two-pronged selector — modern browsers use :has(), older ones fall
   through to body class hooks (functions.php adds .is-video-archive
   / .is-video-single via the body_class filter) so the header is hidden
   either way. */
body.is-video-archive .videoswipe-header,
body.is-video-archive .videoswipe-footer,
body.is-video-single .videoswipe-header,
body.is-video-single .videoswipe-footer,
body:has(.videoswipe-layout) .videoswipe-header,
body:has(.videoswipe-layout) .videoswipe-footer { display: none !important; }

body.is-video-archive #content,
body.is-video-archive #page,
body.is-video-single #content,
body.is-video-single #page,
body:has(.videoswipe-layout) #content,
body:has(.videoswipe-layout) #page { margin: 0; padding: 0; }

/* ============================================
   Grid shell — 180 | fluid | 200
   ============================================ */
.videoswipe-layout {
  display: grid;
  /* IRON LAW — 180 fixed | fluid centre | 300 fixed.
     The fluid centre is `minmax(0, 1fr)` so it never overflows or pushes
     the rails; the rails are `px` so they never compress when the viewport
     gets squeezed (e.g. devtools open, partial-screen). */
  grid-template-columns: 180px minmax(0, 1fr) 300px;
  gap: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--vswp-bg);
  color: var(--vswp-text);
  font-family: var(--font-body);
  font-size: 15px;
}

/* Belt-and-braces — guarantee the fluid centre column never shrinks below
   what the cards need. If the centre were allowed to compress past this,
   the auto-fill grid would collapse to a single skinny column. */
.videoswipe-col-left   { min-width: 0; width: 180px; }
.videoswipe-col-right  { min-width: 0; width: 300px; }
.videoswipe-col-center { min-width: 0; }

/* ============================================
   LEFT — sticky nav rail
   ============================================ */
.videoswipe-col-left {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
}

.videoswipe-left-nav {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--vswp-bg); /* same #0d0d0d as the shell — no panel seam */
  padding: 24px 0 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.videoswipe-left-nav::-webkit-scrollbar { width: 3px; }
.videoswipe-left-nav::-webkit-scrollbar-thumb { background: #1c1c1c; border-radius: 2px; }

.videoswipe-brand {
  display: block;
  padding: 0 22px 24px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  background: var(--vswp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 150ms ease;
}
.videoswipe-brand:hover { opacity: 0.85; }

.videoswipe-nav-label {
  padding: 16px 20px 8px;
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--vswp-text-faint);
}

/* style.css line ~330 puts .videoswipe-nav-menu on `display: flex` for the
   legacy top-header nav (horizontal). Force vertical stacking inside the
   left rail with higher specificity so the override wins regardless of
   load order. */
.videoswipe-left-nav .videoswipe-nav-menu,
.videoswipe-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.videoswipe-left-nav .videoswipe-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.videoswipe-left-nav .videoswipe-nav-menu li {
  margin: 0;
  width: 100%;
  list-style: none;
}
.videoswipe-nav-menu li { margin: 0; }

.videoswipe-nav-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  margin: 1px 12px;
  border-radius: 10px;
  color: #707070;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}
.videoswipe-nav-menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.videoswipe-nav-menu .current-menu-item > a,
.videoswipe-nav-menu .current-menu-parent > a,
.videoswipe-nav-menu .current-menu-ancestor > a {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(168, 85, 247, 0.10));
  box-shadow:
    inset 0 0 0 1px rgba(168, 85, 247, 0.22),
    0 4px 18px -8px rgba(124, 58, 237, 0.45);
}

.videoswipe-nav-count {
  font-size: 10px;
  color: var(--vswp-text-muted);
}

/* Inline SVG icons in the left nav inherit currentColor so they fade in
   sync with the text (888 → ccc → fff). */
.videoswipe-nav-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.videoswipe-nav-label-text { flex: 1; }

/* Sign In / Sign Out CTA pinned to the bottom of the left nav */
.videoswipe-nav-footer {
  margin-top: auto;
  padding: 22px 22px 0;
}
.videoswipe-login-btn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--vswp-grad);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 150ms ease;
}
.videoswipe-login-btn:hover { opacity: 0.9; }

/* Homepage center header — eyebrow + bold heading + tabs row */
.videoswipe-center-header {
  flex-shrink: 0;
  padding: 28px 32px 4px;
}

/* Tiny uppercase eyebrow above the H1 — replaces the old emoji geo-chip.
   Clean, fintech-flavoured, and impossible to corrupt with stray data. */
.videoswipe-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vswp-accent);
  margin-bottom: 8px;
  display: inline-block;
}

/* For You / Trending / New / Top — minimal pill tabs, no bottom-border line */
.videoswipe-feed-tabs {
  display: flex;
  gap: 6px;
  margin: 14px 0 4px;
  padding: 0;
  flex-wrap: wrap;
}
.videoswipe-tab {
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #666;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}
.videoswipe-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.videoswipe-tab.active {
  color: #fff;
  background: var(--vswp-grad);
  box-shadow: 0 6px 22px -8px rgba(124, 58, 237, 0.65);
}

/* ============================================
   CENTER — header + scrollable feed
   ============================================ */
.videoswipe-col-center {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Hero H1 — Syne ExtraBold, big and confident. Keeps an absolute max so a
   long taxonomy term can't blow out the layout, and ANY URL-like string is
   already filtered upstream in three-column.php's $is_clean check. */
.videoswipe-feed-heading {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Search-query / category-name highlight — gradient text inside the H1 */
.videoswipe-feed-heading .videoswipe-geo-country,
.videoswipe-feed-heading .videoswipe-search-query {
  background: var(--vswp-grad-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: normal;
}

/* ============================================
   FEED — 9:16 cards with purple gradient glow
   ============================================ */
.videoswipe-grid-feed {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 40px;
  display: grid;
  /* Each tile lives in a 200–260px track so the centre column always shows
     three to five tiles per row depending on viewport — no tile ever
     stretches into a billboard. */
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 26px 22px; /* row × column — vertical breathing > horizontal */
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  overscroll-behavior: contain;
}
.videoswipe-grid-feed::-webkit-scrollbar { width: 6px; }
.videoswipe-grid-feed::-webkit-scrollbar-thumb { background: #1c1c1c; border-radius: 3px; }
.videoswipe-grid-feed::-webkit-scrollbar-thumb:hover { background: #2a2a2a; }
.videoswipe-grid-feed::-webkit-scrollbar-track { background: transparent; }

.videoswipe-grid-card {
  position: relative;
  display: block;
  /* Lock 9:16 with the padding-bottom hack — 16/9 = 1.777… → 177.78% */
  padding-bottom: 177.78%;
  border-radius: 14px;
  overflow: hidden;
  background: #14121f;
  color: inherit;
  text-decoration: none;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms ease;
  isolation: isolate;
}

/* Idle: soft ambient purple glow inside the card. */
.videoswipe-grid-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 75%, rgba(124, 58, 237, 0.30), transparent 62%),
    radial-gradient(55% 38% at 50% 100%, rgba(168, 85, 247, 0.22), transparent 72%);
  pointer-events: none;
  opacity: 0.65;
  z-index: 1;
  transition: opacity 240ms ease;
}

/* Hover: lift + halo. No flat border — the glow IS the edge. */
.videoswipe-grid-card:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.45),
    0 18px 50px -12px rgba(124, 58, 237, 0.70),
    0 0 60px -12px rgba(168, 85, 247, 0.45);
}
.videoswipe-grid-card:hover::before { opacity: 1; }

/* Active / playing — strongest purple-gradient glow. Toggle .is-active on
   the playing card via JS (or :focus-within on accessible keyboard play). */
.videoswipe-grid-card.is-active,
.videoswipe-grid-card:focus-within {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.65),
    0 0 0 4px rgba(124, 58, 237, 0.18),
    0 22px 60px -14px rgba(168, 85, 247, 0.85);
}
.videoswipe-grid-card.is-active::before { opacity: 1; }

.videoswipe-grid-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}
/* Pin the IMG to the thumb box so the image's natural size can never push
   the card taller than its 9:16 aspect-ratio. */
.videoswipe-grid-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bottom fade for legibility */
.videoswipe-grid-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 45%);
  pointer-events: none;
  z-index: 1;
}

/* Top-right pill (HOT / NEW / HD) — uses the BEM `--type` modifier the
   PHP template emits. Top-left = duration. */
.videoswipe-grid-badge,
.videoswipe-grid-badge-hd,
.videoswipe-grid-badge-duration {
  position: absolute;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 3;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.videoswipe-grid-badge,
.videoswipe-grid-badge-hd {
  top: 10px;
  right: 10px;
  color: #fff;
}
.videoswipe-grid-badge--hot { background: linear-gradient(135deg, #f97316, #ef4444); }
.videoswipe-grid-badge--new { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.videoswipe-grid-badge--hd  { background: rgba(168, 85, 247, 0.85); }
.videoswipe-grid-badge-hd   { background: rgba(168, 85, 247, 0.85); }
.videoswipe-grid-badge-duration {
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.videoswipe-grid-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px 14px;
  z-index: 3;
  pointer-events: none;
}

/* Description text is constrained — never let it stretch into a single
   long noodle. max-width caps the line length at the legible 35-char
   sweet-spot regardless of card width. */
.videoswipe-grid-title {
  margin: 0 0 6px 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  max-width: 24ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.videoswipe-grid-stats {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #c8c0d8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

/* Pagination — pill controls, gradient on the current page. */
.videoswipe-pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0 24px;
  flex-wrap: wrap;
}
.videoswipe-pagination a,
.videoswipe-pagination span {
  display: inline-block;
  min-width: 38px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #b8b0c8;
  text-align: center;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}
.videoswipe-pagination a:hover {
  background: rgba(168, 85, 247, 0.14);
  color: #fff;
  transform: translateY(-1px);
}
.videoswipe-pagination .current {
  background: var(--vswp-grad);
  color: #fff;
  box-shadow: 0 6px 22px -8px rgba(124, 58, 237, 0.65);
}

/* Empty state — generous, on-brand: gradient eyebrow + bold message. */
.videoswipe-empty {
  grid-column: 1 / -1;
  padding: 80px 24px 100px;
  text-align: center;
  color: var(--vswp-text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.videoswipe-empty::before {
  content: 'NOTHING TO SHOW';
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  background: var(--vswp-grad-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}

/* ============================================
   RIGHT — sticky sidebar (200px)
   ============================================ */
.videoswipe-col-right {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: var(--vswp-bg); /* same shell colour — no seam */
  padding: 28px 22px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.videoswipe-col-right::-webkit-scrollbar { width: 6px; }
.videoswipe-col-right::-webkit-scrollbar-thumb { background: #1c1c1c; border-radius: 3px; }
.videoswipe-col-right::-webkit-scrollbar-thumb:hover { background: #2a2a2a; }
.videoswipe-col-right::-webkit-scrollbar-track { background: transparent; }

/* Generous breathing room between Trending Tags / Top Creators / Ad slots */
.videoswipe-sidebar-module {
  margin-bottom: 32px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.018);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.videoswipe-sidebar-module:last-child { margin-bottom: 0; }

.videoswipe-sidebar-heading {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--vswp-accent);
  margin: 0 0 14px 0;
}

/* Ad slot — soft surface, no dashed line. */
.videoswipe-ad-placeholder {
  height: 240px;
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #404040;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.04), rgba(168, 85, 247, 0.02)),
    #131320;
}

.videoswipe-ad { min-height: 60px; }
.videoswipe-ad img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Creator list */
.videoswipe-creator-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.videoswipe-creator-list li { margin: 0 0 14px 0; }
.videoswipe-creator-list li:last-child { margin-bottom: 0; }

.videoswipe-creator-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--vswp-text);
  text-decoration: none;
  transition: opacity 120ms ease;
}
.videoswipe-creator-item:hover { opacity: 0.85; }

.videoswipe-creator-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--vswp-grad);
}

.videoswipe-creator-name {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
  color: #ddd;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.videoswipe-creator-count {
  font-size: 9px;
  color: var(--vswp-text-muted);
}

/* Tag cloud — pill chips, no border, more breathing room. */
.videoswipe-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.videoswipe-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: #b8b0c8;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}
.videoswipe-tag-chip:hover {
  color: #fff;
  background: var(--vswp-grad);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px rgba(124, 58, 237, 0.6);
}
.videoswipe-tag-chip span {
  color: #6b6480;
  font-size: 10px;
  font-weight: 400;
}
.videoswipe-tag-chip:hover span { color: rgba(255, 255, 255, 0.85); }

/* Recent videos */
.videoswipe-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.videoswipe-recent-list li { margin: 0 0 8px 0; }

.videoswipe-recent-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px;
  color: var(--vswp-text);
  text-decoration: none;
}
.videoswipe-recent-list a:hover { opacity: 0.85; }

.videoswipe-recent-list img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.videoswipe-recent-list span {
  flex: 1;
  font-size: 11px;
  line-height: 1.35;
  color: #ccc;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   SINGLE-VIDEO PLAY PAGE
   Reference: 51xfree_play_page_v2.html
   Layout: 60px collapsed left | fluid black center (full-bleed 9:16) | 300px right
   Player: HTML5 <video>, autoplay+muted+loop, click toggle, overlays inside
   ============================================ */
.videoswipe-layout--single {
  display: block;
  background: #050505;
  min-height: 100vh;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #fff;
}

/* Hide site chrome on play page (also hidden on grid page; this is a backup) */
.videoswipe-layout--single ~ .videoswipe-footer,
body:has(.videoswipe-layout--single) .videoswipe-header,
body:has(.videoswipe-layout--single) .videoswipe-footer { display: none; }

/* ── LEFT — 60px collapsed: vertical 51X logo + single Home icon ── */
.videoswipe-layout--single .videoswipe-col-left {
  position: fixed;
  top: 0;
  left: 0;
  width: 60px;
  height: 100vh;
  background: #0c0c0c;
  border-right: 1px solid #1a1a1a;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
}
/* Hide the default full nav rendering on this page */
.videoswipe-layout--single .videoswipe-col-left .videoswipe-left-nav { display: none; }

.videoswipe-single-mini-brand {
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--vswp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  writing-mode: vertical-rl;
  margin-bottom: 18px;
  text-decoration: none;
}
.videoswipe-single-mini-home {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--vswp-accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--vswp-accent);
  text-decoration: none;
  border: 1px solid #2d1b4e;
  transition: background 150ms ease;
}
.videoswipe-single-mini-home:hover {
  background: rgba(168, 85, 247, 0.18);
}

/* ── RIGHT — 300px fixed ── */
.videoswipe-layout--single .videoswipe-col-right {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background: #0a0a0a;
  border-left: 1px solid #1a1a1a;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 20;
}
.videoswipe-layout--single .videoswipe-col-right::-webkit-scrollbar { width: 3px; }
.videoswipe-layout--single .videoswipe-col-right::-webkit-scrollbar-thumb { background: #1a1a1a; }

/* ── CENTER — fluid black, player centered, no overflow.
   `dvh` so the column tracks mobile address-bar collapse instead of
   leaving a phantom 60-100px strip on iOS Safari. */
.videoswipe-layout--single .videoswipe-col-center {
  margin-left: 60px;
  margin-right: 300px;
  height: 100vh;
  height: 100dvh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

/* Hide SEO-only description + comments visually on play page */
.videoswipe-layout--single .videoswipe-single-description,
.videoswipe-layout--single .videoswipe-comments-section {
  display: none;
}

/* Phase-2 swipe scaffolding for the embedded single-video page.
   The chain (.videoswipe-feed--embedded → .videoswipe-swiper →
   .videoswipe-swiper-wrapper → .videoswipe-slide) is now driven by
   native scroll-snap, NOT by JS class swaps. Key constraints:
     - Outer 3 layers: a 9:16 black frame centered in the column.
     - .videoswipe-swiper-wrapper IS the scroll container (overflow-y
       + scroll-snap-type set in feed.css). Cannot be flex — children
       must stack at their natural y-offset for snap to work.
     - Every slide must remain in flow at full height. We do NOT
       display:none non-active slides any more (that destroys snap). */
.videoswipe-layout--single .videoswipe-feed,
.videoswipe-layout--single .videoswipe-feed--embedded,
.videoswipe-layout--single .videoswipe-swiper {
  width: auto;
  height: 100vh;
  height: 100dvh;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  position: relative;
  display: block;
}
.videoswipe-layout--single .videoswipe-swiper-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
  /* overflow-y / scroll-snap-type / scroll-behavior come from feed.css */
}
.videoswipe-layout--single .videoswipe-slide {
  width: 100%;
  height: 100%;
  min-height: 100%;
  position: relative;
  background: #000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* AJAX-rendered slides (template-parts/video-card.php) wrap the player
   in .videoswipe-video-container — make sure that container fills the
   slide on the embedded swipe page, with a black backdrop while the
   first video frame is loading. Without these overrides the cascade
   from feed.css produces a white/gray box (the user reported "blank
   second slide" — that's what they were seeing). */
.videoswipe-layout--single .videoswipe-video-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.videoswipe-layout--single .videoswipe-player {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* fill the 9:16 frame instead of letterboxing */
  background: #000;
  display: block;
}
/* Cover-only slide (no playable URL) — show the resolved external thumb
   filling the 9:16 frame. Replaces the old broken-image / "Video
   unavailable" appearance described in the brief. */
.videoswipe-placeholder,
.videoswipe-layout--single .videoswipe-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
/* AJAX-loaded slides ship their own creator/info/like chrome via
   .videoswipe-overlay + .videoswipe-actions + .videoswipe-hd-badge
   from video-card.php. Style them here for the embedded layout so
   every slide has consistent UI (creator name, like/comment/share)
   instead of slide 0 having the chrome and slides 2+ being naked. */

.videoswipe-layout--single .videoswipe-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 18px;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}
.videoswipe-layout--single .videoswipe-overlay a,
.videoswipe-layout--single .videoswipe-overlay button { pointer-events: auto; }

.videoswipe-layout--single .videoswipe-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.videoswipe-layout--single .videoswipe-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--vswp-grad);
  border: 2px solid rgba(255,255,255,0.2);
}
.videoswipe-layout--single .videoswipe-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.videoswipe-layout--single .videoswipe-details { min-width: 0; flex: 1; }
.videoswipe-layout--single .videoswipe-creator-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  margin-bottom: 2px;
}
.videoswipe-layout--single .videoswipe-video-title {
  font-size: 12px;
  color: #ddd;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.videoswipe-layout--single .videoswipe-actors,
.videoswipe-layout--single .videoswipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.videoswipe-layout--single .videoswipe-actor,
.videoswipe-layout--single .videoswipe-tag {
  font-size: 10px;
  color: var(--vswp-accent);
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.videoswipe-layout--single .videoswipe-actor:hover,
.videoswipe-layout--single .videoswipe-tag:hover { color: #fff; }

/* Right rail action buttons (heart, comment, share) */
.videoswipe-layout--single .videoswipe-actions {
  position: absolute;
  right: 12px;
  bottom: 110px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 7;
}
.videoswipe-layout--single .videoswipe-action-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20,20,20,0.85);
  border: 1px solid #2a2a2a;
  color: #ccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  padding: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 150ms ease, color 150ms ease;
  position: relative;
}
.videoswipe-layout--single .videoswipe-action-btn:hover { border-color: var(--vswp-accent); color: #fff; }
.videoswipe-layout--single .videoswipe-action-btn.liked { color: #ef4444; border-color: #ef4444; }
.videoswipe-layout--single .videoswipe-action-icon { font-size: 18px; line-height: 1; }
.videoswipe-layout--single .videoswipe-action-count {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 2px;
  font-size: 10px;
  color: #ccc;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  white-space: nowrap;
}

/* HD badge (top-left to avoid clashing with player back button) */
.videoswipe-layout--single .videoswipe-hd-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(168,85,247,0.85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 6;
}

/* Hide the duplicate chrome on slide 0 — single-video.php already
   wraps slide 0 with its own elaborate .videoswipe-player-bottom /
   .videoswipe-player-creator-row UI, so we suppress the lighter
   video-card.php overlay specifically there to avoid double creator
   names + double action rails on the first slide. AJAX-loaded slides
   (slide 1+) keep these chrome elements visible. */
.videoswipe-layout--single .videoswipe-feed--embedded .videoswipe-slide:first-child > .videoswipe-overlay,
.videoswipe-layout--single .videoswipe-feed--embedded .videoswipe-slide:first-child > .videoswipe-actions,
.videoswipe-layout--single .videoswipe-feed--embedded .videoswipe-slide:first-child > .videoswipe-hd-badge {
  display: none;
}

/* P0-2: Tap-to-play overlay — shown when video.play() promise rejects
   (Safari iOS / Firefox strict mode autoplay policy). feed.js toggles
   the .needs-tap class on the slide; clicking the overlay triggers
   .play() and removes the class. Without this, the user lands on a
   frozen first frame and has no idea what to do. */
.videoswipe-layout--single .videoswipe-tap-to-play {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.videoswipe-layout--single .videoswipe-slide.needs-tap .videoswipe-tap-to-play {
  display: flex;
}
.videoswipe-layout--single .videoswipe-tap-to-play-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
  animation: vswpPulseTap 1.6s ease-in-out infinite;
}
.videoswipe-layout--single .videoswipe-tap-to-play-btn::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid #fff;
  margin-left: 6px;
}
@keyframes vswpPulseTap {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 40px rgba(168, 85, 247, 0.5); }
  50%      { transform: scale(1.06); box-shadow: 0 0 60px rgba(168, 85, 247, 0.8); }
}
/* Top progress bar from feed.js — pin it to the player wrap edge */
.videoswipe-layout--single .videoswipe-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 8;
}
.videoswipe-layout--single .videoswipe-progress-bar {
  height: 100%;
  background: var(--vswp-grad-h);
}

/* Up/Down swipe buttons — pinned to the player's right edge, slightly
   below vertical centre. This is the TikTok / Instagram Reels / YouTube
   Shorts standard position for "next/prev" affordances on web.

   feed.css line ~220 sets `.videoswipe-nav-controls` to `bottom: 2rem;
   left: 50%; transform: translateX(-50%)` for the legacy mobile bottom-
   centre layout. We explicitly null `left` and `bottom` here so our
   right-edge anchor wins — without these the element would stretch
   horizontally between left:50% and right:14px, rendering centred. */
/* feed.css's .videoswipe-nav-controls has identical specificity in some
   load orders, so we use !important to guarantee the right-edge anchor
   wins regardless of cascade quirks. */
.videoswipe-layout--single .videoswipe-feed--embedded .videoswipe-nav-controls,
.videoswipe-layout--single .videoswipe-nav-controls {
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  bottom: auto !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  z-index: 10 !important;
  pointer-events: none !important;
  width: auto !important;
}
.videoswipe-layout--single .videoswipe-nav-btn {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 150ms ease;
}
.videoswipe-layout--single .videoswipe-nav-btn:hover { background: var(--vswp-accent); }

/* ── Player wrap — full viewport-height 9:16 with purple glow ── */
.videoswipe-player-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #1a1730;
  isolation: isolate;
  cursor: pointer;
  overflow: hidden;
}
/* Outer halo */
.videoswipe-player-wrap::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.5), transparent 45%, rgba(124, 58, 237, 0.5));
  z-index: -1;
  pointer-events: none;
  filter: blur(10px);
}

.videoswipe-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.videoswipe-player-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.videoswipe-player-wrap .videoswipe-embed,
.videoswipe-player-wrap .videoswipe-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Top + bottom legibility gradients */
.videoswipe-player-grad-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
  z-index: 4;
  pointer-events: none;
}
.videoswipe-player-grad-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
  z-index: 4;
  pointer-events: none;
}

/* Top overlay row */
.videoswipe-player-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 6;
}
.videoswipe-player-back {
  font-size: 18px;
  color: #aaa;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
}
.videoswipe-player-back:hover { color: #fff; }
.videoswipe-player-tag-top {
  background: rgba(168, 85, 247, 0.85);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  color: #fff;
  font-weight: 500;
}

/* Center play overlay (visible only when paused) */
.videoswipe-center-play {
  position: absolute;
  top: 50%; left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: var(--vswp-accent-deep);
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45);
}
.videoswipe-center-play::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  margin: -12px 0 0 -8px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 20px solid #fff;
}
.videoswipe-player-wrap.is-paused .videoswipe-center-play { opacity: 1; }

/* Bottom overlay — creator row + desc + hashtags + progress bar + time */
.videoswipe-player-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 14px;
  z-index: 6;
}
.videoswipe-player-creator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.videoswipe-player-creator-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--vswp-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.videoswipe-player-creator-name {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
}
.videoswipe-player-creator-name:hover { color: var(--vswp-accent); }
.videoswipe-player-follow-sm {
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ccc;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  margin-left: 4px;
  text-decoration: none;
  transition: all 150ms ease;
}
.videoswipe-player-follow-sm:hover {
  border-color: var(--vswp-accent);
  color: #fff;
  background: rgba(168, 85, 247, 0.18);
}
.videoswipe-player-desc {
  font-size: 11px;
  color: #aaa;
  line-height: 1.4;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.videoswipe-player-hashtags {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.videoswipe-player-hashtag {
  font-size: 10px;
  color: var(--vswp-accent);
  text-decoration: none;
}
.videoswipe-player-progress {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  margin-bottom: 8px;
  position: relative;
}
.videoswipe-player-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--vswp-grad-h);
  border-radius: 2px;
}
.videoswipe-player-progress-dot {
  position: absolute;
  left: 0%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vswp-accent);
}
.videoswipe-player-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #555;
}

/* HD badge (legacy class — rarely used, but keep) */
.videoswipe-layout--single .videoswipe-hd-badge {
  display: none; /* covered by .videoswipe-player-tag-top */
}

/* ────────────────────────────────────────────
   RIGHT RAIL CONTENT — creator card / share & earn / related
   ──────────────────────────────────────────── */

/* Creator card */
.videoswipe-creator-card {
  margin: 14px 14px 0;
  padding: 14px;
  border-radius: 10px;
  background: #111;
  border: 1px solid #1e1e1e;
}
.videoswipe-cc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.videoswipe-cc-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--vswp-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border: 2px solid var(--vswp-accent);
  flex-shrink: 0;
  text-decoration: none;
}
.videoswipe-cc-info { min-width: 0; }
.videoswipe-cc-name {
  font-family: var(--font-body);
  font-size: var(--vt-body);
  font-weight: var(--vw-semi);
  letter-spacing: var(--vt-tracking-tight);
  color: #fff;
  margin: 0;
}
.videoswipe-cc-handle {
  font-family: var(--font-body);
  font-size: var(--vt-meta);
  color: var(--vswp-text-muted);
  margin: 0;
}
.videoswipe-cc-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
}
.videoswipe-cc-stat-num {
  font-family: var(--font-display);
  font-size: var(--vt-h3);
  font-weight: var(--vw-bold);
  letter-spacing: var(--vt-tracking-tight);
  color: #fff;
}
.videoswipe-cc-stat-lbl {
  font-family: var(--font-body);
  font-size: var(--vt-micro);
  font-weight: var(--vw-medium);
  text-transform: uppercase;
  letter-spacing: var(--vt-tracking-wide);
  color: var(--vswp-text-muted);
  margin-top: 4px;
}
.videoswipe-cc-follow-btn {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  background: var(--vswp-grad);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  display: block;
  letter-spacing: 0.05em;
  transition: opacity 150ms ease;
}
.videoswipe-cc-follow-btn:hover { opacity: 0.9; }

/* Share & Earn CTA */
.videoswipe-share-earn {
  margin: 10px 14px;
  padding: 11px 14px;
  border-radius: 9px;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
  text-decoration: none;
  width: calc(100% - 28px);
  transition: transform 150ms ease;
}
.videoswipe-share-earn:hover { transform: translateY(-1px); }
.videoswipe-share-earn-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.videoswipe-share-earn-body strong {
  display: block;
  font-weight: 600;
}
.videoswipe-share-earn-sub {
  font-size: 9px;
  font-weight: 400;
  opacity: 0.75;
  display: block;
  margin-top: 2px;
}

/* Related videos */
.videoswipe-related-section {
  padding: 0 14px 14px;
}
.videoswipe-related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #151515;
  margin-bottom: 10px;
}
.videoswipe-related-title {
  font-family: var(--font-body);
  font-size: var(--vt-meta);
  font-weight: var(--vw-semi);
  color: var(--vswp-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--vt-tracking-wide);
}
.videoswipe-related-more {
  font-size: 10px;
  color: var(--vswp-accent);
  cursor: pointer;
  text-decoration: none;
}
.videoswipe-related-more:hover { opacity: 0.8; }
.videoswipe-related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.videoswipe-related-card {
  display: flex;
  gap: 10px;
  padding: 5px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 150ms ease;
}
.videoswipe-related-card:hover { background: #111; }
.videoswipe-related-thumb {
  width: 50px;
  height: 88px;
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #1a1730;
}
.videoswipe-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.videoswipe-related-views {
  position: absolute;
  bottom: 3px;
  left: 3px;
  font-size: var(--vt-micro);
  font-weight: var(--vw-medium);
  background: rgba(0, 0, 0, 0.7);
  padding: 1px 4px;
  border-radius: 2px;
  color: #bbb;
}
.videoswipe-related-info {
  flex: 1;
  padding-top: 2px;
  min-width: 0;
}
.videoswipe-related-title-text {
  font-family: var(--font-body);
  font-size: var(--vt-caption);
  font-weight: var(--vw-medium);
  color: #ddd;
  line-height: 1.4;
  letter-spacing: var(--vt-tracking-tight);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.videoswipe-related-meta {
  font-family: var(--font-body);
  font-size: var(--vt-meta);
  color: var(--vswp-text-muted);
  margin-top: 4px;
}

/* ============================================
   Responsive — drawer left nav, hidden right rail on tablet/phone
   ============================================
     >1280       :  full 180 | fluid | 300 (the iron law)
     1024–1280   :  shrink right rail to 260, keep left rail
     768–1024    :  hide right rail; left rail still visible
     ≤768        :  drawer mode — left rail is off-canvas, opens
                    via top-bar hamburger. Right rail hidden.
     ≤600        :  centre tightens to 2-col grid.
   ============================================ */
@media (max-width: 1280px) {
  .videoswipe-layout {
    grid-template-columns: 180px minmax(0, 1fr) 260px;
  }
  .videoswipe-col-right { width: 260px; }

  /* Single video play page also tightens its right rail. */
  .videoswipe-layout--single .videoswipe-col-right { width: 260px; }
  .videoswipe-layout--single .videoswipe-col-center { margin-right: 260px; }
}

@media (max-width: 1024px) {
  .videoswipe-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .videoswipe-col-right { display: none; }
  .videoswipe-grid-feed {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 22px 18px;
    padding: 22px 24px 36px;
  }
}

@media (max-width: 768px) {
  /* Centre is the only thing rendered inline. Left rail goes off-canvas. */
  .videoswipe-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .videoswipe-col-right { display: none; }

  .videoswipe-col-left {
    position: fixed;
    top: 0;
    left: 0;
    width: 78vw;
    max-width: 320px;
    height: 100vh;
    z-index: 60;
    transform: translateX(-101%);
    transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 24px 0 56px -12px rgba(0, 0, 0, 0.6);
    background: var(--vswp-bg);
  }
  body.videoswipe-drawer-open .videoswipe-col-left { transform: translateX(0); }
  body.videoswipe-drawer-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 55;
    animation: vswpFadeIn 220ms ease both;
  }
  @keyframes vswpFadeIn { from { opacity: 0; } to { opacity: 1; } }

  .videoswipe-left-nav {
    height: 100vh;
    background: var(--vswp-bg);
    padding-top: 28px;
  }

  .videoswipe-col-center {
    height: auto;
    overflow: visible;
  }
  .videoswipe-grid-feed {
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px 14px 96px;
    gap: 14px 12px;
  }
  .videoswipe-center-header { padding: 16px 16px 0; }
  .videoswipe-feed-heading { font-size: clamp(26px, 8vw, 36px); }
  .videoswipe-grid-title { font-size: 12px; max-width: 22ch; }
  .videoswipe-eyebrow { font-size: 10px; }

  /* ── Mobile sticky top-bar: hamburger + brand + search ── */
  .videoswipe-mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(13, 13, 13, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  }
  .videoswipe-drawer-toggle,
  .videoswipe-mobile-search-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    padding: 0;
  }
  .videoswipe-drawer-toggle svg,
  .videoswipe-mobile-search-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .videoswipe-mobile-brand {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--vswp-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    flex: 1;
    min-width: 0;
  }

  /* ── Single video PLAY PAGE on phone — keep TikTok floating chrome ── */
  .videoswipe-layout--single .videoswipe-col-left { display: none !important; }
  .videoswipe-layout--single .videoswipe-related-section { display: none !important; }
  .videoswipe-layout--single .videoswipe-col-right {
    position: static;
    width: 100%;
    height: auto;
    border-left: none;
  }
  .videoswipe-layout--single .videoswipe-col-center {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    height: auto;
    overflow: visible;
  }
  .videoswipe-layout--single .videoswipe-feed,
  .videoswipe-layout--single .videoswipe-feed--embedded,
  .videoswipe-layout--single .videoswipe-swiper,
  .videoswipe-layout--single .videoswipe-swiper-wrapper {
    height: auto;
    aspect-ratio: 9 / 16;
    width: 100%;
    max-width: 100vw;
  }
  .videoswipe-player-wrap { height: auto; width: 100%; max-width: 100%; }

  .videoswipe-mobile-home-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8;
    text-decoration: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 150ms ease;
  }
  .videoswipe-mobile-home-icon:hover { background: var(--vswp-accent); }
  .videoswipe-mobile-home-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .videoswipe-layout--single .videoswipe-player-top { padding-left: 60px; }
}

@media (max-width: 600px) {
  .videoswipe-grid-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
  }
  .videoswipe-grid-card { border-radius: 12px; }
}

/* Hide mobile-only chrome on desktop. */
@media (min-width: 769px) {
  .videoswipe-mobile-topbar { display: none !important; }
  .videoswipe-mobile-home-icon { display: none; }
}
