/* --- 原始 CSS 变量与基础样式 --- */
:root {
    --primary: #ff6600;
    --primary-hover: #ff8533;
    --secondary: #5ca710;
    --accent: #2a67b1;
    --bg-body: #f0f2f5;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    margin: 0;
    background-color: var(--bg-body);
    font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    color: #333;
    overflow-y: scroll;
    line-height: 1.5;
}

[v-cloak] {
    display: none;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* 导航栏 */
.navbar {
    max-width: 1300px;
    margin: 15px auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span {
    color: var(--secondary);
}

.search-container {
    flex: 1;
    margin: 0 60px;
    display: flex;
    background: #f1f3f5;
    border-radius: 30px;
    padding: 4px 4px 4px 20px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-container:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.1);
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 15px;
}

.search-btn {
    background: var(--primary);
    border: none;
    color: white;
    padding: 8px 28px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}
.search-btn:active {
    transform: scale(0.95);
}

/* --- 手机端特有分类导航 --- */
.mobile-nav-wrapper {
    display: none;
    max-width: 1300px;
    margin: 0 auto 15px;
    padding: 0 10px;
}

.mobile-category-list {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    padding-bottom: 8px;
}

.mobile-category-list::-webkit-scrollbar {
    display: none;
}

.mobile-cat-item {
    padding: 8px 18px;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: var(--card-shadow);
    color: #666;
    font-weight: 500;
}

.mobile-cat-item.active {
    background: var(--primary);
    color: #fff;
}

/* --- 主布局 --- */
.main-layout {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    gap: 25px;
    align-items: start;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
}

.widget {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.widget-title {
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.widget:first-child {
    background: linear-gradient(180deg, #ffffff 0%, #f4ded0 100%);
    /* border: 1px dashed #ffd8bf; */
}
.widget:not(:first-child) {
    background-color: #f4ded0; /* 淡橙色，和渐变风格统一 */
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.02);
}
.widget[style*="text-align:center"] a {
    background: #fff;
    padding: 15px;
    border-radius: 18px;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.05);
    transition: var(--transition);
    display: block;
}

.widget[style*="text-align:center"] a:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(255, 102, 0, 0.1);
}

/* 分类菜单 */
.category-item {
    padding: 12px 18px;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 6px;
    transition: var(--transition);
    font-weight: 500;
    color: #666;
    position: relative;
}

.category-item:hover {
    background: #fff0e6;
    color: var(--primary);
    padding-left: 25px;
}

.category-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

/* 新标动画 */
@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(255, 71, 87, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

/* 游戏大厅 */
.game-hall {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    min-height: 600px;
}

/* .game-hall {
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    min-height: 600px;
    padding: 40px; 
    background-image: 
        linear-gradient(rgba(246, 228, 217, 0.95), rgba(244, 222, 208, 0.85)), 
        url('../img/images/bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #fff; 
    position: relative;
    z-index: 1;
} */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.section-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(to right, #333, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.game-card {
    display: block;
    padding: 15px 10px;
    background: linear-gradient(135deg, #ffffff 0%, #fff5ee 100%);
    border-radius: 20px;
    border: 1px solid #f0f0f0;
    text-align: center;
    text-decoration: none;
    color: #444;
    transition: var(--transition);
    position: relative;
}

.game-card:hover {
    background: linear-gradient(135deg, #fff5ee 0%, #ffe8d9 100%);
    border-color: var(--primary);
}

.icon-box {
    width: 88px;
    height: 88px;
    margin: 0 auto 12px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    background: #fdfdfd;
    border: 1px solid #eee;
    transition: var(--transition);
}

.icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.game-card:hover .icon-box {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 24px rgba(255, 102, 0, 0.2);
}

.game-card:hover .icon-box img {
    transform: scale(1.1);
}

.game-name {
    font-size: 14px;
    font-weight: 600;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.game-card:hover .game-name {
    color: var(--primary);
}

/* 角标 */
.badge {
    position: absolute;
    top: -8px;
    right: 2px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    color: #fff;
    font-weight: bold;
    z-index: 2;
}

.badge-new {
    background: #ff4757;
    animation: pulse-red 2s infinite;
}

.badge-hot {
    background: #ffa502;
}

/* 游戏按钮通用hover */
.game-hall button:hover {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
    transform: translateY(-2px);
}

/* 最近游玩 */
.history-item {
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 14px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.history-item:hover {
    background: #fff;
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.history-img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #fff;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #f1f3f5;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    user-select: none;
}

.tag:hover {
    background: #fff0e6;
    color: var(--primary);
    border-color: #ffd8bf;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.1);
}

.tag.active-tag {
    background: var(--primary);
    color: #fff;
}

/* --- 底部 --- */
.footer {
    max-width: 1300px;
    margin: 60px auto 40px;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #eef2f6;
}

.footer-brand {
    font-size: 16px;
    font-weight: 800;
    color: #4a5568;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.footer-copyright {
    color: #a0aec0;
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
}

.footer-links a {
    text-decoration: none;
    color: #718096;
    font-size: 13px;
    transition: var(--transition);
}

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

.footer-links .split {
    color: #e2e8f0;
    font-size: 12px;
    user-select: none;
}

/* --- 响应式 --- */
@media (max-width: 1100px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .side-panel {
        display: none;
    }
    .navbar {
        margin: 10px;
        width: auto;
    }
    .mobile-nav-wrapper {
        display: block;
    }
}

@media (max-width: 768px) {
    .footer-copyright {
        font-size: 12px;
        padding: 0 10px;
    }
    .footer {
        margin-top: 30px;
        padding: 25px 15px;
    }
    .navbar {
        height: auto;
        flex-direction: column;
        padding: 15px;
        gap: 12px;
    }
    .search-container {
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 20px 10px;
    }
.game-card {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        padding: 10px 5px !important;
    }
    
    .icon-box {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 8px !important;
    }

    .game-name {
        width: 100%;
        text-align: center;
    }
    .game-hall {
        padding: 15px;
                /* 手机端减小内边距 */
        padding: 20px 15px;
        /* 手机端背景图可以固定，防止滚动时闪烁，或者保持 scroll */
        background-attachment: scroll; 
    }
    
}