﻿/* ========== 全局样式 ========== */
:root {
    --primary: #1abc9c;
    --primary-dark: #16a085;
    --dark: #2c3e50;
    --gray: #7f8c8d;
    --light: #ecf0f1;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.7;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    /* 新增 */
}

/* ========== 头部样式 ========== */

/* 头部区域 - 渐变星空效果 */
.blog-header {
    background: linear-gradient(135deg, #0a2f3a 0%, #1a4a5f 50%, #2c6e7e 100%);
    color: var(--white);
    padding: 25px 0 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 星星/光点装饰（伪元素） */
.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 15% 30%, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(3px 3px at 75% 20%, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 45% 80%, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90% 65%, #ffd700, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 5% 70%, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 55% 40%, #ffd700, rgba(0, 0, 0, 0)),
        radial-gradient(3px 3px at 30% 15%, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 88% 45%, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 62% 85%, #ffd700, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 23% 55%, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40% 92%, #ffd700, rgba(0, 0, 0, 0));
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.6;
}

/* 额外飘浮小点（动画） */
.blog-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(1px 1px at 20% 50%, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 70% 40%, #ffd700, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 85% 75%, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 10% 85%, #ffd700, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 50% 15%, #fff, rgba(0, 0, 0, 0));
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.5;
    animation: floatStars 8s infinite ease-in-out;
}

@keyframes floatStars {
    0% {
        transform: translateY(0px);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-5px);
        opacity: 0.8;
    }

    100% {
        transform: translateY(0px);
        opacity: 0.5;
    }
}



.logo {
    text-align: center;
    margin-bottom: 10px;
}

.logo a {
    font-size: 38px;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 2px;
    transition: color 0.3s;
}


.logo a:hover {
    color: var(--primary);
}

.blog-desc {
    text-align: center;
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 20px;
}


.blog-nav {
    text-align: center;
    background: rgba(68, 238, 215, 0.2);
    border-radius: 50px;
    padding: 8px 20px;
    margin-top: 20px;
    display: inline-block;
    width: auto;
    backdrop-filter: blur(5px);
}

.blog-nav a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 18px;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    transition: all 0.3s;
    display: inline-block;
    position: relative;
}

.blog-nav a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* 添加下划线动画效果 */
.blog-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.blog-nav a:hover::after {
    width: 100%;
}


/* ========== 主体布局 ========== */
.blog-container {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.blog-main {
    flex: 2;
}

.blog-sidebar {
    flex: 1;
}

/* ========== 文章列表 ========== */
.article-item {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.article-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.article-meta {
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.article-meta .category {
    color: var(--primary);
}

.article-meta .category a {
    color: var(--primary);
    text-decoration: none;
}

.article-item h2 {
    margin: 0 0 15px;
    font-size: 22px;
}

.article-item h2 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

.article-item h2 a:hover {
    color: var(--primary);
}

.article-summary {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 15px;
}

.article-footer {
    display: flex;
    gap: 20px;
    color: var(--gray);
    font-size: 13px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.article-footer a {
    color: var(--primary);
    text-decoration: none;
}

.article-footer a:hover {
    text-decoration: underline;
}

/* ========== 文章详情页 ========== */
.article-detail {
    background: var(--white);
    border-radius: 12px;
    padding: 35px;
    box-shadow: var(--shadow);
}

.article-detail .article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-detail .article-header h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--dark);
}

.article-detail .article-meta {
    margin-bottom: 0;
}

.article-detail .article-content {
    font-size: 16px;
    line-height: 1.8;
}

.article-detail .article-content h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.article-detail .article-content h3 {
    font-size: 20px;
    margin: 25px 0 12px;
}

.article-detail .article-content p {
    margin-bottom: 20px;
}

.article-detail .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.article-detail .article-content ul,
.article-detail .article-content ol {
    margin: 15px 0 15px 30px;
}

.article-detail .article-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-left: 4px solid var(--primary);
    color: #666;
}

.article-detail .article-content pre {
    background: #000000;
    color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    margin: 20px 0;
}

/* ========== 增强文章内容样式（支持外部复制） ========== */
.article-detail .article-content h1 {
    font-size: 28px;
    margin: 30px 0 15px;
    font-weight: 700;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.article-detail .article-content h4,
.article-detail .article-content h5,
.article-detail .article-content h6 {
    margin: 20px 0 10px;
    font-weight: 600;
}

.article-detail .article-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', 'SF Mono', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.article-detail .article-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.article-detail .article-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

.article-detail .article-content th,
.article-detail .article-content td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.article-detail .article-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.article-detail .article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-detail .tag {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin: 0 5px 5px 0;
    text-decoration: none;
    color: #666;
}

.article-detail .tag:hover {
    background: var(--primary);
    color: white;
}

/* ========== 相邻文章导航 ========== */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-navigation a {
    color: var(--primary);
    text-decoration: none;
    max-width: 45%;
}

.article-navigation a:hover {
    text-decoration: underline;
}

/* ========== 侧边栏样式 ========== */
.sidebar-widget {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    font-size: 18px;
    color: var(--dark);
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.sidebar-widget li:last-child {
    border-bottom: none;
}

.sidebar-widget a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-widget a:hover {
    color: var(--primary);
}

/* ========== 分页样式 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: var(--primary);
    background: white;
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
}

.pagination .page-info {
    color: #999;
    border: none;
}

/* ========== 搜索框 ========== */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.search-form button {
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: var(--primary-dark);
}

.highlight {
    background: #fff3cd;
    padding: 0 2px;
    border-radius: 3px;
}

/* ========== 分类页/归档页 ========== */
.category-header,
.archive-header {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: var(--shadow);
}

.category-header h1,
.archive-header h1 {
    font-size: 28px;
    color: var(--dark);
}

.category-header p {
    color: var(--gray);
    margin-top: 10px;
}

.archive-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.archive-item {
    background: var(--white);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.archive-item a {
    text-decoration: none;
    color: #333;
    display: flex;
    justify-content: space-between;
}

.archive-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.archive-item a:hover {
    color: var(--primary);
}

/* ========== 页脚 ========== */
.blog-footer {
    background: var(--dark);
    color: var(--gray);
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

.blog-footer a {
    color: var(--gray);
    text-decoration: none;
}

.blog-footer a:hover {
    color: var(--primary);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {

    /* 菜单按钮 */
    .menu-toggle {
        display: block !important;
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        color: white !important;
        font-size: 28px !important;
        padding: 6px 12px !important;
        border-radius: 30px !important;
        z-index: 10000 !important;
        cursor: pointer;
        backdrop-filter: blur(5px);
    }


    .blog-nav {
        position: fixed;
        top: 65px;
        right: 15px;
        width: 260px;
        background: rgba(2, 31, 16, 0.85);
        backdrop-filter: blur(12px);
        border-radius: 20px;
        padding: 8px 0;
        display: none;
        z-index: 9999;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
        animation: fadeIn 0.3s ease;
    }

    .blog-nav.active {
        display: block;
    }

    .blog-nav a {
        display: block;
        text-align: center;
        padding: 12px 20px;
        font-size: 18px;
        color: white;
        text-decoration: none;
        transition: background 0.2s;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .blog-nav a:last-child {
        border-bottom: none;
    }

    .blog-nav a:hover {
        background: rgba(26, 188, 156, 0.3);
        color: #1abc9c;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .blog-header .container {
        position: static;
        /* 避免干扰 fixed */
    }

    .blog-nav a::after {
        display: none;
    }

    .logo a {
        font-size: 28px;
    }

    .blog-container {
        flex-direction: column;
        gap: 20px;
    }

    .article-item h2 {
        font-size: 18px;
    }

    .article-detail {
        padding: 20px;
    }

    .article-detail .article-header h1 {
        font-size: 24px;
    }

    .article-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .archive-list {
        grid-template-columns: 1fr;
    }

    .article-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .article-navigation a {
        max-width: 100%;
    }
}

/* ========== 打印样式 ========== */
@media print {

    .blog-nav,
    .blog-sidebar,
    .blog-footer,
    .pagination {
        display: none;
    }

    .blog-container {
        display: block;
        margin: 0;
        padding: 0;
    }

    .article-detail {
        box-shadow: none;
        padding: 0;
    }
}

/* 分页样式 */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #1abc9c;
    border-color: #1abc9c;
    color: #fff;
}

.pagination .active {
    background: #1abc9c;
    border-color: #1abc9c;
    color: #fff;
}

.pagination .disabled {
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
}

.pagination .page-info {
    border: none;
    background: none;
    color: #999;
}

/* ========== 评论区域样式 ========== */
.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.comments-section h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.comment-list {
    margin-bottom: 40px;
}

.comment-item {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.2s;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.comment-meta strong {
    color: #1abc9c;
    font-size: 16px;
}

.comment-time {
    color: #999;
    font-size: 12px;
}

.comment-meta a {
    color: #3498db;
    text-decoration: none;
    font-size: 12px;
}

.comment-meta a:hover {
    text-decoration: underline;
}

.reply-btn {
    color: #1abc9c;
    cursor: pointer;
    font-size: 12px;
    margin-left: auto;
}

.comment-content {
    line-height: 1.7;
    color: #555;
    word-break: break-word;
}

.comment-form {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

.comment-form h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

.captcha-row {
    align-items: flex-end;
}

.captcha-input {
    flex: 2;
}

.captcha-img {
    flex: 1;
    text-align: center;
}

.captcha-img img {
    height: 48px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.captcha-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.btn-submit {
    background: #1abc9c;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 10px;
}

.btn-submit:hover {
    background: #16a085;
    transform: translateY(-2px);
}

#reply-info {
    background: #f0f9f4;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #1abc9c;
}

#reply-info a {
    color: #e74c3c;
    margin-left: 15px;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .comment-item {
        padding: 15px;
    }
}

.like-btn {
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-block;
}

.like-btn:hover {
    color: #e74c3c;
}

/* 默认隐藏，移动端显示 */
.menu-toggle {
    display: none;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 30px;
    transition: 0.3s;
    color: white;
    z-index: 9999;
    line-height: 1;
}

.menu-toggle:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* 隐藏外部代码块自带的复制/下载按钮（避免重复） */
.article-content pre button,
.article-content pre .copy-btn,
.article-content pre .download-btn {
    display: none !important;
}


/* 代码块复制按钮容器相对定位 */
.article-content pre {
    position: relative;
}

.ry-copy-btn {
    opacity: 0.7;
    font-family: system-ui, sans-serif;
}

.ry-copy-btn:hover {
    opacity: 1;
    background: #1abc9c;
}

/* 隐藏外部默认按钮（如果有） */
.article-content pre button:not(.ry-copy-btn),
.article-content pre .copy-btn,
.article-content pre .download-btn {
    display: none !important;
}

/* 文章详情页摘要块 */
.article-summary-block {
    background: #f8f9fa;
    border-left: 4px solid #1abc9c;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.article-summary-block strong {
    color: #1abc9c;
    font-weight: 600;
}

/* 文章内容中的自定义链接样式 */
.article-content a.btn {
    display: inline-block;
    background: #1abc9c;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    margin: 4px 0;
}

.article-content a.btn:hover {
    background: #16a085;
}

.article-content a.link {
    text-decoration: underline;
    color: #1abc9c;
    border-bottom: 1px dotted #1abc9c;
}

.article-content a.link:hover {
    color: #0e7b64;
}

/* 覆盖高亮样式，去除背景、边框和悬停效果 */
.article-content pre .token,
.article-content code .token {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.article-content pre .token:hover,
.article-content code .token:hover {
    background: transparent !important;
    color: inherit !important;
    /* 或保留原有颜色 */
}

/* 如果希望保留文字颜色差异，可以只移除背景和边框，保留前景色 */

/* 保留高亮库原有颜色，但确保标签和标点符号清晰可见 */
.article-content pre .token.tag,
.article-content pre .token.punctuation,
.article-content pre .token.attr-name,
.article-content pre .token.attr-value {
    color: #7ad0e6 !important;
    /* 或者深红色/深蓝色，根据背景调整 */
    background: transparent !important;
    opacity: 1 !important;
}



.article-thumb {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
    width: 120px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-thumb img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .article-thumb {
        width: 80px;
        height: 60px;
        margin-right: 12px;
    }
}

/* 双花朵 + 左右小点缀（更华丽） */

.category-header h1 {
    position: relative;
    display: inline-block;
    padding: 0 20px;
}

.category-header h1::before,
.category-header h1::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1abc9c);
}

.category-header h1::before {
    left: -50px;
}

.category-header h1::after {
    right: -50px;
    transform: rotate(180deg);
}


/* 强制移动端菜单按钮显示 */
@media (max-width: 768px) {

    .menu-toggle {
        display: block !important;
        position: fixed !important;
        top: 50 !important;
        right: 15px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        color: white !important;
        font-size: 28px !important;
        padding: 6px 12px !important;
        border-radius: 30px !important;
        z-index: 99999 !important;
        cursor: pointer;
        backdrop-filter: blur(5px);

    }

    .blog-nav {
        display: none !important;
        position: fixed;
        top: 60px;
        right: 15px;
        width: 260px;
        background: rgba(2, 31, 16, 0.95);
        backdrop-filter: blur(12px);
        border-radius: 20px;
        padding: 8px 0;
        z-index: 9999;
    }

    .blog-nav.active {
        display: block !important;
    }

    /* 防止长字符串/代码块撑破页面 */
    .article-summary,
    .article-content,
    .article-item,
    .blog-main,
    .blog-container {

        word-wrap: break-word;
        word-break: break-word;

    }

    .article-summary pre,
    .article-summary code,
    .article-summary a {
        white-space: pre-wrap;
        word-break: break-all;
    }
}

/* ========== 会员模块通用样式 ========== */
.member-container {
    max-width: 600px;
    margin: 60px auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px 35px;
}

.member-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
}

.member-container .form-group {
    margin-bottom: 20px;
}

.member-container input,
.member-container button {
    width: 100%;
    box-sizing: border-box;
}

.member-container input[type="text"],
.member-container input[type="email"],
.member-container input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    transition: 0.2s;
}

.member-container input:focus {
    border-color: #1abc9c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

.member-container input::placeholder {
    color: #777;          /* 更深一点的灰色 */
    opacity: 1;           /* 完全不透明 */
}
.member-container input::-webkit-input-placeholder {
    color: #bbb;
}
.member-container input:-moz-placeholder {
    color: #bbb;
}
.member-container input::-moz-placeholder {
    color: #bbb;
}
.member-container input:-ms-input-placeholder {
    color: #bbb;
}

.member-container button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1abc9c, #16a085);
    border: none;
    border-radius: 40px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.member-container button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.3);
}

.member-container .error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}


.member-container .links {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
}

.member-container .links a {
    color: #1abc9c;
    text-decoration: none;
}

.member-container .links a:hover {
    text-decoration: underline;
}

.member-container .profile-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.member-container .profile-info p {
    margin: 8px 0;
}

.member-container hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #eee;
}

.member-container h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.member-container .success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.member-container label {
    display: block;
    margin-bottom: 5px;
    word-break: break-word;
    font-weight: 500;
}

@media (max-width: 768px) {
    .member-container {
        margin: 30px 20px;
        padding: 30px 25px;
        max-width: calc(100% - 40px);
        /* 自动适应屏幕，左右留白 */
    }
}


/* 侧边栏会员按钮样式 */
.sidebar-widget .member-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    /* 居中显示两个按钮 */
    margin-top: 10px;
}

.sidebar-widget .member-buttons a {
    flex: 1;
    text-align: center;
    background: linear-gradient(135deg, #1abc9c, #16a085);
    color: white;
    padding: 6px 16px;
    /* 适当内边距，不宽不窄 */
    border-radius: 40px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar-widget .member-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(26, 188, 156, 0.3);
    background: linear-gradient(135deg, #16a085, #1abc9c);
}

/* 已登录状态样式 */
.sidebar-widget .member-welcome {
    background: #f0f9f4;
    padding: 8px 12px;
    border-radius: 30px;
    text-align: center;
    font-size: 14px;
    margin-bottom: 12px;
}

.sidebar-widget .member-welcome strong {
    color: #1abc9c;
}

.sidebar-widget .member-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget .member-menu li {
    margin-bottom: 8px;
}

.sidebar-widget .member-menu a {
    display: block;
    background: #f8f9fa;
    text-align: center;
    padding: 6px 12px;
    border-radius: 30px;
    color: #2c3e50;
    transition: 0.2s;
}

.sidebar-widget .member-menu a:hover {
    background: #1abc9c;
    color: white;
}

/* 登录成功提示框 */
.login-success-msg {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 12px 20px;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    font-size: 16px;
    text-align: center;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

.gallery-detail {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    line-height: 1.8;
}
.gallery-detail img {
    max-width: 100%;
    height: auto;
}

.article-content pre {
    
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    margin: 1em 0;
}

.article-content pre code {
    display: block; /* 确保 code 是块级，但 pre 已经负责滚动 */
    background: transparent;
    padding: 0;
}