/* ============================================================
   SKELETON LOADER — hiển thị trước khi JS SPA load xong
   ============================================================ */

.skeleton-wrap {
    animation: skeleton-fade-out 0.3s ease forwards;
    animation-play-state: paused;
}

.skeleton-wrap.hide {
    animation-play-state: running;
}

@keyframes skeleton-fade-out {
    to {
        opacity: 0;
        visibility: hidden;
        height: 0;
        overflow: hidden;
    }
}

.skeleton-hero {
    width: 100%;
    height: 100vh;
    min-height: 500px;
    max-height: 800px;
    background: linear-gradient(90deg,
            #16161f 25%, #1e1e2a 50%, #16161f 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-title {
    height: 28px;
    width: 240px;
    border-radius: 8px;
    background: linear-gradient(90deg,
            #16161f 25%, #1e1e2a 50%, #16161f 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    margin-bottom: 24px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}

.skeleton-card {
    border-radius: 10px;
    overflow: hidden;
    background: #16161f;
}

.skeleton-card-img {
    aspect-ratio: 2/3;
    background: linear-gradient(90deg,
            #16161f 25%, #1e1e2a 50%, #16161f 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-card-line {
    height: 14px;
    margin: 10px 10px 6px;
    border-radius: 4px;
    background: linear-gradient(90deg,
            #1e1e2a 25%, #25253a 50%, #1e1e2a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-card-line.short {
    width: 60%;
    height: 11px;
    margin-top: 0;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}