/* ========== 基础变量（前台 + 后台共用） ========== */
:root {
	--red: #fe3336;
	--red-dark: #e01f22;
	--gold: #f5d78e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* rem 基准：375px 视口时 1rem=50px，PC 端锁定 50px */
html { font-size: min(50px, 13.333vw); }

body {
	font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
	background: #12101f;
	color: #f2f0fa;
	-webkit-font-smoothing: antialiased;
}

/* ========== 游戏主题背景图 ========== */
.page-bg {
	position: fixed; inset: 0; z-index: 0;
	background: url("../images/bg.jpg") center / cover no-repeat fixed;
}
.page-bg::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(10, 8, 22, 0.55) 0%, rgba(10, 8, 22, 0.35) 40%, rgba(10, 8, 22, 0.75) 100%);
}

/* ========== 固定顶栏 ========== */
.nav-top-wrap {
	position: fixed; left: 0; top: 0; width: 100%; height: .8rem;
	z-index: 99;
	background: linear-gradient(180deg, rgba(16, 12, 32, 0.92), rgba(16, 12, 32, 0.72));
	backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(245, 215, 142, 0.25);
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.nav-top {
	margin: 0 auto; max-width: 750px; height: 100%;
	display: flex; justify-content: center; align-items: center;
	padding: 0 .3rem;
}
.nav-top h2 {
	color: var(--gold); font-size: .28rem; font-weight: bold;
	text-shadow: 0 0 12px rgba(245, 215, 142, 0.35);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	letter-spacing: 1px;
}

/* ========== 主区域 ========== */
.main-wrap {
	position: relative; z-index: 1;
	display: flex; flex-direction: column;
	width: 100%; max-width: 750px;
	min-height: 100vh;
	margin: 0 auto;
	padding-top: .8rem;
	padding-bottom: 1rem;
}

/* ========== 公告条 ========== */
.notice {
	display: flex; align-items: center;
	font-size: .22rem;
	background: rgba(12, 10, 26, 0.65);
	border: 1px solid rgba(245, 215, 142, 0.28);
	color: #efe6c8;
	border-radius: .1rem;
	width: calc(100% - .48rem);
	height: .52rem;
	margin: .24rem auto 0;
	overflow: hidden;
	backdrop-filter: blur(6px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.notice-title {
	flex-shrink: 0; padding: 0 .2rem;
	font-weight: bold; color: var(--gold);
	border-right: 1px solid rgba(245, 215, 142, 0.3);
	height: 100%; display: flex; align-items: center;
}
.notice-content { flex: 1; overflow: hidden; white-space: nowrap; }
.notice-content p {
	display: inline-block; padding-left: 100%;
	animation: marquee 14s linear infinite;
}
@keyframes marquee {
	to { transform: translateX(-100%); }
}

/* ========== 轮播 banner ========== */
.ad-1-wrap {
	position: relative;
	margin: .28rem .24rem 0;
	border-radius: .14rem;
	overflow: hidden;
	border: 1px solid rgba(245, 215, 142, 0.3);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 24px rgba(124, 92, 255, 0.15);
}
.banner-slides { position: relative; width: 100%; aspect-ratio: 750 / 300; }
.banner-slide {
	position: absolute; inset: 0;
	opacity: 0; transition: opacity .6s ease;
	text-decoration: none; display: block;
}
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-dots {
	position: absolute; right: .2rem; bottom: .15rem;
	display: flex; gap: .08rem; z-index: 5;
}
.banner-dots span {
	width: .12rem; height: .12rem; border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer; transition: background .3s, width .3s;
}
.banner-dots span.active { background: var(--gold); width: .3rem; border-radius: .1rem; }

/* ========== 列表标题 ========== */
.list-title {
	margin-top: .44rem; padding: 0 .3rem;
	font-size: .28rem; font-weight: bold;
	display: flex; align-items: center;
	color: #fff;
	text-shadow: 0 0 10px rgba(124, 92, 255, 0.5);
}
.list-title::before {
	content: "";
	width: .06rem; height: .3rem;
	background: linear-gradient(180deg, var(--gold), var(--red));
	border-radius: .04rem;
	margin-right: .14rem;
}
.list-title::after {
	content: "";
	flex: 1; height: 1px;
	margin-left: .18rem;
	background: linear-gradient(90deg, rgba(245, 215, 142, 0.4), transparent);
}

/* ========== 游戏网格：一行 3 个 ========== */
.game-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .22rem;
	padding: .28rem .24rem 0;
}
.game-card {
	position: relative;
	display: flex; flex-direction: column; align-items: center;
	padding: .3rem .18rem .22rem;
	background: linear-gradient(160deg, rgba(30, 24, 56, 0.82), rgba(16, 12, 34, 0.86));
	border: 1px solid rgba(124, 92, 255, 0.28);
	border-radius: .16rem;
	text-decoration: none;
	color: #f2f0fa;
	backdrop-filter: blur(6px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
	transition: transform .2s, border-color .2s, box-shadow .2s;
	overflow: hidden;
}
.game-card::before {
	content: "";
	position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
	background: linear-gradient(90deg, transparent, rgba(245, 215, 142, 0.55), transparent);
}
.game-card:hover {
	transform: translateY(-6px);
	border-color: rgba(245, 215, 142, 0.6);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 92, 255, 0.3);
}

/* 放大的游戏图标 */
.game-card .img-wrap {
	width: 1.7rem; height: 1.7rem;
	border-radius: .2rem; overflow: hidden;
	background: #1c1733;
	border: 1px solid rgba(245, 215, 142, 0.3);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
	flex-shrink: 0;
}
.game-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-card .icon-fallback {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	font-size: .6rem; font-weight: bold; color: var(--gold);
	background: linear-gradient(150deg, #2c2352, #171230);
}

.game-card .name {
	margin-top: .18rem;
	font-size: .26rem; font-weight: bold; line-height: 1.3;
	text-align: center;
	overflow: hidden; text-overflow: ellipsis;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
	min-height: .68rem;
}
.game-card .count {
	margin-top: .08rem;
	font-size: .2rem; color: #ff8a5c; font-weight: 500;
	line-height: 1.4;
	overflow: hidden; text-overflow: ellipsis;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
	min-height: .56rem;
}
.game-card .desc {
	margin-top: .06rem;
	font-size: .19rem; color: #9d97b8;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	max-width: 100%;
}

/* 下载按钮 */
.btn-download {
	margin-top: .18rem;
	display: flex; align-items: center; justify-content: center; gap: .06rem;
	width: 100%; height: .56rem;
	background: linear-gradient(180deg, #ff5a5c, var(--red));
	color: #fff; font-size: .24rem; font-weight: bold;
	border-radius: .7rem;
	box-shadow: 0 4px 14px rgba(254, 51, 54, 0.4);
	transition: filter .2s, transform .1s;
}
.game-card:hover .btn-download { filter: brightness(1.12); }
.btn-download:active { transform: scale(0.95); }
.btn-download .ico { font-size: .22rem; }

/* ========== 空状态 / 页脚 ========== */
.empty { text-align: center; padding: .8rem 0; color: #9d97b8; font-size: .24rem; }
.site-footer {
	position: relative; z-index: 1;
	max-width: 750px; margin: 0 auto;
	text-align: center; padding: .3rem 0 .4rem;
	font-size: .2rem; color: #77719a;
}
