:root {
    --bg-color: #000000;
    --text-main: #f9f9f9;
    --text-dim: #a0a0a0;
    --primary-blue: #475bff;
    --primary-purple: #8e2de2;
    --glass-bg: rgba(24, 25, 27, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-color); color: var(--text-main); font-family: 'Noto Sans SC', sans-serif; line-height: 1.6; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 背景层 */
.glow-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -10; overflow: hidden; pointer-events: none; }
.glow-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; transition: transform 2s ease-in-out; }
.glow-orb.blue { width: 600px; height: 600px; background: radial-gradient(circle, var(--primary-blue), transparent 70%); top: -200px; right: -100px; }
.glow-orb.purple { width: 500px; height: 500px; background: radial-gradient(circle, var(--primary-purple), transparent 70%); bottom: -100px; left: -100px; }
.hero-background-media {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -5; overflow: hidden; display: none; background: transparent;
    /* 聚光灯半径由 JS 动态写入 --spotlight-r，默认 350px */
    --spotlight-r: 350px;
    -webkit-mask-image: radial-gradient(circle var(--spotlight-r) at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, rgba(0,0,0,0.55) 45%, transparent 100%);
    mask-image: radial-gradient(circle var(--spotlight-r) at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, rgba(0,0,0,0.55) 45%, transparent 100%);
    pointer-events: none;
}
.hero-background-media img, .hero-background-media video { width: 100%; height: 100%; object-fit: cover; }
main, header, footer { position: relative; z-index: 10; }

/* 导航栏 */
.main-header { position: fixed; top: 0; width: 100%; z-index: 100; backdrop-filter: blur(15px); background: var(--glass-bg); border-bottom: none; }
/* 三段式绝对居中导航布局 */
.header-content {
    height: 68px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0;
}

/* 左：Logo 居左 */
.logo { justify-self: start; text-decoration: none; }
.logo-text { font-size: 1.5rem; font-weight: 700; letter-spacing: 2px; background: linear-gradient(90deg, #fff, #a0a0a0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 8px rgba(255,255,255,0.6)); }
.logo-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); box-shadow: 0 0 12px rgba(255,255,255,0.3), 0 0 24px rgba(71,91,255,0.2); transition: box-shadow 0.3s; }
.logo-img:hover { box-shadow: 0 0 16px rgba(255,255,255,0.6), 0 0 32px rgba(71,91,255,0.4); }

