/* ==========================================================================
   GospeMov Design System & Global Styles
   Aesthetics: Premium Spiritual Glassmorphism, Dark Theme & Dynamic Transitions
   ========================================================================== */

/* Theme Variables */
:root {
  --font-title: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Dark Theme Palette (Default) */
  --bg-color: #08060c;
  --bg-gradient: radial-gradient(circle at top right, #160f29 0%, #08060c 100%);
  --surface-color: #120d20;
  --surface-glass: rgba(21, 16, 38, 0.7);
  --surface-hover: rgba(139, 92, 246, 0.12);
  --border-color: rgba(139, 92, 246, 0.15);
  
  --primary-color: #8b5cf6; /* Spiritual Violet */
  --primary-glow: rgba(139, 92, 246, 0.4);
  --secondary-color: #06b6d4; /* Neon Blue */
  --accent-color: #ec4899; /* Pink */
  
  --text-main: #f3e8ff;
  --text-sub: #a78bfa;
  --text-muted: #6d5b97;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --glass-blur: blur(16px);
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 240px;
}

/* Kids Theme Palette (Cheerful, Bright, Pastel) */
body.kids-theme {
  --bg-color: #f5f0fa;
  --bg-gradient: linear-gradient(135deg, #e0f2fe 0%, #f5f0fa 50%, #fae8ff 100%);
  --surface-color: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.8);
  --surface-hover: rgba(236, 72, 153, 0.08);
  --border-color: rgba(236, 72, 153, 0.15);
  
  --primary-color: #db2777; /* Playful Pink */
  --primary-glow: rgba(219, 39, 119, 0.3);
  --secondary-color: #0ea5e9; /* Sky Blue */
  --accent-color: #f59e0b; /* Sunny Yellow */
  
  --text-main: #1e1b4b; /* Deep Indigo */
  --text-sub: #6366f1;
  --text-muted: #94a3b8;
  --shadow-color: rgba(99, 102, 241, 0.15);
  --glass-blur: blur(12px);
  --border-radius-lg: 24px; /* More rounded */
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
}

/* General Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.5s ease, color 0.3s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Typography links */
a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

/* Icon Buttons standard */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background: transparent;
  transition: var(--transition);
  font-size: 1.1rem;
}
.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--primary-color);
}

/* Action Buttons (Premium pill style) */
.action-btn {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
}
.action-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px var(--primary-glow);
  transform: translateY(-2px);
  color: #fff;
}

.text-btn {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.text-btn:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* Verified Badge style */
.verified-badge {
  color: var(--secondary-color);
  font-size: 0.8rem;
  margin-left: 4px;
  vertical-align: middle;
}
body.kids-theme .verified-badge {
  color: var(--primary-color);
}

/* Helper hidden class */
.hidden {
  display: none !important;
}

/* ==========================================================================
   HEADER STYLING
   ========================================================================== */
.header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

/* Logo styling */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(45deg, var(--text-main) 30%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition);
}
.logo-icon-wrapper {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  width: 32px;
  height: 24px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--primary-glow);
  transition: var(--transition);
}
.logo-icon-wrapper i {
  color: #fff;
  font-size: 0.75rem;
  -webkit-text-fill-color: #fff;
  transform: translateX(1px);
}
.logo:hover .logo-icon-wrapper {
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--primary-color);
}

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

/* Center Search Container styling exactly like YouTube */
.header-center {
  flex: 0 1 728px;
  display: flex;
  align-items: center;
}
.search-container {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
}
.search-form {
  display: flex;
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 40px;
  overflow: hidden;
  transition: var(--transition);
}
.search-form:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-glow);
}
.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 20px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
}
.search-form input::placeholder {
  color: var(--text-muted);
}
.search-btn {
  background: var(--surface-hover);
  border-left: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0 20px;
  transition: var(--transition);
}
.search-btn:hover {
  background: var(--primary-color);
  color: #fff;
}
.mic-btn {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
}

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

