/* 骨架屏样式 */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg-muted);
  border-radius: 4px;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-title {
  height: 24px;
  width: 70%;
  margin-bottom: 16px;
  border-radius: 4px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-image {
  width: 100%;
  height: 200px;
  border-radius: 8px;
}

.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--space-4);
}

/* 博客列表骨架屏 */
.skeleton-post {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.skeleton-post-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.skeleton-post-content {
  padding-left: calc(40px + var(--space-3));
}

/* 评论骨架屏 */
.skeleton-comment {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

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

/* 卡片骨架屏 */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 首页列表骨架屏 */
.skeleton-list {
  display: flex; flex-direction: column; gap: 0;
}
.skeleton-item {
  height: 48px;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-light);
  position: relative; overflow: hidden;
}
.skeleton-item::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}

/* 首页区块骨架屏（日历/图谱等） */
.skeleton-block {
  height: 200px;
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.skeleton-block::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}

/* 页面加载动画 */
.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 2px;
  background: var(--color-primary);
  animation: loading-progress 1s ease-in-out;
}

@keyframes loading-progress {
  0% { width: 0; }
  50% { width: 70%; }
  100% { width: 100%; opacity: 0; }
}
