
/* ===== 重置与基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    word-wrap: break-word;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== 通用头部样式 ===== */
.site-header {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.site-logo {
    font-size: 1.4rem;
    font-weight: bold;
    white-space: nowrap;
}

.site-logo .primary {
    color: #fff;
}

.site-logo .highlight {
    color: #63b3ed;
}

.site-tagline {
    font-size: 0.8rem;
    opacity: 0.9;
    border-left: 2px solid #63b3ed;
    padding-left: 8px;
    display: none;
}

/* ===== 主导航 ===== */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
    white-space: nowrap;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #63b3ed;
}

/* ===== 移动端菜单按钮 ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
}

/* ===== 面包屑导航 ===== */
.breadcrumb {
    padding: 10px 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 0.3rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

.breadcrumb a {
    color: #3182ce;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .current {
    color: #64748b;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 主要内容区域 ===== */
main {
    flex: 1;
    width: 100%;
    padding: 2rem 0;
}

/* ===== 首页特定样式 ===== */
.hero-section {
    background: linear-gradient(rgba(26, 54, 93, 0.9), rgba(45, 55, 72, 0.9)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%2363b3ed" opacity="0.1" d="M0,0 L100,0 L100,100 Z"/></svg>');
    background-size: cover;
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.search-container {
    max-width: 600px;
    margin: 2rem auto;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
}

.search-box button {
    background: #3182ce;
    color: white;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #2b6cb0;
}

/* ===== 特色服务 ===== */
.services-section {
    padding: 3rem 0;
    background: #f7fafc;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #3182ce;
    margin: 10px auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2.5rem;
    color: #3182ce;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

/* ===== 文章卡片 ===== */
.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.article-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.article-image {
    height: 200px;
    background: linear-gradient(135deg, #3182ce, #63b3ed);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.article-category {
    background: #ebf8ff;
    color: #3182ce;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.article-title {
    font-size: 1.2rem;
    margin: 0.5rem 0 1rem;
    line-height: 1.4;
}

.article-title a {
    color: #2d3748;
    text-decoration: none;
}

.article-title a:hover {
    color: #3182ce;
}

.article-excerpt {
    color: #4a5568;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ===== 热门分类 ===== */
.categories-section {
    padding: 4rem 0;
    background: #f7fafc;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-count {
    display: inline-block;
    background: #3182ce;
    color: white;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    margin-bottom: 1rem;
    font-weight: bold;
}

.category-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.category-desc {
    color: #718096;
    font-size: 0.9rem;
}

/* ===== 文章页样式 ===== */
.article-main {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0 3rem;
    width: 100%;
}

.article-content {
    flex: 1;
    min-width: 0;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.article-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #e2e8f0;
}

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, #3182ce, #63b3ed);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.article-title {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 0.8rem;
    color: #1e293b;
    font-weight: 700;
    word-break: break-word;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.article-meta i {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 文章正文 */
.article-body {
    font-size: 1rem;
    color: #334155;
    line-height: 1.8;
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-body h2 {
    font-size: 1.5rem;
    margin: 1.8rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.8rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.3;
}

.article-body h4 {
    font-size: 1.1rem;
    margin: 1.2rem 0 0.6rem;
    color: #334155;
    font-weight: 600;
}

.article-body p {
    margin-bottom: 1rem;
    text-align: justify;
    text-justify: inter-ideograph;
}

.article-body strong {
    color: #1e293b;
    font-weight: 600;
}

.article-body ul, .article-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.article-body ul li {
    list-style-type: disc;
}

.article-body ol li {
    list-style-type: decimal;
}

.article-body blockquote {
    background: #f0f9ff;
    border-left: 3px solid #3182ce;
    padding: 1rem;
    margin: 1.5rem 0;
    font-style: normal;
    border-radius: 0 6px 6px 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.article-body th, .article-body td {
    border: 1px solid #e2e8f0;
    padding: 0.8rem;
    text-align: left;
    min-width: 80px;
}

.article-body th {
    background: #f1f5f9;
    font-weight: 600;
    color: #1e293b;
}

.article-body tr:nth-child(even) {
    background: #f8fafc;
}

/* 标签区域 */
.article-tags {
    margin: 1.5rem 0;
    padding-top: 1.2rem;
    border-top: 1px solid #e2e8f0;
}

.tags-title {
    margin-bottom: 0.8rem;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    background: #f0f9ff;
    color: #0369a1;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: 1px solid #bae6fd;
    font-weight: 500;
}

.tag:hover {
    background: #0369a1;
    color: white;
    border-color: #0369a1;
}

/* 文章导航 */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1.2rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}

.nav-prev::before {
    content: '← 上一篇';
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.nav-next::before {
    content: '下一篇 →';
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    text-align: right;
}

.nav-link a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.nav-link a:hover {
    color: #3182ce;
}

/* 相关文章 */
.related-articles {
    margin: 2rem 0;
}

.related-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1e293b;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3182ce;
    font-weight: 600;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.related-card {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.2s;
    border: 1px solid #f1f5f9;
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #e2e8f0;
}

.related-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.related-card a {
    color: #1e293b;
    text-decoration: none;
    display: block;
}

.related-card a:hover {
    color: #3182ce;
}

.related-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.3rem;
}

/* ===== 侧边栏 ===== */
.article-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: #1e293b;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

/* 作者信息 */
.author-info {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3182ce, #63b3ed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
    font-weight: 600;
}

.author-details h3 {
    margin-bottom: 0.3rem;
    color: #1e293b;
    font-size: 1rem;
}

.author-bio {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

/* 目录导航 */
.toc {
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.toc::-webkit-scrollbar {
    width: 4px;
}

.toc::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.toc::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 0.5rem;
    position: relative;
}

.toc-item a {
    color: #475569;
    text-decoration: none;
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
    line-height: 1.3;
    word-break: break-word;
}

.toc-item a:hover,
.toc-item a.active {
    background: #f0f9ff;
    color: #0369a1;
}

.toc-item.level-2 {
    padding-left: 0.8rem;
    margin-top: 0.2rem;
}

.toc-item.level-3 {
    padding-left: 1.6rem;
    font-size: 0.85rem;
    margin-top: 0.1rem;
}

/* 分享按钮 */
.share-widget {
    text-align: center;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.share-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.wechat { background: #09bb07; }
.weibo { background: #e6162d; }
.qq { background: #12b7f5; }
.link { background: #64748b; }

/* ===== 列表页样式 ===== */
.articles-section {
    margin-bottom: 3rem;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.list-article-card {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.list-article-card:last-child {
    border-bottom: none;
}

.list-article-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.list-article-title a {
    color: #2d3748;
    text-decoration: none;
}

.list-article-title a:hover {
    color: #3182ce;
}

.list-article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.75rem;
}

.list-article-excerpt {
    color: #4a5568;
    line-height: 1.6;
}

/* 侧边栏 */
.sidebar {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    color: #4a5568;
    text-decoration: none;
}

.category-list a:hover {
    color: #3182ce;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list a {
    background: #ebf8ff;
    color: #3182ce;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.tag-list a:hover {
    background: #3182ce;
    color: white;
}

/* ===== 页脚 ===== */
.site-footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-column h3 {
    color: #63b3ed;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ===== 移动端响应式设计 ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 12px;
    }
    
    .article-main {
        gap: 1.5rem;
    }
    
    .article-sidebar {
        width: 260px;
    }
}

@media (max-width: 900px) {
    .article-main {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .article-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .sidebar-widget {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        padding: 10px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #2d3748;
        padding: 1rem;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        display: none;
        z-index: 999;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .main-nav a {
        padding: 0.5rem 0;
        font-size: 0.95rem;
        display: block;
    }
    
    .site-tagline {
        display: none;
    }
    
    .breadcrumb .current {
        max-width: 100px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-content {
        padding: 1rem;
        border-radius: 6px;
    }
    
    .article-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .article-body {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .article-body h2 {
        font-size: 1.3rem;
        margin: 1.5rem 0 0.8rem;
        padding-bottom: 0.4rem;
    }
    
    .article-body h3 {
        font-size: 1.15rem;
        margin: 1.2rem 0 0.6rem;
    }
    
    .article-body h4 {
        font-size: 1rem;
        margin: 1rem 0 0.5rem;
    }
    
    .article-body p, .article-body li {
        margin-bottom: 0.8rem;
    }
    
    .article-body ul, .article-body ol {
        padding-left: 1.2rem;
        margin: 0.8rem 0;
    }
    
    .article-body blockquote {
        padding: 0.8rem;
        margin: 1.2rem 0;
    }
    
    .article-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.9rem;
    }
    
    .article-body th, .article-body td {
        padding: 0.6rem;
        min-width: 60px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .article-navigation {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-link {
        width: 100%;
    }
    
    .nav-next::before {
        text-align: left;
    }
    
    .tags-list {
        gap: 0.4rem;
    }
    
    .tag {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .author-details h3 {
        font-size: 0.95rem;
    }
    
    .author-bio {
        font-size: 0.8rem;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .site-logo {
        font-size: 1.2rem;
    }
    
    .mobile-menu-btn {
        font-size: 1.2rem;
        padding: 4px 6px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 1.3rem;
    }
    
    .article-body h2 {
        font-size: 1.2rem;
    }
    
    .article-body h3 {
        font-size: 1.1rem;
    }
    
    .article-body h4 {
        font-size: 0.95rem;
    }
    
    .sidebar-widget {
        padding: 0.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 6px;
    }
    
    .hero-title {
        font-size: 1.3rem;
    }
    
    .article-title {
        font-size: 1.2rem;
    }
    
    .article-body {
        font-size: 0.9rem;
    }
    
    .article-body h2 {
        font-size: 1.1rem;
    }
    
    .article-body h3 {
        font-size: 1rem;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .site-header, .breadcrumb, .article-sidebar, .article-navigation, .site-footer,
    .hero-section, .search-container, .services-section, .categories-section {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .article-content {
        box-shadow: none;
        padding: 0;
        border: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
        background: #fff;
    }
    
    .article-body {
        font-size: 12pt;
    }
    
    .article-body h2 {
        font-size: 16pt;
    }
    
    .article-body h3 {
        font-size: 14pt;
    }
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-content, .sidebar-widget, .article-card {
    animation: fadeIn 0.3s ease-out;
}

/* ===== 工具类 ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }


/* ===== 移动端响应式设计增强版 ===== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
        max-width: 100%;
    }
    
    /* 文章页布局调整 */
    .article-main {
        gap: 20px;
    }
    
    .article-sidebar {
        width: 280px;
    }
    
    /* 网格布局调整 */
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 小平板和大型手机 (600px - 768px) */
@media (max-width: 768px) {
    /* 头部导航 */
    .header-content {
        flex-wrap: wrap;
        padding: 10px 0;
    }
    
    .site-branding {
        width: 100%;
        justify-content: space-between;
    }
    
    .mobile-menu-btn {
        display: block;
        order: 1;
    }
    
    .site-logo {
        order: 2;
    }
    
    .site-tagline {
        display: none;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 10px;
        background: #2d3748;
        border-radius: 8px;
        padding: 10px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 5px;
    }
    
    .main-nav a {
        display: block;
        padding: 10px;
        border-radius: 4px;
    }
    
    .main-nav a:hover {
        background: rgba(255,255,255,0.1);
    }
    
    /* 文章页 - 改为单列布局 */
    .article-main {
        flex-direction: column;
    }
    
    .article-content {
        width: 100%;
        padding: 15px;
    }
    
    .article-sidebar {
        width: 100%;
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* 文章标题 */
    .article-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    /* 文章元信息 */
    .article-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .article-meta span {
        font-size: 0.8rem;
    }
    
    /* 文章内容 */
    .article-body {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .article-body h2 {
        font-size: 1.3rem;
    }
    
    .article-body h3 {
        font-size: 1.1rem;
    }
    
    .article-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* 列表页 - 改为单列 */
    .main-content {
        grid-template-columns: 1fr !important;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    /* 侧边栏 */
    .sidebar {
        margin-top: 30px;
    }
    
    /* 英雄区 */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-box input {
        padding: 12px 15px;
    }
    
    .search-box button {
        padding: 12px 20px;
    }
    
    /* 卡片样式调整 */
    .article-card {
        margin-bottom: 0;
    }
    
    .article-image {
        height: 160px;
    }
    
    /* 列表卡片 */
    .list-article-card {
        padding: 15px;
    }
    
    .list-article-title {
        font-size: 1.1rem;
    }
    
    /* 分页 */
    .pagination ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination li {
        margin: 2px;
    }
}

/* 手机设备 (480px以下) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    /* 文章页 */
    .article-title {
        font-size: 1.3rem;
    }
    
    .article-sidebar {
        grid-template-columns: 1fr;
    }
    
    /* 分类网格 */
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    /* 英雄区 */
    .hero-title {
        font-size: 1.5rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .search-box input {
        border-radius: 8px 8px 0 0;
        border-right: 1px solid #e2e8f0;
    }
    
    .search-box button {
        border-radius: 0 0 8px 8px;
        width: 100%;
    }
    
    /* 卡片 */
    .service-card {
        padding: 20px;
    }
    
    .category-card {
        padding: 20px;
    }
    
    /* 表格 */
    .article-body table {
        font-size: 0.85rem;
    }
    
    .article-body th,
    .article-body td {
        padding: 8px;
    }
    
    /* 标签 */
    .tags-list {
        gap: 5px;
    }
    
    .tag {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
    
    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* 分页 */
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

/* 小屏手机 (360px以下) */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .article-title {
        font-size: 1.2rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .hero-title {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 30px 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .search-container {
        margin: 15px auto;
    }
}