/* =========================================================================
   SCOOPZ FLOW — All-in-One Viral & Crazy Video Streaming App
   Aesthetic: Ultra-Sleek Glassmorphic Dark Obsidian with Electric Neons
   ========================================================================= */

:root {
  --bg-black: #06070a;
  --bg-surface: #0d0f17;
  --bg-card: rgba(20, 24, 35, 0.7);
  --bg-glass: rgba(15, 18, 28, 0.65);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.35);

  --accent-pink: #ff2a6d;
  --accent-cyan: #00f0ff;
  --accent-gold: #ffbe0b;
  --accent-green: #05ffa1;
  --accent-purple: #7928ca;

  --text-primary: #ffffff;
  --text-secondary: #a0a6b8;
  --text-muted: #5e6578;

  --grad-omni: linear-gradient(135deg, #00f0ff 0%, #7928ca 50%, #ff2a6d 100%);
  --grad-scoopz: linear-gradient(135deg, #00f0ff 0%, #7928ca 50%, #ff2a6d 100%);
  --grad-cyan: linear-gradient(135deg, #00f0ff 0%, #7000ff 100%);
  --grad-overlay: linear-gradient(180deg, rgba(6,7,10,0.5) 0%, transparent 20%, transparent 70%, rgba(6,7,10,0.92) 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.2, 0, 0, 1);
  --transition-smooth: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-neon: 0 0 24px rgba(255, 42, 109, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  height: -webkit-fill-available;
  overflow: hidden;
  background-color: var(--bg-black);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

/* Ambient Backdrop Glow for Desktop Canvas */
.app-ambient-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(80px) brightness(0.25) saturate(1.8);
  transform: scale(1.15);
  transition: background-image 0.6s ease;
  pointer-events: none;
}

/* Main App Wrapper (Centered Theater Canvas on Desktop, 100% on Mobile) */
.app-viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  max-width: 480px;
  margin: 0 auto;
  background-color: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

@media (min-width: 768px) {
  .app-viewport {
    height: 94vh;
    margin: 3vh auto;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* =========================================================================
   FLOATING TOP BAR (Two-Row Layout — No Overflow)
   ========================================================================= */

.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 8px;
  background: linear-gradient(180deg, rgba(6,7,10,0.88) 0%, rgba(6,7,10,0.55) 70%, transparent 100%);
  backdrop-filter: blur(10px);
}

/* Row 1: Brand + Counter + Controls */
.header-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  /*
   * This row overflowed on phones. With nothing allowed to shrink, the brand,
   * the clip counter and the region pill pushed the action buttons past the
   * right edge — on a 375px screen the settings gear sat at x=392, entirely
   * off-screen and impossible to tap. The controls now hold their size and
   * the text blocks give way instead.
   */
  gap: 6px;
  min-width: 0;
}

/* Labels yield first... */
.header-row-top .brand-badge,
.header-row-top .region-pill {
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
}

.header-row-top .region-pill span,
.header-row-top .brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ...the buttons never do. */
.header-row-top .header-actions {
  flex-shrink: 0;
}

/* On narrow screens drop the two most expendable labels outright, so the
   controls keep full-size touch targets instead of being squeezed. */
@media (max-width: 420px) {
  .header-row-top .clip-counter {
    display: none;
  }
  .header-row-top .region-pill #activeRegionLabel {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.3px;
  cursor: pointer;
}

.brand-icon {
  font-size: 16px;
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.brand-text {
  background: var(--grad-omni);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* Live Clip Counter Badge */
.clip-counter {
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.2px;
  white-space: nowrap;
  animation: counter-glow 3s infinite ease-in-out;
}

@keyframes counter-glow {
  0%, 100% { border-color: rgba(0, 240, 255, 0.2); }
  50% { border-color: rgba(0, 240, 255, 0.5); box-shadow: 0 0 8px rgba(0, 240, 255, 0.2); }
}

/* Row 2: Source Switcher Chips (Horizontally Scrollable) */
.source-switcher {
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  gap: 2px;
}

.source-switcher::-webkit-scrollbar {
  display: none;
}

.source-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.source-chip:hover {
  color: var(--text-primary);
}

.source-chip.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.source-chip[data-source="omni"].active,
.source-chip[data-source="scoopz"].active {
  background: var(--grad-omni);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

.source-chip[data-source="shorts"].active {
  background: #ff0000;
  color: #fff;
}

.source-chip[data-source="tiktok"].active {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #000;
  font-weight: 700;
}

.source-chip[data-source="pexels"].active {
  background: linear-gradient(135deg, #05a081 0%, #0d7377 100%);
  color: #fff;
}

.source-chip[data-source="pixabay"].active {
  background: linear-gradient(135deg, #00c853 0%, #009624 100%);
  color: #fff;
}

.source-chip[data-source="indie"].active {
  background: var(--grad-cyan);
  color: #fff;
}

/* Chip Platform Icons */
.chip-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.chip-icon-yt {
  color: #ff0000;
  font-size: 10px;
  font-weight: 900;
}

.chip-icon-tt {
  font-size: 13px;
}

.chip-icon-px {
  font-size: 11px;
}

.chip-icon-pb {
  font-size: 11px;
}

/* Top Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-header {
  /*
   * 36px drawn, 44px touchable. These measured 31x36 in practice, well under
   * the 44px minimum, which made the settings gear genuinely hard to hit on a
   * phone. The negative margin keeps the visual size and header layout
   * unchanged while the hit area extends past the border.
   */
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  position: relative;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 18, 28, 0.6);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  backdrop-filter: blur(12px);
}

/* Invisible 44x44 hit area centred on each header icon button, so the
   drawn size stays 36px but the touch target meets the minimum. */
.btn-icon-header::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}


.btn-icon-header:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

/* Auto-Scroll Indicator Pill */
.autoscroll-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 18, 28, 0.65);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.autoscroll-pill.active {
  border-color: rgba(5, 255, 161, 0.4);
  background: rgba(5, 255, 161, 0.12);
  color: var(--accent-green);
}

.progress-ring {
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
}

.progress-ring-circle {
  stroke: var(--accent-green);
  stroke-width: 2.5;
  stroke-dasharray: 44;
  stroke-dashoffset: 44;
  transition: stroke-dashoffset 0.1s linear;
  fill: transparent;
}

/* =========================================================================
   VERTICAL FEED CAROUSEL (Scroll-Snap Container)
   ========================================================================= */

.feed-container {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feed-container::-webkit-scrollbar {
  display: none;
}

/* Individual Video Slide */
.video-slide {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  overflow: hidden;
  touch-action: pan-y;
}

/* Video Stage */
.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
  image-rendering: -webkit-optimize-contrast;
}

.yt-player {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #000;
  pointer-events: none;
}

/* Dark Vignette Overlay */
.slide-vignette {
  position: absolute;
  inset: 0;
  background: var(--grad-overlay);
  pointer-events: none;
}

/* Play/Pause Center Indicator (Animates on tap) */
.center-tap-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
  z-index: 40;
}

.center-tap-indicator.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Heart Particle Burst on Double Tap */
.heart-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 90px;
  height: 90px;
  color: var(--accent-pink);
  filter: drop-shadow(0 0 16px var(--accent-pink));
  pointer-events: none;
  opacity: 0;
  z-index: 15;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
}

.heart-burst.burst {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.3);
}

/* =========================================================================
   RIGHT FLOATING ACTION COLUMN
   ========================================================================= */

.action-bar {
  position: absolute;
  right: 10px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.action-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.action-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 18, 26, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1), background 0.15s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.action-btn svg {
  width: 19px;
  height: 19px;
}

.action-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.18);
}

