/*
Theme Name: 晓鹏科技风
Theme URI: https://xiaopenggegegege.xyz
Description: 现代科技风 WordPress 主题，动态粒子背景
Version: 1.1
Author: 晓鹏
*/

:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 30, 0.8);
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --border-color: rgba(0, 212, 255, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.site-content {
    position: relative;
    z-index: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-shadow: 0 0 10px var(--accent-glow);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3),
                0 0 20px var(--accent-glow);
}

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

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: #00e5ff;
    box-shadow: 0 0 30px var(--accent-glow);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: "SF Mono", "Fira Code", monospace;
}

.site-logo span {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: var(--accent);
}

.user-menu {
    position: relative;
}

.user-menu > a::after {
    content: "▼";
    font-size: 10px;
    margin-left: 6px;
    opacity: 0.6;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 140px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    list-style: none;
}

.user-menu:hover .sub-menu {
    display: block;
}

.sub-menu li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

.sub-menu li a:hover {
    color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
}

/* ============================================
   HEADER SEARCH - 科技风格弹窗搜索
   ============================================ */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.search-toggle:hover {
    color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 9998;
}

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-inner {
    width: 100%;
    max-width: 680px;
    position: relative;
}

.search-form {
    display: flex;
    background: rgba(16, 16, 24, 0.95);
    border: 1px solid var(--accent);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5);
}

.search-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 20px 24px;
    font-size: 18px;
    color: var(--text-primary);
    font-family: inherit;
}

.search-field::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.search-submit {
    background: rgba(0, 212, 255, 0.1);
    border: none;
    border-left: 1px solid rgba(0, 212, 255, 0.2);
    padding: 16px 20px;
    cursor: pointer;
    color: var(--accent);
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.search-submit:hover {
    background: rgba(0, 212, 255, 0.2);
}

.search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 10px;
    display: flex;
    transition: color 0.2s;
}

.search-close:hover {
    color: #fff;
}

@media (max-width: 600px) {
    .search-form {
        border-radius: 8px;
    }
    .search-field {
        padding: 16px 18px;
        font-size: 16px;
    }
    .search-submit {
        padding: 14px 16px;
    }
}

.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
    color: var(--text-secondary);
    font-size: 14px;
}

.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.post-card {
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card .post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

.post-card h2 {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-card h2 a {
    color: var(--text-primary);
}

.post-card h2 a:hover {
    color: var(--accent);
}

.post-card .post-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.post-card .post-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.widget {
    margin-bottom: 32px;
}

.widget h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-secondary);
    font-size: 14px;
}

.widget ul li a:hover {
    color: var(--accent);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.category-list a {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.category-list a:hover,
.category-list a.active {
    border-color: var(--accent);
    color: var(--accent);
}

.single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.single-post .post-header {
    text-align: center;
    margin-bottom: 40px;
}

.single-post .post-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.single-post .post-meta {
    color: var(--text-secondary);
    font-size: 14px;
}

.single-post .post-content {
    font-size: 16px;
    line-height: 1.8;
}

.single-post .post-content p {
    margin-bottom: 24px;
}

.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.single-post .post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 24px 0;
}

.single-post .post-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
}

.single-post .post-content code {
    font-family: "SF Mono", "Fira Code", monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.form-container {
    max-width: 480px;
    margin: 60px auto;
    padding: 40px;
}

.form-container h1 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.donation-item {
    text-align: center;
}

.donation-item h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--accent);
}

