/* ==========================================================================
   CEVIOD — MASTER DESIGN SYSTEM v3.0 (HayukTube Luxury Edition)
   Dark Luxury | Glassmorphism | Blur | Floating Card | Smooth Motion | 60FPS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@400;600;700;800;900&display=swap');

:root {
  /* Core Backgrounds */
  --bg-deep:          #05070D;
  --bg-surface:       #0C1320;
  --bg-card:          rgba(18, 26, 40, 0.78);
  --bg-card-hover:    rgba(25, 36, 56, 0.90);
  --bg-glass:         rgba(255, 255, 255, 0.06);
  --bg-glass-hover:   rgba(255, 255, 255, 0.10);
  
  --header-bg:        rgba(5, 7, 13, 0.88);
  --sidebar-bg:       rgba(5, 7, 13, 0.94);
  --input-bg:         rgba(18, 26, 40, 0.85);
  --dropdown-bg:      rgba(12, 19, 32, 0.98);
  --modal-bg:         rgba(10, 15, 26, 0.95);
  --chip-bg:          rgba(255, 255, 255, 0.07);
  --chip-hover:       rgba(255, 255, 255, 0.14);

  /* Borders */
  --border:           rgba(255, 255, 255, 0.08);
  --border-hover:     rgba(255, 255, 255, 0.18);
  --border-active:    rgba(0, 194, 255, 0.40);

  /* Primary Accent & Glow */
  --primary:          #00C2FF;
  --primary-hover:    #00A4F4;
  --primary-glow:     rgba(0, 194, 255, 0.25);

  /* Secondary Accents */
  --purple:           #7B61FF;
  --purple-glow:      rgba(123, 97, 255, 0.25);
  --success:          #00D27A;
  --danger:           #FF4B6E;
  --warning:          #FFB547;
  --emerald:          #10B981;
  --amber:            #F59E0B;
  --cyan:             #06B6D4;

  /* Typography Colors */
  --text:             #FFFFFF;
  --text-secondary:   #A9B4C7;
  --text-muted:       #64748B;

  /* Dimensions & Spacing */
  --radius:           16px;
  --radius-sm:        10px;
  --radius-lg:        20px;
  --radius-xl:        24px;
  --radius-card:      18px;
  --sidebar-w:        260px;
  --sidebar-collapsed: 72px;
  --header-h:         64px;
  --bottom-nav-h:     56px;

  /* Shadows & Transitions */
  --shadow-card:      0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-hover:     0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 194, 255, 0.18);
  --shadow-modal:     0 30px 80px rgba(0, 0, 0, 0.85);
  --transition:       0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --spring:           0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --fade:             0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"], body[data-theme="light"] {
  /* Core Backgrounds */
  --bg-deep:          #F0F2F6;
  --bg-surface:       #FFFFFF;
  --bg-card:          #FFFFFF;
  --bg-card-hover:    #F8FAFC;
  --bg-glass:         rgba(0, 0, 0, 0.04);
  --bg-glass-hover:   rgba(0, 0, 0, 0.08);

  --header-bg:        rgba(255, 255, 255, 0.94);
  --sidebar-bg:       rgba(255, 255, 255, 0.98);
  --input-bg:         #EDF1F7;
  --dropdown-bg:      #FFFFFF;
  --modal-bg:         #FFFFFF;
  --chip-bg:          #E2E8F0;
  --chip-hover:       #CBD5E1;

  /* Borders */
  --border:           rgba(0, 0, 0, 0.10);
  --border-hover:     rgba(0, 0, 0, 0.20);
  --border-active:    #00C2FF;

  /* Typography Colors */
  --text:             #0F172A;
  --text-secondary:   #475569;
  --text-muted:       #64748B;

  /* Shadows */
  --shadow-card:      0 4px 18px rgba(0, 0, 0, 0.06);
  --shadow-hover:     0 12px 30px rgba(0, 0, 0, 0.10);
  --shadow-modal:     0 20px 60px rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ==========================================================================
   Skeleton Shimmer Loader
   ========================================================================== */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.03) 25%, 
    rgba(255, 255, 255, 0.08) 50%, 
    rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Header (Sticky Blur Capsule)
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

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

.sidebar-toggle-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.sidebar-toggle-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text);
  border-color: var(--border-hover);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}
.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}
.brand-slogan {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  margin-top: 2px;
}
.brand-title span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-badge {
  font-size: 9px;
  font-weight: 800;
  background: rgba(0, 194, 255, 0.15);
  color: var(--primary);
  border: 1px solid rgba(0, 194, 255, 0.3);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  margin-left: 4px;
}

/* Capsule Search Bar (YouTube-Style) */
.header-search-wrap {
  flex: 1;
  max-width: 580px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-capsule {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  height: 40px;
  transition: var(--transition);
  position: relative;
}
.search-capsule:focus-within {
  border-color: #1c62b9;
  box-shadow: 0 0 0 1px #1c62b9 inset;
  background: var(--input-bg);
}
.search-submit-btn {
  width: 64px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0 99px 99px 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.search-submit-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.btn-voice-search {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-voice-search:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--primary);
  transform: scale(1.05);
}
.btn-voice-search.listening {
  background: #ef4444 !important;
  color: #fff !important;
  animation: pulseMic 1.2s infinite;
}
@keyframes pulseMic {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  display: none;
}
.search-clear-btn.visible {
  display: block;
}
.search-clear-btn:hover {
  color: var(--text);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: var(--transition);
}
.btn-icon:hover {
  background: var(--bg-glass-hover);
  color: var(--text);
  border-color: var(--border-hover);
}

/* Standard Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  outline: none;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0088FF 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(0, 194, 255, 0.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}
.btn-pill {
  border-radius: 99px;
}

/* User Profile Mini Dropdown in Header */
.user-header-wrap {
  position: relative;
}
.user-badge-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
}
.user-badge-header:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
}
.user-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.user-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* User Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-modal);
  backdrop-filter: blur(25px);
  padding: 8px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-dropdown-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.user-dropdown-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown-role {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  margin-top: 2px;
}
.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.user-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}
.user-dropdown-item.text-danger {
  color: var(--danger);
}
.user-dropdown-item.text-danger:hover {
  background: rgba(255, 75, 110, 0.12);
  color: #ff6b8b;
}

/* ==========================================================================
   Layout: Desktop Sidebar & Main Canvas
   ========================================================================== */
.app-container {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}

.desktop-sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 6px;
  overflow-y: auto;
  z-index: 900;
  transition: width 0.3s var(--fade), padding 0.3s var(--fade), background 0.3s ease, border-color 0.3s ease;
}
.desktop-sidebar.collapsed {
  width: var(--sidebar-collapsed);
  padding: 16px 8px;
}

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 10px 14px 4px;
  transition: opacity 0.2s ease;
}
.desktop-sidebar.collapsed .sidebar-section-title,
.desktop-sidebar.collapsed .sidebar-divider {
  display: none !important;
  opacity: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}
.sidebar-link i {
  font-size: 17px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-link:hover {
  background: var(--bg-glass-hover);
  color: var(--text);
}
.sidebar-link.active {
  background: rgba(0, 194, 255, 0.12);
  color: var(--primary);
  font-weight: 800;
  border-left: 3px solid var(--primary);
}
.desktop-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 12px 0;
}
.desktop-sidebar.collapsed .sidebar-link span,
.desktop-sidebar.collapsed .sidebar-badge {
  display: none;
}

.sidebar-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}
.sidebar-badge.admin {
  background: rgba(123, 97, 255, 0.2);
  color: var(--purple);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 6px;
}

.sidebar-footer-info {
  margin-top: auto;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
}
.desktop-sidebar.collapsed .sidebar-footer-info {
  display: none;
}

