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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo .tagline {
    font-size: 12px;
    color: #6b7280;
    margin-top: -5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 8px;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    padding: 5px;
    width: 200px;
}

.search-box button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero区域 */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat .number {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-color);
}

.stat .label {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 5px;
}

/* 区块标题 */
.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* 资源导航区 */
.resources-section {
    padding: 80px 0;
    background: white;
}

.resource-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.resource-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.resource-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.2);
}

/* 卡片头部 */
.resource-card .card-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.resource-card .icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.resource-card .icon-bg {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-radius: 14px;
}

.resource-card .icon-main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: var(--primary-color);
}

.resource-card img.icon-main {
    width: 36px;
    height: 36px;
    object-fit: contain;
    font-size: 0;
}

.resource-card .card-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.resource-card .card-title h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-card .category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    align-self: flex-start;
}

/* 卡片描述 */
.resource-card .card-description {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 标签 */
.resource-card .tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}

.resource-card .tag {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 5px 12px;
    border-radius: 18px;
    font-size: 12px;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.resource-card .tag:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.2);
}

/* 访问按钮 */
.resource-card .btn-visit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: auto;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.resource-card .btn-visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.resource-card .btn-visit .btn-text {
    transition: transform 0.2s;
}

.resource-card .btn-visit:hover .btn-text {
    transform: translateX(2px);
}

.resource-card .btn-visit i {
    transition: transform 0.2s;
}

.resource-card .btn-visit:hover i {
    transform: translateX(4px);
}

/* 文章区 */
.articles-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.article-card .thumbnail {
    width: 100%;
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.article-card .content {
    padding: 20px;
}

.article-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.4;
}

.article-card .meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

.article-card .meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-card p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 14px;
}

.article-card .article-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .source-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
}

.article-card .source-link:hover {
    text-decoration: underline;
}

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

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

/* 分类区 */
.categories-section {
    padding: 80px 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--bg-color);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category-card:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.category-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.category-card p {
    color: #6b7280;
    font-size: 14px;
}

/* 关于区 */
.about-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.about-content {
    max-width: 850px;
    margin: 0 auto;
    background: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}

.about-intro {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    text-align: center;
    margin-bottom: 24px;
}

.about-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.about-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.about-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.about-logo i {
    font-size: 44px;
    color: var(--primary-color);
}

.about-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.about-features li {
    padding: 7px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #374151;
}

.about-features li i {
    color: var(--success-color);
    font-size: 14px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-mission {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    text-align: center;
    margin-top: 24px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(37,99,235,0.05) 0%, rgba(37,99,235,0.02) 100%);
    border-radius: 10px;
    border-left: 3px solid var(--primary-color);
}

/* 页脚 */
.footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    padding: 8px 0;
    color: #9ca3af;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-section ul li i {
    margin-right: 8px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        gap: 15px;
        justify-content: center;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

    .stat .number {
        font-size: 36px;
    }

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

    .resources-grid,
    .articles-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .search-box input {
        width: 150px;
    }

    .about-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-features {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 60px 0;
    }

    .resources-section,
    .articles-section,
    .categories-section,
    .about-section {
        padding: 60px 0;
    }

    .nav-links {
        font-size: 14px;
    }
}
