/* Skeleton Styles for Profile Page */
.skeleton-container {
    padding: 16px;
    /* Match .main-content padding */
    opacity: 1;
    transition: opacity 0.3s ease-out;
    width: 100%;
    position: relative;
    /* Ensure it takes space in flow */
}

.skeleton-container.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

/* Skeleton Keyframes */
@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Base Skeleton Element */
.skeleton-box {
    background: linear-gradient(90deg,
            var(--bg-card) 0%,
            var(--glass-bg) 50%,
            var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 12px;
}

[data-theme="light"] .skeleton-box {
    background: linear-gradient(90deg,
            #e2e8f0 0%,
            #f8fafc 50%,
            #e2e8f0 100%);
    border: none;
}

/* Profile Header Skeleton */
.skeleton-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px;
    background: var(--bg-card);
    border-radius: 24px;
    margin-bottom: 20px;
}

.skeleton-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

.skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 24px;
    width: 150px;
    border-radius: 6px;
}

.skeleton-line.short {
    height: 16px;
    width: 100px;
}

/* Stats Skeleton */
.skeleton-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.skeleton-stat-card {
    height: 100px;
    border-radius: 18px;
}

/* Account/Menu Skeleton */
.skeleton-section {
    height: 200px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.skeleton-menu {
    height: 250px;
    border-radius: 20px;
}

/* Entry Animations */
@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Content Ready Logic with Stagger */
.content-ready {
    opacity: 1;
    /* Container is visible, we handle children visibility */
}

/* Hide children initially when content-ready class is present but not visible */
.content-ready:not(.visible)>* {
    opacity: 0;
}

/* Animate children when visible class is added */
.content-ready.visible>* {
    opacity: 0;
    /* Start hidden for animation */
    animation: slideFadeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger Delays */
.content-ready.visible>*:nth-child(1) {
    animation-delay: 0ms;
}

.content-ready.visible>*:nth-child(2) {
    animation-delay: 100ms;
}

.content-ready.visible>*:nth-child(3) {
    animation-delay: 200ms;
}

.content-ready.visible>*:nth-child(4) {
    animation-delay: 300ms;
}

.content-ready.visible>*:nth-child(5) {
    animation-delay: 400ms;
}