:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --light-gray: #f3f4f6;
    --medium-gray: #e5e7eb;
    --text-dark: #1e293b;
    --text-gray: #64748b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f9fafb;
    color: var(--text-dark);
}

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

.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: box-shadow 0.3s ease;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    color: var(--primary);
    font-size: 24px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

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

.nav-item {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-item.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.nav-item:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    color: var(--text-dark);
    font-size: 20px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background-color: white;
    border-top: 1px solid var(--medium-gray);
    padding: 12px 0;
}

.mobile-menu .nav-item {
    display: block;
    padding: 8px 0;
    margin: 8px 0;
}

.breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--medium-gray);
}

.main-content {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.software-list-container {
    flex: 7;
}

.sidebar {
    flex: 3;
}

.filter-section {
    background-color: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--medium-gray);
}

.filter-tag.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-tag:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

/* 软件列表样式 */
.software-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.software-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.software-icon {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background-color: var(--light-gray);
    flex-shrink: 0;
}

.software-info {
    flex: 1;
    min-width: 0;
}

.software-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.software-title:hover {
    color: var(--primary);
}

.software-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.software-category {
    background-color: var(--light-gray);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.software-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.software-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.software-download {
    padding: 8px 16px;
    background-color: var(--primary);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.software-download:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* .software-more {
    padding: 8px 12px;
    background-color: transparent;
    color: var(--text-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.software-more:hover {
    border-color: var(--primary);
    color: var(--primary);
} */

/* 软件列表-查看详情按钮 */
.software-more {
    /* 增加按钮长度 */
    display: inline-block;
    padding: 0.5rem 2rem; 
    min-width: 120px; 
    
    /* 基础样式 */
    background-color: transparent;
    color: var(--primary); 
    border: 1px solid var(--primary); 
    font-weight: 400;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    
    /* 过渡动画 */
    transition: all 0.3s ease; 
}

/* 鼠标悬浮效果 - 明显的颜色反转 */
.software-more:hover {
    background-color: var(--primary); 
    color: white; 
    border-color: var(--primary); 
}

/* 点击状态强化反馈 */
.software-more:active {
    background-color: rgba(37, 99, 235, 0.9); 
}
/* 软件列表-查看详情按钮 end */

/* 热门下载样式 - 修复序号颜色问题 */
.sidebar-block {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 24px;
    overflow: hidden;
}

.sidebar-title {
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--medium-gray);
}

.sidebar-content {
    padding: 16px;
}

.hot-download-list {
    list-style: none;
}

.hot-download-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

.hot-download-item:last-child {
    border-bottom: none;
}

/* 修复序号颜色不生效问题 - 使用更直接的选择器 */
.hot-rank {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 明确指定序号样式，确保优先级 */
.hot-download-item:nth-child(1) .hot-rank {
    background-color: var(--primary);
}

.hot-download-item:nth-child(2) .hot-rank {
    background-color: var(--primary);
}

.hot-download-item:nth-child(3) .hot-rank {
    background-color: var(--primary);
}

.hot-download-item:nth-child(n+4) .hot-rank {
    background-color: var(--medium-gray);
    color: var(--text-gray);
}

.hot-info {
    flex: 1;
}

.hot-title {
    font-size: 14px;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-title:hover {
    color: var(--primary);
}

/* 文章列表样式 */
.article-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

.article-item:last-child {
    border-bottom: none;
}

.article-title {
    font-size: 14px;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.article-title:hover {
    color: var(--primary);
}

.article-meta {
    font-size: 12px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-category {
    background-color: var(--light-gray);
    padding: 1px 6px;
    border-radius: 3px;
}

.ad-block {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.ad-image {
    width: 100%;
    height: auto;
    display: block;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    padding: 0 8px;
}

.page-item {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid var(--medium-gray);
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.page-item.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.footer {
    background-color: var(--text-dark);
    color: #94a3b8;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}

.footer-column h3 {
    font-size: 16px;
    color: white;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-link {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

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

.copyright {
    text-align: center;
    font-size: 14px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 40;
}

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

/* 响应式优化 - 修复移动端信息错位 */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .mobile-menu.active {
        display: block;
    }
    
    /* 平板及以下设备隐藏软件图标 */
    .software-icon {
        display: none;
    }
    
    /* 调整软件卡片布局 */
    .software-card {
        padding: 12px 16px;
    }
    
    .software-actions {
        gap: 8px;
    }
    
    .software-download, .software-more {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    .filter-row {
        gap: 8px;
    }
    .filter-tag {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    /* 手机端优化 */
    .software-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .software-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .software-download {
        flex: 1;
        text-align: center;
    }
    
    .software-more {
        flex: 0 0 80px;
        text-align: center;
    }
    
    .software-meta {
        gap: 10px;
        font-size: 12px;
        flex-wrap: wrap;
    }
    
    .pagination {
        gap: 6px;
        margin-top: 24px;
        margin-bottom: 32px;
    }
    
    .page-item {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .page-item {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .software-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .software-download, .software-more {
        width: 100%;
        flex: none;
    }
}
    