@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-primary: #0a0808;
  --bg-secondary: #120e0a;
  --bg-tertiary: #1b140e;
  --bg-card: rgba(22, 17, 13, 0.75);
  --bg-card-hover: rgba(32, 24, 18, 0.88);
  --bg-glass: rgba(18, 14, 10, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 85, 0, 0.35);
  
  --accent-primary: #ff5500;
  --accent-secondary: #ff9900;
  --accent-gradient: linear-gradient(135deg, #ff4500 0%, #ff9a00 100%);
  --accent-glow: rgba(255, 85, 0, 0.35);
  --accent-cyan: #ffaa00;
  --accent-live: #ef4444;
  --accent-live-glow: rgba(239, 68, 68, 0.5);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-glow: 0 0 25px rgba(255, 85, 0, 0.3);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, var(--accent-glow) 0%, transparent 45%),
    radial-gradient(circle at 85% 25%, var(--border-glow) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, var(--accent-glow) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #252e50;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Typography & General */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 700;
}

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

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(7, 9, 19, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  background: var(--accent-gradient);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  -webkit-text-fill-color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}
.nav-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 16px var(--border-glow);
  transform: translateY(-1px);
}

.nav-btn-primary {
  background: var(--accent-gradient);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.nav-btn-primary:hover {
  background: var(--accent-gradient);
  filter: brightness(1.12);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 20px var(--accent-glow);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-btn-text-full {
  display: inline;
}
.nav-btn-text-short {
  display: none;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  max-height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
  transition: all 0.25s ease;
}

/* Nav Modal Overlay */
.nav-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  animation: fadeIn 0.2s ease-out;
}
.nav-modal-card {
  position: relative;
  background: linear-gradient(135deg, rgba(28, 21, 17, 0.98) 0%, rgba(16, 12, 10, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px var(--border-glow);
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: auto;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hero Section */
.hero-container {
  padding: 2.5rem 2.5rem 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(28, 21, 17, 0.9) 0%, rgba(16, 12, 10, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  width: fit-content;
}

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

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  max-width: 850px;
}

.hero-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 650px;
  line-height: 1.6;
}

/* Search and Filters */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 500px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(18, 24, 46, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}
.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--border-glow);
  background: rgba(30, 22, 16, 0.95);
}

.categories-scroll {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.3rem 0;
  max-width: 100%;
  scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.category-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
}
.category-chip.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* Channel Grid */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.channel-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.channel-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow), 0 15px 35px -10px rgba(0, 0, 0, 0.7);
  background: var(--bg-card-hover);
}

.channel-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.channel-logo-img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
.channel-card:hover .channel-logo-img {
  transform: scale(1.08);
}

.channel-placeholder-icon {
  width: 48px;
  height: 48px;
  color: var(--accent-primary);
  opacity: 0.8;
}

.channel-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 19, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.channel-card:hover .channel-play-overlay {
  opacity: 1;
}

.play-circle-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(0.8);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.channel-card:hover .play-circle-btn {
  transform: scale(1);
}

