/* ==================== ANGULISMOTV - INDEX MAIN RETRO 2006-2012 ==================== */
/* Archivo unificado con estética Windows Vista/Mac OS X Leopard */

/* ==================== Variables Retro ==================== */
:root {
  /* Colores Retro */
  --retro-blue: #2196F3;
  --retro-blue-light: #64B5F6;
  --retro-blue-dark: #1976D2;
  --retro-green: #4CAF50;
  --retro-orange: #FF9800;
  --retro-purple: #9C27B0;
  
  /* Grises con tinte */
  --retro-bg: #E8E8E8;
  --retro-bg-dark: #2C3E50;
  --retro-card: #FFFFFF;
  --retro-text: #2C3E50;
  --retro-text-light: #7F8C8D;
  
  /* Efectos */
  --retro-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  --retro-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.4);
  --retro-radius: 12px;
  --retro-transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== Reset & Base ==================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', 'Lucida Grande', Tahoma, Geneva, Verdana, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--retro-text);
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  
  /* Fondo azul Windows XP Luna */
  background: 
    radial-gradient(ellipse at top right, #5A8FD4 0%, #2865C7 50%, #0D4FA3 100%),
    linear-gradient(180deg, #3D6FB8 0%, #1C4F9C 100%);
  background-size: cover;
  background-attachment: fixed;
}

/* Patrón de cuadrícula sutil */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

/* Brillo animado de fondo - solo PC */
@media (min-width: 1024px) and (hover: hover) {
  body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, 
      rgba(255, 255, 255, 0.1) 0%, 
      transparent 70%);
    animation: bgPulse 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
  }

  @keyframes bgPulse {
    0%, 100% { 
      transform: translate(0, 0) scale(1);
      opacity: 0.3;
    }
    50% { 
      transform: translate(-10%, -10%) scale(1.1);
      opacity: 0.5;
    }
  }
}

/* ==================== Container ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* ==================== Main Content ==================== */
main {
  padding: 2rem 0;
  position: relative;
  z-index: 2;
}

/* ==================== Info Banner Tipo Barra de Windows ==================== */
.info-banner {
  background: linear-gradient(180deg,
    #FFF9C4 0%,
    #FFF59D 50%,
    #FFF176 100%);
  border: 1px solid #FFD54F;
  border-radius: var(--retro-radius);
  padding: 15px 20px;
  margin: 20px 0;
  box-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #5D4037;
  font-weight: 600;
  text-align: center;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.info-banner::before {
  content: '⚠️';
  font-size: 1.5rem;
  margin-right: 10px;
  vertical-align: middle;
}

.info-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.5), 
    transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.info-banner a {
  color: var(--retro-blue);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
}

.info-banner a:hover {
  color: var(--retro-blue-dark);
  text-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
}

/* ==================== Iframe Tipo Ventana de Windows ==================== */
iframe#agendaFrame {
  width: 100%;
  height: 700px;
  border-radius: var(--retro-radius);
  border: 3px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
  background: white;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* ==================== Channels Section ==================== */
.channels-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding: 2rem 0;
}

/* ==================== Section Title Tipo Web 2.0 ==================== */
.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin: 30px 0;
  position: relative;
  color: #FFFFFF;
  text-shadow: 
    0 2px 0 rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 255, 255, 0.5);
  
  /* Gradiente de texto brillante */
  background: linear-gradient(180deg, #FFFFFF 0%, #E0E0FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  
  /* Reflejo debajo */
  padding-bottom: 50px;
}

.section-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: scaleY(-1);
  opacity: 0.3;
  filter: blur(2px);
}

/* ==================== Channels Grid Tipo Dock ==================== */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--retro-radius);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ==================== Cards Estilo Glossy/Gel ==================== */
.channel-card {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(240, 240, 255, 0.9) 50%,
    rgba(220, 220, 240, 0.95) 100%);
  border-radius: var(--retro-radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--retro-transition);
  
  /* Borde brillante */
  border: 2px solid rgba(255, 255, 255, 0.5);
  
  /* Sombra definida */
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Brillo superior tipo Vista/Aero */
.channel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%);
  border-radius: var(--retro-radius) var(--retro-radius) 0 0;
  pointer-events: none;
}

/* Reflejo inferior */
.channel-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(0deg,
    rgba(0, 0, 0, 0.1) 0%,
    transparent 100%);
  pointer-events: none;
}

/* ==================== Hover Effect Tipo Dock de Mac ==================== */
.channel-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 30px rgba(33, 150, 243, 0.5);
  border-color: var(--retro-blue-light);
}

/* Animación bouncy */
.channel-card:active {
  animation: bounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounce {
  0%, 100% { transform: translateY(-10px) scale(1.05); }
  50% { transform: translateY(-15px) scale(1.1); }
}

/* ==================== Imagen con Efecto de Cristal ==================== */
.channel-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  
  /* Evitar deformación de imágenes */
  object-fit: cover;
  object-position: center;
  
  /* Borde tipo Vista */
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.1);
  
  transition: var(--retro-transition);
}

