/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

/* 头部样式 */
header {
    background-color: #fff;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* Logo和标题一行容器 */
.logo-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.site-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2c7655;
    margin: 0 0 4px 0;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

/* 主要内容区域 */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

section {
    margin-bottom: 50px;
}

section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2c7655, #1e5a3d);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* 工具分类样式 */
.tool-category {
    margin-bottom: 40px;
}

.tool-category h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

/* 工具卡片布局 */
.tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tool-card {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: #2c7655;
}

.tool-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card .tool-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.tool-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 4px;
}

.tool-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    transition: color 0.3s ease;
    flex: 1;
}

.tool-card:hover h4 {
    color: #2c7655;
}

.tool-card p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

/* 学习资源样式 */
.article-series {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.article-series h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.article-series ul {
    list-style: none;
    padding: 0;
}

.article-series li {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.article-series li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.index {
    display: inline-block;
    min-width: 20px;
    font-weight: 600;
    color: #2c7655;
    margin-right: 8px;
}

.article-series a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.article-series a:hover {
    color: #2c7655;
    text-decoration: underline;
}

/* 页脚样式 */
footer {
    background-color: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 30px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 0.9rem;
}

.footer-content a {
    color: #2c7655;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .tool-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .logo-title-row {
        gap: 12px;
    }
    
    .site-logo {
        width: 32px;
        height: 32px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }
    
    main {
        padding: 0 15px 30px;
    }
    
    .tool-list {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .tool-card {
        padding: 15px;
    }
    
    .article-series {
        padding: 20px;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 25px 15px;
    }
    
    .site-logo {
        width: 28px;
        height: 28px;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .tool-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .tool-card {
        padding: 12px;
    }
    
    .article-series {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    section {
        margin-bottom: 35px;
    }
}

/* 优化加载性能和图片错误处理 */
.tool-logo {
    object-fit: contain;
    background-color: #f3f4f6;
}

.tool-logo:error {
    display: none;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 链接焦点样式 */
a:focus {
    outline: 2px solid #2c7655;
    outline-offset: 2px;
}

/* 选择文本颜色 */
::selection {
    background-color: #e6f3ea;
    color: #1e5a3d;
} 