/**
 * videos/static/videos/css/videos.css
 * ═════════════════════════════════════════════════════════════════════
 * Master stylesheet for the Soultrob video app.
 *
 * Layout tokens (adjust these to change the whole layout):
 *   --feed-video-max-w      420px  — default video column width
 *   --feed-video-max-w-xl   560px  — video column width on ≥1600px screens
 *   --feed-rail-w            80px  — action rail column width
 *   --feed-sidebar-w        240px  — matches sidebar width in base.html
 *
 * Design tokens are declared in base.html's inline <style> block so they
 * are available to Tailwind config and all pages. This file extends them.
 *
 * Table of contents
 * ─────────────────
 * 1. CSS custom properties (feed-specific)
 * 2. Feed container & scroll snap
 * 3. Feed slide
 * 4. feed-slide-inner (the 9:16 column)
 * 5. Player wrapper & iframe
 * 6. Overlays, feed-info, watched bar
 * 7. Custom controls
 * 8. Action rail
 * 9. Desktop layout overrides (≥1024px)
 * 10. Large screen overrides (≥1600px)
 * 11. Tablet overrides (768–1023px)
 * 12. Mobile overrides (<768px)
 * 13. Auth modal
 * 14. Caught-up slide
 * 15. General utilities used across pages
 * ═════════════════════════════════════════════════════════════════════
 */

/* ════════════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES
   ════════════════════════════════════════════════════════════════════ */
:root {
  /* Feed layout — change these to resize the whole layout */
  --feed-video-max-w:    420px;   /* Default max video column width          */
  --feed-video-max-w-xl: 560px;   /* Max width on very large screens (≥1600) */
  --feed-rail-w:         100px;   /* Action rail column width                */
  --feed-sidebar-w:      240px;   /* Must match sidebar width in base.html   */

  /* Brand palette */
  --blue:     #1a56db;
  --blue-lt:  #3b76f0;
  --blue-dk:  #1240a8;
  --purple:   #7c3aed;
  --pink:     #ec4899;
  --green:    #10b981;
  --error:    #ef4444;

  /* Page background */
  --bg-page:  #0f1018;
  --bg-card:  #12141f;
  --bg-panel: #181a24;

  /* Text */
  --text-1:   #f8fafc;
  --text-2:   #cbd5e1;
  --text-3:   #94a3b8;
  --text-dis: #64748b;

  /* Borders */
  --border:   #2d3044;
  --divider:  #252836;
}

/* ════════════════════════════════════════════════════════════════════
   2. FEED CONTAINER & SCROLL SNAP
   ════════════════════════════════════════════════════════════════════ */
.feed-container {
  /* Full viewport on mobile; right of sidebar on desktop (see §9) */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: scroll;
  overflow-x: hidden;

  /* Vertical scroll snap — mandatory so every video locks to viewport */
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;

  /* Prevent overscroll rubber-band interfering with snap (iOS + Chrome) */
  overscroll-behavior: contain;

  background: #000;
  z-index: 1;

  /* Hide scrollbar: functional but invisible */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
}
.feed-container::-webkit-scrollbar {
  display: none;                  /* Chrome/Safari */
}

/* ════════════════════════════════════════════════════════════════════
   3. FEED SLIDE
   ════════════════════════════════════════════════════════════════════ */
.feed-slide {
  /* Each slide snaps to the viewport height */
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;       /* Never skip a slide on fast swipe */
  flex-shrink: 0;

  /* On mobile: full-bleed black background */
  width: 100%;
  background: #000;
  overflow: hidden;               /* Keep content within slide bounds */

  /* Position context for all absolutely-placed children */
  position: relative;

  /* GPU compositing hint — the slide transforms during scroll */
  will-change: transform;
}

/* Ad slides: centre the ad content */
.ad-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0b12;
}

/* ════════════════════════════════════════════════════════════════════
   4. feed-slide-inner  —  the 9:16 video column
   On mobile: fills the slide completely.
   On desktop: fixed width, centred inside the slide (see §9).
   ════════════════════════════════════════════════════════════════════ */
