/* 全局变量与公共样式 */

:root {
  --bg: #0b0b0d;
  --bg-elevated: #141417;
  --bg-panel: #1b1b1f;
  --text: #f2f2f4;
  --text-muted: #a1a1aa;
  --text-dim: #7c7c86;
  --accent: #ec237f;
  --accent-hot: #ff4a7b;
  --accent-deep: #93226f;
  --gold: #e9c977;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --page-width: 1200px;
  --hero-width: 1440px;
  --h5-gutter: 16px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --scrollbar-size: 8px;
  --scrollbar-track: #0a0a0a;
  --scrollbar-thumb: #3a3a3a;
  --scrollbar-thumb-hover: #4a4a4a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #0b0b0d;
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* 公共滚动条 */
::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* 横滑 / 纵滑区域 */
.scroll-x,
.scroll-y,
[data-scroll="x"],
[data-scroll="y"] {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.scroll-x {
  overflow-x: auto;
  overflow-y: hidden;
}

.scroll-y {
  overflow-x: hidden;
  overflow-y: auto;
}

/* 隐藏滚动条但仍可滚动 */
.scroll-hidden {
  scrollbar-width: none;
}

.scroll-hidden::-webkit-scrollbar {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

/* Page shell — 整体居中 */
.page {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  opacity: 0.92;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #ff4a7b 0%, #ec237f 52%, #93226f 100%);
}

.btn--ghost {
  color: var(--text);
  background: rgba(11, 11, 13, 0.72);
  border: 1px solid var(--line);
}

.btn--outline {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn--lg {
  height: 56px;
  padding: 0 28px;
  font-size: 16px;
  line-height: 24px;
}

.btn--sm {
  height: 36px;
  padding: 0 12px;
}

.btn--icon {
  width: 56px;
  height: 56px;
  padding: 0;
  background: rgba(11, 11, 13, 0.72);
  border: 1px solid var(--line);
}

.btn--icon .icon {
  width: 22px;
  height: 22px;
}

/* Tags / badges */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
}

.tag--dark {
  background: rgba(11, 11, 13, 0.72);
  border: 1px solid var(--line);
}

.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
}

.badge--hot {
  color: #fff;
  background: var(--accent-deep);
}

.badge--original {
  color: #3a2a0a;
  background: linear-gradient(135deg, #fadc44 0%, #f9c24e 100%);
}

.badge--fire {
  color: #fff;
  background: linear-gradient(135deg, #f04050 0%, #d01030 100%);
}

.badge--new {
  color: #fff;
  background: linear-gradient(135deg, #ff4a7b 0%, #ec237f 52%, #93226f 100%);
}

.badge--exclusive {
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
}

.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb__item,
.breadcrumb__sep {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

.breadcrumb__item.is-current {
  color: var(--text);
}

.breadcrumb__sep {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--accent-hot);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 1.56px;
}

.eyebrow__bar {
  width: 18px;
  height: 2px;
  background: var(--accent);
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
}

.brand__logo {
  width: 148px;
  height: 36px;
  object-fit: contain;
}

.brand__logo--lg {
  width: 181px;
  height: 44px;
}

/* 端适配显隐：默认桌面可见，H5 隐藏；.only-h5 默认隐藏 */
.only-h5 {
  display: none !important;
}

@media (max-width: 768px) {
  .only-pc {
    display: none !important;
  }

  .only-h5 {
    display: flex !important;
  }

  img.only-h5 {
    display: block !important;
  }
}

/* H5 子页顶栏：返回 / 标题 / 搜索或分享 */
.page-subheader {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  box-sizing: border-box;
  width: 100%;
  height: 56px;
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}

.page-subheader__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  flex-shrink: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.page-subheader__btn .icon {
  width: 22px;
  height: 22px;
}

.page-subheader__title {
  flex: 1 1 0;
  margin: 0;
  text-align: center;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.page-subheader--overlay {
  background: transparent;
  border-bottom-color: transparent;
}

/* Section block */
.block {
  padding: 24px 0 8px;
}

.block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.block__titles {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.block__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.block__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
}

.block__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
}

.block__more:hover {
  color: var(--text);
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-left: 8px;
}

.tabs__item {
  position: relative;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  padding-bottom: 6px;
}

.tabs__item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 16px;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  opacity: 0;
}

.tabs__item.is-active {
  color: var(--text);
}

.tabs__item.is-active::after {
  opacity: 1;
}

/* Grids & cards */
.grid {
  display: grid;
  gap: 20px 16px;
}

.grid--6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card__cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 186 / 248;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px var(--line-soft);
  isolation: isolate;
  background-color: #141417;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.55) 100%),
    var(--cover);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
  background-clip: padding-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Figma HGW/封面卡：遮罩、播放按钮与文案 */
.card__cover {
  transition:
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.card__cover::before {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.6);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.card__cover::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  box-sizing: border-box;
  width: 100px;
  height: 76px;
  padding-top: 54px;
  background:
    url("../images/play.svg") center 13px / 18px 18px no-repeat,
    radial-gradient(
      circle at 50% 22px,
      rgba(11, 11, 13, 0.72) 0 21px,
      rgba(255, 255, 255, 0.24) 21px 22px,
      transparent 22px
    );
  color: #f2f2f4;
  content: "立即播放";
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 6px));
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.card__cover:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(236, 35, 127, 0.45);
}

.card__cover:focus-visible::before,
.card__cover:focus-visible::after {
  opacity: 1;
}

.card__cover:focus-visible::after {
  transform: translate(-50%, -50%);
}

/* 触屏设备不模拟悬浮，避免首次点击只显示遮罩 */
@media (hover: hover) and (pointer: fine) {
  .card__cover:hover {
    box-shadow: inset 0 0 0 1px rgba(236, 35, 127, 0.45);
  }

  .card__cover:hover::before,
  .card__cover:hover::after {
    opacity: 1;
  }

  .card__cover:hover::after {
    transform: translate(-50%, -50%);
  }
}

.card__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
}

.card__progress::after {
  content: "";
  display: block;
  width: var(--p, 0%);
  height: 100%;
  background: var(--accent-hot);
}

.card__ep {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__meta a {
  color: inherit;
  text-decoration: none;
}

.card__meta a:hover {
  color: var(--text);
}

.qr-box {
  padding: 6px;
  background: #fff;
  border-radius: var(--radius-md);
}

.qr-box img,
.qr-box canvas {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: block;
}

/* Shared responsive */
@media (max-width: 1280px) {
  .grid--6 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page {
    width: 100%;
  }

  .block {
    padding: 16px var(--h5-gutter) 8px;
  }

  .block__head {
    margin-bottom: 14px;
  }

  .block__titles {
    gap: 10px;
  }

  .block__title {
    font-size: 18px;
    line-height: 26px;
  }

  .block__subtitle {
    font-size: 12px;
    line-height: 18px;
    color: var(--text-dim);
  }

  .block__more {
    font-size: 13px;
  }

  .block__more .icon--sm {
    width: 14px;
    height: 14px;
  }

  .grid {
    gap: 8px;
  }

  .grid--6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card {
    gap: 6px;
  }

  .card__cover {
    aspect-ratio: 109 / 145;
    border-radius: var(--radius-sm);
  }

  .card__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
  }

  .card__meta {
    font-size: 11px;
    line-height: 16px;
  }

  .card__ep {
    left: 10px;
    bottom: 10px;
    font-size: 11px;
    line-height: 14px;
  }

  .card__progress {
    left: 10px;
    right: 10px;
    bottom: 6px;
    width: auto;
    border-radius: 999px;
    overflow: hidden;
  }

  .btn--lg {
    height: 48px;
    padding: 0 22px;
    font-size: 15px;
    line-height: 22px;
  }

  .btn--icon {
    width: 48px;
    height: 48px;
  }

  .btn--icon .icon {
    width: 20px;
    height: 20px;
  }
}
/* 可访问性文本：在不改变视觉布局时保留页面语义标题。 */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
