/* ============================================================
   华夏游戏盒子 - 主样式表
   Design: Dark Gaming Theme with Gold Accents
   ============================================================ */

/* ----- CSS Custom Properties ----- */
:root {
    /* 主色调 */
    --clr-bg-primary: #1a1410;
    --clr-bg-secondary: #2a1f18;
    --clr-bg-tertiary: #3a2f2a;
    --clr-bg-card: #4c4441;
    --clr-bg-card-hover: #312b29;
    --clr-bg-dark: #2e2623;
    --clr-bg-overlay: rgba(0, 0, 0, 0.75);

    /* 强调色 */
    --clr-gold: #e8debb;
    --clr-gold-light: #f5efd5;
    --clr-gold-dark: #c4b87a;
    --clr-red: #ff4444;
    --clr-red-warning: #ff0000;

    /* 文字色 */
    --clr-text-primary: #f0ead6;
    --clr-text-secondary: #a5a29d;
    --clr-text-muted: #8a8680;
    --clr-text-white: #ffffff;

    /* 边框色 */
    --clr-border: #c2c29c;
    --clr-border-light: rgba(232, 222, 187, 0.3);
    --clr-border-dashed: #817976;

    /* 尺寸 */
    --max-width: 1350px;
    --header-height: 110px;
    --banner-mt: -90px;  /* 首页默认；子页通过行内样式覆盖为 -350px */

    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 4px 20px rgba(232, 222, 187, 0.15);

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* 字体 */
    --font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background-color: var(--clr-bg-primary);
    color: var(--clr-text-primary);
    line-height: 1.6;
    min-width: 320px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, li {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ----- Scrollbar Styling ----- */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--clr-bg-card);
    border-radius: var(--radius-sm);
}

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

/* ============================================================
   HEADER - 顶部导航
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    /* border-bottom: 1px solid var(--clr-border-light); */
    transition: all var(--transition-base);
}

/* 背景图 */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../picture/hdb.jpg') center bottom no-repeat;
    background-size: cover;
    z-index: 0;
}

.header.scrolled {
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--clr-gold-dark);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    height: var(--header-height);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Logo — 绝对居中 ---- */
.logo {
    position: absolute;
    left: 49%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.logo img {
    width: auto;
    height: 90px;
    transition: transform var(--transition-base);
}

.logo img:hover {
    transform: scale(1.05);
}

/* ---- 导航菜单 ---- */
.nav {
    width: 100%;
}

.nav ul {
    text-align: center;
    padding: 10px 0;
}

.nav li {
    display: inline-block;
    vertical-align: middle;
}

.nav li a {
    display: block;
    padding: 10px 38px;
    transition: all var(--transition-base);
}

.nav .nav-title {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: var(--clr-gold);
    line-height: 1.3;
}

.nav p {
    font-size: 12px;
    color: var(--clr-text-muted);
    margin-top: 4px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav li a:hover .nav-title,
.nav li a.active .nav-title {
    color: var(--clr-gold-light);
}

.nav li a:hover p,
.nav li a.active p {
    color: var(--clr-gold);
}

/* 第2、3项之间留出 Logo 空间 */
.nav ul li:nth-child(2) {
    padding-right: 135px;
}

.nav ul li:nth-child(3) {
    padding-left: 135px;
}

/* ---- 下拉菜单 ---- */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--clr-bg-tertiary);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) 0;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    padding: 8px 18px !important;
    color: var(--clr-gold) !important;
    font-size: 13px !important;
    white-space: nowrap;
    text-align: center;
}

.dropdown-menu a:hover {
    background: rgba(232, 222, 187, 0.1) !important;
    color: var(--clr-gold-light) !important;
}

/* 移动菜单关闭按钮（桌面端隐藏 — 提高优先级覆盖 .nav li inline-block） */
.nav li.menu-close-item { display: none; }

