/*
Theme Name: FLUX Player
Theme URI:
Author:
Author URI:
Description: Tema WordPress video player FLUX (9:16) + channel grid di beranda. Setiap video punya permalink sendiri. Support PWA (Add to Home Screen). Integrasi penuh dengan FLUX Admin Panel.
Version: 2.6.92
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: flux-player
*/

:root {
  --bg-body: #0B0B10;
  --text-main: #ffffff;
  --font-main: 'Inter', sans-serif;
  --flux-banner-gap: 8px;

  /* ===== FLUX BRAND -- Gradient Dark / Ungu / Pink ===== */
  --flux-purple: #7c3aed;
  --flux-pink: #db2777;
  --flux-gradient: linear-gradient(135deg, var(--flux-purple) 0%, var(--flux-pink) 100%);
  --flux-surface: #0B0B10;
  --flux-surface-2: #14141A;
  --flux-glow-purple: rgba(124, 58, 237, 0.35);
  --flux-glow-pink: rgba(219, 39, 119, 0.30);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== SCROLLBAR — tint ungu-pink (ganti default abu browser) ===== */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--flux-purple) var(--flux-surface-2);
}
html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html::-webkit-scrollbar-track {
  background: var(--flux-surface-2);
}
html::-webkit-scrollbar-thumb {
  background: var(--flux-gradient);
  border-radius: 8px;
}
html::-webkit-scrollbar-thumb:hover {
  background: var(--flux-purple);
}

/* ===== SELEKSI TEKS — tint ungu-pink (ganti default biru browser) ===== */
::selection {
  background: var(--flux-glow-purple);
  color: #fff;
}
::-moz-selection {
  background: var(--flux-glow-purple);
  color: #fff;
}

/* ===== FOCUS RING KEYBOARD/TAB — warna brand untuk aksesibilitas ===== */
:focus-visible {
  outline: 2px solid var(--flux-purple);
  outline-offset: 2px;
}

/* ===== SKIP LINK & VISUALLY HIDDEN — aksesibilitas keyboard (2.6.49) ===== */
.flux-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.flux-skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 99999;
  padding: 10px 16px;
  background: var(--flux-purple, #7c3aed);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.flux-skip-link:focus-visible {
  top: 12px;
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

html, body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--flux-surface);
  padding: 0 16px;
}

/* HEADER */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px;
  background: var(--flux-surface);
}

.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  user-select: none;
  text-transform: uppercase;
}

.btn-telegram {
  background: var(--flux-gradient);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px var(--flux-glow-pink);
}
.btn-telegram:hover { opacity: 0.85; }
.btn-telegram:active { transform: scale(0.96); }

/* VIDEO AREA — VERTICAL CONTAINER */
.video-area {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  box-shadow: 0 0 32px rgba(124, 58, 237, 0.18), 0 0 60px rgba(219, 39, 119, 0.10);
}

.video-area video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: none;
  outline: none;
  background: #000;
}

/* WATERMARK */
.watermark {
  position: absolute;
  bottom: 74px;
  right: 12px;
  z-index: 8;
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
}
.watermark span {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* PLAY OVERLAY */
.play-overlay,
button.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.3s ease;
  background: transparent;
  background-color: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  box-shadow: none;
}
.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-btn-big {
  width: 68px;
  height: 68px;
  background: var(--flux-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18), 0 6px 24px var(--flux-glow-purple), 0 0 28px var(--flux-glow-pink);
  transition: transform 0.15s ease;
  position: relative;
}
.play-btn-big:active { transform: scale(0.92); }

.play-btn-big i {
  color: #ffffff;
  font-size: 22px;
  margin-left: 3px;
  transition: opacity 0.2s ease;
}
.play-btn-big.loading i {
  opacity: 0;
  margin-left: 0;
}

/* Spinner inside play button */
.play-btn-spinner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(124, 58, 237, 0.15);
  border-top-color: var(--flux-purple);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  animation: spin 0.7s linear infinite;
  pointer-events: none;
}
.play-btn-big.loading .play-btn-spinner {
  opacity: 1;
}

/* CUSTOM CONTROLS */
.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 16px 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
  background: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.video-area.show-controls .custom-controls {
  opacity: 1;
  pointer-events: auto;
}

/* CONTROLS SHADOW */
.controls-shadow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(to top,
    rgba(11, 11, 16, 0.92) 0%,
    rgba(11, 11, 16, 0.75) 25%,
    rgba(11, 11, 16, 0.45) 55%,
    rgba(11, 11, 16, 0.15) 80%,
    rgba(11, 11, 16, 0) 100%);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.video-area.show-controls .controls-shadow {
  opacity: 1;
}

.time-display {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  min-width: 85px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  user-select: none;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(124, 58, 237, 0.22);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.progress-buffered {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(219, 39, 119, 0.32);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  transition: width 0.2s ease;
}

.progress-fill {
  height: 100%;
  background: var(--flux-gradient);
  border-radius: 2px;
  width: 0%;
  position: relative;
  z-index: 1;
  transition: width 0.1s linear;
}

.progress-thumb {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.4), 0 0 8px var(--flux-glow-pink);
}
.progress-bar:hover .progress-thumb,
.progress-bar.dragging .progress-thumb {
  opacity: 1;
}
.progress-bar.dragging .progress-thumb {
  transform: translateY(-50%) scale(1.3);
}

.control-right {
  display: flex;
  gap: 14px;
  align-items: center;
}

.ctrl-btn {
  color: #fff;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}

/* MENU (three-dot) POPUP */
.menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  right: -8px;
  min-width: 214px;
  background: rgba(20, 20, 28, 0.96);
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.45), 0 0 22px rgba(124, 58, 237, 0.18);
  z-index: 20;
}
.menu-wrap.open .menu-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.menu-list {
  display: flex;
  flex-direction: column;
}
.menu-list-speed { display: none; }
.menu-popup.show-speed .menu-list-main { display: none; }
.menu-popup.show-speed .menu-list-speed { display: flex; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.menu-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: rgba(219, 39, 119, 0.12);
}
.menu-item:active { background: rgba(219, 39, 119, 0.16); }
.menu-item i {
  width: 16px;
  font-size: 14px;
  text-align: center;
  color: rgba(224, 208, 240, 0.85);
  flex-shrink: 0;
}

.menu-item-back { font-weight: 600; }

.menu-speed-option { padding-left: 44px; justify-content: space-between; }
.speed-check { width: auto; opacity: 0; color: var(--flux-pink); margin: 0; }
.menu-speed-option.active .speed-check { opacity: 1; }
.menu-speed-option.active span { font-weight: 700; color: var(--flux-pink); }

