/* ==========================================================================
   JOY TV BRAND NEW DESIGN SYSTEM: MODERN NEON GLASSMORPHISM
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-app: #030206;
  --bg-sidebar: rgba(10, 8, 16, 0.6);
  --bg-card: rgba(18, 14, 28, 0.45);
  --bg-card-hover: rgba(28, 22, 44, 0.75);
  --bg-input: rgba(20, 16, 32, 0.5);
  --bg-player: rgba(12, 10, 20, 0.85);
  
  --border-glass: rgba(255, 255, 255, 0.04);
  --border-glass-hover: rgba(168, 85, 247, 0.3);
  --border-neon-glow: rgba(168, 85, 247, 0.15);
  
  /* Neon Accents */
  --color-primary: #a855f7; /* Royal Purple */
  --color-secondary: #ec4899; /* Vibrant Pink */
  --color-accent: #06b6d4; /* Neon Cyan */
  --color-success: #10b981; /* Emerald Green */
  --color-error: #f43f5e; /* Coral Pink/Red */
  
  /* Gradients */
  --gradient-brand: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  --gradient-glow: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  --gradient-skeleton: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
  
  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-active: #ffffff;
  
  /* Fonts */
  --font-family-title: 'Outfit', sans-serif;
  --font-family-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Shadows & Blurs */
  --blur-glass: 20px;
  --shadow-neon: 0 0 25px rgba(168, 85, 247, 0.35);
  --shadow-neon-cyan: 0 0 20px rgba(6, 182, 212, 0.25);
  --shadow-card: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Core Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-title);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Scrollbars styling */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  transition: var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Background Glowing Orbs */
.bg-glow {
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  animation: glowFloat 25s infinite alternate ease-in-out;
}

.bg-glow-1 {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
  top: -20%;
  left: -10%;
}

.bg-glow-2 {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
  bottom: -20%;
  right: -10%;
  animation-delay: -5s;
}

@keyframes glowFloat {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(50px) scale(1.1); }
}

/* App Container Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  z-index: 1;
}

/* Sidebar Styling (Premium Glass Panel) */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  backdrop-filter: blur(var(--blur-glass));
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 30px 24px;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-brand {
  margin-bottom: 40px;
  padding-left: 10px;
}

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

.logo-icon {
  background: var(--gradient-brand);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: white;
  box-shadow: var(--shadow-neon);
  transform: rotate(-10deg);
  transition: var(--transition-normal);
}

.logo:hover .logo-icon {
  transform: rotate(0deg) scale(1.1);
}

.logo-text {
  font-family: var(--font-family-title);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
}

.logo-text .accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.menu-item i {
  font-size: 1.15rem;
  transition: var(--transition-fast);
}

.menu-item:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.02);
}

.menu-item.active {
  color: var(--text-active);
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid var(--border-glass-hover);
  box-shadow: inset 0 0 12px rgba(168, 85, 247, 0.05);
}

.menu-item.active i {
  color: var(--color-primary);
  text-shadow: var(--shadow-neon);
}

.sidebar-status {
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.15);
  padding: 8px 16px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-success);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-success);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--color-success); }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header Container */
.main-header {
  height: 85px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
}

.header-search {
  width: 45%;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 52px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  color: var(--text-main);
  font-family: var(--font-family-body);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
  backdrop-filter: blur(8px);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--border-neon-glow);
  background-color: rgba(20, 16, 32, 0.8);
}

.clear-btn {
  position: absolute;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.clear-btn:hover {
  color: var(--text-main);
}

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

.country-filter-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  padding: 12px 20px;
  border-radius: 16px;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  transition: var(--transition-fast);
}

.country-filter-container:focus-within {
  border-color: var(--color-primary);
}

.country-filter-container select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-family-body);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.country-filter-container select option {
  background-color: #0b0912;
  color: var(--text-main);
}

/* Category Pill Scrolling bar */
.categories-section {
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.categories-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 10px 22px;
  border-radius: 100px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.category-pill:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.category-pill.active {
  color: var(--text-active);
  background: var(--gradient-brand);
  border-color: transparent;
  box-shadow: var(--shadow-neon);
}

/* Main Content Layout Wrapper */
.content-wrapper {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
  height: calc(100vh - 171px); /* Header + Categories */
}

/* Channels List Grid Layout */
.channels-section {
  flex-grow: 1;
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title span:first-child {
  background: linear-gradient(to right, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 700;
  background-color: rgba(168, 85, 247, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(168, 85, 247, 0.15);
}

.layout-controls {
  display: flex;
  gap: 8px;
}

.control-btn {
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.control-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.1);
}

.control-btn.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background-color: rgba(168, 85, 247, 0.08);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.05);
}

/* Channels Cards Grid */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.channels-grid.list-view {
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Premium Card Design */
.channel-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

/* Card hover neon border effect */
.channel-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  border: 1.5px solid transparent;
  background: var(--gradient-brand) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: var(--transition-fast);
}

.channel-card:hover {
  background-color: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card), 0 10px 20px -5px rgba(168, 85, 247, 0.1);
}

.channel-card:hover::after {
  opacity: 1;
}

