/**
 * 🎮 THE BDCF CREW — OFFICIAL GTA ONLINE PORTAL
 * Signature BDCF Syndicate Purple Tabbed Design System with YouTube Playlist Importer
 */

:root {
  --bg-dark: #07080f;
  --bg-surface: #0e111d;
  --bg-card: rgba(15, 18, 32, 0.88);
  --bg-card-hover: rgba(22, 28, 48, 0.95);
  
  /* 💜 Signature BDCF Crew Purple Palette */
  --crew-purple: #9333ea;
  --crew-purple-light: #a855f7;
  --crew-purple-neon: #c084fc;
  --crew-purple-dark: #6b21a8;
  --crew-purple-glow: rgba(168, 85, 247, 0.45);
  
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-pink: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-purple: rgba(168, 85, 247, 0.4);
  --border-cyan: rgba(6, 182, 212, 0.35);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-header: 'Montserrat', sans-serif;
  --font-tech: 'JetBrains Mono', monospace;
}

/* ── Reset & Global ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body.crew-portal-body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow-x: hidden !important;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Ambient Background Mesh ── */
.ambient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: paint;
  clip-path: inset(0);
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.32;
}

.orb-pink {
  width: 550px;
  height: 550px;
  background: var(--crew-purple);
  top: -120px;
  left: -100px;
  animation: floatOrb1 16s ease-in-out infinite alternate;
}

.orb-cyan {
  width: 500px;
  height: 500px;
  background: #06b6d4;
  bottom: -100px;
  right: -80px;
  animation: floatOrb2 18s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.12); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, -50px) scale(1.08); }
}

.grid-texture {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 1;
}

/* ── Top Header: 2-Tier Brand & Navigation Layout ── */
.portal-header {
  position: relative;
  z-index: 900;
  background: rgba(7, 8, 15, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1.5px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.75);
  padding: 12px 24px;
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Top Row: Skull Brand Logo on Left, Operations & Avatar on Right */
.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Left: Glowing Neon Skull Logo */
.header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.header-neon-skull {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(217, 70, 239, 0.95)) drop-shadow(0 0 28px rgba(168, 85, 247, 0.6));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-brand-wrap:hover .header-neon-skull {
  transform: scale(1.06);
  filter: drop-shadow(0 0 20px rgba(217, 70, 239, 1)) drop-shadow(0 0 35px rgba(168, 85, 247, 0.85));
}

.header-neon-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 0.90;
  font-family: var(--font-header), 'Montserrat', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  user-select: none;
}

.neon-line-top, .neon-line-bot {
  font-size: 22px;
  letter-spacing: 1.5px;
  color: #fff;
  -webkit-text-stroke: 1.2px #f0abfc;
  text-shadow: 
    0 0 6px #d946ef,
    0 0 14px #a855f7,
    0 0 28px #9333ea;
}

/* Navigation Row: Dedicated Menu Bar Below Logo */
.header-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.header-nav-pills-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 36, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-full);
  padding: 4px 6px;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-nav-pills-wrap::-webkit-scrollbar {
  display: none;
}


.portal-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}


.portal-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.portal-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--crew-purple-light), var(--crew-purple-dark));
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 16px var(--crew-purple-glow);
}

/* Right: Operations Drawer & Profile Avatar Buttons */
.header-right-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  flex-shrink: 0;
  gap: 8px;
}

.header-drawer-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #f3e8ff;
  font-family: var(--font-header), 'Montserrat', sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}

.header-drawer-toggle-btn:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: rgba(217, 70, 239, 0.8);
  color: #fff;
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.5);
  transform: translateY(-1px);
}

.drawer-btn-icon {
  font-size: 14px;
}

.drawer-btn-burger {
  font-size: 13px;
  color: #c084fc;
}


.header-user-avatar-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-user-avatar-btn:hover {
  transform: scale(1.08);
}

.header-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #c084fc;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.9), 0 0 30px rgba(217, 70, 239, 0.6);
  display: block;
  transition: all 0.2s ease;
}

.header-user-avatar-btn:hover .header-avatar-img {
  border-color: #f0abfc;
  box-shadow: 0 0 22px rgba(240, 171, 252, 1), 0 0 40px rgba(217, 70, 239, 0.8);
}

