/* ==================== Variables de Optimización Adaptativa ==================== */
:root {
  --blur-amount: 12px;
  --animation-speed: 0.3s;
  --shadow-complexity: 3;
  --card-primary: #72d6ff;
  --card-secondary: #ff7fff;
  --card-accent: #4ade80;
  --card-glow: rgba(114, 214, 255, 0.4);
  --card-transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --hologram-layers: 3;
}

/* Detección automática de capacidad del dispositivo */
@media (hover: none) and (pointer: coarse) {
  :root {
    --blur-amount: 4px;
    --animation-speed: 0.2s;
    --shadow-complexity: 1;
    --card-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media (min-width: 1024px) and (hover: hover) {
  :root {
    --blur-amount: 16px;
    --animation-speed: 0.4s;
    --shadow-complexity: 4;
  }
}
/* ==================== Container ==================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

/* ==================== Main Content ==================== */
main {
  padding: 2rem 0;
  position: relative;
  z-index: 2;
}
/* ==================== Info Banner (Optimizado) ==================== */
.info-banner {
  font-weight: 500;
  color: var(--text-secondary);
  margin: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 1.2rem;
  background: rgba(114, 214, 255, 0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(114, 214, 255, 0.3);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
}

/* Animación solo en PC */
@media (min-width: 1024px) and (hover: hover) {
  .info-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(114, 214, 255, 0.05), transparent);
    animation: bannerShine 5s linear infinite;
  }

  @keyframes bannerShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
  }
}

.info-banner a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--animation-speed);
  border-bottom: 1px solid transparent;
  position: relative;
  z-index: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.info-banner a:active {
  color: var(--accent-purple);
}

@media (hover: hover) {
  .info-banner a:hover {
    border-bottom-color: var(--accent);
    color: var(--accent-purple);
    text-shadow: 0 0 8px rgba(114, 214, 255, 0.5);
  }
}
/* ==================== Agenda Frame (Ultra Optimizado) ==================== */
iframe#agendaFrame {
  width: 100%;
  height: 500px;
  border-radius: var(--radius);
  border: 1px solid rgba(114, 214, 255, 0.3);
  margin-bottom: 2rem;
  background: rgba(0, 0, 0, 0.4);
  transition: transform var(--animation-speed) ease;
  touch-action: pan-y;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Sombras adaptativas según dispositivo */
@media (hover: none) and (pointer: coarse) {
  iframe#agendaFrame {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

/* ==================== Channels Section ==================== */
.channels-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding: 2rem 0;
}

/* ==================== Section Title con Efectos Mejorados ==================== */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, 
    var(--card-primary) 0%, 
    var(--card-secondary) 25%,
    var(--card-accent) 50%,
    var(--card-secondary) 75%,
    var(--card-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300% 100%;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  position: relative;
  padding-bottom: 1.5rem;
  text-shadow: 0 0 40px rgba(114, 214, 255, 0.3);
}

/* Animación solo en PC */
@media (min-width: 1024px) and (hover: hover) {
  .section-title {
    animation: titleFlow 8s ease-in-out infinite;
  }

  @keyframes titleFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }
}

/* Línea decorativa bajo el título */
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  max-width: 90%;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--card-primary) 20%, 
    var(--card-secondary) 50%,
    var(--card-primary) 80%, 
    transparent);
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(114, 214, 255, 0.6);
}
/* ==================== GRID ASIMÉTRICO DINÁMICO ==================== */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  position: relative;
  perspective: 1500px;
}