.feed-slide-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

/* ════════════════════════════════════════════════════════════════════
   5. PLAYER WRAPPER, IFRAME, THUMBNAIL
   ════════════════════════════════════════════════════════════════════ */
.player-wrapper {
  position: absolute;
  inset: 0;
  background: #000;
}

.yt-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  /* Prevent iframe from intercepting pointer events before YT API is ready */
  pointer-events: auto;
}

.thumb-placeholder {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-color: #0a0b12;
  z-index: 2;
  transition: opacity 0.3s ease;
  will-change: opacity;
}
.thumb-placeholder.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Transparent overlay — captures click/tap for double-tap-to-like */
.player-click-capture {
  position: absolute;
  inset: 0;
  z-index: 6;
  cursor: pointer;
}

/* Error state — shown by JS when YouTube fires an error */
.player-error-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 8;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-dis);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  text-align: center;
  gap: 8px;
}
.player-error-overlay.visible {
  display: flex;
}

/* ════════════════════════════════════════════════════════════════════
   6. OVERLAYS, FEED-INFO, WATCHED BAR
   ════════════════════════════════════════════════════════════════════ */

/* Top scrim — solid+mask, no colour gradient */
.feed-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 130px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
  mask-image:         linear-gradient(to bottom, black 20%, transparent 100%);
  pointer-events: none;
  z-index: 10;
  will-change: opacity;
}

/* Bottom scrim — solid+mask, no colour gradient */
.feed-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: rgba(0, 0, 0, 0.68);
  -webkit-mask-image: linear-gradient(to top, black 25%, transparent 100%);
  mask-image:         linear-gradient(to top, black 25%, transparent 100%);
  pointer-events: none;
  z-index: 10;
  will-change: opacity;
}

/*
 * feed-info — category badge + video title
 * z-index: 20 ensures it renders ABOVE the gradient overlays (z-index:10)
 * and is never clipped by overflow:hidden on .feed-slide-inner.
 * bottom: 80px sits cleanly above the 64px custom-controls bar.
 */
.feed-info {
  position: absolute;
  bottom: 90px;
  left: 14px;
  right: 14px;    /* On mobile, feed.html's style block overrides to ~100px */
  z-index: 20;    /* Must be > .feed-overlay-bottom (z-index:10)           */
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

/* Category badge within feed-info */
.feed-info .category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(26, 86, 219, 0.15);
  color: #3b76f0;
  border: 1px solid rgba(26, 86, 219, 0.3);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
  margin-bottom: 6px;
}
.feed-info .category-badge:hover {
  background: rgba(26, 86, 219, 0.25);
}

/* Video title — 3-line clamp */
.feed-video-title {
  font-size: 15px;
  font-weight: 600;
  color: white;
  font-family: 'DM Sans', sans-serif;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Thin progress bar at the very bottom of the slide */
.feed-watched-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--blue);
  z-index: 30;
  transition: width 0.5s linear;
  will-change: width;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════
   7. CUSTOM CONTROLS
   ════════════════════════════════════════════════════════════════════ */
.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.60);
  -webkit-mask-image: linear-gradient(to top, black 45%, transparent 100%);
  mask-image:         linear-gradient(to top, black 45%, transparent 100%);
  z-index: 15;
  opacity: 0;
  transition: opacity 0.22s;
}
/* Show controls when parent has .controls-visible toggled by JS double-tap */
.player-wrapper.controls-visible .custom-controls {
  opacity: 1;
}

.ctrl-play-btn,
.ctrl-mute-btn,
.ctrl-fullscreen-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.ctrl-play-btn:hover,
.ctrl-mute-btn:hover,
.ctrl-fullscreen-btn:hover {
  opacity: 0.8;
}

.ctrl-duration {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 32px;
}

/* Seek track */
.ctrl-seek-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}
.ctrl-seek-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--blue);
  border-radius: 2px;
  pointer-events: none;
}
.ctrl-seek-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.1s;
}
.ctrl-seek-track:hover .ctrl-seek-thumb {
  transform: translate(-50%, -50%) scale(1.3);
}

