 /* Estilos actualizados para el splash container */
.splash-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeOut 1.5s ease-in-out forwards;
    overflow: hidden;
}

.splash-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra todo el contenedor */
    object-position: center; /* Centra la imagen */
    
}

@keyframes scaleIn {
    0% {
        transform: scale(1.1);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

 
:root {
  /* Light Theme Variables - Mejorados para contraste */
  --bg-primary: #f4f6f9;
  --bg-secondary: #ffffff;
  --text-primary: #2d3748;    /* Oscurecido para mejor contraste */
  --text-secondary: #4a5568;  /* Oscurecido para mejor contraste */
  --accent-color: #2c4358;    /* Ajustado para contraste mínimo 4.5:1 */
  --inactive-color: #4a5568;  /* Ajustado para mejor visibilidad */
  --shadow-color: rgba(0,0,0,0.1);
  --nav-bg: #ffffff;
}

/* Dark Theme Variables */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #06141B;
    --bg-secondary: #11212D;
    --text-primary: #e2e8f0;    /* Aclarado para mejor contraste */
    --text-secondary: #cbd5e0;  /* Aclarado para mejor contraste */
    --accent-color: #81a5c6;    /* Aclarado para contraste mínimo 4.5:1 */
    --inactive-color: #a0aec0;  /* Ajustado para mejor visibilidad */
    --shadow-color: rgba(0, 0, 0, 0.3);
    --nav-bg: #11212D;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) transparent;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 70px;
  overflow-x: hidden;
}

body::-webkit-scrollbar,
.content::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
  border-radius: 10px;
}

/* Mejoras de scroll */
body, .content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.content {
  display: none;
  flex-grow: 1;
  padding: 20px;
  max-height: calc(100vh - 130px); /* Resta altura de nav */
  overflow-y: auto;
  background-color: var(--bg-primary);
}

.content.active {
  display: block;
}
:root {
  --nav-bg: #ffffff;
  --text-color: #333333;
  --accent-color: #3a5672;
  --inactive-color: #6e8092;  /* Color actualizado para items inactivos */
  --shadow: rgba(0, 0, 0, 0.1);
}

/* Estilos para el contenedor principal */
body {
    margin: 0;
    padding-bottom: 70px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Contenedor principal de contenido */
.content {
    display: none;
    flex-grow: 1;
    padding: 20px;
    padding-bottom: 84px;
    background-color: var(--bg-primary);
    overflow-y: auto;
    min-height: calc(100vh - 70px);
    position: relative;
}

.content.active {
    display: block;
}

/* Navegación fija */
nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--nav-bg);
    box-shadow: 0 -1px 3px var(--shadow-color);
    padding: 8px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Estilos para los items de navegación */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--inactive-color);
    gap: 4px;
    padding: 4px;
    transition: transform 0.2s ease;
    flex: 1;
    min-width: 48px;
    max-width: 64px;
}

/* Estilos SVG simplificados */
.nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

/* Texto de navegación */
.nav-item span {
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-weight: 500;
}

/* Solo expansión en estado activo */
.nav-item.active {
    transform: scale(1.15);
}

/* Fix para iOS */
@supports (-webkit-touch-callout: none) {
    nav {
        height: calc(70px + env(safe-area-inset-bottom));
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* Media queries para pantallas más grandes */
@media (min-width: 768px) {
    nav {
        height: 80px;
        padding: 12px 8px;
    }
    
    .nav-item {
        max-width: 80px;
    }
    
    .nav-item svg {
        width: 24px;
        height: 24px;
    }
    
    .nav-item span {
        font-size: 12px;
    }
}

/* Tema oscuro */
@media (prefers-color-scheme: dark) {
  :root {
    --nav-bg: #11212D;
    --text-color: #ffffff;
    --accent-color:#3a5672 ;
    --inactive-color: #6e8092;  /* Mantenemos el mismo color inactivo en modo oscuro */
    --shadow: rgba(0, 0, 0, 0.3);
  }
}

.search-container {
  background-color: var(--bg-secondary);
  padding: 0px;
  border-radius: 15px;
  margin-bottom: 5px;
  box-shadow: 0 4px 6px var(--shadow-color);
 transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}
.search-bar {
  width: 100%;
  padding: 15px;
  border: 0px solid transparent; /* Hace que el borde sea transparente */
  border-radius: 20px;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  outline: none; /* Elimina el contorno predeterminado al hacer clic */
  transition: background-color 0.3s ease;
}

.search-bar:focus {
  background-color: var(--bg-primary); /* Mantiene el mismo color de fondo */
  box-shadow: 0 0 5px rgba(95, 158, 160, 0.3); /* Opcional: añade un sutil efecto de sombra al hacer foco */
}

.categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 20px ;
  margin-bottom: 5px;
  padding-left: 10px; /* Add this line */
}

.category-btn {
  padding: 3px 15px;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn.active  {
 background-color: var(--accent-color);
  color:white;
   transform: scale(1.15);
}
 
.category-btn:hover {
  background-color: var(--accent-color);
  color: white;
   transform: scale(1.15);
}



/* Cuadrícula de Recursos */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 15px;
  padding-bottom: calc(var(--nav-height) + 20px);
}

@media (min-width: 600px) {
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .resource-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.resource-card {
  background-color: var(--bg-secondary);
  border-radius: 15px;
  padding: 0;
  text-align: center;
  box-shadow: 0 4px 6px var(--shadow-color);
  transition: transform 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--shadow-color);
}

.resource-card:hover {
  transform: scale(1.1);
}

.resource-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.resource-card h3 {
  padding: 10px;
  margin: 0;
  font-size: 18px;
  color: var(--text-primary);
}

.resource-card p {
  padding: 5px;
  margin: 0;
  background-color: var(--bg-primary);
  font-size: 14px;
  color: var(--text-secondary);
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--bg-secondary);
  margin: 15% auto;
  padding: 0px;
  border-radius: 15px;
  width: 100%;
  max-width:2000px;
  text-align: center;
  position: relative;
  color: var(--text-primary);
}

