/* 玩家前台专属样式 */
.content.enter > * { animation: settle .7s var(--ease) both; }
@keyframes settle { from { opacity: 0; transform: translateY(18px) scale(.985); } }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.clamp1 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-head { padding: 6px 6px 4px; text-shadow: 0 2px 24px rgba(10, 6, 50, .45); }
.page-head h1 { font-size: 44px; font-weight: 750; letter-spacing: -.025em; line-height: 1.1; }
.page-head.row { align-items: flex-end; flex-wrap: wrap; }
.page-date { display: block; font-size: 15px; font-weight: 650; color: var(--ink-2); margin-bottom: 2px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: 14.5px; color: var(--ink-2); padding: 6px 12px 6px 6px; border-radius: 99px; margin-bottom: 4px; }
.back:hover { background: var(--cell-hover); color: var(--ink); }
.seg-link { display: inline-grid; place-items: center; height: 36px; padding: 0 18px; border-radius: 18px; font-weight: 650; font-size: 14px; color: var(--ink-2); transition: background .25s, color .25s; }
.seg-link.on { background: rgba(255, 255, 255, .92); color: #1b1840; }
.seg.glass { border-radius: 22px; }

/* ---------- 封面艺术：截图，或由游戏主色生成的弥散渐变 ---------- */
.art {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  background:
    radial-gradient(90% 120% at 12% 10%, var(--c1), transparent 60%),
    radial-gradient(80% 110% at 92% 30%, var(--c2), transparent 62%),
    radial-gradient(90% 90% at 50% 110%, var(--c3), transparent 60%),
    #1c1a52;
}
.art img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 精选轮播 ---------- */
.hero-wrap { position: relative; max-width: 100%; overflow-x: clip; }
.hero-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 26px 6px 34px; margin: -26px -6px -34px; perspective: 1400px; }
.hero-track::-webkit-scrollbar { display: none; }
.hero {
  flex: 0 0 100%; scroll-snap-align: center; position: relative; border-radius: 40px; min-height: 420px; display: flex; align-items: flex-end;
  box-shadow: 0 40px 90px -36px rgba(6, 4, 36, .8); isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none; z-index: 4;
  background: linear-gradient(145deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .08) 32%, rgba(255, 255, 255, .03) 64%, rgba(255, 255, 255, .4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 10, 48, .82), rgba(14, 10, 48, .42) 46%, rgba(14, 10, 48, .05) 78%), linear-gradient(0deg, rgba(14, 10, 48, .5), transparent 46%); }