.action-btn:active {
  transform: scale(0.92);
}

.action-btn.liked {
  background: rgba(255, 42, 109, 0.25);
  border-color: var(--accent-pink);
  color: var(--accent-pink);
  filter: drop-shadow(0 0 10px rgba(255, 42, 109, 0.5));
}

.action-btn.btn-remove-clip:hover {
  background: rgba(255, 59, 48, 0.28);
  border-color: rgba(255, 59, 48, 0.65);
  color: #ff453a;
  transform: scale(1.08);
}

.action-btn.btn-zoom-cycle.zoomed {
  background: rgba(255, 170, 0, 0.3);
  border-color: rgba(255, 170, 0, 0.7);
  color: #ffb703;
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(255, 183, 3, 0.4);
}

.action-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  line-height: 1;
}

/* Intensity Meter Pill */
.intensity-pill {
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 42, 109, 0.25);
  border: 1px solid rgba(255, 42, 109, 0.4);
  color: var(--accent-pink);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Responsive Action Column Scaling for Short Windows & Landscape */
@media (max-height: 640px) {
  .action-bar {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 4px;
    right: 8px;
  }
  .action-btn {
    width: 34px;
    height: 34px;
  }
  .action-btn svg {
    width: 17px;
    height: 17px;
  }
  .action-label {
    font-size: 9px;
  }
  .intensity-pill {
    padding: 1px 5px;
    font-size: 8px;
  }
}

