/* ==========================================
   index.css - Estilos específicos para index.html
   Proyecto: Super X Immersive Cards
   
   Contiene los estilos de la página principal de bienvenida,
   optimizado para dispositivos móviles y experiencia visual atractiva.
   Actualizado con sistema de variables Negro/Oro Premium.
========================================== */

/* =====================
   LAYOUT PRINCIPAL INDEX
===================== */
#index_main {
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem;
  gap: 2rem;
  min-height: 100vh;
  text-align: center;
}

/* =====================
   LOGO INDEX
===================== */
#index_logo {
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: var(--filter-gold-glow);
  animation: logoGlow 3s ease-in-out infinite alternate;
}

#index_logo:hover {
  transform: scale(1.02);
  filter: var(--filter-gold-glow-strong);
}

@keyframes logoGlow {
  0% {
    filter: var(--filter-gold-glow-soft);
  }
  100% {
    filter: var(--filter-gold-glow-strong);
  }
}

/* =====================
   CONTENIDO TEXTUAL
===================== */

/* Título principal */
#index_title {
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
  
  /* Efecto de gradiente dorado en el texto */
  background: var(--gradient-text-gold);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  
  /* Sombra de texto para profundidad */
  text-shadow: var(--text-shadow-gold);
  
  /* Animación sutil del gradiente */
  animation: titleShimmer 4s ease-in-out infinite;
}

@keyframes titleShimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Instrucciones principales */
#index_instructions {
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 90vw;
  margin: 0 auto 1.5rem;
  
  /* Sombra de texto para legibilidad */
  text-shadow: var(--text-shadow-medium);
  
  /* Animación de aparición */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUpInstructions 1s ease-out 0.3s forwards;
}

/* Nota adicional */
#index_note {
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-subtle);
  line-height: 1.4;
  max-width: 85vw;
  margin: 0 auto;
  opacity: 0.8;
  
  /* Sombra sutil */
  text-shadow: var(--text-shadow-soft);
  
  /* Animación de aparición con delay */
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

/* =====================
   ANIMACIONES DE ENTRADA
===================== */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 0.8;
    transform: translateY(0);
  }
}

/* Animación específica para instrucciones */
@keyframes fadeInUpInstructions {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================
   EFECTOS VISUALES ADICIONALES
===================== */

/* Resplandor de fondo sutil dorado */
#index_main::before {
  content: '';
  position: fixed;
  top: 20%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
  animation: pulseGoldGlow 6s ease-in-out infinite;
}

@keyframes pulseGoldGlow {
  0%, 100% {
    opacity: 0.3;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translateX(-50%) scale(1.2);
  }
}

/* =====================
   RESPONSIVE DESIGN
===================== */

/* Tablets */
@media (max-width: 768px) {
  #index_main {
    padding: 1.5rem 1.2rem;
    gap: 1.5rem;
  }
  
  #index_logo {
    margin-bottom: 1.2rem;
  }
  
  #index_title {
    margin-bottom: 0.8rem;
  }
  
  #index_instructions {
    margin-bottom: 1.2rem;
  }
}

/* Móviles */
@media (max-width: 480px) {
  #index_main {
    padding: 1rem 1rem;
    gap: 1.2rem;
  }
  
  #index_logo {
    margin-bottom: 1rem;
  }
  
  #index_title {
    margin-bottom: 0.6rem;
    /* Reducir el efecto de gradiente en móviles para mejor rendimiento */
    animation-duration: 6s;
  }
  
  #index_instructions {
    margin-bottom: 1rem;
  }
}

/* Dispositivos muy pequeños */
@media (max-width: 360px) {
  #index_main {
    padding: 0.8rem 0.8rem;
    gap: 1rem;
  }
  
  #index_logo {
    margin-bottom: 0.8rem;
  }
  
  #index_title {
    margin-bottom: 0.5rem;
  }
  
  #index_instructions {
    margin-bottom: 0.8rem;
  }
}

/* =====================
   ORIENTACIÓN LANDSCAPE MÓVIL
===================== */
@media (orientation: landscape) and (max-height: 600px) {
  #index_main {
    padding: 1rem 2rem;
    gap: 1rem;
    justify-content: flex-start;
    padding-top: 2rem;
  }
  
  #index_logo {
    height: 15vh;
    margin-bottom: 0.5rem;
  }
  
  #index_title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 0.5rem;
  }
  
  #index_instructions,
  #index_note {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  }
}

/* =====================
   MODO OSCURO ESPECÍFICO
===================== */
@media (prefers-color-scheme: dark) {
  /* Los estilos base ya están optimizados para modo oscuro */
  /* Ajustes específicos si fueran necesarios */
  
  #index_note {
    color: var(--text-subtle);
  }
}

/* =====================
   ACCESIBILIDAD Y RENDIMIENTO
===================== */
@media (prefers-reduced-motion: reduce) {
  /* Deshabilitar animaciones para usuarios que prefieren movimiento reducido */
  #index_title,
  #index_instructions,
  #index_note,
  #index_main::before,
  #index_logo {
    animation: none !important;
    transition: none !important;
  }
  
  /* Mostrar elementos inmediatamente sin animación */
  #index_title,
  #index_instructions {
    opacity: 1 !important;
    transform: none !important;
  }
  
  #index_note {
    opacity: 0.8 !important;
    transform: none !important;
  }
}

/* Mejora de contraste para mejor legibilidad */
@media (prefers-contrast: high) {
  #index_title {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--text-shadow-dark);
  }
  
  #index_instructions {
    color: var(--text-primary);
  }
  
  #index_note {
    color: var(--text-muted);
  }
}