/* Kids Mode Toggle Pill */
.kids-mode-toggle {
  background: linear-gradient(135deg, #f59e0b 0%, #db2777 100%);
  color: #fff;
  border-radius: 40px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(219, 39, 119, 0.4);
  transition: var(--transition);
}
.kids-mode-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 15px rgba(219, 39, 119, 0.6);
}
body.kids-theme .kids-mode-toggle {
  background: linear-gradient(135deg, #0ea5e9 0%, #10b981 100%);
}

.bell-btn {
  position: relative;
}
.bell-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Profile Picture Button */
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid var(--border-color);
  transition: var(--transition);
}
.user-avatar:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

/* Dropdowns layout (Glassmorphism containers) */
.notification-dropdown,
.profile-dropdown {
  position: absolute;
  top: 50px;
  right: 16px;
  width: 320px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px var(--shadow-color);
  backdrop-filter: var(--glass-blur);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 120;
}
.notification-dropdown.show,
.profile-dropdown.show {
  display: flex;
  animation: dropFade 0.25s ease-out;
}

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

/* Notification details */
.dropdown-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}
.dropdown-header h3 {
  font-size: 1rem;
}
.dropdown-list {
  max-height: 360px;
  overflow-y: auto;
}
.notification-item {
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  font-size: 0.85rem;
}
.notification-item:hover {
  background: var(--surface-hover);
}
.notification-item.unread {
  background: rgba(139, 92, 246, 0.06);
}
.notif-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.notif-content {
  flex: 1;
}
.notif-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 4px;
  display: block;
}

/* Profile details */
.dropdown-profile-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-dropdown-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}
.profile-meta h4 {
  font-size: 0.95rem;
  font-weight: 600;
}
.profile-meta p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.dropdown-divider {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 0;
}
.dropdown-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: var(--transition);
  width: 100%;
  text-align: left;
}
.dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--primary-color);
}
.dropdown-item i {
  width: 18px;
  color: var(--text-muted);
}
.dropdown-item:hover i {
  color: var(--primary-color);
}

/* ==========================================================================
   APP SIDEBAR STYLING
   ========================================================================== */
.app-container {
  display: flex;
  flex: 1;
  margin-top: 56px;
  position: relative;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--surface-glass);
  border-right: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  padding: 12px 0;
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 90;
  transition: var(--transition);
}

/* Collapsed Sidebar overrides */
.sidebar.collapsed {
  width: 72px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  padding: 0 12px;
}

.sidebar-header {
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.sidebar.collapsed .sidebar-header {
  display: none;
}

.sidebar-link {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
  margin-bottom: 4px;
}
.sidebar-link:hover {
  background: var(--surface-hover);
  color: var(--primary-color);
}
.sidebar-link.active {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.sidebar-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}
.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 0;
  gap: 0;
}
.sidebar.collapsed .sidebar-link span {
  display: none;
}

.sidebar-divider {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 12px 12px;
}
.sidebar.collapsed .sidebar-divider {
  margin: 12px 8px;
}

/* Subscriptions custom list */
.subscription-channel-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 12px;
  border-radius: var(--border-radius-md);
  margin-bottom: 2px;
  transition: var(--transition);
  font-size: 0.85rem;
}
.subscription-channel-item:hover {
  background: var(--surface-hover);
}
.sub-chan-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.sub-chan-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-indicator-dot {
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
}
.sidebar.collapsed .subscription-channel-item {
  justify-content: center;
  padding: 6px 0;
}
.sidebar.collapsed .sub-chan-avatar {
  width: 32px;
  height: 32px;
}
.sidebar.collapsed .sub-chan-name,
.sidebar.collapsed .live-indicator-dot {
  display: none;
}

/* ==========================================================================
   CONTENT AREA & SPA PAGES
   ========================================================================== */
.content-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 24px;
  min-height: calc(100vh - 56px);
  transition: var(--transition);
}
.sidebar.collapsed + .content-area {
  margin-left: 72px;
}

/* Page Views structure */
.page-view {
  display: none;
  animation: pageFade 0.4s ease-out;
}
.page-view.active {
  display: block;
}

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