.hero-body { position: relative; z-index: 2; padding: 38px 40px 34px; width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; transform-style: preserve-3d; }
.hero-title { font-size: clamp(34px, 5vw, 58px); font-weight: 780; letter-spacing: -.03em; line-height: 1.04; max-width: 14em; text-shadow: 0 4px 30px rgba(8, 4, 40, .5); }
.hero-tagline { font-size: 18px; color: var(--ink-2); max-width: 30em; margin-bottom: 14px; }
.hero-foot { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 28px; width: min(560px, 100%); }
.hero-foot .lockup-text { flex: 1; min-width: 0; }
.hero-dots { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .35); transition: width .4s var(--ease), background .3s; }
.hero-dots button.on { width: 26px; background: #fff; }
.hero.compact { min-height: 310px; border-radius: 32px; }
.hero.compact .hero-body { padding: 26px 32px 24px; }
.hero.compact .hero-title { font-size: clamp(28px, 4vw, 44px); }
.announce { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 22px; font-size: 14.5px; font-weight: 550; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.cover-grid .cover { flex: none; width: 100%; height: 290px; }

/* ---------- 横向货架与封面卡 ---------- */
.shelf { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; padding: 14px 28px 26px; margin: -14px -28px -26px; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.cover {
  flex: 0 0 264px; height: 320px; border-radius: var(--r-card); position: relative; scroll-snap-align: start; display: flex; align-items: flex-end;
  box-shadow: 0 24px 50px -26px rgba(6, 4, 36, .85), inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.cover .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12, 8, 44, .72), rgba(12, 8, 44, .0) 58%); }
.cover-info {
  position: relative; z-index: 2; margin: 10px; padding: 10px 12px; border-radius: 20px; display: flex; align-items: center; gap: 10px; width: calc(100% - 20px);
  background: rgba(30, 26, 80, .42); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.cover-info .lockup-text { flex: 1; min-width: 0; }
.cover-score { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 13px; color: var(--star); }

/* ---------- 列表式游戏条目 ---------- */
.lockup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 6px 18px; }
.lockup { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; border-radius: 24px; transition: background .25s; }
.lockup:hover { background: var(--cell); }
.lockup-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; border-radius: 18px; }
.lockup-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; gap: 1px; }
.lockup-text b { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank { width: 26px; text-align: center; font-size: 19px; font-weight: 750; color: var(--ink-2); flex: none; }
.rating-line { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- 分类 ---------- */
.cat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 14px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 16px; }
.cat-tile {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: var(--r-card); min-height: 132px; justify-content: flex-end;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c1) 55%, transparent), color-mix(in srgb, var(--c2) 38%, transparent)), rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 18px 36px -22px rgba(6, 4, 36, .8);
}
.cat-tile b { font-size: 18px; font-weight: 700; }
.cat-icon { position: absolute; top: 16px; left: 16px; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

/* ---------- 游戏详情 ---------- */
.detail-head { padding: 30px; }
.detail-top { display: flex; gap: 28px; align-items: center; transform-style: preserve-3d; }
.detail-title { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; transform-style: preserve-3d; }
.detail-title h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 760; letter-spacing: -.025em; line-height: 1.12; }
.tagline { font-size: 17px; }
.dev-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14.5px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--cell); }
.dev-link:hover { background: var(--cell-hover); }
.detail-cta { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.fact { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 0 8px; min-width: 0; }
.fact + .fact { border-left: 1px solid var(--hairline); }
.fact b { font-size: 22px; font-weight: 720; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 12px 4px 22px; margin: -12px -4px -22px; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shot { position: relative; flex: none; height: 300px; border-radius: 24px; overflow: hidden; scroll-snap-align: start; box-shadow: 0 24px 50px -26px rgba(6, 4, 36, .85), inset 0 0 0 1px rgba(255, 255, 255, .18); }
.shot img { height: 100%; width: auto; max-width: none; border-radius: inherit; }
.detail-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.rich p { margin: 0 0 .7em; color: rgba(255, 255, 255, .88); max-width: 46em; }
.rich h4 { margin: 1em 0 .4em; font-size: 16px; }
.rich ul { margin: 0 0 .8em; padding-left: 1.3em; color: rgba(255, 255, 255, .88); }
.rich li { margin: .25em 0; }
.info { margin: 0; }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; font-size: 14.5px; }
.info-row + .info-row { border-top: 1px solid var(--hairline); }
.info-row dt { flex: none; }
.info-row dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.version { padding: 12px 0; }
.version + .version { border-top: 1px solid var(--hairline); }
.lightbox-img { width: 100%; max-height: 72vh; object-fit: contain; border-radius: 20px; margin-top: 8px; }

/* ---------- 评分 ---------- */
.rating-summary { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.rating-big { display: flex; flex-direction: column; align-items: center; min-width: 110px; }
.rating-big b { font-size: 64px; font-weight: 780; line-height: 1; letter-spacing: -.03em; }
.histogram { flex: 1; min-width: 200px; max-width: 420px; display: flex; flex-direction: column; gap: 5px; }
.hist-row { display: flex; align-items: center; gap: 8px; }
.hist-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.hist-bar i { display: block; height: 100%; border-radius: 3px; background: var(--star); }
.hist-n { width: 22px; text-align: right; }
.rating-tap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-left: auto; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; margin-top: 22px; }
.review { padding: 16px 18px; border-radius: 22px; background: var(--cell); }
.review-text { margin-top: 10px; color: rgba(255, 255, 255, .9); overflow-wrap: anywhere; white-space: pre-wrap; }
.reply { margin-top: 12px; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .08); border-left: 3px solid rgba(255, 255, 255, .5); }
.reply p { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.rate-toast { gap: 14px; }
.rate-toast .rate button svg { width: 24px; height: 24px; }

.lib-status { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ---------- 播放器 ---------- */
.player {
  position: fixed; inset: 0; width: 100vw; width: 100dvw; height: 100vh; height: 100dvh;
  z-index: 50; background: #000; display: flex; flex-direction: column; overflow: hidden; animation: fade .35s ease;
}
.player-bar {
  position: absolute; z-index: 4; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 28px; max-width: calc(100vw - 20px);
  opacity: .96; transition: opacity .28s var(--ease), transform .32s var(--ease);
}
.player-mini {
  position: absolute; z-index: 5; top: calc(env(safe-area-inset-top, 0px) + 8px); right: calc(env(safe-area-inset-right, 0px) + 8px);
  display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 24px;
  opacity: 0; pointer-events: none; transform: translateY(-8px) scale(.92);
  transition: opacity .25s var(--ease), transform .28s var(--ease);
}
.player-mini .icon-btn.sm { width: 34px; height: 34px; }
.player.immersive .player-bar { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(-18px); }
.player.immersive .player-mini { opacity: .72; pointer-events: auto; transform: none; }
.player.immersive .player-mini:hover, .player.immersive .player-mini:active { opacity: 1; }
.player-title { display: flex; align-items: center; gap: 10px; padding: 0 8px 0 2px; min-width: 0; }
.player-title b { max-width: 34vw; }
.player-stage {
  flex: 1; min-height: 0; width: 100%; height: 100%; display: flex; background: #000;
  padding-top: calc(env(safe-area-inset-top, 0px) + 64px);
  transition: padding-top .25s var(--ease);
}
.player.immersive .player-stage,
.player:fullscreen .player-stage,
.player-stage:fullscreen { padding-top: 0; }
.player-frame { flex: 1; width: 100%; height: 100%; min-height: 0; border: 0; display: block; background: #000; }
html.playing, html.playing body { overflow: hidden; overscroll-behavior: none; }
html.playing .shell, html.playing .tabbar, html.playing .topbar { visibility: hidden; }

@media (max-width: 860px) {
  .page-head h1 { font-size: 32px; }
  .hero-track { gap: 12px; padding: 8px 0 18px; margin: -8px 0 -18px; }
  .hero { min-height: 360px; border-radius: 26px; }
  .hero-body { padding: 22px 18px 18px; }
  .hero-title { font-size: clamp(28px, 8vw, 40px); }
  .hero-tagline { font-size: 15px; margin-bottom: 10px; }
  .hero-foot { flex-wrap: nowrap; padding: 10px 12px; gap: 10px; }
  .hero-foot .btn.sm { display: none; }
  .hero-art::after { background: linear-gradient(0deg, rgba(14, 10, 48, .86), rgba(14, 10, 48, .3) 70%); }
  .shelf { padding: 10px 16px 20px; margin: -10px -16px -20px; gap: 12px; }
  .cover { flex-basis: 210px; height: 268px; }
  .lockup-grid { grid-template-columns: 1fr; }
  .detail-head { padding: 20px 16px; }
  .detail-top { flex-direction: column; align-items: flex-start; gap: 16px; }
  .detail-top .gicon { --s: 96px !important; }
  .facts { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
  .fact:nth-child(4) { border-left: 0; }
  .detail-cols { grid-template-columns: 1fr; }
  .shot { height: 210px; }
  .rating-tap { margin-left: 0; }
  .player-bar { gap: 4px; padding: 5px 6px; }
  .player-title b { max-width: 28vw; font-size: 14px; }
  .player-title .badge { display: none; }
}
