/* style.css - INTERFAZ MÓVIL OPTIMIZADA */
:root {
    /* COLORES BASE CON ALTO CONTRASTE */
    --color-fondo: #e8f5e9; /* VERDE MENTA MUY CLARO */
    --color-tarjeta: #fff3e0; /* NARANJA CREMA (como páginas de libro viejo) */
    --color-borde: #a1887f; /* MARRÓN TERRA COTTA */
    --color-texto: #3e2723; /* MARRÓN CHOCOLATE OSCURO */
    --color-texto-suave: #795548; /* MARRÓN CAFÉ */
    
    --color-primario: #d32f2f; /* ROJO LADRILLO */
    --color-exito: #388e3c; /* VERDE BOSQUE */
    --color-papa: #1976d2; /* AZUL MARINO */
    --color-mama: #7b1fa2; /* MORADO REAL */
    --color-curso-papa: #f57c00; /* NARANJA CALABAZA */
    --color-curso-mama: #0097a7; /* AZUL TURQUESA */
}

/* RESET BÁSICO */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    font-size: 15px;
    line-height: 1.3;
}

/* CONTENEDOR PRINCIPAL */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 12px;
}

/* HEADER COMPACTO */
.app-header {
    padding: 20px 0 16px 0;
    text-align: center;
    border-bottom: 1px solid var(--color-borde);
    margin-bottom: 16px;
}

.library-icon {
    font-size: 44px;
    margin-bottom: 8px;
}

.app-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 2px;
}

.app-subtitle {
    font-size: 13px;
    color: var(--color-texto-suave);
}

/* CONTENIDO PRINCIPAL COMPACTO */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* ESTADÍSTICAS COMPACTAS */
.stat-card {
    background: var(--color-tarjeta);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid var(--color-borde);
    text-align: center;
    min-height: auto;
	margin-top: 16px;
}

.stat-title {
    font-size: 13px;
    color: var(--color-texto-suave);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-texto);
    line-height: 1;
    margin: 4px 0;
}

/* ESTADÍSTICAS DUALES EN FILA - MÓVIL */
.dual-stats {
    display: flex;
    gap: 12px;
    width: 100%;
	margin-top: 16px;
}

.dual-stat {
    flex: 1;
    background: var(--color-tarjeta);
    border-radius: 12px;
    padding: 14px 10px;
    border: 1px solid var(--color-borde);
    text-align: center;
    min-height: auto;
}

.dual-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.dual-number {
    font-size: 26px;
    font-weight: 800;
    color: var(--color-texto);
    margin: 4px 0;
}

.dual-label {
    font-size: 13px;
    color: var(--color-texto-suave);
    font-weight: 600;
}

/* COLORES PARA BORDES SUPERIORES */
.stat-card-total {
    /*border-top: 3px solid var(--color-primario);*/
}

.stat-card-ambos {
    /*border-top: 3px solid var(--color-exito);*/
}

.dual-stat-mama {
    /*border-top: 3px solid var(--color-mama);*/
}

.dual-stat-papa {
    /*border-top: 3px solid var(--color-papa);*/
}

.dual-stat-curso-mama {
    /*border-top: 3px solid var(--color-curso-mama);*/
}

.dual-stat-curso-papa {
    /*border-top: 3px solid var(--color-curso-papa);*/
}

/* NAVEGACIÓN COMPACTA */
.nav-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
}

.nav-card {
    background: var(--color-tarjeta);
    border-radius: 14px;
    padding: 18px 12px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    border: 1px solid var(--color-borde);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: auto;
}

.nav-card:active {
    background: #f1f5f9;
    transform: scale(0.98);
}

.nav-icon {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--color-primario);
}

.nav-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-texto);
    margin-bottom: 4px;
}

/* FOOTER COMPACTO */
.app-footer {
    padding: 18px 0;
    text-align: center;
    color: var(--color-texto-suave);
    font-size: 13px;
    border-top: 1px solid var(--color-borde);
    background: var(--color-fondo);
}

.footer-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.footer-stat {
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 6px;
    color: var(--color-texto-suave);
    font-size: 11px;
}

/* BOTÓN INSTALAR PWA */
.install-btn {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background: var(--color-primario);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    display: none;
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* ANIMACIÓN SUAVE */
@keyframes aparecer {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: aparecer 0.3s ease forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* RESPONSIVE PARA MÓVIL PEQUEÑO */
@media (max-width: 360px) {
    .app-container {
        padding: 0 10px;
    }
    
    .stat-number {
        font-size: 16px;
    }
    
    .dual-number {
        font-size: 12px;
    }
    
    .dual-stats {
        gap: 10px;
    }
    
    .dual-stat {
        padding: 12px 8px;
    }
    
    .nav-card {
        padding: 16px 10px;
    }
    
    .nav-icon {
        font-size: 28px;
    }
    
    .nav-title {
        font-size: 15px;
    }
}

/* PARA PANTALLAS MÁS GRANDES (tablet/desktop) */
@media (min-width: 768px) {
    .app-container {
        padding: 0 20px;
    }
    
    .main-content {
        max-width: 600px;
        gap: 18px;
    }
    
    .nav-section {
        flex-direction: row;
        gap: 14px;
    }
    
    .nav-card {
        flex: 1;
        padding: 20px 14px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .dual-stat {
        padding: 16px 12px;
    }
}

/* PARA ESCRITORIO */
@media (min-width: 1024px) {
    .app-container {
        padding: 0 24px;
    }
    
    .main-content {
        max-width: 700px;
    }
}