/* Tag/Chip Scroll Bar */
.chips-container {
  overflow: hidden;
  margin-bottom: 24px;
  position: sticky;
  top: 56px;
  z-index: 80;
  background: var(--bg-color);
  padding: 8px 0;
  margin-top: -8px;
}
.chips-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 10px;
}
.chips-scroll::-webkit-scrollbar {
  display: none; /* Hide scrollbar completely */
}
.chip {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}
.chip:hover {
  background: var(--surface-hover);
  border-color: var(--primary-color);
}
.chip.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* ==========================================================================
   VIDEO GRID & CARDS
   ========================================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Video Card components */
.video-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.video-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px var(--primary-glow);
}

/* Thumbnail wrapper */
.card-thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}
.card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.video-card:hover .card-thumbnail {
  transform: scale(1.05);
}
.card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Card details bottom row */
.card-details {
  display: flex;
  gap: 12px;
  padding: 12px 16px 16px 16px;
}
.card-channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--border-color);
}
.card-meta-text {
  flex: 1;
}
.card-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em; /* Limits title height strictly */
}
.card-channel-name {
  font-size: 0.8rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  margin-bottom: 3px;
  transition: var(--transition);
}
.card-channel-name:hover {
  color: var(--primary-color);
}
.card-stats {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Skeleton Loading styles */
.skeleton-card {
  border-color: var(--border-color);
}
.skeleton-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(90deg, var(--surface-color) 25%, var(--border-color) 50%, var(--surface-color) 75%);
  background-size: 200% 100%;
  animation: pulseSk 1.5s infinite;
}
.skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-color);
  animation: pulseSk 1.5s infinite;
}
.skeleton-line {
  height: 12px;
  background: var(--surface-color);
  border-radius: 4px;
  margin-bottom: 8px;
  animation: pulseSk 1.5s infinite;
}
.skeleton-line.title-line { width: 85%; }
.skeleton-line.meta-line { width: 60%; height: 10px; }

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

/* ==========================================================================
   VIDEO PLAYER LAYOUT
   ========================================================================== */
.player-layout {
  display: flex;
  gap: 24px;
}
.player-main-col {
  flex: 1;
  min-width: 0; /* Prevents overflow */
}
.player-sidebar-col {
  width: 400px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-shrink: 0;
}

/* Custom Player elements */
.video-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.video-player-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
}

/* Controls overlay wrapper */
.player-controls-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.5) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}
.video-player-wrapper:hover .player-controls-overlay {
  opacity: 1;
}

/* Big Play indicator in center on clicks */
.center-play-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 1.5px solid var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.center-play-indicator.animate {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
  animation: zoomFade 0.8s ease forwards;
}