/* DOUBLE-TAP SEEK INDICATOR */
.seek-indicator {
  position: absolute;
  top: 50%;
  width: 84px;
  height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  background: rgba(11, 11, 16, 0.55);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  transform: translateY(-50%) scale(0.75);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.seek-indicator i { font-size: 20px; }
.seek-indicator-left { left: 10%; }
.seek-indicator-right { right: 10%; }
.seek-indicator.show {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* PICTURE-IN-PICTURE ACTIVE BADGE */
.pip-indicator {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 15;
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(11, 11, 16, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 20px;
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.35);
  pointer-events: none;
}
.pip-indicator.active { display: flex; }
.pip-indicator i { font-size: 12px; }

/* BUFFERING SPINNER */
.buffering-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.buffering-spinner.visible {
  opacity: 1;
}
.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(219, 39, 119, 0.25);
  border-top-color: var(--flux-pink);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* HIDDEN RAW CONTENT */
/* .post-raw-content dihapus di 2.6.41: div fallback mentah tidak lagi dirender
   (parsing URL fallback tetap jalan server-side di content-player.php). */

/* FULLSCREEN FIX */
.video-area:fullscreen {
  border-radius: 0;
  aspect-ratio: auto;
  height: 100vh;
  width: 100vw;
  max-width: 100%;
}
.video-area:-webkit-full-screen {
  border-radius: 0;
  aspect-ratio: auto;
  height: 100vh;
  width: 100vw;
  max-width: 100%;
}

/* NO VIDEO SET / EMPTY STATE */
.flux-empty-state {
  color: #fff;
  text-align: center;
  padding: 24px;
  font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .app-container { max-width: 100%; padding: 0 14px; }
  .logo { font-size: 26px; }
}

/* ========================================
   CHANNEL PAGE (beranda / grid)
   ======================================== */

/* E5 — safe area */
.app-container {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.channel-page {
  position: relative;
  height: auto;
  min-height: 0;
  padding-bottom: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

/* E1 — noise/grain + smoother spheres */
.channel-page::before,
.channel-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(2px);
}

.channel-page::before {
  width: 320px;
  height: 320px;
  top: -100px;
  right: -80px;
  background: radial-gradient(circle at 40% 40%,
    rgba(124, 58, 237, 0.34) 0%,
    rgba(124, 58, 237, 0.12) 45%,
    transparent 70%);
}

.channel-page::after {
  width: 240px;
  height: 240px;
  top: 60px;
  left: -90px;
  background: radial-gradient(circle at 60% 50%,
    rgba(219, 39, 119, 0.28) 0%,
    rgba(219, 39, 119, 0.10) 50%,
    transparent 72%);
}

/* subtle noise overlay */
.channel-page {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

.channel-page > * {
  position: relative;
  z-index: 1;
}

/* A5 — header + tabs (fixed in layout, only grid scrolls) */
.channel-header-sticky {
  position: relative;
  z-index: 50;
  flex-shrink: 0;
  background: rgba(9, 5, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-left: -16px;
  margin-right: -16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: 8px;
  padding-bottom: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--flux-pink) 20%, transparent);
  overflow: hidden;
  /* decorative bg like channel cover (spheres + noise) — match image 1 style */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

.channel-header-sticky::before,
.channel-header-sticky::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(2px);
}

.channel-header-sticky::before {
  width: 280px;
  height: 280px;
  top: -120px;
  right: -70px;
  background: radial-gradient(circle at 40% 40%,
    var(--flux-glow-purple) 0%,
    color-mix(in srgb, var(--flux-purple) 18%, transparent) 45%,
    transparent 70%);
}

.channel-header-sticky::after {
  width: 200px;
  height: 200px;
  top: 20px;
  left: -80px;
  background: radial-gradient(circle at 60% 50%,
    var(--flux-glow-pink) 0%,
    color-mix(in srgb, var(--flux-pink) 16%, transparent) 50%,
    transparent 72%);
}

.channel-header-sticky > * {
  position: relative;
  z-index: 1;
}

.channel-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.channel-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--flux-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.15), 0 4px 20px var(--flux-glow-purple);
  overflow: hidden;
}

.channel-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.channel-avatar span {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
}

.channel-info { min-width: 0; }

.channel-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-count {
  font-size: 12px;
  color: rgba(216, 196, 235, 0.6);
  margin: 0;
}

/* A3 — tabs */
.channel-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 0 12px;
}

.channel-tab {
  flex: 1;
  text-align: center;
  padding: 9px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: rgba(216, 196, 235, 0.6);
  background: rgba(124, 58, 237, 0.10);
  transition: background 0.15s, color 0.15s;
}

.channel-tab.active {
  background: var(--flux-gradient);
  color: #fff;
}

.channel-tab:not(.active):active {
  background: rgba(124, 58, 237, 0.18);
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 10px;
  padding: 0 0 20px;
}

.video-card {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: transform 0.2s ease;
}

.video-card:hover {
  transform: translateY(-2px);
}

.video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--flux-surface);
  transition: box-shadow 0.2s ease;
}

.video-card:hover .video-thumb {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.video-thumb img.flux-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.25s ease;
}

.video-thumb img.flux-img.loaded {
  opacity: 1;
}

.video-card:hover .video-thumb img.flux-img.loaded {
  transform: scale(1.04);
}

/* E2 — gradient overlay bawah thumbnail */
.thumb-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(11, 11, 16, 0.62) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--flux-surface);
  color: rgba(124, 58, 237, 0.4);
  font-size: 26px;
}

.thumb-placeholder.small { font-size: 18px; }

.video-title {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A2 — skeleton */
.skeleton-card .video-thumb {
  background: linear-gradient(90deg, var(--flux-surface) 25%, var(--flux-surface-2) 50%, var(--flux-surface) 75%);
  background-size: 200% 100%;
  animation: flux-shimmer 1.2s ease-in-out infinite;
}

.skeleton-line {
  margin-top: 8px;
  height: 10px;
  width: 70%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--flux-surface) 25%, var(--flux-surface-2) 50%, var(--flux-surface) 75%);
  background-size: 200% 100%;
  animation: flux-shimmer 1.2s ease-in-out infinite;
}

@keyframes flux-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* N14 — skeleton related */
.related-card.skeleton-card {
  pointer-events: none;
}
.skeleton-card .related-thumb {
  background: linear-gradient(90deg, var(--flux-surface) 25%, var(--flux-surface-2) 50%, var(--flux-surface) 75%);
  background-size: 200% 100%;
  animation: flux-shimmer 1.2s ease-in-out infinite;
}
.skeleton-line.short {
  width: 45%;
}


/* Pagination */
.flux-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 16px 0 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.10);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
}

