/* 博客文章页面样式 - 日系极简风格 */

.blog-page {
    background: #fefefe;
    min-height: 100vh;
    font-family: 'Noto Sans CJK SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
    color: #2a2a2a;
    line-height: 1.7;
}

/* 主容器 */
.blog-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 文章头部 */
.article-header {
    text-align: left;
    padding: 2.5rem 0 1.5rem;
    border-bottom: 0.5px solid #f0f0f0;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 200;
    color: #1a1a1a;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    position: relative;
    line-height: 1.4;
}

.article-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 0.5px;
    background: #c0c0c0;
    margin: 0.6rem 0 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #8a8a8a;
    font-weight: 300;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.article-meta-item i {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* 文章标签样式 */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.2;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tag i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.tag-country {
    background-color: #e8f4fd;
    color: #1e88e5;
    border: 1px solid #bbdefb;
}

.tag-people {
    background-color: #f3e5f5;
    color: #8e24aa;
    border: 1px solid #e1bee7;
}

.tag-skill {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 文章主图片 - 16:9 比例 */
.article-hero-image {
    margin: 1.5rem 0 1.5rem;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.hero-image:hover {
    transform: scale(1.005);
}

/* 文章摘要 */
.article-excerpt {
    background: transparent;
    border-left: 1px solid #e0e0e0;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0 1.5rem;
    border-radius: 0;
    font-style: normal;
    color: #4a4a4a;
    line-height: 1.6;
    font-weight: 300;
}

.article-excerpt-title {
    font-size: 0.8rem;
    font-weight: 300;
    color: #8a8a8a;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* 文章内容 */
.article-content {
    font-size: 1rem;
    color: #2a2a2a;
    line-height: 1.8;
    font-weight: 400;
    margin-bottom: 2rem;
    padding: 2rem 0;
    max-width: 100%;
}

/* 段落间距优化 */
.article-content p + p {
    margin-top: 1.2rem;
}

/* 段落首行缩进（仅对中文内容） */
.article-content p:not(:first-child) {
    text-indent: 2em;
}

/* 数字列表样式优化 */
.article-content ol {
    counter-reset: item;
}

.article-content ol li {
    display: block;
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 0.5rem;
}

.article-content ol li::before {
    content: counter(item) ". ";
    counter-increment: item;
    font-weight: 600;
    color: #6b7c93;
    position: absolute;
    left: -1.5rem;
    top: 0;
}

/* 强调文本样式 */
.article-content strong,
.article-content b {
    font-weight: 600;
    color: #1a1a1a;
}

.article-content em,
.article-content i {
    font-style: italic;
    color: #4a4a4a;
}

/* 分割线样式 */
.article-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
    margin: 3rem 0;
}

/* 表格样式 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.article-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #6b7c93;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content tr:hover {
    background: #f8fafc;
}

.article-content tr:last-child td {
    border-bottom: none;
}

/* 表格响应式设计 */
@media (max-width: 768px) {
    .article-content table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .article-content th,
    .article-content td {
        padding: 8px 12px;
    }
}

/* 文章内容链接样式 - 日系柔和蓝色 */
.article-content a {
    color: #6b7c93;  /* 日系柔和蓝色，温和而优雅 */
    font-size: 1.05em;  /* 稍微大一些的字体 */
    text-decoration: none;
    border-bottom: 1px solid #6b7c93;
    transition: all 0.3s ease;
    font-weight: 500;  /* 稍微加粗 */
    padding: 0.1em 0.2em;
    border-radius: 3px;
    background-color: rgba(107, 124, 147, 0.05);
}

.article-content a:hover {
    color: #5a6b7a;  /* 悬停时稍深的日系蓝色 */
    font-size: 1.05em;
    border-bottom-color: #5a6b7a;
    background-color: rgba(107, 124, 147, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(107, 124, 147, 0.2);
}

/* 锚点链接样式 - 日系柔和蓝色 */
.article-content a[href^="#"] {
    color: #6b7c93;  /* 日系柔和蓝色，与普通链接统一 */
    font-size: 1.05em;  /* 稍微大一些的字体 */
    text-decoration: none;
    border-bottom: 1px solid #6b7c93;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;  /* 稍微加粗 */
    padding: 0.1em 0.2em;
    border-radius: 3px;
    background-color: rgba(107, 124, 147, 0.05);
}

.article-content a[href^="#"]:hover {
    color: #5a6b7a;  /* 悬停时稍深的日系蓝色 */
    border-bottom-color: #5a6b7a;
    background-color: rgba(107, 124, 147, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(107, 124, 147, 0.2);
}

/* 锚点目标样式 */
.article-content h1[id],
.article-content h2[id],
.article-content h3[id],
.article-content h4[id],
.article-content h5[id],
.article-content h6[id] {
    position: relative;
    scroll-margin-top: 2rem;
}

/* 锚点目标悬停效果 */
.article-content h1[id]:hover,
.article-content h2[id]:hover,
.article-content h3[id]:hover,
.article-content h4[id]:hover,
.article-content h5[id]:hover,
.article-content h6[id]:hover {
    background-color: rgba(107, 124, 147, 0.03);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    margin: 0.2rem -0.5rem;
}

/* 锚点链接图标 - 更明显的图标 */
.article-content a[href^="#"]::after {
    content: "🔗";
    font-size: 0.8em;
    margin-left: 0.4em;
    opacity: 0.8;
    transition: all 0.3s ease;
    display: inline-block;
}

.article-content a[href^="#"]:hover::after {
    opacity: 1;
    transform: scale(1.1);
}

/* 外部链接样式 - 日系柔和蓝色 */
.article-content a[href^="http"]:not([href^="#"]):not([href*="localhost"]):not([href*="127.0.0.1"]) {
    color: #6b7c93;  /* 日系柔和蓝色，与其他链接统一 */
    font-size: 1.05em;  /* 稍微大一些的字体 */
    text-decoration: none;
    border-bottom: 1px solid #6b7c93;
    transition: all 0.3s ease;
    font-weight: 500;  /* 稍微加粗 */
    padding: 0.1em 0.2em;
    border-radius: 3px;
    background-color: rgba(107, 124, 147, 0.05);
    position: relative;
}

.article-content a[href^="http"]:not([href^="#"]):not([href*="localhost"]):not([href*="127.0.0.1"]):hover {
    color: #5a6b7a;  /* 悬停时稍深的日系蓝色 */
    border-bottom-color: #5a6b7a;
    background-color: rgba(107, 124, 147, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(107, 124, 147, 0.2);
}

/* 外部链接图标 */
.article-content a[href^="http"]:not([href^="#"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after {
    content: "↗";
    font-size: 0.8em;
    margin-left: 0.4em;
    opacity: 0.8;
    transition: all 0.3s ease;
    display: inline-block;
}

.article-content a[href^="http"]:not([href^="#"]):not([href*="localhost"]):not([href*="127.0.0.1"]):hover::after {
    opacity: 1;
    transform: scale(1.1) rotate(15deg);
}

.article-content .external-link {
    position: relative;
}

.article-content .external-icon {
    font-size: 0.8em;
    margin-left: 0.3em;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #1a1a1a;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
    position: relative;
}

.article-content h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.8rem;
}

.article-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #2a2a2a;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #3a3a3a;
}

.article-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
    color: #4a4a4a;
}

.article-content h5,
.article-content h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #5a5a5a;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #2a2a2a;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    text-align: justify;
    text-justify: inter-ideograph;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    margin: 1.5rem 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease;
    display: block;
}

.article-content img:hover {
    transform: scale(1.005);
}

.article-content blockquote {
    border-left: 3px solid #6b7c93;
    padding-left: 1.5rem;
    margin: 2rem 0;
    background-color: #fafafa;
    padding: 1.5rem 2rem;
    border-radius: 4px;
    font-style: italic;
    color: #4a4a4a;
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.7;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 3rem;
    color: #6b7c93;
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    opacity: 0.3;
    font-family: serif;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.8rem;
    line-height: 1.7;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.6rem;
    color: #2a2a2a;
    font-size: 1rem;
    line-height: 1.7;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

/* 嵌套列表样式 */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.article-content ul ul li {
    list-style-type: circle;
}

.article-content ul ul ul li {
    list-style-type: square;
}

.article-content code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #d63384;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', monospace;
    border: 1px solid #e9ecef;
    font-weight: 500;
}

.article-content pre {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-content pre code {
    background-color: transparent;
    padding: 0;
    color: #2a2a2a;
    border: none;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 文章底部信息 */
.article-footer {
    border-top: 0.5px solid #f0f0f0;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.article-tags {
    margin-bottom: 1.5rem;
}

.article-tags-title {
    font-size: 0.8rem;
    font-weight: 300;
    color: #8a8a8a;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-item {
    background: #f8f8f8;
    color: #5a5a5a;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 300;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 0.5px solid #e8e8e8;
}

.tag-item:hover {
    background: #e8e8e8;
    color: #1a1a1a;
    text-decoration: none;
}


/* 侧边栏 */
.sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.sidebar-card-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.sidebar-card-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: #8b8b8b;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-card-body {
    padding: 1.5rem;
}

/* 评论部分 - 日系极简风格 */
.comments-section {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.comments-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.comments-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #f0f0f0;
}

.comments-title {
    font-size: 1.4rem;
    font-weight: 300;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.02em;
}

.comments-subtitle {
    font-size: 0.9rem;
    color: #8b8b8b;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.comments-content {
    padding: 2rem;
}

.comments-placeholder {
    text-align: center;
    padding: 2rem 1rem;
}

.comments-icon {
    margin-bottom: 1.5rem;
}

.comments-icon i {
    font-size: 2.5rem;
    color: #d0d0d0;
    opacity: 0.8;
}

.comments-text p {
    font-size: 1rem;
    color: #4a4a4a;
    margin: 0 0 0.5rem 0;
    font-weight: 300;
}

.comments-text small {
    font-size: 0.85rem;
    color: #8b8b8b;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    color: #4a4a4a;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #f8f8f8;
    color: #1a1a1a;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .blog-container {
        padding: 0 1rem;
    }
    
    .article-header {
        padding: 2rem 0 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
    
    .article-excerpt {
        padding: 1.2rem 1.5rem;
        margin: 1.5rem 0 1.5rem;
    }
    
    .article-content {
        font-size: 0.95rem;
        padding: 1.5rem 0;
        line-height: 1.7;
    }
    
    .article-content h1 {
        font-size: 1.4rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.3rem;
        margin-top: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
        margin-top: 1.5rem;
        margin-bottom: 0.6rem;
    }
    
    .article-content p {
        font-size: 0.95rem;
        line-height: 1.7;
        text-align: left;
    }
    
    .article-content ul,
    .article-content ol {
        padding-left: 1.5rem;
    }
    
    .article-content blockquote {
        padding: 1.2rem 1.5rem;
        margin: 1.5rem 0;
        font-size: 1rem;
    }
    
    
    .sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .comments-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .comments-title {
        font-size: 1.2rem;
    }
    
    .comments-content {
        padding: 1.5rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.6rem;
    }
    
    .article-content {
        font-size: 0.9rem;
        padding: 1.2rem 0;
        line-height: 1.6;
    }
    
    .article-content h1 {
        font-size: 1.3rem;
        margin-top: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .article-content h2 {
        font-size: 1.2rem;
        margin-top: 1.5rem;
        margin-bottom: 0.6rem;
    }
    
    .article-content h3 {
        font-size: 1.1rem;
        margin-top: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .article-content p {
        font-size: 0.9rem;
        line-height: 1.6;
        text-align: left;
        text-indent: 1.5em;
    }
    
    .article-content ul,
    .article-content ol {
        padding-left: 1.2rem;
    }
    
    .article-content blockquote {
        padding: 1rem 1.2rem;
        margin: 1.2rem 0;
        font-size: 0.95rem;
    }
    
    .article-content pre {
        padding: 1rem;
        font-size: 0.8rem;
    }
    
    .comments-header {
        padding: 1.2rem 1.2rem 0.8rem;
    }
    
    .comments-title {
        font-size: 1.1rem;
    }
    
    .comments-content {
        padding: 1.2rem;
    }
    
    .comments-placeholder {
        padding: 1.5rem 0.8rem;
    }
    
    .comments-icon i {
        font-size: 2rem;
    }
}

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

.article-header,
.article-hero-image,
.article-excerpt,
.article-content,
.article-footer {
    animation: fadeInUp 0.6s ease-out;
}

.article-hero-image { animation-delay: 0.1s; }
.article-excerpt { animation-delay: 0.2s; }
.article-content { animation-delay: 0.3s; }
.article-footer { animation-delay: 0.4s; }


/* 打印样式 */
@media print {
    .blog-page {
        background: white;
    }
    
    .sidebar,
    .share-section,
    .back-to-top {
        display: none;
    }
    
    .article-hero-image {
        break-inside: avoid;
    }
    
    .article-content img {
        max-width: 100%;
        height: auto;
    }
    
}