.donation-item img {
    max-width: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    margin-bottom: 20px;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 14px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }

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

    .nav-menu {
        display: none;
    }

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

    .single-post .post-title {
        font-size: 28px;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.pagination a:hover,
.pagination .current {
    border-color: var(--accent);
    color: var(--accent);
}

.comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.comment-form {
    margin-bottom: 40px;
}

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

.comment {
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 20px;
}

.comment .comment-author {
    font-weight: 600;
    margin-bottom: 8px;
}

.comment .comment-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ============================================
   美化增强 v1.1
   ============================================ */

/* --- 阅读进度条 --- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #00e5ff);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--accent);
}

/* --- 导航栏滚动增强 --- */
.header {
    transition: all 0.3s ease;
}
.header.scrolled {
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(0, 212, 255, 0.3);
}

/* --- 文章卡片增强 --- */
.post-card {
    position: relative;
    overflow: hidden;
}

.post-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-card .category-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card .read-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.post-card .read-time::before {
    content: "⏱ ";
}

.post-card .post-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.post-card .read-more {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

.post-card .read-more::after {
    content: " →";
    transition: transform 0.3s ease;
    display: inline-block;
}

.post-card:hover .read-more::after {
    transform: translateX(4px);
}

/* --- 增强Hero区 --- */
.hero {
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
}

.hero h1 {
    animation: heroFadeIn 1s ease forwards;
}

.hero p {
    animation: heroFadeIn 1s ease 0.2s forwards;
    opacity: 0;
}

.hero .btn {
    animation: heroFadeIn 1s ease 0.4s forwards;
    opacity: 0;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 打字机标语 --- */
.hero-tagline {
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

/* --- 增强blockquote --- */
.single-post .post-content blockquote {
    position: relative;
    background: rgba(0, 212, 255, 0.08);
    border-left: 3px solid var(--accent);
    padding: 20px 24px;
    margin: 32px 0;
    border-radius: 0 8px 8px 0;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-primary);
}

.single-post .post-content blockquote::before {
    content: "" "";
    font-size: 48px;
    color: var(--accent);
    opacity: 0.3;
    position: absolute;
    top: -10px;
    left: 16px;
}

/* --- 增强代码块 --- */
.single-post .post-content pre {
    background: #0d1117;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    padding: 0;
    margin: 28px 0;
    overflow: hidden;
}

.single-post .post-content pre code {
    display: block;
    padding: 20px 24px;
    background: transparent;
    font-size: 13.5px;
    line-height: 1.7;
    overflow-x: auto;
    border-radius: 0;
}

/* 代码语言标签 */
.code-lang {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px 8px 0 0;
    margin-left: 16px;
}

/* --- 增强图片 --- */
.single-post .post-content img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}

.single-post .post-content img:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* --- 社交分享按钮 --- */
.share-buttons {
    display: flex;
    gap: 12px;
    margin: 40px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.share-btn.copy-link:hover {
    border-color: #a78bfa;
    color: #a78bfa;
}

/* --- 侧边栏小工具 --- */
.sidebar .widget {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.sidebar .widget h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar .popular-posts li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
}

.sidebar .popular-posts .rank {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.sidebar .popular-posts .rank.top {
    background: rgba(0, 212, 255, 0.4);
}

.sidebar .popular-posts .post-info h4 {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
}

.sidebar .popular-posts .post-info h4 a {
    color: var(--text-primary);
}

.sidebar .popular-posts .post-info h4 a:hover {
    color: var(--accent);
}

.sidebar .popular-posts .post-info span {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 标签云 */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tagcloud a {
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tagcloud a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
}

/* 打赏侧边卡片 */
.sidebar .donate-widget {
    text-align: center;
}

.sidebar .donate-widget h3 {
    color: var(--accent);
}

.sidebar .donate-widget p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.sidebar .donate-widget img {
    max-width: 160px;
    border-radius: 8px;
}

/* --- 相关文章 --- */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-posts h3 {
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-post-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.related-post-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-post-item .info {
    padding: 14px;
}

.related-post-item h4 {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
}

.related-post-item h4 a {
    color: var(--text-primary);
}

.related-post-item h4 a:hover {
    color: var(--accent);
}

.related-post-item .date {
    font-size: 11px;
    color: var(--text-secondary);
}

/* --- 目录导航 --- */
.toc-widget {
    position: sticky;
    top: 90px;
}

.toc-widget h3 {
    font-size: 14px;
    margin-bottom: 12px;
}

.toc-list {
    list-style: none;
    border-left: 2px solid var(--border-color);
}

.toc-list li {
    padding: 4px 0 4px 16px;
    border-bottom: none;
}

.toc-list li.active {
    border-left-color: var(--accent);
}

.toc-list li.active a {
    color: var(--accent);
}

.toc-list a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.toc-list a:hover {
    color: var(--accent);
}

/* --- 自定义滚动条 --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* --- 移动端汉堡菜单 --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 200;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- 平板适配 --- */
@media (max-width: 1024px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- 移动端适配 --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        z-index: 199;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        font-size: 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 15px;
    }

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

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

    .single-post .post-title {
        font-size: 26px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-wrap: wrap;
    }
}

/* --- 文章内链接增强 --- */
.single-post .post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(0, 212, 255, 0.4);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.single-post .post-content a:hover {
    text-decoration-color: var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
}

/* --- 文章结尾引导 --- */
.post-end-cta {
    margin-top: 48px;
    padding: 28px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    text-align: center;
}

.post-end-cta h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.post-end-cta p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* --- 弹窗遮罩 --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(20px);
}