.page-btn:hover { background: rgba(124, 58, 237, 0.20); }
.page-btn:active { transform: scale(0.94); }
.page-btn.active { background: var(--flux-gradient); color: #fff; }
.page-dots { color: rgba(190, 165, 215, 0.4); font-size: 13px; padding: 0 2px; }

/* ========================================
   SINGLE — header actions + share
   ======================================== */

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-share {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--flux-purple) 22%, var(--flux-surface-2));
  color: var(--text-main, #fff);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.12s;
}

.btn-share:active { transform: scale(0.92); }
.btn-share.share-ok { background: rgba(34, 197, 94, 0.35); }
.btn-share.share-fail { background: rgba(239, 68, 68, 0.35); }

.app-header {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

/* ========================================
   RELATED — horizontal + More Videos (E3)
   ======================================== */

/* Sedikit jarak antara area kontrol player dan "Video Lainnya"
   supaya tidak mepet, tanpa membuat celah berlebih. */
.related-section {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 0 14px;
  z-index: 2;
  position: relative;
}

/* 8 slot banner bawah player (setelah related), rata tengah
   Frame/kotak dikembalikan seperti v2.6.4: slot selalu punya box gelap,
   min-height, border, dan tombol close di kanan. */
.fap-banner-stack {
  max-width: 480px;
  width: 100%;
  margin: 4px auto 16px;
  padding: 0 16px calc(8px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.fap-banner-slot {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 90px;
  background: #111118;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

.fap-banner-slot.is-empty,
.fap-banner-slot:empty {
  display: block !important;
  min-height: 90px !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
}

.fap-banner-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  background: #0c0c12;
  overflow: hidden;
}

.fap-banner-frame iframe,
.fap-banner-frame ins,
.fap-banner-frame img,
.fap-banner-frame > div {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.fap-banner-slot iframe,
.fap-banner-slot img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.fap-banner-slot a[href*="juic" i],
.fap-banner-slot a[href*="Juicv" i],
.fap-banner-frame a[href*="juic" i] {
  display: block;
  width: 100%;
  text-align: right;
  font-size: 11px;
  line-height: 1.4;
  color: #7c8cff !important;
  padding: 2px 2px 0;
}

.fap-banner-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 28, 0.85);
  color: #fff;
  font-size: 16px;
  line-height: 22px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  margin-bottom: 12px;
}

.related-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.related-more {
  font-size: 13px;
  font-weight: 600;
  color: rgba(216, 196, 235, 0.72);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.12);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.related-more:hover {
  background: rgba(219, 39, 119, 0.22);
  color: #fff;
}

.related-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 16px 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.related-scroll::-webkit-scrollbar { display: none; }

.related-card {
  flex: 0 0 176px;
  width: 176px;
  min-width: 176px;
  max-width: 176px;
  display: block;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  transition: transform 0.2s ease;
}

.related-card:hover {
  transform: translateY(-2px);
}

.related-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--flux-surface);
  transition: box-shadow 0.2s ease;
}

.related-card:hover .related-thumb {
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
}

.related-thumb img.flux-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.25s ease;
}

.related-thumb img.flux-img.loaded { opacity: 1; }

.related-card:hover .related-thumb img.flux-img.loaded {
  transform: scale(1.04);
}

.related-card-title {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* E3 — More Videos card polished */
.more-videos-card { flex: 0 0 176px; }

.more-videos-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(160deg, #14141A 0%, #0B0B10 100%);
  border: 1px solid rgba(219, 39, 119, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.more-videos-inner i {
  font-size: 22px;
  color: rgba(219, 39, 119, 0.55);
}

.more-videos-inner span {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-align: center;
  line-height: 1.3;
  padding: 0 6px;
}

.more-videos-card:active .more-videos-inner {
  background: #241a3d;
}

/* E4 — micro animation cards */
/* Kartu disembunyikan hanya bila JS aktif (class flux-js-ok dipasang oleh
 * ui-2637.js di awal IIFE). Tanpa JS / JS gagal dimuat, kartu langsung
 * terlihat — progressive enhancement, bukan halaman kosong. */
.flux-js-ok .flux-card-anim {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.flux-card-anim.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.flux-card-anim:active {
  transform: scale(0.96);
  transition-duration: 0.1s;
}

/* R9 — hormati preferensi gerak minimal (aksesibilitas): matikan shimmer
 * dan transisi kartu bila user meminta reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .flux-js-ok .flux-card-anim {
    transition: none;
    transform: none;
  }
  .flux-card-anim.is-visible {
    transition: none;
  }
  .skeleton-card .video-thumb,
  .skeleton-line {
    animation: none;
  }
}

/* Halaman single: jangan paksa app-container setinggi viewport.
   min-height:100vh + related di LUAR container = ruang hitam renggang
   antara kontrol player dan "Video Lainnya". */
body.single .app-container {
  min-height: 0;
  padding-bottom: 0;
}

/* D3 — jangan biarkan related menutupi fullscreen player */
.video-area:fullscreen ~ .related-section,
.video-area:-webkit-full-screen ~ .related-section {
  display: none;
}

@media (max-width: 480px) {
  .channel-avatar { width: 48px; height: 48px; }
  .channel-avatar span { font-size: 20px; }
  .channel-name { font-size: 18px; }
  .video-grid { gap: 12px 8px; }
  .related-card { flex: 0 0 168px; width: 168px; min-width: 168px; max-width: 168px; }
  .more-videos-card { flex: 0 0 168px; }
  .app-container {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }
  .channel-header-sticky {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }
}

/* Channel content scrolls with the page so footer below pagination is reachable */
#channel-content {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  overscroll-behavior: auto;
}

.channel-tabs .channel-tab {
  cursor: pointer;
}

/* X17 / X19 — duration + views badges on thumb */
.thumb-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  background: rgba(11, 11, 16, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1.2;
  pointer-events: none;
}

.thumb-views {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(11, 11, 16, 0.70);
  color: rgba(255,255,255,0.9);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1.2;
  pointer-events: none;
}

.thumb-views i {
  font-size: 9px;
  opacity: 0.95;
}

/* X15 — Report button */
.btn-report {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(124, 58, 237, 0.18);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
}
.btn-report:active { transform: scale(0.92); }
.btn-report:hover { background: rgba(239, 68, 68, 0.35); }

/* X7 — virtualized grid */
#video-grid.is-virtualized .video-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}

#video-grid.is-virtualized .video-card:not(.in-view) img.flux-img {
  /* biarkan lazy browser; kartu di luar viewport di-skip layout berat */
  content-visibility: auto;
}

/* ========================================
   DEVICE ADAPTIVE — Tablet & Desktop
   Deteksi lewat viewport (responsive).
   Mobile (≤767px) tetap memakai UI yang sudah ada, tidak dikurangi.
   ======================================== */

/* Tablet: 768px – 1023px */
@media (min-width: 768px) {
  .app-container {
    max-width: 720px;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }

  .related-section,
  .fap-banner-stack {
    max-width: 720px;
  }

  .video-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px 12px;
  }

  .related-card {
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
  }

  .more-videos-card {
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
  }

  .related-header {
    padding: 0 20px;
  }

  .related-scroll {
    padding: 0 20px 8px;
  }

  .channel-header-sticky {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }

  .logo {
    font-size: 30px;
  }

  .related-title {
    font-size: 16px;
  }
}

/* Desktop: ≥1024px */
@media (min-width: 1024px) {
  .app-container {
    max-width: 1200px;
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
  }

  .related-section,
  .fap-banner-stack {
    max-width: 1200px;
  }

  .video-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 18px 14px;
  }

  .related-card {
    flex: 0 0 220px;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
  }

  .more-videos-card {
    flex: 0 0 220px;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
  }

  .related-header {
    padding: 0 24px;
  }

  .related-scroll {
    padding: 0 24px 8px;
  }

  .channel-header-sticky {
    margin-left: -24px;
    margin-right: -24px;
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
  }

  .logo {
    font-size: 32px;
  }

  .related-title {
    font-size: 17px;
  }

  .app-header {
    padding: 18px 4px;
  }
}

