/* ============================================ */
/* SHARED COMPONENTS - BANTU STREAM CONNECT */
/* Platform-wide consistent header, sidebar, navigation styles */
/* Extracted from content-detail.css for consistency */
/* ============================================ */

/* ============================================ */
/* CSS VARIABLES & THEME SUPPORT */
/* ============================================ */
:root {
  /* Core Colors */
  --deep-black: #0A0E12;
  --deep-navy: #0F172A;
  --soft-white: #F8FAFC;
  --slate-grey: #94A3B8;
  --warm-gold: #F59E0B;
  --bantu-blue: #1D4ED8;
  --success-color: #10B981;
  --error-color: #EF4444;
  --warning-color: #F59E0B;
  
  /* Card & Background */
  --card-bg: rgba(15, 23, 42, 0.6);
  --card-border: rgba(148, 163, 184, 0.2);
  
  /* Typography */
  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-base: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  
  /* Icons */
  --icon-sm: 1rem;
  --icon-md: 1.25rem;
  --icon-lg: 1.5rem;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  
  /* UI Scale */
  --ui-scale: 1;
}

/* Light Theme */
.theme-light {
  --deep-black: #F8FAFC;
  --deep-navy: #FFFFFF;
  --soft-white: #0F172A;
  --slate-grey: #64748B;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(100, 116, 139, 0.2);
}

/* High Contrast Theme */
.theme-high-contrast {
  --deep-black: #000000;
  --deep-navy: #111827;
  --soft-white: #FFFFFF;
  --slate-grey: #E5E7EB;
  --warm-gold: #FFD700;
  --bantu-blue: #00BFFF;
  --card-bg: rgba(17, 24, 39, 0.95);
  --card-border: #FFFFFF;
}

/* Apply UI Scale */
html {
  font-size: calc(16px * var(--ui-scale));
}

/* ============================================ */
/* BASE STYLES - NO HORIZONTAL SCROLL */
/* ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--deep-black);
  color: var(--soft-white);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* ============================================ */
/* TOAST NOTIFICATIONS */
/* ============================================ */
#toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  padding: 12px 24px;
  color: var(--soft-white);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: toastSlideIn 0.3s ease;
  pointer-events: auto;
}

.toast i {
  font-size: 16px;
}

.toast-success {
  border-left: 4px solid var(--success-color);
}
.toast-success i {
  color: var(--success-color);
}

.toast-error {
  border-left: 4px solid var(--error-color);
}
.toast-error i {
  color: var(--error-color);
}

.toast-warning {
  border-left: 4px solid var(--warning-color);
}
.toast-warning i {
  color: var(--warning-color);
}

.toast-info {
  border-left: 4px solid var(--bantu-blue);
}
.toast-info i {
  color: var(--bantu-blue);
}

.toast-hide {
  animation: toastSlideOut 0.3s ease forwards;
}

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

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

/* ============================================ */
/* HEADER - DESKTOP */
/* ============================================ */
.header {
  background: rgba(10, 14, 18, 0.9);
  backdrop-filter: blur(20px);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 3.75rem;
  width: 100%;
  max-width: 100vw;
  overflow: visible;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--soft-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: var(--icon-lg);
  margin-right: 0.5rem;
  border: none;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-0.125rem);
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.625rem;
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: var(--font-lg);
  background: linear-gradient(to right, var(--soft-white), var(--bantu-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.icon-btn {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--soft-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  font-size: var(--icon-md);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-0.125rem);
}

.notification-badge {
  position: absolute;
  top: -0.3125rem;
  right: -0.3125rem;
  background: var(--error-color);
  color: white;
  font-size: 0.625rem;
  font-weight: bold;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--deep-black);
}

/* Profile Button */
.profile-switcher {
  position: relative;
}

.profile-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
  border-radius: 2.5rem;
  padding: 0.3125rem 1rem 0.3125rem 0.3125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 2.75rem;
  white-space: nowrap;
}

.profile-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--warm-gold);
}

.profile-placeholder {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-placeholder img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  color: var(--soft-white);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  display: inline-block;
}

.profile-btn i {
  color: var(--slate-grey);
  font-size: 0.75rem;
}

/* Profile Dropdown */
.profile-dropdown {
  position: absolute;
  top: 3.75rem;
  right: 0;
  width: 15.625rem;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.625rem);
  transition: all 0.3s ease;
  z-index: 1000;
  animation-duration: 0.3s;
  animation-fill-mode: both;
}

.profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation-name: slideIn;
}

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

.profile-dropdown-header {
  padding: 15px;
  border-bottom: 1px solid var(--card-border);
}

.profile-dropdown-header h4 {
  font-size: 14px;
  color: var(--soft-white);
  margin: 0;
}

.profile-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.profile-item.active {
  background: rgba(29, 78, 216, 0.2);
  border: 1px solid var(--bantu-blue);
}

.profile-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-initials {
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.profile-item .profile-name {
  flex: 1;
  font-size: 14px;
}

.profile-item i {
  color: var(--success-color);
}

.profile-dropdown-footer {
  padding: 15px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.text-btn {
  background: none;
  border: none;
  color: var(--warm-gold);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  width: 100%;
  text-align: left;
  padding: 8px;
  border-radius: 6px;
}

.text-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--soft-white);
}

/* RSA Badge */
.rsa-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #007A4D, #FFB81C, #E03C31);
  padding: 0.375rem 0.75rem;
  border-radius: 1.875rem;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ============================================ */
/* MOBILE HEADER FIXES */
/* ============================================ */
@media (max-width: 768px) {
  .header {
    padding: 0.625rem 1rem !important;
    min-height: 3.25rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  
  .menu-toggle {
    width: 2.125rem !important;
    height: 2.125rem !important;
    margin-right: 0.375rem !important;
  }
  
  .logo-icon {
    width: 2rem !important;
    height: 2rem !important;
  }
  
  .logo-text {
    font-size: 0.875rem !important;
    max-width: 120px;
  }
  
  .icon-btn {
    width: 2.125rem !important;
    height: 2.125rem !important;
    font-size: 0.875rem !important;
    flex-shrink: 0 !important;
  }
  
  .header-actions {
    gap: 0.375rem !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
  }
  
  /* Hide Profile & Analytics on mobile */
  .profile-switcher {
    display: none !important;
  }
  
  #analytics-btn {
    display: none !important;
  }
  
  /* Keep Voice, Search, Notifications, RSA */
  #voice-search-btn,
  #search-btn,
  #notifications-btn,
  .rsa-badge {
    display: flex !important;
  }
  
  .rsa-badge {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.6875rem !important;
    margin-left: 0.25rem !important;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.5rem 0.75rem !important;
    min-height: 3rem !important;
  }
  
  .menu-toggle {
    width: 2rem !important;
    height: 2rem !important;
  }
  
  .logo-icon {
    width: 1.75rem !important;
    height: 1.75rem !important;
  }
  
  .logo-text {
    font-size: 0.75rem !important;
    max-width: 100px;
  }
  
  .icon-btn {
    width: 2rem !important;
    height: 2rem !important;
    font-size: 0.8125rem !important;
  }
  
  .header-actions {
    gap: 0.25rem !important;
  }
  
  .rsa-badge {
    font-size: 0.625rem !important;
    padding: 0.1875rem 0.375rem !important;
  }
}

@media (max-width: 360px) {
  .header {
    padding: 0.4rem 0.625rem !important;
    min-height: 2.875rem !important;
  }
  
  .logo-text {
    font-size: 0.6875rem !important;
    max-width: 90px;
  }
  
  .icon-btn {
    width: 1.875rem !important;
    height: 1.875rem !important;
  }
  
  .rsa-badge {
    font-size: 0.5625rem !important;
    padding: 0.125rem 0.25rem !important;
  }
}

/* ============================================ */
/* SIDEBAR MENU */
/* ============================================ */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-menu {
  position: fixed;
  top: 0;
  left: -20rem;
  width: 18rem;
  height: 100vh;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--card-border);
  z-index: 1001;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.25rem;
}

