/* Custom styles for TikTok Studio */

body {
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 0;
  margin: 0;
}

/* Navbar adjustments for sidebar */
.navbar {
  z-index: 1030;
  padding: 0.5rem 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
}

/* Connection status indicator */
.connection-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.connection-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #6c757d;
  transition: all 0.3s ease;
}

.connection-status.connected .connection-dot {
  background-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.connection-status.disconnected .connection-dot {
  background-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.connection-status.active .connection-dot {
  background-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.4);
  animation: pulse-dot 1s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.8);
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(40, 167, 69, 0);
  }
  100% {
    transform: scale(0.8);
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

.dark-mode .connection-status {
  background-color: #343a40;
}

.dark-mode .connection-status.connected .connection-dot {
  background-color: #5cb85c;
  box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.2);
}

.dark-mode .connection-status.disconnected .connection-dot {
  background-color: #d9534f;
  box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.2);
}

.dark-mode .connection-status.active .connection-dot {
  background-color: #5cb85c;
  box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.4);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 56px; /* Navbar height */
  left: 0;
  height: calc(100vh - 56px);
  overflow-y: auto;
  z-index: 100;
  padding-top: 0;
  transition: all 0.3s ease;
  width: 240px;
}

.sidebar-sticky {
  position: relative;
  top: 0;
  height: calc(100vh - 48px);
  padding-top: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
  background-color: rgba(0, 123, 255, 0.1);
  color: #007bff;
}

.sidebar .nav-link.active {
  color: #007bff;
  background-color: rgba(0, 123, 255, 0.15);
}

.sidebar .nav-link i {
  margin-right: 0.5rem;
  width: 1.25rem;
  text-align: center;
}

.dark-mode .sidebar {
  background-color: #2d3748;
}

.dark-mode .sidebar .nav-link {
  color: #e2e8f0;
}

.dark-mode .sidebar .nav-link:hover {
  background-color: rgba(66, 153, 225, 0.1);
  color: #63b3ed;
}

.dark-mode .sidebar .nav-link.active {
  color: #63b3ed;
  background-color: rgba(66, 153, 225, 0.15);
}

/* Main content area */
.main-content {
  margin-left: 240px; /* Match sidebar width */
  padding: 1rem;
  min-height: calc(100vh - 56px);
  margin-top: 56px; /* Navbar height */
}

/* Dashboard cards */
.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  padding: 1rem 1.25rem;
}

/* Summary Metrics - YouTube Studio Style */
.summary-metric {
  text-align: center;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: #f8f9fa;
  height: 100%;
}

.summary-metric .metric-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.summary-metric .metric-value h3 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
}

.summary-metric .metric-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.summary-metric .metric-change.positive {
  color: #28a745;
}

.summary-metric .metric-change.negative {
  color: #dc3545;
}

.summary-metric .metric-change.coming-soon {
  color: #6c757d;
  font-style: italic;
}

.summary-metric .metric-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.25rem;
}

.summary-metric .metric-sublabel {
  font-size: 0.75rem;
  color: #6c757d;
}

.dark-mode .summary-metric {
  background-color: #343a40;
}

.dark-mode .summary-metric .metric-value h3 {
  color: #e2e8f0;
}

.dark-mode .summary-metric .metric-label {
  color: #cbd5e0;
}

.dark-mode .summary-metric .metric-sublabel {
  color: #a0aec0;
}

/* Realtime Panel */
.realtime-panel {
  padding-top: 1rem;
}

.realtime-panel .sticky-top {
  top: 1rem;
}