/* Card destacada (featured) - más grande */
.channel-card.featured {
  grid-column: span 2;
  grid-row: span 2;
}
/* ==================== CARDS HOLOGRÁFICAS INNOVADORAS ==================== */
.channel-card {
  background: linear-gradient(135deg,
    rgba(20, 25, 45, 0.8) 0%,
    rgba(25, 30, 50, 0.6) 50%,
    rgba(20, 25, 45, 0.8) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  overflow: visible;
  cursor: pointer;
  text-align: center;
  padding: 1.5rem;
  border: 2px solid transparent;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transform-style: preserve-3d;
  transition: all var(--card-transition);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Borde holográfico animado - SIMPLIFICADO */
.channel-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(135deg,
    var(--card-primary) 0%,
    var(--card-secondary) 25%,
    var(--card-accent) 50%,
    var(--card-secondary) 75%,
    var(--card-primary) 100%);
  background-size: 400% 400%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

/* Capas holográficas de profundidad */
.channel-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: 
    radial-gradient(circle at 30% 30%, rgba(114, 214, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255, 127, 255, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  mix-blend-mode: screen;
}


/* ==================== IMAGEN CON EFECTO HOLOGRÁFICO ==================== */
.channel-card img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid transparent;
  background: linear-gradient(135deg, rgba(114, 214, 255, 0.3), rgba(255, 127, 255, 0.3));
  background-clip: padding-box;
  position: relative;
  transition: all var(--card-transition);
  box-shadow: 
    0 0 30px rgba(114, 214, 255, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  z-index: 2;
  pointer-events: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}


/* ==================== TEXTO CON EFECTOS MEJORADOS ==================== */
.channel-card span {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.4;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(114, 214, 255, 0.3);
  pointer-events: none;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

/* ==================== BADGES ==================== */
.channel-card .badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #ff0844, #ff7f50);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 
    0 0 20px rgba(255, 8, 68, 0.6),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
  animation: badgePulse 2s ease-in-out infinite;
  z-index: 3;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 8, 68, 0.6); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 8, 68, 0.8); }
}

/* Quality Badge */
.channel-card .quality-badge {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 40, 0.9));
  backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 3;
}

.quality-badge.hd {
  border-color: var(--card-accent);
  color: var(--card-accent);
}

.quality-badge.full-hd {
  border-color: var(--card-primary);
  color: var(--card-primary);
}

.quality-badge.ultra-hd {
  border-color: gold;
  color: gold;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* ==================== EFECTOS DE HOVER (Desktop) ==================== */
@media (hover: hover) and (pointer: fine) {
  .channel-card:hover {
    transform: translateY(-12px) rotateX(5deg) scale(1.03);
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.6),
      0 0 60px var(--card-glow),
      inset 0 0 0 2px rgba(114, 214, 255, 0.3);
    background: linear-gradient(135deg,
      rgba(25, 30, 50, 0.9) 0%,
      rgba(30, 35, 55, 0.8) 50%,
      rgba(25, 30, 50, 0.9) 100%);
  }

  .channel-card:hover::before {
    opacity: 1;
  }

  .channel-card:hover::after {
    opacity: 1;
  }

  .channel-card:hover img {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 
      0 0 50px rgba(114, 214, 255, 0.8),
      0 8px 30px rgba(0, 0, 0, 0.5),
      inset 0 0 30px rgba(255, 255, 255, 0.2);
    border-color: var(--card-primary);
  }

  .channel-card:hover span {
    transform: translateY(-5px) scale(1.05);
    color: var(--card-primary);
    text-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.8),
      0 0 30px rgba(114, 214, 255, 0.8);
  }
}

/* ==================== EFECTOS MÓVIL (Touch) ==================== */
@media (hover: none) and (pointer: coarse) {
  .channel-card:active {
    transform: scale(0.95);
    box-shadow: 
      0 4px 20px rgba(0, 0, 0, 0.5),
      inset 0 0 0 2px rgba(114, 214, 255, 0.4);
  }

  .channel-card:active::before {
    opacity: 1;
  }

  .channel-card:active img {
    transform: scale(1.08);
  }
}
/* ==================== SISTEMA DE PARTÍCULAS ==================== */
.channel-card .particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(114, 214, 255, 1), transparent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}


/* Posiciones de partículas */
.channel-card .particle:nth-child(1) { --tx: -30px; --ty: -30px; top: 50%; left: 50%; }
.channel-card .particle:nth-child(2) { --tx: 30px; --ty: -30px; top: 50%; left: 50%; animation-delay: 0.1s; }
.channel-card .particle:nth-child(3) { --tx: 30px; --ty: 30px; top: 50%; left: 50%; animation-delay: 0.2s; }
.channel-card .particle:nth-child(4) { --tx: -30px; --ty: 30px; top: 50%; left: 50%; animation-delay: 0.3s; }
.channel-card .particle:nth-child(5) { --tx: 0px; --ty: -40px; top: 50%; left: 50%; animation-delay: 0.15s; }
.channel-card .particle:nth-child(6) { --tx: 0px; --ty: 40px; top: 50%; left: 50%; animation-delay: 0.25s; }

/* ==================== EFECTO DE CLICK - WARP SPEED ==================== */

/* Ondas de energía al hacer click */
.channel-card .ripple {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--card-primary);
  opacity: 0;
  pointer-events: none;
  z-index: 15;
}