.card-live-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(239, 68, 68, 0.85);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.channel-info {
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.channel-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.channel-category {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Watch / Player Page Layout */
.watch-container {
  display: flex;
  flex-direction: column;
  max-width: 1560px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  gap: 1.5rem;
}

.watch-main-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.75rem;
  align-items: start;
}
@media (max-width: 1080px) {
  .watch-main-grid {
    grid-template-columns: 1fr;
  }
}

.watch-player-column {
  display: flex;
  flex-direction: column;
}


.player-root {
  position: relative;
  width: 100%;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.2);
  border: 1px solid var(--border-subtle);
  transition: border-radius 0.2s ease;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.video-player-wrapper *,
.player-root,
.player-root * {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.video-player-wrapper *::selection,
.player-root *::selection,
.video-player-wrapper *::-moz-selection,
.player-root *::-moz-selection {
  background: transparent !important;
  color: inherit !important;
}

.central-play-button-disc {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.video-player-wrapper:hover .central-play-button-disc {
  transform: scale(1.1);
  border-color: var(--accent-secondary) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 35px var(--accent-glow), inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* Fullscreen Styles: Removes borders, radius, and covers 100% of display so Windows DWM hides taskbar */
.player-root:fullscreen,
.player-root:-webkit-full-screen,
.player-root:-moz-full-screen,
.player-root.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  background: #000 !important;
  z-index: 2147483647 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden !important;
}

.player-root:fullscreen .video-player-wrapper,
.player-root:-webkit-full-screen .video-player-wrapper,
.player-root:-moz-full-screen .video-player-wrapper,
.player-root.is-fullscreen .video-player-wrapper {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: #000 !important;
}

.player-root:fullscreen .video-element,
.player-root:-webkit-full-screen .video-element,
.player-root:-moz-full-screen .video-element,
.player-root.is-fullscreen .video-element,
video.video-element:fullscreen,
video.video-element:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  object-fit: contain !important;
  background: #000 !important;
}

/* Suppress all native browser progress bars and media controls */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-timeline,
video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display,
video::-webkit-media-controls-seek-back-button,
video::-webkit-media-controls-seek-forward-button,
video::-webkit-media-controls-fullscreen-button {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

video::-moz-media-controls {
  display: none !important;
}


/* Floating controls bar in fullscreen */
.player-root:fullscreen .player-controls-bar,
.player-root:-webkit-full-screen .player-controls-bar,
.player-root:-moz-full-screen .player-controls-bar,
.player-root.is-fullscreen .player-controls-bar {
  position: absolute !important;
  bottom: 1.5rem !important;
  left: 2rem !important;
  right: 2rem !important;
  margin-top: 0 !important;
  z-index: 50 !important;
  background: rgba(15, 23, 42, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7) !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.player-root.is-fullscreen.hide-controls .player-controls-bar,
.player-root:fullscreen.hide-controls .player-controls-bar {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(10px) !important;
}

.player-root.is-fullscreen.hide-controls,
.player-root:fullscreen.hide-controls {
  cursor: none !important;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay-loading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-main);
  z-index: 10;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.player-details-card {
  margin-top: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.channel-badge-large {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.channel-avatar {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid var(--border-subtle);
}
.channel-avatar img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Sidebar Channels List */
.sidebar-channels {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

@media (max-width: 1080px) {
  .sidebar-channels {
    height: 520px !important;
    max-height: 520px !important;
  }
}


.sidebar-header {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 0.5rem;
}

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-reload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.sidebar-reload-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translateY(-1px);
}

.sidebar-reload-btn:active {
  transform: translateY(0);
}

.sidebar-reload-btn.is-reloading {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}

.sidebar-reload-btn .spin-icon {
  animation: spin 0.75s linear infinite;
  color: var(--accent-primary);
}

.device-playlist-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.playlist-toast {
  position: absolute;
  top: 3.5rem;
  right: 1rem;
  left: 1rem;
  z-index: 30;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-glow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-glow);
  backdrop-filter: blur(12px);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: #fff;
  animation: fadeInDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.sidebar-channel-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-category-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scroll-behavior: smooth;
}
.sidebar-category-chips::-webkit-scrollbar {
  display: none;
}
.sidebar-category-chips.is-dragging {
  cursor: grabbing !important;
  scroll-behavior: auto !important;
}
.sidebar-category-chips.is-dragging .category-chip {
  cursor: grabbing !important;
  pointer-events: none;
}

.category-chip {
  padding: 0.28rem 0.72rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}
.category-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}
.category-chip.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 10px var(--accent-glow);
  font-weight: 600;
}

.channel-category-tag {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  letter-spacing: 0.02em;
}
.sidebar-item.active .channel-category-tag {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.sidebar-item.active {
  background: linear-gradient(90deg, var(--accent-glow) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-left: 3px solid var(--accent-primary);
}

.sidebar-item-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  flex-shrink: 0;
}
.sidebar-item-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Admin Panel Styles */
.admin-container {
  max-width: 1300px;
  margin: 2.5rem auto;
  padding: 0 2rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stat-card.live-visitor-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(13, 17, 28, 0.85) 100%);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.12);
}

.stat-card.live-visitor-card:hover {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.22);
}

.stat-card.total-visitor-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(13, 17, 28, 0.85) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.stat-card.total-visitor-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.2);
}

.live-pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: livePulseAnim 1.6s infinite ease-in-out;
  margin-right: 0.45rem;
  vertical-align: middle;
}

@keyframes livePulseAnim {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.8;
    box-shadow: 0 0 4px #10b981;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 12px #10b981, 0 0 22px rgba(16, 185, 129, 0.7);
  }
}

.live-badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-left: 0.5rem;
  vertical-align: middle;
  text-transform: uppercase;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modern Segmented Glass Admin Tabs */
.admin-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(13, 17, 28, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.4rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Hide scrollbar on Firefox */
  -ms-overflow-style: none; /* Hide scrollbar on IE/Edge */
}

