/*
estilos del index
*/

:root {
    --morado_principal: #6a11cb;
    --morado_secundario: #8f94fb;
    --azul_principal: #2575fc;
    --blanco: #ffffff;

    /* Variables de accesibilidad/feedback */
    --borde_focus: rgba(255, 255, 255, 0.9);
    --sombra_suave: 0 10px 20px rgba(0,0,0,0.15);
    --sombra_fuerte: 0 15px 25px rgba(0,0,0,0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Fondo principal */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(-45deg, var(--morado_principal), var(--morado_secundario), var(--azul_principal), #4a00e0);
    background-size: 400% 400%;
    animation: fondo_animado 10s ease infinite;
    color: var(--blanco);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

@keyframes fondo_animado {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/*
  1) FONDO CON ICONOS FLOTANTES (DECORACIÓN)
*/
#animacion_fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#animacion_fondo ul {
    width: 100%;
    height: 100%;
    position: relative;
    list-style: none;
}

#animacion_fondo li {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.12);
    animation: animar_iconos 25s linear infinite;
    bottom: -150px;
}

/* Ajustes individuales para dar variación (igual que el diseño original) */
#animacion_fondo li:nth-child(1) { left: 15%; font-size: 80px; animation-delay: 0s; }
#animacion_fondo li:nth-child(2) { left: 85%; font-size: 40px; animation-delay: 2s; animation-duration: 12s; }
#animacion_fondo li:nth-child(3) { left: 50%; font-size: 60px; animation-delay: 4s; }
#animacion_fondo li:nth-child(4) { left: 25%; font-size: 100px; animation-delay: 0s; animation-duration: 18s; }
#animacion_fondo li:nth-child(5) { left: 75%; font-size: 50px; animation-delay: 0s; }
#animacion_fondo li:nth-child(6) { left: 10%; font-size: 120px; animation-delay: 3s; }
#animacion_fondo li:nth-child(7) { left: 65%; font-size: 90px; animation-delay: 7s; }
#animacion_fondo li:nth-child(8) { left: 40%; font-size: 45px; animation-delay: 15s; animation-duration: 25s; }

@keyframes animar_iconos {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-1200px) rotate(720deg); opacity: 0; }
}

/*
  2) CONTENEDOR PRINCIPAL
*/
#aplicacion_principal {
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    text-align: center;

    /* Animación suave de entrada, sin depender de "clases utilitarias" */
    opacity: 0;
    transform: translateY(24px);
    animation: aparecer_principal 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes aparecer_principal {
    to { opacity: 1; transform: translateY(0); }
}

/*
  3) CABECERA (LOGO + TÍTULO)
*/
#cabecera_bienvenida {
    margin-bottom: 18px;
}

#logo_imagen {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
    opacity: 0.95;
}

#titulo_app {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to right, #ffffff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 10px 20px rgba(0,0,0,0.2);
    animation: latido 2s infinite;
}

@keyframes latido {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(0.97); }
    20%, 40% { transform: scale(1.05); }
    50% { transform: scale(1); }
}

#lema_app {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.92;
    margin-top: 8px;
    margin-bottom: 18px;
}

/*
  4) BOTONES PRINCIPALES (LOGIN / REGISTRO) CON FEEDBACK VISUAL
*/
#navegacion_sesion {
    width: 100%;
}

#enlace_iniciar,
#enlace_registrar {
    display: block;
    width: 100%;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

/* Botón primario */
#enlace_iniciar {
    background-color: var(--blanco);
    color: var(--morado_principal);
    box-shadow: var(--sombra_suave);
    border: 0;
    margin-bottom: 12px;
}

/* Botón secundario */
#enlace_registrar {
    background: transparent;
    color: var(--blanco);
    border: 2px solid rgba(255,255,255,0.95);
}

/* Hover */
#enlace_iniciar:hover {
    transform: translateY(-3px);
    box-shadow: var(--sombra_fuerte);
    background-color: #f8f9fa;
}
#enlace_registrar:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.2);
    background-color: var(--blanco);
    color: var(--azul_principal);
}

/* Focus accesible (te suma puntos) */
#enlace_iniciar:focus-visible,
#enlace_registrar:focus-visible,
#btn_google:focus-visible,
#btn_apple:focus-visible,
#btn_facebook:focus-visible,
#enlaces_sitio a:focus-visible {
    outline: 3px solid var(--borde_focus);
    outline-offset: 4px;
}

/* Active (feedback al presionar) */
#enlace_iniciar:active,
#enlace_registrar:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

/*
  5) SEPARADOR
*/
#separador_opciones {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
}

#separador_opciones::before,
#separador_opciones::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#separador_opciones::before { margin-right: 15px; }
#separador_opciones::after { margin-left: 15px; }

/*
  6) BOTONES SOCIALES
*/
#redes_sociales {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Botones circulares */
#btn_google,
#btn_apple,
#btn_facebook {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--blanco);
    text-decoration: none;
    transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease, color 0.35s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#btn_google:hover,
#btn_apple:hover,
#btn_facebook:hover {
    background: var(--blanco);
    transform: translateY(-6px) rotate(360deg);
    box-shadow: 0 10px 20px rgba(255,255,255,0.3);
}

#btn_google:hover { color: #db4437; }
#btn_apple:hover { color: #000000; }
#btn_facebook:hover { color: #4267B2; }

/*
  7) PIE (BOTÓN INSTALAR) - UI LISTA, SIN JS PWA AÚN
*/
#pie_descarga {
    margin-top: 22px;
}

#boton_instalar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 50px;
    padding: 12px 25px;
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--blanco);
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#boton_instalar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 114, 255, 0.6);
}

/*
  8) MAPA DE ENLACES (para evaluador) - DISCRETO, NO ROMPE DISEÑO
*/
#enlaces_sitio {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    opacity: 0.9;
}

#enlaces_sitio a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.22);
    padding: 7px 12px;
    border-radius: 999px;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

#enlaces_sitio a:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-2px);
}

#enlaces_sitio a:active {
    transform: translateY(0);
}

/*
  9) RESPONSIVIDAD (MOBILE FIRST + BREAKPOINTS EXTRA)
*/

/* Muy pequeño (teléfonos chicos) */
@media (max-width: 360px) {
    #aplicacion_principal { padding: 34px 20px; }
    #titulo_app { font-size: 3.6rem; }
}

/* Teléfonos comunes */
@media (max-width: 640px) {
    #aplicacion_principal { max-width: 420px; }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    #aplicacion_principal { max-width: 440px; }
}

/* Reduce animaciones si el usuario lo prefiere (accesibilidad) */
@media (prefers-reduced-motion: reduce) {
    body { animation: none; }
    #animacion_fondo li { animation: none; opacity: 0.12; }
    #aplicacion_principal { animation: none; opacity: 1; transform: none; }
    #titulo_app { animation: none; }
}