/* ==================== INFORMACIÓN ADICIONAL AL HOVER ==================== */
.channel-card .info-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 10;
}

@media (hover: hover) and (pointer: fine) {
  .channel-card:hover .info-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-overlay .info-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--card-primary);
  text-shadow: 0 0 20px rgba(114, 214, 255, 0.6);
}

.info-overlay .info-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.info-overlay .info-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.info-overlay .info-stat-value {
  font-weight: 700;
  color: var(--card-accent);
  font-size: 1.1rem;
}

.info-overlay .info-description {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.4;
}

.info-overlay .watch-btn {
  background: linear-gradient(135deg, var(--card-primary), var(--card-secondary));
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px var(--card-glow);
  transition: all 0.3s ease;
  pointer-events: all;
}

.info-overlay .watch-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px var(--card-glow);
}
/* ==================== VARIANTES DE ESTILO ==================== */


/* Estilo "Neon Glow" */
.channel-card.style-neon {
  border: 2px solid var(--card-primary);
  box-shadow: 
    0 0 20px var(--card-primary),
    0 0 40px rgba(114, 214, 255, 0.5),
    inset 0 0 20px rgba(114, 214, 255, 0.1);
}

/* Estilo "Cyberpunk" */
.channel-card.style-cyber {
  border: 2px solid var(--card-secondary);
  background: 
    linear-gradient(45deg, transparent 30%, rgba(255, 127, 255, 0.05) 50%, transparent 70%),
    rgba(20, 25, 45, 0.9);
  background-size: 200% 200%;
}

/* Estilo "Matrix" */
.channel-card.style-matrix {
  border: 2px solid var(--card-accent);
  position: relative;
  overflow: hidden;
}

/* Dark Void Theme */
.channel-card.theme-void {
  background: 
    radial-gradient(circle at 50% 50%, rgba(30, 0, 60, 0.8), rgba(0, 0, 0, 0.95)),
    linear-gradient(135deg, rgba(10, 0, 30, 0.9), rgba(0, 0, 15, 0.95));
  border-color: rgba(139, 69, 255, 0.5);
  box-shadow: 
    0 8px 40px rgba(139, 69, 255, 0.4),
    inset 0 0 30px rgba(139, 69, 255, 0.1);
}

/* Crystal Theme */
.channel-card.theme-crystal {
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.05) 0%,
      rgba(200, 230, 255, 0.08) 50%,
      rgba(255, 255, 255, 0.05) 100%);
  border: 2px solid rgba(200, 230, 255, 0.3);
  box-shadow: 
    0 8px 32px rgba(200, 230, 255, 0.2),
    inset 0 -2px 10px rgba(200, 230, 255, 0.3),
    inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

/* Fire Theme */
.channel-card.theme-fire {
  background: 
    radial-gradient(ellipse at 50% 100%, rgba(255, 50, 0, 0.3), transparent 60%),
    linear-gradient(135deg, rgba(60, 20, 10, 0.9), rgba(40, 10, 5, 0.95));
  border-color: rgba(255, 100, 0, 0.5);
  box-shadow: 
    0 8px 40px rgba(255, 100, 0, 0.4),
    inset 0 0 30px rgba(255, 150, 0, 0.15);
}

.channel-card.theme-fire::before {
  background: linear-gradient(135deg,
    #ff6b00 0%,
    #ff3300 25%,
    #ff9500 50%,
    #ff3300 75%,
    #ff6b00 100%);
}
/* ==================== CARDS ESPECIALES - PREMIUM ==================== */
.channel-card.premium {
  background: 
    linear-gradient(135deg,
      rgba(255, 215, 0, 0.1) 0%,
      rgba(255, 140, 0, 0.1) 50%,
      rgba(255, 215, 0, 0.1) 100%),
    rgba(30, 35, 55, 0.9);
  border: 2px solid gold;
  box-shadow: 
    0 8px 32px rgba(255, 215, 0, 0.3),
    inset 0 0 30px rgba(255, 215, 0, 0.1);
  animation: premiumPulse 3s ease-in-out infinite;
}

.channel-card.premium::before {
  background: linear-gradient(135deg,
    gold 0%,
    orange 50%,
    gold 100%);
}

/* Corona de premium */
.channel-card.premium .crown {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  filter: drop-shadow(0 0 10px gold);
  animation: crownFloat 3s ease-in-out infinite;
  z-index: 20;
}

@keyframes premiumPulse {
  0%, 100% { 
    box-shadow: 
      0 8px 32px rgba(255, 215, 0, 0.3),
      inset 0 0 30px rgba(255, 215, 0, 0.1);
  }
  50% { 
    box-shadow: 
      0 8px 40px rgba(255, 215, 0, 0.5),
      inset 0 0 40px rgba(255, 215, 0, 0.2);
  }
}

@keyframes crownFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

/* ==================== CARDS CON PATRÓN HEXAGONAL ==================== */
.channel-card.hex-pattern::before {
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(114, 214, 255, 0.03) 10px, rgba(114, 214, 255, 0.03) 20px),
    repeating-linear-gradient(60deg, transparent, transparent 10px, rgba(114, 214, 255, 0.03) 10px, rgba(114, 214, 255, 0.03) 20px),
    repeating-linear-gradient(120deg, transparent, transparent 10px, rgba(114, 214, 255, 0.03) 10px, rgba(114, 214, 255, 0.03) 20px);
}