.live-dot-pulse {
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.status-txt {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.version-pill {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: var(--crew-purple-neon);
  background: rgba(168, 85, 247, 0.12);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.btn-admin-header {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-header:hover {
  color: var(--crew-purple-neon);
  border-color: var(--border-purple);
  background: rgba(168, 85, 247, 0.12);
}

/* ── Tab Panes ── */
.portal-tab-pane {
  display: none;
  animation: fadeInPane 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-tab-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Main Container ── */
.portal-main {
  position: relative;
  z-index: 10;
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 20px 70px;
  width: 100%;
  flex: 1;
}

/* ── Compact Hero ── */
.hero-compact {
  text-align: center;
  padding: 10px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crest-badge {
  margin-bottom: 12px;
}

.crest-inner {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(6, 182, 212, 0.12));
  border: 1px solid var(--border-purple);
  padding: 6px 16px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(168, 85, 247, 0.2);
}

.crest-icon { font-size: 16px; }

.crest-title {
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
}

.crest-sub {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-gold);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 8px;
}

.hero-headline {
  font-family: var(--font-header);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: #fff;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--crew-purple-neon) 20%, #06b6d4 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.5;
}

/* ── Section Titles ── */
.section-title-wrap {
  text-align: center;
  margin-bottom: 24px;
}

.section-badge {
  display: inline-block;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  color: var(--crew-purple-neon);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--border-purple);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.section-title {
  font-family: var(--font-header);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

/* =========================================================================
   THEATER SECTION
   ========================================================================= */
.theater-card {
  background: var(--bg-surface);
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(168, 85, 247, 0.25);
}

.video-screen-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
  border-bottom: 2px solid rgba(168, 85, 247, 0.35);
  overflow: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.video-facade-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  overflow: hidden;
  background: #07080f;
}

.facade-poster-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.92);
}

.video-facade-cover:hover .facade-poster-img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.facade-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.15) 0%, rgba(7, 8, 15, 0.6) 80%);
  pointer-events: none;
}

.facade-play-btn {
  position: relative;
  z-index: 5;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d946ef, #9333ea);
  border: 2.5px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(217, 70, 239, 0.9), 0 0 45px rgba(168, 85, 247, 0.7);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.facade-play-icon {
  font-size: 24px;
  margin-left: 4px;
  line-height: 1;
}

.video-facade-cover:hover .facade-play-btn {
  transform: scale(1.15);
  box-shadow: 0 0 35px rgba(217, 70, 239, 1), 0 0 60px rgba(168, 85, 247, 0.9);
}

.facade-live-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(7, 8, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 5px 11px;
  border-radius: var(--radius-full);
  color: #fff;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.facade-dot-pulse {
  width: 7px;
  height: 7px;
  background: #d946ef;
  border-radius: 50%;
  box-shadow: 0 0 8px #d946ef;
  animation: pulseDot 1.5s infinite;
}

.video-screen-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.screen-hd-corner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #fff;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 5;
  pointer-events: none;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.video-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px;
  background: rgba(10, 13, 24, 0.95);
  border-bottom: 1px solid var(--border-color);
}

.now-playing-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.now-playing-tag {
  display: inline-block;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 900;
  color: #d946ef;
  text-shadow: 0 0 12px rgba(217, 70, 239, 0.7);
  letter-spacing: 1.5px;
}

.video-current-title {
  font-family: var(--font-header);
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.25;
}

.video-meta-stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.meta-stat-pill {
  font-family: var(--font-tech);
  font-size: 10.5px;
  font-weight: 800;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

.meta-stat-bullet {
  color: rgba(255, 255, 255, 0.25);
  font-size: 10px;
}

.video-current-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.video-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.channel-link-badge {
  text-decoration: none;
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 0, 0, 0.15);
  border: 1px solid rgba(255, 0, 0, 0.4);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.channel-link-badge:hover {
  background: #ff0000;
  border-color: #ff0000;
  box-shadow: 0 0 16px rgba(255, 0, 0, 0.6);
  transform: translateY(-1px);
}

.theater-hd-badge {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ── MULTI-PLAYLIST CATEGORIES SECTION ── */
.categories-section {
  padding: 24px 24px 18px;
  background: rgba(10, 13, 24, 0.9);
  border-bottom: 1px solid rgba(147, 51, 234, 0.25);
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-label-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-label-tech {
  font-family: var(--font-tech);
  font-size: 11.5px;
  font-weight: 900;
  color: var(--crew-purple-neon);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.categories-sub-hint {
  font-size: 11px;
  color: var(--text-muted);
}

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

.cat-nav-arrow {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cat-nav-arrow:hover {
  background: #d946ef;
  border-color: #d946ef;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.7);
  transform: scale(1.08);
}

.cat-nav-arrow:active {
  transform: scale(0.95);
}

.swipe-hint-pill, .scroll-hint-pill {
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  color: #d946ef;
  background: rgba(217, 70, 239, 0.12);
  border: 1px solid rgba(217, 70, 239, 0.3);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.categories-count-badge {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: #c084fc;
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid rgba(147, 51, 234, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Categories Slider Wrapper */
.categories-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  touch-action: pan-x pan-y !important;
}

/* Categories Sliding Bar (Universal Across All Devices) */
.categories-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  gap: 12px;
  padding: 4px 2px 12px 2px;
  width: 100%;
  min-width: 0;
  touch-action: pan-x pan-y !important;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: thin;
  scrollbar-color: #d946ef rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}

.categories-grid.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto !important;
  scroll-snap-type: none !important;
}

.categories-grid::-webkit-scrollbar {
  height: 6px;
}

.categories-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.categories-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #d946ef, #a855f7);
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.6);
}

.categories-grid::-webkit-scrollbar-thumb:hover {
  background: #d946ef;
  box-shadow: 0 0 16px rgba(217, 70, 239, 0.9);
}

.category-card {
  position: relative;
  flex: 0 0 165px !important;
  width: 165px !important;
  min-width: 165px !important;
  max-width: 165px !important;
  height: 100px !important;
  scroll-snap-align: start;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 10px 12px 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-sizing: border-box;
  touch-action: pan-x pan-y !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.category-bg-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.38;
  transition: all 0.3s ease;
  filter: brightness(0.65) saturate(1.2);
}

.category-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10, 14, 25, 0.3) 0%, rgba(10, 14, 25, 0.95) 100%);
  z-index: 1;
}

.category-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.category-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(168, 85, 247, 0.3);
}

