/**
 * ========================================================================
 * app.css — Estilos personalizados (complementan Tailwind CSS)
 * ========================================================================
 */

/* ── Fondo ambiental ── */
body {
    background: #0a0a0f;
    font-family: 'Inter', system-ui, sans-serif;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 0%, rgba(0,229,255,.03) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(213,0,249,.03) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* ── Animación de entrada ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.card-animate {
    animation: fadeInUp .5s cubic-bezier(.4,0,.2,1) both;
}

/* ── Barra de filtros glassmorphism ── */
.nav-glass {
    background: rgba(10,10,15,.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ── Botones de filtro ── */
.filter-btn {
    transition: all .25s cubic-bezier(.4,0,.2,1);
}
.filter-btn.active {
    background: #00e5ff !important;
    color: #0a0a0f !important;
    border-color: #00e5ff !important;
    box-shadow: 0 0 20px rgba(0,229,255,.3);
}

/* ── Tarjetas ── */
.exercise-card {
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.exercise-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.exercise-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--card-accent, #00e5ff);
    opacity: 0;
    transition: opacity .3s ease;
}
.exercise-card:hover::before { opacity: 1; }

/* ── Imagen de tarjeta ── */
.card-img-container img {
    transition: transform .4s ease, filter .4s ease;
}
.exercise-card:hover .card-img-container img {
    transform: scale(1.06);
}
.card-img-container::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, #121218, transparent);
    pointer-events: none;
}

/* ── Panel desplegable ── */
.instructions-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s cubic-bezier(.4,0,.2,1);
}
.instructions-panel.open {
    max-height: 600px; /* Más alto para incluir la imagen demo */
}

/* ── Chevron ── */
.chevron-icon {
    transition: transform .3s ease;
}
.chevron-icon.rotated {
    transform: rotate(180deg);
}

/* ═════════════════════════════════════════
   DEMOSTRACIÓN ANIMADA (crossfade entre 2 imágenes)
   Simula un GIF alternando posición inicio/fin
   ═════════════════════════════════════════ */
@keyframes demo-crossfade-1 {
    0%, 45%  { opacity: 1; }
    50%, 95% { opacity: 0; }
    100%     { opacity: 1; }
}
@keyframes demo-crossfade-2 {
    0%, 45%  { opacity: 0; }
    50%, 95% { opacity: 1; }
    100%     { opacity: 0; }
}

.demo-frame-1 {
    animation: demo-crossfade-1 2.4s ease-in-out infinite;
}
.demo-frame-2 {
    animation: demo-crossfade-2 2.4s ease-in-out infinite;
}

/* ── Badge de cardio con pulso ── */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(239,68,68,.3); }
    50%      { box-shadow: 0 0 16px rgba(239,68,68,.6); }
}
.cardio-badge {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ── Secciones ocultas por filtro ── */
.day-section.hidden { display: none; }

/* ── Scrollbar oscuro ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a4a; }