/* 移动菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--clr-gold);
    transition: all var(--transition-base);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   BANNER - 下载区
   ============================================================ */
.banner {
    position: relative;
    z-index: 10;
    width: 100%;
    overflow: visible;
    margin-top: var(--banner-mt, -90px);
    aspect-ratio: 1900 / 774;
    background: linear-gradient(135deg, #1a1410 0%, #2a1f18 40%, #1a1410 100%);
}

/* 背景图 — 支持 GIF 动画 */
.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.banner-content {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
}

.banner-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 130px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(232, 222, 187, 0.2);
    border-radius: 8px;
    padding: 0 12px;
}

.dl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 10px 28px;
    text-align: center;
    transition: background var(--transition-base);
    position: relative;
}

.dl-item + .dl-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(232, 222, 187, 0.2);
}

.dl-item:hover {
    background: rgba(232, 222, 187, 0.06);
    transform: translateY(-2px);
}

/* 二维码 */
.dl-qr img {
    width: 72px;
    height: 72px;
    border: 2px solid var(--clr-gold);
    border-radius: 4px;
    padding: 4px;
    background: #fff;
}

.dl-qr span {
    display: block;
    margin-top: 8px;
    color: var(--clr-gold);
    font-size: 13px;
}

/* 中心下载按钮 */
.dl-center .btn-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--clr-gold-light);
    font-size: 16px;
    font-weight: bold;
}

.dl-center .btn-download img {
    width: 56px;
    height: auto;
    transition: transform var(--transition-base);
}

.dl-center .btn-download:hover img {
    transform: scale(1.1);
}

/* PC下载 */
.dl-pc .btn-pc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--clr-gold);
    font-size: 14px;
}

.dl-pc .btn-pc img {
    width: 42px;
    height: 42px;
    opacity: 0.8;
    transition: all var(--transition-base);
}

.dl-pc .btn-pc:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* ============================================================
   BANNER - ban1-down 下载模块
   基于 ban-down.png (560×160) 布局
   b1(126×105) 左 | b2(132×58) 右
   ============================================================ */
.ban1-down {
    width: 560px;
    height: 160px;
    background: url(../picture/ban1-down.png) no-repeat;
    background-size: 560px 160px;
    position: relative;
    margin: 0 auto;
}

.ban1-down .left {
    width: 126px; height: 105px; float: left;
    margin-top: 18px; margin-left: 25px; cursor: pointer;
}
.ban1-down .left img { width: 126px; height: 105px; }
.ban1-down .left:hover { animation: ban1Bounce 0.8s ease infinite; }

.ban1-down .center {
    width: 132px;
    height: 58px;
    float: right;
    margin-top: 22px;
    margin-right: 25px;
    cursor: pointer;
}
.ban1-down .center img { width: 132px; height: 116px; }
.ban1-down .center:hover { animation: ban1Bounce 0.8s ease infinite; }

@keyframes ban1Bounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

/* ban1-down 响应式 — 逐级缩小适配手机宽度 */
@media (max-width: 768px) {
    .banner { margin-top: 0; }
    .banner-content { top: 80%; }
    .ban1-down {
        transform: scale(0.85);
        transform-origin: top center;
    }
}

@media (max-width: 640px) {
    .ban1-down {
        transform: scale(0.7);
        transform-origin: top center;
    }
}

@media (max-width: 480px) {
    .ban1-down {
        transform: scale(0.55);
        transform-origin: top center;
    }
}

@media (max-width: 380px) {
    .ban1-down {
        transform: scale(0.45);
        transform-origin: top center;
    }
}

/* ============================================================
   NOTICE BAR - 公告栏
   ============================================================ */
.notice-bar {
    background: var(--clr-bg-secondary);
    border-bottom: 1px solid var(--clr-border-light);
    padding: 12px 0;
}

.notice-inner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.notice-icon {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    color: var(--clr-gold);
    font-weight: bold;
}

.notice-icon img {
    width: 28px;
    height: 28px;
}