/* ════════════════════════════════════════════════════════════════════
   8. ACTION RAIL  (base styles; desktop/mobile positions in §9–§12)
   ════════════════════════════════════════════════════════════════════ */

/* Individual action button */
.feed-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: white;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease;
  text-decoration: none;
  width: 82px;
  text-align: center;
}
.feed-action-btn:active {
  transform: scale(0.88);
}
.feed-action-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Icon circle */
.feed-action-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.18s ease, border-color 0.18s ease;
  margin: 0 auto;
}
.feed-action-btn:hover .feed-action-icon {
  background: rgba(0, 0, 0, 0.72);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Liked state */
.feed-action-btn.liked .feed-action-icon {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Bookmarked state */
.feed-action-btn.bookmarked .feed-action-icon {
  background: rgba(26, 86, 219, 0.22);
  border-color: rgba(26, 86, 219, 0.5);
}

/* Count / label below icon */
.feed-action-label {
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
  width: 100%;
  text-align: center;
}

/* Rail transition when switching slides */
#feed-action-rail {
  transition: opacity 0.2s ease;
  will-change: opacity;
}

/* ════════════════════════════════════════════════════════════════════
   9. DESKTOP LAYOUT OVERRIDES (≥1024px)
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {

  /* Feed container: push right of sidebar */
  .feed-container {
    left: var(--feed-sidebar-w);
    width: calc(100vw - var(--feed-sidebar-w));
  }

  /* Each slide: flex row so the video column can be centred */
  .feed-slide {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #050508;
  }

  /* The inner video column: fixed width, full height, centred */
  .feed-slide-inner {
    /* Width = --feed-video-max-w (420px default) */
    width: var(--feed-video-max-w);
    height: 100%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
  }

  /* Player and its children fill the inner column completely */
  .feed-slide-inner .player-wrapper,
  .feed-slide-inner .feed-overlay-top,
  .feed-slide-inner .feed-overlay-bottom,
  .feed-slide-inner .feed-info,
  .feed-slide-inner .feed-watched-bar {
    position: absolute;
    left: 0;
    right: 0;
  }
  .feed-slide-inner .player-wrapper {
    top: 0;
    bottom: 0;
  }
  .feed-slide-inner .feed-overlay-top { top: 0; }
  .feed-slide-inner .feed-overlay-bottom { bottom: 0; }
  .feed-slide-inner .feed-watched-bar { bottom: 0; }

  /* Ad slides stay centred */
  .ad-slide {
    justify-content: center;
  }

  /* Desktop action rail: beside video, NOT overlaid */
  #feed-action-rail {
    position: fixed !important;
    right: auto !important;
    bottom: auto !important;
    /*
     * Horizontally: sidebar + (remaining width / 2) + (video width / 2) + gap
     * This places the rail flush against the right edge of the video.
     */
    left: calc(
      var(--feed-sidebar-w)
      + (100vw - var(--feed-sidebar-w)) / 2
      + var(--feed-video-max-w) / 2
      + 16px
    ) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    gap: 28px;
    width: var(--feed-rail-w);
  }

  /*
   * Desktop arrows: to the right of the action rail column.
   * Calculation: same x-origin as rail + rail width + small gap.
   */
  .feed-nav-arrows {
    position: fixed !important;
    right: auto !important;
    left: calc(
      var(--feed-sidebar-w)
      + (100vw - var(--feed-sidebar-w)) / 2
      + var(--feed-video-max-w) / 2
      + var(--feed-rail-w)
      + 28px
    ) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  /* Desktop feed-info: full inner column width, action rail is outside */
  .feed-info {
    right: 14px !important;
  }

  /* Counter pill: top-left of the video area (right of sidebar) */
  #feed-counter-pill {
    left: calc(var(--feed-sidebar-w) + 20px) !important;
  }

  /* Tab bar: centred in the video column (not sidebar) */
  .feed-tab-bar {
    left: calc(
      var(--feed-sidebar-w)
      + (100vw - var(--feed-sidebar-w)) / 2
    ) !important;
    transform: translateX(-50%) !important;
  }

  /* Search button stays top-right of viewport */
  .feed-search-btn {
    right: 20px !important;
  }

  /* Mobile arrows hidden on desktop */
  .feed-mobile-arrows {
    display: none !important;
  }

  /* Home button hidden on desktop (sidebar has it) */
  #feed-home-btn-mobile {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════
   10. LARGE SCREEN OVERRIDES (≥1600px)
   The video column grows from 420px to 560px on very wide screens.
   All dependent positions are recalculated using the xl variable.
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 1600px) {

  /* Wider video column */
  .feed-slide-inner {
    width: var(--feed-video-max-w-xl) !important;
  }

  /* Action rail repositioned for wider column */
  #feed-action-rail {
    left: calc(
      var(--feed-sidebar-w)
      + (100vw - var(--feed-sidebar-w)) / 2
      + var(--feed-video-max-w-xl) / 2
      + 16px
    ) !important;
  }

  /* Arrows repositioned for wider column + wider rail offset */
  .feed-nav-arrows {
    left: calc(
      var(--feed-sidebar-w)
      + (100vw - var(--feed-sidebar-w)) / 2
      + var(--feed-video-max-w-xl) / 2
      + var(--feed-rail-w)
      + 28px
    ) !important;
  }

  /* Tab bar stays centred in video column */
  .feed-tab-bar {
    left: calc(
      var(--feed-sidebar-w)
      + (100vw - var(--feed-sidebar-w)) / 2
    ) !important;
  }
}