.close-btn {
  color: var(--text-secondary);
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

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

.modal-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  margin-top: 15px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}
 nav a {
  flex-grow: 1; /* Distribuye el espacio uniformemente */
  text-align: center;
  max-width: 20%; /* Limita el ancho máximo de cada opción */
  overflow: hidden; /* Evita que el texto se desborde */
  white-space: nowrap; /* Evita el salto de línea */
  text-overflow: ellipsis; /* Agrega puntos suspensivos si es muy largo */
}

.fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  z-index: 2500;
  display: none;
  justify-content: center;
  align-items: center;
}

.fullscreen-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.close-fullscreen {
  position: absolute;
  top: 0px;
  right: 10px;
  color: black;
  font-size: 25px;
  cursor: pointer;
  z-index: 2600;
   color: var(--text-primary);
}
 

.content:not(.active) {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}


}
 .content {
    display: block;  /* Mantén esto */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    pointer-events: none;
}

.content.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
 
/* Contenedor del logo */
.barra-logo {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    padding: 8px;
    z-index: 1000;
    border-bottom: 0px solid var(--accent-color);
}

.logo-image {
    height: 35px; /* Altura fija para el logo */
    width:autox; /* El ancho se ajustará automáticamente */
    object-fit: contain;
    cursor: pointer;
    padding: 0 10px;
}

/* Media query para pantallas más pequeñas */
@media (max-width: 768px) {
    .logo-image {
        height: 35px; /* Ligeramente más pequeño en móviles */
    }
}

  .container {
            margin-top: 0;
            margin-bottom: 20px;
            display: flex;
            justify-content: center;
            width: 100%;
        }
 .youtube-card {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            padding: 15px;
            width: 375px;
            transition: transform 0.3s ease;
        }
     
        

        /* Dark Mode */
        @media (prefers-color-scheme: dark) {
            .youtube-card {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  box-shadow: 0 2px 4px var(--shadow-color);
  display: flex;
  align-items: center;
  padding: 15px;
  width: 375px;
  transition: transform 0.3s ease;
}
            .channel-name {
                color: #FFFFFF !important;
            }
            .subscribers {
                color: #B0B0B0 !important;
            }
            body {
                background-color: #121212;
            }
        }

        .youtube-card:hover {
            transform: scale(1.02);
        }
        .channel-image {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            border: 0px solid #FF0000;
            margin-right: 15px;
        }
        .channel-info {
            flex-grow: 1;
        }
        .channel-name {
            font-size: 20px;
            font-weight: bold;
            color: #030303;
            margin-bottom: 5px;
        }
        .subscribers {
            color: #606060;
            font-size: 12px;
        }
        .subscribe-btn {
            background-color: #FF0000;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 18px;
            font-weight: bold;
            font-size: 14px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        .subscribe-btn:hover {
            background-color: #CC0000;
        }

  #placeholderText {
      font-family: Arial, sans-serif;
      font-size: 14px;
      color: gray;
      text-align: center;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      pointer-events: none;
    }

    .animated-text {
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.5s ease, transform 0.5s ease;
      font-size: 18px;
      line-height: 1.6;
      color: #444;
    }

    .animated-text.visible {
      opacity: 1;
      transform: translateY(0);
    }