.live-indicator {
  width: 8px;
  height: 8px;
  background-color: #dc3545;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Video Cards - Enhanced */
.video-card {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.video-thumbnail-container {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem 0.5rem 0 0;
}

.video-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail {
  transform: scale(1.05);
}

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

.video-title {
  font-size: 0.9rem;
  line-height: 1.3;
  height: 2.6rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.video-stats-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #6c757d;
}

.video-stats-item i {
  font-size: 0.7rem;
}

/* Top Videos in Realtime Panel */
.top-video-item {
  transition: background-color 0.2s ease;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin: 0 -0.75rem 0.75rem -0.75rem;
}

.top-video-item:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.top-video-item:last-child {
  margin-bottom: 0;
}

.top-video-item.border-bottom {
  border-bottom: 1px solid #e9ecef !important;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
}

.video-thumbnail-small {
  width: 60px;
  height: 45px;
  border-radius: 0.375rem;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.video-thumbnail-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.top-video-item:hover .video-thumbnail-small img {
  transform: scale(1.05);
}

/* Ranking badge */
.video-thumbnail-small .badge {
  font-size: 0.65rem;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.video-title-small {
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0 0 0.25rem 0;
  font-weight: 500;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.video-title-small:hover {
  color: #007bff !important;
}

.video-stats-small {
  font-size: 0.75rem;
}

.video-stats-small .gap-2 > span {
  white-space: nowrap;
}

.video-stats-small .badge {
  font-size: 0.6rem;
  padding: 0.2rem 0.4rem;
}

/* Dark mode adjustments */
.dark-mode .top-video-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .top-video-item.border-bottom {
  border-bottom-color: #495057 !important;
}

.dark-mode .video-title-small:hover {
  color: #0d6efd !important;
}

/* Tab Controls */
.tab-controls {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.dark-mode .tab-controls {
  background-color: #343a40;
}

/* Stats cards */
.stat-card {
  border-radius: 0.5rem;
  border: none;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card .card-body {
  padding: 1.5rem;
}

.stat-card h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* TikTok themed elements */
.btn-tiktok {
  color: #fff;
  background-color: #000;
  border-color: #000;
}

.btn-tiktok:hover {
  color: #fff;
  background-color: #333;
  border-color: #333;
}

/* Video thumbnails */
.video-thumbnail {
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Chart container */
.chart-container {
  position: relative;
  margin: auto;
  height: 300px;
  width: 100%;
}

/* Tab navigation for metrics */
.metrics-tabs {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 1.5rem;
}

.metrics-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 0.75rem 1rem;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.2s ease;
}

.metrics-tabs .nav-link:hover {
  color: #495057;
}

.metrics-tabs .nav-link.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

/* Period selector */
.period-selector .dropdown-menu {
  min-width: 200px;
}

.period-selector .dropdown-item {
  padding: 0.5rem 1rem;
}

.period-selector .dropdown-item:hover {
  background-color: #f8f9fa;
}

.period-selector .dropdown-item.active {
  background-color: #007bff;
  color: white;
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 40% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
  pointer-events: none;
  will-change: auto;
}

.auth-card {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 40px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  will-change: auto;
}

.auth-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 0 50px rgba(0, 0, 0, 0.08);
}

.auth-card .card-header {
  background: transparent;
  border-bottom: none;
  text-align: center;
  padding: 2rem 2rem 1rem;
}

.auth-card .card-body {
  padding: 1rem 2rem 2rem;
}

.auth-brand {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.auth-brand i {
  color: #3b82f6;
  margin-right: 0.5rem;
}

.auth-card h4 {
  color: #1f2937;
  font-weight: 600;
}

.auth-card .text-muted {
  color: #6b7280 !important;
}

.auth-card .form-floating {
  margin-bottom: 1rem;
}

.auth-card .form-floating label {
  color: #6b7280;
}

.auth-card .form-control {
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  color: #1f2937;
}

.auth-card .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
  background-color: #ffffff;
}

.auth-card .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
}

.auth-card .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.auth-card .form-text {
  color: #6b7280;
}

/* ===== ENHANCED NOTIFICATION SYSTEM ===== */
.notification-container {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  max-width: 400px;
}

.notification {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  min-width: 320px;
  max-width: 400px;
  opacity: 0;
  transform: translateX(100%) scale(0.9);
  animation: notification-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-weight: 500;
  line-height: 1.4;
}

.notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--notification-accent);
  border-radius: 2px 0 0 2px;
}

.notification:hover {
  transform: translateX(-5px) scale(1.02);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.notification-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

.notification-content {
  flex-grow: 1;
  min-width: 0;
}

.notification-message {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  word-wrap: break-word;
}

.notification-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  margin: -4px -4px -4px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.7;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

/* Light Mode Notification Types */
.notification-success {
  --notification-accent: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-color: rgba(16, 185, 129, 0.2);
  color: #065f46;
}

.notification-success .notification-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.notification-error {
  --notification-accent: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
  border-color: rgba(239, 68, 68, 0.2);
  color: #7f1d1d;
}

.notification-error .notification-icon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
}

.notification-info {
  --notification-accent: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-color: rgba(59, 130, 246, 0.2);
  color: #1e3a8a;
}

.notification-info .notification-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
}

.notification-warning {
  --notification-accent: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
  border-color: rgba(245, 158, 11, 0.2);
  color: #92400e;
}

.notification-warning .notification-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
}

/* Dark Mode Notifications */
.dark-mode .notification {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dark-mode .notification:hover {
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 6px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dark-mode .notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dark-mode .notification-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.dark-mode .notification-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.dark-mode .notification-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.dark-mode .notification-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* Enhanced Animations */
@keyframes notification-slide-in {
  0% {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
  50% {
    transform: translateX(-10px) scale(1.02);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes notification-slide-out {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
}

.notification.fade-out {
  animation: notification-slide-out 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Progress bar for auto-dismiss */
.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--notification-accent);
  border-radius: 0 0 12px 12px;
  width: 100%;
  transform-origin: left;
  animation: notification-progress 5s linear forwards;
  opacity: 0.6;
}

@keyframes notification-progress {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .notification-container {
    top: 60px;
    right: 10px;
    left: 10px;
    max-width: none;
    align-items: stretch;
  }
  
  .notification {
    min-width: auto;
    max-width: none;
    transform: translateY(-100%) scale(0.9);
    margin-bottom: 0.75rem;
  }
  
  .notification:hover {
    transform: translateY(-2px) scale(1.01);
  }
  
  @keyframes notification-slide-in {
    0% {
      transform: translateY(-100%) scale(0.9);
      opacity: 0;
    }
    50% {
      transform: translateY(-5px) scale(1.02);
    }
    100% {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
  }
  
  @keyframes notification-slide-out {
    0% {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
    100% {
      transform: translateY(-100%) scale(0.9);
      opacity: 0;
    }
  }
}

/* Stack management for multiple notifications */
.notification:nth-child(1) { z-index: 10; }
.notification:nth-child(2) { z-index: 9; }
.notification:nth-child(3) { z-index: 8; }
.notification:nth-child(4) { z-index: 7; }
.notification:nth-child(5) { z-index: 6; }

/* Subtle shadow enhancement for depth */
.notification {
  will-change: transform, opacity;
}

.notification::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  border-radius: 12px;
  pointer-events: none;
}

.dark-mode .notification::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

/* Animation for real-time updates */
@keyframes highlight {
  0% { background-color: rgba(255, 243, 205, 0.5); }
  100% { background-color: transparent; }
}

.highlight-update {
  animation: highlight 2s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    top: 56px;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - 56px);
    z-index: 1030;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background-color: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.125);
  }
  
  .sidebar.show {
    left: 0;
  }
  
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1020;
    display: none;
    backdrop-filter: blur(2px);
  }
  
  .sidebar-backdrop.show {
    display: block;
  }
  
  /* Dark mode mobile sidebar */
  .dark-mode .sidebar {
    background-color: #1e293b;
    border-right: 1px solid #334155;
  }
  

  
  .main-content {
    margin-left: 0;
    margin-top: 56px;
    padding: 0.75rem;
  }
  
  /* Mobile-optimized cards */
  .card {
    margin-bottom: 1rem;
    border-radius: 12px;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Mobile stats */
  .stat-card h2 {
    font-size: 1.25rem;
  }
  
  .summary-metric {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
  }
  
  .summary-metric .metric-value h3 {
    font-size: 1.25rem;
  }
  
  .summary-metric .metric-label {
    font-size: 0.8rem;
  }
  
  /* Mobile realtime panel */
  .realtime-panel {
    margin-top: 1rem;
  }
  
  /* Mobile dashboard header */
  .d-flex.justify-content-between {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .btn-toolbar {
    margin-top: 0.75rem;
    width: 100%;
  }
  
  .btn-toolbar .time-selector {
    margin-bottom: 0.5rem;
    margin-right: 0 !important;
  }
  
  .btn-toolbar button {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
  }
  
  /* Mobile navigation improvements */
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  .navbar-brand i {
    font-size: 1rem;
  }
  
  /* Mobile time selector */
  .time-selector-btn {
    font-size: 0.8rem !important;
    padding: 0.5rem 0.75rem !important;
  }
  
  .time-selector-menu {
    left: 0 !important;
    right: 0 !important;
    max-width: calc(100vw - 2rem);
    margin: 0 1rem;
  }
  
  /* Mobile tooltips - hide to reduce clutter */
  .tooltip-wrapper .tooltip-content {
    display: none;
  }
  
  /* Mobile connection status */
  .connection-tooltip-content {
    display: none;
  }
}

/* Additional responsive adjustments for dashboard */
@media (max-width: 991.98px) {
  .realtime-panel {
    margin-top: 2rem;
  }
  
  .summary-metric {
    margin-bottom: 1rem;
  }
}

/* Button hover and active states */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn:active {
  transform: translateY(1px);
}

/* Ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.btn-ripple:active:after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

.dark-mode .btn-ripple:after {
  background-image: radial-gradient(circle, #2d3748 10%, transparent 10.01%);
}

/* Collapsible sections */
.collapsible-section {
  margin-bottom: 1rem;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.collapsible-header:hover {
  background-color: #e9ecef;
}

.collapsible-header h5 {
  margin: 0;
}

.collapsible-header .toggle-icon {
  transition: transform 0.3s ease;
}

.collapsible-header[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.collapsible-content {
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-top: none;
  border-radius: 0 0 0.25rem 0.25rem;
  display: none;
}

.collapsible-content.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.dark-mode .collapsible-header {
  background-color: #2d3748;
}

.dark-mode .collapsible-header:hover {
  background-color: #4a5568;
}

.dark-mode .collapsible-content {
  border-color: #4a5568;
}

/* Empty state styling */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state-icon {
  font-size: 4rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

.empty-state-text {
  max-width: 300px;
  margin: 0 auto;
}

.empty-state-text h4 {
  margin-bottom: 0.5rem;
}

.empty-state-text p {
  color: #6c757d;
}

.dark-mode .empty-state-icon {
  color: #4a5568;
}

.dark-mode .empty-state-text p {
  color: #a0aec0;
}

/* Pulsing effect for real-time counters */
.counter-pulse {
  position: relative;
}

.counter-pulse::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: inherit;
  background-color: rgba(0, 123, 255, 0.1);
  z-index: -1;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.dark-mode .counter-pulse::before {
  background-color: rgba(66, 153, 225, 0.1);
}

/* Platform badge for video cards */
.platform-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 1;
}

/* Search dropdown */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-dropdown-item {
  padding: 0.75rem;
  border-bottom: 1px solid #f8f9fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background-color 0.2s ease;
}

.search-dropdown-item:hover {
  background-color: #f8f9fa;
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-thumbnail {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

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

.search-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-title mark {
  background-color: #fff3cd;
  padding: 0;
}

.search-meta {
  font-size: 0.875rem;
  color: #6c757d;
}

.dark-mode .search-dropdown {
  background: #2d3748;
  border-color: #4a5568;
}

.dark-mode .search-dropdown-item {
  border-bottom-color: #4a5568;
}

.dark-mode .search-dropdown-item:hover {
  background-color: #4a5568;
}

.dark-mode .search-title mark {
  background-color: #975a16;
  color: #f7fafc;
}

/* Platform Insights Styling */
.platform-insights-container {
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.02) 0%, rgba(108, 117, 125, 0.02) 100%);
  border-radius: 12px;
  border: 1px solid rgba(0, 123, 255, 0.1);
}

.insights-header {
  text-align: center;
}

.platform-icon-large {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.youtube-gradient {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.tiktok-gradient {
  background: linear-gradient(135deg, #000000 0%, #ff0050 50%, #00f2ea 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.multi-gradient {
  background: linear-gradient(135deg, #007bff 0%, #6610f2 50%, #e83e8c 100%);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.insight-card {
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.insight-header {
  padding: 1rem 1rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.insight-header h6 {
  margin: 0;
  font-weight: 600;
  color: var(--bs-dark);
}

.insight-content {
  padding: 1rem;
}

.metric-large {
  text-align: center;
  margin-bottom: 1rem;
}

.metric-large .value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 0.25rem;
}

.metric-large .label {
  display: block;
  font-size: 0.8rem;
  color: var(--bs-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1rem;
}

.metric-small {
  text-align: center;
}

.metric-small .value {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bs-dark);
}

.metric-small .label {
  display: block;
  font-size: 0.7rem;
  color: var(--bs-muted);
}

.growth-positive {
  color: var(--bs-success) !important;
}

.insight-tips {
  space-y: 0.5rem;
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.trending-tags {
  margin-bottom: 1rem;
}

.tag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tag-item:last-child {
  border-bottom: none;
}

.tag {
  font-weight: 600;
  color: var(--bs-primary);
}

.performance {
  font-size: 0.8rem;
  color: var(--bs-muted);
}

.platform-row {
  padding: 0.75rem 0;
}

.strategy-tips .tip-item {
  border-left: 3px solid var(--bs-primary);
  padding-left: 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(0, 123, 255, 0.02);
  border-radius: 0 6px 6px 0;
}

/* Dark mode support for platform insights */
[data-bs-theme="dark"] .platform-insights-container {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .insight-card {
  background: var(--bs-dark);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--bs-light);
}

[data-bs-theme="dark"] .insight-header h6 {
  color: var(--bs-light);
}

[data-bs-theme="dark"] .metric-small .value {
  color: var(--bs-light);
}

[data-bs-theme="dark"] .metric-small .label {
  color: var(--bs-text-muted) !important;
}

[data-bs-theme="dark"] .tag-item {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .strategy-tips .tip-item {
  background: rgba(255, 255, 255, 0.02);
}

/* Time Window Dropdown Styling */
.dropdown-item.active {
  background-color: var(--bs-primary) !important;
  color: white !important;
  font-weight: 600;
}

.dropdown-item.active .fas.fa-check {
  color: white !important;
}

.dropdown-item:hover {
  background-color: rgba(0, 123, 255, 0.1);
  transition: all 0.2s ease;
}

[data-bs-theme="dark"] .dropdown-item.active {
  background-color: var(--bs-primary) !important;
  color: white !important;
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Ensure dropdown button always works */
#timeWindowDropdown {
  pointer-events: auto !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1000;
  cursor: pointer !important;
}

#timeWindowDropdown:disabled {
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

#timeWindowDropdown:not(:disabled):not(.disabled) {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Fix dropdown button state after navigation */
.btn-outline-secondary:not(:disabled):not(.disabled) {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Force dropdown to always be clickable */
.dropdown-toggle {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.dropdown-toggle::after {
  transition: transform 0.15s ease-in-out;
}

.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Ensure dropdown menu positioning and visibility */
.dropdown-menu {
  z-index: 1050 !important;
  min-width: 200px;
  pointer-events: auto !important;
}

/* Fix any Bootstrap conflicts */
.dropdown-menu.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Ensure dropdown items are clickable */
.dropdown-item {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.dropdown-item:active,
.dropdown-item:focus {
  background-color: var(--bs-dropdown-link-active-bg) !important;
}

/* Dark mode dropdown fixes */
[data-bs-theme="dark"] .dropdown-menu {
  background-color: var(--bs-dark) !important;
  border-color: var(--bs-border-color) !important;
}

/* Simplified dropdown fixes */
.dropdown-toggle {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.dropdown-menu {
  z-index: 1050 !important;
}

.dropdown-item {
  cursor: pointer !important;
}

/* Button improvements */
.btn {
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-ripple {
  position: relative;
  overflow: hidden;
}

/* Custom Time Selector */
.time-selector {
  position: relative;
  display: inline-block;
}

.time-selector-btn {
  display: flex;
  align-items: center;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.time-selector-btn:disabled {
  cursor: not-allowed;
}

.time-selector-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 8px 0;
  margin-top: 4px;
  display: none;
  transform-origin: top left;
}

.time-selector-menu.show {
  display: block;
}

.time-selector-item {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: none;
  text-align: left;
  color: #333;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  font-size: 14px;
}

.time-selector-item:hover {
  background-color: #f8f9fa;
  color: #0d6efd;
}

.time-selector-item.active {
  background-color: #0d6efd;
  color: white;
}

.time-selector-item.active:hover {
  background-color: #0b5ed7;
}

.time-selector-divider {
  height: 1px;
  background-color: #e9ecef;
  margin: 8px 0;
}

.custom-range-btn {
  display: flex;
  align-items: center;
}

/* Custom Date Modal */
.custom-date-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-date-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  width: 90%;
  max-width: 500px;
  animation: modalSlideUp 0.3s ease;
}

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

.custom-date-modal-header {
  display: flex;
  justify-content: between;
  align-items: center;
  padding: 20px 24px 0 24px;
}

.custom-date-modal-header h5 {
  margin: 0;
  font-weight: 600;
  color: #333;
}

.btn-close {
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  margin-left: auto;
}

.btn-close:hover {
  color: #333;
}

.custom-date-modal-body {
  padding: 24px;
}

.custom-date-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 24px 24px 24px;
}

.form-label {
  font-weight: 500;
  color: #555;
  margin-bottom: 8px;
}

.form-control {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
  outline: none;
}

/* Loading states */
.card-body {
  transition: opacity 0.3s ease;
}

/* Performance optimizations */
.time-selector *,
.custom-date-modal * {
  will-change: auto;
}

.time-selector-menu {
  will-change: opacity, transform;
}

/* Dark mode support for time selector */
.dark-mode .time-selector-menu {
  background: #2d3748;
  border-color: #4a5568;
}

.dark-mode .time-selector-item {
  color: #e2e8f0;
}

.dark-mode .time-selector-item:hover {
  background-color: #4a5568;
  color: #90cdf4;
}

.dark-mode .time-selector-divider {
  background-color: #4a5568;
}

.dark-mode .custom-date-modal-content {
  background: #2d3748;
  color: #e2e8f0;
}

.dark-mode .form-control {
  background: #4a5568;
  border-color: #718096;
  color: #e2e8f0;
}

.dark-mode .form-control:focus {
  border-color: #90cdf4;
  box-shadow: 0 0 0 3px rgba(144, 205, 244, 0.1);
}

/* ===== PERFORMANCE IMPROVEMENTS ===== */

/* Reduce paint and layout thrashing */
.summary-metric h3 {
  will-change: contents;
}

/* Optimize chart containers */
.chart-container {
  will-change: contents;
  transform: translateZ(0);
}

/* Smooth transitions for stats updates */
.summary-metric h3,
.platform-stat-value {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading spinner optimization */
.fa-spinner {
  animation: spin 1s linear infinite;
}

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

/* Instant Navigation Loading Overlay */
#global-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease-in-out;
}

#global-loading-overlay .loading-content {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

#global-loading-overlay .loading-spinner {
  margin-bottom: 1rem;
}

#global-loading-overlay .loading-text {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

.dark-mode #global-loading-overlay {
  background: rgba(33, 37, 41, 0.9);
}

.dark-mode #global-loading-overlay .loading-content {
  background: rgba(33, 37, 41, 0.95);
  color: #e9ecef;
}

.dark-mode #global-loading-overlay .loading-text {
  color: #adb5bd;
}

/* Loading states for navigation links */
.nav-link.loading {
  opacity: 0.8;
  pointer-events: none;
}

.nav-link.loading i.fa-spinner {
  animation: spin 1s linear infinite;
}

/* ===== END PERFORMANCE IMPROVEMENTS ===== */

/* ===== CUSTOM LOADING BAR ===== */
#custom-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  pointer-events: none;
}

.loading-bar-container {
  height: 3px;
  background: transparent;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-bar-progress {
  height: 100%;
  background: linear-gradient(90deg, #0d6efd, #0b5ed7, #90cdf4);
  background-size: 200% 100%;
  animation: loadingShimmer 1.5s infinite;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(13, 110, 253, 0.5);
}

@keyframes loadingShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Hide default Turbo progress bar */
.turbo-progress-bar {
  display: none !important;
}

/* Optimize for different themes */
.dark-mode .loading-bar-progress {
  background: linear-gradient(90deg, #90cdf4, #4299e1, #2b6cb0);
  box-shadow: 0 0 8px rgba(144, 205, 244, 0.5);
}

/* Fast loading optimization */
.loading-bar-fast {
  animation-duration: 0.8s;
}

/* Ultra-fast for AJAX updates */
.loading-bar-ajax {
  height: 2px;
  animation-duration: 0.5s;
}

/* ===== END CUSTOM LOADING BAR ===== */

/* ===== SHARED SIDEBAR IMPROVEMENTS ===== */

/* Sidebar notification and interaction styles - simplified */
.sidebar .nav-link.disabled:hover {
  background-color: transparent;
  cursor: not-allowed;
}

/* Platform links in sidebar */
.sidebar .nav-link small {
  font-size: 0.75rem;
  opacity: 0.7;
  display: block;
  margin-top: 2px;
}

/* Hover effects for disabled platform links */
.sidebar .nav-link.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transition: all 0.2s ease;
}

.sidebar .nav-link.disabled:hover {
  opacity: 0.8;
  transform: none;
}

/* Coming soon notification styles */
.coming-soon-notification {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Connect prompt notification styles */
.connect-prompt-notification {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

/* ===== END SHARED SIDEBAR IMPROVEMENTS ===== */

/* ===== TOOLTIP STYLES ===== */

/* General tooltip wrapper */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  visibility: hidden;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1100;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  font-size: 14px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip-wrapper:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

.tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

/* Connection status tooltip specific styling */
.connection-tooltip {
  position: relative;
}

.connection-tooltip-content {
  position: absolute;
  visibility: hidden;
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: white;
  text-align: center;
  border-radius: 8px;
  padding: 12px 16px;
  z-index: 1200;
  top: 135%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 140px;
}

.connection-tooltip-content::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #2d3748 transparent;
}

.connection-tooltip-content::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #1a202c transparent;
}

.connection-tooltip:hover .connection-tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(8px);
}

/* Enhanced status-specific styling */
.connection-status.connected + .connection-tooltip-content::after {
  border-bottom-color: #22c55e;
}

.connection-status.disconnected + .connection-tooltip-content::after {
  border-bottom-color: #ef4444;
}

.connection-status.active + .connection-tooltip-content::after {
  border-bottom-color: #3b82f6;
}

/* Dark mode tooltip support */
.dark-mode .tooltip-content {
  background-color: rgba(255, 255, 255, 0.95);
  color: #1a202c;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .tooltip-content::after {
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

.dark-mode .connection-tooltip-content {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  color: #2d3748;
  border-color: rgba(0, 0, 0, 0.1);
}

.dark-mode .connection-tooltip-content::before {
  border-color: transparent transparent #f7fafc transparent;
}

.dark-mode .connection-tooltip-content::after {
  border-color: transparent transparent #edf2f7 transparent;
}

/* Responsive tooltip adjustments */
@media (max-width: 768px) {
  .connection-tooltip-content {
    font-size: 12px;
    padding: 10px 14px;
    min-width: 120px;
  }
  
  .tooltip-content {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* ===== END TOOLTIP STYLES ===== */

/* ===== DANGER ZONE STYLING ===== */

/* Danger zone card styling */
.auth-card .card-header h5.text-danger {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.auth-card .btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
  border: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.auth-card .btn-danger:hover {
  background: linear-gradient(135deg, #b02a37 0%, #8b1e2b 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.auth-card .btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Dark mode support for danger zone */
.dark-mode .auth-card .btn-danger {
  box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
}

.dark-mode .auth-card .btn-danger:hover {
  box-shadow: 0 6px 20px rgba(248, 113, 113, 0.4);
}

/* ===== END DANGER ZONE STYLING ===== */

/* ===== END PERFORMANCE IMPROVEMENTS ===== */

/* ===== COMPREHENSIVE DARK MODE DASHBOARD STYLES ===== */

/* Root dark mode variables */
.dark-mode {
  --bs-body-bg: #1a202c;
  --bs-body-color: #e2e8f0;
  --bs-border-color: #2d3748;
  --bs-card-bg: #2d3748;
  --bs-card-border-color: #4a5568;
  --bs-text-muted: #a0aec0;
  --bs-link-color: #63b3ed;
  --bs-link-hover-color: #90cdf4;
}

/* Body and main containers */
.dark-mode body {
  background-color: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .main-content {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

/* Dashboard title and headers */
.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5, .dark-mode h6 {
  color: #f7fafc !important;
}

.dark-mode .h2 {
  color: #f7fafc !important;
}

/* Cards - Main dashboard cards */
.dark-mode .card {
  background-color: var(--bs-card-bg) !important;
  border-color: var(--bs-card-border-color) !important;
  color: var(--bs-body-color) !important;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3) !important;
}

.dark-mode .card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4) !important;
}

.dark-mode .card-header {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-bottom-color: var(--bs-card-border-color) !important;
  color: #f7fafc !important;
}

.dark-mode .card-body {
  background-color: var(--bs-card-bg) !important;
  color: var(--bs-body-color) !important;
}

/* Alert styles for subscription status */
.dark-mode .alert-info {
  background-color: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  color: #bfdbfe !important;
}

.dark-mode .alert-success {
  background-color: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  color: #bbf7d0 !important;
}

.dark-mode .alert-warning {
  background-color: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fde68a !important;
}

.dark-mode .alert-danger {
  background-color: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fecaca !important;
}

.dark-mode .alert-heading {
  color: #f7fafc !important;
}

/* Buttons */
.dark-mode .btn-primary {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

.dark-mode .btn-primary:hover {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

.dark-mode .btn-outline-secondary {
  color: #e2e8f0 !important;
  border-color: #4a5568 !important;
}

.dark-mode .btn-outline-secondary:hover {
  background-color: #4a5568 !important;
  border-color: #4a5568 !important;
  color: #ffffff !important;
}

.dark-mode .btn-outline-success {
  color: #22c55e !important;
  border-color: #22c55e !important;
}

.dark-mode .btn-outline-success:hover {
  background-color: #22c55e !important;
  border-color: #22c55e !important;
  color: #ffffff !important;
}

.dark-mode .btn-sm {
  font-size: 0.875rem !important;
}

/* Badges and platform indicators */
.dark-mode .badge.bg-primary {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}

.dark-mode .badge {
  color: #000000 !important;
}

/* Summary metrics styling */
.dark-mode .summary-metric {
  background-color: #374151 !important;
  border: 1px solid #4b5563 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .summary-metric .metric-value h3 {
  color: #f9fafb !important;
  font-weight: 700 !important;
}

.dark-mode .summary-metric .metric-label {
  color: #d1d5db !important;
  font-weight: 600 !important;
}

.dark-mode .summary-metric .metric-sublabel {
  color: var(--bs-text-muted) !important;
}

.dark-mode .summary-metric .metric-change.positive {
  color: #10b981 !important;
}

.dark-mode .summary-metric .metric-change.negative {
  color: #ef4444 !important;
}

.dark-mode .summary-metric .metric-change.coming-soon {
  color: #6b7280 !important;
}

/* Text colors */
.dark-mode .text-muted {
  color: var(--bs-text-muted) !important;
}

.dark-mode .text-center.py-5 i {
  color: var(--bs-text-muted) !important;
}

.dark-mode .text-center.py-5 h5 {
  color: #d1d5db !important;
}

.dark-mode .text-center.py-5 p {
  color: var(--bs-text-muted) !important;
}

/* Border styles */
.dark-mode .border-bottom {
  border-bottom-color: var(--bs-border-color) !important;
}

.dark-mode .border {
  border-color: var(--bs-border-color) !important;
}

/* Dropdown and time selector - enhanced */
.dark-mode .dropdown-menu {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5) !important;
}

.dark-mode .dropdown-item {
  color: var(--bs-body-color) !important;
}

.dark-mode .dropdown-item:hover {
  background-color: #4b5563 !important;
  color: #ffffff !important;
}

.dark-mode .dropdown-item:focus {
  background-color: #4b5563 !important;
  color: #ffffff !important;
}

.dark-mode .dropdown-item.active {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* Time selector specific styling */
.dark-mode .time-selector-btn {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .time-selector-btn:hover {
  background-color: #4b5563 !important;
  border-color: #6b7280 !important;
  color: #ffffff !important;
}

.dark-mode .time-selector-menu {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5) !important;
}

.dark-mode .time-selector-item {
  color: var(--bs-body-color) !important;
}

.dark-mode .time-selector-item:hover {
  background-color: #4b5563 !important;
  color: #ffffff !important;
}

.dark-mode .time-selector-item.active {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}

.dark-mode .time-selector-divider {
  background-color: #4b5563 !important;
}

/* Form controls */
.dark-mode .form-control {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .form-control:focus {
  background-color: #374151 !important;
  border-color: #3b82f6 !important;
  color: var(--bs-body-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

.dark-mode .form-label {
  color: #d1d5db !important;
}

/* Chart container */
.dark-mode .chart-container {
  background-color: transparent !important;
}

/* Platform insights and tables */
.dark-mode .platform-insights-container {
  background-color: var(--bs-card-bg) !important;
}

.dark-mode .insight-card {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}

.dark-mode .insight-header h6 {
  color: #f9fafb !important;
}

.dark-mode .metric-small .value {
  color: #f9fafb !important;
}

.dark-mode .metric-small .label {
  color: var(--bs-text-muted) !important;
}

/* Table styling */
.dark-mode table {
  color: var(--bs-body-color) !important;
}

.dark-mode .table {
  --bs-table-bg: #374151;
  --bs-table-striped-bg: #4b5563;
  --bs-table-hover-bg: #4b5563;
  --bs-table-border-color: #4b5563;
  color: var(--bs-body-color) !important;
}

.dark-mode .table-dark {
  --bs-table-bg: #2d3748;
  --bs-table-striped-bg: #374151;
  --bs-table-hover-bg: #374151;
  --bs-table-border-color: #4b5563;
}

.dark-mode th {
  color: #f9fafb !important;
  border-color: #4b5563 !important;
}

.dark-mode td {
  color: var(--bs-body-color) !important;
  border-color: #4b5563 !important;
}

/* Icon colors */
.dark-mode .fas, .dark-mode .fab {
  color: inherit !important;
}

.dark-mode .text-primary {
  color: #63b3ed !important;
}

.dark-mode .text-success {
  color: #68d391 !important;
}

.dark-mode .text-warning {
  color: #f6e05e !important;
}

.dark-mode .text-danger {
  color: #fc8181 !important;
}

.dark-mode .text-info {
  color: #63b3ed !important;
}

/* Empty state styling */
.dark-mode .empty-state {
  color: var(--bs-text-muted) !important;
}

.dark-mode .empty-state-icon {
  color: #6b7280 !important;
}

.dark-mode .empty-state-text h4 {
  color: #d1d5db !important;
}

.dark-mode .empty-state-text p {
  color: var(--bs-text-muted) !important;
}

/* Links */
.dark-mode a {
  color: var(--bs-link-color) !important;
}

.dark-mode a:hover {
  color: var(--bs-link-hover-color) !important;
}

/* Video cards and media */
.dark-mode .video-card {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}

.dark-mode .video-card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4) !important;
}

.dark-mode .video-title {
  color: #f9fafb !important;
}

.dark-mode .video-stats {
  color: var(--bs-text-muted) !important;
}

/* Platform specific styling */
.dark-mode .platform-row {
  border-color: #4b5563 !important;
}

.dark-mode .platform-row:hover {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Loading and progress bars */
.dark-mode .loading-bar-progress {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8) !important;
}

.dark-mode .progress {
  background-color: #374151 !important;
}

.dark-mode .progress-bar {
  background-color: #3b82f6 !important;
}

/* Tooltips */
.dark-mode .tooltip-content {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
  border: 1px solid #374151 !important;
}

.dark-mode .tooltip-content::after {
  border-top-color: #1f2937 !important;
}

/* Navbar dark mode enhancement */
.dark-mode .navbar {
  background-color: #1f2937 !important;
  border-bottom: 1px solid #374151 !important;
}

.dark-mode .navbar-brand {
  color: #f9fafb !important;
}

.dark-mode .navbar-nav .nav-link {
  color: #d1d5db !important;
}

.dark-mode .navbar-nav .nav-link:hover {
  color: #f9fafb !important;
}

/* Custom modal styling */
.dark-mode .modal-content {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .modal-header {
  border-bottom-color: #4b5563 !important;
}

.dark-mode .modal-footer {
  border-top-color: #4b5563 !important;
}

.dark-mode .modal-title {
  color: #f9fafb !important;
}

.dark-mode .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%) !important;
}

/* Responsive design for dark mode */
@media (max-width: 768px) {
  .dark-mode .sidebar {
    background-color: #1f2937 !important;
  }
  
  .dark-mode .sidebar-backdrop {
    background-color: rgba(0, 0, 0, 0.7) !important;
  }
}

/* Additional utility classes for dark mode */
.dark-mode .bg-light {
  background-color: #374151 !important;
}

.dark-mode .bg-secondary {
  background-color: #4b5563 !important;
}

.dark-mode .border-light {
  border-color: #4b5563 !important;
}

.dark-mode .border-secondary {
  border-color: #6b7280 !important;
}

/* Ensure all text is readable */
.dark-mode * {
  color: inherit;
}

.dark-mode .dashboard-header {
  color: #f9fafb !important;
}

.dark-mode .dashboard-subheader {
  color: #d1d5db !important;
}

/* Analytics specific styling */
.dark-mode .analytics-card {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}

.dark-mode .analytics-metric {
  color: #f9fafb !important;
}

.dark-mode .analytics-label {
  color: var(--bs-text-muted) !important;
}

/* Platform badges */
.dark-mode .platform-badge {
  background-color: #4b5563 !important;
  color: #f9fafb !important;
  border: 1px solid #6b7280 !important;
}

.dark-mode .platform-badge:hover {
  background-color: #6b7280 !important;
}

/* Status indicators */
.dark-mode .status-active {
  color: #10b981 !important;
}

.dark-mode .status-inactive {
  color: #ef4444 !important;
}

.dark-mode .status-pending {
  color: #f59e0b !important;
}

/* Search and filter components */
.dark-mode .search-input {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .search-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

.dark-mode .filter-button {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .filter-button:hover {
  background-color: #4b5563 !important;
}

.dark-mode .filter-button.active {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* ===== END DARK MODE DASHBOARD STYLES ===== */

/* ===== ADDITIONAL DARK MODE FIXES AND IMPROVEMENTS ===== */

/* Fix sidebar bg-light in dark mode */
.dark-mode .sidebar.bg-light {
  background-color: #2d3748 !important;
}

/* Sidebar heading improvements */
.dark-mode .sidebar-heading {
  color: #a0aec0 !important;
}

/* Make sure disabled links are properly styled */
.dark-mode .sidebar .nav-link.disabled {
  color: #6b7280 !important;
  opacity: 0.6;
}

.dark-mode .sidebar .nav-link.disabled:hover {
  color: #6b7280 !important;
  background-color: transparent !important;
}

.dark-mode .sidebar .nav-link small {
  color: #9ca3af !important;
}

/* Improve dropdown divider */
.dark-mode .dropdown-divider {
  border-color: #4b5563 !important;
}

/* Form switch (theme toggle) improvements */
.dark-mode .form-check-input {
  background-color: #4b5563 !important;
  border-color: #6b7280 !important;
}

.dark-mode .form-check-input:checked {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

.dark-mode .form-check-label {
  color: #e5e7eb !important;
}

/* Improve alert text readability */
.dark-mode .alert .fas {
  opacity: 0.9;
}

/* Navbar dark mode specific fixes */
.dark-mode .navbar-dark {
  background-color: #1f2937 !important;
}

.dark-mode .navbar-toggler {
  border-color: #4b5563 !important;
}

.dark-mode .navbar-toggler-icon {
  filter: invert(1);
}

/* Table improvements for dark mode */
.dark-mode .table thead th {
  background-color: #374151 !important;
  color: #f9fafb !important;
  border-color: #4b5563 !important;
}

/* Better focus states */
.dark-mode .btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

.dark-mode .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

/* Improve badge contrast */
.dark-mode .badge.bg-secondary {
  background-color: #6b7280 !important;
  color: #f9fafb !important;
}

/* Better contrast for metric changes */
.dark-mode .metric-change i {
  opacity: 0.9;
}

/* Platform insights grid improvements */
.dark-mode .insight-content {
  background-color: transparent !important;
}

/* Scrollbar improvements for dark mode */
.dark-mode ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.dark-mode ::-webkit-scrollbar-track {
  background-color: #374151;
}

.dark-mode ::-webkit-scrollbar-thumb {
  background-color: #6b7280;
  border-radius: 4px;
}

.dark-mode ::-webkit-scrollbar-thumb:hover {
  background-color: #9ca3af;
}

/* Ensure proper text contrast for all elements */
.dark-mode .card-title {
  color: #f9fafb !important;
}

.dark-mode .card-subtitle {
  color: #d1d5db !important;
}

.dark-mode .card-text {
  color: var(--bs-body-color) !important;
}

/* List group improvements */
.dark-mode .list-group-item {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .list-group-item:hover {
  background-color: #4b5563 !important;
}

.dark-mode .list-group-item.active {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

/* Progress bar improvements */
.dark-mode .progress {
  background-color: #374151 !important;
  border: 1px solid #4b5563 !important;
}

/* Breadcrumb improvements */
.dark-mode .breadcrumb {
  background-color: #374151 !important;
}

.dark-mode .breadcrumb-item a {
  color: var(--bs-link-color) !important;
}

.dark-mode .breadcrumb-item.active {
  color: var(--bs-text-muted) !important;
}

/* Pagination improvements */
.dark-mode .page-link {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .page-link:hover {
  background-color: #4b5563 !important;
  border-color: #6b7280 !important;
  color: #ffffff !important;
}

.dark-mode .page-item.active .page-link {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

.dark-mode .page-item.disabled .page-link {
  background-color: #2d3748 !important;
  border-color: #4a5568 !important;
  color: #6b7280 !important;
}

/* Accordion improvements */
.dark-mode .accordion-item {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}

.dark-mode .accordion-header button {
  background-color: #374151 !important;
  color: var(--bs-body-color) !important;
  border-color: #4b5563 !important;
}

.dark-mode .accordion-header button:hover {
  background-color: #4b5563 !important;
}

.dark-mode .accordion-body {
  background-color: #2d3748 !important;
  color: var(--bs-body-color) !important;
}

/* Offcanvas improvements */
.dark-mode .offcanvas {
  background-color: #2d3748 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .offcanvas-header {
  border-bottom-color: #4b5563 !important;
}

.dark-mode .offcanvas-title {
  color: #f9fafb !important;
}

/* Toast improvements */
.dark-mode .toast {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

.dark-mode .toast-header {
  background-color: #374151 !important;
  border-bottom-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

/* Spinner improvements */
.dark-mode .spinner-border {
  color: #3b82f6 !important;
}

.dark-mode .spinner-grow {
  color: #3b82f6 !important;
}

/* Input group improvements */
.dark-mode .input-group-text {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: var(--bs-body-color) !important;
}

/* Chart.js canvas background fix */
.dark-mode canvas {
  background-color: transparent !important;
}

/* Ensure all icons inherit proper colors */
.dark-mode .fa-crown {
  color: #fbbf24 !important;
}

.dark-mode .fa-check-circle {
  color: #10b981 !important;
}

.dark-mode .fa-exclamation-triangle {
  color: #f59e0b !important;
}

.dark-mode .fa-times-circle {
  color: #ef4444 !important;
}

/* Social media platform colors for dark mode */
.dark-mode .fab.fa-youtube {
  color: #ff0000 !important;
}

.dark-mode .fab.fa-tiktok {
  color: #fe2c55 !important;
}

.dark-mode .fab.fa-instagram {
  color: #e4405f !important;
}

.dark-mode .fab.fa-facebook {
  color: #1877f2 !important;
}

.dark-mode .fab.fa-twitter {
  color: #1da1f2 !important;
}

.dark-mode .fab.fa-linkedin {
  color: #0077b5 !important;
}

.dark-mode .fab.fa-twitch {
  color: #9146ff !important;
}

/* ===== END ADDITIONAL DARK MODE FIXES ===== */

/* ===== BEAUTIFUL SUBSCRIPTION STATUS CARDS ===== */

.subscription-status-card {
  position: relative;
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.subscription-status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-gradient-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  z-index: 1;
}

.status-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-info {
  flex: 1;
}

.status-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.status-description {
  font-size: 15px;
  margin: 0 0 16px 0;
  opacity: 0.9;
  line-height: 1.4;
}

.status-actions {
  flex-shrink: 0;
}

/* Upgrade Card (for non-subscribed users) */
.upgrade-card .card-gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.upgrade-card {
  color: white;
}

.upgrade-card .status-icon {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.upgrade-card .btn-premium {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.upgrade-card .btn-premium:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-1px);
  text-decoration: none;
}

/* Active Card (for subscribed users) */
.active-card .card-gradient-bg {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.active-card {
  color: white;
}

.active-card .status-icon {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.active-card .btn-manage {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.active-card .btn-manage:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-1px);
}

/* Dark mode subscription cards */
.dark-mode .subscription-status-card {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dark-mode .subscription-status-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.dark-mode .upgrade-card .card-gradient-bg {
  background: linear-gradient(135deg, #4c63d2 0%, #5a4fcf 100%);
}

.dark-mode .active-card .card-gradient-bg {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.dark-mode .status-icon {
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Responsive design for subscription cards */
@media (max-width: 768px) {
  .subscription-status-card {
    padding: 20px;
  }
  
  .status-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .status-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .status-title {
    font-size: 18px;
  }
  
  .status-description {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .status-actions {
    width: 100%;
  }
  
  .btn-premium,
  .btn-manage {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* Animation effects */
@keyframes statusCardPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.subscription-status-card.pulse {
  animation: statusCardPulse 2s ease-in-out infinite;
}

/* Subtle shine effect */
.subscription-status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.8s;
  z-index: 3;
}

.subscription-status-card:hover::before {
  left: 100%;
}

/* ===== END SUBSCRIPTION STATUS CARDS ===== */

/* ===== NOTIFICATION ALERTS (COMPACT DESIGN) ===== */

/* Dark mode alert styles */
.dark-mode .alert {
  border: 1px solid var(--bs-border-color);
}

.dark-mode .alert-success {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: #10b981;
}

.dark-mode .alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.dark-mode .alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.dark-mode .alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Alert buttons in dark mode */
.dark-mode .alert .btn-outline-success {
  color: #10b981;
  border-color: #10b981;
}

.dark-mode .alert .btn-outline-success:hover {
  background-color: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.dark-mode .alert .btn-primary {
  background-color: #3b82f6;
  border-color: #3b82f6;
}

.dark-mode .alert .btn-primary:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

/* Alert close button */
.dark-mode .alert .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ===== END NOTIFICATION ALERTS ===== */

/* ===== FOOTER STYLES ===== */

/* Footer Styles */
.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  background-color: #f8f9fa !important;
  margin-top: auto;
}

.footer .container-fluid {
  max-width: 1400px;
  margin: 0 auto;
}

.footer .text-muted {
  color: #6c757d !important;
  font-size: 0.875rem;
}

.footer .text-muted:hover {
  color: #495057 !important;
  text-decoration: none;
}

.footer .nav a {
  color: #6c757d !important;
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer .nav a:hover {
  color: #007bff !important;
  transform: translateY(-2px);
}

.footer .fab {
  font-size: 1.25rem;
}

.footer .row {
  min-height: 60px;
}

/* Dark mode footer */
.dark-mode .footer {
  background-color: #2d3748 !important;
  border-top: 1px solid #4a5568;
}

.dark-mode .footer .text-muted {
  color: #a0aec0 !important;
}

.dark-mode .footer .text-muted:hover {
  color: #e2e8f0 !important;
}

.dark-mode .footer .nav a {
  color: #a0aec0 !important;
}

.dark-mode .footer .nav a:hover {
  color: #63b3ed !important;
}

/* Social Media Icons */
.social-links .social-icon {
  color: #6c757d !important;
  background: rgba(108, 117, 125, 0.1);
  border: 1px solid rgba(108, 117, 125, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  text-decoration: none;
}

.social-links .social-icon:hover {
  color: #007bff !important;
  background: rgba(0, 123, 255, 0.1);
  border-color: rgba(0, 123, 255, 0.3);
  transform: translateY(-2px) scale(1.05);
  text-decoration: none;
}

/* Responsive footer */
@media (max-width: 767.98px) {
  .footer {
    padding: 1.5rem 1rem !important;
  }
  
  .footer .row {
    text-align: center;
  }
  
  .footer .row > div {
    margin-bottom: 0.5rem;
  }
  
  .footer .row > div:last-child {
    margin-bottom: 0;
  }
  
  .footer .nav {
    justify-content: center !important;
  }
}

/* ===== DARK MODE ENHANCEMENTS FOR AUTH, SUBSCRIPTIONS, AND BILLING ===== */

/* Dark Mode - Auth Pages */
.dark-mode .auth-page {
  background: #0f172a;
}

.dark-mode .auth-page::before {
  background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 40% 80%, rgba(245, 158, 11, 0.15) 0%, transparent 50%);
}

.dark-mode .auth-card {
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1);
}

.dark-mode .auth-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 50px rgba(0, 0, 0, 0.15);
  border-color: #475569;
}

.dark-mode .auth-brand {
  color: #f8fafc;
}

.dark-mode .auth-brand i {
  color: #60a5fa;
}

.dark-mode .auth-card h4 {
  color: #f8fafc;
}

.dark-mode .auth-card .text-muted {
  color: #94a3b8 !important;
}

.dark-mode .auth-card .form-floating label {
  color: #94a3b8;
}

.dark-mode .auth-card .form-control {
  background-color: #0f172a;
  border: 1px solid #475569;
  color: #f8fafc;
}

.dark-mode .auth-card .form-control:focus {
  background-color: #1e293b;
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25);
}

.dark-mode .auth-card .form-control::placeholder {
  color: #64748b;
}

.dark-mode .auth-card .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border: none;
  color: #ffffff;
}

.dark-mode .auth-card .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.dark-mode .auth-card .form-text {
  color: #94a3b8;
}

.dark-mode .auth-card .form-check-label {
  color: #e2e8f0;
}

.dark-mode .auth-card .form-check-input {
  background-color: #334155;
  border-color: #475569;
}

.dark-mode .auth-card .form-check-input:checked {
  background-color: #3b82f6;
  border-color: #3b82f6;
}

.dark-mode .auth-card a {
  color: #60a5fa;
}

.dark-mode .auth-card a:hover {
  color: #93c5fd;
}

/* Dark Mode - Pricing/Billing Pages */
.dark-mode .pricing-page {
  background: #0f172a;
  color: #f8fafc;
}

.dark-mode .pricing-page .container {
  background: transparent;
}

.dark-mode .pricing-page .display-4 {
  color: #f8fafc;
}

.dark-mode .pricing-page .gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark-mode .pricing-page .lead {
  color: #cbd5e1;
}

.dark-mode .pricing-card {
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.dark-mode .pricing-card:hover {
  border-color: #60a5fa;
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.dark-mode .pricing-card.popular {
  border-color: #fbbf24;
  position: relative;
}

.dark-mode .pricing-card.popular::before {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.dark-mode .popular-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1f2937;
  font-weight: 700;
}

.dark-mode .pricing-card .card-header {
  background: transparent;
  border-bottom: 1px solid #475569;
  color: #f8fafc;
}

.dark-mode .pricing-card .plan-name {
  color: #f8fafc;
}

.dark-mode .pricing-card .price {
  color: #f8fafc;
}

.dark-mode .pricing-card .currency,
.dark-mode .pricing-card .amount {
  color: #60a5fa;
}

.dark-mode .pricing-card .period {
  color: #94a3b8;
}

.dark-mode .pricing-card .card-body {
  background: transparent;
  color: #e2e8f0;
}

.dark-mode .pricing-card .features-list {
  list-style: none;
  padding: 0;
}

.dark-mode .pricing-card .features-list li {
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}

.dark-mode .pricing-card .features-list i.fa-check {
  color: #34d399;
}

.dark-mode .pricing-card .card-footer {
  background: transparent;
  border-top: 1px solid #475569;
}

.dark-mode .pricing-card .btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #ffffff;
}

.dark-mode .pricing-card .btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Dark Mode - Accordion (FAQ) - Enhanced with !important to override inline styles */
.dark-mode .accordion-item {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.dark-mode .accordion-button {
  background: #1e293b !important;
  color: #f8fafc !important;
  border: none !important;
  box-shadow: none !important;
}

.dark-mode .accordion-button:not(.collapsed) {
  background: #334155 !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

.dark-mode .accordion-button:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

.dark-mode .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25) !important;
  border-color: #3b82f6 !important;
}

.dark-mode .accordion-button::after {
  filter: invert(1) brightness(1.2);
}

.dark-mode .accordion-body {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-top: 1px solid #334155 !important;
}

/* Ensure pricing page accordions specifically get dark mode styling */
.dark-mode .pricing-page .accordion-item {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
}

.dark-mode .pricing-page .accordion-button {
  background: #1e293b !important;
  color: #f8fafc !important;
}

.dark-mode .pricing-page .accordion-button:not(.collapsed) {
  background: #334155 !important;
  color: #f8fafc !important;
}

.dark-mode .pricing-page .accordion-body {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

/* Dark Mode - Development Bypass Card */
.dark-mode .pricing-page .card {
  background: #1e293b;
  border: 2px dashed #60a5fa;
  color: #f8fafc;
}

.dark-mode .pricing-page .card .card-body {
  background: rgba(96, 165, 250, 0.05);
}

.dark-mode .pricing-page .text-info {
  color: #60a5fa !important;
}

.dark-mode .pricing-page .btn-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  border: none;
  color: #ffffff;
}

.dark-mode .pricing-page .btn-info:hover {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

/* Dark Mode - Subscription Page */
.dark-mode .main-content {
  background: #0f172a;
  color: #f8fafc;
}

.dark-mode .main-content h1,
.dark-mode .main-content .h2 {
  color: #f8fafc;
}

.dark-mode .border-bottom {
  border-color: #334155 !important;
}

.dark-mode .btn-primary.dropdown-toggle {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border: none;
  color: #ffffff;
}

.dark-mode .btn-primary.dropdown-toggle:hover {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
}

.dark-mode .btn-outline-primary {
  color: #60a5fa;
  border-color: #60a5fa;
  background: transparent;
}

.dark-mode .btn-outline-primary:hover {
  background: #60a5fa;
  border-color: #60a5fa;
  color: #1f2937;
}

.dark-mode .btn-outline-danger {
  color: #f87171;
  border-color: #f87171;
  background: transparent;
}

.dark-mode .btn-outline-danger:hover {
  background: #f87171;
  border-color: #f87171;
  color: #1f2937;
}

.dark-mode .btn-outline-dark {
  color: #e2e8f0;
  border-color: #475569;
  background: transparent;
}

.dark-mode .btn-outline-dark:hover {
  background: #475569;
  border-color: #475569;
  color: #f8fafc;
}

/* Dark Mode - Subscription Cards */
.dark-mode .card.h-100 {
  background: #1e293b;
  border: 1px solid #334155;
  transition: all 0.3s ease;
}

.dark-mode .card.h-100:hover {
  border-color: #60a5fa;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dark-mode .card.h-100 .card-body {
  background: transparent;
  color: #e2e8f0;
}

.dark-mode .card.h-100 .card-title {
  color: #f8fafc;
}

.dark-mode .card.h-100 .card-text {
  color: #cbd5e1;
}

.dark-mode .card.h-100 .card-footer {
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid #334155;
}

.dark-mode .badge.bg-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff;
}

.dark-mode .badge.bg-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  color: #ffffff;
}

/* Dark Mode - Platform Icons */
.dark-mode .fab.fa-youtube {
  color: #ef4444 !important;
  filter: brightness(1.2);
}

.dark-mode .fab.fa-tiktok {
  color: #e2e8f0 !important;
  filter: brightness(1.2);
}

.dark-mode .fab.fa-instagram {
  color: #ec4899 !important;
  filter: brightness(1.2);
}

.dark-mode .fab.fa-twitter {
  color: #06b6d4 !important;
  filter: brightness(1.2);
}

.dark-mode .fab.fa-facebook {
  color: #3b82f6 !important;
  filter: brightness(1.2);
}

.dark-mode .fab.fa-linkedin {
  color: #0ea5e9 !important;
  filter: brightness(1.2);
}

.dark-mode .fab.fa-twitch {
  color: #a855f7 !important;
  filter: brightness(1.2);
}

/* Dark Mode - Empty State */
.dark-mode .text-center.py-5 {
  color: #e2e8f0;
}

.dark-mode .text-center.py-5 h4 {
  color: #f8fafc;
}

.dark-mode .text-center.py-5 .fa-plug {
  color: #64748b !important;
}

/* Dark Mode - Alert Improvements */
.dark-mode .alert.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.dark-mode .alert.alert-info {
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
}

.dark-mode .alert.alert-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.dark-mode .alert .fas.fa-crown {
  color: #fbbf24;
}

.dark-mode .alert .fas.fa-check-circle {
  color: #10b981;
}

.dark-mode .alert .fas.fa-exclamation-triangle {
  color: #fbbf24;
}

/* Dark Mode - Button Size Variants */
.dark-mode .btn-lg {
  font-weight: 600;
}

.dark-mode .btn-sm.btn-outline-primary {
  color: #60a5fa;
  border-color: #60a5fa;
}

.dark-mode .btn-sm.btn-outline-primary:hover {
  background: #60a5fa;
  color: #1f2937;
}

.dark-mode .btn-sm.btn-outline-danger {
  color: #f87171;
  border-color: #f87171;
}

.dark-mode .btn-sm.btn-outline-danger:hover {
  background: #f87171;
  color: #1f2937;
}

/* Dark Mode - Input Group Styling */
.dark-mode .input-group .form-control {
  background: #1e293b;
  border: 1px solid #475569;
  color: #f8fafc;
}

.dark-mode .input-group .form-control:focus {
  background: #1e293b;
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25);
}

/* Mobile Responsive Design Enhancements */
@media (max-width: 768px) {
  /* Mobile auth pages */
  .auth-page {
    padding: 1rem 0;
  }
  
  .auth-card {
    margin: 0 1rem;
    border-radius: 16px;
  }
  
  .auth-card .card-header,
  .auth-card .card-body {
    padding: 1.5rem 1.25rem;
  }
  
  .auth-brand {
    font-size: 1.1rem;
  }
  
  .auth-brand i {
    font-size: 1rem;
  }
  
  .dark-mode .auth-card {
    margin: 0 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  
  .dark-mode .auth-card .card-header,
  .dark-mode .auth-card .card-body {
    padding: 1.5rem 1.25rem;
  }
  
  /* Mobile pricing pages */
  .pricing-page {
    padding: 1rem 0;
  }
  
  .pricing-card {
    margin-bottom: 1.5rem;
    border-radius: 16px;
  }
  
  .pricing-card .card-header {
    padding: 1.5rem 1.25rem;
  }
  
  .pricing-card .card-body {
    padding: 1.25rem;
  }
  
  .pricing-card .card-footer {
    padding: 1.25rem;
  }
  
  .pricing-card .plan-name {
    font-size: 1.5rem;
  }
  
  .pricing-card .price .amount {
    font-size: 2.5rem;
  }
  
  .features-list li {
    padding: 0.75rem 0;
    font-size: 0.9rem;
  }
  
  .dark-mode .pricing-card {
    margin-bottom: 1.5rem;
  }
  
  .dark-mode .main-content {
    padding: 0.75rem;
  }
  
  /* Mobile security badges */
  .security-badges {
    padding: 1.5rem 1rem !important;
  }
  
  .security-badge {
    padding: 1rem 0.75rem !important;
    min-width: 100px !important;
  }
  
  .security-badge i {
    font-size: 1.5rem !important;
  }
  
  .security-badge small {
    font-size: 0.8rem !important;
  }
  
  /* Mobile notifications */
  .notification-container {
    padding: 0 1rem;
  }
  
  .notification {
    margin-top: 0.75rem;
    min-width: 280px;
    max-width: calc(100vw - 2rem);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .notification-icon {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
  
  .notification-close {
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }
  
  /* Mobile footer */
  .footer {
    padding: 1.5rem 0;
  }
  
  .footer .row {
    text-align: center;
  }
  
  .footer .row > div {
    margin-bottom: 1rem;
  }
  
  .footer .nav {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .social-links .social-icon {
    width: 36px;
    height: 36px;
    margin: 0 0.25rem;
  }
  
  /* Mobile subscription pages */
  .subscription-status-card {
    margin-bottom: 1rem;
  }
  
  .subscription-status-card .status-title {
    font-size: 1.1rem;
  }
  
  .subscription-status-card .status-description {
    font-size: 0.9rem;
  }
  
  /* Mobile videos and analytics pages */
  .video-card {
    margin-bottom: 1rem;
  }
  
  .video-title {
    font-size: 0.9rem;
    line-height: 1.3;
  }
  
  .video-stats {
    font-size: 0.8rem;
  }
  
  /* Mobile form improvements */
  .form-control {
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  .btn {
    min-height: 44px; /* iOS touch target */
  }
  
  /* Mobile chart responsiveness */
  .chart-container {
    position: relative;
    height: 250px !important;
    margin-bottom: 1rem;
  }
  
  /* Mobile table responsiveness */
  .table-responsive {
    border: none;
  }
  
  .table {
    font-size: 0.9rem;
  }
  
  /* Mobile accordion improvements */
  .accordion-button {
    padding: 1rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .accordion-body {
    padding: 1rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* Dark Mode - Security & Trust Section (for billing page) */
.dark-mode .pricing-page .text-center.mt-5 {
  color: #e2e8f0;
}

.dark-mode .pricing-page .text-center.mt-5 h3 {
  color: #f8fafc;
}

.dark-mode .pricing-page .text-center.mt-5 p {
  color: #cbd5e1;
}

/* Dark Mode - Compliance Badges */
.dark-mode .compliance-badge {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
}

.dark-mode .compliance-badge:hover {
  border-color: #60a5fa;
  transform: translateY(-2px);
}

/* Dark Mode - Trust Indicators */
.dark-mode .trust-indicator {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
}

.dark-mode .trust-indicator i {
  color: #60a5fa;
}

/* Dark Mode - Feature Icons Enhancement */
.dark-mode .pricing-card .features-list i {
  text-shadow: 0 0 4px rgba(52, 211, 153, 0.5);
}

/* Dark Mode - CTA Section */
.dark-mode .pricing-page .bg-primary {
  background: linear-gradient(135deg, #1e40af 0%, #6366f1 100%) !important;
}

.dark-mode .pricing-page .bg-primary h2,
.dark-mode .pricing-page .bg-primary p {
  color: #ffffff;
}

/* Dark Mode - Security Badges Section (Pricing Page) */
.dark-mode .security-badges {
  background: rgba(30, 41, 59, 0.8) !important;
  border-radius: 12px !important;
  padding: 2rem !important;
  border: 1px solid #334155 !important;
  backdrop-filter: blur(10px) !important;
}

.dark-mode .security-badges h4 {
  color: #f8fafc !important;
  margin-bottom: 1.5rem !important;
}

.dark-mode .security-badge {
  background: rgba(51, 65, 85, 0.8) !important;
  color: #f8fafc !important;
  padding: 1.25rem 1rem !important;
  border-radius: 10px !important;
  border: 1px solid #475569 !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(5px) !important;
  text-align: center !important;
  min-width: 120px !important;
}

.dark-mode .security-badge:hover {
  background: rgba(71, 85, 105, 0.9) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
  border-color: #60a5fa !important;
}

.dark-mode .security-badge i {
  color: #60a5fa !important;
  margin-bottom: 0.75rem !important;
  display: block !important;
}

.dark-mode .security-badge small {
  color: #e2e8f0 !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
}

/* Mobile Sidebar Enhancements */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -85%;
    width: 85%;
    height: 100vh;
    z-index: 1040;
    backdrop-filter: blur(10px);
    background: rgba(248, 249, 250, 0.95) !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(0);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease-in-out;
  }

  .sidebar.show {
    left: 0;
  }

  /* Make sidebar content take up available space */
  .sidebar .sidebar-sticky {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .sidebar .nav {
    flex: 1;
  }

  /* Mobile sidebar bottom section */
  .mobile-sidebar-bottom {
    padding: 20px 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  /* Mobile Connection Status */
  .mobile-connection-status {
    text-align: center;
  }

  .mobile-connection-status .connection-status {
    display: inline-flex;
    align-items: center;
  }

  .mobile-connection-status .connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #28a745;
    display: inline-block;
    animation: pulse 2s infinite;
  }

  .mobile-connection-status .connection-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
  }

  /* Mobile Theme Toggle */
  .mobile-theme-section {
    text-align: center;
    padding: 10px 0;
  }

  .mobile-theme-section .form-check {
    display: inline-flex;
    align-items: center;
    margin: 0;
  }

  .mobile-theme-section .form-check-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
  }

  /* Mobile User Section */
  .mobile-user-section {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 15px;
  }

  .mobile-user-header {
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
  }

  .mobile-user-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }

  .mobile-user-header .user-avatar i {
    color: #6c757d;
  }

  .mobile-user-header .user-email {
    font-weight: 500;
    font-size: 0.9rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }

  .mobile-user-header .user-role {
    font-size: 0.8rem;
  }

  .mobile-user-header .dropdown-arrow {
    transition: transform 0.2s ease;
  }

  .mobile-user-header[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
  }

  /* Mobile Dropdown Content */
  .mobile-user-dropdown {
    margin-top: 10px;
  }

  .mobile-dropdown-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
  }

  .mobile-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #212529;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
  }

  .mobile-dropdown-item:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #0056b3;
  }

  .mobile-dropdown-item i {
    width: 20px;
    text-align: center;
  }

  .mobile-dropdown-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 8px 0;
  }

  .sign-out-btn {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    padding-top: 12px;
  }

  .sign-out-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
  }

  /* Dark mode mobile sidebar */
  [data-theme="dark"] .sidebar {
    background: rgba(52, 58, 64, 0.95) !important;
    color: #e9ecef;
  }

  [data-theme="dark"] .mobile-sidebar-bottom {
    border-top-color: rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
  }

  [data-theme="dark"] .mobile-connection-status .connection-label {
    color: #adb5bd;
  }

  [data-theme="dark"] .mobile-theme-section .form-check-label {
    color: #adb5bd;
  }

  [data-theme="dark"] .mobile-user-section {
    border-top-color: rgba(255, 255, 255, 0.1);
  }

  [data-theme="dark"] .mobile-user-header:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  [data-theme="dark"] .mobile-user-header .user-avatar i {
    color: #adb5bd;
  }

  [data-theme="dark"] .mobile-user-header .user-email {
    color: #e9ecef;
  }

  [data-theme="dark"] .mobile-dropdown-content {
    background: rgba(33, 37, 41, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }

  [data-theme="dark"] .mobile-dropdown-item {
    color: #e9ecef;
  }

  [data-theme="dark"] .mobile-dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.2);
    color: #66b3ff;
  }

  [data-theme="dark"] .mobile-dropdown-divider {
    background-color: rgba(255, 255, 255, 0.1);
  }

  [data-theme="dark"] .sign-out-btn {
    border-top-color: rgba(255, 255, 255, 0.1);
  }

  [data-theme="dark"] .sign-out-btn:hover {
    background-color: rgba(220, 53, 69, 0.2);
    color: #ff6b7a;
  }
}