.sidebar-menu.active {
  left: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.sidebar-logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: var(--font-lg);
  font-weight: 700;
  background: linear-gradient(to right, var(--soft-white), var(--bantu-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidebar-close {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
  color: var(--soft-white);
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-close:hover {
  background: var(--error-color);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
  transition: background 0.3s ease;
  flex-shrink: 0;
  min-width: 0;
}

.sidebar-profile:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-profile-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.sidebar-profile-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-profile-name {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--soft-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-email {
  font-size: var(--font-xs);
  color: var(--slate-grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--warm-gold);
  border-radius: 3px;
}

/* Sidebar Sections */
.sidebar-section {
  margin-bottom: 12px;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  color: var(--slate-grey);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: color 0.2s ease;
  user-select: none;
}

.sidebar-section-header:hover {
  color: var(--soft-white);
}

.sidebar-section-header .toggle-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.sidebar-section-header.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.sidebar-section-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 500px;
  opacity: 1;
}

.sidebar-section-items.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0 8px;
  margin: 0;
}

/* Navigation Items */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 0 24px 24px 0;
  color: var(--soft-white);
  text-decoration: none;
  font-size: var(--font-base);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.sidebar-nav-item.active {
  background: rgba(29, 78, 216, 0.15);
  border-left-color: var(--bantu-blue);
  color: var(--bantu-blue);
  font-weight: 600;
}

.sidebar-nav-item.active i {
  color: var(--bantu-blue);
}

.sidebar-nav-item i {
  width: 20px;
  text-align: center;
  font-size: var(--icon-md);
  flex-shrink: 0;
  color: var(--slate-grey);
  transition: color 0.2s ease;
}

.sidebar-nav-item:hover i {
  color: var(--soft-white);
}

/* Category-specific icon colors */
.sidebar-nav-item[data-category="music"] i { color: #EC4899; }
.sidebar-nav-item[data-category="stem"] i { color: #3B82F6; }
.sidebar-nav-item[data-category="culture"] i { color: #F59E0B; }
.sidebar-nav-item[data-category="news"] i { color: #EF4444; }
.sidebar-nav-item[data-category="sports"] i { color: #10B981; }
.sidebar-nav-item[data-category="movies"] i { color: #8B5CF6; }
.sidebar-nav-item[data-category="documentaries"] i { color: #6366F1; }
.sidebar-nav-item[data-category="podcasts"] i { color: #14B8A6; }

/* Sidebar Footer */
.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--card-border);
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.creator-mode-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
}

.creator-mode-toggle .toggle-label {
  font-size: 13px;
  color: var(--soft-white);
  font-weight: 500;
}

.sidebar-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-bottom: 0.75rem;
}

.sidebar-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Sidebar Scale Control */
.sidebar-scale-control {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.scale-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.scale-control-row:last-child {
  margin-bottom: 0;
}

.scale-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--soft-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  font-size: 0.875rem;
  padding: 0;
  white-space: nowrap;
}

.scale-control-row:last-child .scale-btn {
  width: 100%;
  border-radius: 0.5rem;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 0.5rem;
  height: auto;
  min-height: 2.5rem;
}

.scale-value {
  font-size: var(--font-sm);
  color: var(--soft-white);
  min-width: 3rem;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}

/* Mobile Sidebar Adjustments */
@media (max-width: 768px) {
  .sidebar-section-header {
    padding: 6px 12px;
    font-size: 10px;
  }
  
  .sidebar-nav-item {
    padding: 8px 12px;
    font-size: 14px;
    gap: 10px;
  }
  
  .sidebar-nav-item i {
    width: 18px;
    font-size: 14px;
  }
  
  .sidebar-scale-control {
    padding: 0.5rem;
  }
  
  .scale-control-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .scale-control-row:first-child {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
  
  .scale-value {
    min-width: 2.5rem;
  }
  
  .scale-btn {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }
  
  .scale-control-row:last-child .scale-btn {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.4rem;
  }
}

/* ============================================ */
/* BOTTOM NAVIGATION BUTTONS */
/* ============================================ */
.navigation-button-container {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
  padding-bottom: env(safe-area-inset-bottom);
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.navigation-button {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 60px;
  padding: 10px 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  gap: 12px;
  width: auto;
  min-width: 280px;
  max-width: 420px;
  margin: 0 auto;
  pointer-events: auto;
  overflow: visible;
}

.nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--soft-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
}

.nav-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.nav-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error-color);
  color: white;
  font-size: 10px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--deep-black);
}

/* Mobile Navigation Adjustments */
@media (max-width: 768px) {
  .navigation-button-container {
    bottom: 15px;
  }
  
  .navigation-button {
    min-width: 260px;
    max-width: 380px;
    padding: 8px 16px;
    gap: 10px;
  }
  
  .nav-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .navigation-button-container {
    bottom: 12px;
  }
  
  .navigation-button {
    min-width: 240px;
    max-width: 340px;
    padding: 6px 12px;
    gap: 8px;
  }
  
  .nav-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .navigation-button {
    min-width: 220px;
    max-width: 300px;
    gap: 6px;
  }
  
  .nav-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* ============================================ */
/* THEME SELECTOR */
/* ============================================ */
.theme-selector {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 5px;
  backdrop-filter: blur(20px);
  min-width: 180px;
}

.theme-selector.active {
  display: flex;
}

.theme-option {
  background: none;
  border: none;
  color: var(--soft-white);
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  font-size: 14px;
  width: 100%;
}

.theme-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.theme-option.active {
  background: rgba(29, 78, 216, 0.2);
  color: var(--bantu-blue);
}

/* ============================================ */
/* SEARCH MODAL - COMPLETE */
/* ============================================ */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 18, 0.98);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}

.search-modal.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

.search-modal-header {
  padding: 25px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 15px;
  position: sticky;
  top: 0;
  background: inherit;
  backdrop-filter: blur(20px);
  z-index: 10;
}

.search-input-container {
  flex: 1;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  background: var(--deep-navy);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--soft-white);
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--warm-gold);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-grey);
}

.voice-search-modal-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--slate-grey);
  cursor: pointer;
  font-size: 18px;
  padding: 5px;
  transition: color 0.3s ease;
}

