/* ==========================================================================
   Bioscope Live TV — Master Stylesheet
   Modern Dark Cinematic Theme with Glassmorphism & High-Performance Layout
   ========================================================================== */

:root {
  --bg-main: #070a13;
  --bg-surface: #0e1526;
  --bg-surface-elevated: #151f38;
  --bg-card: rgba(21, 31, 56, 0.7);
  --bg-card-hover: rgba(30, 44, 78, 0.9);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(239, 68, 68, 0.8);
  --border-accent: rgba(59, 130, 246, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.35);
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-gold: #f59e0b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-bn: 'Hind Siliguri', 'Inter', sans-serif;

  --header-height: 70px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #151c33 0%, var(--bg-main) 70%);
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #2a3756;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3e527f;
}

/* ==========================================================================
   Header / Navigation Bar
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(7, 10, 19, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.logo-icon-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.logo-svg {
  width: 22px;
  height: 22px;
  color: var(--accent-red);
}

.live-pulse-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background-color: var(--accent-red);
  border: 2px solid var(--bg-main);
  border-radius: 50%;
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: linear-gradient(90deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-red);
  margin-top: -3px;
}

/* Header Search */
.header-search {
  position: relative;
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
}

.header-search .search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.header-search input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px var(--accent-red-glow);
}

.header-search input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  position: absolute;
  right: 40px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

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

.search-shortcut {
  position: absolute;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.catalog-switch {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.switch-pill {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.switch-pill:hover {
  color: var(--text-primary);
}

.switch-pill.active {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-red-glow);
}

.switch-pill .badge {
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.btn-main-site {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.btn-main-site:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Main Stage & Player Section
   ========================================================================== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.player-stage-section {
  width: 100%;
  background: linear-gradient(180deg, rgba(14, 21, 38, 0.7) 0%, transparent 100%);
  padding: 24px 0 16px;
}

.player-stage-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Video Player Wrapper (16:9 Aspect Ratio) */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-subtle);
}

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

/* Player Loader Overlay */
.player-loader {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.player-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner-ring {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loader-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Player Error Overlay */
.player-error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 19, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 24px;
}

.error-dialog {
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 4px;
}

.error-dialog h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.error-dialog p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
}

.btn-action-primary {
  background: var(--accent-red);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-action-primary:hover {
  background: #dc2626;
}

.btn-action-secondary {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-secondary:hover {
  background: rgba(59, 130, 246, 0.3);
}

.btn-action-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* Custom Video Controls */
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 15;
}

.video-container:hover .player-controls,
.player-controls.visible {
  opacity: 1;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.ctrl-svg {
  width: 22px;
  height: 22px;
}

.live-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse-ring 1.5s infinite;
}

.live-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #fff;
}

.volume-control-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

#volume-slider {
  width: 75px;
  height: 4px;
  appearance: none;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.badge-quality {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.server-picker-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.server-picker-wrap select {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

/* ==========================================================================
   Channel Info & Action Bar
   ========================================================================== */
.channel-info-bar {
  margin-top: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.channel-avatar-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.channel-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
}

.channel-meta-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-title-row h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.status-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.channel-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.tag-category {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.tag-quality {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-country {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.tag-type {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.channel-info-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-meta-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-meta-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.btn-meta-action.favorited {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--accent-red);
}

.action-svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Popular / Trending Bar
   ========================================================================== */
.trending-section {
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(14, 21, 38, 0.4);
}

.trending-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.trending-container::-webkit-scrollbar {
  display: none;
}

.trending-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
}

.trending-pills-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trending-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.trending-pill-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

/* ==========================================================================
   Category Tabs & Explorer Grid
   ========================================================================== */
.catalog-section {
  width: 100%;
  padding: 24px 0 60px;
}

.catalog-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Category Tabs Scroll Bar */
.category-tabs-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  background: rgba(7, 10, 19, 0.92);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  margin-bottom: 20px;
}

.category-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.cat-pill:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.cat-pill.active {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 2px 10px var(--accent-red-glow);
}

.cat-count {
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

/* Directory Status Bar */
.directory-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.results-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

#results-count-text {
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.directory-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-sub-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-sub-control:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sub-svg {
  width: 14px;
  height: 14px;
}

/* Channels Dynamic Grid */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* Channel Card */
.channel-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  backdrop-filter: blur(8px);
  user-select: none;
}

.channel-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.channel-card.active {
  border-color: var(--accent-red);
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 0 1px var(--accent-red), 0 8px 24px var(--accent-red-glow);
}

.card-top {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform var(--transition-fast);
}

.channel-card:hover .card-logo-img {
  transform: scale(1.05);
}

.card-logo-fallback {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-muted);
}

.card-quality-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.card-fta-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(16, 185, 129, 0.85);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
}

/* Playing Equalizer Animation inside active card */
.card-equalizer {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bar {
  width: 3px;
  background: var(--accent-red);
  border-radius: 1px;
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
}
.eq-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.eq-bar:nth-child(3) { height: 70%; animation-delay: 0.2s; }

@keyframes eq-bounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

.card-bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.card-fav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.card-fav-btn:hover {
  color: var(--accent-red);
  transform: scale(1.2);
}

.card-fav-btn.active {
  color: var(--accent-red);
}

/* Skeleton Loading Grid */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.skeleton-card {
  height: 180px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-md);
  animation: shimmer 1.5s infinite;
}

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

.scroll-sentinel {
  height: 20px;
}

/* Toast Notification */
.toast-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 999;
  backdrop-filter: blur(12px);
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  background: #04060c;
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 30px;
  margin-top: auto;
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-top: 6px;
  line-height: 1.6;
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-copy {
  margin-top: 10px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Responsive Adaptations (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 1024px) {
  .header-search {
    max-width: 320px;
  }
}

@media (max-width: 768px) {
  .app-header {
    height: auto;
    padding: 12px 0;
  }
  
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0 16px;
  }

  .header-actions {
    justify-content: space-between;
    overflow-x: auto;
  }

  .player-stage-section {
    padding: 8px 0;
  }

  .player-stage-container {
    padding: 0 12px;
  }

  .channel-info-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .channel-info-right {
    width: 100%;
    justify-content: space-between;
  }

  .btn-meta-action {
    flex: 1;
    justify-content: center;
  }

  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .channel-card {
    padding: 10px;
  }

  .search-shortcut {
    display: none;
  }
}
