/* === 骨架屏 === */

/* 基础骨架块 */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #e2e5ec;
  border-radius: 8px;
}

[data-theme="dark"] .skeleton {
  background: #22222f;
}

[data-theme="pink"] .skeleton {
  background: #f3e0ea;
}

/* 扫光动画 */
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );
  animation: skeleton-shimmer 1.5s infinite;
}

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

/* 分类标题占位 */
.skeleton-title {
  height: 28px;
  margin-bottom: 20px;
  border-radius: 8px;
}

/* 游戏网格占位，与 .games_list 保持一致的响应式列数 */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 20px;
  margin-bottom: 32px;
  padding: 0;
  list-style: none;
}

@media (max-width: 1200px) {
  .skeleton-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 992px) {
  .skeleton-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* 游戏卡片占位 */
.skeleton-card {
  width: 100%;
}

.skeleton-card .skeleton-thumb {
  width: 100%;
  padding-bottom: 100%;
  border-radius: 12px;
}

.skeleton-card .skeleton-line {
  height: 14px;
  width: 70%;
  margin: 10px auto 0;
  border-radius: 6px;
}

/* 文字行占位 */
.skeleton-line {
  height: 14px;
  border-radius: 6px;
}

/* 详情页骨架 */
.skeleton-detail-main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.skeleton-detail-icon {
  width: 120px;
  padding-bottom: 120px;
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-detail-info {
  flex: 1;
}

.skeleton-detail-info .skeleton-line {
  height: 20px;
  margin-bottom: 14px;
  border-radius: 6px;
}

.skeleton-detail-desc .skeleton-line {
  height: 14px;
  margin-bottom: 12px;
  border-radius: 6px;
}

/* 直接插入游戏网格（分类页） */
.skeleton-list {
  display: contents;
}