.category-card:hover .category-bg-thumb,
.category-card.active .category-bg-thumb {
  opacity: 0.65;
  transform: scale(1.08);
  filter: brightness(0.85) saturate(1.3);
}

.category-card.active {
  background: linear-gradient(145deg, rgba(217, 70, 239, 0.25), rgba(15, 23, 42, 0.9));
  border-color: #d946ef;
  box-shadow: 0 0 24px rgba(217, 70, 239, 0.6), inset 0 0 15px rgba(168, 85, 247, 0.2);
  transform: translateY(-2px);
}

.category-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.category-icon {
  font-size: 24px;
  line-height: 1;
}

.category-count-pill {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  color: #c084fc;
  background: rgba(147, 51, 234, 0.25);
  border: 1px solid rgba(147, 51, 234, 0.4);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.category-title {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-subtitle {
  font-size: 10.5px;
  color: var(--text-sub);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-active-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d946ef, #a855f7);
  z-index: 3;
}

/* ── ACTIVE PLAYLIST VIDEO CLIPS DRAWER ── */
.playlist-container {
  padding: 22px 24px 28px;
  background: rgba(14, 17, 30, 0.7);
}

.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.playlist-active-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.active-playlist-icon {
  font-size: 30px;
  line-height: 1;
}

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

.active-playlist-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.active-playlist-title {
  font-family: var(--font-header);
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

.active-tag-pill {
  font-family: var(--font-tech);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #d946ef;
  background: rgba(217, 70, 239, 0.15);
  border: 1px solid rgba(217, 70, 239, 0.35);
  padding: 2px 6px;
  border-radius: 3px;
}

.active-playlist-desc {
  font-size: 11px;
  color: var(--text-muted);
}

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

.clips-count-pill {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.btn-sync-series {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: var(--crew-purple-neon);
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sync-series:hover {
  background: var(--crew-purple-light);
  color: #fff;
  border-color: var(--crew-purple-light);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.btn-sync-series.is-syncing .sync-icon {
  animation: spin-sync 0.8s linear infinite;
}

@keyframes spin-sync {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.btn-manage-playlist {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-manage-playlist:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Playlist Feed (Clean stacked list) */
.playlist-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #d946ef rgba(255, 255, 255, 0.05);
}

.playlist-grid::-webkit-scrollbar {
  width: 6px;
}

.playlist-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.playlist-grid::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35);
  border-radius: 6px;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.playlist-grid::-webkit-scrollbar-thumb:hover {
  background: #d946ef;
  box-shadow: 0 0 10px var(--crew-purple-glow);
}

.playlist-item {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  color: inherit;
}

.clip-num-badge {
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 900;
  color: #c084fc;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.playlist-thumb-wrap {
  position: relative;
  width: 85px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.playlist-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.playlist-item:hover .playlist-thumb-img {
  transform: scale(1.08);
}

.playlist-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(147, 51, 234, 0.15);
}

.thumb-hd-tag {
  position: absolute;
  bottom: 2px;
  right: 3px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-family: var(--font-tech);
  font-size: 8px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

.playlist-item.active {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.18), rgba(15, 23, 42, 0.95));
  border-color: #d946ef;
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.5), inset 0 0 12px rgba(147, 51, 234, 0.2);
}

.playlist-item.active .clip-num-badge {
  color: #4ade80;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.7);
}

.item-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.item-title {
  font-family: var(--font-header);
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.item-meta-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.item-duration {
  font-size: 10.5px;
  color: var(--text-sub);
  font-weight: 600;
}

.item-meta-bullet {
  color: rgba(255, 255, 255, 0.25);
  font-size: 10px;
}

.item-syndicate-tag {
  font-size: 10px;
  color: #94a3b8;
  font-family: var(--font-tech);
  font-weight: 700;
}

.item-now-playing-badge {
  font-family: var(--font-tech);
  font-size: 8.5px;
  font-weight: 900;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  animation: pulsePlaying 1.5s infinite alternate;
}

@keyframes pulsePlaying {
  0% { opacity: 0.65; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── ADMIN CATEGORIES & SERIES MANAGER ── */
.admin-categories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-cat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.admin-cat-card.is-active-cat {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(147, 51, 234, 0.06);
}

.admin-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-cat-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-cat-icon {
  font-size: 24px;
}

.admin-cat-title {
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-cat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

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

.admin-cat-videos {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}

.admin-video-mini-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-size: 11px;
}

.mini-num {
  color: #a855f7;
  font-weight: 800;
  font-family: var(--font-tech);
  min-width: 18px;
}

.mini-title {
  flex: 1;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  transition: all 0.15s ease;
}

.mini-delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}


/* =========================================================================
   SEAMLESS EMBEDDED LOS SANTOS WEEKLY APP
   ========================================================================= */
.weekly-embedded-wrapper {
  background: rgba(11, 14, 23, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(168, 85, 247, 0.15);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.weekly-embedded-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-icon {
  font-size: 24px;
}

.toolbar-title {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: 0.5px;
}

.toolbar-subtitle {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-tech);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.weekly-iframe-container {
  width: 100%;
  height: 900px;
  position: relative;
  background: #0b0e17;
}

.weekly-embedded-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #0b0e17;
  display: block;
}

@media (max-width: 768px) {
  .weekly-iframe-container {
    height: 820px;
  }
  .weekly-embedded-toolbar {
    padding: 10px 14px;
  }
}

/* =========================================================================

   HOW TO JOIN TAB
   ========================================================================= */
.join-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(168, 85, 247, 0.1);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-number {
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--font-tech);
  font-size: 28px;
  font-weight: 900;
  color: rgba(168, 85, 247, 0.15);
}

.step-icon {
  font-size: 30px;
  margin-bottom: 12px;
}

.step-title {
  font-family: var(--font-header);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Join CTA Banner */
.join-cta-banner {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(99, 102, 241, 0.15));
  border: 2px solid var(--border-purple);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
}

.cta-banner-text h3 {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
}

.cta-banner-text p {
  font-size: 12px;
  color: var(--text-muted);
}

.cta-banner-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.btn-apply-now {
  background: linear-gradient(135deg, var(--crew-purple-light), var(--crew-purple-dark));
  color: #fff;
  text-decoration: none;
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 900;
  padding: 16px 30px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 25px var(--crew-purple-glow);
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-apply-now:hover {
  background: linear-gradient(135deg, var(--crew-purple-neon), var(--crew-purple-light));
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.85);
  transform: translateY(-2px) scale(1.03);
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.btn-apply-now:hover .btn-arrow {
  transform: translateX(4px);
}

.form-url-note {
  font-family: var(--font-tech);
  font-size: 10px;
  color: var(--text-sub);
}

/* ── Footer ── */
.portal-footer {
  position: relative;
  z-index: 10;
  background: rgba(7, 8, 15, 0.96);
  border-top: 1px solid var(--border-color);
  padding: 20px 20px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-header);
  font-size: 12px;
  font-weight: 900;
  color: #fff;
}

.footer-copy {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.footer-admin-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.footer-admin-btn:hover {
  color: var(--crew-purple-neon);
  border-color: var(--border-purple);
}

/* ── Live Visitor Counter Pill (header) ── */
.live-counter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(147, 51, 234, 0.12);
  border: 1px solid rgba(147, 51, 234, 0.35);
  border-radius: var(--radius-full);
  padding: 4px 10px 4px 8px;
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 700;
  color: #c084fc;
  cursor: default;
  transition: all 0.3s ease;
}

.live-counter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 6px #a855f7;
  animation: live-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.live-counter-label {
  font-size: 10px;
  color: rgba(192, 132, 252, 0.6);
  font-weight: 600;
}

/* ── Footer Stats Strip ── */
.footer-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(147, 51, 234, 0.06);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
}

.footer-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 700;
  color: #c084fc;
}

.footer-stat-icon {
  font-size: 13px;
}

.footer-stat-label {
  font-size: 10px;
  color: rgba(192, 132, 252, 0.55);
  font-weight: 600;
}

.footer-stat-divider {
  width: 1px;
  height: 16px;
  background: rgba(147, 51, 234, 0.3);
}

/* =========================================================================

   ADMIN MODAL STYLING & IMPORTER BOXES
   ========================================================================= */
.admin-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
}

.admin-modal-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 720px;
  max-height: 88vh;
  background: #0f1423;
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(168, 85, 247, 0.25);
  z-index: 9999;
  flex-direction: column;
  overflow: hidden;
  animation: adminModalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes adminModalIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: rgba(7, 10, 18, 0.95);
  border-bottom: 1px solid var(--border-color);
}

.admin-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-icon {
  font-size: 24px;
}

.admin-title-wrap h3 {
  font-family: var(--font-header);
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}

.admin-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.admin-close-btn:hover {
  color: #fff;
}

/* Admin header right side (auth status + close) */
.admin-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Auth Status Strip */
.admin-auth-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(147, 51, 234, 0.12);
  border: 1px solid rgba(147, 51, 234, 0.35);
  border-radius: 20px;
  padding: 4px 12px 4px 6px;
}

.auth-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9333ea, #6d28d9);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-user-name {
  font-size: 12px;
  color: #e2e8f0;
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-role-pill {
  font-family: var(--font-tech);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 2px 5px;
  border-radius: 3px;
}

/* Sign Out Button */
.btn-sign-out {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sign-out:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
}

/* Admin button avatar initial (shown when signed in) */
.btn-avatar-initial {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9333ea, #6d28d9);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
}


.admin-modal-body {
  padding: 20px 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.admin-tabs-bar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.admin-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.admin-tab-btn.active {
  background: var(--crew-purple-light);
  border-color: var(--crew-purple-light);
  color: #fff;
  box-shadow: 0 0 12px var(--crew-purple-glow);
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
}

/* ── Admin Inner Sub-Tabs Bar ── */
.admin-subtabs-bar {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow-x: auto;
}

.admin-subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex: 1;
  text-align: center;
}

.admin-subtab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.admin-subtab-btn.active {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.45);
  color: #f3e8ff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.admin-subtab-pane {
  display: none;
}