/* ════════════════════════════════════════════════════════════════════
   11. TABLET OVERRIDES (768px–1023px)
   Sidebar hidden, video centred in full viewport, overlaid action rail.
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1023px) {

  /* No sidebar on tablet */
  .feed-container {
    left: 0;
    width: 100vw;
  }

  /* Video centred, max 420px wide */
  .feed-slide {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: #050508;
  }

  .feed-slide-inner {
    width: var(--feed-video-max-w);
    height: 100%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
  }

  /* Rail overlaid on the right of the video */
  #feed-action-rail {
    position: fixed !important;
    left: auto !important;
    right: calc(50% - var(--feed-video-max-w) / 2 - var(--feed-rail-w) - 8px) !important;
    bottom: 110px !important;
    top: auto !important;
    transform: none !important;
  }

  /* Arrows to the right of the rail */
  .feed-nav-arrows {
    position: fixed !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: auto !important;
  }

  .feed-info {
    right: 80px !important;
  }
}

/* ════════════════════════════════════════════════════════════════════
   12. MOBILE OVERRIDES (<768px)
   Full-bleed video, overlaid rail on right, bottom nav visible.
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* Full-bleed feed */
  .feed-container {
    left: 0;
    width: 100vw;
  }

  /* Slide: full-bleed, no flex centering needed */
  .feed-slide {
    display: block;
    width: 100%;
  }

  /* Inner fills slide completely */
  .feed-slide-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  /* Rail: overlaid on right side of video, above bottom nav */
  #feed-action-rail {
    position: fixed !important;
    right: 10px !important;
    left: auto !important;
    bottom: 80px !important;
    top: auto !important;
    transform: none !important;
    gap: 28px;
  }

  /* feed-info: leave space for right-side action rail (100px rail + 10px gap) */
  .feed-info {
    right: 116px !important;
  }

  /* Desktop arrows hidden on mobile */
  .feed-nav-arrows {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════
   13. AUTH MODAL
   ════════════════════════════════════════════════════════════════════ */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeInBackdrop 0.22s ease;
}
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.auth-modal-sheet {
  width: 100%;
  max-width: 480px;
  background: #12141f;
  border-radius: 24px 24px 0 0;
  border: 1px solid #1e2030;
  border-bottom: none;
  overflow: hidden;
  position: relative;
  animation: slideUpSheet 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.auth-modal-backdrop.closing .auth-modal-sheet {
  animation: slideDownSheet 0.22s ease forwards;
}
@keyframes slideDownSheet {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

.auth-modal-drag-handle {
  width: 40px;
  height: 4px;
  background: #252836;
  border-radius: 2px;
  margin: 12px auto 0;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.auth-modal-close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.auth-modal-body {
  padding: 20px 24px 32px;
}

.auth-modal-headline {
  font-size: 22px;
  font-weight: 700;
  color: white;
  font-family: 'Poppins', sans-serif;
  margin: 0 0 8px;
}

.auth-modal-subtext {
  font-size: 14px;
  color: var(--text-dis);
  font-family: 'DM Sans', sans-serif;
  margin: 0 0 16px;
  line-height: 1.55;
}

.auth-modal-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-modal-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #8892a4;
  font-family: 'DM Sans', sans-serif;
}

.auth-benefit-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-benefit-icon.blue   { background: rgba(26, 86, 219, 0.15); }
.auth-benefit-icon.purple { background: rgba(139, 92, 246, 0.15); }
.auth-benefit-icon.pink   { background: rgba(236, 72, 153, 0.15); }
.auth-benefit-icon.green  { background: rgba(16, 185, 129, 0.15); }
.auth-benefit-icon.orange { background: rgba(245, 158, 11, 0.15); }

.auth-modal-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.auth-btn-login {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #252836;
  color: #c8d0e0;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}
.auth-btn-login:hover { background: rgba(255, 255, 255, 0.12); }

.auth-btn-signup {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}
.auth-btn-signup:hover { background: var(--blue-dk); }

.auth-modal-skip {
  background: none;
  border: none;
  color: #4a5270;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  width: 100%;
  padding: 8px;
  transition: color 0.15s;
}
.auth-modal-skip:hover { color: #8892a4; }

/* ════════════════════════════════════════════════════════════════════
   14. CAUGHT-UP SLIDE
   ════════════════════════════════════════════════════════════════════ */
.caught-up-slide {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: var(--bg-page) !important;
}

/* ════════════════════════════════════════════════════════════════════
   15. GENERAL UTILITIES
   Shared across the video app pages (detail, search, liked, etc.)
   ════════════════════════════════════════════════════════════════════ */

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  will-change: transform;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fade-in-up entrance animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeInUp 0.35s ease forwards;
}

/* Heart burst overlay (double-tap like) */
.heart-burst-overlay {
  position: fixed;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 200;
  font-size: 40px;
  animation: heartBurst 0.7s ease forwards;
  will-change: transform, opacity;
}
@keyframes heartBurst {
  0%   { opacity: 1; transform: scale(0.5); }
  40%  { opacity: 1; transform: scale(1.3); }
  100% { opacity: 0; transform: scale(1.1) translateY(-30px); }
}

/* Category badge (shared — detail, feed info bar) */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(124,58,237,0.1);
  color: #9b6dff;
  border: 1px solid rgba(124,58,237,0.22);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s, border-color 0.15s;
}
.category-badge:hover {
  background: rgba(124,58,237,0.18);
  border-color: rgba(124,58,237,0.38);
}

/* Like button state (shared, used on detail page too) */
.like-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #252836;
  color: #8892a4;
}
.like-btn.liked {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--error);
}
.like-btn:hover { background: rgba(255, 255, 255, 0.1); }

/* Video card (detail page related videos) */
.video-card { text-decoration: none; }
.video-card-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: rgba(0, 0, 0, 0.56);
  -webkit-mask-image: linear-gradient(to top, black 35%, transparent 100%);
  mask-image:         linear-gradient(to top, black 35%, transparent 100%);
  border-radius: 0 0 14px 14px;
}
.video-card-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
}
.video-card-likes {
  position: absolute;
  bottom: 8px; left: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 3px;
}
.video-card-category {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(26, 86, 219, 0.75);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.video-card-title {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #c8d0e0;
  font-family: 'DM Sans', sans-serif;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}