/* Skeleton Loading Styles */

/* Base Skeleton */
.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 0%,
            #e0e0e0 20%,
            #f0f0f0 40%,
            #f0f0f0 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Skeleton Components */
.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.large {
    height: 24px;
}

.skeleton-text.small {
    height: 12px;
}

.skeleton-title {
    height: 32px;
    width: 70%;
    margin-bottom: 16px;
    border-radius: 4px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
}

.skeleton-image.small {
    height: 120px;
}

.skeleton-image.large {
    height: 400px;
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

/* Skeleton Article Card */
.skeleton-article-card {
    background: white;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.skeleton-article-card .skeleton-image {
    height: 200px;
    border-radius: 0;
}

.skeleton-article-card .skeleton-content {
    padding: 16px;
}

/* Skeleton Grid */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Skeleton List */
.skeleton-list-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skeleton-list-item .skeleton-image {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
}

.skeleton-list-item .skeleton-content {
    flex: 1;
}

/* Skeleton Sidebar Widget */
.skeleton-widget {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Skeleton Header */
.skeleton-header {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hide Content While Loading */
.content-loading {
    display: none;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Skeleton Container */
.skeleton-container {
    padding: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .skeleton-grid {
        grid-template-columns: 1fr;
    }

    .skeleton-list-item {
        flex-direction: column;
    }

    .skeleton-list-item .skeleton-image {
        width: 100%;
        height: 200px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .skeleton {
        background: linear-gradient(90deg,
                #2a2a2a 0%,
                #3a3a3a 20%,
                #2a2a2a 40%,
                #2a2a2a 100%);
    }

    .skeleton-card,
    .skeleton-article-card,
    .skeleton-list-item,
    .skeleton-widget,
    .skeleton-header {
        background: #1a1a1a;
    }
}