.admin-subtab-pane.active {
  display: block;
}


.admin-section-info {
  margin-bottom: 18px;
}

.admin-section-info h4 {
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.admin-section-info p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Importer Boxes */
.import-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-md);
  padding: 20px;
}

.import-box.mt-4 {
  margin-top: 18px;
}

.import-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.import-box-tag {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.import-box-header h5 {
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.import-box-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

/* Input with inline button (for Fetch Info) */
.input-with-btn {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input-with-btn input {
  flex: 1;
}

.input-with-btn .btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0 14px;
}

/* Playlist Preview Box */
.playlist-preview-box {
  background: rgba(147, 51, 234, 0.12);
  border: 1px solid rgba(147, 51, 234, 0.4);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 12px 0;
}

.preview-label {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #a855f7;
  margin-bottom: 6px;
}

.preview-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.preview-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.preview-id-tag code {
  color: #a855f7;
  font-size: 11px;
}

/* Fetched Video List in Playlist Preview */
.fetched-video-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 6px;
  background: rgba(0,0,0,0.2);
  padding: 6px;
}

.fetched-video-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  font-size: 12px;
}

.fetched-v-num {
  font-family: var(--font-tech);
  font-size: 10px;
  color: #a855f7;
  min-width: 18px;
  font-weight: 800;
}

