/* ============================================================
   CYBERLOG Skeleton Loading — Cyberpunk Shimmer Edition
   流光骨架屏：赛博朋克霓虹绿色 shimmer 效果
   ============================================================ */

/* ---- 核心 shimmer 动画 ---- */
@keyframes cyber-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

/* ---- 骨架屏基础块 ---- */
.skeleton-block {
    background: linear-gradient(
        90deg,
        rgba(0, 255, 136, 0.04) 0%,
        rgba(0, 255, 136, 0.04) 25%,
        rgba(0, 255, 136, 0.12) 37%,
        rgba(0, 255, 200, 0.18) 50%,
        rgba(0, 255, 136, 0.12) 63%,
        rgba(0, 255, 136, 0.04) 75%,
        rgba(0, 255, 136, 0.04) 100%
    );
    background-size: 600px 100%;
    animation: cyber-shimmer 1.6s ease-in-out infinite;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

/* 边框发光效果 */
.skeleton-block::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0, 255, 136, 0.08);
    border-radius: inherit;
    pointer-events: none;
}

/* ---- 文章卡片骨架屏 ---- */
.skeleton-post-card {
    border: 1px solid rgba(0, 255, 136, 0.06);
    padding: 24px 28px;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 28px;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: rgba(0, 255, 136, 0.02);
}

/* 左侧日期区域 */
.skeleton-date {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.skeleton-date-day {
    width: 48px;
    height: 36px;
    border-radius: 2px;
}

.skeleton-date-month {
    width: 60px;
    height: 14px;
    border-radius: 2px;
}

/* 中间内容区域 */
.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-title {
    height: 20px;
    width: 75%;
    border-radius: 2px;
}

.skeleton-title-short {
    height: 20px;
    width: 50%;
    border-radius: 2px;
}

.skeleton-desc {
    height: 13px;
    width: 90%;
    border-radius: 2px;
}

.skeleton-desc-short {
    height: 13px;
    width: 65%;
    border-radius: 2px;
}

/* 右侧标签区域 */
.skeleton-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.skeleton-tag {
    height: 22px;
    width: 72px;
    border-radius: 2px;
}

.skeleton-tag-sm {
    height: 22px;
    width: 56px;
    border-radius: 2px;
}

/* ---- 扫描线装饰效果 ---- */
.skeleton-post-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 255, 136, 0.4) 50%,
        transparent 100%
    );
    animation: skeleton-pulse 1.6s ease-in-out infinite;
}

/* ---- 延迟错开动画，避免所有卡片同步 ---- */
.skeleton-post-card:nth-child(2) .skeleton-block { animation-delay: 0.15s; }
.skeleton-post-card:nth-child(3) .skeleton-block { animation-delay: 0.30s; }
.skeleton-post-card:nth-child(4) .skeleton-block { animation-delay: 0.45s; }
.skeleton-post-card:nth-child(5) .skeleton-block { animation-delay: 0.60s; }

.skeleton-post-card:nth-child(2)::before { animation-delay: 0.15s; }
.skeleton-post-card:nth-child(3)::before { animation-delay: 0.30s; }
.skeleton-post-card:nth-child(4)::before { animation-delay: 0.45s; }
.skeleton-post-card:nth-child(5)::before { animation-delay: 0.60s; }

/* ---- 侧边栏骨架屏（分类/最新文章） ---- */
.skeleton-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 255, 136, 0.04);
}

.skeleton-sidebar-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    flex-shrink: 0;
}

.skeleton-sidebar-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-sidebar-line {
    height: 12px;
    border-radius: 2px;
}

.skeleton-sidebar-line-short {
    height: 12px;
    width: 60%;
    border-radius: 2px;
}

/* ---- 详情页相关文章骨架屏 ---- */
.skeleton-related-card {
    border: 1px solid rgba(0, 255, 136, 0.06);
    overflow: hidden;
    position: relative;
    background: rgba(0, 255, 136, 0.02);
}

.skeleton-related-cover {
    width: 100%;
    height: 180px;
    border-radius: 0;
}

.skeleton-related-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-related-meta {
    height: 12px;
    width: 50%;
    border-radius: 2px;
}

.skeleton-related-title {
    height: 18px;
    width: 85%;
    border-radius: 2px;
}

.skeleton-related-date {
    height: 12px;
    width: 40%;
    border-radius: 2px;
}

/* ---- 内容淡入动画（骨架屏消失后内容出现） ---- */
@keyframes content-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-loaded {
    animation: content-fade-in 0.35s ease-out forwards;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .skeleton-post-card {
        grid-template-columns: 60px 1fr;
        padding: 16px;
        gap: 16px;
    }

    .skeleton-tags {
        display: none;
    }

    .skeleton-title {
        width: 90%;
    }
}