/* ========================================
   FLUX 2.6.16 — kunci palet netral
   Kurangi ungu everywhere: surface kembali ke #0B0B10 / #14141A.
   Aksen gradient hanya di kontrol aktif (chip, tombol, badge).
   ======================================== */

:root {
  --bg-body: #0B0B10;
  --flux-surface: #0B0B10;
  --flux-surface-2: #14141A;
  --flux-surface-3: #1C1C24;
  --flux-glow-purple: rgba(124, 58, 237, 0.35);
  --flux-glow-pink: rgba(219, 39, 119, 0.30);
  --text-muted: rgba(255,255,255,0.78);
  --text-soft: rgba(255,255,255,0.62);
}

html, body { background-color: var(--bg-body); }
.app-container { background: var(--flux-surface); }

html {
  scrollbar-color: var(--flux-purple) var(--flux-surface-2);
}
html::-webkit-scrollbar-track { background: var(--flux-surface-2); }
html::-webkit-scrollbar-thumb { background: var(--flux-gradient); }
html::-webkit-scrollbar-thumb:hover { background: var(--flux-purple); }

.video-area {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.45);
}

.play-btn-big {
  background: var(--flux-gradient);
  border: 0;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18), 0 6px 20px rgba(0,0,0,0.45);
}
.play-btn-big i { color: #fff; }

.controls-shadow {
  background: linear-gradient(to top,
    rgba(11,11,16,0.92) 0%,
    rgba(11,11,16,0.70) 28%,
    rgba(11,11,16,0.18) 78%,
    rgba(11,11,16,0) 100%);
}

.progress-bar { background: rgba(255,255,255,0.16); }
.progress-buffered { background: rgba(255,255,255,0.20); }
.progress-thumb { box-shadow: 0 1px 4px rgba(0,0,0,0.45); }

.menu-popup {
  background: rgba(20, 20, 28, 0.97);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.menu-item:not(:last-child)::after { background: rgba(255,255,255,0.06); }
.menu-item:active { background: rgba(255,255,255,0.06); }
.menu-item i { color: rgba(255,255,255,0.72); }

.btn-telegram { box-shadow: 0 4px 14px rgba(219, 39, 119, 0.22); }

.btn-share,
.btn-report {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.btn-share:hover,
.btn-report:hover { background: rgba(255, 255, 255, 0.14); }

.channel-page {
  background-color: var(--bg-body);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
}
.channel-page::before,
.channel-page::after {
  opacity: 0;
  background: none;
}

.channel-header-sticky {
  background: rgba(11, 11, 16, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background-image: none;
}
.channel-header-sticky::before,
.channel-header-sticky::after { opacity: 0.35; filter: blur(10px); }

.channel-header { padding: 6px 0 2px; gap: 14px; }

.channel-avatar {
  width: 56px;
  height: 56px;
  background: var(--flux-surface-3);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.10), 0 6px 16px rgba(0,0,0,0.28);
}
.channel-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.channel-count {
  font-size: 12px;
  color: rgba(255,255,255,0.58);
}

.channel-tabs { display: none; }

.channel-chips {
  display: flex;
  gap: 8px;
  padding: 12px 0 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.channel-chips::-webkit-scrollbar { display: none; }

a.channel-chip,
.channel-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  color: rgba(255,255,255,0.62) !important;
  background: var(--flux-surface-2);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}
a.channel-chip:visited,
.channel-chip:visited {
  color: rgba(255,255,255,0.62) !important;
  text-decoration: none !important;
}
a.channel-chip.active,
.channel-chip.active {
  background: var(--flux-gradient);
  color: #fff !important;
  border-color: transparent;
}
a.channel-chip:not(.active):active,
.channel-chip:not(.active):active { background: #1A1A22; }

.video-grid {
  gap: 14px 10px;
}
.video-thumb {
  border-radius: 10px;
  background: var(--flux-surface-2);
}
.video-card:hover .video-thumb {
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}
.thumb-gradient {
  background: linear-gradient(to top, rgba(11,11,16,0.72) 0%, transparent 100%);
}
.video-title {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  line-height: 1.35;
}
.thumb-views,
.thumb-duration {
  font-size: 10px;
  background: rgba(11,11,16,0.78);
  color: rgba(255,255,255,0.92);
}
.thumb-views i { font-size: 10px; }

.flux-new-mark {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  line-height: 1;
  color: #fff;
  background: var(--flux-gradient);
  pointer-events: none;
}

/* U2 — tombol bookmark di halaman video, sejajar tombol share. */
.video-meta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-bookmark.is-active { background: rgba(168, 85, 247, 0.35); }
.btn-bookmark.is-active svg path { fill: currentColor; }

.page-btn {
  background: var(--flux-surface-2);
  color: rgba(255,255,255,0.82);
}
.page-btn:hover { background: var(--flux-surface-3); }
.page-btn.active { background: var(--flux-gradient); color: #fff; }

.related-section { padding: 22px 0 16px; }
.related-header { padding: 0 16px; margin-bottom: 12px; }
.related-title { font-size: 15px; font-weight: 700; color: #fff; }
.related-more {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.62);
  background: transparent;
  padding: 4px 0;
}
.related-more:hover {
  background: transparent;
  color: #fff;
}

.related-scroll {
  gap: 10px;
  padding: 0 16px 10px 16px;
  scroll-padding-right: 36px;
}
.related-card,
.more-videos-card {
  flex: 0 0 176px;
  width: 176px;
  min-width: 176px;
  max-width: 176px;
}
.related-thumb { border-radius: 10px; background: var(--flux-surface-2); }
.related-card:hover .related-thumb { box-shadow: 0 6px 16px rgba(0,0,0,0.32); }
.related-card-title {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
}
.more-videos-inner {
  background: var(--flux-surface-2);
  border: 1px solid rgba(255,255,255,0.08);
}
.more-videos-inner i { color: rgba(255,255,255,0.45); font-size: 22px; }
.more-videos-inner span { color: rgba(255,255,255,0.62); font-size: 12px; }

.related-section { position: relative; }
.related-section::after {
  content: '';
  position: absolute;
  top: 46px;
  right: 0;
  width: 28px;
  bottom: 18px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(11,11,16,0), var(--flux-surface));
  z-index: 2;
}

.flux-new-pill {
  position: absolute;
  top: 148px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--flux-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35);
  cursor: pointer;
}
.flux-new-pill[hidden] { display: none !important; }

.flux-toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  z-index: 9999;
  min-width: 168px;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(20,20,28,0.96);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.flux-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.flux-toast.is-ok { border: 1px solid rgba(255,255,255,0.08); }
.flux-toast.is-err { border: 1px solid rgba(239,68,68,0.35); }

@media (max-width: 480px) {
  .channel-avatar { width: 56px; height: 56px; }
  .channel-name { font-size: 18px; }
  .related-card,
  .more-videos-card {
    flex: 0 0 168px;
    width: 168px;
    min-width: 168px;
    max-width: 168px;
  }
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px 12px;
  }
  .related-card,
  .more-videos-card {
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
  }
}

@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 18px 14px;
  }
}