.notice-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 28px;
}

.notice-scroll p {
    position: absolute;
    white-space: nowrap;
    color: var(--clr-gold);
    font-size: 14px;
    line-height: 28px;
    animation: noticeScroll 60s linear infinite;
}

.notice-scroll:hover p {
    animation-play-state: paused;
}

@keyframes noticeScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.notice-btn a {
    flex-shrink: 0;
    padding: 6px 16px;
    border: 1px solid var(--clr-gold);
    color: var(--clr-gold);
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.notice-btn a:hover {
    background: rgba(232, 222, 187, 0.15);
    color: var(--clr-gold-light);
}

/* ============================================================
   NEWS SECTION - 新闻资讯区
   ============================================================ */
.news-section {
    padding: var(--spacing-lg) 0;
    background-image: url(../picture/heibg.png);
    background-repeat: repeat;
    background-color: var(--clr-bg-secondary);
}

/* ============================================================
   SECTION HEADERS - 统一标题样式
   ============================================================ */
.section-header {
    display: flex;
    align-items: flex-end;
    gap: 0;
    margin-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(232, 222, 187, 0.12);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--clr-gold);
    white-space: nowrap;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--clr-gold);
    margin-bottom: -1px;
}

.section-line {
    flex: 1;
    min-width: 0;
}

.section-more {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--clr-text-muted);
    font-size: 13px;
    flex-shrink: 0;
    padding-bottom: 10px;
    margin-left: var(--spacing-md);
    transition: color var(--transition-fast);
}

.section-more:hover {
    color: var(--clr-gold);
}

.section-more img {
    width: 14px;
    height: 14px;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.section-more:hover img {
    opacity: 1;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

/* 左侧轮播 */
.news-slider {
    position: relative;
}

.slider-main {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 400px;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--clr-border-light);
    background: #000;
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slider-slide {
    min-width: 100%;
    height: 100%;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--clr-gold);
    border: 1px solid var(--clr-border-light);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    background: rgba(232, 222, 187, 0.2);
    border-color: var(--clr-gold);
}

.slider-prev { left: 12px; }
.slider-next { right: 12px; }

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-sm);
    z-index: 10;
}

.slider-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-base);
}

.slider-dots span.active {
    background: var(--clr-gold);
    transform: scale(1.3);
}

/* 右侧Tab列表 */
.news-list {
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.news-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--clr-border-light);
}

.news-tabs ul {
    display: flex;
    flex: 1;
}

.news-tabs ul li {
    padding: 14px 20px;
    cursor: pointer;
    color: var(--clr-text-muted);
    font-size: 15px;
    position: relative;
    transition: all var(--transition-base);
    font-weight: bold;
}

.news-tabs ul li.active {
    color: var(--clr-gold);
}

.news-tabs ul li.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: var(--clr-gold);
}

.news-tabs ul li:hover {
    color: var(--clr-gold-light);
}

.more-btn {
    padding: 14px 16px;
    flex-shrink: 0;
}