/* Main Content Wrapper */
.main-canvas {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  padding: 20px 28px 80px;
  transition: margin-left 0.3s var(--fade);
}
.main-canvas.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed);
}

/* ==========================================================================
   Mobile Sliding Sidebar & Bottom Navigation
   ========================================================================== */
.mobile-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998 !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.28s ease;
}
.mobile-sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 300px;
  max-width: 86vw;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  z-index: 99999 !important;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 16px 14px calc(var(--bottom-nav-h, 64px) + env(safe-area-inset-bottom, 0px) + 50px) !important;
  box-shadow: 10px 0 50px rgba(0, 0, 0, 0.9);
}
.mobile-sidebar.open {
  transform: translateX(0);
}

.mobile-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.mobile-profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(0, 194, 255, 0.4);
}
.mobile-profile-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}
.mobile-profile-info p {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Mobile Bottom Navigation Bar (56px Premium Elevated Glass Dock) */
.bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px)) !important;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box !important;
  background: rgba(6, 10, 18, 0.96) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6) !important;
  display: none;
  align-items: center !important;
  justify-content: space-around !important;
  z-index: 9999 !important;
}
.bottom-nav-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: -0.1px;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  position: relative !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  flex: 1 !important;
  max-width: 68px !important;
}
.bottom-nav-item i {
  font-size: 18px !important;
  line-height: 1 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}
.bottom-nav-item span {
  font-size: 10px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}
.bottom-nav-item:active {
  transform: scale(0.92);
}
.bottom-nav-item.active {
  color: var(--primary) !important;
  font-weight: 800 !important;
}
.bottom-nav-item.active i {
  color: var(--primary) !important;
  transform: translateY(-1px) !important;
  text-shadow: 0 0 10px rgba(0, 194, 255, 0.6) !important;
}
.bottom-nav-item.active::after {
  content: '' !important;
  position: absolute !important;
  bottom: 2px !important;
  width: 14px !important;
  height: 2.5px !important;
  border-radius: 2px !important;
  background: var(--primary) !important;
  box-shadow: 0 0 6px var(--primary) !important;
}

/* Light Theme overrides for ultra-sleek bottom nav */
[data-theme="light"] .bottom-nav,
body.theme-light .bottom-nav,
body[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .bottom-nav-item,
body.theme-light .bottom-nav-item,
body[data-theme="light"] .bottom-nav-item {
  color: #64748b !important;
}
[data-theme="light"] .bottom-nav-item.active,
body.theme-light .bottom-nav-item.active,
body[data-theme="light"] .bottom-nav-item.active {
  color: #0284c7 !important;
}
[data-theme="light"] .bottom-nav-item.active i,
body.theme-light .bottom-nav-item.active i,
body[data-theme="light"] .bottom-nav-item.active i {
  color: #0284c7 !important;
  text-shadow: none !important;
}
[data-theme="light"] .bottom-nav-item.active::after,
body.theme-light .bottom-nav-item.active::after,
body[data-theme="light"] .bottom-nav-item.active::after {
  background: #0284c7 !important;
  box-shadow: 0 0 4px #0284c7 !important;
}

/* ==========================================================================
   Hero Banner Section (Auto-Slide 5s Carousel — Uncropped 16:9 Cinema View)
   ========================================================================== */
.hero-carousel-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  min-height: 360px;
  max-height: 480px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 194, 255, 0.12);
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.01);
  display: flex;
  align-items: flex-end;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  filter: brightness(0.92);
  transition: transform 0.6s ease;
}

.hero-overlay-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    rgba(5, 7, 13, 0.96) 0%, 
    rgba(5, 7, 13, 0.82) 38%, 
    rgba(5, 7, 13, 0.35) 68%, 
    transparent 100%),
    linear-gradient(180deg, 
    transparent 65%, 
    rgba(5, 7, 13, 0.90) 100%);
}

body[data-theme="light"] .hero-overlay-grad {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.97) 0%, 
    rgba(255, 255, 255, 0.84) 38%, 
    rgba(255, 255, 255, 0.35) 68%, 
    transparent 100%),
    linear-gradient(180deg, 
    transparent 65%, 
    rgba(255, 255, 255, 0.90) 100%);
}
body[data-theme="light"] .hero-title {
  color: #0F172A;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 30px 38px;
  max-width: 650px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 194, 255, 0.2);
  border: 1px solid rgba(0, 194, 255, 0.4);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.hero-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 768px) {
  .hero-carousel-wrap {
    aspect-ratio: 16 / 10;
    min-height: 280px;
    max-height: 380px;
    margin-bottom: 18px;
  }
  .hero-content {
    padding: 20px 18px;
    max-width: 100%;
  }
  .hero-title {
    font-size: 15px;
    line-height: 1.3;
  }
  .hero-overlay-grad {
    background: linear-gradient(180deg, 
      rgba(5, 7, 13, 0.2) 0%, 
      rgba(5, 7, 13, 0.7) 45%, 
      rgba(5, 7, 13, 0.98) 100%);
  }
}

/* ==========================================================================
   YouTube 1:1 In-Player Ad System & Sponsored Cards
   ========================================================================== */
.yt-ad-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #000;
}

.yt-ad-sponsor-label-row {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 86;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.3px;
  pointer-events: none;
}
.yt-ad-sponsor-label-row i {
  font-size: 10px;
  color: #FACC15;
}

/* Video Watch Title Typography (Compact & Sleek) */
.watch-title-text {
  font-family: 'Roboto', 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #FFFFFF;
  margin: 12px 0 10px 0;
  letter-spacing: -0.2px;
  word-break: break-word;
}

.yt-ad-skip-btn {
  position: absolute;
  bottom: 40px;
  right: 0;
  z-index: 86;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-right: none;
  color: rgba(255, 255, 255, 0.9);
  padding: 5px 12px 5px 10px;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.2px;
}
.yt-ad-skip-btn.can-skip {
  background: rgba(0, 0, 0, 0.88);
  border-color: rgba(255, 255, 255, 0.45);
  color: #FFFFFF;
  cursor: pointer;
}
.yt-ad-skip-btn.can-skip:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

@media (max-width: 900px) {
  .yt-ad-skip-btn {
    bottom: 34px !important;
    padding: 3px 8px 3px 6px !important;
    font-size: 10.5px !important;
    gap: 4px !important;
    border-radius: 3px 0 0 3px !important;
  }
}

.watch-sidebar-ad-slot,
.watch-ad-banner-slot {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  transition: var(--transition);
}
.watch-sidebar-ad-slot:hover,
.watch-ad-banner-slot:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 194, 255, 0.12);
}

/* YouTube Sponsored Card (Feed / Recommendation Top) */
.yt-sponsored-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: var(--transition);
}
.yt-sponsored-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(0, 194, 255, 0.15);
}
.yt-sponsored-visual {
  width: 180px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 194, 255, 0.15), rgba(123, 97, 255, 0.25));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 194, 255, 0.3);
  position: relative;
  overflow: hidden;
}
.yt-sponsored-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.yt-sponsored-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.yt-sponsored-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}
.yt-sponsored-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* In-Feed Native Video Ad Card (Dynamic & High CTR) */
.in-feed-ad-card {
  position: relative;
  border: 1px solid rgba(250, 204, 21, 0.25) !important;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.in-feed-ad-card:hover {
  transform: translateY(-4px);
  border-color: #FACC15 !important;
  box-shadow: 0 12px 30px rgba(250, 204, 21, 0.18), 0 0 15px rgba(250, 204, 21, 0.1);
}
.in-feed-ad-card .thumbnail-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.in-feed-ad-card .ad-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 3;
}
.in-feed-ad-card:hover .ad-hover-video {
  opacity: 1;
}
.in-feed-ad-card .ad-cta-btn {
  background: linear-gradient(135deg, #FACC15, #EAB308);
  color: #000;
  font-weight: 800;
  font-size: 11.5px;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(250, 204, 21, 0.35);
  transition: all 0.2s ease;
}
.in-feed-ad-card:hover .ad-cta-btn {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(250, 204, 21, 0.55);
}
.in-feed-badge-anim {
  background: #FACC15 !important;
  color: #000 !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px;
}
.yt-sponsored-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.hero-dots {
  position: absolute;
  bottom: 18px;
  right: 32px;
  display: flex;
  gap: 8px;
  z-index: 3;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}
.hero-dot.active {
  width: 24px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   Category Chips Row
   ========================================================================== */
.chips-scroll-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 22px;
  scrollbar-width: none;
}
.chips-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 8px 18px;
  border-radius: 99px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}