.admin-tabs::-webkit-scrollbar {
  display: none; /* Hide scrollbar on Chrome/Safari */
}

.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  flex: 1 1 0;
  min-width: max-content;
  outline: none;
}

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

.tab-btn:hover:not(.active) svg {
  color: #f1f5f9;
  transform: scale(1.08);
}

.tab-btn.active {
  color: #ffffff;
  font-weight: 600;
  background: var(--accent-gradient);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 18px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.tab-btn svg {
  flex-shrink: 0;
  transition: all 0.2s ease;
  color: #71717a;
}

.tab-btn.active svg {
  color: #ffffff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.tab-btn:not(.active) .tab-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tab-btn.active .tab-badge {
  background: rgba(0, 0, 0, 0.28);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(10, 14, 28, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Admin Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
.data-table td {
  padding: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: auto;
}

.admin-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-faint);
  font-size: 0.8rem;
  text-decoration: none;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}
.admin-footer-link:hover {
  color: var(--text-main);
  background: var(--accent-glow);
  border-color: var(--border-glow);
}

.developer-link {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
}
.developer-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-shadow: 0 0 10px var(--border-glow);
}

/* Connecting Stream Deluxe Animation */
.connecting-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(20, 14, 10, 0.78) 0%, rgba(6, 5, 5, 0.94) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  z-index: 12;
  pointer-events: none;
  animation: connectingFadeIn 0.25s ease-out;
}

@keyframes connectingFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.connecting-vortex-wrap {
  position: relative;
  width: 124px;
  height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outward expanding radar ripples */
.connecting-ripple {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-primary);
  opacity: 0;
  animation: radarRipple 2.4s cubic-bezier(0.1, 0.4, 0.6, 1) infinite;
}
.connecting-ripple.delay-1 {
  animation-delay: 0.8s;
}
.connecting-ripple.delay-2 {
  animation-delay: 1.6s;
}

@keyframes radarRipple {
  0% {
    transform: scale(0.65);
    opacity: 0.85;
    border-color: var(--accent-primary);
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
    border-color: var(--accent-secondary);
  }
}

/* Outer dual-segment spinning orbit ring */
.connecting-orbit-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--accent-primary);
  border-bottom-color: var(--accent-secondary);
  filter: drop-shadow(0 0 12px var(--accent-glow));
  animation: orbitClockwise 1.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* Inner counter-spinning orbit ring */
.connecting-orbit-inner {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 2px dashed transparent;
  border-left-color: var(--accent-secondary);
  border-right-color: var(--accent-primary);
  opacity: 0.85;
  animation: orbitCounterClockwise 2.4s linear infinite;
}

@keyframes orbitClockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orbitCounterClockwise {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

/* Core glass badge */
.connecting-core-badge {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(28, 20, 15, 0.95) 0%, rgba(14, 10, 8, 0.98) 100%);
  border: 1.5px solid var(--border-glow);
  box-shadow: 0 0 25px var(--accent-glow), inset 0 1px 2px rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: corePulse 1.8s ease-in-out infinite alternate;
}

@keyframes corePulse {
  0% {
    transform: scale(0.94);
    box-shadow: 0 0 15px var(--accent-glow);
  }
  100% {
    transform: scale(1.04);
    box-shadow: 0 0 30px var(--accent-glow), 0 0 10px var(--accent-primary);
  }
}

.connecting-core-logo {
  max-width: 68%;
  max-height: 68%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
}

/* Audio wave equalizer bars */
.connecting-equalizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 18px;
}

.equalizer-bar {
  width: 3.5px;
  border-radius: 2px;
  background: var(--accent-gradient);
  animation: eqBounce 0.9s ease-in-out infinite alternate;
}
.equalizer-bar:nth-child(1) { height: 8px; animation-delay: 0.1s; }
.equalizer-bar:nth-child(2) { height: 16px; animation-delay: 0.35s; }
.equalizer-bar:nth-child(3) { height: 12px; animation-delay: 0.55s; }
.equalizer-bar:nth-child(4) { height: 18px; animation-delay: 0.2s; }
.equalizer-bar:nth-child(5) { height: 10px; animation-delay: 0.45s; }

@keyframes eqBounce {
  0% { transform: scaleY(0.25); opacity: 0.5; }
  100% { transform: scaleY(1); opacity: 1; filter: drop-shadow(0 0 5px var(--accent-glow)); }
}