@media (max-height: 500px) {
  .action-bar {
    bottom: 6px;
    gap: 2px;
  }
  .action-btn {
    width: 30px;
    height: 30px;
  }
  .action-btn svg {
    width: 15px;
    height: 15px;
  }
  .action-label {
    display: none;
  }
}

/* =========================================================================
   BOTTOM METADATA OVERLAY
   ========================================================================= */

.metadata-overlay {
  position: absolute;
  left: 0;
  right: 68px; /* Leave space for right action column */
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.creator-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.creator-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.creator-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.source-badge-pill {
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Follow Creator / Channel Button */
.btn-follow {
  margin-left: 6px;
  padding: 3.5px 11px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ff2a6d 0%, #d97706 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 2px 8px rgba(255, 42, 109, 0.4);
  backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  user-select: none;
}

.btn-follow:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 12px rgba(255, 42, 109, 0.6);
}

.btn-follow:active {
  transform: scale(0.96);
}

.btn-follow.following {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: none;
}

.video-title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.95);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-item {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-cyan);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Scrubbable Progress Line */
/* Scrubbable Timeline Progress Line with Grab Handle */
.timeline-bar-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(0px + env(safe-area-inset-bottom, 0px));
  height: 36px; /* Generous 36px hit area for easy touch and mouse grab */
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  z-index: 50;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none; /* Prevents vertical scrolling while dragging timeline */
  padding-bottom: 2px;
}

.timeline-bar-wrap.scrubbing {
  cursor: grabbing;
}

.timeline-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  position: relative;
  transition: height 0.15s cubic-bezier(0.2, 0, 0, 1), background 0.15s ease;
  overflow: visible;
}

.timeline-bar-wrap:hover .timeline-track,
.timeline-bar-wrap.scrubbing .timeline-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.timeline-buffer {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.2s ease;
  pointer-events: none;
}

.timeline-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f2fe 0%, #4facfe 50%, #ff2a6d 100%);
  position: relative;
  transition: width 0.08s linear;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
}

.timeline-bar-wrap.scrubbing .timeline-fill {
  transition: none; /* Instant feedback while dragging */
}

/* Grab Thumb Handle */
.timeline-thumb {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%) scale(0.7);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #00f2fe;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.9), 0 2px 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  opacity: 0.85;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1), opacity 0.15s ease, border-color 0.15s ease;
}

.timeline-bar-wrap:hover .timeline-thumb,
.timeline-bar-wrap.scrubbing .timeline-thumb {
  opacity: 1;
  transform: translateY(-50%) scale(1.35);
  border-color: #ff2a6d;
  box-shadow: 0 0 18px rgba(255, 42, 109, 0.95), 0 2px 8px rgba(0, 0, 0, 0.85);
}

/* Floating Time Preview Bubble */
.timeline-bubble {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(10, 14, 23, 0.96);
  border: 1px solid rgba(0, 242, 254, 0.6);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.2, 0, 0, 1);
  white-space: nowrap;
  backdrop-filter: blur(16px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 242, 254, 0.3);
  z-index: 60;
}

.timeline-bar-wrap:hover .timeline-bubble,
.timeline-bar-wrap.scrubbing .timeline-bubble {
  opacity: 1;
}

/* =========================================================================
   DESKTOP KEYBOARD CONTROLS HUD (Dell XPS optimization)
   ========================================================================= */

.desktop-hud {
  display: none;
}

@media (min-width: 900px) {
  .desktop-hud {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: rgba(15, 18, 28, 0.7);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }

  .hud-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-secondary);
  }

  .kbd-key {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
  }
}

