:root {
    --primary: #3a86ff;
    --text-dark: #2b2d42;
    --text-light: #8d99ae;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border: #e9ecef;
    --boxshadow: 0 2px 10px rgb(0 0 0 / 10%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 25px 0;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--boxshadow);
}

/* 统计区域 */
.stats-section {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: var(--boxshadow);
}

.stats-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--bg-light);
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
    border-left: 3px solid var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 3px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.new-games-list {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 12px;
}

.new-game-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 10px 0;
    text-align: center;
    transition: transform 0.3s;
}

.new-game-item:hover {
    transform: translateY(-3px);
}

.new-game-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 8px;
    object-fit: cover;
    background: #eee;
}

.new-game-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.new-game-time {
    font-size: 0.7rem;
    color: var(--text-light);
}

/* 热门游戏 */
.game-section {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--boxshadow);
}

.section-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 搜索框样式 */
.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

#gameSearch {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

#gameSearch:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #2a75e6;
}

/* 重置按钮样式 */
.reset-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    margin-left: 8px;
}

.reset-btn:hover {
    background-color: #c0392b;
}

.hot-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.hot-game-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s;
    white-space: nowrap;
    overflow: hidden;
}

.hot-game-card:hover {
    transform: translateY(-3px);
}

.hot-game-rank {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hot-game-name {
    font-size: 0.8rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.hot-game-hot {
    font-size: 0.7rem;
    color: #fb5607;
    flex-shrink: 0;
}

/* 全部游戏列表 */
.game-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 20px;
}

.game-card {
    background: var(--white);
    padding: 18px;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--boxshadow);
    border: 1px solid var(--border);
}

.game-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: #eee;
    object-fit: cover;
}

.game-list .game-card h3 {
    margin: 0 auto 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-link {
    display: block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 8px 0;
    border-radius: 6px;
    margin-top: 15px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--border);
    color: var(--text-light);
}

/* 无结果提示 */
.no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 1rem;
}

/* 无结果时的重置按钮容器 */
.no-result-actions {
    margin-top: 20px;
}

.no-result-reset {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.no-result-reset:hover {
    background-color: #2a75e6;
}

/* 底部版权样式 */
footer {
    background: var(--white);
    padding: 30px 20px;
    box-shadow: 0 2px 20px rgb(0 0 0 / 10%);
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-content {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 25px;
    margin-bottom: 15px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

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

.copyright {
    line-height: 1.6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .search-container {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hot-game-card {
        display: flex;
        flex-direction: column;
    }
    .hot-game-grid,
    .new-games-list {
        grid-template-columns: repeat(3, 1fr);
    }
    .game-list {
        grid-template-columns: repeat(1, 1fr);
    }
    .pagination-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    .search-container {
        flex-wrap: wrap;
    }
    .reset-btn {
        margin-left: 0;
        width: 100%;
        margin-top: 8px;
    }
    .footer-links {
        gap: 10px 15px;
        font-size: 0.85rem;
    }
    .copyright {
        font-size: 0.8rem;
    }
}