/* A/B测试博客 - 绿色主题 */
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #059669;
    --primary-light: #10b981;
    --primary-dark: #047857;
    --gradient-primary: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-hero: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f0fdf4;
    --bg-white: #ffffff;
    --border-color: #d1fae5;
    --shadow-sm: 0 1px 3px rgba(5, 150, 105, 0.1);
    --shadow-md: 0 4px 6px rgba(5, 150, 105, 0.15);
    --shadow-lg: 0 10px 25px rgba(5, 150, 105, 0.2);
}

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

/* 导航栏 */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar .logo-icon {
    font-size: 1.8rem;
}

.navbar nav a {
    color: var(--text-dark);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Hero区域 */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

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

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.hero-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 容器 */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 分类区域 */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* 分类卡片网格 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.category-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.category-card .count {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 1rem;
}

/* 文章卡片网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.article-card-image {
    width: 100%;
    height: 180px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.article-card-content {
    padding: 1.5rem;
}

.article-card-content .category {
    display: inline-block;
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.article-card-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.article-card-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.article-card-content h3 a:hover {
    color: var(--primary-color);
}

.article-card-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-card-content .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.article-card-content .read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.article-card-content .read-more:hover {
    color: var(--primary-dark);
}

/* 文章详情页 */
.article-detail {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 3rem;
    margin: 2rem auto;
    max-width: 900px;
    box-shadow: var(--shadow-md);
}

.article-detail .article-header {
    text-align: center;
    margin-bottom: 2rem;
}

.article-detail .article-header .category {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-detail .article-header h1 {
    font-size: 2.2rem;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-detail .article-header .meta {
    color: var(--text-light);
    font-size: 0.95rem;
}

.article-detail .article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-detail .article-body h2 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.article-detail .article-body h3 {
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem;
    font-size: 1.2rem;
}

.article-detail .article-body p {
    margin-bottom: 1.25rem;
}

.article-detail .article-body ul,
.article-detail .article-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-detail .article-body li {
    margin-bottom: 0.5rem;
}

.article-detail .article-body code {
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

.article-detail .article-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
}

/* 分类页头部 */
.category-header {
    background: var(--gradient-hero);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.category-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.category-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* 外链区域 */
.links-section {
    background: var(--bg-white);
    padding: 3rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.links-section h2 {
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.links-grid a {
    background: var(--bg-light);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    display: block;
    text-align: center;
}

.links-grid a:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

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

.footer-section h3 {
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* 面包屑导航 */
.breadcrumb {
    background: var(--bg-white);
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: wrap;
}

.breadcrumb-list li::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumb-list li:last-child::after {
    display: none;
}

.breadcrumb-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-list li:last-child {
    color: var(--text-light);
}

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

    .navbar nav a {
        margin: 0 0.75rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

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

    .article-detail {
        padding: 1.5rem;
        margin: 1rem;
    }

    .article-detail .article-header h1 {
        font-size: 1.75rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

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

.category-card,
.article-card {
    animation: fadeIn 0.5s ease forwards;
}

.category-card:nth-child(2) { animation-delay: 0.1s; }
.category-card:nth-child(3) { animation-delay: 0.2s; }
.category-card:nth-child(4) { animation-delay: 0.3s; }
.category-card:nth-child(5) { animation-delay: 0.4s; }
.category-card:nth-child(6) { animation-delay: 0.5s; }
.category-card:nth-child(7) { animation-delay: 0.6s; }
.category-card:nth-child(8) { animation-delay: 0.7s; }
.category-card:nth-child(9) { animation-delay: 0.8s; }
.category-card:nth-child(10) { animation-delay: 0.9s; }

/* 标签样式 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* 相关文章 */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-articles h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.related-articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.related-article-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.related-article-item:hover {
    background: var(--gradient-primary);
    color: white;
}

.related-article-item .icon {
    font-size: 1.5rem;
}

.related-article-item .title {
    color: var(--text-dark);
    font-weight: 500;
}

.related-article-item:hover .title {
    color: white;
}