@keyframes zoomFade {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

.controls-bar {
  padding: 0 16px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Progress Timeline styling */
.progress-timeline-container {
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.timeline {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
  transition: height 0.1s ease;
}
.progress-timeline-container:hover .timeline {
  height: 6px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary-color);
  border-radius: 2px;
  position: absolute;
  top: 0;
  left: 0;
}
.progress-handle {
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.1s ease;
}
.progress-timeline-container:hover .progress-handle {
  transform: translate(-50%, -50%) scale(1);
}

.controls-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.left-controls, .right-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.control-btn {
  color: #fff;
  font-size: 1.1rem;
  transition: var(--transition);
  opacity: 0.85;
}
.control-btn:hover {
  opacity: 1;
  color: var(--primary-color);
  transform: scale(1.1);
}

/* Time counter */
.video-time-display {
  color: #eee;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Volume Slider */
.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.volume-slider {
  width: 0px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  outline: none;
  border-radius: 2px;
  transition: width 0.2s ease;
  -webkit-appearance: none;
  cursor: pointer;
}
.volume-container:hover .volume-slider {
  width: 60px;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

/* Playback Speed Settings Menu overlay */
.player-settings-wrapper {
  position: relative;
}
.player-settings-popover {
  position: absolute;
  bottom: 40px;
  right: 0;
  width: 160px;
  background: rgba(18, 13, 32, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 8px 0;
  display: none;
  flex-direction: column;
  backdrop-filter: var(--glass-blur);
  z-index: 20;
}
.player-settings-popover.show {
  display: flex;
}
.setting-row {
  padding: 8px 12px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}
.setting-row:hover {
  background: var(--surface-hover);
}
.speed-options {
  display: none;
  flex-direction: column;
}
.speed-options.show {
  display: flex;
}
.speed-opt {
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}
.speed-opt:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Theater Mode Class modifications dynamically in JS */
.theater-mode .player-layout {
  flex-direction: column;
}
.theater-mode .player-main-col {
  width: 100%;
}
.theater-mode .video-player-wrapper {
  max-height: 80vh;
}
.theater-mode .player-sidebar-col {
  width: 100%;
  flex-direction: row;
}
.theater-mode .player-sidebar-col > * {
  flex: 1;
}

/* Video info section */
.player-video-meta {
  margin-top: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}
.player-video-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}
.player-video-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.player-views-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.player-actions {
  display: flex;
  gap: 8px;
}

/* Subscriber action row */
.player-channel-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}
.channel-info-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}
.channel-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}
.channel-name-subs h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}
.channel-name-subs span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.subscribe-btn {
  background: #fff;
  color: #000;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}
.subscribe-btn:hover {
  background: var(--surface-hover);
  color: var(--primary-color);
  transform: translateY(-2px);
}
.subscribe-btn.subscribed {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
}

/* Video Description Box styling */
.player-description-box {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
}
.desc-content {
  overflow: hidden;
  max-height: 60px; /* Collapsed height */
  transition: max-height 0.3s ease;
  white-space: pre-line;
}
.player-description-box.expanded .desc-content {
  max-height: 1000px;
}
.toggle-desc-btn {
  margin-top: 10px;
}

/* Comments Section layout */
.comments-section h2 {
  font-size: 1.15rem;
  margin-bottom: 20px;
}
.add-comment-wrapper {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.comment-form {
  flex: 1;
}
.comment-form input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  color: var(--text-main);
  outline: none;
  font-size: 0.9rem;
}
.comment-form input:focus {
  border-color: var(--primary-color);
}
.comment-form-actions {
  display: none;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}
.comment-form-actions.show {
  display: flex;
}
.cancel-comment-btn {
  color: var(--text-main);
  font-size: 0.85rem;
  padding: 6px 12px;
}
.submit-comment-btn {
  background: var(--primary-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
.submit-comment-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Comments feed listing */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.comment-item {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
}
.comment-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.comment-body h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.comment-body h4 span {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 8px;
}
.comment-text {
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 8px;
}
.comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.comment-actions button {
  color: inherit;
  transition: var(--transition);
}
.comment-actions button:hover {
  color: var(--primary-color);
}

/* Sidebar Up Next listing */
.up-next-section h3 {
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.up-next-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-video-card {
  display: flex;
  gap: 12px;
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  height: 94px;
  transition: var(--transition);
}
.sidebar-video-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px var(--primary-glow);
  transform: translateY(-2px);
}
.side-thumb-wrapper {
  position: relative;
  width: 140px;
  flex-shrink: 0;
}
.side-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-details {
  flex: 1;
  padding: 8px;
  min-width: 0; /* Key for ellipsis */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.side-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em;
}
.side-channel {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-bottom: 2px;
}
.side-views {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SIMULATED LIVE CHAT SIDEBAR
   ========================================================================== */
.live-chat-panel {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}
.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header h3 {
  font-size: 0.95rem;
}
.live-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  animation: pulseLive 1.5s infinite;
}
@keyframes pulseLive {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  animation: chatSlideIn 0.3s ease-out;
}
@keyframes chatSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}
.chat-txt-wrap {
  flex: 1;
}
.chat-username {
  font-weight: 700;
  color: var(--text-sub);
  margin-right: 6px;
}
.chat-text {
  color: var(--text-main);
  word-break: break-word;
}
/* Highlighted Super Chats styling */
.chat-msg.super-chat {
  background: rgba(236, 72, 153, 0.15);
  border-left: 3px solid var(--accent-color);
  padding: 8px;
  border-radius: var(--border-radius-sm);
}
.chat-msg.super-chat .chat-username {
  color: var(--accent-color);
}

.chat-input-form {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
}
.chat-input-form input {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-main);
  outline: none;
  font-size: 0.85rem;
}
.chat-input-form input:focus {
  border-color: var(--primary-color);
}
.chat-send-btn {
  background: var(--primary-color);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   YOUTUBE SHORTS FEED
   ========================================================================== */
#page-shorts {
  display: none;
  height: calc(100vh - 100px);
  position: relative;
  align-items: center;
  justify-content: center;
}
#page-shorts.active {
  display: flex;
}
.shorts-container {
  width: 380px;
  height: 100%;
  max-height: 640px;
  background: #000;
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

/* Single vertical Short card */
.short-slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  transform: translateY(100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.short-slide.active {
  opacity: 1;
  transform: translateY(0);
  z-index: 10;
}
.short-slide.prev {
  transform: translateY(-100%);
}
.short-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Short details overlayed */
.short-overlay-details {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 70px 24px 20px; /* Leave space right for buttons */
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  z-index: 12;
  pointer-events: none;
}
.short-creator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.short-creator-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #fff;
}
.short-creator-name {
  font-weight: 700;
  font-size: 0.9rem;
}
.short-title {
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 12px;
  pointer-events: auto;
}
.short-soundtrack {
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
}

/* Right side action column */
.short-action-column {
  position: absolute;
  right: 12px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 15;
}
.short-act-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
}
.short-act-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  margin-bottom: 4px;
}
.short-act-circle:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.1);
}
.short-act-btn span {
  font-size: 0.72rem;
  font-weight: 600;
}
.short-audio-disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #222 30%, #000 100%);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rotateDisc 4s linear infinite;
  margin-top: 10px;
}
.short-audio-disc img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}
@keyframes rotateDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Up/Down Floating Nav Buttons */
.shorts-nav-arrows {
  position: absolute;
  right: calc(50% - 240px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 20;
}
.shorts-nav-arrows button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: var(--transition);
}
.shorts-nav-arrows button:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* ==========================================================================
   CREATOR DASHBOARD & OTHER SPA PAGES
   ========================================================================== */
