/*
Theme Name: 网盘资源网
Theme URI: https://example.com/
Description: 专业的网盘资源分享下载主题
Author: 开发者
Author URI: https://example.com/
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: panres
Tags: 下载站, 资源站, 网盘, 响应式设计
*/

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', 'Heiti SC', sans-serif;
}

/* 全局变量定义 */
:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --primary-light: #ebf5fa;
    --dark: #2c3e50;
    --light-gray: #f8f9fa;
    --border: #dbeafe;
    --text-gray: #6c757d;
    --shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
}

/* 基础元素样式 */
body {
    background-color: var(--light-gray);
    color: var(--dark);
    line-height: 1.6;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s ease;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

/* 顶部栏样式 */
header {
    background: white;
    box-shadow: var(--shadow);
    padding: 10px 0;
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

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

/* 搜索区域样式 */
.search-section {
    background: linear-gradient(135deg, var(--primary), #4da6ff);
    padding: 30px 0;
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

.search-section h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 16px;
}

.search-box button {
    background: var(--dark);
    color: white;
    border: none;
    padding: 0 25px;
    font-size: 16px;
    cursor: pointer;
}

/* 分类筛选样式 */
.resource-filter {
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.filter-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 10px;
}

.filter-link {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    background: var(--light-gray);
    color: #555;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-link:hover, .filter-link.active {
    background: var(--primary);
    color: white;
}

/* 资源列表区域 */
.resources {
    padding: 20px 0 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
}

/* 资源网格 - 一行显示4个 */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.resource-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-5px);
}

.resource-img {
    height: 140px;
    overflow: hidden;
    position: relative;
}

.resource-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.resource-card:hover .resource-img img {
    transform: scale(1.05);
}

.resource-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.resource-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 标题样式 - 长标题优化 */
.resource-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    white-space: nowrap; /* 防止标题换行 */
    overflow: hidden; /* 隐藏超出容器的内容 */
    text-overflow: ellipsis; /* 超出部分显示省略号 */
}

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

/* 资源元数据样式 */
.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-gray);
    font-size: 13px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.resource-meta span {
    background: var(--light-gray);
    padding: 2px 8px;
    border-radius: 4px;
}

/* 资源描述 */
.resource-description {
    color: #555;
    font-size: 13px;
    margin-bottom: 15px;
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 8px;
    font-size: 14px;
    margin-top: auto;
}

/* 分页样式 */
.pagination-container {
    margin-top: 30px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    list-style: none;
    gap: 5px;
    padding: 0;
    margin: 0;
}

.pagination-link {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    color: #555;
    transition: all 0.2s ease;
}

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

.pagination-link.current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* 页脚样式 */
footer {
    background: var(--dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 8px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bdc3c7;
}

.footer-links a:hover {
    color: white;
    padding-left: 3px;
}

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

/* 响应式调整 */
@media (max-width: 1200px) {
    .resource-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resource-title {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .resource-grid {
        grid-template-columns: 1fr;
    }
    
    .resource-img {
        height: 160px;
    }
    
    .resource-title {
        font-size: 17px;
    }
    
    .resource-meta {
        font-size: 12px;
    }
}