/* ==================== EFECTO DE PROFUNDIDAD 3D ==================== */
.channel-card.depth-3d {
  transform-style: preserve-3d;
}

.channel-card.depth-3d .card-layer {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: inherit;
  transform: translateZ(-20px);
  opacity: 0.3;
  filter: blur(2px);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .channel-card.depth-3d:hover {
    transform: translateY(-12px) rotateX(10deg) rotateY(5deg) scale(1.03);
  }
}

/* ==================== ANIMACIÓN DE ENTRADA ESCALONADA ==================== */
@media (min-width: 768px) {
  .channel-card {
    animation: cardStaggerIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  }

  .channel-card:nth-child(1) { animation-delay: 0.05s; }
  .channel-card:nth-child(2) { animation-delay: 0.1s; }
  .channel-card:nth-child(3) { animation-delay: 0.15s; }
  .channel-card:nth-child(4) { animation-delay: 0.2s; }
  .channel-card:nth-child(5) { animation-delay: 0.25s; }
  .channel-card:nth-child(6) { animation-delay: 0.3s; }
  .channel-card:nth-child(7) { animation-delay: 0.35s; }
  .channel-card:nth-child(8) { animation-delay: 0.4s; }
  .channel-card:nth-child(n+9) { animation-delay: 0.45s; }
}

@keyframes cardStaggerIn {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.8);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ==================== ESTADOS ESPECIALES ==================== */


/* Card offline */
.channel-card.offline {
  opacity: 0.5;
  filter: grayscale(0.8);
  pointer-events: none;
}

.channel-card.offline::after {
  content: 'OFFLINE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  color: #ff4444;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.9rem;
  border: 2px solid #ff4444;
  z-index: 25;
}

/* LOADING STATE */
.channel-card.loading {
  pointer-events: none;
  opacity: 0.6;
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ==================== TOOLTIP MEJORADO ==================== */
.channel-card .tooltip {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(114, 214, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 30;
}

.channel-card .tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(10, 15, 30, 0.95);
}

@media (hover: hover) and (pointer: fine) {
  .channel-card:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ==================== CATEGORÍAS VISUALES ==================== */
.channel-card .category-icon {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(114, 214, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 3;
}

/* ==================== CATEGORÍAS CON ESTILOS ==================== */
.channel-card[data-category="sports"] {
  --card-primary: #4ade80;
  --card-secondary: #22c55e;
}

.channel-card[data-category="entertainment"] {
  --card-primary: #f59e0b;
  --card-secondary: #f97316;
}

.channel-card[data-category="news"] {
  --card-primary: #3b82f6;
  --card-secondary: #2563eb;
}


/* ==================== MODO LISTA ==================== */
.channels-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.channels-grid.list-view .channel-card {
  flex-direction: row;
  text-align: left;
  padding: 1rem 1.5rem;
  min-height: auto;
}

.channels-grid.list-view .channel-card img {
  width: 60px;
  height: 60px;
  margin-bottom: 0;
  margin-right: 1.5rem;
}

.channels-grid.list-view .channel-card.featured {
  grid-column: span 1;
  grid-row: span 1;
}

/* ==================== MODO COMPACTO ==================== */
.channels-grid.compact .channel-card {
  min-height: 120px;
  padding: 1rem;
}

.channels-grid.compact .channel-card img {
  width: 60px;
  height: 60px;
}

.channels-grid.compact .channel-card span {
  font-size: 0.85rem;
}

/* ==================== Panel de Personalización (Optimizado) ==================== */
.customize-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-left: 1px solid rgba(114, 214, 255, 0.2);
  z-index: 9999;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Sombras adaptativas para panel */
@media (hover: none) and (pointer: coarse) {
  .customize-panel {
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.4);
  }
}

@media (min-width: 1024px) and (hover: hover) {
  .customize-panel {
    box-shadow: 
      -8px 0 32px rgba(0, 0, 0, 0.4),
      inset 1px 0 0 rgba(255, 255, 255, 0.1);
  }
}

.customize-panel.active {
  right: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(114, 214, 255, 0.2);
  background: rgba(20, 20, 40, 0.6);
  position: sticky;
  top: 0;
  z-index: 1;
  transform: translateZ(0);
}

.panel-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.close-panel {
  background: rgba(114, 214, 255, 0.1);
  border: 1px solid rgba(114, 214, 255, 0.3);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--accent);
  font-size: 1.2rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
}

.close-panel:active {
  background: rgba(114, 214, 255, 0.2);
  border-color: var(--accent);
  transform: scale(0.95) translateZ(0);
  color: var(--accent-purple);
}

@media (hover: hover) {
  .close-panel:hover {
    background: rgba(114, 214, 255, 0.2);
    border-color: var(--accent);
    color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(114, 214, 255, 0.3);
  }
}

/* ==================== Controles del Panel ==================== */
.control-group {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(114, 214, 255, 0.1);
}

.control-group:last-child {
  border-bottom: none;
}

.control-group h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(20, 20, 40, 0.4);
  border-radius: var(--radius);
  border: 1px solid rgba(114, 214, 255, 0.1);
  transition: background var(--animation-speed);
}