.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

/* Creator stats cards */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
}
.stat-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 2.2rem;
  color: var(--primary-glow);
  opacity: 0.35;
}
.stat-info h3 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.stat-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.stat-trend {
  font-size: 0.75rem;
  margin-top: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.stat-trend.positive {
  color: #10b981;
}

/* Content List Table */
.dashboard-videos-table-wrapper {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  overflow-x: auto;
}
.dashboard-videos-table-wrapper h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.dashboard-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
}
.dashboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.dashboard-table tr:hover {
  background: var(--surface-hover);
}
.dash-video-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-video-thumb {
  width: 80px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}
.dash-video-title {
  font-weight: 600;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-actions {
  display: flex;
  gap: 8px;
}
.dash-btn {
  padding: 6px;
  font-size: 0.9rem;
  color: var(--text-sub);
  transition: var(--transition);
}
.dash-btn.edit:hover {
  color: var(--secondary-color);
}
.dash-btn.delete:hover {
  color: #ef4444;
}

/* Search results listing layout */
.search-results-header {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.search-video-row {
  display: flex;
  gap: 20px;
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.search-video-row:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 20px var(--primary-glow);
  transform: translateX(4px);
}
.search-thumb-col {
  width: 280px;
  aspect-ratio: 16/9;
  position: relative;
  flex-shrink: 0;
  background: #000;
}
.search-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-details-col {
  flex: 1;
  padding: 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.search-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-views {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.search-channel-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.search-chan-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.search-chan-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
}
.search-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Library layout specific */
.library-layout {
  display: flex;
  gap: 24px;
}
.library-sections-col {
  flex: 1;
}
.library-channel-sidebar {
  width: 320px;
  flex-shrink: 0;
}
.user-channel-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.user-channel-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  margin-bottom: 16px;
}
.user-channel-card h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}
.user-channel-card .sub-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.channel-stats {
  display: flex;
  width: 100%;
  justify-content: space-around;
  margin-bottom: 24px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-val {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.1rem;
}
.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.dashboard-link-btn {
  width: 100%;
  justify-content: center;
}

.video-grid-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   MODALS (Upload Screen overlay)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show {
  display: flex;
}
.modal-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalScale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 {
  font-size: 1.2rem;
  font-family: var(--font-title);
}

.upload-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  outline: none;
  font-size: 0.9rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-glow);
}
.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-top: 8px;
}
.checkbox-group label {
  cursor: pointer;
  font-weight: 500;
}

