﻿/* ===== 博客专用样式 ===== */

/* ---------- 全局重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
}

/* ---------- 容器 ---------- */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    overflow-x: hidden;
}

/* ---------- 头部导航 ---------- */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.blog-home-btn {
    font-weight: 500;
    color: white;
    text-decoration: none;
}

.blog-home-btn:hover {
    color: #ffffff;
}

.logo {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-img {
    height: 32px;
    width: auto;
}

.site-name {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.blog-title {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981, #3b82f6, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-left: 0.25rem;
}

.lang-switch a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.lang-switch a:hover {
    color: #60a5fa;
}

/* ---------- 列表页布局 ---------- */
.blog-layout {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.blog-main {
    flex: 2;
    min-width: 0;
    overflow-x: hidden;
}

.blog-sidebar {
    flex: 1;
    min-width: 200px;
}

/* ---------- 文章卡片 ---------- */
.post-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.post-card h2 {
    margin-bottom: 0.5rem;
}

.post-card h2 a {
    color: #60a5fa;
    text-decoration: none;
    font-size: 1.65rem;
}

.post-card h2 a:hover {
    text-decoration: underline;
}

.post-date {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.post-excerpt {
    color: #cbd5e1;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.read-more {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.875rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* ---------- 列表页描述区域 ---------- */
.blog-description {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.blog-description:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.blog-h1 {
    font-size: 1.65rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #60a5fa;
}

.blog-description p {
    color: #cbd5e1;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.blog-description strong {
    color: #60a5fa;
}

/* ---------- 文章详情页 ---------- */
.article-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 2rem;
    overflow-x: hidden;
    max-width: 100%;
}

.article-card h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    color: #94a3b8;
    font-size: 0.85rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
}

.article-tag {
    background: rgba(96, 165, 250, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    text-decoration: none;
    color: #60a5fa;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.article-tag:hover {
    background: rgba(96, 165, 250, 0.3);
    color: #93c5fd;
}

/* 文章内容 */
.article-content {
    line-height: 1.8;
    overflow-x: hidden;
    max-width: 100%;
}

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

.article-content h2 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
    color: #60a5fa;
}

.article-content h3 {
    font-size: 1.2rem;
    margin: 1.2rem 0 0.5rem;
    color: #a78bfa;
}

.article-content ul,
.article-content ol {
    margin: 0.75rem 0 0.75rem 1.5rem;
}

.article-content li {
    margin-bottom: 0.25rem;
}

.article-content blockquote {
    border-left: 3px solid #60a5fa;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #94a3b8;
}

.article-content code {
    background: #1e293b;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.article-content pre {
    background: #1e293b;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

/* 文章内链接颜色 */
.post-card a,
.article-content a,
.post-excerpt a {
    color: #10b981 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-card a:hover,
.article-content a:hover,
.post-excerpt a:hover {
    color: #34d399 !important;
}

/* ---------- 表格样式（可滚动，不溢出页面） ---------- */
.article-content table {
    display: block;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.article-content th {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    font-weight: 600;
}

.article-content tr:hover {
    background: rgba(96, 165, 250, 0.05);
}

/* 移动端表格单元格不换行，保证可滑动 */
@media (max-width: 768px) {
    .article-content th,
    .article-content td {
        white-space: nowrap;
    }
}

/* ---------- 图片样式 ---------- */
.article-content img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-content img:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 图片放大模态框 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

.image-modal.show {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.image-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.image-modal .close-btn:hover {
    color: #10b981;
}

/* ---------- 上一篇/下一篇 ---------- */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid rgba(96, 165, 250, 0.2);
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.post-navigation a {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
}

.post-navigation a:hover {
    background: rgba(30, 41, 59, 0.6);
    transform: translateY(-2px);
}

.post-navigation .nav-prev {
    text-align: left;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation span:first-child {
    font-size: 0.75rem;
    color: #94a3b8;
}

.post-navigation .nav-title {
    font-size: 0.85rem;
    color: #60a5fa;
    font-weight: 500;
}

.post-navigation a:hover .nav-title {
    color: #93c5fd;
}

/* ---------- 相关文章 ---------- */
.related-posts {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.related-posts h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #cbd5e1;
}

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

.related-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

.related-item:last-child {
    border-bottom: none;
}

.related-item a {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.related-item a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.related-date {
    color: #6b7280;
    font-size: 0.75rem;
}

/* ---------- 标签页 ---------- */
.tag-header-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
}

.tag-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tag-header-icon {
    font-size: 1.3rem;
}

.tag-header-title {
    font-size: 1rem;
    font-weight: 500;
    color: #e5e7eb;
    margin: 0;
    flex: 1;
}

.tag-header-count {
    color: #94a3b8;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ---------- 侧边栏 ---------- */
.sidebar-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sidebar-card:last-child {
    margin-bottom: 0;
}

.sidebar-card h2,
.sidebar-card h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #cbd5e1;
}

.sidebar-list {
    list-style: none;
    padding-left: 0;
}

.sidebar-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

.sidebar-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-list a {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    flex: 1;
}

.sidebar-list a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.sidebar-list-date {
    color: #6b7280;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud a {
    background: rgba(96, 165, 250, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    text-decoration: none;
    color: #60a5fa;
    transition: all 0.2s;
}

.tag-cloud a:hover {
    background: rgba(96, 165, 250, 0.4);
}

.archive-list {
    list-style: none;
    padding-left: 0;
}

.archive-list li {
    margin-bottom: 0.5rem;
}

.archive-list li:last-child {
    margin-bottom: 0;
}

.archive-list a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.archive-list a:hover {
    color: #60a5fa;
}

/* ---------- 广告位 ---------- */
.ad-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ad-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.ad-btn {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
}

.ad-btn:hover {
    background: #0e9f6e;
}

.ad-content {
    font-size: 0.875rem;
    color: #cbd5e1;
}

.ad-content p {
    margin-bottom: 0.5rem;
}

.ad-content p:last-child {
    margin-bottom: 0;
}

.ad-tutorial-link {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.9rem;
    font-weight: 500;
}

.ad-tutorial-link a {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
}

.ad-tutorial-link a:hover {
    text-decoration: underline;
    color: #34d399;
}

/* ---------- 分享按钮 ---------- */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.share-btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    line-height: normal;
}

.share-btn.weixin {
    background: #07c160;
    color: white;
}

.share-btn.weibo {
    background: #e6162d;
    color: white;
}

.share-btn.facebook {
    background: #3b5998;
    color: white;
}

.share-btn.twitter {
    background: #000000;
    color: white;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.share-btn.copy-btn {
    background: #10b981;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.copy-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

/* ---------- RSS 订阅 ---------- */
.rss-subscribe {
    position: relative;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(242, 101, 34, 0.3);
}

.rss-subscribe-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.rss-subscribe-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e5e7eb;
}

.rss-subscribe-badge {
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(242, 101, 34, 0.15);
    color: #f26522;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
}

.rss-subscribe-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rss-subscribe-text {
    font-size: 0.75rem;
    color: #94a3b8;
}

.rss-subscribe-icon {
    width: 28px;
    height: 28px;
    color: #f26522;
}

.rss-subscribe-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.rss-subscribe:hover {
    border-color: rgba(242, 101, 34, 0.6);
    background: rgba(30, 41, 59, 0.8);
}

/* ---------- 版权声明 ---------- */
.copyright-notice {
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid #10b981;
    padding: 1rem;
    margin: 2rem 0;
    font-size: 0.8rem;
    color: #94a3b8;
    border-radius: 0.5rem;
}

.copyright-notice p {
    margin-bottom: 0.25rem;
}

.copyright-notice p:last-child {
    margin-bottom: 0;
}

.copyright-notice a {
    color: #60a5fa;
    text-decoration: none;
}

.copyright-notice a:hover {
    text-decoration: underline;
}

/* ---------- CTA 按钮 ---------- */
.cta-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    margin: 2rem 0;
}

.cta-btn {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.cta-btn:hover {
    background: #0e9f6e;
    transform: translateY(-1px);
}

.cta-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination a {
    color: #60a5fa;
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.pagination a:hover {
    background: rgba(96, 165, 250, 0.2);
}

.pagination span {
    color: #94a3b8;
}

/* ---------- 底部样式 ---------- */
.blog-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(96, 165, 250, 0.2);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-brand {
    margin-bottom: 0.25rem;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.footer-tagline {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-sep {
    color: #374151;
}

.footer-copyright {
    font-size: 0.7rem;
    color: #6b7280;
}

.footer-copyright a {
    color: inherit;
    text-decoration: none;
}

.footer-copyright a:hover {
    color: #60a5fa;
}

/* ---------- 返回顶部按钮 ---------- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #d4d4d8, #a1a1aa);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    animation: pulse 1.5s infinite;
}

.back-to-top:hover {
    transform: translateY(-2px);
    background: linear-gradient(145deg, #cbd5e1, #94a3b8);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.7), 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(148, 163, 184, 0), 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0), 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 768px) {
    .blog-container {
        padding: 1rem;
    }
    
    .blog-layout {
        flex-direction: column;
    }
    
    .blog-sidebar {
        margin-top: 1rem;
    }
    
    .post-card {
        padding: 1rem;
    }
    
    .post-card h2 a {
        font-size: 1.3rem;
    }
    
    .article-card {
        padding: 1.25rem;
    }
    
    .article-card h1 {
        font-size: 1.4rem;
    }
    
    .article-content h2 {
        font-size: 1.2rem;
    }
    
    .article-content h3 {
        font-size: 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-tags {
        margin-left: 0;
    }
    
    .related-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .post-navigation a {
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem 0.5rem;
    }
    
    .footer-sep {
        display: inline;
    }
    
    .tag-header-row {
        flex-wrap: wrap;
    }
    
    .tag-header-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 0.75rem;
    }
    
    .blog-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .lang-switch {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .lang-switch a {
        margin-left: 0;
        padding: 0.25rem 0.5rem;
    }
    
    .logo {
        justify-content: center;
    }
    
    .site-name {
        font-size: 1.2rem;
    }
    
    .blog-title {
        font-size: 1rem;
    }
    
    .post-card {
        padding: 0.875rem;
    }
    
    .post-card h2 a {
        font-size: 1.1rem;
    }
    
    .post-date {
        font-size: 0.7rem;
    }
    
    .post-excerpt {
        font-size: 0.8rem;
    }
    
    .read-more {
        font-size: 0.75rem;
    }
    
    .blog-h1 {
        font-size: 1.2rem;
    }
    
    .blog-description p {
        font-size: 0.75rem;
    }
    
    .article-card {
        padding: 1rem;
    }
    
    .article-card h1 {
        font-size: 1.2rem;
    }
    
    .article-meta {
        font-size: 0.7rem;
    }
    
    .article-content {
        font-size: 0.85rem;
    }
    
    .article-content h2 {
        font-size: 1rem;
    }
    
    .article-content h3 {
        font-size: 0.9rem;
    }
    
    .sidebar-card {
        padding: 0.875rem;
    }
    
    .sidebar-card h2,
    .sidebar-card h3 {
        font-size: 0.9rem;
    }
    
    .sidebar-list a {
        font-size: 0.8rem;
    }
    
    .tag-cloud a {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .ad-title {
        font-size: 0.9rem;
    }
    
    .ad-content {
        font-size: 0.75rem;
    }
    
    .ad-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .share-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .rss-subscribe-title {
        font-size: 0.8rem;
    }
    
    .rss-subscribe-text {
        font-size: 0.65rem;
    }
    
    .rss-subscribe-icon {
        width: 22px;
        height: 22px;
    }
    
    .copyright-notice {
        font-size: 0.7rem;
        padding: 0.75rem;
    }
    
    .cta-box {
        padding: 1rem;
    }
    
    .cta-title {
        font-size: 1rem;
    }
    
    .cta-btn {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }
    
    .pagination {
        gap: 0.5rem;
    }
    
    .pagination a,
    .pagination span {
        font-size: 0.75rem;
    }
    
    .footer-logo {
        font-size: 1rem;
    }
    
    .footer-tagline {
        font-size: 0.65rem;
    }
    
    .footer-links {
        font-size: 0.7rem;
    }
    
    .footer-copyright {
        font-size: 0.6rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
    
    .tag-header-card {
        padding: 0.5rem 1rem;
    }
    
    .tag-header-icon {
        font-size: 1rem;
    }
    
    .tag-header-title {
        font-size: 0.8rem;
    }
    
    .tag-header-count {
        font-size: 0.7rem;
    }
}

/* 只有手机端才处理溢出 */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    .blog-container,
    .blog-main,
    .article-card,
    .article-content {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    /* 手机端表格可滚动 */
    .article-content table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
    
    .article-content td,
    .article-content th {
        white-space: nowrap !important;
    }
}