/**
 * 赛博朋克科技风主题 - Cyberpunk Tech Theme
 * Author: Claude
 * Version: 2.0.0 - Bug Fixed Edition
 */

/* ==================== CSS变量定义 ==================== */
:root {
    /* 颜色系统 */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: rgba(22, 27, 34, 0.85);

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    --accent-cyan: #00f5ff;
    --accent-purple: #bf00ff;
    --accent-green: #00ff88;
    --accent-orange: #ff8800;
    --accent-red: #ff0055;
    --accent-yellow: #ffee00;

    /* 边框和阴影 */
    --border-color: rgba(0, 245, 255, 0.15);
    --border-hover: rgba(0, 245, 255, 0.4);
    --glow-cyan: 0 0 20px rgba(0, 245, 255, 0.4);
    --glow-purple: 0 0 20px rgba(191, 0, 255, 0.4);

    /* 字体 */
    --font-primary: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 40px;

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==================== 基础重置 ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    color: var(--accent-purple);
    text-shadow: 0 0 10px rgba(191, 0, 255, 0.5);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ==================== 背景效果 ==================== */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.cyber-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, var(--bg-primary) 100%);
}

/* ==================== 阅读进度条 ==================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    z-index: 10001;
    transition: width 0.1s linear;
    box-shadow: var(--glow-cyan);
}

/* ==================== 头部导航 ==================== */
.site-header {
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) var(--spacing-xl);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo::before {
    content: '◈';
    font-size: 28px;
    -webkit-text-fill-color: var(--accent-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.5));
}

.site-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.site-nav a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    padding: var(--spacing-sm) 0;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: width var(--transition-normal);
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--accent-cyan);
}

.site-nav a:hover::after,
.site-nav a.active::after {
    width: 100%;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-box input {
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 10px 16px 10px 40px;
    color: var(--text-primary);
    font-size: 13px;
    width: 200px;
    transition: all var(--transition-normal);
    font-family: var(--font-primary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
    width: 280px;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

/* 主题切换按钮 */
.theme-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: rotate(180deg);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--text-secondary);
    transition: var(--transition-normal);
}

.mobile-menu-btn:hover span {
    background: var(--accent-cyan);
}

/* ==================== 主布局 ==================== */
.main-container {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 200px);
}

.main-content {
    min-width: 0;
}

/* ==================== 侧边栏组件 ==================== */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.widget:hover {
    border-color: var(--border-hover);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.widget-title {
    color: var(--accent-cyan);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* 目录导航 */
.toc-list {
    list-style: none;
}

.toc-list li {
    padding: 8px 0;
    border-left: 2px solid transparent;
    padding-left: 12px;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.toc-list li:hover {
    border-left-color: var(--accent-cyan);
    background: linear-gradient(90deg, rgba(0, 245, 255, 0.1), transparent);
}

.toc-list a {
    color: var(--text-secondary);
    display: block;
}

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

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(0, 245, 255, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all var(--transition-normal);
}

.stat-item:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 作者卡片 */
.author-card {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
}

.author-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--accent-cyan);
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--glow-cyan);
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--bg-primary);
    font-weight: 700;
    transition: all var(--transition-normal);
}

.author-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 245, 255, 0.6);
}

.author-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.author-bio {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.social-link:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-3px);
}

/* 相关文章 */
.related-posts {
    list-style: none;
}

.related-post {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.related-post a {
    color: var(--text-primary);
    font-size: 14px;
    display: block;
    line-height: 1.5;
}

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

.related-post-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 20px;
    font-size: 12px;
    color: var(--accent-cyan);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.tag:hover {
    background: rgba(0, 245, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
    transform: translateY(-2px);
}

.tag-cat {
    background: rgba(191, 0, 255, 0.1);
    border-color: rgba(191, 0, 255, 0.3);
    color: var(--accent-purple);
}

.tag-cat:hover {
    background: rgba(191, 0, 255, 0.2);
    box-shadow: 0 0 15px rgba(191, 0, 255, 0.3);
}

/* ==================== 首页横幅 ==================== */
.banner {
    text-align: center;
    padding: 100px 20px 80px;
    position: relative;
}

.banner-content {
    max-width: 700px;
    margin: 0 auto;
}

.banner-title {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
}

.banner-desc {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 30px;
}

.banner-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
    color: var(--bg-primary);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

/* ==================== 文章列表 ==================== */
.section-title {
    font-size: 24px;
    color: var(--accent-cyan);
    margin-bottom: 30px;
    text-align: center;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    transition: left 0.5s ease;
}

.post-card:hover::before {
    left: 100%;
}

.post-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
}

.post-card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-card-title a:hover {
    -webkit-text-fill-color: var(--accent-cyan);
}

.post-card-excerpt {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.post-card-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-icon {
    font-size: 14px;
}

.post-card-tags {
    display: flex;
    gap: 8px;
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

/* 互动按钮 */
.post-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
}

.interaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.interaction-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.interaction-btn.liked {
    background: rgba(255, 0, 85, 0.1);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.interaction-btn.bookmarked {
    background: rgba(255, 238, 0, 0.1);
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.btn-icon {
    font-size: 14px;
}

/* ==================== 文章详情页 ==================== */
.article-header {
    text-align: center;
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-xl);
}

.article-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    flex-wrap: wrap;
}

.article-tags {
    display: flex;
    gap: 10px;
    margin-top: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* 文章内容 */
.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 50px 0 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--accent-cyan);
    position: relative;
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
}

.article-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 40px 0 20px;
    color: var(--text-primary);
}

