/* ============================================================
   skeleton.css - 骨架屏系统
   网站：kidsshoeshop.com
   生成：建站AI · 2026-10-13
   ============================================================ */

/* ===== 1. 基础骨架屏 ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--skeleton-bg) 0%,
    var(--skeleton-shimmer) 50%,
    var(--skeleton-bg) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer var(--loading-shimmer) ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ===== 2. 文章卡片骨架屏 ===== */
.skeleton-card {
  container-type: inline-size;
  container-name: card;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
}

.skeleton-card .skeleton-cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    90deg,
    var(--skeleton-bg) 0%,
    var(--skeleton-shimmer) 50%,
    var(--skeleton-bg) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer var(--loading-shimmer) ease-in-out infinite;
}

.skeleton-card .skeleton-title {
  height: 24px;
  width: 80%;
  margin-top: var(--rhythm-normal);
  border-radius: var(--radius-sm);
}

.skeleton-card .skeleton-summary {
  height: 16px;
  width: 100%;
  margin-top: var(--rhythm-tight);
  border-radius: var(--radius-sm);
}

.skeleton-card .skeleton-meta {
  height: 12px;
  width: 40%;
  margin-top: var(--rhythm-normal);
  border-radius: var(--radius-sm);
}

/* ===== 3. 文章正文骨架屏 ===== */
.skeleton-article {
  max-width: var(--reading-max-width);
  margin: 0 auto;
}

.skeleton-article .skeleton-title {
  height: 36px;
  width: 90%;
  margin-bottom: var(--rhythm-normal);
  border-radius: var(--radius-sm);
}

.skeleton-article .skeleton-paragraph {
  height: 16px;
  width: 100%;
  margin-bottom: var(--rhythm-tight);
  border-radius: var(--radius-sm);
}

.skeleton-article .skeleton-paragraph:last-child {
  width: 60%;
}

.skeleton-article .skeleton-image {
  aspect-ratio: 16 / 9;
  margin: var(--rhythm-loose) 0;
  border-radius: var(--radius-lg);
}

/* ===== 4. 聚合页列表骨架屏 ===== */
.skeleton-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gutter);
}

.skeleton-list .skeleton-card {
  padding: 0;
  border: none;
  background: transparent;
}

.skeleton-list .skeleton-cover {
  aspect-ratio: 16 / 9;
}

.skeleton-list .skeleton-title {
  height: 20px;
  margin-top: var(--space-3);
}

.skeleton-list .skeleton-summary {
  height: 14px;
  margin-top: var(--space-2);
}

/* ===== 5. 侧边栏骨架屏 ===== */
.skeleton-sidebar .skeleton-line {
  height: 16px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-sm);
}

.skeleton-sidebar .skeleton-line:last-child {
  width: 70%;
}

/* ===== 6. 对比表格骨架屏 ===== */
.skeleton-table {
  width: 100%;
  border-collapse: collapse;
}

.skeleton-table .skeleton-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.skeleton-table .skeleton-cell {
  flex: 1;
  height: 40px;
  border-radius: var(--radius-sm);
}

/* ===== 7. 评论区骨架屏 ===== */
.skeleton-comments .skeleton-comment {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.skeleton-comments .skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.skeleton-comments .skeleton-body {
  flex: 1;
}

.skeleton-comments .skeleton-line {
  height: 14px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
}

/* ===== 8. 封面图骨架屏 ===== */
.skeleton-cover-lg {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    135deg,
    var(--skeleton-bg) 0%,
    var(--skeleton-shimmer) 100%
  );
  animation: skeleton-shimmer var(--loading-shimmer) ease-in-out infinite;
}

/* ===== 9. 移动端简化 ===== */
@media (max-width: 768px) {
  .skeleton-card .skeleton-title { height: 20px; }
  .skeleton-card .skeleton-summary { height: 14px; }
  .skeleton-article .skeleton-title { height: 28px; }
  .skeleton-article .skeleton-paragraph { height: 14px; }
  .skeleton-list { grid-template-columns: 1fr; }
  .skeleton-table .skeleton-cell { height: 36px; }
}
