Files
Genarrative/packages/shared/src/components/GameDetailDisplay/index.css
T
suzmii 44f02ee19b 完善游戏审核试玩与客户端版本更新
后台审核详情复用公开游戏详情样式,补齐发布者、冻结资料、素材换签和待审 ZIP 试玩。

AGC 保存已发布作品绑定,支持同一 gameId 更新版本并由用户填写目标版本号。

保留 SpacetimeDB 表结构不变,增加版本号请求校验、幂等边界和本地清单字段。
2026-10-03 12:35:57 +08:00

350 lines
6.8 KiB
CSS

/*
* 游戏详情展示层样式:公开游戏详情与后台审核详情共用同一套 hero、封面/截图、正文与资料侧栏。
*
* 这里只放表现。游戏数据加载、游玩入口、评价与审核动作都留在各自宿主里,
* 组件本身不取数、不鉴权。类名统一用 `game-detail-` 前缀,避免与宿主自己的
* 游戏卡片(`.game-cover` / `.game-eyebrow` / `.game-avatar` 等)互相影响。
*/
.game-detail-display {
min-width: 0;
color: var(--platform-text-strong);
font-family: var(--platform-font-family, system-ui, sans-serif);
font-weight: 400;
}
.game-detail-eyebrow {
display: inline-flex;
align-items: center;
gap: 0.38rem;
color: var(--platform-accent-strong);
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.game-detail-eyebrow svg {
width: 0.9rem;
height: 0.9rem;
}
/* 封面:素材未就绪时用渐变 + 图标占位,换签成功后图片覆盖在占位之上。 */
.game-detail-cover {
position: relative;
display: flex;
min-height: 12rem;
align-items: center;
justify-content: center;
overflow: hidden;
isolation: isolate;
}
.game-detail-cover__grid {
position: absolute;
inset: 0;
opacity: 0.22;
background-image: linear-gradient(
rgba(255, 255, 255, 0.2) 1px,
transparent 1px
),
linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
background-size: 2rem 2rem;
transform: perspective(12rem) rotateX(58deg) scale(1.7) translateY(25%);
}
.game-detail-cover__glow {
position: absolute;
width: 70%;
aspect-ratio: 1;
border-radius: 50%;
background: radial-gradient(
circle,
rgba(255, 236, 204, 0.5),
transparent 66%
);
filter: blur(0.6rem);
}
.game-detail-cover__icon {
position: relative;
z-index: 1;
display: grid;
width: 5.4rem;
aspect-ratio: 1;
place-items: center;
border: 1px solid rgba(255, 255, 255, 0.4);
border-radius: 1.5rem;
background: rgba(255, 255, 255, 0.13);
box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
color: #fff5dc;
font-size: 3rem;
backdrop-filter: blur(8px);
}
.game-detail-cover > img {
position: absolute;
inset: 0;
z-index: 2;
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.game-detail-showcase {
display: grid;
gap: 0.7rem;
min-width: 0;
}
.game-detail-thumbs {
display: flex;
gap: 0.5rem;
overflow-x: auto;
padding-bottom: 0.15rem;
scroll-snap-type: x proximity;
scrollbar-width: thin;
}
.game-detail-thumb {
position: relative;
flex: 0 0 auto;
width: 5.4rem;
aspect-ratio: 16 / 9;
overflow: hidden;
border: 1px solid var(--platform-surface-border);
border-radius: 0.7rem;
padding: 0;
background: linear-gradient(
135deg,
rgba(241, 159, 95, 0.24),
rgba(91, 49, 42, 0.16)
);
cursor: pointer;
scroll-snap-align: start;
transition: 160ms ease;
}
.game-detail-thumb:hover {
border-color: rgba(199, 101, 61, 0.45);
}
.game-detail-thumb[aria-pressed='true'] {
border-color: rgba(199, 101, 61, 0.62);
box-shadow: 0 0 0 2px rgba(199, 101, 61, 0.22);
}
.game-detail-thumb img {
position: absolute;
inset: 0;
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.game-detail-thumb__placeholder {
position: absolute;
inset: 0;
display: block;
width: 100%;
height: 100%;
}
.game-detail-hero {
display: grid;
grid-template-columns: minmax(13rem, 21rem) minmax(0, 1fr);
align-items: center;
gap: clamp(1.4rem, 4vw, 3.5rem);
margin-top: 1.5rem;
}
.game-detail-hero .game-detail-cover {
border-radius: 1.7rem;
box-shadow: 0 1.25rem 2.5rem rgba(70, 42, 34, 0.18);
}
.game-detail-hero h1 {
margin: 0.65rem 0 0;
font-size: clamp(2rem, 4.8vw, 3.7rem);
font-weight: 400;
line-height: 1.5;
overflow-wrap: anywhere;
letter-spacing: -0.055em;
}
.game-detail-hero__summary {
max-width: 32rem;
margin: 0.8rem 0 0;
color: var(--platform-text-base);
font-size: 1rem;
line-height: 1.75;
}
.game-detail-hero__author {
display: flex;
align-items: center;
gap: 0.55rem;
margin-top: 1.15rem;
color: var(--platform-text-soft);
font-size: 0.78rem;
font-weight: 700;
}
.game-detail-avatar {
display: grid;
width: 1.8rem;
height: 1.8rem;
place-items: center;
border-radius: 50%;
background: rgba(199, 101, 61, 0.18);
color: var(--platform-accent-strong);
font-weight: 900;
}
.game-detail-hero__actions {
display: flex;
align-items: center;
gap: 1rem;
margin-top: 1.4rem;
}
.game-detail-hero__play-count {
color: var(--platform-text-soft);
font-size: 0.75rem;
}
.game-detail-body {
display: grid;
grid-template-columns: minmax(0, 1fr) 17rem;
gap: 3rem;
margin-top: 3rem;
border-top: 1px solid var(--platform-surface-border);
padding-top: 2rem;
}
.game-detail-main h2 {
margin: 0;
font-size: 1.25rem;
}
.game-detail-main p {
max-width: 45rem;
margin: 0.75rem 0 0;
color: var(--platform-text-base);
line-height: 1.9;
}
.game-detail-tag-list {
display: flex;
flex-wrap: wrap;
gap: 0.45rem;
margin-top: 1.3rem;
}
.game-detail-tag-list span {
border: 1px solid var(--platform-surface-border);
border-radius: 999px;
padding: 0.35rem 0.65rem;
color: var(--platform-text-soft);
font-size: 0.7rem;
font-weight: 700;
}
.game-detail-side {
display: grid;
gap: 0.7rem;
align-content: start;
}
.game-detail-info-card {
display: grid;
gap: 0.3rem;
border: 1px solid var(--platform-surface-border);
border-radius: 1rem;
padding: 0.8rem 0.9rem;
background: var(--platform-panel-fill);
}
.game-detail-info-card strong {
font-size: 0.72rem;
}
.game-detail-info-card span {
display: inline-flex;
align-items: center;
gap: 0.28rem;
color: var(--platform-text-soft);
min-width: 0;
overflow-wrap: anywhere;
font-size: 0.72rem;
line-height: 1.45;
}
.game-detail-info-card svg {
width: 0.85rem;
}
.game-detail-footnote {
display: flex;
align-items: center;
gap: 0.4rem;
margin-top: 2.2rem;
color: var(--platform-text-soft);
font-size: 0.7rem;
}
.game-detail-footnote svg {
width: 0.9rem;
}
@media (max-width: 820px) {
.game-detail-hero {
grid-template-columns: 9rem minmax(0, 1fr);
gap: 1.15rem;
}
.game-detail-hero .game-detail-cover {
min-height: 9rem;
}
.game-detail-cover__icon {
width: 3.7rem;
border-radius: 1rem;
font-size: 2rem;
}
.game-detail-body {
grid-template-columns: 1fr;
gap: 1.5rem;
}
.game-detail-side {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 560px) {
.game-detail-thumb {
width: 4.6rem;
}
.game-detail-hero {
display: block;
}
.game-detail-hero .game-detail-cover {
min-height: 13rem;
margin-top: 1.2rem;
}
.game-detail-hero h1 {
margin-top: 1.4rem;
}
.game-detail-side {
grid-template-columns: 1fr;
}
}