/* =========================================================================
   SETTINGS & ADMIN SLIDE-OUT DRAWER
   ========================================================================= */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: flex-end;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-card {
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
}

.drawer-overlay.open .drawer-card {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-group-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}

.setting-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}

.setting-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Speed Button Selector Group */
.speed-btn-group {
  display: flex;
  gap: 6px;
}

.speed-btn {
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.speed-btn.active {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  color: #fff;
}

/* Switch Component */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-full);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background: var(--grad-scoopz);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Custom Video Ingest Form */
.custom-feed-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scoopz-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.scoopz-input:focus {
  border-color: var(--accent-cyan);
}

.btn-submit-clip {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--grad-scoopz);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-submit-clip:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* =========================================================================
   GREEN OCTAGON WITH +18 BUTTON
   ========================================================================= */

.btn-octagon-wrap {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-octagon-wrap:hover {
  transform: scale(1.08);
}

.btn-octagon-wrap:active {
  transform: scale(0.95);
}

/* Authentic geometric regular octagon */
.green-octagon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #05ffa1 0%, #00b874 100%);
  clip-path: polygon(29% 0%, 71% 0%, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0% 71%, 0% 29%);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(5, 255, 161, 0.55));
  position: relative;
  transition: filter 0.2s ease, background 0.2s ease;
}

.green-octagon:hover {
  filter: drop-shadow(0 0 16px rgba(5, 255, 161, 0.9));
  background: linear-gradient(135deg, #26ffb0 0%, #00d688 100%);
}

.btn-octagon-wrap.unlocked .green-octagon {
  background: linear-gradient(135deg, #05ffa1 0%, #008f58 100%);
  filter: drop-shadow(0 0 12px rgba(5, 255, 161, 0.8));
  animation: octagon-pulse 2s infinite ease-in-out;
}

@keyframes octagon-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(5, 255, 161, 0.5)); }
  50% { filter: drop-shadow(0 0 18px rgba(5, 255, 161, 0.95)); }
}

.octagon-number {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: #032014; /* Deep emerald contrast against bright green */
  user-select: none;
}

/* Mini Octagon inside the top source switcher chip */
.mini-green-octagon {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #05ffa1 0%, #00b874 100%);
  clip-path: polygon(29% 0%, 71% 0%, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0% 71%, 0% 29%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 4px rgba(5, 255, 161, 0.5));
  flex-shrink: 0;
}

.mini-octagon-number {
  font-size: 8px;
  font-weight: 900;
  color: #032014;
  letter-spacing: -0.4px;
  user-select: none;
}

/* PIN Modal Overlay */
.pin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pin-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.pin-card {
  width: 100%;
  max-width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pin-modal-overlay.open .pin-card {
  transform: scale(1);
}

.pin-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.pin-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.pin-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.pin-input-group {
  margin-bottom: 18px;
}

.pin-input {
  width: 140px;
  text-align: center;
  letter-spacing: 12px;
  font-size: 24px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 42, 109, 0.4);
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent-pink);
  outline: none;
}

.pin-input:focus {
  border-color: var(--accent-pink);
  box-shadow: 0 0 16px rgba(255, 42, 109, 0.3);
}

.pin-btn-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-pin-cancel {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-pin-submit {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--grad-scoopz);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: rgba(20, 24, 35, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================================
   LIVE HOST AUTO-UPDATE NOTIFICATION BANNER
   ========================================================================= */

.update-banner {
  position: fixed;
  /*
   * Sits BELOW the two header rows, not over them.
   *
   * At top:16px with z-index 300 this card covered the header and, being
   * pointer-events:auto while visible, swallowed taps meant for the settings
   * gear and the PIN button underneath — the settings drawer was unreachable
   * whenever an update was pending.
   */
  top: calc(var(--header-height, 104px) + env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  width: 90%;
  max-width: 440px;
  z-index: 300;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.update-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  /* Only the buttons inside should take taps; the card must not block
     anything it happens to overlap. */
  pointer-events: none;
}

.update-banner.visible .btn-update-now,
.update-banner.visible .btn-update-dismiss {
  pointer-events: auto;
}

.update-banner.hidden {
  display: none;
}

.update-banner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(18, 22, 34, 0.88);
  border: 1px solid rgba(5, 255, 161, 0.35);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(5, 255, 161, 0.2);
}

.update-banner-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(5, 255, 161, 0.12);
  border: 1px solid rgba(5, 255, 161, 0.3);
  flex-shrink: 0;
}

.update-rocket {
  font-size: 18px;
  animation: rocket-pulse 1.5s infinite ease-in-out;
}

@keyframes rocket-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.update-pulse-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: dot-ping 1.6s infinite ease-in-out;
}