/* Animated Shimmering Text */
.connecting-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffffff 0%, var(--accent-secondary) 50%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 2.4s linear infinite;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

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

.connecting-subtitle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}

.connecting-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: dotBlink 1.2s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 640px) {
  .connecting-overlay {
    gap: 0.65rem;
    padding: 0.75rem;
  }
  .connecting-vortex-wrap {
    width: 84px;
    height: 84px;
  }
  .connecting-core-badge {
    width: 48px;
    height: 48px;
  }
  .connecting-title {
    font-size: 0.88rem;
    letter-spacing: 0.05em;
  }
  .connecting-subtitle {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
  }
  .connecting-equalizer {
    height: 14px;
  }
}

/* ==========================================================================
   On-Screen Video Watermark / Channel Bug Logo
   ========================================================================== */
.player-screen-logo {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, top 0.25s ease, bottom 0.25s ease, left 0.25s ease, right 0.25s ease, max-width 0.25s ease;
}

.player-screen-logo.top-right {
  top: 1.25rem;
  right: 1.25rem;
}

.player-screen-logo.top-left {
  top: 1.25rem;
  left: 1.25rem;
}

.player-screen-logo.bottom-right {
  bottom: 4.5rem;
  right: 1.25rem;
}

.player-screen-logo.bottom-left {
  bottom: 4.5rem;
  left: 1.25rem;
}

.player-screen-logo .screen-logo-img {
  width: 100%;
  height: auto;
  max-height: 85px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85));
  display: block;
  pointer-events: none;
}

/* Fullscreen adjustments */
.player-root:fullscreen .player-screen-logo.top-right,
.player-root.is-fullscreen .player-screen-logo.top-right {
  top: 2rem;
  right: 2.2rem;
}

.player-root:fullscreen .player-screen-logo.top-left,
.player-root.is-fullscreen .player-screen-logo.top-left {
  top: 2rem;
  left: 2.2rem;
}

.player-root:fullscreen .player-screen-logo.bottom-right,
.player-root.is-fullscreen .player-screen-logo.bottom-right {
  bottom: 6rem;
  right: 2.2rem;
}

.player-root:fullscreen .player-screen-logo.bottom-left,
.player-root.is-fullscreen .player-screen-logo.bottom-left {
  bottom: 6rem;
  left: 2.2rem;
}

@media (max-width: 768px) {
  .player-screen-logo.top-right,
  .player-screen-logo.top-left {
    top: 0.75rem;
  }
  .player-screen-logo.top-right,
  .player-screen-logo.bottom-right {
    right: 0.75rem;
  }
  .player-screen-logo.top-left,
  .player-screen-logo.bottom-left {
    left: 0.75rem;
  }
  .player-screen-logo.bottom-right,
  .player-screen-logo.bottom-left {
    bottom: 3.5rem;
  }
}

/* Channel Edit Modal & Category/Logo Management */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.25rem;
  animation: adminModalFadeIn 0.2s ease-out;
}

@keyframes adminModalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.admin-modal-card {
  background: #140f0b;
  border: 1px solid rgba(255, 85, 0, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(255, 85, 0, 0.15);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-modal-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.admin-modal-header h3 {
  font-size: 1.15rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.admin-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.admin-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.admin-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-modal-footer {
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.35);
}

.channel-logo-edit-section {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.channel-logo-preview-box {
  width: 76px;
  height: 76px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px dashed rgba(255, 85, 0, 0.4);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.channel-logo-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 4px;
}

.batch-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  background: linear-gradient(135deg, rgba(255, 85, 0, 0.14) 0%, rgba(20, 16, 12, 0.95) 100%);
  border: 1px solid rgba(255, 85, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  animation: adminModalFadeIn 0.2s ease-out;
}

.channel-category-select {
  background: rgba(20, 16, 12, 0.9);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.channel-category-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ==========================================================================
   Player Custom Controls Bar
   ========================================================================== */
.player-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  transition: all 0.25s ease;
}

.player-controls-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-control-play-btn {
  background: var(--accent-gradient);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.player-control-play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 16px var(--accent-glow);
}

.player-volume-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-mute-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}
.player-mute-btn:hover {
  color: var(--text-main);
}

.player-volume-slider-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-volume-slider {
  width: 80px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.player-volume-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 32px;
}

.player-controls-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-pip-btn,
.player-fullscreen-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Media Queries
   ========================================================================== */

/* Tablets / Medium Desktops (<= 1080px) */
@media (max-width: 1080px) {
  .watch-main-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .sidebar-channels {
    height: auto !important;
    max-height: none !important;
  }
  .sidebar-channel-list {
    max-height: 520px;
  }
}

/* Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1.25rem;
  }
  .watch-container {
    padding: 0.65rem 0.85rem;
    gap: 1rem;
  }
  .watch-main-grid {
    gap: 1rem;
  }
  .video-player-wrapper {
    border-radius: var(--radius-sm);
  }
  .sidebar-channels {
    border-radius: var(--radius-sm);
  }
  .sidebar-channel-list {
    max-height: 460px;
  }
  
  /* Admin adjustments */
  .admin-container {
    padding: 0 1rem;
    margin: 1.25rem auto;
  }
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
  }
  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
}