.form-files-upload {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.file-uploader {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: var(--transition);
}
.file-uploader:hover {
  border-color: var(--primary-color);
  background: var(--surface-hover);
}
.upload-icon {
  font-size: 2.2rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.file-uploader p {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.file-spec {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.selected-file-label {
  font-size: 0.75rem;
  color: var(--secondary-color);
  margin-top: 10px;
  font-weight: 600;
}

/* Upload Progress indicator styling */
.upload-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}
.progress-bar-wrapper {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.1s ease;
}
.upload-progress-container span {
  font-size: 0.78rem;
  font-weight: 600;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.cancel-modal-btn {
  padding: 10px 20px;
  border-radius: 50px;
  color: var(--text-main);
  font-weight: 600;
}
.cancel-modal-btn:hover {
  background: var(--surface-hover);
}

/* ==========================================================================
   MOBILE BOTTOM NAV BAR STYLING
   ========================================================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: 95;
  backdrop-filter: var(--glass-blur);
}
.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  transition: var(--transition);
}
.mobile-nav-link i {
  font-size: 1.15rem;
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary-color);
}

/* ==========================================================================
   KIDS MODE PAGE OVERRIDES (BODY.KIDS-THEME)
   ========================================================================== */
body.kids-theme {
  font-family: var(--font-body);
}
body.kids-theme .video-card {
  border-width: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}
body.kids-theme .video-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px var(--primary-glow);
}
body.kids-theme .chip.active {
  background: var(--primary-color);
  box-shadow: 0 4px 15px rgba(219, 39, 119, 0.4);
}
body.kids-theme .action-btn:hover {
  box-shadow: 0 4px 15px rgba(219, 39, 119, 0.4);
}
body.kids-theme .sidebar-link.active {
  background: var(--primary-color);
  box-shadow: 0 4px 15px rgba(219, 39, 119, 0.4);
}

/* ==========================================================================
   YOUTUBE STUDIO REPLICA STYLING
   ========================================================================== */
.studio-layout {
  display: flex;
  min-height: calc(100vh - 100px);
  background: var(--bg-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Studio Left Menu */
.studio-sidebar {
  width: 240px;
  background: var(--surface-color);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  flex-shrink: 0;
}
.studio-channel-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px 20px 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.studio-brand-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  margin-bottom: 12px;
}
.studio-channel-brand h4 {
  font-size: 0.95rem;
  font-weight: 700;
}
.studio-channel-brand p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.studio-nav {
  display: flex;
  flex-direction: column;
  padding: 0 12px;
  gap: 4px;
}
.studio-menu-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
  width: 100%;
  text-align: left;
}
.studio-menu-btn:hover {
  background: var(--surface-hover);
  color: var(--primary-color);
}
.studio-menu-btn.active {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.studio-menu-btn i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Studio Main Panel & Tabs */
.studio-main-panel {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  min-width: 0;
}
.studio-tab-view {
  display: none;
  animation: tabFade 0.3s ease-out;
}
.studio-tab-view.active {
  display: block;
}
@keyframes tabFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.studio-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* Studio cards styling */
.studio-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
.studio-card h3 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}
.studio-card-divider {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 16px 0;
}

/* Studio Dashboard tab */
.studio-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.perf-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.88rem;
}
.perf-row:last-child {
  border-bottom: none;
}
.perf-row .lbl {
  color: var(--text-sub);
}
.perf-row .val {
  font-weight: 700;
}
.stat-block {
  display: flex;
  flex-direction: column;
}
.stat-block .lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.stat-block .num {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 4px 0;
}
.stat-block .trend {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Content & Tables */
.studio-table-container {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow-x: auto;
  backdrop-filter: var(--glass-blur);
}
.studio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.studio-table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
}
.studio-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.studio-table tr:hover {
  background: var(--surface-hover);
}

.badge-visibility {
  background: rgba(6, 182, 212, 0.15);
  color: var(--secondary-color);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-restriction {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-restriction.none {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.badge-restriction.claim {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Analytics Tab custom views */
.analytics-sparks-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.spark-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.spark-card:hover {
  border-color: var(--primary-color);
}
.spark-card.active {
  border-color: var(--primary-color);
  background: var(--surface-hover);
  box-shadow: 0 4px 15px var(--primary-glow);
}
.spark-card .lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.spark-card .val {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
}

.chart-container-card {
  padding: 20px;
}
.chart-container-card canvas {
  width: 100% !important;
  max-height: 200px;
  margin-top: 16px;
}
.chart-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
}

/* Comments moderations */
.comments-filter-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.filter-tab {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.filter-tab:hover {
  color: var(--primary-color);
}
.filter-tab.active {
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.filter-tab .badge {
  background: var(--accent-color);
  color: #fff;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 6px;
}

.studio-comments-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.studio-comment-row {
  display: flex;
  gap: 16px;
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  backdrop-filter: var(--glass-blur);
}
.studio-comment-meta h4 {
  font-size: 0.85rem;
  font-weight: 700;
}
.studio-comment-meta h4 span {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 8px;
}
.comment-context-video {
  font-size: 0.78rem;
  color: var(--text-sub);
  margin-bottom: 6px;
  display: block;
}
.studio-comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.mod-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: var(--transition);
}
.mod-btn.approve:hover {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.mod-btn.discard:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* Copyright tab strikes layout */
.strikes-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.strikes-info .count {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ef4444;
}
.strikes-info .label {
  font-size: 0.85rem;
  color: var(--text-sub);
  max-width: 250px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1200px) {
  .sidebar {
    width: 72px;
  }
  .sidebar .sidebar-header,
  .sidebar .sidebar-link span,
  .sidebar .sidebar-divider + .sidebar-section .sidebar-header,
  .sidebar .sub-chan-name,
  .sidebar .live-indicator-dot {
    display: none;
  }
  .sidebar .sidebar-link {
    justify-content: center;
    padding: 0;
    gap: 0;
  }
  .sidebar .subscription-channel-item {
    justify-content: center;
    padding: 6px 0;
  }
  .sidebar .sub-chan-avatar {
    width: 32px;
    height: 32px;
  }
  .content-area {
    margin-left: 72px;
  }
  .sidebar.collapsed {
    transform: translateX(-72px);
  }
  .sidebar.collapsed + .content-area {
    margin-left: 0;
  }
}

@media (max-width: 992px) {
  .player-layout {
    flex-direction: column;
  }
  .player-sidebar-col {
    width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .studio-layout {
    flex-direction: column;
  }
  .studio-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .studio-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 16px;
    padding-bottom: 8px;
  }
  .studio-menu-btn {
    width: auto;
    white-space: nowrap;
  }
  .analytics-sparks-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-center {
    display: none;
  }
  .sidebar {
    display: none;
  }
  .content-area {
    margin-left: 0 !important;
    padding: 16px;
    padding-bottom: 72px;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }
  .shorts-container {
    width: 100%;
    height: calc(100vh - 120px);
    border-radius: 0;
    border: none;
  }
  .shorts-nav-arrows {
    display: none;
  }
  .kids-mode-toggle span {
    display: none;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
  .player-actions {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 8px;
  }
}

/* ==========================================================================
   ADVANCED EXTRA SYSTEMS STYLING
   ========================================================================== */

/* 1. Floating Miniplayer Container */
.miniplayer-container {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 320px;
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px var(--primary-glow);
  overflow: hidden;
  z-index: 500;
  display: flex;
  flex-direction: column;
  animation: slideUpMin 0.3s ease-out;
}
@keyframes slideUpMin {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.miniplayer-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}
.miniplayer-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.miniplayer-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
  z-index: 12;
}
.min-ctrl {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition);
}
.min-ctrl:hover {
  background: var(--primary-color);
}
.miniplayer-details {
  padding: 10px 14px;
  background: rgba(15, 15, 26, 0.95);
}
.miniplayer-details h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.miniplayer-details p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 2. Timeline Chapters Splits */
.timeline-chapter-mark {
  position: absolute;
  top: 0;
  width: 3px;
  height: 100%;
  background: #0f0f1a;
  z-index: 8;
  pointer-events: none;
}
.timeline-chapter-tooltip {
  position: absolute;
  bottom: 25px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  display: none;
  z-index: 100;
  pointer-events: none;
}
.progress-timeline-container:hover .timeline-chapter-tooltip {
  display: block;
}

/* 3. Public Creator Channel Banner & Profile Layout */
.channel-banner-container {
  width: 100%;
  aspect-ratio: 6/1;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: var(--surface-color);
  margin-bottom: 20px;
}
.channel-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.channel-header-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.channel-avatar-view {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-color);
}
.channel-header-details {
  flex: 1;
}
.channel-header-details h1 {
  font-family: var(--font-title);
  font-size: 2rem;
  color: #fff;
}
.channel-header-details p {
  color: var(--text-muted);
  margin: 6px 0;
  font-size: 0.9rem;
}
.channel-header-desc {
  max-width: 600px;
  color: var(--text-sub) !important;
  font-size: 0.85rem !important;
  line-height: 1.4;
  margin-top: 10px !important;
}
.channel-tabs-container {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.channel-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.channel-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--primary-color);
}

/* Community Tab Feed */
.community-tab-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
}
.community-post-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
}
.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.post-meta h4 {
  font-size: 0.9rem;
  color: #fff;
}
.post-meta span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.post-content {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 12px;
}
.post-image {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  margin-bottom: 12px;
}

/* Community Interactive Polls */
.poll-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 15px;
  margin-top: 10px;
}
.poll-question {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.poll-option-row {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.poll-option-row:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-color);
}
.poll-option-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: rgba(139, 92, 246, 0.15);
  z-index: 1;
  transition: width 0.5s ease-out;
}
.poll-option-text, .poll-option-percentage {
  position: relative;
  z-index: 2;
  font-size: 0.85rem;
  font-weight: 500;
}
.poll-option-row.voted {
  border-color: var(--secondary-color);
}
.poll-option-row.voted .poll-option-fill {
  background: rgba(236, 72, 153, 0.25);
}
.poll-total-votes {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* 4. Earn Roster Circles & Indicators */
.req-circle {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 15px var(--primary-glow);
  position: relative;
  background: rgba(139, 92, 246, 0.05);
}
.earn-status-panel {
  max-width: 800px;
  margin: 0 auto;
}
.earn-requirements-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  text-align: center;
}
.earn-requirements-card h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.earn-apply-section button {
  width: 200px;
  padding: 12px;
  font-weight: bold;
}