/* ========================================
   FLUX 2.6.17 — play icon hover + thumb fade/scale
   ======================================== */
.thumb-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.thumb-play i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--flux-gradient);
  color: #ffffff;
  font-size: 16px;
  margin-left: 0;
  padding-left: 3px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.18), 0 4px 16px var(--flux-glow-purple), 0 0 18px var(--flux-glow-pink);
}
.video-card:hover .thumb-play,
.video-card:focus-visible .thumb-play,
.video-card:active .thumb-play,
.video-card.is-pressing .thumb-play {
  opacity: 1;
}

/* Soft landing halaman video dihapus.
   Transisi hanya pada thumbnail yang diklik: fade + scale ringan ~240ms. */
body.single .app-container,
html.flux-leaving body.channel-page,
html.flux-leaving .channel-page {
  animation: none;
  opacity: 1;
  transform: none;
}
.video-card.is-opening {
  transform: none;
  pointer-events: none;
}
.video-card.is-opening .video-thumb {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.24s ease, transform 0.24s ease;
}
.video-card.is-opening .video-thumb img.flux-img {
  transform: none;
}

@keyframes flux-sig-flow {
  0% { transform: translateX(-30%); }
  100% { transform: translateX(280%); }
}
#flux-sig-load {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 100000;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  background: rgba(255,255,255,0.06);
  transition: opacity 0.18s ease;
}
#flux-sig-load.is-on {
  opacity: 1;
}
#flux-sig-load.is-on::after {
  content: "";
  display: block;
  height: 100%;
  width: 36%;
  background: linear-gradient(90deg, transparent, #7c3aed, #db2777, transparent);
  animation: flux-sig-flow 0.85s ease-in-out infinite;
}

.play-btn-spinner {
  width: 28px;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: rgba(255,255,255,0.16);
  overflow: hidden;
  animation: none;
}
.play-btn-spinner::after {
  content: "";
  position: absolute;
  left: -40%;
  top: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: flux-sig-flow 0.8s ease-in-out infinite;
}
.spinner {
  width: 42%;
  max-width: 168px;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: rgba(255,255,255,0.14);
  overflow: hidden;
  animation: none;
  position: relative;
}
.spinner::after {
  content: "";
  position: absolute;
  left: -40%;
  top: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, #7c3aed, #db2777, transparent);
  animation: flux-sig-flow 0.9s ease-in-out infinite;
}

@media (max-width: 480px) {
  .channel-name { font-size: 18px; }
}

/* ========================================
   TOPBAR 123AV-style (build 2618)
   ======================================== */

:root {
  --flux-topbar-h: 58px;
  --flux-accent-hot: #ff3b6b;
  --flux-icon-bg: #1c1c22;
  --flux-icon-bg-hover: #26262e;
}

body.has-flux-topbar {
  padding-top: calc(var(--flux-topbar-h) + env(safe-area-inset-top, 0px));
}

body.has-flux-topbar .channel-page {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.flux-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: calc(var(--flux-topbar-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: #0a0a0d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.flux-topbar-inner {
  height: var(--flux-topbar-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flux-brand {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none !important;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.flux-brand-head,
.flux-brand-tail {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.flux-brand-head {
  color: #fff;
}

.flux-brand-tail {
  color: var(--flux-accent-hot);
}

.flux-brand-dot {
  width: 7px;
  height: 7px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--flux-accent-hot);
  display: inline-block;
  transform: translateY(-1px);
}

.flux-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flux-icon-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: var(--flux-icon-bg);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s, transform 0.12s;
}

.flux-icon-btn:hover { background: var(--flux-icon-bg-hover); }
.flux-icon-btn:active { transform: scale(0.94); }

.flux-lang-wrap {
  position: relative;
}

.flux-lang-btn {
  height: 42px;
  min-width: 86px;
  padding: 0 10px 0 8px;
  border: none;
  border-radius: 12px;
  background: var(--flux-icon-bg);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  transition: background 0.15s;
}

.flux-lang-btn:hover { background: var(--flux-icon-bg-hover); }

.flux-lang-flag {
  font-size: 16px;
  line-height: 1;
}

.flux-lang-caret {
  font-size: 9px;
  opacity: 0.7;
  margin-left: 2px;
}

.flux-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #16161c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 320;
}

.flux-lang-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
}

.flux-lang-item:hover { background: rgba(255, 255, 255, 0.06); }
.flux-lang-item-label { flex: 1; }
.flux-lang-item-code { opacity: 0.45; font-size: 11px; font-weight: 700; }
.flux-lang-reset { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 4px; }

.flux-search-panel {
  position: fixed;
  top: calc(var(--flux-topbar-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 310;
  background: #0a0a0d;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 10px 16px 14px;
}

.flux-search-form {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1c1c22;
  border-radius: 14px;
  padding: 0 10px;
  height: 44px;
}

.flux-search-leading { color: rgba(255,255,255,0.45); }
.flux-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
}
.flux-search-input::placeholder { color: rgba(255,255,255,0.35); }
/* Sembunyikan tombol clear bawaan browser (dobel dengan tombol close tema). */
.flux-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.flux-search-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.flux-cat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 330;
}

.flux-cat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 86vw);
  height: 100%;
  background: #121218;
  z-index: 340;
  transform: translateX(104%);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  box-shadow: -12px 0 40px rgba(0,0,0,0.4);
}

