/* ============================================
   百搜盘网盘搜索引擎 - 样式文件
   仿 gyziyuan.com 和 zy.fui.fyi 风格
   ============================================ */

/* ============================================
   CSS 变量定义
   ============================================ */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd6;
    --secondary-color: #764ba2;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --text-color: #333;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* ============================================
   基础样式
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: #f5f5f5;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* ============================================
   顶部导航栏样式（仿 zy.fui.fyi）
   ============================================ */
.site-header {
    background: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .navbar {
    padding: 0.75rem 0;
}

.site-header .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.site-header .navbar-brand:hover {
    color: var(--primary-dark);
}

.site-header .navbar-brand i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.site-header .nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.header-search {
    gap: 0.5rem;
}

.header-search .form-control {
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    width: 200px;
    transition: var(--transition);
}

.header-search .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.header-search .btn {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    border: none;
}

/* ============================================
   Hero 区域样式（仿 gyziyuan.com）
   ============================================ */
.hero-section {
    position: relative;
    padding: 80px 0 60px;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Hero 搜索框 */
.hero-search-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 8px 8px 8px 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.hero-search-icon {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-right: 12px;
}

.hero-search-input {
    flex: 1;
    border: none;
    font-size: 1rem;
    padding: 12px 0;
    outline: none;
    background: transparent;
}

.hero-search-btn {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.hero-search-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 热门搜索标签 */
.hot-search-tags {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hot-search-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.hot-search-tag {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.hot-search-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================
   网盘平台筛选区域
   ============================================ */
.platform-section {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.platform-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: #fff;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.platform-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.platform-tab.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
}

.platform-tab i {
    font-size: 1rem;
}

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

/* 分类导航区域（简洁版） */
.category-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--primary-color);
}

.section-more {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.section-more:hover {
    color: var(--primary-color);
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.category-item:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-item:hover .category-icon,
.category-item:hover .category-name {
    color: #fff;
}

.category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.25rem;
    transition: var(--transition);
}

.category-name {
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

/* ============================================
   资源卡片样式
   ============================================ */
.resource-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.resource-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.resource-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.resource-card-body {
    padding: 16px;
}

.resource-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.5;
}

.resource-title a {
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
}

.resource-code {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.resource-pan {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.pan-aliyun {
    background: #e6f7ff;
    color: #1890ff;
}

.pan-baidu {
    background: #f6ffed;
    color: #52c41a;
}

.pan-quark {
    background: #fff7e6;
    color: #fa8c16;
}

.pan-xunlei {
    background: #fff1f0;
    color: #f5222d;
}

/* 新增网盘类型样式 */
.pan-yidong {
    background: #fff1f0;
    color: #C9394C;
}

.pan-guangya {
    background: #fffbe6;
    color: #d48806;
}

.pan-wukong {
    background: #fff7e6;
    color: #ff5500;
}

.pan-kuaitu {
    background: #e6fffb;
    color: #08979c;
}

.pan-uc {
    background: #fff7e6;
    color: #ff8c00;
}

.pan-default {
    background: var(--bg-light);
    color: var(--text-muted);
}

.resource-size {
    color: var(--text-muted);
}

/* 热门资源卡片 */
.resource-card-hot {
    border-color: rgba(250, 140, 22, 0.3);
}

.resource-card-hot:hover {
    border-color: #fa8c16;
}

.hot-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #fa8c16 0%, #f5222d 100%);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ============================================
   搜索结果区域
   ============================================ */
.search-result-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.search-result-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.no-results-container {
    padding: 60px 20px;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.no-results-icon i {
    font-size: 2rem;
    color: var(--text-muted);
}

.no-results-title {
    color: var(--text-color);
    font-weight: 500;
}

.no-results-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* 分页 */
.pagination-wrapper {
    margin-top: 24px;
}

.pagination {
    gap: 4px;
}

.page-link {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 14px;
}

.page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

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

/* ============================================
   底部样式（仿 zy.fui.fyi）
   ============================================ */
.site-footer {
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.8);
    padding: 50px 0 30px;
    margin-top: 40px;
}

.footer-content {
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
    margin-bottom: 30px;
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-intro {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

.footer-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.footer-title i {
    color: var(--primary-color);
}

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

.footer-links li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links i {
    color: var(--primary-color);
    width: 20px;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-tag {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-tag:hover {
    background: var(--primary-color);
    color: #fff;
}

.footer-slogan {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.footer-icp a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

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

/* ============================================
   返回顶部按钮
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-md);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.back-to-top i {
    font-size: 1.25rem;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .footer-section {
        margin-bottom: 40px;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-search-box {
        flex-direction: column;
        border-radius: var(--radius-md);
        padding: 16px;
    }
    
    .hero-search-icon {
        display: none;
    }
    
    .hero-search-input {
        width: 100%;
        text-align: center;
    }
    
    .hero-search-btn {
        width: 100%;
        margin-top: 12px;
    }
    
    .hot-search-tags {
        flex-direction: column;
        align-items: center;
    }
    
    .platform-tabs {
        gap: 8px;
    }
    
    .platform-tab {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .category-item {
        padding: 15px 8px;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .category-name {
        font-size: 0.8rem;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
    }
    
    .header-search {
        display: none;
    }
    
    .site-footer {
        padding: 40px 0 20px;
    }
}

@media (max-width: 575.98px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

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

.resource-card {
    animation: fadeIn 0.5s ease forwards;
}

.resource-card:nth-child(1) { animation-delay: 0.1s; }
.resource-card:nth-child(2) { animation-delay: 0.15s; }
.resource-card:nth-child(3) { animation-delay: 0.2s; }
.resource-card:nth-child(4) { animation-delay: 0.25s; }
.resource-card:nth-child(5) { animation-delay: 0.3s; }
.resource-card:nth-child(6) { animation-delay: 0.35s; }
.resource-card:nth-child(7) { animation-delay: 0.4s; }
.resource-card:nth-child(8) { animation-delay: 0.45s; }

/* 加载动画 */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* ============================================
   搜索结果页筛选栏样式
   ============================================ */
.filter-bar {
    background: #fff;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-label i {
    color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 搜索页筛选按钮样式 - 与首页一致 */
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    border-color: var(--platform-color, #ff6b35);
    color: var(--platform-color, #ff6b35);
    background: rgba(255, 107, 53, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 选中状态 - 橙红色主题 */
.filter-btn.active {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    border-color: #ff6b35;
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

.filter-btn.active .filter-icon {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* 筛选图标（首字母圆形标识） */
.filter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--platform-color, #ff6b35);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.filter-name {
    white-space: nowrap;
}

/* ============================================
   网盘筛选区域样式（新版：左侧标注+右侧按钮组）
   ============================================ */
.platform-filter-section {
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.platform-filter-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.platform-filter-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.platform-filter-label i {
    color: var(--primary-color);
}

.platform-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 网盘筛选按钮样式 */
.platform-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.platform-filter-btn:hover {
    border-color: var(--platform-color, #ff6b35);
    color: var(--platform-color, #ff6b35);
    background: rgba(255, 107, 53, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 选中状态 - 橙红色主题 */
.platform-filter-btn.active {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    border-color: #ff6b35;
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

.platform-filter-btn.active .platform-icon {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* 网盘图标（首字母圆形标识） */
.platform-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--platform-color, #ff6b35);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

/* 网盘名称 */
.platform-name {
    white-space: nowrap;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .platform-filter-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .platform-filter-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    .platform-filter-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .platform-filter-section {
        padding: 10px 0;
    }
    
    .platform-filter-buttons {
        gap: 6px;
    }
    
    .platform-filter-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .platform-icon {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
}