.fetched-v-title {
  flex: 1;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fetched-v-id {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
}


/* Video List in Admin */
.admin-video-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-video-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.admin-video-item.is-active {
  border-color: var(--crew-purple-light);
  background: rgba(168, 85, 247, 0.1);
}

.admin-v-icon {
  font-size: 22px;
}

.admin-v-details {
  flex: 1;
  min-width: 0;
}

.admin-v-title {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-v-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.admin-v-meta code {
  color: var(--accent-cyan);
  font-family: var(--font-tech);
}

.active-badge {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.admin-v-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-sm {
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-sm.btn-accent {
  background: var(--crew-purple-light);
  color: #fff;
}

.btn-sm.btn-accent:hover {
  background: var(--crew-purple-neon);
}

.btn-sm.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

.btn-sm.btn-danger:hover {
  background: #f43f5e;
  color: #fff;
}

/* Admin Form Controls */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }

.form-group label {
  font-family: var(--font-header);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--crew-purple-light);
  box-shadow: 0 0 10px var(--crew-purple-glow);
}

.form-hint {
  font-size: 11px;
  color: var(--text-sub);
}

.form-hint code {
  color: var(--accent-cyan);
  font-family: var(--font-tech);
}

.code-textarea {
  font-family: var(--font-tech) !important;
  font-size: 11px !important;
  line-height: 1.4;
  color: #38bdf8 !important;
}

.form-actions-row {
  display: flex;
  gap: 12px;
}

.btn {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn.full-width { width: 100%; }

.btn.btn-accent {
  background: linear-gradient(135deg, var(--crew-purple-light), var(--crew-purple-dark));
  color: #fff;
  box-shadow: 0 0 15px var(--crew-purple-glow);
}

.btn.btn-accent:hover {
  background: linear-gradient(135deg, var(--crew-purple-neon), var(--crew-purple-light));
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.7);
}

.btn.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
}

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

.btn.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.btn.btn-danger:hover {
  background: #f43f5e;
  color: #fff;
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  border: 1px solid var(--border-purple);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px var(--crew-purple-glow);
  animation: toastIn 0.25s ease;
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text;
  max-width: 420px;
  word-break: break-word;
}

.toast code {
  user-select: all !important;
  -webkit-user-select: all !important;
  background: rgba(147, 51, 234, 0.25);
  border: 1px solid rgba(147, 51, 234, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c084fc;
  cursor: pointer;
}

.toast.toast-error {
  border-color: #ef4444;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(239, 68, 68, 0.3);
}

.toast.toast-success { border-color: #10b981; }
.toast.toast-info { border-color: var(--crew-purple-light); }


.toast-fadeout {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   SLIDEOUT OPERATIONS DRAWER (wosBDC Style)
   ========================================================================= */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sideout-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: rgba(11, 14, 23, 0.95);
  border-left: 1px solid rgba(168, 85, 247, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2600;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(168, 85, 247, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

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

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-icon {
  font-size: 22px;
}

.drawer-title {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: 0.5px;
}

.drawer-subtitle {
  font-size: 9.5px;
  color: var(--text-muted);
  font-family: var(--font-tech);
  letter-spacing: 0.5px;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  transform: scale(1.05);
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
}

.drawer-timer-card {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.08));
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.drawer-card-label {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
  font-family: var(--font-tech);
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.drawer-date-badge {
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-header);
}

.drawer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 12px 0;
}

.drawer-countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: #f472b6;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  text-shadow: 0 0 12px rgba(244, 114, 182, 0.4);
}

.drawer-reset-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.drawer-section-title {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
  font-family: var(--font-tech);
  letter-spacing: 0.8px;
  margin-top: 4px;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.drawer-nav-item:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.35);
  color: #fff;
  transform: translateX(4px);
}

.drawer-nav-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 11px;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  text-align: center;
}

.drawer-footer-text {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-tech);
}