@keyframes dot-ping {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.update-banner-info {
  flex: 1;
  min-width: 0;
}

.update-banner-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.update-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.update-version-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(5, 255, 161, 0.18);
  color: var(--accent-green);
  border: 1px solid rgba(5, 255, 161, 0.3);
}

.update-banner-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 0;
}

.update-banner-desc strong {
  color: var(--accent-green);
}

.update-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-update-now {
  padding: 7px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--grad-scoopz);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 42, 109, 0.3);
  transition: transform 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn-update-now:hover {
  transform: scale(1.04);
  filter: brightness(1.1);
}

.btn-update-dismiss {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-update-dismiss:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Host Sync Indicators inside Settings */
.sync-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-indicator-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #05ffa1;
  box-shadow: 0 0 8px #05ffa1;
}

.sync-status-text {
  font-size: 11px;
  font-weight: 600;
  color: #05ffa1;
}

.btn-check-update {
  padding: 5px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-check-update:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* =========================================================================
   INTERACTIVE COMMENT DRAWER SHEET
   ========================================================================= */

.comment-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.comment-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.comment-sheet {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  height: 72vh;
  max-height: 580px;
  background: rgba(14, 18, 28, 0.96);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.85);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  touch-action: pan-y;
}

.comment-modal-overlay.open .comment-sheet {
  transform: translateY(0);
}

.comment-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.comment-sheet-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.comment-close-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.comment-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
  padding: 14px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  position: relative;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.comment-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  padding-right: 8px;
}

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

.comment-author-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.comment-body-text {
  font-size: 13px;
  color: #fff;
  line-height: 1.4;
  word-break: break-word;
}

.comment-time {
  font-size: 10.5px;
  color: var(--text-muted);
}

.comment-like-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}

.comment-like-heart {
  font-size: 12px;
  opacity: 0.55;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.comment-like-wrap:hover .comment-like-heart {
  opacity: 1;
  transform: scale(1.15);
}

.comment-like-count {
  font-size: 9.5px;
  color: var(--text-muted);
}

.comment-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 13, 20, 0.95);
}

.comment-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
  outline: none;
}

.comment-input:focus {
  border-color: var(--accent-cyan);
}

.comment-submit-btn {
  padding: 9px 16px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--grad-scoopz);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* =========================================================================
   COUNTRY & REGION SELECTOR ENGINE
   ========================================================================= */

.region-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  backdrop-filter: blur(8px);
  margin-left: 4px;
}

.region-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.04);
}

.region-pill:active {
  transform: scale(0.96);
}

.region-pill-arrow {
  font-size: 8px;
  opacity: 0.65;
  transition: transform 0.2s ease;
}

.country-badge-pill {
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: var(--accent-cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.region-sheet {
  width: 92%;
  max-width: 400px;
  max-height: 85vh;
  background: rgba(14, 18, 27, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
}

.region-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.region-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 55vh;
  padding-right: 4px;
}

.region-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
}

.region-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.region-card.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.15);
}

.region-card-flag {
  font-size: 22px;
  line-height: 1;
}

.region-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.region-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.region-card-desc {
  font-size: 10.5px;
  color: var(--text-muted);
}

.region-card-check {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-cyan);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.region-card.active .region-card-check {
  opacity: 1;
}



/* =========================================================================
   LANDSCAPE IMMERSIVE MODE
   Turning the phone sideways gives the clip the whole screen. The viewport's
   480px portrait cap would otherwise letterbox the video into a narrow strip
   with black either side. Chrome hides until tapped, so nothing is lost —
   body.chrome-visible brings it back.
   The max-height guard keeps this off landscape tablets and desktop.
   ========================================================================= */