.chip:hover {
  background: var(--bg-glass-hover);
  color: var(--text);
  border-color: var(--border-hover);
}
.chip.active {
  background: linear-gradient(135deg, rgba(0, 194, 255, 0.25), rgba(123, 97, 255, 0.25));
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* ==========================================================================
   Shorts Carousel Section (9:16 Cards)
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.shorts-carousel-wrap {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 32px;
  scrollbar-width: none;
}
.shorts-carousel-wrap::-webkit-scrollbar {
  display: none;
}

.short-card {
  width: 170px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-card);
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.3s var(--spring), box-shadow 0.3s ease;
}
.short-card:hover {
  transform: scale(1.05) translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}
.short-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.short-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 7, 13, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 12px;
}
.short-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 194, 255, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0;
  transition: all 0.25s ease;
}
.short-card:hover .short-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.short-title {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.short-views {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

/* ==========================================================================
   Main Video Grid & Redesigned Video Cards
   ========================================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.3s var(--spring), box-shadow 0.3s ease, border-color 0.2s ease;
  position: relative;
}
.video-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-active);
}

.thumbnail-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.video-card:hover .thumbnail-img {
  transform: scale(1.06);
}

.badge-hd {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 194, 255, 0.9);
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.badge-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.play-overlay-icon {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.play-overlay-icon div {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 20px var(--primary-glow);
}
.video-card:hover .play-overlay-icon {
  opacity: 1;
}

.video-info {
  padding: 14px;
  display: flex;
  gap: 12px;
  flex: 1;
}
.uploader-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.uploader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-meta-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.video-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-uploader-name {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.video-stats-row {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.video-cat-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--primary);
  background: rgba(0, 194, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 6px;
  align-self: flex-start;
}

/* ==========================================================================
   In-App YouTube Watch View & Replica Player
   ========================================================================== */
.watch-view-layout {
  display: none;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  max-width: 1600px;
  margin: 0 auto;
  padding-bottom: 80px;
}
.watch-view-layout.active {
  display: grid;
}

.player-main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.custom-player-wrapper {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 180px);
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-player-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: none;
}

/* Fast Forward 2.0x Indicator Pill */
.yt-ff-pill {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 30;
}
.yt-ff-pill.active {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Center Play/Pause & Skip Ripple Effect */
.yt-center-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  pointer-events: none;
  opacity: 0;
  z-index: 25;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}
.yt-center-ripple.animate {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Mobile Center Play / Prev / Next Controls (Only in Mobile View) */
.yt-mobile-center-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  align-items: center;
  gap: 32px;
  z-index: 15;
  pointer-events: auto;
}
.yt-mobile-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.yt-mobile-btn.big {
  width: 60px;
  height: 60px;
  font-size: 24px;
  background: rgba(0, 0, 0, 0.8);
}
.yt-mobile-btn:active {
  transform: scale(0.9);
}

/* Top Bar for Mobile Player */
.yt-top-watermark-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  display: none;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 12;
}
.custom-player-wrapper:hover .yt-top-watermark-bar,
.custom-player-wrapper.controls-visible .yt-top-watermark-bar {
  opacity: 1;
}

/* Custom Player Controls Bar (YouTube Red Line) */
.player-controls-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
  padding: 24px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}
.custom-player-wrapper:hover .player-controls-overlay,
.player-controls-overlay.show,
.custom-player-wrapper.controls-visible .player-controls-overlay {
  opacity: 1;
}

/* Upload Tabs Bar */
.upload-tabs-bar {
  display: flex;
  gap: 4px;
  padding: 8px 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}
.upload-tab-btn {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.upload-tab-btn:hover {
  color: var(--text);
}
.upload-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* YouTube Red Scrubber Progress Bar */
.player-progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
  cursor: pointer;
  transition: height 0.12s ease;
}
.player-progress-bar-wrap:hover {
  height: 7px;
}
.player-buffer-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  width: 0%;
}
.player-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: #FF0000;
  width: 0%;
}
.player-scrubber-handle {
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%) scale(0);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #FF0000;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.8);
  transition: transform 0.15s ease;
  pointer-events: none;
}
.player-progress-bar-wrap:hover .player-scrubber-handle,
.custom-player-wrapper.scrubbing .player-scrubber-handle {
  transform: translateY(-50%) scale(1);
}

.player-buttons-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Modern Social Share Buttons */
.share-social-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.share-social-btn:hover {
  transform: translateY(-2px) scale(1.08);
  filter: brightness(1.15);
}
.player-controls-left, .player-controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.yt-ctrl-btn {
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, transform 0.1s ease;
  outline: none;
}
.yt-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
.yt-ctrl-btn:active {
  transform: scale(0.92);
}

.yt-badge-hd {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #FF0000;
  color: #FFFFFF;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
  pointer-events: none;
}

.time-display-pill {
  font-family: 'Roboto', 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #FFFFFF;
  margin-left: 6px;
  letter-spacing: 0.3px;
}

/* ==========================================
   YOUTUBE 1:1 SETTINGS GEAR POPOVER (DESKTOP)
   ========================================== */
.yt-settings-menu {
  position: absolute;
  bottom: 54px;
  right: 12px;
  width: 270px;
  max-height: calc(100% - 64px);
  overflow-y: auto;
  background: rgba(18, 18, 28, 0.97);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 6px 0;
  z-index: 9999;
  display: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
  animation: ytFadeIn 0.2s ease;
}
.yt-settings-menu.open {
  display: block;
}
@keyframes ytFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.yt-settings-back-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  margin-bottom: 4px;
}
.yt-settings-back-header:hover {
  background: rgba(255, 255, 255, 0.08);
}

.yt-settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #E8EAED;
  cursor: pointer;
  transition: background 0.15s ease;
}
.yt-settings-item:hover {
  background: rgba(255, 255, 255, 0.1);
}
.yt-settings-item.active {
  color: #3EA6FF;
  font-weight: 700;
}
.yt-settings-val {
  font-size: 12px;
  color: #AAAAAA;
  font-weight: 500;
}

/* YouTube Slider Toggle Switch */
.yt-toggle-switch {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #606060;
  position: relative;
  cursor: pointer;
  transition: background 0.25s ease;
}
.yt-toggle-switch.active {
  background: #3EA6FF;
}
.yt-toggle-knob {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.yt-toggle-switch.active .yt-toggle-knob {
  transform: translateX(16px);
}

/* Volume Pill Capsule (Matching Red Playback Progress Bar) */
.player-volume-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 2px 10px 2px 4px;
  transition: all 0.25s ease;
  height: 32px;
}
.player-volume-pill:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 0, 0, 0.5);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.2);
}
.volume-btn-inner {
  width: 28px !important;
  height: 28px !important;
  font-size: 13px !important;
  color: #FFFFFF !important;
}
.volume-btn-inner:hover {
  color: #FF0000 !important;
}
.volume-slider-range {
  -webkit-appearance: none;
  appearance: none;
  width: 64px;
  height: 4px;
  background: linear-gradient(to right, #FF0000 0%, #FF0000 100%, rgba(255, 255, 255, 0.25) 100%, rgba(255, 255, 255, 0.25) 100%);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  transition: width 0.2s ease, background 0.15s ease;
}
.volume-slider-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FF0000;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.9);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.volume-slider-range::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}
.volume-slider-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FF0000;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.9);
  cursor: pointer;
}

