/* 加载态：品牌底色 + 骨架屏 + 顶部进度条 */

body.bg {
  background-color: #0a0604;
}

body.is-loading {
  overflow: hidden;
}

/* ---------- 顶部进度条 ---------- */

.load-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10001;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.load-progress.is-done {
  opacity: 0;
}

.load-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f50000, #ff6b35);
  transition: width 0.25s ease;
  box-shadow: 0 0 8px rgba(245, 0, 0, 0.45);
}

/* ---------- 骨架屏容器 ---------- */

.page-skeleton {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(180deg, #0a0604 0%, #120a06 40%, #1a0e08 100%);
  overflow: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-skeleton.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-skeleton__inner {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
}

/* shimmer 动画 */

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.sk {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}

/* ---------- 移动端骨架 ---------- */

.sk-mobile {
  display: none;
  flex-direction: column;
  height: 100%;
}

.sk-mobile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 67px;
  border-bottom: 1px solid rgba(245, 0, 0, 0.35);
  flex-shrink: 0;
}

.sk-mobile__logo {
  width: 120px;
  height: 44px;
  border-radius: 6px;
}

.sk-mobile__nav {
  display: flex;
  gap: 6px;
}

.sk-mobile__nav-item {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

.sk-mobile__hero {
  flex: 1;
  min-height: 280px;
  margin-top: 24px;
  border-radius: 12px;
  opacity: 0.7;
}

.sk-mobile__title {
  width: 72%;
  height: 28px;
  margin: 28px auto 0;
}

.sk-mobile__cards {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 0 3%;
}

.sk-mobile__card {
  width: 45%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
}

.sk-mobile__promo {
  width: 100%;
  height: 80px;
  margin-top: 20px;
  border-radius: 8px;
  opacity: 0.5;
}

.sk-mobile__footer {
  flex-shrink: 0;
  height: 80px;
  margin: 16px -20px 0;
  background: #201207;
  border-top: 1px solid rgba(88, 55, 29, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.sk-mobile__btn {
  width: 190px;
  height: 46px;
  border-radius: 23px;
}

/* ---------- PC 端骨架 ---------- */

.sk-desktop {
  display: none;
  flex-direction: column;
  height: 100%;
  padding-top: 8px;
}

.sk-desktop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 116px;
  flex-shrink: 0;
}

.sk-desktop__logo {
  width: 180px;
  height: 56px;
}

.sk-desktop__nav {
  display: flex;
  gap: 20px;
}

.sk-desktop__nav-item {
  width: 140px;
  height: 40px;
  border-radius: 8px;
}

.sk-desktop__banner {
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: 36px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  margin-top: 8px;
}

.sk-desktop__cards {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
}

.sk-desktop__card {
  flex: 1;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
}

.sk-desktop__footer {
  width: 200px;
  height: 20px;
  margin: 40px auto 0;
  border-radius: 4px;
  opacity: 0.4;
}

/* ---------- 内容淡入 ---------- */

body.is-loading .containers,
body.is-loading .fix-menu,
body.is-loading .footer {
  opacity: 0;
}

body.is-ready .containers,
body.is-ready .fix-menu,
body.is-ready .footer {
  opacity: 1;
  transition: opacity 0.45s ease;
}

img[data-img] {
  opacity: 0;
  transition: opacity 0.35s ease;
}

img[data-img].is-loaded {
  opacity: 1;
}

/* ---------- 响应式切换 ---------- */

@media screen and (max-width: 993px) {
  .sk-mobile {
    display: flex;
  }

  .page-skeleton__inner {
    padding-left: 3%;
    padding-right: 3%;
  }
}

@media screen and (min-width: 994px) {
  .sk-desktop {
    display: flex;
  }
}

@media screen and (max-width: 768px) {
  .sk-mobile__hero {
    min-height: 220px;
  }
}

@media screen and (max-width: 640px) {
  .sk-mobile__hero {
    min-height: 180px;
  }
}