.control-item:last-child {
  margin-bottom: 0;
}

.control-item label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
  flex: 1;
}

.control-item input[type="range"] {
  width: 100%;
  margin-top: 0.5rem;
  background: rgba(114, 214, 255, 0.1);
  border-radius: 10px;
  height: 6px;
  outline: none;
  -webkit-appearance: none;
  touch-action: pan-x;
}

.control-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(114, 214, 255, 0.6);
  transition: transform 0.1s ease;
}

.control-item input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

.control-item input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(114, 214, 255, 0.6);
  transition: transform 0.1s ease;
}

.control-item input[type="range"]::-moz-range-thumb:active {
  transform: scale(1.2);
}

.value-display {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
  min-width: 40px;
  text-align: right;
}

/* ==================== Toggle Switch ==================== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  margin-left: 0.5rem;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(114, 214, 255, 0.2);
  border: 1px solid rgba(114, 214, 255, 0.3);
  border-radius: 34px;
  transition: var(--transition);
  touch-action: manipulation;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: var(--transition);
}

input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
  background: white;
}

/* ==================== Color Picker ==================== */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.color-option {
  width: 40px;
  height: 40px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--animation-speed) ease;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
}

.color-option:active {
  transform: scale(0.9) translateZ(0);
}

.color-option.active {
  border-color: white;
  transform: scale(1.1) translateZ(0);
}

/* Sombras adaptativas para color picker */
@media (hover: none) and (pointer: coarse) {
  .color-option.active {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 8px currentColor;
  }
}

@media (min-width: 1024px) and (hover: hover) {
  .color-option.active {
    box-shadow: 
      0 0 0 2px var(--bg-card),
      0 0 15px currentColor;
  }

  .color-option:hover {
    transform: scale(1.05) translateZ(0);
    box-shadow: 0 0 10px currentColor;
  }
}

/* ==================== Botones del Panel ==================== */
.customize-panel .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
  background: rgba(114, 214, 255, 0.1);
  border: 1px solid rgba(114, 214, 255, 0.3);
  color: var(--accent);
  transition: var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding: 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.customize-panel .btn:active {
  background: rgba(114, 214, 255, 0.2);
  border-color: var(--accent);
  transform: scale(0.98);
  color: var(--accent-purple);
}

@media (hover: hover) {
  .customize-panel .btn:hover {
    background: rgba(114, 214, 255, 0.2);
    border-color: var(--accent);
    color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(114, 214, 255, 0.3);
  }
}

/* ==================== Overlay de Fondo ==================== */
.panel-overlay {
  display: none;
}

.customize-panel.active ~ .panel-overlay,
.customize-panel.active + .panel-overlay {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  animation: fadeIn 0.3s ease;
}

