/* =========================================================
   INDEX.CSS — COMPLETO
   Conserva estilos existentes y añade el landing del splash
   con animaciones y botón START. Todo lo del splash está
   bajo body.splash para no afectar chat.html.
   ========================================================= */

/* ---------- BASE / EXISTENTE ---------- */
@keyframes fadeInTransition {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

html, body {
  margin: 0; padding: 0;
  height: 100%; width: 100%;
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
  /* No forzamos overflow global para no afectar chat.html */
}

/* Fondo "legacy" previo (lo mantengo por compatibilidad con tu app) */
body {
  display: flex; flex-direction: column; align-items: center;
  background-image:
    url('https://static.wixstatic.com/media/86b1c8_db2a61ccfc33487cadc257663f491523~mv2.png'),
    linear-gradient(to bottom, #5c3d99, #4c64ae);
  background-repeat: no-repeat, no-repeat;
  background-position: center center, center center;
  background-size: contain, cover;
  background-color: #5c3d99;
}

/* ---------- HEADER / KARAOKE (EXISTENTE) ---------- */
.app-header {
  width: 100%;
  box-sizing: border-box;
  padding: 2rem;
  animation: fadeInTransition 1s ease-out forwards;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
  display: flex; align-items: center; justify-content: center;
}

.header-left { position: absolute; left: 2rem; display: flex; align-items: center; gap: 1rem; }
.title-container { text-align: center; }

.header-logo { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
@keyframes pulse { 0% { transform: scale(1);} 50% { transform: scale(1.8);} 100% { transform: scale(1);} }
.header-logo.pulsing { animation: pulse 1.2s infinite ease-in-out; }

h1 { font-size: 3rem; margin: 0; font-weight: 700; letter-spacing: 1.5px; }
p  { font-size: 1.25rem; margin: .5rem 0 0; font-weight: 400; opacity: 0; animation: fadeInTransition 1s ease-out .5s forwards; }

.audio-button {
  background-color: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%; width: 48px; height: 48px;
  cursor: pointer; display:flex; align-items:center; justify-content:center;
  transition: background-color .3s ease, transform .2s ease;
  padding: 0; color: #fff; flex-shrink: 0;
}
.audio-button:hover { background-color: rgba(255,255,255,.2); transform: scale(1.1); }
.audio-button svg { width: 24px; height: 24px; fill: currentColor; transition: margin .2s ease-in-out; }
.audio-button:not(.playing) svg { margin-left: 3px; }
.audio-button.playing svg { margin-left: 0; }

#lyrics-container {
  text-align: center; margin-top: -1rem; max-width: 90%;
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease-out, visibility .5s ease-out;
  text-shadow: 0 2px 4px rgba(0,0,0,.7); z-index: 1;
}
#lyrics-container.visible { opacity: 1; visibility: visible; }

.lyric-line {
  font-size: 2.6rem; font-weight: 500; margin: .5em 0; color: #fff; opacity: .7;
  transition: all .4s ease-in-out; transform: scale(.95);
}
.lyric-line.active {
  opacity: 1; font-weight: 700; transform: scale(1);
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

/* Responsive existentes */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  .app-header { padding: 1.5rem; }
  .header-left { left: 1.5rem; gap: .75rem; }
  .header-logo { width: 44px; height: 44px; }
  .audio-button { width: 44px; height: 44px; }
  .audio-button svg { width: 22px; height: 22px; }
  .lyric-line { font-size: 2.2rem; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  p { font-size: 1rem; }
  .app-header { padding: 1.5rem 1rem; }
  .header-left { left: 1rem; gap: .5rem; }
  .header-logo { width: 40px; height: 40px; }
  .audio-button { width: 40px; height: 40px; }
  .audio-button svg { width: 20px; height: 20px; }
  .lyric-line { font-size: 2rem; }
}

/* Etiqueta de versión */
.version-label {
  position: fixed; bottom: 1rem; left: 1rem;
  font-size: .8rem; color: #fff; opacity: .7;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  z-index: 1000;
}

/* =========================================================
   SPLASH LANDING (AISLADO)
   - Fondo negro, imagen flotando
   - Botón START (gradiente violeta)
   - Título con efecto (top) — .app-title .word
   - "Wepa Panita!" animado — .ml2 (bottom)
   ========================================================= */

body.splash {
  background: #000 !important;
  background-image: none !important;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
}

/* Contenedor (compat: loading-container o splash-container) */
.splash .loading-container,
.splash .splash-container {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 16px;
  width: min(960px, 100%);
  min-height: 100%;
  align-items: center;
  justify-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
}

/* IMAGEN (compat: center-image o splash-image) */
.splash .center-image,
.splash .splash-image {
  width: min(72dvw, 460px);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  will-change: transform;
  animation: splashFloat 4.5s ease-in-out infinite;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.6));
}

@keyframes splashFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-6px) rotate(-1deg); }
}