/* ── Mobile Optimization & Responsive Video Theater ── */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .portal-main {
    padding: 18px 14px 60px;
  }

  .weekly-card, .join-cta-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-banner-action, .weekly-right {
    align-items: stretch;
    width: 100%;
  }

  .btn-launch-weekly, .btn-apply-now {
    justify-content: center;
    width: 100%;
  }

  .form-url-note {
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .admin-modal-container {
    width: 96%;
  }

  .form-row {
    flex-direction: column;
  }

  .video-meta-bar {
    padding: 16px 18px;
    gap: 14px;
  }

  .categories-section {
    padding: 18px 18px 14px;
  }

  .playlist-container {
    padding: 18px 18px 22px;
  }

  .playlist-grid {
    max-height: 420px;
  }
}

@media (max-width: 640px) {
  /* Prevent Any Horizontal Expansion on Mobile & iOS Safari */
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .portal-header {
    padding: 8px 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .header-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 8px;
  }

  .header-brand-wrap {
    gap: 6px;
    flex-shrink: 0;
  }

  .header-neon-skull {
    height: 46px;
  }

  .neon-line-top, .neon-line-bot {
    font-size: 15px;
    letter-spacing: 0.6px;
  }

  .header-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .header-nav-row::-webkit-scrollbar {
    display: none;
  }

  .header-nav-pills-wrap {
    padding: 3px 5px;
    gap: 4px;
    flex-shrink: 0;
  }


  .portal-tab-btn {
    padding: 6px 9px;
    font-size: 10.5px;
    gap: 4px;
  }

  .header-right-actions {
    margin-left: auto;
    flex-shrink: 0;
  }

  .header-avatar-img {
    width: 40px;
    height: 40px;
    border-width: 2.5px;
  }

  .facade-play-btn {
    width: 54px;
    height: 54px;
  }

  .facade-play-icon {
    font-size: 19px;
  }

  .facade-live-badge {
    bottom: 8px;
    left: 8px;
    padding: 3px 8px;
    font-size: 8.5px;
  }

  .portal-main {
    padding: 12px 10px 60px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .theater-card {
    border-radius: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Video Meta Bar on Smartphone */
  .video-meta-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 14px 12px;
    gap: 10px;
  }

  .now-playing-tag {
    font-size: 9.5px;
    margin-bottom: 2px;
  }

  .video-current-title {
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 3px;
  }

  .video-current-desc {
    font-size: 11px;
    line-height: 1.4;
  }

  .video-meta-right {
    width: 100%;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    gap: 8px;
  }

  .channel-link-badge, .theater-hd-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  /* Multi-Playlist Category Reel on Smartphone */
  .categories-section {
    padding: 14px 14px 12px;
  }

  .section-header-row {
    margin-bottom: 10px;
    gap: 6px;
  }

  .section-label-tech {
    font-size: 10px;
    letter-spacing: 1px;
  }

  .categories-sub-hint {
    font-size: 10px;
    opacity: 0.8;
  }

  .categories-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y !important;
    gap: 10px;
    padding-bottom: 8px;
    padding-top: 2px;
    margin: 0 -2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
  }

  .categories-grid::-webkit-scrollbar {
    height: 4px;
  }

  .categories-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
  }

  .categories-grid::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.4);
    border-radius: 4px;
  }

  .category-card {
    flex: 0 0 155px !important;
    min-width: 155px !important;
    max-width: 175px !important;
    scroll-snap-align: start;
    padding: 10px 12px 10px;
    gap: 4px;
    border-radius: 10px;
    touch-action: pan-x pan-y !important;
  }

  .category-card-top {
    margin-bottom: 0px;
  }

  .category-icon {
    font-size: 22px;
  }

  .category-count-pill {
    font-size: 8.5px;
    padding: 1px 6px;
  }

  .category-title {
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .category-subtitle {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Active Playlist Video Clips Feed on Smartphone */
  .playlist-container {
    padding: 14px 14px 16px;
  }

  .playlist-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 12px;
  }

  .playlist-active-info {
    gap: 10px;
  }

  .active-playlist-icon {
    font-size: 24px;
  }

  .active-playlist-title {
    font-size: 13.5px;
  }

  .active-playlist-desc {
    font-size: 10.5px;
    line-height: 1.35;
  }

  .playlist-header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .clips-count-pill {
    font-size: 10px;
    padding: 3px 10px;
  }

  .btn-manage-playlist {
    font-size: 10px;
    padding: 4px 10px;
  }

  .playlist-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
  }

  .playlist-item {
    padding: 8px 10px;
    gap: 10px;
    border-radius: 10px;
  }

  .clip-num-badge {
    font-size: 13px;
    min-width: 22px;
  }

  .playlist-thumb-wrap {
    width: 76px;
    height: 44px;
    border-radius: 7px;
  }

  .item-title {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  /* Safe Area Insets for iOS Notch & Dynamic Island */
  body {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .portal-header {
    padding: 6px 8px;
  }

  .header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .header-neon-skull {
    height: 38px;
  }

  .neon-line-top, .neon-line-bot {
    font-size: 13px;
    letter-spacing: 0.4px;
  }

  .header-inline-nav {
    flex: 1;
    min-width: 0;
    margin: 0 2px;
  }

  .header-nav-pills-wrap {
    padding: 2px 4px;
    gap: 3px;
  }

  .portal-tab-btn {
    padding: 5px 8px;
    font-size: 10px;
    gap: 3px;
    letter-spacing: 0.2px;
  }

  .header-avatar-img {
    width: 36px;
    height: 36px;
  }

  .portal-main {
    padding: 8px 6px 60px;
  }

  .theater-card {
    border-radius: 12px;
  }

  .video-meta-bar {
    padding: 12px 10px 10px;
  }

  .video-current-title {
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .video-meta-stats-row {
    gap: 4px;
    flex-wrap: wrap;
  }

  .meta-stat-pill {
    font-size: 9px;
    padding: 2px 6px;
  }

  .categories-section {
    padding: 12px 10px 10px;
  }

  .category-card {
    flex: 0 0 130px;
    min-width: 130px;
    padding: 8px 10px 8px;
  }

  .playlist-container {
    padding: 12px 10px 14px;
  }

  .playlist-grid {
    max-height: 320px;
  }

  .playlist-item {
    padding: 6px 8px;
    gap: 8px;
  }

  .playlist-thumb-wrap {
    width: 64px;
    height: 36px;
    border-radius: 6px;
  }

  .clip-num-badge {
    font-size: 11px;
    min-width: 16px;
  }

  .item-title {
    font-size: 11.5px;
    line-height: 1.3;
  }

  /* Admin Modal on Smartphones */
  .admin-modal-container {
    width: 95vw;
    max-height: 90vh;
    border-radius: 14px;
  }

  .admin-modal-header {
    padding: 12px 14px;
  }

  .admin-modal-body {
    padding: 12px 12px 20px;
  }

  .admin-tabs-bar {
    gap: 4px;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }

  .admin-tab-btn {
    font-size: 10px;
    padding: 6px 9px;
  }

  .admin-subtabs-bar {
    gap: 4px;
    padding: 4px;
    margin-bottom: 12px;
  }

  .admin-subtab-btn {
    font-size: 9.5px;
    padding: 5px 6px;
  }

  /* Prevent iOS Safari auto-zoom on input focus */
  .admin-form input,
  .admin-form select,
  .admin-form textarea {
    font-size: 16px !important;
  }

  /* Join Tab on Smartphones */
  .join-card {
    padding: 18px 12px;
    border-radius: 12px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .step-card {
    padding: 14px 12px;
  }

  .join-cta-banner {
    padding: 16px 12px;
    border-radius: 12px;
  }

  .footer-stats {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
}

@media (max-width: 360px) {
  .header-neon-skull {
    height: 32px;
  }
  .neon-line-top, .neon-line-bot {
    display: none;
  }
  .portal-tab-btn .tab-label {
    font-size: 9px;
  }
  .portal-tab-btn {
    padding: 4px 6px;
  }
}


/* =========================================================================
   SYNDICATE UPDATE ALERT MODAL & FLOATING BANNER
   ========================================================================= */
.btn-update-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.22), rgba(147, 51, 234, 0.35));
  border: 1.5px solid #d946ef;
  color: #fff;
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(217, 70, 239, 0.4);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-update-alert:hover {
  background: #d946ef;
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(217, 70, 239, 0.8);
}

.update-icon-pulse {
  display: inline-block;
  animation: jumpIcon 1.5s infinite;
}

.update-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10005;
}

.update-alert-modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 520px;
  background: #0d1020;
  border: 1.5px solid #d946ef;
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 45px rgba(217, 70, 239, 0.45);
  z-index: 10006;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.update-alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.2), rgba(15, 23, 42, 0.6));
}