.channel-card:hover img {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    0 0 20px rgba(33, 150, 243, 0.6);
}

/* ==================== Texto con Sombra Suave ==================== */
.channel-card span {
  display: block;
  font-weight: bold;
  font-size: 1rem;
  color: var(--retro-text);
  text-shadow: 
    0 1px 2px rgba(255, 255, 255, 0.8),
    0 -1px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

/* ==================== Badges Estilo Web 2.0 ==================== */
.channel-card .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(180deg, #FF6B6B 0%, #EE5A52 100%);
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 2;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 
      0 2px 6px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 
      0 4px 12px rgba(255, 107, 107, 0.6),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
}

/* ==================== Quality Badge Tipo Windows Media ==================== */
.channel-card .quality-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: linear-gradient(180deg, 
    rgba(100, 181, 246, 0.95) 0%, 
    rgba(33, 150, 243, 0.95) 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  z-index: 2;
}

.quality-badge.hd {
  background: linear-gradient(180deg, #81C784 0%, #66BB6A 100%);
}

.quality-badge.full-hd {
  background: linear-gradient(180deg, #64B5F6 0%, #2196F3 100%);
}

.quality-badge.ultra-hd {
  background: linear-gradient(180deg, #FFD54F 0%, #FFA000 100%);
  animation: goldShine 2s ease-in-out infinite;
}

@keyframes goldShine {
  0%, 100% { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 2px 12px rgba(255, 193, 7, 0.8); }
}

/* ==================== Footer Estilo Barra de Tareas ==================== */


/* ==================== Scrollbar Estilo Windows 7 ==================== */
@media (min-width: 1024px) and (hover: hover) {
  ::-webkit-scrollbar {
    width: 16px;
    height: 16px;
  }

  ::-webkit-scrollbar-track {
    background: linear-gradient(90deg, 
      rgba(230, 235, 245, 0.9) 0%, 
      rgba(240, 245, 255, 0.9) 100%);
    border: 1px solid rgba(200, 210, 230, 0.8);
    border-radius: 2px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
  }

  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
      rgba(180, 200, 230, 0.95) 0%,
      rgba(150, 180, 220, 0.9) 50%,
      rgba(180, 200, 230, 0.95) 100%);
    border-radius: 8px;
    border: 1px solid rgba(130, 160, 200, 0.8);
    box-shadow: 
      0 2px 6px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      inset 0 -1px 2px rgba(0, 0, 0, 0.1);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
      rgba(100, 181, 246, 0.95) 0%,
      rgba(64, 169, 255, 0.9) 50%,
      rgba(100, 181, 246, 0.95) 100%);
    box-shadow: 
      0 2px 8px rgba(33, 150, 243, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      0 0 12px rgba(33, 150, 243, 0.4);
  }

  ::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg,
      rgba(33, 150, 243, 0.95) 0%,
      rgba(25, 118, 210, 0.9) 50%,
      rgba(33, 150, 243, 0.95) 100%);
  }

  /* Botones de scrollbar */
  ::-webkit-scrollbar-button {
    height: 16px;
    width: 16px;
    background: linear-gradient(180deg, 
      rgba(230, 235, 245, 0.95) 0%, 
      rgba(210, 220, 240, 0.95) 100%);
    border: 1px solid rgba(180, 190, 210, 0.8);
    box-shadow: 
      0 1px 3px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }

  ::-webkit-scrollbar-button:hover {
    background: linear-gradient(180deg, 
      rgba(200, 220, 245, 0.95) 0%, 
      rgba(180, 210, 240, 0.95) 100%);
  }

  ::-webkit-scrollbar-button:active {
    background: linear-gradient(180deg, 
      rgba(150, 180, 220, 0.95) 0%, 
      rgba(130, 170, 220, 0.95) 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  }
}

/* Scrollbar simplificada en móviles */
@media (hover: none) and (pointer: coarse) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  ::-webkit-scrollbar-track {
    background: rgba(230, 235, 245, 0.8);
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(150, 180, 220, 0.8);
    border-radius: 4px;
  }
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 180, 220, 0.9) rgba(230, 235, 245, 0.9);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
  }

  .channel-card {
    padding: 15px;
  }

  .channel-card img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    object-position: center;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .channel-card {
    padding: 12px;
  }

  .channel-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    object-position: center;
  }

  .channel-card span {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* ==================== Accesibilidad ==================== */
.channel-card:focus-visible {
  outline: 3px solid var(--retro-blue);
  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) {
  body {
    min-height: -webkit-fill-available;
  }
}

/* ==================== Prevenir Overscroll ==================== */
body {
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
}

/* ==================== Hardware Acceleration ==================== */
.channel-card,
.section-title {
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

/* ==================== FIN DEL ARCHIVO ==================== */