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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* 顶部导航 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.header-links a {
    color: white;
    margin-left: 20px;
    opacity: 0.9;
}

.header-links a:hover {
    opacity: 1;
}

.nav {
    display: flex;
    gap: 5px;
    padding: 12px 0;
    overflow-x: auto;
}

.nav-item {
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.2);
}

/* 横幅 */
.banner {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.banner h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.banner p {
    font-size: 18px;
    opacity: 0.9;
}

/* 搜索 */
.search-box {
    background: #252542;
    padding: 25px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.search-wrapper {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 15px;
}

.search-wrapper input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #333;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    background: #1a1a2e;
    color: #e0e0e0;
    transition: border-color 0.3s;
}

.search-wrapper input:focus {
    border-color: #667eea;
}

.search-wrapper button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-wrapper button:hover {
    transform: scale(1.02);
}

.search-tags {
    text-align: center;
}

.search-tags a {
    color: #888;
    margin: 0 8px;
    font-size: 14px;
}

.search-tags a:hover {
    color: #667eea;
}

/* 分类 */
.categories {
    padding: 30px 0;
    background: #252542;
    margin-bottom: 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.category-item {
    text-align: center;
    padding: 20px 10px;
    border-radius: 12px;
    background: #1a1a2e;
    transition: all 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    background: #2d2d4a;
}

.cat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.cat-name {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
}

/* 标签页 */
.tabs-section {
    background: #252542;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: #1a1a2e;
    color: #aaa;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
}

.tab:hover {
    background: #333;
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 区块 */
.section {
    padding: 30px 0;
}

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

.section-header.center {
    flex-direction: column;
    text-align: center;
}

.section-header h2 {
    font-size: 24px;
    color: #e0e0e0;
}

.section-header .subtitle {
    color: #aaa;
    margin-top: 5px;
}

.more {
    color: #667eea;
    font-size: 14px;
}

.more:hover {
    text-decoration: underline;
}

/* 资源卡片 */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.resource-card {
    background: #252542;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    background: #2d2d4a;
}

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

.resource-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-img .tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.resource-info {
    padding: 15px;
    background: #252542;
}

.resource-title {
    font-size: 15px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
}

.resource-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 10px;
}

.resource-meta .category {
    color: #667eea;
}

.resource-meta .price {
    color: #f59e0b;
    font-weight: 600;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.resource-content {
    font-size: 13px;
    color: #666;
    margin: 10px 0;
    line-height: 1.6;
}

.resource-content h2 {
    font-size: 18px;
    margin: 15px 0 10px;
    color: #333;
}

.resource-content pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 12px;
}

/* VIP 区域 */
.vip-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 50px 0;
}

.vip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.vip-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.vip-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1);
}

.vip-card.featured {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
}

.vip-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.vip-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.vip-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
}

.vip-card li {
    font-size: 13px;
    padding: 5px 0;
    opacity: 0.9;
}

.vip-price {
    font-size: 24px;
    font-weight: bold;
}

.vip-card.featured .vip-price {
    color: #1a1a2e;
}

/* 统计 */
.stats {
    background: #252542;
    padding: 30px 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item {
    padding: 10px;
}

.stat-num {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #aaa;
    margin-top: 5px;
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: #888;
    padding: 40px 0 20px;
    border-top: 1px solid #333;
}

.footer-content {
    display: flex;
    gap: 40px;
}

.footer-links {
    width: 200px;
}

.footer-links h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
}

.footer-links a {
    display: block;
    padding: 5px 0;
    font-size: 14px;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-info {
    flex: 1;
}

.footer-info p {
    font-size: 14px;
    margin-bottom: 8px;
}

/* 响应式 */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vip-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
    }
    
    .vip-grid {
        grid-template-columns: 1fr;
    }
}