.more-btn img {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.more-btn:hover img {
    opacity: 1;
}

.news-tab-content {
    padding: var(--spacing-md);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.featured {
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px dashed var(--clr-border-dashed);
}

.featured a {
    color: var(--clr-gold-light);
    font-size: 15px;
    font-weight: bold;
    line-height: 1.5;
    display: block;
    transition: color var(--transition-fast);
}

.featured a:hover {
    color: var(--clr-text-white);
}

.tab-panel ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px dashed rgba(129, 121, 118, 0.3);
    transition: all var(--transition-fast);
}

.tab-panel ul li a:hover {
    background: rgba(232, 222, 187, 0.05);
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

.tab-panel ul li .title {
    flex: 1;
    color: var(--clr-text-secondary);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-panel ul li a:hover .title {
    color: var(--clr-text-primary);
}

.tab-panel ul li .time {
    color: var(--clr-text-muted);
    font-size: 12px;
    margin-left: var(--spacing-sm);
    flex-shrink: 0;
}

/* ============================================================
   GAMES SECTION - 游戏推荐区
   ============================================================ */
.games-section {
    padding: var(--spacing-lg) 0;
}

.section-title-decorated {
    font-size: 24px;
    font-weight: 700;
    color: var(--clr-gold);
    margin-bottom: var(--spacing-xl);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--clr-gold);
    position: relative;
}

/* 下方通栏半透明线 — 与 section-header 保持一致 */
.section-title-decorated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(232, 222, 187, 0.12);
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-bottom: 30px;
}

.game-card {
    border: 1px solid var(--clr-border);
    background: var(--clr-bg-tertiary);
    transition: all var(--transition-base);
}

.game-card:hover {
    box-shadow: var(--shadow-gold);
    border-color: var(--clr-gold);
    transform: translateY(-2px);
}

.game-cover {
    width: 100%;
    height: 217px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.game-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.game-card:hover .game-cover img {
    transform: scale(1.05);
}

.game-info {
    display: flex;
    height: 170px;
    /* background: var(--clr-bg-card); */
    background: var(--clr-bg-secondary);
    transition: background var(--transition-base);
}

.game-info + .game-info {
    margin-top: 4px;
}

.game-info:hover {
    background: var(--clr-bg-card-hover);
}

/* 左侧图片区 */
.game-info-left {
    flex: 0 0 35%;
    overflow: hidden;
    padding: 6px;
}

.game-thumb {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    border: 2px solid rgba(232, 222, 187, 0.2);
    border-radius: 6px;
    overflow: hidden;
    background: #222;
    transition: border-color var(--transition-base);
}

/* 底部渐变遮罩 — 与 game-cover 一致 */
.game-thumb::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* hover 金色遮罩 */
.game-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(232, 222, 187, 0);
    border-radius: 4px;
    transition: background var(--transition-base);
    z-index: 1;
    pointer-events: none;
}

.game-thumb:hover {
    border-color: var(--clr-gold);
}

.game-thumb:hover::after {
    background: rgba(232, 222, 187, 0.1);
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.game-thumb:hover img {
    transform: scale(1.1);
}

/* 右侧文本区 */
.game-info-right {
    flex: 1;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
}

.game-info-right h5 {
    font-size: 19px;
    color: var(--clr-gold);
    margin-bottom: 4px;
}

.tag {
    display: inline-block;
    line-height: 18px;
    font-size: 12px;
    font-weight: normal;
    padding: 0 5px;
    vertical-align: middle;
    border: 1px solid var(--clr-gold);
    margin-left: 6px;
    border-radius: 2px;
    color: var(--clr-gold);
}

.tag.retro {
    border-color: var(--clr-red);
    color: var(--clr-red);
}

.game-info-right p {
    line-height: 1.5;
    color: var(--clr-text-secondary);
    font-size: 13px;
    margin: 2px 0;
    flex: 1;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.btn-go {
    display: inline-block;
    width: 100px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    font-size: 13px;
    color: var(--clr-gold);
    background: var(--clr-bg-dark);
    border: 1px solid var(--clr-gold);
    border-radius: var(--radius-sm);
    margin-top: auto;
    transition: all var(--transition-base);
    overflow: hidden;
    position: relative;
    align-self: flex-end;
}

.btn-go::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(232, 222, 187, 0.21);
    transition: width 0.2s ease-in;
    z-index: 0;
}

.btn-go:hover::before {
    width: 100%;
}

.btn-go:hover {
    color: var(--clr-gold-light);
    border-color: var(--clr-gold-light);
}

/* ============================================================
   VIDEO SECTION - 视频中心
   ============================================================ */
.video-section {
    padding: var(--spacing-lg) 0;
    background: var(--clr-bg-secondary);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-md);
}

.video-card {
    transition: transform var(--transition-base);
}

.video-card:hover {
    transform: translateY(-6px);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #1a1a1a;
    border: 1px solid var(--clr-border-light);
}

.video-thumb > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.video-card:hover .video-thumb > img {
    transform: scale(1.08);
}

.play-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background var(--transition-base);
}