/* TAGLINE opcional */
.splash .splash-tagline {
  margin: 4px 0 0;
  font-size: clamp(14px, 3.8vw, 18px);
  opacity: .9;
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
}

/* ---------- BOTÓN START (gradiente violeta) ---------- */
.splash .btn-start {
  appearance: none;
  border: 0;
  padding: 14px 28px;
  font-size: clamp(16px, 4.5vw, 18px);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 40%, #8b5cf6 70%, #a78bfa 100%);
  box-shadow:
    0 8px 20px rgba(124,58,237,.45),
    inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
  user-select: none;
  min-width: 220px;
  outline: none;
}
.splash .btn-start:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 26px rgba(124,58,237,.55),
    inset 0 1px 0 rgba(255,255,255,.18);
  filter: saturate(1.05);
}
.splash .btn-start:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(124,58,237,.45),
    inset 0 1px 0 rgba(255,255,255,.12);
}
.splash .btn-start:focus-visible {
  box-shadow:
    0 0 0 3px rgba(255,255,255,.3),
    0 0 0 6px rgba(124,58,237,.55),
    0 10px 24px rgba(124,58,237,.45);
}

/* ---------- TÍTULO CON EFECTO (TOP CENTER) ---------- */
/* Variante original (Google Ai Studio) — requerido por tu JS */
.splash .app-title {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 800;
  font-size: 3.8em;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  margin: 0;
  background: linear-gradient(45deg, #673cdf, #7c06eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(124,58,237,.25);
  user-select: none;
}
.splash .app-title .word {
  display: inline-block;
  line-height: 1em;
}

/* Variante alternativa por si el HTML tiene splash-title (no animada por JS) */
.splash .splash-title {
  margin: 0;
  font-weight: 900;
  letter-spacing: .08em;
  font-size: clamp(28px, 6.2vw, 56px);
  text-transform: uppercase;
  line-height: 1.05;
  background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 45%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(124,58,237,.25);
  user-select: none;
}

/* ---------- "Wepa Panita!" (BOTTOM CENTER) ---------- */
.splash .ml2 {
  font-weight: 900;
  font-size: 3.5em;
  color: #ffffff;
  position: absolute;
  bottom: 12.5%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  margin: 0;
}
.splash .ml2 .letter {
  display: inline-block;
  line-height: 1em;
}

/* ---------- RESPONSIVE / ACCESIBILIDAD ---------- */
@media (max-width: 768px) {
  .splash .loading-container,
  .splash .splash-container { gap: 12px; }

  .splash .center-image,
  .splash .splash-image { width: min(80dvw, 520px); }

  .splash .ml2 { font-size: 2em; bottom: 7.5%; }

  .splash .app-title { font-size: 1.5em; top: 5%; letter-spacing: 0.25em; }
}

@media (prefers-reduced-motion: reduce) {
  .splash .center-image,
  .splash .splash-image { animation: none !important; }
  /* JS ya maneja animaciones "light"; el CSS no añade más */
}

/* =========================================================
   NUEVAS SECCIONES (AISLADAS)
   - Estilos para las secciones nuevas añadidas en el HTML
   ========================================================= */

/* ---------- SECCIÓN DE CARACTERÍSTICAS ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 3rem 0;
}

.feature-card {
  background: linear-gradient(135deg, #2d2d5f, #1a1a2e);
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 16px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.feature-card > img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: block;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .feature-card > img {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .feature-card > img {
    height: 180px;
  }
}
