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

body {
    background: #121418;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    padding: 0;
    font-family: PingFang SC, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 始终保留滚动条位置：避免首页长、文章页短时页面变宽导致导航整体偏移 */
html {
    overflow-y: scroll;
}

/* 内容区撑开：内容少时页脚贴视口底部，内容多时页脚跟随内容末尾 */
.main-wrap {
    flex: 1 0 auto;
    width: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ 头部导航 - 黑金风格 ============ */
.header {
    background: #181A1E;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* 修复：360极速浏览器 video 悬浮盖顶 —— header 提到最高层，覆盖视频 */
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #FDCB32;
    text-decoration: none;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.logo img {
    max-height: 70px;
    max-width: 220px;
    object-fit: contain;
}

.logo:hover {
    color: #ffd700;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin-left: 24px;
    transition: color 0.3s;
    font-weight: 320;
    padding: 8px 30px;
    font-size: 16px;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1a1a1a !important;
    background: #FDCB32;
    border-radius: 10px;
}

/* 空链接占位（后台未填地址） */
.nav-links a.nav-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.nav-links a.nav-disabled:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent;
}

/* 移动端汉堡按钮 */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #FDCB32;
    border-radius: 2px;
}

/* ============ BANNER ============ */
.banner-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0d0d0d;
    /* 修复：建立独立层叠上下文，限制视频/覆盖层不悬浮到 header 上 */
    z-index: 0;
    isolation: isolate;
}

.banner-video {
    width: 100%;
    height: 450px;
    object-fit: cover;
    object-position: top;
    display: block;
    /* 修复：视频限制在 banner 层叠上下文内，不越层盖 header */
    position: relative;
    z-index: 0;
}

/* 视频位置预留占位 */
.banner-placeholder {
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(253, 203, 50, 0.15) 0%, transparent 60%),
        linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.placeholder-text {
    text-align: center;
    padding: 0 20px;
}

.placeholder-text h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #FDCB32;
    margin-bottom: 12px;
}

.placeholder-text p {
    font-size: 18px;
    opacity: 0.9;
    color: #fff;
}

.placeholder-hint {
    display: inline-block;
    margin-top: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 18px;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, #0a0a0a 0%, transparent 100%);
    pointer-events: none;
    /* 修复：覆盖层限制在 banner 层叠上下文内，且在视频之上，不遮 header */
    z-index: 1;
}

.banner-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* ============ 搜索模块 ============ */
.stats-bar {
    background: #14171e;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 18px 0;
}
.stats-row {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}
.stats-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.stats-num {
    font-size: 26px;
    font-weight: bold;
    color: #FDCB32;
}
.stats-label {
    font-size: 13px;
    color: #9a968d;
}
@media (max-width:600px) {
    .stats-row { gap: 20px; }
    .stats-num { font-size: 22px; }
}

.search-section {
    background: #111111;
    padding: 25px 0;
    border-bottom: 1px solid #2a2a2a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.tags-list {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tags-label {
    font-size: 14px;
    padding: 8px 18px;
    color: #FDCB32 !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 10px;
}

.tags-label-title {
    position: relative;
    display: inline-block;
    font-size: 26px;
    padding: 8px 25px;
    font-weight: 700;
    color: #ffffff !important;
    text-align: center;
    margin-left: -25px;
    margin-right: 10px;
}

.tags-label-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: #FDCB32;
    border-radius: 100px;
}

.tag-item {
    display: inline-block;
    padding: 8px 18px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    margin-top: 10px;
}

.tag-item:hover,
.tag-item.active {
    font-size: 14px;
    padding: 8px 18px;
    color: #FDCB32 !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.search-box {
    flex: 1;
    display: flex;
    gap: 10px;
    min-width: 280px;
}

.search-input {
    flex: 1;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 0px solid #333;
    border-radius: 40px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #FDCB32;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.9);
}

.search-btn {
    padding: 10px 30px;
    background: #FDCB32;
    color: #0a0a0a;
    border: none;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 320;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-btn:hover {
    background: #ffd700;
}

.clear-search {
    padding: 8px 20px;
    color: #0a0a0a;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #ffd700;
    margin-top: 10px;
}

.clear-search:hover {
    background: #333;
    color: #FDCB32;
}

/* ============ 游戏网格 ============ */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 35px;
}

.game-card {
    background: #111111;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.game-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #1a1a1a;
    display: block;
}

.game-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 20px;
}

.game-badge {
    position: absolute;
    right: 0px;
    border-radius: 20px;
    font-size: 11px;
    z-index: 10;
}

.game-info {
    padding: 16px;
}

.game-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.game-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.game-tag {
    display: inline-block;
    background: #1a1a1a;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    color: #FDCB32;
    white-space: nowrap;
    margin-left: 8px;
    flex-shrink: 0;
}

.game-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
}

.game-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn {
    flex: 1;
    display: inline-block;
    padding: 7px 0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #FDCB32;
    color: #0a0a0a;
}

.btn-primary:hover {
    background: #FDCB32;
    transform: translateY(-2px);
}

.btn-warning {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.btn-warning:hover {
    background: #FDCB32;
    transform: translateY(-2px);
    color: #0a0a0a;
}

/* ============ 搜索结果显示 ============ */
.search-result-info {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 12px 20px;
    border-radius: 10px;
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-result-info span {
    color: #FDCB32;
    font-weight: 600;
}

/* ============ 文章区域 ============ */
.articles-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.card {
    background: #111111;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid #2a2a2a;
}

.card-header {
    padding: 16px 20px;
    background: #0d0d0d;
    border-bottom: 1px solid #2a2a2a;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #FDCB32;
}

.article-list {
    list-style: none;
}

.article-list li {
    padding: 12px 20px;
    border-bottom: 1px solid #1a1a1a;
    transition: background 0.3s;
}

.article-list li:hover {
    background: #1a1a1a;
}

.article-list li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.article-list li a:hover {
    color: #FDCB32;
}

.article-date {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
}

.about-card {
    padding: 20px;
}

.about-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #FDCB32;
}

.about-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-size: 13px;
}

