/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* 主要内容包装器 */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* .header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
} */

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 24px;
    font-weight: bold;
}

.logo-url {
    font-size: 12px;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    gap: 0;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    transition: background 0.3s;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-item.dropdown {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
}

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
}

.breadcrumb a {
    color: #FF6B35;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #E65100;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb .current {
    color: #666;
}

/* 主要内容区域 */
.main-content {
    padding: 20px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
}

/* 左侧分类导航 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-box,
.recommend-box {
    background: white;
    padding: 15px;
}

.category-title,
.recommend-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FF6B35;
}

/* 游戏分类页面专用样式 */
.game-category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-category-list a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.game-category-item {
    margin-bottom: 0;
    cursor: pointer;
    padding: 15px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 0;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0;
    border: none;
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.game-category-item:hover {
    background: #e9ecef;
    color: #333;
}

.game-category-item.active {
    background: #FF6B35 !important;
    color: white !important;
    box-shadow: none;
}

.game-category-list a:first-child .game-category-item {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.game-category-list a:last-child .game-category-item {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom: none;
}

/* 保留原有的通用分类样式 */
.category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0;
    cursor: pointer;
}

.category-item a {
    display: block;
    padding: 12px 16px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    border: none;
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-item a:hover {
    background: #e8e8e8;
    color: #333;
}

.category-item.active a {
    background: #FF6B35 !important;
    color: white !important;
    box-shadow: none;
}

.category-box .category-item.active a {
    background: #FF6B35 !important;
    color: white !important;
    padding: 12px 16px !important;
}

/* 推荐游戏 */
.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommend-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    /*background: #f8f9fa;*/
    transition: all 0.3s;
    cursor: pointer;
}

.recommend-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.recommend-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.recommend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recommend-info h4 {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.recommend-desc {
    font-size: 12px;
    color: #999;
}

/* 游戏列表区域 */
.game-list-section {
    background: white;
    padding: 20px;
}

/* 顶部分类标签 */
.top-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.category-tag {
    padding: 6px 16px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.category-tag:hover {
    background: #e0e0e0;
    color: #333;
}

.category-tag.active {
    background: #FF6B35;
    color: white;
}

/* 游戏列表 */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.game-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #FF6B35;
}

/* 排名 */
.game-rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FF6B35;
    color: white;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.game-item:nth-child(1) .game-rank {
    background: #FF6B35;
}

.game-item:nth-child(2) .game-rank {
    background: #FF9800;
}

.game-item:nth-child(3) .game-rank {
    background: #FFC107;
}

/* 游戏图标 */
.game-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 游戏信息 */
.game-info {
    flex: 1;
    min-width: 0;
}

.game-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #999;
}

.game-type {
    color: #FF6B35;
    background: #e8f5e9;
    padding: 2px 8px;
}

.game-size,
.game-date {
    color: #999;
}

/* 评分 */
.game-rating {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 14px;
}

.star.active {
    color: #FFC107;
}

/* 下载按钮 */
.game-action {
    flex-shrink: 0;
}

.download-btn {
    padding: 10px 25px;
    background: #FF6B35;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.download-btn:hover {
    background: #E65100;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.page-btn,
.page-num {
    padding: 8px 14px;
    background: white;
    color: #333;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
    font-size: 14px;
}

.page-btn:hover,
.page-num:hover {
    background: #FF6B35;
    color: white;
    border-color: #FF6B35;
}

.page-num.active {
    background: #FF6B35;
    color: white;
    border-color: #FF6B35;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    background: white;
    color: #333;
    border-color: #e0e0e0;
}

.page-dots {
    padding: 0 5px;
    color: #999;
}

/* 底部 */
.footer {
    background: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    opacity: 0.9;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 50px;
    height: 50px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
}

.back-to-top:hover {
    background: #E65100;
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 200px 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .game-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-rank {
        position: absolute;
        top: 15px;
        left: 15px;
    }

    .game-icon {
        width: 100%;
        height: 200px;
        margin-top: 35px;
    }

    .game-icon img {
        width: 100%;
        height: 100%;
    }

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

    .game-action {
        width: 100%;
    }

    .download-btn {
        width: 100%;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 14px;
    }

    .top-categories {
        gap: 8px;
    }

    .category-tag {
        padding: 5px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header .container {
        flex-direction: column;
        gap: 10px;
    }

    .logo-main {
        font-size: 20px;
    }

    .game-title {
        font-size: 15px;
    }

    .game-desc {
        font-size: 13px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }

    .page-btn,
    .page-num {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* 专题页面样式 */
.topic-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
}

.topic-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.topic-content {
    width: 1200px;
    background: white;
    padding: 20px;
}

.topic-section {
    margin-bottom: 40px;
}

.topic-section:last-child {
    margin-bottom: 0;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FF6B35;
}

.topic-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.more-link {
    color: #FF6B35;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.more-link:hover {
    color: #E65100;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.topic-card {
    background: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
    overflow: hidden;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.topic-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.topic-card-title {
    padding: 12px;
    margin: 0;
    font-size: 14px;
    color: #333;
    text-align: center;
    background: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式 - 专题页面 */
@media (max-width: 1024px) {
    .topic-layout {
        grid-template-columns: 200px 1fr;
        gap: 15px;
    }

    .topic-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .topic-layout {
        grid-template-columns: 1fr;
    }

    .topic-sidebar {
        display: none;
    }

    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .topic-card img {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .topic-card img {
        height: 120px;
    }

    .topic-card-title {
        font-size: 13px;
        padding: 10px;
    }

    .topic-title {
        font-size: 16px;
    }
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-main {
    font-size: 24px;
    font-weight: bold;
    color: #00BFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.logo-url {
    font-size: 12px;
    color: #90EE90;
    font-weight: normal;
    margin-top: -2px;
}

.nav-menu {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 0;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown > a {
    color: white;
    text-decoration: none;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 5px;
}

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

.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    padding: 10px;
    background-color: #f8f9fa;
}

.dropdown-item {
    color: #666;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 13px;
    transition: all 0.3s ease;
    white-space: nowrap;
    background: white;
    text-align: center;
    display: block;
}

.dropdown-item:hover {
    background-color: #F5F5F5;
    color: #E65100;
    transform: translateY(-1px);
}

.breadcrumb a {
    color: #4A90E2;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb .current {
    color: #666;
}

/* 主要内容区域 */
.main-content {
    padding: 20px 0;
    background: #f5f5f5;
}

/* 排行榜区域 */
.ranking-section {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ranking-tabs-container {
    display: flex;
    background: #f8f9fa;
    padding: 0;
    border-bottom: 2px solid #e9ecef;
}

.ranking-tab {
    flex: 1;
    padding: 18px 30px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ranking-tab.active {
    color: #FF6B35;
    background: white;
    font-weight: 600;
}

.ranking-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF6B35 100%);
}

.ranking-tab:hover {
    color: #FF6B35;
    background: rgba(102, 126, 234, 0.05);
}

.ranking-content {
    display: none;
    padding: 30px 20px;
}

.ranking-content.active {
    display: block;
}

.ranking-grid {
    display: block;
}

/* 主排行榜 */
.main-ranking {
    background: white;
}

.ranking-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #FF6B35;
}

.ranking-header h2 {
    font-size: 22px;
    color: #333;
    font-weight: 600;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ranking-item:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.rank-number {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: #999;
    border-radius: 8px;
    flex-shrink: 0;
}

.rank-number.top-1 {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
    font-size: 24px;
}

.rank-number.top-2 {
    background: linear-gradient(135deg, #FF9800 0%, #FF6F00 100%);
    font-size: 22px;
}

.rank-number.top-3 {
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
    font-size: 22px;
}

.item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 12px;
}

.item-meta .category {
    padding: 3px 10px;
    background: #F5F5F5;
    color: #E65100;
    border-radius: 3px;
}

.item-meta .size {
    color: #999;
}

.item-meta .downloads {
    color: #FF6B35;
    font-weight: 500;
}

.item-meta .rating .star {
    color: #FFC107;
    font-size: 14px;
}

.download-btn {
    padding: 10px 30px;
    background: linear-gradient(135deg, #FF6B35 0%, #1565C0 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* 底部 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    opacity: 0.8;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #FF6B35;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #E65100;
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .ranking-grid {
        display: block;
    }
}

@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        order: 3;
        gap: 15px;
        flex-direction: column;
        width: 100%;
    }

    .ranking-tabs-container {
        flex-direction: column;
    }

    .ranking-tab {
        padding: 15px 20px;
    }

    .ranking-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .rank-number {
        position: absolute;
        top: 15px;
        left: 15px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .item-image {
        width: 100%;
        height: 200px;
    }

    .download-btn {
        width: 100%;
        text-align: center;
    }

}

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

    .ranking-content {
        padding: 20px 10px;
    }

    .ranking-item {
        padding: 15px;
    }

    .item-title {
        font-size: 15px;
    }

    .item-desc {
        font-size: 12px;
    }

    .item-meta {
        font-size: 11px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ranking-item {
    animation: fadeInUp 0.6s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B35 0%, #FF6B35 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-info a {
    text-decoration: none;
}