.play-btn img {
    width: 63px;
    height: 63px;
    opacity: 0.85;
    transition: all var(--transition-base);
}

.video-card:hover .play-btn {
    background: rgba(0, 0, 0, 0.5);
}

.video-card:hover .play-btn img {
    opacity: 1;
    transform: scale(1.15);
}

.video-title {
    padding: var(--spacing-sm) 0;
}

.video-title span {
    font-size: 13px;
    color: var(--clr-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.video-card:hover .video-title span {
    color: var(--clr-text-primary);
}

/* ============================================================
   SCREENSHOT SECTION - 游戏截图
   ============================================================ */
.screenshot-section {
    padding: var(--spacing-lg) 0;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.screenshot-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--clr-border-light);
    transition: all var(--transition-base);
}

.screenshot-card:hover {
    border-color: var(--clr-gold);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

.screenshot-inner {
    position: relative;
    overflow: hidden;
}

.screenshot-zoom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(232, 222, 187, 0.08);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.screenshot-card:hover .screenshot-zoom {
    opacity: 1;
}

.img-wrapper {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.screenshot-card:hover .img-wrapper img {
    transform: scale(1.08);
}

/* ============================================================
   LIGHTBOX - 图片预览
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--clr-bg-overlay);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 44px;
    color: var(--clr-gold);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.lightbox-close:hover {
    color: var(--clr-text-white);
    transform: scale(1.2);
}

/* ============================================================
   FOOTER - 页脚
   ============================================================ */
.footer {
    background: var(--clr-bg-secondary);
    border-top: 1px solid var(--clr-border-light);
}

.footer-main {
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
    background: url('../picture/footer_img.png') center top no-repeat;
    background-size: cover;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.footer-logo img {
    width: auto;
    height: 90px;
}

.footer-text {
    flex: 1;
    min-width: 280px;
}

.footer-text p {
    color: var(--clr-text-white);
    line-height: 30px;
    font-size: 14px;
}

.footer-text .age-warning {
    color: var(--clr-red-warning);
    margin: var(--spacing-sm) 0;
}

.footer-text a {
    color: var(--clr-text-white);
    text-decoration: underline;
}

.footer-text a:hover {
    color: var(--clr-gold);
}

/* ============================================================
   BACK TO TOP - 回到顶部
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--clr-bg-tertiary);
    border: 1px solid var(--clr-gold);
    color: var(--clr-gold);
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--clr-gold);
    color: var(--clr-bg-primary);
    box-shadow: var(--shadow-gold);
}

/* ============================================================
   SCROLL ANIMATIONS - 滚动动画
   ============================================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.animated > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.animated > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.animated > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children.animated > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children.animated > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children.animated > *:nth-child(6) { transition-delay: 0.5s; }
.stagger-children.animated > * {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE - 响应式设计
   ============================================================ */

/* 大屏 (1024px - 1350px) */
@media (max-width: 1400px) {
    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .game-cover {
        height: 180px;
    }

    .game-info {
        height: 150px;
    }

    .game-info-left {
        flex: 0 0 35%;
    }

    .game-info-right {
        padding: 10px 14px;
    }

    .game-info-right h5 {
        font-size: 16px;
    }

    .game-info-right .tag {
        font-size: 11px;
        line-height: 16px;
    }

    .game-info-right p {
        font-size: 12px;
    }

    .btn-go {
        width: 85px;
        height: 26px;
        line-height: 26px;
        font-size: 12px;
    }
}

/* 平板 (768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --max-width: 100%;
    }

    /* 缩小 nav 项间距 */
    .nav li a {
        padding: 8px 18px;
    }

    .nav .nav-title {
        font-size: 17px;
    }

    .nav p {
        font-size: 11px;
    }

    .nav ul li:nth-child(2) {
        padding-right: 90px;
    }

    .nav ul li:nth-child(3) {
        padding-left: 90px;
    }

    .logo img {
        height: 64px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-list {
        max-height: none;
    }

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

    .screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-cover {
        height: 200px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* 手机 (320px - 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    /* 修复移动端菜单被 overflow:hidden 裁剪的问题 */
    .header { overflow: visible; }

    /* ----- 全局排版 ----- */
    html { font-size: 15px; }
    .container { padding: 20px 12px 0; }

    /* ----- section 间距 ----- */
    .news-section, .games-section, .video-section, .screenshot-section {
        padding: 12px 0;
    }
    .news-section { padding-top: 122px; }
    .footer-main { padding: var(--spacing-sm) 0 var(--spacing-xl); }
    .hot-rank-card { display: none; }
    .news-sidebar .sidebar-card:first-child,
    .news-sidebar .sidebar-card:last-child { display: none; }
    .section-header { margin-top: 5px; margin-bottom: 20px; }
    .news-section .section-header { margin-top: 35px; }
    .section-header h2 { font-size: 17px; }
    .section-title-decorated { font-size: 18px; }

    .header-inner {
        padding: 0 var(--spacing-sm);
        justify-content: flex-end;
    }

    /* 移动端 logo 靠左 */
    .logo {
        position: absolute;
        left: var(--spacing-sm);
        top: 50%;
        transform: translateY(-50%);
    }

    .logo img {
        height: 40px;
    }

    /* 移动端 nav 不占满宽度 */
    .nav {
        width: auto;
    }

    /* 移除桌面端 nav 项间距 */
    .nav ul li:nth-child(2) {
        padding-right: 0;
    }

    .nav ul li:nth-child(3) {
        padding-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* 菜单打开时，按钮被JS移入ul内部 — 绝对定位在所有li上方 */
    .nav ul .mobile-menu-btn {
        position: absolute;
        top: 15px;
        right: 20px;
        z-index: 1001;
    }

    .nav ul {
        position: fixed;
        top: 0;
        right: -110%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--clr-bg-secondary);
        padding: 70px var(--spacing-lg) var(--spacing-lg);
        transition: right var(--transition-base);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        overflow-y: auto;
        text-align: left;
    }

    .nav ul.active {
        right: 0;
    }

    .nav li {
        display: block;
        border-bottom: 1px solid rgba(232, 222, 187, 0.08);
    }

    .nav li:last-child {
        border-bottom: none;
    }

    .nav li a {
        display: block;
        padding: 14px 12px;
        border-radius: var(--radius-sm);
    }

    .nav li a:hover,
    .nav li a.active {
        background: rgba(232, 222, 187, 0.08);
    }

    .nav .nav-title {
        font-size: 17px;
    }

    .nav p {
        font-size: 12px;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: transparent;
        border: none;
        box-shadow: none;
        padding-left: var(--spacing-md);
    }

    .banner {
        aspect-ratio: auto;
        min-height: 240px;
    }

    .banner-download {
        height: 100px;
        padding: 0 6px;
    }

    .dl-item {
        padding: 8px 14px;
    }

    .dl-qr img {
        width: 50px;
        height: 50px;
    }

    .dl-qr span {
        font-size: 11px;
        margin-top: 4px;
    }

    .dl-center .btn-download {
        font-size: 13px;
    }

    .dl-center .btn-download img {
        width: 38px;
    }

    .dl-pc .btn-pc {
        font-size: 11px;
    }

    .dl-pc .btn-pc img {
        width: 30px;
        height: 30px;
    }

    .section-header h2 {
        padding-bottom: 8px;
    }

    .section-title-decorated {
        padding-bottom: 8px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .video-grid > *:nth-child(n+5) { display: none; }

    .screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .screenshot-grid > *:nth-child(n+5) { display: none; }

    .game-cover {
        height: 150px;
    }

    .game-info {
        height: 155px;
    }

    .game-info-left {
        flex: 0 0 35%;
    }

    .game-info-right {
        flex: 1;
        padding: 10px 12px 10px 0;
    }

    .game-info-right h5 {
        font-size: 14px;
    }

    .game-info-right .tag {
        font-size: 10px;
        line-height: 15px;
        padding: 0 4px;
        margin-left: 4px;
    }

    .game-info-right p {
        font-size: 11px;
    }

    .btn-go {
        width: 72px;
        height: 24px;
        line-height: 24px;
        font-size: 11px;
    }

    .news-tabs ul li {
        padding: 10px 12px;
        font-size: 13px;
    }

    .back-to-top {
        bottom: 20px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-logo img { height: 70px; }
    .footer-text p {
        font-size: 12px;
        line-height: 22px;
    }
}

/* 小手机 (320px - 480px) */
@media (max-width: 480px) {
    :root {
        --header-height: 56px;
    }

    /* ----- 全局排版 ----- */
    html { font-size: 14px; }
    .container { padding: 16px 10px 0; }

    /* ----- section ----- */
    .news-section, .games-section, .video-section, .screenshot-section {
        padding: 10px 0;
    }
    .section-header { margin-bottom: 16px; }
    .section-header h2 { font-size: 15px; }
    .section-title-decorated { font-size: 16px; padding-bottom: 7px; }

    /* ----- 头部 ----- */
    .logo img { height: 36px; }
    .header-inner { padding: 0 8px; }

    /* ----- Banner ----- */
    .banner { min-height: 200px; }

    .video-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
    }

    .screenshot-grid {
        grid-template-columns: 1fr 1fr;
    }

    .play-btn img {
        width: 44px;
        height: 44px;
    }

    .game-cover { height: 130px; }
    .game-info { height: 135px; }
    .game-info-left { flex: 0 0 35%; }
    .game-info-right { padding: 8px 10px 8px 0; }
    .game-info-right h5 { font-size: 13px; }
    .game-info-right .tag { font-size: 9px; line-height: 14px; padding: 0 3px; margin-left: 3px; }
    .game-info-right p { font-size: 10px; }
    .btn-go { width: 60px; height: 22px; line-height: 22px; font-size: 10px; }

    .notice-inner {
        flex-wrap: wrap;
    }

    .notice-btn {
        width: 100%;
        text-align: right;
    }

    /* ----- Footer ----- */
    .footer-logo img { height: 56px; }
    .footer-text p { font-size: 11px; line-height: 20px; }

    /* ----- Back to top ----- */
    .back-to-top { bottom: 16px; right: 12px; }
}

/* 极小屏 (320px - 380px) */
@media (max-width: 380px) {
    :root { --header-height: 52px; }
    .container { padding: 12px 10px 0; }
    .banner { min-height: 180px; }
    .logo img { height: 32px; }
    .game-cover { height: 120px; }
    .game-info { height: 120px; }
    .game-info-left { flex: 0 0 35%; }
    .game-info-right { padding: 6px 8px 6px 0; }
    .game-info-right h5 { font-size: 12px; }
    .game-info-right .tag { font-size: 9px; line-height: 13px; padding: 0 3px; margin-left: 3px; }
    .game-info-right p { font-size: 10px; }
    .btn-go { width: 54px; height: 22px; line-height: 22px; font-size: 10px; }
    .video-grid { gap: 6px; }
    .play-btn img { width: 36px; height: 36px; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.clearfix::after {
    content: '';
    display: block;
    clear: both;
}

.text-gold { color: var(--clr-gold); }
.text-center { text-align: center; }
.mt-1 { margin-top: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-lg); }

/* screen-reader only — SEO 友好隐藏 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