/* Standard Mobile Viewports (<= 640px) */
@media (max-width: 640px) {
  .navbar {
    padding: 0.65rem 0.85rem;
  }
  .brand-logo {
    font-size: 1.18rem;
    gap: 0.45rem;
  }
  .brand-logo-img {
    height: 32px;
    max-height: 32px;
  }
  .brand-badge {
    font-size: 0.58rem;
    padding: 0.15rem 0.4rem;
  }
  .nav-links {
    gap: 0.45rem;
  }
  .nav-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }

  .watch-container {
    padding: 0.4rem 0.5rem;
    gap: 0.75rem;
  }
  
  /* Controls bar single-row mobile optimization */
  .player-controls-bar {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: nowrap;
  }
  .player-controls-left {
    gap: 0.5rem;
  }
  .player-volume-slider-group {
    display: none !important;
  }
  .player-mute-btn {
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
  }
  .player-control-play-btn {
    width: 36px;
    height: 36px;
  }
  .player-controls-right {
    gap: 0.4rem;
  }
  .player-pip-btn,
  .player-fullscreen-btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
    min-height: 36px;
  }

  .sidebar-header {
    padding: 0.75rem 0.85rem;
  }
  .sidebar-category-chips {
    padding: 0.45rem 0.75rem;
    gap: 0.35rem;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  .category-chip {
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
  }
  .sidebar-item {
    padding: 0.65rem 0.85rem;
    gap: 0.75rem;
    min-height: 52px;
  }
  .sidebar-item-logo {
    width: 32px;
    height: 32px;
  }
  .sidebar-item-name {
    font-size: 0.84rem;
  }
  .sidebar-channel-list {
    max-height: 420px;
  }

  /* Modals */
  .nav-modal-backdrop {
    padding: 0.75rem;
  }
  .nav-modal-card {
    padding: 1.25rem 1rem !important;
    max-width: 100% !important;
    border-radius: var(--radius-md) !important;
  }
  
  /* Footer */
  .footer {
    padding: 1.5rem 0.75rem;
    font-size: 0.78rem;
    text-align: center;
  }
}

/* Compact Mobile Viewports (<= 480px, e.g. iPhone SE, 13/14/15, Galaxy S) */
@media (max-width: 480px) {
  .navbar {
    padding: 0.5rem 0.65rem;
  }
  .brand-logo {
    font-size: 1.05rem;
    gap: 0.35rem;
  }
  .brand-logo-img {
    height: 28px;
    max-height: 28px;
  }
  .brand-badge {
    display: none; /* Hide LIVE tag to keep header buttons perfectly fitted */
  }
  .nav-links {
    gap: 0.35rem;
  }
  .nav-btn {
    padding: 0.32rem 0.55rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    gap: 0.28rem;
  }
  .nav-btn-text-full {
    display: none !important;
  }
  .nav-btn-text-short {
    display: inline !important;
  }

  .watch-container {
    padding: 0.3rem 0.35rem;
    gap: 0.6rem;
  }
  .player-controls-bar {
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    flex-wrap: nowrap;
  }
  .player-controls-left {
    gap: 0.45rem;
  }
  .player-control-play-btn {
    width: 35px;
    height: 35px;
  }
  .player-controls-right {
    gap: 0.35rem;
  }
  .player-pip-btn,
  .player-fullscreen-btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.74rem;
    min-height: 34px;
  }
  
  .sidebar-header {
    padding: 0.65rem 0.75rem;
  }
  .sidebar-channel-list {
    max-height: 380px;
  }
  
  /* Admin panel compact */
  .admin-container {
    padding: 0 0.6rem;
  }
  .admin-stat-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .stat-card {
    padding: 0.75rem 0.65rem;
  }
  .admin-card {
    padding: 0.85rem 0.75rem;
  }
}