.flux-cat-drawer.open { transform: translateX(0); }

.flux-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.flux-cat-title {
  font-size: 18px;
  font-weight: 800;
}

.flux-cat-list {
  overflow-y: auto;
  padding: 8px;
  flex: 1;
}

.flux-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  color: rgba(255,255,255,0.88) !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
}

.flux-cat-item:hover { background: rgba(255,255,255,0.05); }
/* U6 — baris urut di halaman kategori/tag: pill horizontal pakai gaya .flux-cat-item */
/* U7 — breadcrumb halaman video */
.flux-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  margin: 2px 0 10px;
  overflow: hidden;
}
.flux-breadcrumb a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  flex: none;
}
.flux-breadcrumb a:hover { color: #fff; }
.flux-breadcrumb-sep {
  color: rgba(255,255,255,.25);
  flex: none;
}
.flux-breadcrumb-current {
  color: rgba(255,255,255,.85);
  min-width: 0; /* flex item harus boleh menyusut agar ellipsis jalan */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* U8 — filter cari di halaman Riwayat & Tonton Nanti */
.flux-lib-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.flux-lib-filter {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  width: 160px;
}
.flux-lib-filter::placeholder { color: rgba(255,255,255,.35); }
/* U9 — tombol susun ulang antrean Tonton Nanti */
.flux-reorder {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flux-reorder button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(10,10,14,.75);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.flux-reorder button:hover { background: rgba(255,255,255,.22); }
.flux-reorder button:disabled { opacity: .25; cursor: default; }
/* U10 — halaman indeks tag */
.flux-tag-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.flux-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.flux-tag-pill:hover { background: rgba(255,255,255,.12); }
.flux-tag-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--flux-gradient);
  border-radius: 999px;
  padding: 2px 8px;
  color: #fff;
}
.flux-cat-item.active {
  background: var(--flux-gradient);
  color: #fff !important;
}
.flux-cat-count {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
}
.flux-cat-empty {
  padding: 20px 12px;
  color: rgba(255,255,255,0.45);
}

.flux-gt-hidden,
#google_translate_element,
.goog-te-banner-frame,
.skiptranslate,
iframe.skiptranslate,
.goog-te-gadget {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}
body { top: 0 !important; }
.flux-search-panel[hidden],
.flux-lang-menu[hidden],
.flux-cat-overlay[hidden] {
  display: none !important;
}

.player-toolbar { display: none !important; }

.video-meta {
  max-width: 720px;
  width: 100%;
  margin: 16px auto 8px;
  padding: 0 2px 12px;
}

.video-meta-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  margin: 0 0 12px;
}

.video-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.video-meta-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.52);
  font-size: 13px;
}

.video-meta-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.video-meta-stat i {
  font-size: 12px;
  opacity: 0.85;
}

.btn-share.video-meta-share {
  width: 42px;
  height: 34px;
  border-radius: 999px;
  background: #1c1c24;
  color: #fff;
  border: none;
  flex-shrink: 0;
}

.btn-share.video-meta-share:hover {
  background: #26262e;
}

.video-details {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  margin-bottom: 18px;
}

.video-details-heading {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 10px;
}

.video-details-body {
  max-height: none;
  overflow: visible;
}
.video-details-body:not(.is-expanded) {
  max-height: 9.6em;
  overflow: hidden;
}

.video-details-body.is-expanded {
  max-height: none;
}

.video-details-text {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.62);
  white-space: pre-wrap;
}

.video-details-more {
  margin-top: 12px;
  border: none;
  background: color-mix(in srgb, var(--flux-pink) 16%, var(--flux-surface-2));
  color: var(--flux-pink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.video-details-more i { font-size: 11px; }

/* Metadata avdbapi — disamakan dengan gaya baris Tags/Code
   (label abu, value terang; link memakai pill .video-tag). */
.video-avdb-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.video-avdb-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: start;
  font-size: 13px;
}
.video-avdb-row dt {
  margin: 0;
  color: rgba(255,255,255,0.45);
  font-size: 14px;
}
.video-avdb-row dd {
  margin: 0;
  color: rgba(255,255,255,0.88);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-wrap: anywhere;
}

.video-tags {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 16px;
  align-items: start;
  padding-bottom: 8px;
}

.video-tags-label {
  color: rgba(255,255,255,0.45);
  font-size: 14px;
  padding-top: 6px;
}


.video-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #1c1c24;
  color: rgba(255,255,255,0.88) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
}

.video-tag:hover { background: #26262e; }

.channel-archive-title {
  padding: 6px 0 12px;
}
.channel-archive-title h1 {
  font-size: 18px;
  font-weight: 800;
}
.channel-archive-title p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

body.flux-cat-open,
body.flux-search-open {
  overflow: hidden;
}

@media (min-width: 1024px) {
  .flux-topbar-inner { padding: 0 24px; }
  .flux-brand-head,
  .flux-brand-tail { font-size: 28px; }
}



/* ========================================
   SITE FOOTER (below pagination)
   ======================================== */

.flux-site-footer {
  width: 100%;
  background: #1a1a1f;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 0;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom, 0px));
}

.flux-site-footer-inner {
  max-width: 720px;
  margin: 0 auto;
}

.flux-footer-brand {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none !important;
  line-height: 1;
  margin-bottom: 16px;
}

.flux-footer-blurb {
  color: rgba(255,255,255,0.52);
  font-size: 14px;
  line-height: 1.6;
  max-width: 420px;
  margin: 0 0 28px;
}

.flux-footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 16px;
  margin-bottom: 28px;
}

.flux-footer-heading {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 14px;
}

.flux-footer-col a {
  display: block;
  color: rgba(255,255,255,0.62) !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
}

.flux-footer-col a:hover {
  color: #fff !important;
}

.flux-footer-legal {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px;
  margin-top: 8px;
}

.flux-footer-18 {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 24px;
  padding: 0 6px;
  border: 1.5px solid var(--flux-accent-hot);
  border-radius: 6px;
  color: var(--flux-accent-hot);
  font-size: 11px;
  font-weight: 800;
}

.flux-footer-copy {
  color: rgba(255,255,255,0.48);
  font-size: 12px;
  line-height: 1.4;
}

.flux-footer-policy {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
}

.flux-footer-policy a {
  color: rgba(255,255,255,0.55) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
}

.flux-footer-policy a:hover {
  color: #fff !important;
}