.voice-search-modal-btn:hover {
  color: var(--warm-gold);
}

.close-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--soft-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 18px;
}

.close-search-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Search Filters */
.search-filters {
  padding: 15px 25px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  background: inherit;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-label {
  color: var(--slate-grey);
  font-size: 13px;
  font-weight: 500;
}

.filter-select {
  background: var(--deep-navy);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--soft-white);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-select:hover {
  border-color: var(--warm-gold);
}

.filter-select:focus {
  outline: none;
  border-color: var(--warm-gold);
}

/* Search Results */
.search-results {
  padding: 25px;
  min-height: 400px;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.search-result-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-result-card:hover {
  transform: translateY(-5px);
  border-color: var(--warm-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-result-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
}

.search-result-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.search-result-card:hover .search-result-thumbnail img {
  transform: scale(1.05);
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.search-result-info {
  padding: 12px;
}

.search-result-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--soft-white);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.creator-name {
  font-size: 12px;
  color: var(--slate-grey);
  margin-bottom: 8px;
}

.result-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--slate-grey);
  margin-bottom: 8px;
}

.result-meta i {
  margin-right: 3px;
  font-size: 10px;
}

.description-preview {
  font-size: 12px;
  color: var(--slate-grey);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--slate-grey);
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 16px;
  margin-top: 10px;
}

/* Loading Spinner */
.loading-spinner-small {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--warm-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 60px auto;
}

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

/* ============================================ */
/* ANALYTICS MODAL - COMPLETE */
/* ============================================ */
.analytics-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 18, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.analytics-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

.analytics-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.analytics-header {
  padding: 25px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: inherit;
  backdrop-filter: blur(20px);
  z-index: 10;
}

.analytics-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--soft-white);
}

.analytics-body {
  padding: 25px;
}

/* Analytics Stats Grid */
.analytics-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.analytics-stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.analytics-stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--warm-gold);
}

.analytics-stat-card i {
  font-size: 32px;
  color: var(--warm-gold);
  margin-bottom: 12px;
}

.analytics-stat-card h3 {
  font-size: 13px;
  color: var(--slate-grey);
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.analytics-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--soft-white);
}

.analytics-trend {
  font-size: 12px;
  margin-top: 8px;
}

.analytics-trend.up {
  color: var(--success-color);
}

.analytics-trend.down {
  color: var(--error-color);
}

/* Charts Container */
.charts-container {
  margin-top: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  min-height: 400px;
}

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

.chart-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--soft-white);
}

.chart-controls {
  display: flex;
  gap: 10px;
}

.chart-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--soft-white);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chart-btn.active {
  background: var(--warm-gold);
  border-color: var(--warm-gold);
  color: var(--deep-black);
}

.chart-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

canvas#analytics-chart {
  max-height: 350px;
  width: 100%;
}

/* ============================================ */
/* NOTIFICATIONS PANEL - COMPLETE */
/* ============================================ */
.notifications-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--card-border);
  z-index: 1001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.notifications-panel.active {
  right: 0;
}

.notifications-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: inherit;
  backdrop-filter: blur(20px);
  z-index: 10;
}

.notifications-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--soft-white);
}

.notifications-header .icon-btn {
  width: 36px;
  height: 36px;
}

.notifications-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.notification-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  gap: 12px;
  position: relative;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-5px);
}

.notification-item.unread {
  border-left: 3px solid var(--bantu-blue);
  background: rgba(29, 78, 216, 0.1);
}