/* 中：导航链接绝对水平居中 */
.nav-links { display: flex; align-items: center; justify-content: center; }
.nav-links a { color: #ffffff; text-decoration: none; margin: 0 20px; font-size: 0.92rem; transition: all 0.2s; white-space: nowrap; text-shadow: 0 0 8px rgba(255,255,255,0.7), 0 0 20px rgba(255,255,255,0.3); }
.nav-links a:hover, .nav-links a.active { color: #ffffff; text-shadow: 0 0 12px rgba(255,255,255,1), 0 0 30px rgba(71,91,255,0.8); }

/* 右：操作按钮居右 */
.header-actions { display: flex; align-items: center; gap: 6px; justify-self: end; flex-shrink: 0; }

/* 社媒图标按钮 */
.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: rgba(255,255,255,0.65);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    transition: all 0.25s;
    text-shadow: none;
}
.social-icon-btn:hover {
    color: #fff;
    background: rgba(71,91,255,0.2);
    border-color: rgba(71,91,255,0.6);
    box-shadow: 0 0 12px rgba(71,91,255,0.4);
    transform: translateY(-2px);
}
.header-center { display: flex; align-items: center; gap: 24px; flex: 1; justify-content: center; }

/* 搜索框 */
.header-search-inline { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 7px 16px; width: 200px; transition: border-color 0.25s, box-shadow 0.25s; }
.header-search-inline:focus-within { border-color: var(--primary-blue); box-shadow: 0 0 0 2px rgba(71,91,255,0.2); }
.header-search-input { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 0.85rem; min-width: 0; }
.header-search-input::placeholder { color: rgba(255,255,255,0.25); }

/* 按钮 */
.btn-primary { display: inline-block; background: var(--primary-blue); color: white !important; border: none; padding: 9px 22px; border-radius: 30px; cursor: pointer; font-weight: 500; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; font-size: 0.9rem; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 15px rgba(71,91,255,0.5); }
.btn-ghost { display: inline-block; background: transparent; color: #ffffff; border: none; padding: 9px 18px; cursor: pointer; text-decoration: none; font-size: 0.9rem; transition: all 0.2s; text-shadow: 0 0 8px rgba(255,255,255,0.6), 0 0 16px rgba(255,255,255,0.2); }
.btn-ghost:hover { color: #fff; text-shadow: 0 0 12px rgba(255,255,255,1), 0 0 25px rgba(71,91,255,0.7); }
.btn-outline { display: inline-block; background: transparent; border: 1px solid var(--border-color); color: var(--text-main); padding: 10px 28px; border-radius: 30px; cursor: pointer; margin-top: 20px; text-decoration: none; transition: border-color 0.2s, color 0.2s; }
.btn-outline:hover { border-color: var(--primary-blue); color: #fff; }

/* Hero — 纵向居中 + 呼吸节奏特效 */
.hero-section {
    min-height: 100vh;           /* 占满全屏 */
    display: flex;
    align-items: center;         /* 纵向居中 */
    justify-content: center;
    text-align: center;
    padding: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 标题呼吸动画 */
@keyframes breathe-title {
    0%   { opacity: 0.55; transform: translateY(0px) scale(1); }
    50%  { opacity: 1;    transform: translateY(-6px) scale(1.012); }
    100% { opacity: 0.55; transform: translateY(0px) scale(1); }
}

/* 副标题呼吸动画（相位错开，更自然） */
@keyframes breathe-sub {
    0%   { opacity: 0.25; letter-spacing: 3px; }
    50%  { opacity: 0.6;  letter-spacing: 4px; }
    100% { opacity: 0.25; letter-spacing: 3px; }
}

h1 {
    font-size: 4rem;
    line-height: 1.15;
    margin-bottom: 24px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: 2px;
    animation: breathe-title 5s ease-in-out infinite;
    will-change: opacity, transform;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary-blue), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-family: 'Exo 2', 'Noto Sans SC', sans-serif;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0;
    animation: breathe-sub 5s ease-in-out infinite;
    animation-delay: 1.5s;  /* 错开相位，与标题形成层次感 */
    will-change: opacity, letter-spacing;
}

/* 动态功能区 */
.features-section { padding: 80px 0; }
.feature-card { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 80px; max-width: 800px; margin-left: auto; margin-right: auto; }
.feature-text h2 { font-size: 2.8rem; margin-bottom: 20px; }
.feature-text p { font-size: 1.1rem; color: var(--text-dim); max-width: 600px; margin: 0 auto; }

/* Tag */
.tag { display: inline-block; padding: 4px 14px; background: rgba(71,91,255,0.15); border: 1px solid rgba(71,91,255,0.5); border-radius: 20px; font-size: 0.78rem; color: var(--primary-blue); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1.5px; }

/* 页脚 */
.main-footer { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); text-align: center; color: #fff; z-index: 100; text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,255,255,0.3); font-size: 0.8rem; letter-spacing: 1px; pointer-events: none; white-space: nowrap; }
.main-footer a { color: #fff !important; text-decoration: none; pointer-events: auto; }

/* 二级页面通用 */
.page-header { padding: 140px 0 60px; text-align: center; }
.page-title { font-size: 2.8rem; font-family: 'Orbitron', sans-serif; font-weight: 700; letter-spacing: 2px; }
.page-subtitle { color: var(--text-dim); font-size: 0.95rem; letter-spacing: 2px; margin-top: 15px; }

/* 文章列表 */
.article-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 80px; }
.article-item { display: flex; justify-content: space-between; align-items: center; padding: 24px 30px; background: var(--glass-bg); border: 1px solid var(--border-color); border-radius: 16px; transition: all 0.3s; text-decoration: none; color: inherit; }
.article-item:hover { border-color: var(--primary-blue); transform: translateX(6px); background: rgba(71,91,255,0.05); }
.article-info h3 { font-size: 1.2rem; margin-bottom: 6px; color: #fff; }
.article-meta { color: var(--text-dim); font-size: 0.85rem; }
.arrow { color: var(--text-dim); font-size: 1.2rem; transition: color 0.2s; }
.article-item:hover .arrow { color: var(--primary-blue); }

/* 网格卡片（项目、分类） */
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-bottom: 80px; }
.grid-card { background: var(--glass-bg); border: 1px solid var(--border-color); padding: 28px; border-radius: 20px; transition: all 0.3s; text-decoration: none; color: inherit; display: block; }
.grid-card:hover { border-color: var(--primary-blue); transform: translateY(-6px); box-shadow: 0 20px 40px rgba(71,91,255,0.15); }
.grid-card h2 { font-size: 1.4rem; margin: 10px 0; color: #fff; }
.grid-card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }

/* 技能标签 */
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.skill-tag { padding: 6px 16px; background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); border-radius: 20px; font-size: 0.88rem; color: var(--text-dim); }

/* 关于我 */
.about-content { max-width: 760px; margin: 0 auto 80px; font-size: 1.05rem; line-height: 1.9; color: var(--text-dim); }
.about-content-body p { margin-bottom: 20px; }

/* 详情页 */
.detail-hero { padding: 160px 0 60px; text-align: center; }
.detail-meta { display: flex; justify-content: center; gap: 16px; color: var(--text-dim); font-size: 0.88rem; margin-top: 20px; }
.meta-item { background: rgba(255,255,255,0.05); padding: 4px 14px; border-radius: 20px; border: 1px solid var(--border-color); }
.content-wrapper { max-width: 860px; margin: 40px auto 100px; padding: 0 24px; }
.article-body { font-size: 1.1rem; line-height: 1.9; color: #ccc; }
.article-body h2 { color: #fff; margin: 40px 0 20px; font-size: 1.8rem; }
.article-body p { margin-bottom: 24px; }
.detail-attachment { margin-bottom: 40px; border-radius: 20px; overflow: hidden; border: 1px solid var(--border-color); }
.detail-attachment img, .detail-attachment video { width: 100%; display: block; }
.back-btn { position: fixed; left: 32px; top: 90px; z-index: 200; color: var(--primary-blue); text-decoration: none; font-size: 0.9rem; background: var(--glass-bg); padding: 8px 18px; border-radius: 20px; border: 1px solid rgba(71,91,255,0.3); backdrop-filter: blur(10px); transition: all 0.2s; }
.back-btn:hover { background: rgba(71,91,255,0.2); }

/* 项目详情侧边栏 */
.project-layout { display: grid; grid-template-columns: 1fr 280px; gap: 50px; max-width: 1000px; margin: 40px auto 100px; padding: 0 24px; }
.project-sidebar-card { background: var(--glass-bg); border: 1px solid var(--border-color); padding: 28px; border-radius: 20px; height: fit-content; position: sticky; top: 100px; }
.project-sidebar-card .meta-group { margin-bottom: 20px; }
.project-sidebar-card label { display: block; color: var(--text-dim); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.project-sidebar-card span { color: #fff; font-weight: 600; }

/* 上一篇 / 下一篇导航 */
.chapter-nav {
    max-width: 860px;
    margin: 0 auto 80px;
    padding: 0 24px;
    display: flex;
    gap: 16px;
}
.chapter-nav a {
    flex: 1;
    display: block;
    padding: 20px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}
.chapter-nav a:hover {
    border-color: var(--primary-blue);
    background: rgba(71,91,255,0.05);
    transform: translateY(-3px);
}
.chapter-nav a.prev { text-align: left; }
.chapter-nav a.next { text-align: right; }
.chapter-nav .nav-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.chapter-nav .nav-title {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 排序拖拽列表 */
.sort-list { list-style: none; padding: 0; }
.sort-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: grab;
    transition: background 0.2s;
    color: #fff;
    font-size: 0.9rem;
}
.sort-item:active { cursor: grabbing; }
.sort-item.dragging { opacity: 0.4; background: rgba(71,91,255,0.15); }
.sort-item.dragover { border-color: var(--primary-blue); background: rgba(71,91,255,0.1); }
.sort-handle { color: #555; font-size: 1.1rem; user-select: none; }
.sort-num { color: var(--primary-blue); font-size: 0.8rem; min-width: 24px; }

/* ===== 全屏搜索遮罩 ===== */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.search-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.search-overlay-inner {
    width: 100%;
    max-width: 680px;
    padding: 0 24px;
}
.search-overlay-label {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 20px;
    text-align: center;
}
.search-overlay-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding: 12px 4px;
    font-size: 2rem;
    color: #fff;
    outline: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    transition: border-color 0.3s;
    text-align: center;
}
.search-overlay-input:focus { border-color: var(--primary-blue); }
.search-overlay-input::placeholder { color: rgba(255,255,255,0.15); font-size: 1.6rem; }
.search-overlay-hint {
    text-align: center;
    margin-top: 20px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.25);
    letter-spacing: 1px;
}
.search-overlay-hint span { color: rgba(71,91,255,0.8); }
.search-overlay-close {
    position: absolute;
    top: 28px;
    right: 36px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.6rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.search-overlay-close:hover { color: #fff; }

/* ===== 阅读进度条 ===== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), #a855f7);
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(71,91,255,0.8);
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid rgba(71,91,255,0.4);
    color: var(--primary-blue);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 200;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 12px rgba(71,91,255,0.3);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: rgba(71,91,255,0.2); box-shadow: 0 0 20px rgba(71,91,255,0.6); }

/* ===== 搜索页内联搜索框 ===== */
.search-box-page {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 24px auto 0;
}
.search-input-page {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 12px 18px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.search-input-page:focus { border-color: var(--primary-blue); }
.search-input-page::placeholder { color: rgba(255,255,255,0.3); }

/* 搜索结果高亮 */
.search-highlight { color: var(--primary-blue); font-weight: bold; }
.search-empty { text-align: center; color: var(--text-dim); padding: 60px 0; font-size: 1.1rem; }

/* ===== 移动端汉堡菜单按钮 ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* ===== 移动端响应式 ===== */
@media (max-width: 768px) {

    /* 导航栏 — 移动端改回 flex 布局 */
    .header-content { display: flex; justify-content: space-between; gap: 12px; }
    .logo { justify-self: unset; }
    .header-actions { justify-self: unset; }
    .nav-links { display: none; position: fixed; top: 68px; left: 0; right: 0; background: var(--header-bg, rgba(24,25,27,0.95)); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); flex-direction: column; padding: 20px; gap: 0; z-index: 99; border-bottom: 1px solid var(--border-color); }
    .nav-links.mobile-open { display: flex; }
    .nav-links a { margin: 0; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 1rem; }
    .nav-links a:last-child { border-bottom: none; }
    .mobile-menu-btn { display: block; }
    .header-search-inline { display: none; }
    .btn-bookmark { display: none; }

    /* Hero */
    h1 { font-size: 2.4rem; }
    .hero-section { padding: 0 16px; }

    /* 内容区 */
    .container { padding: 0 16px; }
    .page-header { padding: 100px 0 40px; }
    .page-title { font-size: 2rem; }

    /* 文章列表 */
    .article-item { padding: 16px; flex-wrap: wrap; gap: 8px; }
    .article-info h3 { font-size: 1rem; }

    /* 网格卡片 */
    .grid-container { grid-template-columns: 1fr; }

    /* 详情页 */
    .content-wrapper { padding: 0 16px; }
    .article-body { font-size: 1rem; }
    .detail-hero h1 { font-size: 2rem !important; }
    .detail-meta { flex-wrap: wrap; gap: 8px; }

    /* 项目双栏改单栏 */
    .project-layout { grid-template-columns: 1fr; padding: 0 16px; }
    .project-sidebar-card { position: static; }

    /* 章节导航 */
    .chapter-nav { flex-direction: column; padding: 0 16px; }

    /* 关于我 */
    .about-content { padding: 0 16px; }

    /* 页脚 */
    .main-footer { font-size: 0.7rem; white-space: normal; text-align: center; bottom: 10px; }

    /* 返回顶部 */
    .back-to-top { bottom: 50px; right: 16px; width: 38px; height: 38px; }

    /* 管理后台 */
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

/* ===== 代码高亮增强样式 ===== */
.article-body pre {
    margin: 28px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    position: relative;
}
.article-body pre code.hljs {
    padding: 20px 24px;
    font-size: 0.9rem;
    line-height: 1.7;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}
/* 语言标签 */
.article-body pre::before {
    content: attr(data-lang);
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Exo 2', sans-serif;
}
/* 行内代码 */
.article-body code:not(.hljs) {
    background: rgba(71,91,255,0.12);
    border: 1px solid rgba(71,91,255,0.25);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.88em;
    color: #7dd3fc;
    font-family: 'JetBrains Mono', monospace;
}
/* 阅读时间标签 */
.reading-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-blue);
    font-weight: 500;
}

/* ===== 浅色主题 — 全面对比度修复 ===== */
body.light-theme {
    --bg-color: #f0f2f8;
    --text-main: #0d0e1a;
    --text-dim:  #4a4a6a;
    --glass-bg:  rgba(255,255,255,0.82);
    --border-color: rgba(0,0,0,0.12);
    background-color: var(--bg-color);
    color: var(--text-main);
}
/* 导航 */
body.light-theme .main-header { background: rgba(240,242,248,0.9); }
body.light-theme .nav-links a { color: #333355; text-shadow: none; }
body.light-theme .nav-links a:hover { color: var(--primary-blue); text-shadow: none; }
body.light-theme .logo-text { filter: none; background: linear-gradient(90deg, #111133, #444466); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
body.light-theme .btn-ghost { color: #333355; text-shadow: none; }
body.light-theme .btn-ghost:hover { color: var(--primary-blue); text-shadow: none; }
body.light-theme .social-icon-btn { color: #333355; background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); }
body.light-theme .social-icon-btn:hover { color: var(--primary-blue); }
body.light-theme .lang-toggle, body.light-theme .theme-toggle { color: #333355; background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); }
/* Hero */
body.light-theme h1 { color: #0d0e1a; }
body.light-theme .hero-subtitle { color: rgba(30,30,60,0.55); }
/* 内容卡片 */
body.light-theme .article-item { background: rgba(255,255,255,0.92); color: #0d0e1a; border-color: rgba(0,0,0,0.1); }
body.light-theme .article-item:hover { background: rgba(255,255,255,1); border-color: var(--primary-blue); }
body.light-theme .article-info h3 { color: #0d0e1a; }
body.light-theme .article-meta { color: #4a4a6a; }
body.light-theme .arrow { color: #4a4a6a; }
body.light-theme .grid-card { background: rgba(255,255,255,0.92); color: #0d0e1a; border-color: rgba(0,0,0,0.1); }
body.light-theme .grid-card h2 { color: #0d0e1a; }
body.light-theme .grid-card p { color: #4a4a6a; }
/* 详情页 */
body.light-theme .article-body { color: #1a1a3e; }
body.light-theme .article-body h2 { color: #0d0e1a; }
body.light-theme .article-body p { color: #2a2a4e; }
body.light-theme .article-body code:not(.hljs) { color: var(--primary-blue); background: rgba(71,91,255,0.08); }
body.light-theme .meta-item { background: rgba(0,0,0,0.05); color: #4a4a6a; border-color: rgba(0,0,0,0.1); }
body.light-theme .tag { background: rgba(71,91,255,0.1); }
/* 关于我 */
body.light-theme .about-content { color: #2a2a4e; }
body.light-theme .skill-tag { background: rgba(0,0,0,0.05); color: #333355; border-color: rgba(0,0,0,0.1); }
/* 光晕淡化 */
body.light-theme .glow-orb.blue { opacity: 0.08; }
body.light-theme .glow-orb.purple { opacity: 0.06; }
/* 章节导航 */
body.light-theme .chapter-nav a { background: rgba(255,255,255,0.9); color: #0d0e1a; }
body.light-theme .chapter-nav .nav-title { color: #0d0e1a; }
body.light-theme .chapter-nav .nav-label { color: #4a4a6a; }
/* 页脚 */
body.light-theme .main-footer { color: #0d0e1a; text-shadow: 0 0 6px rgba(0,0,0,0.1); }
body.light-theme .main-footer a { color: var(--primary-blue) !important; }
/* 搜索遮罩 */
body.light-theme .search-overlay { background: rgba(240,242,248,0.95); }
body.light-theme .search-overlay-input { color: #0d0e1a; border-bottom-color: rgba(0,0,0,0.25); }
body.light-theme .search-overlay-label { color: rgba(0,0,0,0.4); }
body.light-theme .search-overlay-hint { color: rgba(0,0,0,0.3); }
body.light-theme .search-overlay-close { color: rgba(0,0,0,0.4); }
/* 阅读进度条 */
body.light-theme .reading-progress { box-shadow: 0 0 6px rgba(71,91,255,0.5); }
/* 返回顶部 */
body.light-theme .back-to-top { background: rgba(255,255,255,0.9); border-color: rgba(71,91,255,0.3); }
/* 项目侧边栏 */
body.light-theme .project-sidebar-card { background: rgba(255,255,255,0.9); }
body.light-theme .project-sidebar-card label { color: #4a4a6a; }
body.light-theme .project-sidebar-card span { color: #0d0e1a; }

/* 语言切换按钮 */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer;
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.25s;
}
.lang-toggle:hover {
    background: rgba(71,91,255,0.2);
    border-color: rgba(71,91,255,0.6);
    color: #fff;
}

/* 主题切换按钮 */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    transition: all 0.25s;
}
.theme-toggle:hover { background: rgba(71,91,255,0.2); border-color: rgba(71,91,255,0.6); }

/* ===== 打印/PDF 样式 ===== */
@media print {
    .main-header, .back-btn, .back-to-top, .chapter-nav, .main-footer,
    .glow-container, .hero-background-media, .reading-progress,
    .social-icon-btn, .btn-bookmark, .btn-primary, .btn-outline { display: none !important; }
    body { background: #fff !important; color: #000 !important; font-size: 12pt; }
    .content-wrapper { max-width: 100%; margin: 0; padding: 20pt; }
    .detail-hero { padding: 20pt 0 10pt; }
    .article-body { color: #111; }
    .article-body pre { border: 1px solid #ccc; box-shadow: none; }
    .article-body pre code { font-size: 9pt; }
    .text-gradient { -webkit-text-fill-color: #000 !important; background: none !important; }
    h1 { color: #000; font-family: serif; }
    a { color: #000; text-decoration: underline; }
    .print-btn-wrap { display: none !important; }
}

/* 动效 */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.7s ease-out; }
.fade-in.visible { opacity: 1 !important; transform: translateY(0); }