/* Controls Inactivity Auto-Hiding */
.custom-player-wrapper.controls-hidden {
  cursor: none !important;
}
.custom-player-wrapper.controls-hidden .player-controls-overlay,
.custom-player-wrapper.controls-hidden .yt-top-watermark-bar,
.custom-player-wrapper.controls-hidden .yt-mobile-center-controls {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================
   YOUTUBE MOBILE & FULLSCREEN SLIDE-UP BOTTOM SHEET MODAL
   ========================================== */
.yt-mobile-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  border-radius: inherit;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.yt-mobile-sheet-backdrop.open {
  display: flex !important;
  opacity: 1;
}
.yt-mobile-bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85%;
  background: #181A20;
  border-radius: 20px 20px 0 0;
  padding: 12px 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9);
  overflow-y: auto;
}
.yt-mobile-sheet-backdrop.open .yt-mobile-bottom-sheet {
  transform: translateY(0);
}
.yt-sheet-drag-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 auto 16px;
}
.yt-sheet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-radius: 12px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.yt-sheet-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.yt-sheet-item:active {
  background: rgba(255, 255, 255, 0.08);
}
.yt-sheet-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.yt-sheet-item-left i {
  font-size: 16px;
  color: #AAAAAA;
  width: 20px;
  text-align: center;
}
.yt-sheet-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #AAAAAA;
  font-weight: 500;
}

@media (max-width: 768px) {
  .yt-mobile-center-controls {
    display: flex;
  }
  .yt-settings-menu {
    display: none !important;
  }
}

/* ==========================================================================
   Watch Meta & Details (Modern YouTube Replica)
   ========================================================================== */
.watch-meta-box {
  margin-top: 14px;
}
.watch-title-text {
  font-family: 'Roboto', 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.35;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
  word-break: break-word;
}

.channel-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 12px;
}
.channel-profile-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.channel-avatar-big {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1E293B;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  flex-shrink: 0;
}
.channel-avatar-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.channel-name-col h3 {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}
.channel-name-col p {
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.2;
}
.btn-subscribe,
#btnSubscribe {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: none !important;
  border-radius: 99px !important;
  padding: 7px 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 4px;
}
.btn-subscribe:hover,
#btnSubscribe:hover {
  background: #E2E8F0 !important;
  transform: scale(1.02);
}

.watch-action-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.action-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s ease;
}
.action-pill:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}
.action-pill.active {
  background: rgba(0, 194, 255, 0.2);
  border-color: var(--primary);
  color: var(--primary);
}
.action-pill.danger {
  color: #FF6B81;
  border-color: rgba(255, 107, 129, 0.3);
}

/* Expandable Description Box (YouTube Replica Glass Card) */
.watch-desc-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #CBD5E1;
  transition: all 0.2s ease;
}
.desc-stats-bar {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.desc-text-body {
  white-space: pre-wrap;
  word-break: break-word;
  color: #94A3B8;
  font-size: 12.5px;
}

/* Watch Chips Filter Bar */
.watch-chips-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.watch-chips-bar::-webkit-scrollbar {
  display: none;
}
.watch-chip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.watch-chip-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
.watch-chip-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #FFFFFF;
  font-weight: 700;
}

/* Recommendations Column (Desktop Sidebar Layout) */
.watch-rec-col .desktop-rec-title {
  font-family: 'Roboto', 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 12px;
}
.rec-video-card {
  display: flex;
  gap: 10px;
  background: transparent;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.rec-video-card:hover {
  background: rgba(255, 255, 255, 0.06);
}
.rec-thumb-wrap {
  width: 160px;
  height: 90px;
  border-radius: 8px;
  background: #0F172A;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.rec-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-duration-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.85);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}
.rec-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.rec-creator-avatar {
  display: none;
}
.rec-details {
  flex: 1;
  min-width: 0;
}
.rec-title {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.rec-meta {
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.3;
}

/* ==========================================================================
   Floating Draggable Mini Player
   ========================================================================== */
.mini-player-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  z-index: 1500;
  display: none;
  cursor: grab;
  animation: slideUpMini 0.3s var(--spring);
}
.mini-player-container.active {
  display: block;
}
@keyframes slideUpMini {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.mini-player-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}
.mini-player-close-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease, background 0.2s ease;
}
.mini-player-close-badge:active {
  transform: scale(0.9);
}
.mini-player-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mini-player-bar {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 19, 32, 0.95);
}
.mini-player-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.mini-player-btns {
  display: flex;
  gap: 6px;
}
.mini-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
}
.mini-btn:hover {
  color: var(--text);
}

/* ==========================================================================
   Shorts Reel Modal (Full Immersive Reel)
   ========================================================================== */
.shorts-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(20px);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
}
.shorts-modal.open {
  display: flex;
}
.shorts-reel-container {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 9 / 16;
  max-height: 90vh;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}
.shorts-reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shorts-reel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
}

/* ==========================================================================
   Creator Studio (HayStudio / CEVIOD Studio)
   ========================================================================== */
.metrics-grid-studio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card-studio {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s, border-color 0.2s;
}
.metric-card-studio:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}
.metric-card-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.metric-card-value {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
}
.metric-card-sub {
  font-size: 11px;
  color: var(--success);
  margin-top: 4px;
  font-weight: 600;
}