/* Blur adaptativo para overlay */
@media (min-width: 1024px) and (hover: hover) {
  .customize-panel.active ~ .panel-overlay,
  .customize-panel.active + .panel-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==================== Partículas Gravitacionales (Solo PC) ==================== */
@media (min-width: 1024px) and (hover: hover) {
  .gravity-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(114, 214, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 4px rgba(114, 214, 255, 0.8);
  }
}

/* ==================== Warp Speed Effect (Solo PC) ==================== */
@media (min-width: 1024px) and (hover: hover) {
  @keyframes warpSpeed {
    0% {
      transform: scaleX(1) translateX(0);
      opacity: 0;
    }
    50% {
      opacity: 1;
    }
    100% {
      transform: scaleX(3) translateX(-100vw);
      opacity: 0;
    }
  }

  .warp-line {
    position: fixed;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(114, 214, 255, 0.8), transparent);
    width: 100px;
    left: 100%;
    animation: warpSpeed 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
  }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .channel-card {
    padding: 0.75rem;
    min-height: 120px;
  }

  .channel-card img {
    width: 60px;
    height: 60px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .channel-card.featured {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 480px) {
  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .channel-card {
    padding: 0.6rem;
    min-height: 110px;
    border-radius: 16px;
  }

  .channel-card img {
    width: 50px;
    height: 50px;
  }

  .channel-card span {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .badge {
    font-size: 0.6rem;
    padding: 3px 8px;
  }

  .quality-badge {
    font-size: 0.6rem;
    padding: 3px 8px;
  }
}
/* ==================== PC High Performance ==================== */
@media (min-width: 1024px) and (hover: hover) {
  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
  }

  .channel-card {
    padding: 1.5rem;
    min-height: 180px;
  }

  .channel-card img {
    width: 90px;
    height: 90px;
  }

  .customize-panel {
    max-width: 420px;
  }

  iframe#agendaFrame {
    height: 600px;
  }
}

/* ==================== 4K/Retina Displays ==================== */
@media (min-width: 1920px) {
  .container {
    max-width: 1400px;
  }

  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
  }

  .section-title {
    font-size: 2.8rem;
  }

  .channel-card {
    min-height: 220px;
    padding: 2rem 1.5rem;
  }

  .channel-card img {
    width: 110px;
    height: 110px;
  }

  iframe#agendaFrame {
    height: 700px;
  }
}

/* ==================== Accesibilidad ==================== */
.channel-card:focus-visible {
  outline: 3px solid var(--card-primary);
  outline-offset: 3px;
}

/* ==================== Preferencias de Movimiento Reducido ==================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .channel-card:hover {
    transform: scale(1.02);
  }
}

/* ==================== Optimización de Fuentes ==================== */
@media (hover: none) and (pointer: coarse) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
  }
}

@media (min-width: 1024px) {
  body {
    text-rendering: optimizeLegibility;
  }
}

/* ==================== Fix Safari iOS ==================== */
@supports (-webkit-touch-callout: none) {
  .customize-panel {
    height: -webkit-fill-available;
  }

  body {
    min-height: -webkit-fill-available;
  }
}

/* ==================== Optimización de Imágenes ==================== */
.channel-card img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

@media (min-width: 1024px) {
  .channel-card img {
    image-rendering: auto;
  }
}