/* ============ 文章详情页 ============ */
.article-detail {
    background: #181A1E;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 36px 40px;
    margin: 30px 0;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.article-detail h1 {
    font-size: 26px;
    font-weight: 700;
    color: #FDCB32;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-meta {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 22px;
}

.article-content {
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    line-height: 1.9;
    word-break: break-word;
}

.article-content p {
    margin-bottom: 12px;
}

.article-content video,
.article-content audio {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    margin: 10px auto;
}

.article-content audio {
    width: 100%;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    color: #FDCB32;
    margin: 22px 0 10px;
    line-height: 1.4;
}

.article-content h1 {
    font-size: 22px;
}

.article-content h2 {
    font-size: 19px;
}

.article-content h3 {
    font-size: 17px;
}

.article-content h4 {
    font-size: 15px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    display: inline-block;
}

.article-content a {
    color: #FDCB32;
    text-decoration: underline;
    word-break: break-all;
}

.article-content ul,
.article-content ol {
    padding-left: 26px;
    margin-bottom: 12px;
}

.article-content blockquote {
    border-left: 3px solid #FDCB32;
    background: rgba(253, 203, 50, 0.07);
    padding: 10px 16px;
    margin: 12px 0;
    border-radius: 0 8px 8px 0;
    color: rgba(255, 255, 255, 0.75);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 14px;
    display: table;
}

.article-content table th,
.article-content table td {
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 9px 14px;
    text-align: left;
}

.article-content table th {
    background: rgba(253, 203, 50, 0.1);
    color: #FDCB32;
    font-weight: 600;
}

.article-content table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03);
}

.article-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.back-link {
    display: inline-block;
    margin-top: 26px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.back-link:hover {
    color: #FDCB32;
}

/* ============ 空状态 ============ */
.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px;
    border-radius: 12px;
    min-height: 300px;
    margin-top: 50px;
}

.empty-state p {
    color: #999;
    margin-bottom: 20px;
}

/* ============ 页脚（跟随内容；内容少时贴底） ============ */
footer {
    flex-shrink: 0;
    background: #0d0d0d;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    font-size: 13px;
    border-top: 1px solid #2a2a2a;
    line-height: 1.7;
}

footer a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

footer a:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* ============ 响应式 ============ */
@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-container {
        flex-direction: column;
        align-items: stretch;
    }

    .tags-list {
        justify-content: center;
    }

    .search-box {
        width: 100%;
    }

    .banner-video,
    .banner-placeholder {
        height: 350px;
    }

    .placeholder-text h1 {
        font-size: 32px;
    }

    .placeholder-text p {
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 14px;
    }

    .header .container {
        min-height: 60px;
    }

    .logo {
        font-size: 18px;
    }

    .logo img {
        max-height: 48px;
        max-width: 160px;
    }

    /* 移动端：汉堡菜单 */
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #181A1E;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 14px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        margin: 0;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 8px;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: #1a1a1a !important;
        background: #FDCB32;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 20px;
    }

    .articles-section {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px 0;
    }

    .game-buttons {
        flex-wrap: wrap;
    }

    .btn {
        padding: 8px 0;
        font-size: 12px;
    }

    .banner-video,
    .banner-placeholder {
        height: 260px;
    }

    .placeholder-text h1 {
        font-size: 24px;
    }

    .placeholder-text p {
        font-size: 14px;
    }

    .article-detail {
        padding: 22px 18px;
        margin: 18px 0;
    }

    .article-detail h1 {
        font-size: 20px;
    }

    .article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .tags-label-title {
        font-size: 20px;
        margin-left: -10px;
        padding: 6px 15px;
    }

    .search-btn {
        padding: 10px 20px;
    }
}
/* ====== 会员头部区域 ====== */
.mh-area{display:flex;align-items:center;gap:8px;margin-left:12px;flex-shrink:0;}
.mh-area a{text-decoration:none;font-size:13px;white-space:nowrap;}
.mh-login,.mh-reg{padding:6px 14px;border-radius:6px;font-weight:bold;}
.mh-login{color:#c8c4bc;border:1px solid rgba(255,255,255,.12);}
.mh-login:hover{border-color:#FDCB32;color:#FDCB32;}
.mh-reg{background:#FDCB32;color:#1a1200;}
.mh-reg:hover{background:#ffd94d;}
.mh-user{display:inline-flex;align-items:center;gap:6px;font-weight:bold;font-size:13px;padding:4px 10px;border-radius:6px;border:1px solid rgba(255,255,255,.08);}
.mh-user:hover{border-color:rgba(255,255,255,.25);}
.mh-avatar{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:bold;color:#1a1200;flex-shrink:0;}
.mh-name{color:#f0ede6;}
.mh-notif{position:relative;font-size:18px;padding:4px;text-decoration:none;}
.mh-notif:hover{transform:scale(1.1);}
.mh-badge{position:absolute;top:-2px;right:-6px;background:#ff5252;color:#fff;font-size:10px;font-weight:bold;border-radius:50%;min-width:16px;height:16px;line-height:16px;text-align:center;padding:0 3px;box-sizing:border-box;}
@media(max-width:768px){
    .mh-area{margin-left:auto;}
    .mh-name{display:none;}
}
