/* --- 保留原有根变量与基础设置 --- */
:root {
    --brand: #6366f1;
    --brand-glow: rgba(99, 102, 241, 0.4);
    --bg: #f4f7fa;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    background: var(--bg);
    color: var(--text-main);
}

[v-cloak] { display: none; }
a { text-decoration: none; color: inherit; }

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* --- 导航与搜索（保持不变） --- */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(244, 247, 250, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px 0;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 20px;
}

.search-bar {
    flex: 1;
    position: relative;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: var(--surface);
    outline: none;
    transition: 0.3s;
}

.search-bar::before {
    content: "🔍";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

/* 为父容器开启相对定位 */
.cat-bar-wrapper {
    position: relative;
    overflow: hidden;
}

.cat-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-right: 40px; /* 给右侧预留遮罩空间 */
    -webkit-overflow-scrolling: touch; /* 增强移动端滑动流畅度 */
}

/* 添加右侧渐变蒙层 */
.cat-bar-wrapper::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(to right, rgba(244, 247, 250, 0) 0%, rgba(244, 247, 250, 1) 100%);
    pointer-events: none; /* 确保不影响点击 */
    z-index: 2;
}






.cat-bar::-webkit-scrollbar { display: none; }

.cat-btn {
    padding: 8px 20px;
    border-radius: 50px;
    background: var(--surface);
    border: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sub);
    cursor: pointer;
    white-space: nowrap;
}

.cat-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* --- 内容区域与轨道 --- */
.content-wrap {
    padding-bottom: 50px;
    margin-top: 20px;
}

.scroll-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
    position: relative;
}

.track {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: 105px;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px 0;
}

.track::-webkit-scrollbar { display: none; }

/* --- 修复点：强制图标与文字容器为列布局 --- */
.game-card-mini, .game-card-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    cursor: pointer;
    will-change: transform;
}
.game-card-mini:hover, .game-card-full:hover {
    transform: translateY(-6px) scale(1.05);
}
.game-name-limit {
    font-size: 12px;
    margin-top: 8px; /* 增加间距防止重叠 */
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.2;
}

/* --- 按钮样式（保持不变） --- */
.ctrl-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 5;
}

.ctrl-arrow:hover {
    background: #ffffff;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

.arrow-l { left: -30px; }
.arrow-r { right: -35px; }

/* --- 布局与网格 --- */
.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

.main-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 25px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 20px;
}

.game-card-full img {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    border: 1.5px solid #f1f5f9;
    object-fit: cover;
}

.more-trigger {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 10px 20px var(--brand-glow);
}

/* --- Footer 底部样式 --- */
/* --- Footer 基础样式 --- */
.site-footer {
    background: #fff;
    padding: 60px 0 30px;
    border-top: 1px solid #e2e8f0;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    /* 默认 PC 端：品牌占 2 份空间，链接各占 1 份 */
    grid-template-columns: 2fr 1fr 1fr; 
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    display: inline-block;
}

.footer-brand p {
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.6;
    max-width: 350px; /* 限制宽度防止文字拉得太长 */
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--text-main);
    text-transform: capitalize; /* 首字母大写 */
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-sub);
    font-size: 14px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--brand);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* --- 移动端 Footer 适配 --- */
@media (max-width: 768px) {
    .footer-content {
        /* 移动端改为单列，文字居中 */
        grid-template-columns: 1fr; 
        gap: 30px;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto; /* 品牌描述居中 */
    }

    .footer-links h4 {
        margin-bottom: 10px;
    }
}

/* --- 关键修改：移动端适配逻辑 --- */
@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .side-box { display: none; }

    /* 修复轨道错位：缩小列宽适配手机屏幕 */
    .track {
        grid-auto-columns: 80px; 
        gap: 15px;
    }

    /* 强制缩小移动端图标尺寸，防止撑开容器导致文字错位 */
    .track img {
        width: 70px !important;
        height: 70px !important;
        border-radius: 18px !important;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 15px;
    }

    .game-card-full img {
        width: 75px;
        height: 75px;
        border-radius: 18px;
    }
.game-card-mini img, .game-card-full img {
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.game-card-mini:hover img, .game-card-full:hover img {
    box-shadow: 0 12px 24px var(--brand-glow); /* 使用你定义的品牌紫色光晕 */
    filter: brightness(1.05); /* 稍微提亮，增加“激活感” */
    border-color: var(--brand); /* 边框变色 */
}
    /* 优化文字大小与间距 */
    .game-name-limit {
        font-size: 11px;
        margin-top: 5px;
    }

    .arrow-l { left: -10px; }
    .arrow-r { right: -10px; }
}