.article-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: var(--text-secondary);
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.article-content a {
    color: var(--accent-cyan);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

.article-content a:hover {
    border-bottom-color: var(--accent-cyan);
}

/* 行内代码 */
.article-content code {
    background: rgba(0, 245, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-cyan);
}

/* 引用块 */
.article-content blockquote {
    background: rgba(0, 245, 255, 0.05);
    border-left: 4px solid var(--accent-cyan);
    padding: 20px 24px;
    margin: 25px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
}

.article-content blockquote p {
    margin: 0;
}

/* 分割线 */
.article-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 40px 0;
}

/* 图片 */
.article-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.article-content img:hover {
    border-color: var(--border-hover);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ==================== 代码块 ==================== */
.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 25px 0;
    overflow: hidden;
}

.code-header {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.code-lang {
    font-size: 12px;
    color: var(--accent-cyan);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.code-actions {
    display: flex;
    gap: 8px;
}

.code-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.code-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 245, 255, 0.1);
}

.code-content {
    padding: 20px;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}

.code-content code {
    background: none;
    padding: 0;
    color: inherit;
    font-family: inherit;
}

/* 代码高亮颜色 */
.code-keyword { color: #ff79c6; }
.code-string { color: #f1fa8c; }
.code-comment { color: #6272a4; font-style: italic; }
.code-function { color: #50fa7b; }
.code-number { color: #bd93f9; }
.code-operator { color: #ff79c6; }

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.page-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-color: transparent;
    color: var(--bg-primary);
    font-weight: 600;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-nav {
    font-size: 18px;
}

/* ==================== 悬浮功能按钮 ==================== */
.floating-panel {
    position: fixed;
    bottom: 150px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.feature-btn {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.feature-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: scale(1.1);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 100;
}

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

.back-to-top:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-3px);
}

/* AI助手按钮 */
.ai-assistant {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 200;
}

.ai-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    border-radius: 50%;
    color: var(--bg-primary);
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
    animation: aiPulse 2s infinite;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes aiPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 245, 255, 0.5); }
    50% { box-shadow: 0 0 50px rgba(0, 245, 255, 0.8); }
}

.ai-btn:hover {
    transform: scale(1.1);
}

.ai-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    color: var(--text-secondary);
    pointer-events: none;
}

.ai-assistant:hover .ai-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ==================== 设置面板 ==================== */
.settings-panel {
    position: fixed;
    bottom: 210px;
    right: 90px;
    width: 280px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.settings-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-panel::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    width: 20px;
    height: 20px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.setting-btn {
    flex: 1;
    min-width: 60px;
    padding: 10px;
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.setting-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.setting-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-color: transparent;
    color: var(--bg-primary);
    font-weight: 600;
}

/* ==================== TTS面板 ==================== */
.tts-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 200;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.tts-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.tts-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.tts-btn:hover {
    background: rgba(0, 245, 255, 0.1);
    color: var(--accent-cyan);
}

.tts-progress {
    width: 200px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.tts-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    width: 0%;
    transition: width 0.1s linear;
}

/* ==================== 页脚 ==================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px var(--spacing-xl) 30px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    color: var(--accent-cyan);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-section a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    max-width: 1400px;
    margin: 40px auto 0;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 14px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr 280px;
    }

    .sidebar-left {
        display: none;
    }
}

@media (max-width: 900px) {
    .main-container {
        grid-template-columns: 1fr;
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .sidebar-right {
        display: none;
    }

    .site-header {
        padding: var(--spacing-md);
    }

    .site-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .search-box input {
        width: 150px;
    }

    .search-box input:focus {
        width: 180px;
    }

    .banner {
        padding: 60px 20px;
    }

    .banner-title {
        font-size: 32px;
    }

    .article-title {
        font-size: 28px;
    }

    .post-card-title {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .banner-title {
        font-size: 28px;
    }

    .article-title {
        font-size: 24px;
    }

    .article-meta {
        gap: 12px;
        font-size: 12px;
    }

    .post-actions {
        gap: 10px;
    }

    .interaction-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .floating-panel {
        bottom: 120px;
        right: 20px;
    }

    .back-to-top {
        bottom: 70px;
        right: 20px;
    }

    .ai-assistant {
        bottom: 20px;
        right: 20px;
    }

    .settings-panel {
        right: 20px;
        left: 20px;
        width: auto;
    }

    .tts-panel {
        padding: 12px 16px;
        gap: 12px;
    }

    .tts-progress {
        width: 120px;
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ==================== 打印样式 ==================== */
@media print {
    .site-header,
    .sidebar,
    .floating-panel,
    .ai-assistant,
    .back-to-top,
    .interaction-bar,
    .site-footer {
        display: none !important;
    }

    .main-container {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }

    body {
        background: white;
        color: black;
    }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* ==================== 选中文字样式 ==================== */
::selection {
    background: rgba(0, 245, 255, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(0, 245, 255, 0.3);
    color: var(--text-primary);
}

/* ==================== 代码块复制按钮 ==================== */
.code-copy-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.code-copy-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 245, 255, 0.1);
}

.code-copy-btn.copied {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.1);
}

/* ==================== 图片灯箱 ==================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.lightbox.visible {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 0 60px rgba(0, 245, 255, 0.2);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.lightbox.visible img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    max-width: 80%;
}

/* 文章图片可点击光标 */
.article-content img {
    cursor: zoom-in;
}

/* ==================== 文章导航 ==================== */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-nav-item.next {
    text-align: right;
    align-items: flex-end;
}

.post-nav-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-nav-title {
    font-size: 16px;
    color: var(--accent-cyan);
    font-weight: 500;
    line-height: 1.5;
    transition: all var(--transition-fast);
}

.post-nav-title:hover {
    color: var(--accent-purple);
}

.post-nav-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ==================== 统计面板 ==================== */
.stats-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    z-index: 100;
    backdrop-filter: blur(10px);
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.stats-panel:hover {
    border-color: var(--border-hover);
}

.stat-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-info .value {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* ==================== 快捷键提示 ==================== */
.shortcuts-help {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    z-index: 20000;
    min-width: 400px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.shortcuts-help.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.shortcuts-help h3 {
    color: var(--accent-cyan);
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
}

.shortcuts-list {
    display: grid;
    gap: 12px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.shortcut-key {
    display: flex;
    gap: 4px;
}

.shortcut-key span {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-cyan);
}

.shortcut-desc {
    color: var(--text-secondary);
}

.shortcuts-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.shortcuts-close:hover {
    color: var(--accent-cyan);
}

.shortcuts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 19999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.shortcuts-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* 快捷键提示按钮 */
.shortcuts-btn {
    position: fixed;
    bottom: 20px;
    right: 90px;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    z-index: 100;
}

.shortcuts-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ==================== 庆祝动画 ==================== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 20001;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

.reading-complete-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 2px solid var(--accent-green);
    border-radius: var(--radius-lg);
    padding: 30px 50px;
    text-align: center;
    z-index: 20002;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.3);
    animation: complete-pop 0.5s ease;
}

@keyframes complete-pop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.reading-complete-toast .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.reading-complete-toast .text {
    font-size: 20px;
    color: var(--accent-green);
    font-weight: 600;
}

/* ==================== 链接预览卡片 ==================== */
.link-preview {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    z-index: 5000;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
}

.link-preview.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.link-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    line-height: 1.4;
}

.link-preview-url {
    font-size: 12px;
    color: var(--text-muted);
    word-break: break-all;
}

/* ==================== 懒加载占位 ==================== */
.img-placeholder {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

img.lazy {
    opacity: 0;
    transition: opacity var(--transition-normal);
}

img.lazy.loaded {
    opacity: 1;
}

/* ==================== 滚动章节标题 ==================== */
.section-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 10px 24px;
    font-size: 13px;
    color: var(--text-secondary);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.section-indicator.visible {
    opacity: 1;
    visibility: visible;
}

.section-indicator .current {
    color: var(--accent-cyan);
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 900px) {
    .stats-panel {
        left: 10px;
        right: 10px;
        bottom: 10px;
        justify-content: center;
    }

    .shortcuts-btn {
        display: none;
    }

    .post-navigation {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .post-nav-item.next {
        text-align: left;
        align-items: flex-start;
    }

    .shortcuts-help {
        min-width: auto;
        width: calc(100% - 40px);
        max-width: 400px;
    }
}