/* ==================== Prevenir Selección No Deseada ==================== */
.channel-card,
.close-panel,
.color-option {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.info-banner,
.section-title,
.control-group h3,
.control-item label {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ==================== Fix Notch en Móviles ==================== */
@supports (padding-top: env(safe-area-inset-top)) {
  .customize-panel {
    padding-top: env(safe-area-inset-top);
  }
}

/* ==================== Prevenir Overscroll ==================== */
body,
.customize-panel {
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
}

/* ==================== Smooth Scrolling Adaptativo ==================== */
html {
  scroll-behavior: smooth;
}

@media (hover: none) and (pointer: coarse) {
  html {
    scroll-behavior: auto;
  }
}

/* ==================== Optimización Android Específica ==================== */
@media (hover: none) and (pointer: coarse) {
  body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  /* Simplificar transiciones en móviles */
  .channel-card,
  .channel-card img {
    transition: transform var(--animation-speed) ease;
  }

  /* Área táctil mínima recomendada */
  .close-panel,
  .color-option,
  .customize-panel .btn {
    min-width: 44px;
    min-height: 44px;
  }

  /* Prevenir zoom accidental */
  input[type="range"] {
    font-size: 16px;
  }
}

/* ==================== Optimización Landscape en Móviles ==================== */
@media (max-width: 768px) and (orientation: landscape) {
  .customize-panel {
    height: 100vh;
    max-height: 100vh;
  }

  .channel-card {
    min-height: 100px;
  }

  .channel-card img {
    width: 50px;
    height: 50px;
  }
}

/* ==================== Performance: Will-Change Inteligente ==================== */
@media (hover: hover) and (pointer: fine) {
  /* Solo activar will-change durante interacción en PC */
  .channel-card:hover,
  .channel-card:focus {
    will-change: transform;
  }

  .channel-card:not(:hover):not(:focus) {
    will-change: auto;
  }
}

@media (hover: none) and (pointer: coarse) {
  /* En móviles, minimizar uso de will-change */
  .channel-card:active {
    will-change: transform;
  }
}

/* ==================== Hardware Acceleration Selectivo ==================== */
.channel-card,
.customize-panel,
.close-panel,
.color-option,
iframe#agendaFrame {
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

/* ==================== Contraste Alto ==================== */
@media (prefers-contrast: high) {
  :root {
    --text-secondary: #ffffff;
    --accent: #ffffff;
    --accent-purple: #ff00ff;
  }

  .channel-card,
  .customize-panel .btn {
    border: 2px solid var(--accent);
  }
}

/* ==================== Modo Oscuro del Sistema ==================== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-dark: #000014;
    --bg-card: rgba(10, 10, 20, 0.9);
  }

  .channel-card {
    background: linear-gradient(135deg,
      rgba(5, 10, 20, 0.95) 0%,
      rgba(10, 15, 25, 0.9) 50%,
      rgba(5, 10, 20, 0.95) 100%);
  }
}

/* ==================== Optimización de Performance Final ==================== */

/* Reducir complejidad en móviles de gama baja */
@media (hover: none) and (pointer: coarse) and (max-width: 768px) {
  /* Eliminar backdrop-filter en móviles viejos si es necesario */
  @supports not (backdrop-filter: blur(4px)) {
    .info-banner,
    .channel-card,
    .customize-panel {
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      background: rgba(20, 20, 40, 0.95);
    }
  }

  /* Ocultar elementos decorativos pesados */
  .channel-card .scan-line,
  .channel-card .particle,
  .channel-card .info-overlay {
    display: none;
  }
}

/* Optimización para conexiones lentas */
@media (prefers-reduced-data: reduce) {
  /* Deshabilitar animaciones costosas */
  .info-banner::before,
  .section-title,
  .channel-card::before {
    animation: none;
  }

  /* Simplificar sombras */
  .channel-card,
  iframe#agendaFrame {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

/* ==================== Presets de Rendimiento ==================== */

/* Modo Ultra Performance (activado por JavaScript) */
body.ultra-performance .channel-card::before,
body.ultra-performance .channel-card::after,
body.ultra-performance .scan-line,
body.ultra-performance .particle {
  display: none !important;
}

body.ultra-performance .channel-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Modo Ahorro de Batería */
body.battery-saver * {
  animation-play-state: paused !important;
  transition: none !important;
}

body.battery-saver .channel-card::before,
body.battery-saver .channel-card::after {
  display: none;
}

/* ==================== Preset Buttons Styles ==================== */
.preset-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.preset-btn {
  background: rgba(20, 20, 40, 0.6);
  border: 2px solid rgba(114, 214, 255, 0.2);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--animation-speed);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  color: var(--text-primary);
  touch-action: manipulation;
}

.preset-btn .preset-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.preset-btn .preset-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
}

.preset-btn .preset-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.preset-btn.active {
  background: rgba(114, 214, 255, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(114, 214, 255, 0.3);
}

.preset-btn:active {
  transform: scale(0.95);
}

@media (hover: hover) {
  .preset-btn:hover {
    background: rgba(114, 214, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 214, 255, 0.2);
  }
}

/* ==================== Performance Info ==================== */
.performance-info {
  background: rgba(20, 20, 40, 0.6);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid rgba(114, 214, 255, 0.2);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid rgba(114, 214, 255, 0.1);
}

.info-row span {
  color: var(--text-secondary);
}

.info-row strong {
  color: var(--accent);
  font-weight: 700;
}

/* ==================== Loading State Global ==================== */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ==================== Landscape en Móviles Extra ==================== */
@media (max-width: 768px) and (orientation: landscape) {
  .channels-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==================== Muy Pantallas Pequeñas ==================== */
@media (max-width: 360px) {
  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .channel-card {
    padding: 0.5rem;
    min-height: 100px;
    border-radius: 14px;
  }

  .channel-card img {
    width: 45px;
    height: 45px;
  }

  .channel-card span {
    font-size: 0.75rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .badge {
    font-size: 0.55rem;
    padding: 2px 6px;
  }

  .quality-badge {
    font-size: 0.6rem;
    padding: 3px 8px;
  }
}

/* ==================== Pantallas Ultra Anchas ==================== */
@media (min-width: 2560px) {
  .container {
    max-width: 1800px;
  }

  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2.5rem;
  }

  .channel-card {
    min-height: 260px;
    padding: 2.5rem 2rem;
  }

  .channel-card img {
    width: 130px;
    height: 130px;
  }

  .channel-card span {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 3.5rem;
  }
}

/* ==================== Print Styles ==================== */
@media print {
  .channel-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 2px solid #333;
  }

  .channel-card::before,
  .channel-card::after,
  .scan-line,
  .particle,
  .ripple,
  .badge,
  .quality-badge,
  .info-overlay,
  .customize-panel,
  .panel-overlay {
    display: none !important;
  }

  .channels-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

/* ==================== Dark Mode Toggle Support ==================== */
body.light-mode .channel-card {
  background: linear-gradient(135deg,
    rgba(240, 245, 250, 0.8) 0%,
    rgba(230, 240, 250, 0.6) 50%,
    rgba(240, 245, 250, 0.8) 100%);
  color: #1a1a1a;
}

body.light-mode .channel-card span {
  color: #1a1a1a;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* ==================== Animaciones Personalizadas Adicionales ==================== */

/* Efecto de respiración para cards premium */
@keyframes breathe {
  0%, 100% { 
    box-shadow: 
      0 8px 32px rgba(255, 215, 0, 0.3),
      inset 0 0 30px rgba(255, 215, 0, 0.1);
  }
  50% { 
    box-shadow: 
      0 8px 40px rgba(255, 215, 0, 0.5),
      inset 0 0 40px rgba(255, 215, 0, 0.2);
  }
}

.channel-card.premium {
  animation: breathe 4s ease-in-out infinite;
}

/* ==================== Optimización Content Visibility ==================== */
@supports (content-visibility: auto) {
  .channel-card {
    content-visibility: auto;
    contain-intrinsic-size: 180px;
  }
}

/* ==================== Intersection Observer Support ==================== */
.channel-card.lazy-load {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.channel-card.lazy-load.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== GPU Acceleration Hints ==================== */
@media (min-width: 1024px) and (hover: hover) {
  .channel-card:hover {
    will-change: transform, box-shadow;
  }
}

/* ==================== Reduced Transparency Mode ==================== */
@media (prefers-reduced-transparency: reduce) {
  .channel-card,
  .customize-panel,
  .info-banner {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(20, 25, 45, 0.98);
  }
}

/* ==================== High Refresh Rate Optimization ==================== */
@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
  .channel-card,
  .channel-card img,
  .badge {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* ==================== Custom Scrollbar for Panel ==================== */
.customize-panel::-webkit-scrollbar {
  width: 10px;
}

.customize-panel::-webkit-scrollbar-track {
  background: rgba(10, 15, 30, 0.8);
  border-radius: 5px;
}

.customize-panel::-webkit-scrollbar-thumb {
  background: rgba(114, 214, 255, 0.6);
  border-radius: 5px;
}

.customize-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(114, 214, 255, 0.8);
}

/* ==================== Focus Within Enhancement ==================== */
.channel-card:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 3px var(--accent);
}

/* ==================== Skeleton Loading Placeholders ==================== */
.channel-card.skeleton {
  pointer-events: none;
  background: 
    linear-gradient(90deg,
      rgba(20, 25, 45, 0.8) 25%,
      rgba(30, 35, 55, 0.8) 50%,
      rgba(20, 25, 45, 0.8) 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s ease-in-out infinite;
}

.channel-card.skeleton * {
  opacity: 0;
}

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==================== Empty State ==================== */
.channels-grid.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-message {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state-description {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ==================== Notification Badges ==================== */
.channel-card .notification-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff0844;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 0 10px rgba(255, 8, 68, 0.6);
  z-index: 4;
}

/* ==================== Fin del CSS Completo ==================== */