/*
Theme Name: haoxuthemes 资源下载站
Theme URI: https://example.com
Author: haoxuthemes
Author URI: https://example.com
Description: 一个美观的 WordPress 资源下载站主题，采用渐变蓝色系设计，支持资源分类、下载统计等功能。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: haoxuthemes-download
Tags: blue, gradient, download, resource, responsive
*/

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 - 子比风格 */
header {
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu li {
    margin-left: 0;
}

.nav-menu a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    padding: 8px 0;
    position: relative;
}

.nav-menu a:hover {
    color: #00d4ff;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #0099ff);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 搜索框 - 子比风格 */
.search-form {
    display: flex;
    align-items: center;
    background: #f5f7fa;
    border-radius: 25px;
    padding: 5px;
    border: 1px solid #e8ecf1;
}

.search-input {
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    outline: none;
    background: transparent;
    width: 200px;
    font-size: 14px;
}

.search-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.search-button:hover {
    background: linear-gradient(135deg, #0099ff 0%, #00d4ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 153, 255, 0.3);
}

/* 主要内容区域 */
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* 横幅区域 - 子比风格 */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 80px 40px;
    margin-bottom: 40px;
    text-align: center;
    color: #fff;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner h1 {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 2px;
}

.banner h2 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 400;
    opacity: 0.9;
}

.banner p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.85;
}

/* 分类导航 - 子比风格 */
.category-nav {
    background-color: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.category-nav h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.category-nav h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #00d4ff, #0099ff);
    margin-right: 10px;
    border-radius: 2px;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-link {
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-radius: 25px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e8ecf1;
}

.category-link:hover {
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 153, 255, 0.3);
}

/* 资源列表 - 子比风格 */
.resources-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 26px;
    margin-bottom: 25px;
    color: #333;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 26px;
    background: linear-gradient(180deg, #00d4ff, #0099ff);
    margin-right: 12px;
    border-radius: 2px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.resource-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.resource-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    transition: all 0.4s ease;
}

.resource-card:hover .resource-thumbnail {
    transform: scale(1.05);
}

.resource-content {
    padding: 20px;
    position: relative;
}

.resource-category {
    position: absolute;
    top: -15px;
    left: 20px;
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 153, 255, 0.3);
}

.resource-title {
    font-size: 18px;
    margin-bottom: 12px;
    margin-top: 10px;
    color: #333;
    text-decoration: none;
    display: block;
    font-weight: 600;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.resource-title:hover {
    color: #0099ff;
}

.resource-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 16px;
}

.download-button:hover {
    background: linear-gradient(135deg, #0099ff 0%, #00d4ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 153, 255, 0.3);
}

.resource-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    color: #0099ff;
}

/* 分页 - 子比风格 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.pagination a {
    padding: 12px 20px;
    background-color: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-weight: 500;
}

.pagination a:hover {
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 153, 255, 0.3);
}

.pagination .current {
    padding: 12px 20px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 153, 255, 0.3);
}

/* 侧边栏 */
.sidebar {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.sidebar h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #4facfe;
}

.sidebar-widget {
    margin-bottom: 30px;
}

/* 底部 - 子比风格 */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 60px 0 30px;
    text-align: center;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-links {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    padding: 5px 10px;
}

.footer-links a:hover {
    color: #00d4ff;
}

footer p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    margin-bottom: 10px;
}

/* 响应式设计 - 子比风格 */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 20px;
    }
    
    .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px 20px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .search-form {
        width: 100%;
        max-width: 400px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .banner {
        padding: 50px 20px;
    }
    
    .banner h1 {
        font-size: 32px;
    }
    
    .banner h2 {
        font-size: 18px;
    }
    
    .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .category-nav {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .banner {
        padding: 40px 20px;
        border-radius: 12px;
    }
    
    .banner h1 {
        font-size: 26px;
    }
    
    .banner h2 {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}