.update-alert-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.update-zap-badge {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(217, 70, 239, 0.2);
  border: 1px solid #d946ef;
  box-shadow: 0 0 14px rgba(217, 70, 239, 0.4);
}

.update-headline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.update-headline-row h3 {
  font-family: var(--font-header);
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.update-version-tag {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
  color: #d946ef;
  background: rgba(217, 70, 239, 0.2);
  border: 1px solid rgba(217, 70, 239, 0.4);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.update-subheadline {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.update-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.update-close-btn:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: #ef4444;
}

.update-alert-body {
  padding: 18px 22px;
  max-height: 60vh;
  overflow-y: auto;
}

.update-featured-banner {
  background: rgba(217, 70, 239, 0.1);
  border: 1px solid rgba(217, 70, 239, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.update-badge-pill {
  display: inline-block;
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 900;
  color: #d946ef;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.update-featured-banner p {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.4;
  margin: 0;
}

.update-features-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.update-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
}

.feature-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.feature-text strong {
  display: block;
  font-family: var(--font-header);
  font-size: 12.5px;
  color: #fff;
  margin-bottom: 2px;
}

.feature-text p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.update-alert-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-update-reload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #d946ef 0%, #a855f7 100%);
  border: 1px solid #f0abfc;
  color: #fff;
  font-family: var(--font-header);
  font-size: 12px;
  font-weight: 900;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.6);
  transition: all 0.2s ease;
}

.btn-update-reload:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(217, 70, 239, 0.9);
}