/* 5. Studio Settings Panes */
.settings-pane {
  display: none;
  animation: fadeInPane 0.3s;
}
.settings-pane.active {
  display: block;
}
@keyframes fadeInPane {
  from { opacity: 0; }
  to { opacity: 1; }
}
.pending-transfer-card {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

/* Transfer banner alert top */
.transfer-alert-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
  animation: pulseAlert 2s infinite;
}
@keyframes pulseAlert {
  0% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.2); }
  50% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.2); }
}
.transfer-alert-banner .alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.transfer-alert-banner .alert-icon {
  font-size: 1.3rem;
  color: #ef4444;
}
.transfer-alert-banner .alert-actions {
  display: flex;
  gap: 10px;
}
.transfer-alert-banner .action-btn.approve {
  background: #10b981;
  border-color: #10b981;
}
.transfer-alert-banner .action-btn.reject {
  background: #ef4444;
  border-color: #ef4444;
}

/* Visibility status badges */
.badge-visibility.premium_only {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border: 1.5px solid rgba(139, 92, 246, 0.3);
}
.badge-visibility.scheduled {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1.5px solid rgba(245, 158, 11, 0.3);
}
.badge-visibility.private {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1.5px solid rgba(239, 68, 68, 0.25);
}

/* ==========================================
   ZIONGUARD ECOSYSTEM LAUNCHER COMPONENT Styles
   ========================================== */
.zg-app-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}
.zg-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin: 15px 0 !important;
}