.channel-card.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.15);
  background-color: rgba(26, 20, 42, 0.7);
}

.channel-card.active::after {
  opacity: 1;
}

.channel-logo-container {
  width: 96px;
  height: 96px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  padding: 10px;
  transition: var(--transition-normal);
}

.channel-card:hover .channel-logo-container {
  transform: scale(1.06) rotate(2deg);
  background-color: rgba(255, 255, 255, 0.05);
}

.channel-logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.channel-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-name {
  font-family: var(--font-family-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.channel-meta-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-country {
  background-color: rgba(6, 182, 212, 0.08);
  color: var(--color-accent);
  border: 1px solid rgba(6, 182, 212, 0.12);
}

.badge-category {
  background-color: rgba(236, 72, 153, 0.08);
  color: var(--color-secondary);
  border: 1px solid rgba(236, 72, 153, 0.12);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.badge-status.online {
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.12);
}

.badge-status.online .status-dot {
  background-color: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

.badge-status.offline {
  background-color: rgba(244, 63, 94, 0.08);
  color: var(--color-error);
  border: 1px solid rgba(244, 63, 94, 0.12);
}

.badge-status.offline .status-dot {
  background-color: var(--color-error);
  box-shadow: 0 0 6px var(--color-error);
}

.badge-status.unknown {
  background-color: rgba(148, 163, 184, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.badge-status.unknown .status-dot {
  background-color: var(--text-muted);
}

.channel-card.offline {
  opacity: 0.65;
}

.channel-card.offline:hover {
  opacity: 0.95;
}

.fav-card-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0;
  transition: var(--transition-fast);
}

.channel-card:hover .fav-card-btn {
  opacity: 1;
}

.fav-card-btn:hover {
  color: var(--color-secondary);
  transform: scale(1.15);
}

.fav-card-btn.favorited {
  opacity: 1;
  color: var(--color-secondary);
}

/* List View Card Styling overrides */
.channels-grid.list-view .channel-card {
  flex-direction: row;
  align-items: center;
  text-align: left;
  padding: 14px 28px;
  border-radius: 16px;
}

.channels-grid.list-view .channel-logo-container {
  width: 52px;
  height: 52px;
  margin-bottom: 0;
  margin-right: 24px;
  padding: 6px;
  border-radius: 12px;
}

.channels-grid.list-view .channel-info {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.channels-grid.list-view .channel-name {
  width: auto;
  max-width: 320px;
}

.channels-grid.list-view .fav-card-btn {
  position: static;
  opacity: 1;
  margin-left: 20px;
}

/* Skeleton Loading Shimmer Screen styling */
.skeleton-card {
  pointer-events: none;
}

.skeleton-logo {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  background-color: rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.skeleton-name {
  width: 70%;
  height: 16px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
  margin: 0 auto 14px auto;
}

.skeleton-badge-1, .skeleton-badge-2 {
  display: inline-block;
  width: 50px;
  height: 18px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

/* Shimmer overlay keyframes */
.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 150%;
  height: 100%;
  background: var(--gradient-skeleton);
  animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
  0% { left: -150%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Pagination Buttons */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 24px;
  flex-shrink: 0;
}

.page-btn {
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  background-color: rgba(168, 85, 247, 0.05);
}

.page-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.page-info {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Error or Empty views */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.no-results i {
  font-size: 3.2rem;
  margin-bottom: 20px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.15));
}

.no-results h3 {
  color: var(--text-main);
  margin-bottom: 8px;
  font-size: 1.3rem;
}

/* Premium Player Side Panel */
.player-section {
  width: 480px;
  background-color: var(--bg-player);
  backdrop-filter: blur(var(--blur-glass));
  border-left: 1px solid var(--border-glass);
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 5;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.player-section.closed {
  width: 0;
  border-left: none;
  opacity: 0;
  transform: translateX(30px);
  pointer-events: none;
}

.player-wrapper {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

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

.player-title {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-indicator {
  color: var(--color-error);
  font-size: 0.8rem;
  animation: blinkRed 1.5s infinite;
}

@keyframes blinkRed {
  0% { opacity: 0.4; }
  50% { opacity: 1; text-shadow: 0 0 10px var(--color-error); }
  100% { opacity: 0.4; }
}

.close-player-btn {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.close-player-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #030206;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Play Placeholder Screen */
.player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #0c0a13;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  gap: 16px;
}

.pulse-play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
  box-shadow: var(--shadow-neon);
  animation: playButtonPulse 2s infinite ease-in-out;
}

@keyframes playButtonPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(168, 85, 247, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

.player-overlay p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Buffering/Loading Overlay */
.player-spinner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(12, 10, 20, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  gap: 16px;
}

.custom-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(168, 85, 247, 0.1);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.player-spinner p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Playback Error Screen */
.player-error {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #0c0a13;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 24px;
  gap: 12px;
}

.player-error .error-icon {
  font-size: 2.8rem;
  color: var(--color-error);
}

.player-error p {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.4;
}

.error-actions {
  display: flex;
  gap: 10px;
}

.share-btn-secondary {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.share-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

/* Active Playing Channel info card */
.playing-channel-info {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  backdrop-filter: blur(8px);
}

.playing-channel-logo {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.playing-channel-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.playing-channel-details {
  flex-grow: 1;
  overflow: hidden;
}

.playing-channel-details h4 {
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.playing-channel-badges {
  display: flex;
  gap: 6px;
}

.player-actions-menu {
  display: flex;
  gap: 8px;
}

.favorite-btn, .share-btn {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-btn:hover, .share-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.favorite-btn.favorited {
  color: var(--color-secondary);
  border-color: rgba(236, 72, 153, 0.25);
  background-color: rgba(236, 72, 153, 0.05);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.1);
}

/* Premium troubleshooter section */
.player-tips {
  background-color: rgba(18, 14, 28, 0.25);
  border: 1px solid var(--border-glass);
  padding: 24px;
  border-radius: 20px;
  margin-top: auto;
}

.tips-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  margin-bottom: 16px;
}

.tips-header i {
  color: var(--color-primary);
  font-size: 1.15rem;
}

.tips-header h4 {
  font-size: 1rem;
  font-weight: 800;
}

.tips-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tips-content > p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}

.action-card {
  display: flex;
  gap: 14px;
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  transition: var(--transition-fast);
}

.action-card:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.card-icon {
  color: var(--color-primary);
  font-size: 1.15rem;
  padding-top: 2px;
}

.card-text h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.card-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
}

.toast {
  background-color: rgba(10, 8, 16, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass-hover);
  padding: 14px 24px;
  border-radius: 14px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), var(--shadow-neon-cyan);
  transform: translateY(20px);
  opacity: 0;
  animation: toastIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.fade-out {
  opacity: 0;
  transform: translateY(-20px);
}

.toast i {
  color: var(--color-accent);
}

@keyframes toastIn {
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive Viewports */
@media (max-width: 1100px) {
  .sidebar {
    width: 80px;
    padding: 24px 10px;
    align-items: center;
  }
  
  .logo-text, .menu-item span, .status-text {
    display: none;
  }
  
  .logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    transform: rotate(0deg);
  }
  
  .menu-item {
    justify-content: center;
    padding: 14px;
  }
  
  .sidebar-status {
    justify-content: center;
    border-top: none;
  }
}

@media (max-width: 768px) {
  /* Dynamic Background glow adjustments */
  .bg-glow {
    width: 100vw;
    height: 100vw;
    filter: blur(80px);
  }

  /* Fixed Bottom Nav Menu */
  .sidebar {
    width: 100%;
    height: 65px;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-right: none;
    border-top: 1px solid var(--border-glass);
    background-color: rgba(10, 8, 16, 0.95);
    z-index: 1000;
  }

  .sidebar-brand, .sidebar-status {
    display: none !important;
  }

  .sidebar-menu {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    gap: 0;
  }

  .menu-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.7rem;
    border-radius: 10px;
    flex: 1;
    color: var(--text-muted);
  }

  .menu-item i {
    font-size: 1.1rem;
  }

  .menu-item span {
    display: block !important;
  }

  .menu-item.active {
    background: transparent;
    border-color: transparent;
    color: var(--color-primary);
    box-shadow: none;
  }

  /* Body structure adaptation */
  .app-container {
    flex-direction: column;
  }

  .main-content {
    height: calc(100vh - 65px);
  }

  /* Header adjustments */
  .main-header {
    height: auto;
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid var(--border-glass);
  }

  .header-search {
    width: 100%;
  }

  .search-box input {
    padding: 12px 16px 12px 44px;
    font-size: 0.9rem;
    border-radius: 12px;
  }

  .search-box i {
    left: 16px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .country-filter-container {
    padding: 10px 16px;
    border-radius: 12px;
    width: 100%;
  }
  
  .country-filter-container select {
    font-size: 0.9rem;
    width: 100%;
  }

  .categories-section {
    padding: 12px 16px;
  }
  
  .category-pill {
    padding: 8px 18px;
    font-size: 0.8rem;
  }

  /* Main frame splitting */
  .content-wrapper {
    flex-direction: column-reverse;
    height: calc(100vh - 200px - 65px);
  }

  .channels-section {
    padding: 20px 16px;
    overflow-y: auto;
    height: auto;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
  }
  
  /* Compact card styling for mobile */
  .channel-card {
    padding: 14px;
    border-radius: 16px;
  }
  
  .channel-logo-container {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
    padding: 6px;
    border-radius: 12px;
  }

  .channel-name {
    font-size: 0.85rem;
  }

  .badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  /* Docked sticky video player at the top on mobile */
  .player-section {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 99;
    border-left: none;
    border-bottom: 1px solid var(--border-glass);
    background-color: #0b0912;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  .player-wrapper {
    padding: 16px;
    gap: 12px;
  }

  .player-header {
    display: none;
  }

  .player-tips {
    display: none !important;
  }

  .playing-channel-info {
    padding: 12px;
    gap: 12px;
    border-radius: 14px;
  }

  .playing-channel-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .playing-channel-details h4 {
    font-size: 0.95rem;
  }
}
