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

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7fa;
}

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

/* ==================== 导航栏 ==================== */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
}

.nav-tagline {
    color: #666;
    font-size: 0.9rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--border-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* ==================== Hero区域 ==================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ==================== 通用section ==================== */
.section {
    padding: 4rem 0;
}

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

/* ==================== 过滤器 ==================== */
.filter-section {
    margin-bottom: 3rem;
}

.category-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

/* ==================== 工具卡片 ==================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.tool-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-logo {
    font-size: 3rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-info {
    flex: 1;
}

.tool-name {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.tool-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}

.tool-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.tool-category {
    padding: 0.3rem 0.8rem;
    background: var(--light-color);
    border-radius: 20px;
    color: var(--dark-color);
}

.tool-news-count {
    color: #666;
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb {
    background: var(--light-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-link:hover {
    color: var(--dark-color);
}

.breadcrumb-separator {
    color: #999;
}

.breadcrumb-current {
    color: #666;
}

/* ==================== 工具详情页 ==================== */
.tool-detail-section {
    padding: 3rem 0;
}

.tool-detail-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tool-detail-logo {
    font-size: 5rem;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    border-radius: var(--radius);
}

.tool-detail-info {
    flex: 1;
}

.tool-detail-name {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.tool-detail-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.tool-detail-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    color: #666;
}

.meta-item strong {
    color: var(--dark-color);
}

.tool-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.tool-features h2,
.tool-stats-detail h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.features-list {
    list-style: none;
}

.features-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.tool-news-section {
    margin-top: 3rem;
}

.tool-news-section h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

/* ==================== 新闻列表 ==================== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-list-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.news-list-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.news-list-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.news-list-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    width: fit-content;
}

.news-list-title {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin: 0;
}

.news-list-summary {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-list-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #999;
}

.no-news {
    text-align: center;
    padding: 3rem;
    color: #999;
}

/* ==================== 新闻详情页 ==================== */
.news-detail-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.news-detail-header {
    margin-bottom: 2rem;
}

.news-detail-title {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-detail-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
}

.news-detail-image {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.news-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-detail-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.news-detail-content h1 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
    color: var(--dark-color);
}

.news-detail-content h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--dark-color);
}

.news-detail-content h3 {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: var(--dark-color);
}

.news-detail-content p {
    margin-bottom: 1rem;
}

.news-detail-content pre {
    background: var(--dark-color);
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.news-detail-content code {
    background: var(--light-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.news-detail-content pre code {
    background: transparent;
    padding: 0;
}

.news-detail-content ul,
.news-detail-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.news-detail-content li {
    margin-bottom: 0.5rem;
}

.news-detail-content strong {
    font-weight: 600;
}

.news-detail-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.tag {
    padding: 0.4rem 1rem;
    background: var(--light-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--dark-color);
}

.news-detail-actions {
    display: flex;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #d5dbdb;
}

/* ==================== 错误页面 ==================== */
.error-section {
    padding: 5rem 0;
    text-align: center;
}

.error-section h1 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-section p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.loading {
    text-align: center;
    padding: 3rem 0;
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--dark-color);
    color: white;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }

    .nav-tagline {
        display: none;
    }

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

    .tools-grid {
        grid-template-columns: 1fr;
    }

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

    .tool-detail-logo {
        margin: 0 auto;
    }

    .tool-detail-content {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .tool-detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .category-filters {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .news-list-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .news-detail-title {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

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