@media (orientation: landscape) and (max-height: 600px) {
  .app-viewport {
    max-width: none;
    width: 100%;
    height: 100dvh;
    margin: 0;
    border: none;
    border-radius: 0;
  }

  .app-header {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .metadata-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  /* One tap brings the controls back. */
  body.chrome-visible .app-header {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  body.chrome-visible .metadata-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* Keep the action bar reachable but out of the way of the picture. */
  .action-bar {
    right: 6px;
    gap: 6px;
    transform: scale(0.82);
    transform-origin: right center;
  }

  .action-label {
    display: none;
  }

  .video-player {
    object-fit: contain;
  }

  .timeline-scrubber-wrap,
  .bottom-control-bar {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.chrome-visible .timeline-scrubber-wrap,
  body.chrome-visible .bottom-control-bar {
    opacity: 1;
    pointer-events: auto;
  }
}

/* =========================================================================
   CREATOR VIEW — tap a name to see everything by that person
   ========================================================================= */
.creator-name {
  background: none;
  border: none;
  padding: 2px 4px;
  margin: -2px -4px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  transition: var(--transition-fast);
}

.creator-name:hover,
.creator-name:active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.creator-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--header-height, 104px) + env(safe-area-inset-top, 0px) + 8px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(15, 18, 28, 0.92);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
  font-size: 12.5px;
  white-space: nowrap;
  max-width: 90%;
}

.creator-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-bar-label strong {
  color: var(--accent-cyan);
}

/* 44px touch target, drawn smaller. */
.creator-bar-exit {
  position: relative;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.creator-bar-exit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

@media (orientation: landscape) and (max-height: 600px) {
  .creator-bar {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  body.chrome-visible .creator-bar {
    opacity: 1;
    pointer-events: auto;
  }
}

/* =========================================================================
   OMNI BADGE AS REFRESH
   The badge pulls a fresh batch, so it needs to read as a control: a real
   touch target and a spin on the icon while the fetch is in flight.
   ========================================================================= */
.brand-badge {
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}

.brand-badge::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 44px;
  transform: translateY(-50%);
}

.brand-badge:active {
  opacity: 0.7;
}

.brand-badge .brand-icon {
  transition: transform 0.2s ease;
}

.brand-badge.refreshing .brand-icon {
  animation: omni-refresh-spin 0.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes omni-refresh-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-badge.refreshing .brand-icon {
    animation: none;
    opacity: 0.5;
  }
}

/* ==========================================================================
   Global Ecosystem Hub Dock (Unified App Navigation)
   ========================================================================== */
.hub-dock-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  max-width: 600px;
  position: relative;
  z-index: 1000;
}

.hub-dock-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
  user-select: none;
}
.hub-dock-summary::-webkit-details-marker { display: none; }

.hub-dock-summary:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.8);
}

.hub-dock-details[open] .hub-summary-arrow {
  transform: rotate(180deg);
}

.hub-summary-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.hub-dock-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(13, 17, 26, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
  margin-top: 8px;
}
.hub-dock-pill::-webkit-scrollbar { display: none; }

.hub-dock-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.hub-dock-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.hub-dock-item.active {
  background: rgba(255, 42, 109, 0.22);
  color: #ff2a6d;
  border: 1px solid rgba(255, 42, 109, 0.45);
  font-weight: 700;
}

/* ========================================================
   QUICK DOUBLE-TAP SEEK BUBBLE ANIMATION
======================================================== */
.seek-bubble {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  pointer-events: none;
  opacity: 0;
  z-index: 120;
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.22s ease;
}

.seek-bubble.seek-left {
  left: 15%;
}

.seek-bubble.seek-right {
  right: 15%;
}

.seek-bubble.active {
  opacity: 1;
  transform: translateY(-50%) scale(1.15);
}

.seek-icon {
  font-size: 1.6rem;
}

.seek-txt {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-cyan, #05d9e8);
  font-family: monospace;
}

/* Sound Wave Equalizer Micro-Animation */
.sound-playing-anim {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-left: 4px;
  vertical-align: middle;
}

.sound-bar {
  width: 2px;
  height: 100%;
  background: #ff2a6d;
  border-radius: 1px;
  animation: soundBarWave 0.8s ease-in-out infinite alternate;
}

.sound-bar:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.sound-bar:nth-child(3) { animation-delay: 0.4s; height: 80%; }

@keyframes soundBarWave {
  0% { height: 20%; }
  100% { height: 100%; }
}