.studio-tabs-row {
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.studio-tab-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.studio-tab-btn.active {
  background: var(--primary);
  color: #000;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.studio-table-wrap,
.table-responsive-studio {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

.studio-table,
.table-studio {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.studio-table th,
.table-studio th {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.studio-table td,
.table-studio td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  vertical-align: middle;
}

.studio-table tr:hover td,
.table-studio tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-thumb-preview {
  width: 80px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #000;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.table-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

/* Studio Pagination Bar */
.studio-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.studio-pagination-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.studio-pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.studio-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.studio-page-btn:hover:not(.disabled):not(.active) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.studio-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #070B14;
  box-shadow: 0 0 12px rgba(0, 194, 255, 0.35);
  font-weight: 800;
}

.studio-page-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.mobile-only-inline { display: none !important; }
.mobile-only-block { display: none !important; }
.desktop-only-cell { display: table-cell !important; }
.desktop-only-inline { display: inline-block !important; }

.studio-mobile-top-row {
  display: flex;
  align-items: center;
}
.studio-mobile-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.studio-mobile-stats-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.studio-mobile-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* ==========================================================================
   Modals (Glassmorphism)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open {
  display: flex;
}

.modal-box-glass {
  width: 100%;
  max-width: 540px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  animation: modalScale 0.3s var(--spring);
}
@keyframes modalScale {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header-glass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header-glass h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}
.modal-close-btn:hover {
  color: var(--text);
}

.modal-body-glass {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Dropzone */
.dropzone-box {
  border: 2px dashed rgba(0, 194, 255, 0.4);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  background: rgba(0, 194, 255, 0.04);
  cursor: pointer;
  transition: all 0.25s ease;
}
.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--primary);
  background: rgba(0, 194, 255, 0.1);
}
.dropzone-icon {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 10px;
}

/* Form Controls */
.form-group-glass {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group-glass label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.input-glass {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-glass:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Upload Progress Bar */
.upload-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.upload-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.upload-progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}
.upload-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  width: 0%;
  transition: width 0.2s ease;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: rgba(12, 19, 32, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideIn 0.3s var(--spring);
  color: #fff;
}
@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast-item.success { border-left: 4px solid var(--success); }
.toast-item.error { border-left: 4px solid var(--danger); }
.toast-item.info { border-left: 4px solid var(--primary); }
.toast-icon { font-size: 18px; }
.toast-item.success .toast-icon { color: var(--success); }
.toast-item.error .toast-icon { color: var(--danger); }
.toast-item.info .toast-icon { color: var(--primary); }
.toast-text h4 { font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.toast-text p { font-size: 11.5px; color: var(--text-secondary); }

/* Visibility Helpers */
.desktop-only { display: inline-flex !important; }
.mobile-only { display: none !important; }

/* Declarative Authentication Visibility */
.auth-logged-only, .auth-admin-only, .auth-creator-only { display: none !important; }

/* Authenticated User Rules */
body.is-authenticated .auth-logged-only { display: inline-flex !important; }
body.is-authenticated aside .auth-logged-only,
body.is-authenticated aside .auth-user-only,
body.is-authenticated .mobile-sidebar .auth-logged-only,
body.is-authenticated .mobile-sidebar .auth-user-only {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}
body.is-authenticated .auth-guest-only { display: none !important; }

/* Admin Rules */
body.is-admin .auth-admin-only { display: inline-flex !important; }
body.is-admin aside .auth-admin-only,
body.is-admin .mobile-sidebar .auth-admin-only {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

/* Guest Rules */
body:not(.is-authenticated) aside .auth-guest-only,
body:not(.is-authenticated) .mobile-sidebar .auth-guest-only {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

.user-dropdown-menu .auth-admin-only,
.user-dropdown-menu .auth-user-only,
.user-dropdown-menu .auth-logged-only {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  gap: 2px !important;
}

div.desktop-only, aside.desktop-only, section.desktop-only { display: block !important; }

/* ==========================================================================
   Responsive Breakpoints (5 Breakpoint System)
   ========================================================================== */
@media (max-width: 1440px) {
  .video-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1100px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .desktop-only,
  div.desktop-only,
  span.desktop-only,
  aside.desktop-only,
  section.desktop-only,
  button.desktop-only,
  a.desktop-only,
  .brand-slogan { 
    display: none !important; 
  }
  .mobile-only { display: inline-flex !important; }
  body.is-authenticated .auth-logged-only.desktop-only { display: none !important; }
  body.is-authenticated .auth-logged-only.mobile-only { display: inline-flex !important; }
  body.is-admin .auth-admin-only.desktop-only { display: none !important; }
  body.is-admin .auth-admin-only.mobile-only { display: inline-flex !important; }
  .custom-player-wrapper { max-height: none; }

  :root {
    --sidebar-w: 0px;
    --header-h: 54px;
  }
  .desktop-sidebar { display: none !important; }
  .app-container {
    display: block !important;
    padding-top: 54px !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .main-canvas { 
    margin-left: 0 !important; 
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 12px calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + 30px) !important; 
  }
  .bottom-nav { display: flex !important; }

  /* Mobile Header Layout (1:1 YouTube Clean Bar - Zero Cutoff) */
  .header { 
    padding: 0 10px 0 12px !important; 
    height: 54px !important;
    gap: 6px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    z-index: 1000 !important;
  }
  .header-left { 
    display: flex !important;
    align-items: center !important;
    gap: 8px !important; 
    flex-shrink: 0 !important;
    min-width: 0 !important;
  }
  .header-left .sidebar-toggle-btn.desktop-only {
    display: none !important;
  }
  .header-left .sidebar-toggle-btn.mobile-only {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    font-size: 15px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }
  .header-left .sidebar-toggle-btn.mobile-only:active {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: scale(0.95);
  }
  .brand-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
  }
  .brand-logo-img { 
    width: 26px !important; 
    height: 26px !important; 
    flex-shrink: 0 !important;
  }
  .brand-title { 
    font-size: 17px !important; 
    font-weight: 900 !important;
    letter-spacing: -0.4px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  .brand-slogan {
    display: none !important;
  }

  /* Expandable Mobile Search Overlay (Clean Fullscreen Header Bar) */
  .header-search-wrap:not(.mobile-search-open) {
    display: none !important;
  }
  .header-search-wrap {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    background: rgba(5, 7, 13, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 10000;
    padding: 6px 10px;
    align-items: center;
    max-width: 100%;
    box-sizing: border-box;
  }
  .header-search-wrap.mobile-search-open {
    display: flex !important;
  }
  .header-search-wrap .search-capsule {
    width: 100%;
    height: 40px;
    border-color: var(--primary);
  }

  /* Mobile Header Actions (Clean, Symmetrically Spaced Icons) */
  .header-actions { 
    display: flex !important;
    align-items: center !important;
    gap: 4px !important; 
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
  .btn-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 13px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .btn-primary-icon {
    background: linear-gradient(135deg, var(--primary) 0%, #0088FF 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 0 10px var(--primary-glow) !important;
  }
  .user-header-wrap {
    position: relative;
    flex-shrink: 0;
  }
  .user-badge-header {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }
  .user-avatar-mini {
    width: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
    border: 2px solid rgba(0, 194, 255, 0.4) !important;
    box-shadow: 0 0 10px rgba(0, 194, 255, 0.25) !important;
  }
  .user-dropdown-menu {
    top: calc(100% + 8px);
    right: 0;
    width: 230px;
  }

  .watch-view-layout { 
    display: flex !important;
    flex-direction: column !important;
    gap: 16px; 
  }
  .player-main-col {
    display: contents !important;
  }
  .custom-player-wrapper { 
    order: 1 !important; 
    position: sticky !important;
    top: 60px !important;
    z-index: 990 !important;
    background: #000000 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9) !important;
    border-radius: 0 !important;
  }
  .watch-meta-box { order: 2 !important; }
  .watch-title-text { 
    font-size: 15px !important; 
    font-weight: 700 !important; 
    line-height: 1.35 !important; 
    margin: 8px 0 !important; 
  }
  .channel-actions-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .channel-profile-left {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
  .channel-profile-left .btn-subscribe,
  .channel-profile-left #btnSubscribe {
    margin-left: auto !important;
  }
  .watch-action-pills {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .watch-action-pills::-webkit-scrollbar {
    display: none !important;
  }
  .action-pill {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .watch-rec-col { order: 4 !important; }
  .watch-rec-col #watchSidebarAdSlot { display: none !important; }
  .watch-rec-col .desktop-rec-title { display: none !important; }

  /* Mobile Related Video Cards: Full-Width Big Cards (1:1 YouTube Mobile App) */
  .rec-video-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin-bottom: 22px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }
  .rec-thumb-wrap {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #000000 !important;
  }
  .video-duration-badge {
    bottom: 8px !important;
    right: 8px !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    background: rgba(0, 0, 0, 0.85) !important;
  }
  .rec-info {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    align-items: flex-start !important;
    margin-top: 10px !important;
    padding: 0 4px !important;
  }
  .rec-creator-avatar {
    display: block !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }
  .rec-creator-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .rec-details {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .rec-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #FFFFFF !important;
    margin-bottom: 3px !important;
  }
  .rec-meta {
    font-size: 12px !important;
    color: #94A3B8 !important;
  }

  #watchSponsorBanner { 
    order: 3 !important;
    margin-top: 14px !important;
    margin-bottom: 20px !important;
  }

  /* When watching video on mobile: HIDE header so video sits cleanly at top under status bar */
  body.watch-active .header {
    display: none !important;
  }
  body.watch-active .main-canvas {
    padding-top: 0 !important;
    margin-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.watch-active .custom-player-wrapper {
    top: 0 !important;
    margin-top: 0 !important;
    position: sticky !important;
    z-index: 990 !important;
    border-radius: 0 !important;
  }
  body.watch-active .player-main-col {
    padding: 0 !important;
  }
  body.watch-active .watch-meta-box,
  body.watch-active .channel-actions-bar,
  body.watch-active .watch-actions-shelf,
  body.watch-active .watch-action-pills,
  body.watch-active .watch-desc-card,
  body.watch-active .comments-section,
  body.watch-active .watch-side-col,
  body.watch-active #watchSponsorBanner {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Mobile Mini Player Layout (1:1 YouTube app) */
  .mini-player-container {
    bottom: calc(var(--bottom-nav-h, 46px) + env(safe-area-inset-bottom, 0px) + 8px) !important;
    right: 8px !important;
    width: min(200px, 52vw) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.92) !important;
    z-index: 9500 !important;
  }
  .mini-player-video {
    border-radius: 11px 11px 0 0 !important;
    overflow: hidden !important;
  }
  .mini-player-bar {
    border-radius: 0 0 11px 11px !important;
    padding: 6px 10px !important;
  }
  .mini-player-title {
    font-size: 11px !important;
    max-width: 120px !important;
  }

  /* When watching video on mobile, KEEP bottom navigation visible (requested by user) */
  .bottom-nav,
  body.watch-active .bottom-nav,
  .watch-view-layout.active ~ .bottom-nav {
    display: flex !important;
    z-index: 9000 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }
  body.watch-active .watch-view-layout {
    padding-bottom: calc(var(--bottom-nav-h, 46px) + env(safe-area-inset-bottom, 0px) + 16px) !important;
  }
  body.watch-active .main-canvas {
    padding-bottom: calc(var(--bottom-nav-h, 46px) + env(safe-area-inset-bottom, 0px) + 16px) !important;
  }

  /* Floating sticky ad positioning on mobile */
  #floatingStickyFooterAd {
    z-index: 1005 !important;
    transition: bottom 0.25s ease;
    bottom: calc(var(--bottom-nav-h, 46px) + env(safe-area-inset-bottom, 0px)) !important;
  }

  .hero-carousel-wrap { aspect-ratio: 16 / 9; }
  .hero-title { font-size: 20px; }
  .hero-desc { display: none; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Mobile YouTube Player Specifics (m.youtube.com replica) */
  .yt-top-watermark-bar { display: flex !important; }
  .yt-mobile-center-controls { display: flex !important; }
  .player-buttons-row #btnPlayPause,
  .player-buttons-row #btnNextTrack,
  .player-buttons-row #btnMuteToggle,
  .player-buttons-row #btnCcToggle,
  .player-buttons-row #btnSettingsGear,
  .player-buttons-row #btnMiniPlayerToggle {
    display: none !important;
  }
  .yt-settings-menu { display: none !important; }

  /* Studio Responsive Mobile Card Transformations */
  .mobile-only-inline { display: inline-block !important; }
  .mobile-only-block { display: block !important; }
  .desktop-only-cell { display: none !important; }
  .desktop-only-inline { display: none !important; }

  .studio-header-card {
    padding: 16px !important;
  }
  .studio-header-info {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .studio-actions-row {
    width: 100% !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .studio-actions-row .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Metric cards 2x2 grid on mobile */
  .metric-grid-studio,
  .metrics-grid-studio {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .metric-card-studio {
    padding: 14px 12px !important;
  }
  .metric-card-title {
    font-size: 10px !important;
  }
  .metric-card-value {
    font-size: 18px !important;
  }
  .metric-card-sub {
    font-size: 9.5px !important;
  }

  .studio-toolbar,
  .studio-table-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 10px !important;
  }
  .studio-toolbar input,
  .studio-toolbar select,
  .studio-toolbar div,
  .studio-table-toolbar input,
  .studio-table-toolbar select,
  .studio-table-toolbar div {
    max-width: 100% !important;
  }
  .studio-toolbar > div,
  .studio-table-toolbar > div {
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .studio-toolbar select,
  .studio-table-toolbar select {
    flex: 1 !important;
  }

  /* Transform studio table into YouTube Studio mobile cards */
  .studio-table-wrap,
  .table-responsive-studio {
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .studio-table,
  .table-studio {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border: none !important;
  }
  .studio-table thead,
  .table-studio thead {
    display: none !important;
  }
  .studio-table tbody,
  .table-studio tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .studio-table tbody tr,
  .table-studio tbody tr {
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    padding: 12px !important;
    gap: 10px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .studio-table tbody tr td,
  .table-studio tbody tr td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* STRICTLY HIDE DESKTOP CELLS IN MOBILE CARDS */
  .studio-table tbody tr td.desktop-only-cell,
  .table-studio tbody tr td.desktop-only-cell {
    display: none !important;
  }

  .studio-mobile-top-row {
    display: flex !important;
    gap: 10px !important;
    align-items: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .studio-mobile-thumb-wrap {
    width: 100px !important;
    aspect-ratio: 16 / 9 !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #000 !important;
    position: relative !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  .studio-mobile-thumb-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .studio-mobile-title-col {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .studio-mobile-title {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1.35 !important;
    margin-bottom: 4px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .studio-mobile-meta-sub {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    font-family: monospace !important;
  }
  .studio-mobile-badges-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    padding: 2px 0 !important;
  }
  .studio-mobile-stats-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  }
  .studio-mobile-actions-row {
    display: flex !important;
    gap: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  }
  .studio-mobile-actions-row .btn {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
  }

  .studio-pagination-bar {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 12px !important;
    text-align: center !important;
  }
  .studio-pagination-controls {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .studio-page-btn {
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
  }
}

@media (max-width: 520px) {
  .video-grid { grid-template-columns: 1fr; }
  .hero-content { padding: 18px 14px; }
  .hero-title { font-size: 16px; }
  .chips-scroll-wrap { padding-bottom: 6px; }
}

/* ==========================================================================
   FULLSCREEN YOUTUBE SHORTS REEL PLAYER & QUALITY SETTINGS (1:1 REPLICA)
   ========================================================================== */
.shorts-modal {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
}
.shorts-modal.open {
  display: flex !important;
}

.shorts-reel-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  background: #000000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .shorts-modal {
    z-index: 999999 !important;
  }
  .shorts-reel-container {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  .shorts-reel-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .shorts-top-bar {
    padding-top: max(6px, env(safe-area-inset-top, 0px)) !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    justify-content: space-between !important;
  }
  .shorts-actions-stack {
    right: 12px !important;
    bottom: max(60px, env(safe-area-inset-bottom) + 30px) !important;
  }
  .shorts-meta-overlay {
    bottom: max(20px, env(safe-area-inset-bottom)) !important;
    left: 12px !important;
    right: 76px !important;
  }
}

/* Top Controls (Pushed to the very top edge corners) */
.shorts-top-brand {
  display: none !important;
}
.shorts-top-bar {
  position: absolute;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(6px, env(safe-area-inset-top, 0px)) 12px 0 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  pointer-events: auto;
}
.shorts-icon-btn {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.shorts-icon-btn:active {
  transform: scale(0.92);
}
.shorts-icon-btn:hover {
  background: rgba(0, 194, 255, 0.25);
  border-color: rgba(0, 194, 255, 0.5);
  color: #00c2ff;
  transform: scale(1.06);
}

/* YouTube-Style Infinite Scroll Spinner */
.infinite-scroll-loader {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 0 40px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
}
.infinite-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: infiniteSpin 0.75s linear infinite;
}
@keyframes infiniteSpin {
  to { transform: rotate(360deg); }
}

/* Video Viewport */
.shorts-video-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #000000;
}
.shorts-reel-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}
.shorts-play-ripple {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.shorts-play-ripple.show {
  opacity: 1;
  transform: scale(1);
}

/* Bottom Scrubber Progress Bar */
.shorts-progress-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 15;
}
.shorts-progress-fill {
  height: 100%;
  width: 0%;
  background: #FF0000;
  transition: width 0.1s linear;
}

/* Right Action Buttons Stack */
.shorts-actions-stack {
  position: absolute;
  right: 12px;
  bottom: 80px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.shorts-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.shorts-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.shorts-action-item:hover .shorts-action-btn {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}
.shorts-action-btn.active {
  color: #38BDF8;
  border-color: #38BDF8;
}
.shorts-action-label {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 4px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* Bottom Left Metadata Overlay */
.shorts-meta-overlay {
  position: absolute;
  bottom: 24px;
  left: 14px;
  right: 80px;
  z-index: 20;
  color: #FFFFFF;
  pointer-events: none;
}
.shorts-creator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  pointer-events: auto;
}
.shorts-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.shorts-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shorts-creator-name {
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.shorts-sub-btn {
  background: #FFFFFF;
  color: #000000;
  border: none;
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 4px;
  transition: transform 0.15s ease;
}
.shorts-sub-btn:hover {
  transform: scale(1.05);
}
.shorts-caption-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #FFFFFF;
  margin-bottom: 6px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  pointer-events: auto;
}
.shorts-audio-track {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Shorts Settings Bottom Sheet Modal */
.shorts-settings-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.shorts-settings-sheet-backdrop.open {
  display: flex !important;
  opacity: 1;
}
.shorts-settings-bottom-sheet {
  width: 100%;
  max-width: 480px;
  background: #181A20;
  border-radius: 20px 20px 0 0;
  padding: 12px 18px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.shorts-settings-sheet-backdrop.open .shorts-settings-bottom-sheet {
  transform: translateY(0);
}
.shorts-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.shorts-sheet-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}
.shorts-sheet-section label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #94A3B8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.shorts-quality-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shorts-quality-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.shorts-quality-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.shorts-quality-item.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
}
.shorts-speed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.shorts-speed-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.shorts-speed-pill:hover {
  background: rgba(255, 255, 255, 0.16);
}
.shorts-speed-pill.active {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #FFFFFF;
  font-weight: 700;
}

/* ==========================================================================
   Universal Form, Input & Select Controls (Flawless Light & Dark Mode)
   ========================================================================== */
.input-glass,
.form-input,
.form-select,
input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  background: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

select option {
  background: #0B1120 !important;
  color: #FFFFFF !important;
  padding: 10px 14px;
  font-size: 13.5px;
}

body[data-theme="light"] select,
[data-theme="light"] select,
body[data-theme="light"] .input-glass,
[data-theme="light"] .input-glass {
  background: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

body[data-theme="light"] select option,
[data-theme="light"] select option {
  background: #FFFFFF !important;
  color: #0F172A !important;
}

.input-glass:focus,
.form-input:focus,
.form-select:focus,
select:focus,
input:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.form-group-glass {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  text-align: left;
}

.form-group-glass label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

body[data-theme="light"] .form-group-glass label,
[data-theme="light"] .form-group-glass label {
  color: #334155 !important;
}

body[data-theme="light"] .ingest-info-pill,
[data-theme="light"] .ingest-info-pill {
  background: #F0F9FF !important;
  border-color: #BAE6FD !important;
  color: #0369A1 !important;
}

body[data-theme="light"] .video-title,
[data-theme="light"] .video-title {
  color: #0F172A !important;
}

body[data-theme="light"] .video-card,
[data-theme="light"] .video-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

body[data-theme="light"] .video-uploader-name,
[data-theme="light"] .video-uploader-name {
  color: #475569 !important;
}

body[data-theme="light"] .video-stats-row,
[data-theme="light"] .video-stats-row {
  color: #64748B !important;
}

body[data-theme="light"] .modal-glass,
[data-theme="light"] .modal-glass {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  color: #0F172A !important;
}

body[data-theme="light"] .modal-title,
[data-theme="light"] .modal-title,
body[data-theme="light"] .modal-header h3,
[data-theme="light"] .modal-header h3 {
  color: #0F172A !important;
}

body[data-theme="light"] .upload-tab-btn,
[data-theme="light"] .upload-tab-btn {
  color: #64748B !important;
}

body[data-theme="light"] .upload-tab-btn.active,
[data-theme="light"] .upload-tab-btn.active {
  color: var(--primary) !important;
}

/* ==========================================================================
   Dedicated Category Page Banner & YouTube-Style Search Header
   ========================================================================== */
.category-page-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease;
}
.category-page-header::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}
.cat-header-content {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 2;
}
.cat-header-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 194, 255, 0.18), rgba(123, 97, 255, 0.25));
  border: 1px solid rgba(0, 194, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--primary-glow);
}
.cat-header-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.cat-header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 6px;
}
.cat-header-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.cat-header-stats-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.cat-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

body[data-theme="light"] .category-page-header {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}
body[data-theme="light"] .cat-header-title {
  color: #0F172A !important;
}
body[data-theme="light"] .cat-header-desc {
  color: #475569 !important;
}
body[data-theme="light"] .cat-stat-pill {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #334155 !important;
}

/* Smart Search URL Floating Action Card */
.search-smart-url-card {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-glow);
  z-index: 1100;
  animation: slideDown 0.2s ease;
}
.smart-url-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.smart-url-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.smart-url-details {
  flex: 1;
  min-width: 0;
}
.smart-url-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.smart-url-string {
  font-size: 12.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.smart-url-btns {
  flex-shrink: 0;
}

/* ==========================================
   MAIN FOOTER RESPONSIVE CONTAINER & SIDEBAR OFFSET
   ========================================== */
.main-footer {
  margin-left: var(--sidebar-w);
  background: rgba(7, 11, 20, 0.95);
  border-top: 1px solid var(--border);
  padding: 48px 32px 32px;
  margin-top: 60px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: margin-left 0.3s var(--fade);
  box-sizing: border-box;
}

.desktop-sidebar.collapsed ~ .main-footer,
.desktop-sidebar.collapsed ~ * .main-footer,
body:has(.desktop-sidebar.collapsed) .main-footer,
.main-footer.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed) !important;
}

@media (max-width: 900px) {
  .main-footer {
    margin-left: 0 !important;
    padding: 32px 18px 90px;
  }
}

/* ==========================================
   YOUTUBE-STYLE WATCH ACTION PILLS & DESCRIPTION CARD
   ========================================== */
.channel-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

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

.channel-avatar-big {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

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

.channel-name-col h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.channel-name-col p {
  font-size: 11.5px;
  color: var(--text-muted);
}

.watch-action-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.action-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transform: translateY(-1px);
}

.action-pill:active {
  transform: translateY(0);
}

.action-pill.active {
  background: rgba(0, 194, 255, 0.2);
  border-color: rgba(0, 194, 255, 0.4);
  color: var(--primary);
}

.action-pill.danger {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.25);
  color: #f43f5e;
}

.action-pill.danger:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
}

/* YouTube Style Expandable Description Box */
.watch-desc-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.watch-desc-box:hover {
  background: rgba(255, 255, 255, 0.09);
}

body[data-theme="light"] .watch-desc-box {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .watch-desc-box:hover {
  background: rgba(0, 0, 0, 0.08);
}

.desc-stats-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.desc-stat-views,
.desc-stat-date {
  font-weight: 800;
  color: #ffffff;
}

body[data-theme="light"] .desc-stat-views,
body[data-theme="light"] .desc-stat-date {
  color: #0f172a;
}

.desc-stat-tags {
  color: var(--primary);
  font-weight: 600;
}

.desc-text-body {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-line;
  word-break: break-word;
  max-height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.watch-desc-box.expanded .desc-text-body {
  max-height: none;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  user-select: text;
}

.desc-expand-btn {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 4px;
  display: inline-block;
}

body[data-theme="light"] .desc-expand-btn {
  color: #0f172a;
}

@media (max-width: 768px) {
  .channel-actions-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .watch-action-pills {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .watch-action-pills::-webkit-scrollbar {
    display: none;
  }
  .action-pill {
    padding: 6px 12px;
    font-size: 11.5px;
    gap: 5px;
  }
  .watch-desc-box {
    padding: 10px 14px;
  }
}

/* ===================================================
   HOMEPAGE PAGINATION CONTROLS
   =================================================== */
.home-pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 36px 0 24px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.page-btn:hover:not(.disabled):not(.active) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #070B14;
  box-shadow: 0 0 15px rgba(0, 194, 255, 0.35);
  font-weight: 800;
}

.page-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.page-ellipsis {
  color: var(--text-muted);
  font-weight: 700;
  padding: 0 4px;
}

/* ===================================================
   YOUTUBE-STYLE SEARCH RESULTS LAYOUT
   =================================================== */
.yt-search-results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.yt-search-card {
  display: flex;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.yt-search-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 194, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.yt-search-thumb-box {
  position: relative;
  width: 320px;
  min-width: 320px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.yt-search-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.yt-search-card:hover .yt-search-thumb-box img {
  transform: scale(1.04);
}

.yt-search-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
  padding-right: 8px;
}

.yt-search-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-search-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.yt-search-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.yt-search-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}

.yt-search-channel-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.yt-search-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .yt-search-card {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  .yt-search-thumb-box {
    width: 100%;
    min-width: unset;
  }
  .yt-search-title {
    font-size: 14.5px;
  }
  .yt-search-desc {
    display: none;
  }
}

/* Modern Floating Sponsor / Video Roll Ad Capsule */
.floating-ad-capsule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 30px;
  padding: 6px 16px 6px 8px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.2);
  transition: all 0.25s ease;
  max-width: 92vw;
}
.floating-ad-capsule:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 194, 255, 0.35);
}
.ad-fire-badge {
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: pulseFire 2s infinite ease-in-out;
}
@keyframes pulseFire {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.ad-capsule-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-capsule-btn {
  background: var(--primary);
  color: #000000;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 16px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.floating-ad-capsule:hover .ad-capsule-btn {
  background: #38bdf8;
}
@media (max-width: 600px) {
  .floating-ad-capsule {
    padding: 4px 8px 4px 5px;
    gap: 6px;
  }
  .ad-capsule-text {
    font-size: 11px;
    max-width: 170px;
  }
  .ad-fire-badge {
    font-size: 8.5px;
    padding: 3px 6px;
  }
  .ad-capsule-btn {
    font-size: 9.5px;
    padding: 3px 8px;
  }
}


/* Bottom Sticky Bar Video Roll Unit */
.footer-video-roll-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  padding: 6px 14px 6px 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 194, 255, 0.25);
  cursor: pointer;
  max-width: 95vw;
  margin: 0 auto;
  transition: all 0.25s ease;
}
.footer-video-roll-bar:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 25px rgba(0, 194, 255, 0.4);
}
.footer-video-roll-thumb {
  position: relative;
  width: 96px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.footer-video-roll-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.footer-video-roll-pill {
  position: absolute;
  bottom: 2px;
  left: 2px;
  background: rgba(0, 0, 0, 0.85);
  color: #38bdf8;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 3px;
}
.footer-video-roll-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  min-width: 0;
  flex: 1;
}
.footer-video-roll-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-video-roll-hostname {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}
.footer-video-roll-title {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

@media (max-width: 600px) {
  .footer-video-roll-bar {
    gap: 8px;
    padding: 4px 10px 4px 4px;
  }
  .footer-video-roll-thumb {
    width: 72px;
    height: 42px;
    border-radius: 6px;
  }
  .footer-video-roll-title {
    font-size: 10.5px;
    max-width: 140px;
  }
  .footer-video-roll-hostname {
    font-size: 9px;
  }
}

/* ==========================================================================
   VOICE SEARCH MODAL & AUDIO WAVE VISUALIZER (Web Speech API)
   ========================================================================== */
.voice-search-box {
  background: linear-gradient(145deg, rgba(13, 19, 33, 0.96), rgba(7, 11, 20, 0.98)) !important;
  border: 1px solid rgba(0, 194, 255, 0.25) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 194, 255, 0.15) !important;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}

.voice-wave-container {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.voice-mic-core {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00c2ff 0%, #0077ff 100%);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 6px 24px rgba(0, 194, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.voice-wave-container:hover .voice-mic-core {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(0, 194, 255, 0.6);
}

.voice-wave-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(0, 194, 255, 0.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.voice-wave-container.listening .voice-mic-core {
  background: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%);
  box-shadow: 0 6px 28px rgba(239, 68, 68, 0.65);
}

.voice-wave-container.listening .ring-1 {
  width: 90px;
  height: 90px;
  border-color: rgba(239, 68, 68, 0.6);
  opacity: 1;
  animation: voicePulse 1.8s infinite ease-out;
}

.voice-wave-container.listening .ring-2 {
  width: 114px;
  height: 114px;
  border-color: rgba(239, 68, 68, 0.4);
  opacity: 1;
  animation: voicePulse 1.8s infinite ease-out 0.4s;
}

.voice-wave-container.listening .ring-3 {
  width: 140px;
  height: 140px;
  border-color: rgba(239, 68, 68, 0.2);
  opacity: 1;
  animation: voicePulse 1.8s infinite ease-out 0.8s;
}

@keyframes voicePulse {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* ==========================================================================
   SHORTS DOUBLE TAP HEART ANIMATION & PAUSE OVERLAY
   ========================================================================== */
.shorts-double-tap-heart {
  position: absolute;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 100;
  color: #ff2d55;
  font-size: 88px;
  filter: drop-shadow(0 4px 24px rgba(255, 45, 85, 0.7));
  animation: heartBurst 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes heartBurst {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(-15deg);
    opacity: 0;
  }
  30% {
    transform: translate(-50%, -50%) scale(1.35) rotate(5deg);
    opacity: 1;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8) rotate(12deg);
    opacity: 0;
  }
}

.shorts-reel-container.is-paused::after {
  content: '\f04b';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  pointer-events: none;
  z-index: 50;
  animation: fadeIn 0.2s ease;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Google Ads / AdChoices Style Corner Badges & CEVIOD Ad Units
   ========================================================================== */
.ceviod-ad-unit {
  position: relative !important;
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.4s ease;
}

.google-ad-badge {
  position: absolute !important;
  top: 6px !important;
  right: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  z-index: 50 !important;
  pointer-events: auto !important;
}

.ad-corner-btn {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #94a3b8 !important;
  font-size: 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.ad-corner-btn:hover {
  color: #38bdf8 !important;
  border-color: #38bdf8 !important;
  background: rgba(0, 194, 255, 0.25) !important;
  transform: scale(1.12) !important;
  box-shadow: 0 0 10px rgba(0, 194, 255, 0.4) !important;
}

.ad-corner-btn.ad-close-trigger:hover {
  color: #ef4444 !important;
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.2) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4) !important;
}

.ad-dismissed-notice {
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
}
.ad-dismissed-undo {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