.flux-footer-about { margin: 0; }
.flux-footer-bottom { margin: 0; }

html, body {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
}


/* Popular slider + recommend heading */
.flux-popular-slider {
  margin: 14px 0 0;
  padding: 0;
}
.flux-popular-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 2px 2px;
}
.flux-popular-track::-webkit-scrollbar { display: none; }
.flux-popular-card {
  flex: 0 0 calc(50% - 5px);
  max-width: calc(50% - 5px);
  scroll-snap-align: start;
  text-decoration: none !important;
  color: inherit;
  min-width: 0;
}
.flux-popular-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #14141A;
}
.flux-popular-thumb img,
.flux-popular-thumb .flux-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.flux-popular-plus {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(20,20,24,0.72);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}
.flux-popular-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(11,11,16,0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
}
.flux-popular-title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flux-popular-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 12px 0 4px;
}
.flux-popular-dot {
  width: 7px;
  height: 7px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  cursor: pointer;
}
.flux-popular-dot.is-active {
  background: var(--flux-pink);
}

.flux-recommend-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.flux-recommend-bar {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--flux-gradient);
  flex-shrink: 0;
}

/* U3 — link "View all" di heading rail Recently watched + halaman riwayat. */
.flux-rail-more {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--flux-purple-light, #c084fc);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.flux-rail-more:hover { text-decoration: underline; }
.flux-lib-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.flux-lib-clear {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main, #fff);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}
.flux-lib-clear:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
}
.flux-lib-clear:active { transform: scale(0.96); }
.flux-lib-empty {
  text-align: center;
  color: #9ca3af;
  padding: 48px 16px;
  font-size: 15px;
}

/* U4 — popup share kecil. Mobile: bottom sheet; desktop: dialog tengah.
   U5 — popup laporkan memakai struktur & animasi yang sama. */
.flux-share-popup,
.flux-report-popup {
  position: fixed;
  inset: 0;
  z-index: 200;
}
.flux-share-popup[hidden],
.flux-report-popup[hidden] { display: none; }
.flux-share-backdrop,
.flux-report-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.flux-share-sheet,
.flux-report-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--flux-surface-2, #14141c);
  border-radius: 20px 20px 0 0;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: fluxShareUp 0.22s ease-out;
  max-height: 80vh;
  overflow-y: auto;
}
@keyframes fluxShareUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.flux-share-head,
.flux-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 12px;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.flux-share-close,
.flux-report-close {
  background: none;
  border: 0;
  color: #9ca3af;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.flux-share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.flux-share-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.flux-share-opt:active { transform: scale(0.96); }
.flux-share-ic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
}
.flux-share-ic svg { width: 22px; height: 22px; display: block; }
.flux-share-ic.is-wa { background: rgba(37, 211, 102, 0.16); color: #25d366; }
.flux-share-ic.is-tg { background: rgba(34, 158, 217, 0.16); color: #229ed9; }
.flux-share-ic.is-x { background: rgba(255, 255, 255, 0.1); color: #fff; }
.flux-share-ic.is-fb { background: rgba(24, 119, 242, 0.16); color: #1877f2; }
.flux-share-ic.is-copy { background: rgba(124, 58, 237, 0.16); color: #c084fc; }
.flux-share-ic.is-more { background: rgba(255, 255, 255, 0.08); color: #fff; }
body.flux-share-open,
body.flux-report-open { overflow: hidden; }

@media (min-width: 768px) {
  .flux-share-sheet,
  .flux-report-sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: 380px;
    border-radius: 20px;
    padding-bottom: 20px;
    /* U4-fix: transform harus ada di base style, bukan cuma di keyframes —
       kalau tidak, dialog meleset ke kanan-bawah setelah animasi selesai. */
    transform: translate(-50%, -50%);
    animation: fluxSharePop 0.18s ease-out;
  }
  @keyframes fluxSharePop {
    from { transform: translate(-50%, -48%) scale(0.96); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  }
}

/* U5 — QR view di dalam popup share + form laporkan. */
.flux-share-qrview[hidden] { display: none; }
.flux-share-grid[hidden] { display: none; } /* U5-fix: display:grid mengalahkan [hidden] tanpa ini */
.flux-share-qrback {
  background: none;
  border: 0;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 4px 12px;
  font-family: inherit;
}
.flux-share-qrimg-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.flux-share-qrimg-wrap img {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.flux-share-qrurl {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  word-break: break-all;
  margin: 8px 4px 0;
}
.flux-share-qrerr[hidden] { display: none; }
.flux-share-qrerr {
  text-align: center;
  color: #f87171;
  font-size: 13px;
}
.flux-share-qrhint {
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  margin: 8px 0 4px;
}
.flux-share-ic.is-qr { background: rgba(255, 255, 255, 0.08); color: #fff; }

.flux-report-reasons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.flux-report-reasons label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.flux-report-reasons input[type="radio"] { accent-color: #7c3aed; }
#flux-report-note {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  padding: 10px 12px;
  resize: vertical;
  margin-bottom: 12px;
}
#flux-report-note::placeholder { color: #6b7280; }
.flux-report-submit {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #7c3aed;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  padding: 13px;
  cursor: pointer;
}
.flux-report-submit:disabled { opacity: 0.55; cursor: default; }
.btn-report.is-reported { opacity: 0.45; }

.flux-legal-wrap {
  padding-top: 18px;
  padding-bottom: 32px;
}
.flux-legal-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 16px;
}
.flux-legal-body {
  color: rgba(255,255,255,0.72);
  font-size: 15px;
  line-height: 1.7;
}
.flux-legal-body h2,
.flux-legal-body h3 {
  color: var(--text-main, #fff);
  font-size: 18px;
  margin: 22px 0 8px;
}
.flux-legal-body p { margin: 0 0 12px; }
.flux-legal-body a { color: #ff7aa0; }

@media (min-width: 768px) {
  .app-container,
  .channel-page {
    min-height: 0 !important;
    height: auto !important;
  }
  #channel-content {
    flex: 0 0 auto !important;
  }
  .flux-site-footer {
    margin-top: 8px;
  }
}

/* Related videos grid (replaces horizontal More Videos) */
.related-section {
  max-width: 480px;
  width: 100%;
  margin: 8px auto 0;
  padding: 16px 16px 24px;
  box-sizing: border-box;
}
.related-section::after {
  display: none !important;
  content: none !important;
}
.related-header {
  display: block;
  padding: 0 0 12px;
  margin-bottom: 0;
}
.related-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.related-section .related-scroll {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px 10px !important;
  overflow: visible !important;
  flex-wrap: unset !important;
  flex-direction: unset !important;
  padding: 0 !important;
  scroll-snap-type: none !important;
}
.related-section .related-card,
.related-section .more-videos-card {
  flex: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}
.related-card-title {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255,255,255,0.92);
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-meta {
  margin-top: 3px;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.3;
  color: rgba(255,255,255,0.48) !important;
}
.related-section .thumb-views,
.related-section .thumb-duration {
  font-size: 10px;
}
.more-videos-card { display: none !important; }

.video-cats { margin-bottom: 10px; }

.flux-popular-plus {
  display: none !important;
}

@media (min-width: 768px) {
  .related-section,
  .fap-banner-stack {
    max-width: 720px;
  }
  .related-section {
    padding: 18px 20px 28px;
  }
  .related-scroll {
    gap: 18px 12px;
    padding: 0;
  }
}
@media (min-width: 1024px) {
  .related-section,
  .fap-banner-stack {
    max-width: 1200px;
  }
  .related-section {
    padding: 20px 24px 32px;
  }
}

/* Desktop layout — 3 kolom seperti referensi */
@media (min-width: 768px) {
  .app-container,
  .related-section,
  .fap-banner-stack,
  .video-meta {
    max-width: 920px !important;
  }
  .video-grid,
  .related-section .related-scroll {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 16px 12px !important;
  }
  .flux-topbar-inner {
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
  }
}
@media (min-width: 1024px) {
  .app-container,
  .related-section,
  .fap-banner-stack,
  .video-meta {
    max-width: 1200px !important;
  }
  .video-grid,
  .related-section .related-scroll {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 18px 14px !important;
  }
  .flux-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
  }
  .video-meta-title {
    font-size: 22px;
  }
  .related-title {
    font-size: 20px;
    font-weight: 800;
  }
  .flux-popular-card {
    flex: 0 0 calc(33.333% - 8px);
    max-width: calc(33.333% - 8px);
  }
}
@media (min-width: 1440px) {
  .app-container,
  .related-section,
  .fap-banner-stack,
  .video-meta {
    max-width: 1280px !important;
  }
  .flux-topbar-inner {
    max-width: 1280px;
  }
}

/* Footer desktop — posisi & warna seperti referensi */
.flux-site-footer {
  background: var(--flux-footer-bg, #1a1a1f) !important;
}
.flux-footer-blurb {
  color: var(--flux-footer-muted, rgba(220,220,225,0.62));
}
.flux-footer-col a,
.flux-footer-policy a,
.flux-footer-copy {
  color: var(--flux-footer-muted, rgba(220,220,225,0.68)) !important;
}
.flux-footer-heading {
  color: #f2f2f4;
}

@media (min-width: 768px) {
  .flux-site-footer {
    padding: 40px 32px 28px;
  }
  .flux-site-footer-inner {
    max-width: 1120px;
  }
  .flux-footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 24px 48px;
    max-width: 420px;
  }
}

@media (min-width: 1024px) {
  .flux-site-footer {
    padding: 48px 40px 32px;
  }
  .flux-site-footer-inner {
    max-width: 1200px;
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(280px, 1fr);
    grid-template-areas:
      "about cols"
      "bottom bottom";
    column-gap: 64px;
    row-gap: 36px;
    align-items: start;
  }
  .flux-footer-about {
    grid-area: about;
  }
  .flux-footer-brand {
    margin-bottom: 14px;
  }
  .flux-footer-blurb {
    max-width: 340px;
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
  }
  .flux-footer-cols {
    grid-area: cols;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 48px;
    max-width: none;
    margin-bottom: 0;
    justify-self: end;
    width: min(420px, 100%);
  }
  .flux-footer-heading {
    margin-bottom: 16px;
  }
  .flux-footer-col a {
    padding: 5px 0;
    font-size: 15px;
  }
  .flux-footer-bottom {
    grid-area: bottom;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
  }
  .flux-footer-legal {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
  }
  .flux-footer-policy {
    margin-top: 0;
    gap: 20px;
  }
}

.flux-search-assist {
  max-width: 480px;
  margin: 0 auto;
  padding: 4px 16px 16px;
}
.flux-search-history,
.flux-search-suggest {
  background: rgba(16,16,22,.92);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 10px;
  margin: 8px 0 0;
  backdrop-filter: blur(16px);
}
.flux-search-assist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.42);
  margin: 2px 4px 10px;
}
.flux-search-hist-clear {
  border: 0;
  background: rgba(255,255,255,.06);
  color: var(--flux-pink, #ff4d7a);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 999px;
  padding: 4px 10px;
}
.flux-search-chip,
.flux-search-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 10px 10px;
  border-radius: 12px;
  margin: 0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.flux-search-chip i,
.flux-search-suggest-thumb {
  width: 64px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
  background: rgba(255,255,255,.06);
}
.flux-search-suggest-item em {
  color: rgba(255,255,255,.45);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  min-width: 64px;
}
.flux-search-chip:hover,
.flux-search-suggest-item:hover {
  background: rgba(255,255,255,.06);
}
.flux-search-assist-empty { color: rgba(255,255,255,.45); font-size: 13px; padding: 8px 4px; }
.flux-search-empty h2 { font-size: 18px; margin: 8px 0 16px; }
.flux-home-row { margin: 2px 0 18px; }
.video-tags-list.is-collapsed {
  max-height: none;
  overflow: visible;
}
.video-tags-col { min-width: 0; }
.video-tags-more {
  margin-top: 10px;
  white-space: nowrap;
  width: auto;
  max-width: none;
}
.flux-player-poster {
  position: absolute;
  inset: 0;
  background: #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
}
.flux-player-poster img,
.flux-player-poster .flux-player-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}
.flux-player-poster .play-overlay {
  z-index: 3;
}
.flux-server-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px 0;
}
.flux-server-btn {
  border: 1px solid var(--flux-pink);
  background: color-mix(in srgb, var(--flux-pink) 16%, var(--flux-surface-2));
  color: var(--flux-pink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.flux-server-btn.is-active {
  background: var(--flux-gradient);
  color: #fff;
  border-color: transparent;
}
.flux-trending-tags { padding: 0 0 12px; }
.flux-trending-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.flux-trend-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--flux-surface-2);
  border: 1px solid color-mix(in srgb, var(--flux-pink) 35%, transparent);
  font-size: 12px;
  font-weight: 700;
}
.flux-trend-tag span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flux-trend-tag em {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  color: var(--flux-pink);
  background: color-mix(in srgb, var(--flux-pink) 16%, transparent);
  border-radius: 999px;
  padding: 2px 7px;
}
.flux-trend-tag:hover {
  background: var(--flux-gradient);
  border-color: transparent;
  color: #fff !important;
}
.flux-trend-tag:hover em {
  background: rgba(255,255,255,.18);
  color: #fff;
}