.btn-update-dismiss {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-family: var(--font-header);
  font-size: 12px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

/* Floating Update Toast Banner */
.update-floating-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 90%;
  max-width: 440px;
  background: rgba(13, 16, 32, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid #d946ef;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(217, 70, 239, 0.5);
  z-index: 9998;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: bannerSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bannerSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.floating-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.floating-zap {
  font-size: 18px;
  color: #d946ef;
  animation: pulseGreen 1.5s infinite;
}

.floating-banner-text {
  display: flex;
  flex-direction: column;
}

.floating-banner-title {
  font-family: var(--font-header);
  font-size: 12.5px;
  font-weight: 900;
  color: #fff;
}

.floating-banner-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

.floating-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-floating-view {
  background: linear-gradient(135deg, #d946ef, #a855f7);
  border: 1px solid #f0abfc;
  color: #fff;
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-floating-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.btn-floating-dismiss:hover {
  color: #fff;
}

/* =========================================================================
   PWA INSTALL BUTTONS & MOBILE INSTALLATION MODAL
   ========================================================================= */
.btn-install-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(147, 51, 234, 0.35));
  border: 1px solid var(--crew-purple-neon);
  color: #fff;
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-install-header:hover {
  background: var(--crew-purple-light);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
}

.footer-install-btn {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--border-purple);
  color: var(--crew-purple-neon);
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.footer-install-btn:hover {
  background: var(--crew-purple-light);
  color: #fff;
}

/* Install Modal Container */
.install-modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 480px;
  background: #0f1322;
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px var(--crew-purple-glow);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.install-modal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-app-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.install-modal-brand h3 {
  font-family: var(--font-header);
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}

.install-modal-body {
  padding: 22px 20px;
}

.platform-badge-row {
  margin-bottom: 12px;
}

.platform-badge {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.apple-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.android-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.install-intro-text {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 16px;
}

.ios-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ios-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.ios-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--crew-purple-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

.ios-step-content {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.4;
}

.ios-icon-box {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  vertical-align: middle;
}

/* =========================================================================
   HIGH-VISIBILITY STICKY PWA DOCK / BANNER
   ========================================================================= */
.pwa-sticky-dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 860px;
  background: rgba(13, 16, 28, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid #a855f7;
  border-radius: 18px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.85), 0 0 30px rgba(168, 85, 247, 0.45);
  z-index: 9999;
  padding: 14px 20px;
  animation: dockBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dock-slide-up {
  animation: dockSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dock-slide-down {
  animation: dockSlideDown 0.3s ease forwards;
}

@keyframes dockSlideUp {
  from { opacity: 0; transform: translate(-50%, 60px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes dockSlideDown {
  from { opacity: 1; transform: translate(-50%, 0); }
  to   { opacity: 0; transform: translate(-50%, 60px); }
}

.dock-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.dock-close-btn {
  position: absolute;
  top: -6px;
  right: -10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.dock-close-btn:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: #ef4444;
  transform: scale(1.1);
}

.dock-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.dock-icon-wrap {
  position: relative;
  flex-shrink: 0;
}

.dock-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid #a855f7;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
  display: block;
}

.dock-badge-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border: 2px solid #0f1322;
  border-radius: 50%;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.dock-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dock-headline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dock-title {
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.dock-badge {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.dock-subtext {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.dock-right {
  flex-shrink: 0;
}

.btn-dock-install {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  border: 1px solid #c084fc;
  color: #fff;
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 900;
  padding: 11px 22px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
  white-space: nowrap;
  animation: pulseButton 2s infinite ease-in-out;
}

.btn-dock-install:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.9);
  background: linear-gradient(135deg, #c084fc 0%, #9333ea 100%);
}

@keyframes pulseButton {
  0%, 100% { box-shadow: 0 0 16px rgba(168, 85, 247, 0.5); }
  50% { box-shadow: 0 0 28px rgba(168, 85, 247, 0.9), 0 0 8px #c084fc; }
}

/* Pulsing Header Install Button */
.btn-pulse-glow {
  animation: pulseButton 2.5s infinite ease-in-out;
  border-color: #c084fc !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(126, 34, 206, 0.5)) !important;
}

.install-icon-pulse {
  display: inline-block;
  animation: jumpIcon 1.5s infinite;
}

@keyframes jumpIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Responsive Mobile Stacking for Dock */
@media (max-width: 640px) {
  .pwa-sticky-dock {
    bottom: 12px;
    width: 95%;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .dock-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .dock-left {
    gap: 10px;
  }

  .dock-app-icon {
    width: 40px;
    height: 40px;
  }

  .dock-title {
    font-size: 13px;
  }

  .dock-subtext {
    font-size: 10.5px;
  }

  .btn-dock-install {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 12px;
  }
}