.notification-item.read {
  opacity: 0.7;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon i {
  font-size: 18px;
  color: var(--warm-gold);
}

.notification-content {
  flex: 1;
}

.notification-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--soft-white);
}

.notification-content p {
  font-size: 12px;
  color: var(--slate-grey);
  margin-bottom: 5px;
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: var(--slate-grey);
  opacity: 0.8;
}

.notification-dot {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 8px;
  height: 8px;
  background: var(--error-color);
  border-radius: 50%;
}

.notification-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notification-item:hover .notification-actions {
  opacity: 1;
}

.notification-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  color: var(--soft-white);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.notification-action-btn:hover {
  background: var(--error-color);
}

.empty-notifications {
  text-align: center;
  padding: 60px 20px;
  color: var(--slate-grey);
}

.empty-notifications i {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-notifications p {
  font-size: 14px;
  margin-top: 10px;
}

.notifications-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.notifications-footer .text-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
}

/* ============================================ */
/* VOICE SEARCH - COMPLETE */
/* ============================================ */
.voice-search-status {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 2px solid var(--warm-gold);
  border-radius: 60px;
  padding: 20px 40px;
  z-index: 10000;
  display: none;
  align-items: center;
  gap: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: voicePulse 1.5s infinite;
}

.voice-search-status.active {
  display: flex;
}

@keyframes voicePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    border-color: var(--warm-gold);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(245, 158, 11, 0);
    border-color: rgba(245, 158, 11, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    border-color: var(--warm-gold);
  }
}

.voice-search-status i {
  font-size: 32px;
  color: var(--warm-gold);
  animation: voiceWave 1s ease-in-out infinite;
}

@keyframes voiceWave {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

#voice-status-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--soft-white);
}

.voice-search-cancel {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--soft-white);
  transition: all 0.3s ease;
}

.voice-search-cancel:hover {
  background: var(--error-color);
  transform: rotate(90deg);
}

/* Voice Search Permission Prompt */
.voice-permission-prompt {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 9999;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.voice-permission-prompt i {
  font-size: 24px;
  color: var(--warm-gold);
}

.voice-permission-prompt p {
  font-size: 13px;
  color: var(--soft-white);
}

.voice-permission-prompt button {
  background: var(--bantu-blue);
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.voice-permission-prompt button:hover {
  background: var(--warm-gold);
}

/* ============================================ */
/* MODALS & PANELS - Additional */
/* ============================================ */
.playlist-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease;
}

.playlist-modal.active {
  display: flex;
}

.playlist-modal-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

.playlist-modal-content h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  color: var(--soft-white);
  margin: 0 0 20px 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============================================ */
/* BACK TO TOP BUTTON */
/* ============================================ */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 998;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(29, 78, 216, 0.4);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(29, 78, 216, 0.6);
}

/* ============================================ */
/* FOOTER */
/* ============================================ */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 24px 20px;
  text-align: center;
  margin-top: 40px;
  backdrop-filter: blur(10px);
}

.footer p {
  color: var(--slate-grey);
  font-size: 14px;
  margin-bottom: 15px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--soft-white);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--warm-gold);
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */
@media (min-width: 769px) {
  .header {
    padding: 12px 24px !important;
    min-height: 60px !important;
  }
  
  .logo-icon {
    width: 36px !important;
    height: 36px !important;
  }
  
  .logo-text {
    font-size: 17px !important;
  }
  
  .navigation-button-container {
    bottom: 30px;
  }
  
  .navigation-button {
    padding: 10px 24px;
    gap: 14px;
  }
  
  .nav-icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
  
  .footer {
    padding: 24px 20px !important;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 20px 16px !important;
    font-size: 13px !important;
  }
  
  .footer-links {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  
  /* Mobile search results */
  .search-results-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
  
  .notifications-panel {
    width: 100%;
    right: -100%;
  }
  
  .analytics-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 16px 12px !important;
  }
  
  .footer p {
    font-size: 12px !important;
  }
  
  .footer-links a {
    font-size: 11px !important;
  }
  
  .search-filters {
    flex-direction: column;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select {
    flex: 1;
  }
  
  .analytics-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .voice-search-status {
    padding: 15px 25px;
    width: 90%;
  }
  
  #voice-status-text {
    font-size: 14px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .icon-btn, .profile-btn, .nav-icon {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  
  .header, .navigation-button, .footer {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
}
