/**
 * Skeleton Loading - BOTBUSTER Theme
 * Smooth loading placeholders with shimmer effect
 */

/* Skeleton shimmer animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Base skeleton element */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.03) 40%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        90deg,
        rgba(189, 0, 27, 0) 0%,
        rgba(189, 0, 27, 0.05) 50%,
        rgba(189, 0, 27, 0) 100%
    );
    animation: shimmer 2s infinite linear;
}

/* Skeleton container */
.skeleton-container {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

/* Settings page specific skeletons */
.skeleton-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.skeleton-title {
    height: 2rem;
    width: 40%;
    margin-bottom: 2rem;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.05) 40%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

.skeleton-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skeleton-row:last-child {
    border-bottom: none;
}

.skeleton-label {
    height: 1rem;
    width: 25%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.04) 40%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

.skeleton-value {
    height: 1rem;
    width: 35%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.05) 40%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

.skeleton-badge {
    height: 1.5rem;
    width: 120px;
    background: linear-gradient(
        90deg,
        rgba(189, 0, 27, 0.1) 0%,
        rgba(189, 0, 27, 0.2) 20%,
        rgba(189, 0, 27, 0.1) 40%,
        rgba(189, 0, 27, 0.1) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

.skeleton-large-number {
    height: 4rem;
    width: 150px;
    background: linear-gradient(
        90deg,
        rgba(189, 0, 27, 0.1) 0%,
        rgba(189, 0, 27, 0.2) 20%,
        rgba(189, 0, 27, 0.1) 40%,
        rgba(189, 0, 27, 0.1) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
    margin: 0 auto;
}

.skeleton-text-small {
    height: 0.75rem;
    width: 60%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.06) 20%,
        rgba(255, 255, 255, 0.03) 40%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
    margin: 0.5rem auto 0;
}

/* Credits card skeleton */
.skeleton-credits-card {
    background: rgba(189, 0, 27, 0.1);
    border: 1px solid rgba(189, 0, 27, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .skeleton-card {
        padding: 1.5rem;
    }

    .skeleton-title {
        width: 60%;
        height: 1.5rem;
    }

    .skeleton-row {
        padding: 1rem 0;
    }

    .skeleton-label {
        width: 35%;
    }

    .skeleton-value {
        width: 45%;
    }

    .skeleton-large-number {
        height: 3rem;
        width: 120px;
    }
}

/* Fade in real content */
.content-loaded {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide real content while loading */
.loading .actual-content {
    display: none;
}

.loading .skeleton-container {
    display: block;
}

.loaded .skeleton-container {
    display: none;
}

.loaded .actual-content {
    display: block;
    animation: fadeIn 0.3s ease;
}
