/* =====================================================
   Skeleton Loading Animation
   스켈레톤 로딩 애니메이션
   ===================================================== */

/* Skeleton Container */
.skeleton-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    background: var(--page-background, #f5f5f0);
    padding-top: var(--header-height, 64px);
    overflow-y: auto;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.skeleton-container.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.skeleton-content {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 32px);
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Base Skeleton Element */
.skeleton {
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.06) 25%,
            rgba(0, 0, 0, 0.12) 50%,
            rgba(0, 0, 0, 0.06) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite ease-in-out;
    border-radius: 8px;
}

/* Skeleton Hero */
.skeleton-hero {
    height: 140px;
    border-radius: 24px;
    margin-bottom: clamp(20px, 4vw, 32px);
    background: linear-gradient(90deg,
            rgba(87, 142, 126, 0.2) 25%,
            rgba(87, 142, 126, 0.35) 50%,
            rgba(87, 142, 126, 0.2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite ease-in-out;
}

/* Skeleton Toolbar */
.skeleton-toolbar {
    background: #fff;
    border-radius: 16px;
    padding: clamp(14px, 2.5vw, 20px);
    margin-bottom: clamp(16px, 3vw, 24px);
    box-shadow: 0 4px 16px rgba(68, 64, 60, 0.06);
}

.skeleton-search {
    height: 48px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.skeleton-filters {
    display: flex;
    gap: 8px;
}

.skeleton-filter-chip {
    width: 70px;
    height: 36px;
    border-radius: 999px;
}

.skeleton-filter-chip:nth-child(2) {
    width: 85px;
}

.skeleton-filter-chip:nth-child(3) {
    width: 60px;
}

.skeleton-filter-chip:nth-child(4) {
    width: 75px;
}

/* Skeleton Card */
.skeleton-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-card {
    background: #fff;
    border-radius: 16px;
    padding: clamp(16px, 3vw, 24px);
    box-shadow: 0 4px 16px rgba(68, 64, 60, 0.06);
}

.skeleton-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.skeleton-badges {
    display: flex;
    gap: 6px;
}

.skeleton-badge {
    height: 24px;
    border-radius: 999px;
}

.skeleton-badge--stars {
    width: 60px;
}

.skeleton-badge--category {
    width: 55px;
}

.skeleton-badge--tag {
    width: 40px;
}

.skeleton-stats {
    display: flex;
    gap: 8px;
}

.skeleton-stat {
    width: 50px;
    height: 26px;
    border-radius: 999px;
}

.skeleton-title {
    height: 24px;
    width: 85%;
    border-radius: 6px;
    margin-bottom: 10px;
}

.skeleton-excerpt {
    height: 18px;
    width: 100%;
    border-radius: 6px;
    margin-bottom: 14px;
}

.skeleton-meta {
    display: flex;
    gap: 10px;
}

.skeleton-meta-item {
    height: 16px;
    border-radius: 4px;
}

.skeleton-meta-item:nth-child(1) {
    width: 80px;
}

.skeleton-meta-item:nth-child(2) {
    width: 60px;
}

.skeleton-meta-item:nth-child(3) {
    width: 50px;
}

/* Responsive */
@media (max-width: 640px) {
    .skeleton-hero {
        height: 100px;
    }

    .skeleton-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .skeleton-stats {
        order: -1;
    }

    .skeleton-filter-chip {
        display: none;
    }

    .skeleton-filter-chip:nth-child(1),
    .skeleton-filter-chip:nth-child(2) {
        display: block;
    }
}