

/* ============================================
   基础变量与重置
============================================ */
:root {
    --bg-primary: #0a0c12;
    --bg-secondary: #0f1117;
    --bg-card: rgba(18, 22, 32, 0.85);
    --bg-glass: rgba(20, 25, 40, 0.6);
    --border-glow: rgba(0, 255, 255, 0.3);
    --text-primary: #e8eef2;
    --text-secondary: #8a93a5;
    --accent-cyan: #00f2ff;
    --accent-blue: #2d7aff;
    --accent-purple: #7c4dff;
    --accent-glow: 0 0 10px rgba(0, 242, 255, 0.5);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    position: relative;
    min-height: 100vh;
}

/* 动态背景效果 */
.jarvis-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 20% 30%, #0a1a2a, #03060c);
}

.jarvis-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ============================================
   容器布局
============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.content-wrapper {
    display: flex;
    justify-content: center;
}

.main-content {
    max-width: 1000px;
    width: 100%;
}

/* ============================================
   头部样式
============================================ */
.jarvis-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.site-title a {
    text-decoration: none;
}

.glow-text {
    background: linear-gradient(135deg, #00f2ff 0%, #2d7aff 50%, #7c4dff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
}

.site-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-box input {
    background: rgba(20, 25, 40, 0.8);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 40px;
    padding: 10px 20px;
    width: 260px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
    background: rgba(20, 25, 40, 1);
}

.search-box button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--accent-cyan);
    cursor: pointer;
    font-size: 18px;
}

/* 头部按钮 */
.btn-submit, .btn-donate-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.btn-submit {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #0a0c12;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
}

.btn-donate-header {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.5);
    color: #ff6b6b;
}

.btn-donate-header:hover {
    background: rgba(255, 100, 100, 0.2);
    border-color: #ff6b6b;
}

/* 分类导航 */
.header-bottom {
    border-top: 1px solid rgba(0, 242, 255, 0.1);
    padding: 12px 0;
}

.category-nav {
    overflow-x: auto;
    scrollbar-width: thin;
}

.category-list {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 4px 0;
}

.category-list li a {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.category-list li a:hover {
    color: var(--accent-cyan);
    border-color: rgba(0, 242, 255, 0.3);
}

.category-list li a.active {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(45, 122, 255, 0.2));
    color: var(--accent-cyan);
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.cat-count {
    font-size: 11px;
    margin-left: 4px;
    opacity: 0.7;
}

/* ============================================
   排序标签
============================================ */
.sort-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
}

.sort-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    border-radius: 40px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.03);
}

.sort-tabs a.active {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(45, 122, 255, 0.2));
    color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

.tab-icon {
    font-size: 16px;
}

/* ============================================
   资源卡片列表
============================================ */
.resource-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resource-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.resource-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 242, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 255, 0.1);
}

.resource-card:hover::before {
    transform: translateX(100%);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.resource-category-badge {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(45, 122, 255, 0.2));
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 242, 255, 0.3);
}

.resource-stats-badge {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.resource-stats-badge span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.resource-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

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

.resource-title a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
}

.resource-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.resource-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 40px;
    text-decoration: none;
    color: var(--accent-cyan);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-view:hover {
    background: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

/* ============================================
   详情页样式
============================================ */
.resource-detail-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    padding: 40px;
}

.detail-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
}

.detail-category {
    margin-bottom: 16px;
}

.detail-category span {
    display: inline-block;
    padding: 4px 16px;
    background: rgba(0, 242, 255, 0.15);
    border-radius: 20px;
    font-size: 13px;
    color: var(--accent-cyan);
}

.detail-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(0, 242, 255, 0.1);
}

.stat-icon {
    font-size: 16px;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-number {
    font-weight: 600;
    color: var(--accent-cyan);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    font-size: 24px;
}

.detail-intro, .detail-content {
    margin-bottom: 32px;
}

.intro-content, .content-body {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    border-left: 3px solid var(--accent-cyan);
    color: var(--text-secondary);
    line-height: 1.7;
}

.detail-actions {
    text-align: center;
    padding-top: 24px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: 50px;
    text-decoration: none;
    color: #0a0c12;
    font-weight: 700;
    font-size: 18px;
    transition: var(--transition);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(0, 242, 255, 0.5);
}

/* ============================================
   悬浮按钮
============================================ */
.floating-buttons {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 50px;
    height: 50px;
    background: rgba(18, 22, 32, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid rgba(0, 242, 255, 0.3);
    transition: var(--transition);
    overflow: hidden;
    cursor: pointer;
}

.float-text {
    display: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.float-icon {
    font-size: 20px;
}

.float-btn:hover {
    width: auto;
    padding: 0 20px;
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.float-btn:hover .float-text {
    display: inline;
}

.float-submit:hover {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(45, 122, 255, 0.2));
}

.float-donate:hover {
    background: rgba(255, 100, 100, 0.2);
    border-color: #ff6b6b;
}

.float-group:hover {
    background: rgba(124, 77, 255, 0.2);
    border-color: #7c4dff;
}

.float-top:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination .page-numbers.current {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(45, 122, 255, 0.2));
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.pagination .page-numbers:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ============================================
   空状态
============================================ */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 16px;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-results a {
    color: var(--accent-cyan);
    text-decoration: none;
}

/* ============================================
   页脚
============================================ */
.jarvis-footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid rgba(0, 242, 255, 0.1);
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================
   响应式设计
============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .detail-title {
        font-size: 28px;
    }
    
    .resource-detail-card {
        padding: 28px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }
    
    .header-actions {
        justify-content: center;
        width: 100%;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .category-list {
        justify-content: center;
    }
    
    .sort-tabs {
        justify-content: center;
    }
    
    .resource-card {
        padding: 18px;
    }
    
    .resource-title {
        font-size: 18px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-title {
        font-size: 24px;
    }
    
    .detail-stats {
        gap: 12px;
    }
    
    .stat-item {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .resource-detail-card {
        padding: 20px;
    }
    
    .floating-buttons {
        right: 16px;
        bottom: 16px;
        gap: 8px;
    }
    
    .float-btn {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .site-title {
        font-size: 22px;
    }
    
    .sort-tabs a {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    .resource-stats-badge {
        font-size: 11px;
    }
    
    .btn-view {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .detail-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}