/**
 * 侠梦网 - 主样式表
 * 极简风格 · 知识付费阅读网站
 * 主色：#1677ff（支持用户自定义主题色）
 * 字体：Inter、微软雅黑、PingFang SC
 * 设计理念：留白充足、阅读舒适、响应式适配
 */

/* CSS变量 - 主题色系统 */
:root {
    --primary: #1677ff;
    --primary-light: #e6f0ff;
    --primary-dark: #0958d9;
    --bg: #ffffff;
    --bg-gray: #f7f8fa;
    --bg-card: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --border: #e8e8e8;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --vip-gold: #d4a017;
    --vip-gold-light: #fff8e1;
    --success: #52c41a;
    --danger: #ff4d4f;
    --warning: #faad14;
    --font-family: 'Inter', '微软雅黑', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
    --content-width: 800px;
    --header-height: 64px;
}

/* 全局重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

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

/* =====================================================
 * 页头导航
 * ===================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo:hover {
    color: var(--primary-dark);
}

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

.nav a {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
    line-height: 1.5;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

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

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-vip {
    background: linear-gradient(135deg, #d4a017, #f0c040);
    color: #fff;
    font-weight: 600;
}

.btn-vip:hover {
    background: linear-gradient(135deg, #c49010, #e0b030);
    color: #fff;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #d9363e;
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #3fad17;
    color: #fff;
}

/* VIP标识 */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #d4a017, #f0c040);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.vip-badge-lg {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 12px;
}

/* =====================================================
 * 页面主体
 * ===================================================== */
.main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
}

.main-wide {
    max-width: 100%;
    padding: 32px;
}

/* =====================================================
 * 页脚
 * ===================================================== */
.footer {
    background: var(--bg-gray);
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer a {
    color: var(--text-light);
    font-size: 13px;
}

.footer a:hover {
    color: var(--primary);
}

.footer .icp {
    color: var(--text-light);
    font-size: 13px;
}

.footer .divider {
    color: var(--border);
}

/* =====================================================
 * 卡片组件
 * ===================================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 当子元素全屏时，禁用卡片hover效果，防止闪烁 */
.card:has(.md-editor-v2.fullscreen):hover,
.card:has(.fullscreen):hover {
    transform: none !important;
    box-shadow: var(--shadow) !important;
}

.card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--bg-gray);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.card-price.free {
    color: var(--success);
}

.card-price.vip {
    color: #f0c040;
}

.card-price.column {
    color: #1677ff;
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

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

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

/* =====================================================
 * 标签与徽章
 * ===================================================== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tag-free {
    background: #f0fff0;
    color: var(--success);
}

.tag-vip {
    background: var(--vip-gold-light);
    color: var(--vip-gold);
}

.tag-price {
    background: var(--primary-light);
    color: var(--primary);
}

.tag-column {
    background: #e6f4ff;
    color: #1677ff;
}

.tag-standalone {
    background: #fff0f0;
    color: #ff4d4f;
}

/* =====================================================
 * 表单样式
 * ===================================================== */
.form-group {
    margin-bottom: 20px;
}

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

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-input {
    flex: 1;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* =====================================================
 * 认证页面（登录/注册）
 * ===================================================== */
.auth-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 32px;
}

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

.auth-footer a {
    margin: 0 6px;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-light);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 12px;
}

.wx-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border: 1px solid #07c160;
    border-radius: var(--radius-sm);
    background: #07c160;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-family);
}

.wx-login-btn:hover {
    background: #06ad56;
    color: #fff;
}

/* =====================================================
 * 文章阅读区 - Markdown 渲染（专业级优化版）
 * 设计理念：优雅阅读 · 层次分明 · 细节精致
 * 参考：Medium、掘金、Notion 等顶级内容平台
 * ===================================================== */
.article-content {
    max-width: var(--content-width);
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.85;
    color: #2d3748;
    word-wrap: break-word;
    overflow-wrap: break-word;
    letter-spacing: 0.01em;
}

/* ---- 标题系统（精致层次）---- */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    position: relative;
    margin-top: 0;
    margin-bottom: 0.6em;
    font-weight: 700;
    line-height: 1.3;
    color: #1a202c;
    scroll-margin-top: calc(var(--header-height) + 16px);
}

.article-content > * + h1,
.article-content > * + h2,
.article-content > * + h3,
.article-content > * + h4 {
    margin-top: 1.8em;
}

.article-content h1 {
    font-size: 2em;
    letter-spacing: -0.03em;
    padding: 0.3em 0 0.5em;
    border-bottom: none;
    background: linear-gradient(135deg, #1a202c 30%, #1677ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.article-content h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #1677ff, rgba(22,119,255,0.3));
    border-radius: 2px;
}

.article-content h2 {
    font-size: 1.65em;
    letter-spacing: -0.02em;
    padding: 0.25em 0 0.35em 18px;
    margin-top: 2em;
    position: relative;
    border-bottom: 1px solid #e8ecf1;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 75%;
    background: linear-gradient(180deg, #1677ff 0%, #69b1ff 100%);
    border-radius: 3px;
}

.article-content h3 {
    font-size: 1.38em;
    letter-spacing: -0.01em;
    padding-left: 16px;
    margin-top: 1.7em;
    position: relative;
    color: #243047;
}

.article-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 4px;
    height: 0.9em;
    background: linear-gradient(180deg, #1677ff, #91caff);
    border-radius: 2px;
    opacity: 0.8;
}

.article-content h4 {
    font-size: 1.18em;
    color: #34495e;
    margin-top: 1.5em;
    display: inline-block;
    position: relative;
    padding-right: 12px;
}

.article-content h4::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: #1677ff;
    border-radius: 50%;
    opacity: 0.6;
}

.article-content h5 {
    font-size: 1.08em;
    color: #546e7a;
    font-weight: 600;
    margin-top: 1.3em;
}

.article-content h6 {
    font-size: 0.96em;
    color: #78909c;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-top: 1.2em;
    opacity: 0.85;
}

/* 标题锚点链接 */
.heading-anchor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    color: #cbd5e0;
    font-size: 0.72em;
    text-decoration: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
    font-weight: 400;
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.heading-anchor:hover {
    color: #1677ff;
    opacity: 1 !important;
    background: rgba(22,119,255,0.08);
}

.article-content h1:hover .heading-anchor,
.article-content h2:hover .heading-anchor,
.article-content h3:hover .heading-anchor,
.article-content h4:hover .heading-anchor {
    opacity: 0.7;
}

/* ---- 段落与文本排版 ---- */
.article-content p {
    margin-bottom: 1.4em;
    text-align: justify;
    text-justify: inter-ideograph;
    hyphens: auto;
}

.article-content p:last-child {
    margin-bottom: 0;
}

.article-content strong {
    font-weight: 650;
    color: #1a202c;
}

.article-content em {
    font-style: italic;
    color: #4a5568;
}

.article-content sup,
.article-content sub {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.article-content sup { top: -0.5em; }
.article-content sub { bottom: -0.25em; }

/* ---- 列表系统（精致样式）---- */
.article-content ul,
.article-content ol {
    margin: 1.4em 0;
    padding-left: 1.6em;
}

.article-content li {
    margin-bottom: 0.55em;
    line-height: 1.75;
    padding-left: 0.3em;
}

.article-content li:last-child {
    margin-bottom: 0;
}

.article-content ul > li {
    list-style-type: none;
    position: relative;
}

.article-content ul > li::before {
    content: '';
    position: absolute;
    left: -1.15em;
    top: 0.62em;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #1677ff, #4096ff);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
}

.article-content ol {
    counter-reset: list-counter;
}

.article-content ol > li {
    list-style: none;
    counter-increment: list-counter;
    position: relative;
}

.article-content ol > li::before {
    content: counter(list-counter);
    position: absolute;
    left: -1.6em;
    top: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #1677ff, #4096ff);
    color: white;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    line-height: 1;
}

/* 嵌套列表 */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin: 0.5em 0 0.3em;
    padding-left: 1.4em;
}

.article-content ul ul > li::before {
    width: 5px;
    height: 5px;
    background: #69b1ff;
    box-shadow: 0 0 0 2px rgba(105,177,255,0.15);
}

/* 任务列表 */
.article-content input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 8px;
    cursor: pointer;
    position: relative;
    top: 3px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.article-content input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #1677ff, #4096ff);
    border-color: #1677ff;
}

.article-content input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: bold;
}

/* ---- 引用块（优雅设计）---- */
.article-content blockquote {
    margin: 1.6em 0;
    padding: 20px 28px 20px 24px;
    border-left: 4px solid #1677ff;
    background: linear-gradient(135deg, #f8fafb 0%, #f0f5fa 100%);
    color: #4a5568;
    border-radius: 0 10px 10px 0;
    position: relative;
    overflow: hidden;
}

.article-content blockquote::before {
    content: '"';
    position: absolute;
    top: -2px;
    left: 14px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 4em;
    line-height: 1;
    color: #1677ff;
    opacity: 0.08;
    pointer-events: none;
}

.article-content blockquote::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #1677ff, #91caff, #1677ff);
    border-radius: 4px 0 0 4px;
}

.article-content blockquote p {
    margin-bottom: 0.8em;
    position: relative;
    z-index: 1;
}

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

.article-content blockquote strong {
    color: #2d3748;
}

/* ---- 代码块（GitHub Dark 专业级风格）---- */
.article-content pre {
    margin: 0;
    padding: 22px 20px 22px 60px;
    background: linear-gradient(145deg, #0d1117 0%, #161b22 50%, #1c2333 100%);
    color: #c9d1d9;
    border-radius: 0 0 12px 12px;
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.8;
    tab-size: 4;
}

.article-content .code-line {
    display: block;
    position: relative;
    min-height: 1.8em;
    padding: 0 10px;
    transition: background-color 0.15s ease, border-left-color 0.15s ease;
    border-left: 2px solid transparent;
}

.article-content .code-line:hover {
    background: rgba(56,139,253,0.08);
    border-left-color: rgba(56,139,253,0.4);
}

.article-content .line-num {
    position: absolute;
    left: -52px;
    width: 44px;
    text-align: right;
    padding-right: 14px;
    color: #484f58;
    font-size: 12px;
    user-select: none;
    line-height: 1.8;
}

.article-content .code-block {
    position: relative;
    margin: 2em 0;
    border-radius: 12px;
    background: linear-gradient(145deg, #0d1117 0%, #161b22 100%);
    border: 1px solid rgba(240,246,252,0.1);
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 1px 0 rgba(255,255,255,0.05) inset;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.article-content .code-block:hover {
    box-shadow:
        0 12px 40px rgba(0,0,0,0.4),
        0 0 0 1px rgba(56,139,253,0.2) inset,
        0 1px 0 rgba(255,255,255,0.06) inset;
    transform: translateY(-2px);
}

.article-content .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(33,38,45,0.95) 0%, rgba(22,27,34,0.9) 100%);
    border-bottom: 1px solid rgba(240,246,252,0.08);
}

.article-content .code-lang {
    font-size: 11.5px;
    font-weight: 600;
    color: #8b949e;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 16px;
    border-left: 1px solid rgba(240,246,252,0.1);
}

.article-content .code-lang::before {
    content: '● ● ●';
    letter-spacing: 6px;
    font-size: 9px;
    opacity: 0.65;
}

.article-content .code-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(240,246,252,0.06);
    color: #8b949e;
    border: 1px solid rgba(240,246,252,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-family);
}

.article-content .code-copy-btn:hover {
    color: #f0f6fc;
    background: rgba(56,139,253,0.15);
    border-color: rgba(56,139,253,0.3);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(56,139,253,0.15);
}

.article-content .code-copy-btn.copied {
    color: #3fb950;
    background: rgba(63,185,80,0.12);
    border-color: rgba(63,185,80,0.3);
}

.article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    font-size: 0.88em;
}

.article-content :not(pre) > code {
    background: linear-gradient(135deg, #fef3f2 0%, #fee2e2 100%);
    padding: 3px 8px;
    border-radius: 6px;
    color: #dc2626;
    font-size: 0.87em;
    border: 1px solid #fecaca;
    box-shadow: 0 1px 3px rgba(220,38,38,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
    word-break: break-word;
}

/* ---- 表格（专业级设计）---- */
.article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.8em 0;
    font-size: 14.5px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(0,0,0,0.06),
        0 0 0 1px rgba(226,232,240,0.8);
    transition: box-shadow 0.25s ease;
}

.article-content table:hover {
    box-shadow:
        0 6px 24px rgba(0,0,0,0.09),
        0 0 0 1px rgba(22,119,255,0.15);
}

.article-content th,
.article-content td {
    border: none;
    padding: 14px 18px;
    text-align: left;
}

.article-content th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 650;
    color: #1e293b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.article-content th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.article-content td {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

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

.article-content tr:nth-child(even) td {
    background: #fafbfc;
}

.article-content tr:hover td {
    background: linear-gradient(90deg, rgba(22,119,255,0.04) 0%, rgba(22,119,255,0.08) 100%);
}

/* ---- 图片（精致展示）---- */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em auto 1.5em;
    display: block;
    box-shadow:
        0 8px 24px rgba(0,0,0,0.12),
        0 2px 8px rgba(0,0,0,0.06),
        0 0 0 1px rgba(0,0,0,0.04);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}

.article-content img:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow:
        0 16px 40px rgba(0,0,0,0.16),
        0 4px 12px rgba(0,0,0,0.08),
        0 0 0 1px rgba(22,119,255,0.1);
}

/* ---- 链接（精致交互）---- */
.article-content a {
    color: #1677ff;
    text-decoration: none;
    position: relative;
    font-weight: 500;
    transition: color 0.2s ease;
    text-decoration-skip-ink: auto;
}

.article-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1677ff, #69b1ff);
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.article-content a:hover {
    color: #0958d9;
}

.article-content a:hover::after {
    left: 0;
    transform: translateX(0);
    width: 100%;
}

/* 外部链接图标 */
.article-content a[target="_blank"]::before {
    content: '↗';
    font-size: 0.8em;
    margin-right: 3px;
    opacity: 0.6;
}

/* ---- 分隔线 ---- */
.article-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 2.5em 0;
}

/* LaTeX公式样式 */
.article-content .katex-display {
    margin: 1.2em 0;
    overflow-x: auto;
    padding: 12px 16px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e8ecf1;
}

/* ---- 细节动效与微交互 ---- */

/* 文字选中效果 */
.article-content ::selection {
    background: rgba(22,119,255,0.2);
    color: inherit;
}

.article-content ::-moz-selection {
    background: rgba(22,119,255,0.2);
    color: inherit;
}

/* 滚动条美化 */
.article-content::-webkit-scrollbar,
.article-content pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.article-content::-webkit-scrollbar-track,
.article-content pre::-webkit-scrollbar-track {
    background: transparent;
}

.article-content::-webkit-scrollbar-thumb {
    background: rgba(22,119,255,0.25);
    border-radius: 4px;
}

.article-content::-webkit-scrollbar-thumb:hover {
    background: rgba(22,119,255,0.4);
}

.article-content pre::-webkit-scrollbar-thumb {
    background: rgba(139,148,158,0.3);
    border-radius: 4px;
}

.article-content pre::-webkit-scrollbar-thumb:hover {
    background: rgba(139,148,158,0.5);
}

/* 平滑滚动（仅在PC端启用，移动端禁用以避免回弹问题） */
@media (min-width: 769px) {
    .article-content {
        scroll-behavior: smooth;
    }
}

/* 移动端禁用平滑滚动 */
@media (max-width: 768px) {
    .article-content {
        scroll-behavior: auto;
    }
}

/* 文章目录 */
/* =====================================================
 * 文章目录（Table of Contents）- 重构版 v2.0
 * 设计理念：简约优雅 · 层级清晰 · 响应式友好 · 渐进增强
 * 特性：
 *   - PC端（>1024px）：右侧sticky悬浮目录
 *   - 平板端（768px-1024px）：右侧窄版悬浮目录
 *   - 移动端（≤768px）：内容区顶部可折叠面板
 *   - 无标题时自动隐藏
 *   - 滚动时自动高亮当前章节
 * ===================================================== */

/* 目录容器基础样式 */
.toc {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 13.5px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.toc.hidden {
    display: none !important;
}

/* 目录标题 */
.toc-title {
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    cursor: default;
    user-select: none;
}

.toc-title .toc-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.toc-title .toc-toggle {
    display: none;
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    padding: 4px;
    cursor: pointer;
}

.toc-title .toc-toggle:hover {
    color: var(--primary);
}

/* 目录内容区域 */
.toc-content {
    display: block;
}

.toc-content.empty {
    display: none;
}

/* 目录链接项 */
.toc a {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 6px;
    position: relative;
    line-height: 1.5;
    border-left: 3px solid transparent;
    margin-left: 4px;
}

.toc a:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary);
    transform: translateX(2px);
    text-decoration: none;
}

.toc a.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 500;
    border-left-color: var(--primary);
}

/* 多级缩进 */
.toc .toc-h1 {
    padding-left: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-top: 8px;
    margin-bottom: 4px;
}

.toc .toc-h2 {
    padding-left: 20px;
    font-size: 13.5px;
}

.toc .toc-h3 {
    padding-left: 36px;
    font-size: 13px;
    opacity: 0.85;
}

/* 目录滚动条美化 */
.toc::-webkit-scrollbar {
    width: 5px;
}

.toc::-webkit-scrollbar-track {
    background: transparent;
}

.toc::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.toc::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* 上一篇/下一篇导航 */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.article-nav-item {
    flex: 1;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.article-nav-item:hover {
    background: var(--primary-light);
}

.article-nav-item .label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.article-nav-item .title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.article-nav-item.next {
    text-align: right;
}

/* =====================================================
 * 分享按钮
 * ===================================================== */
.share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.share-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

.share-btn-wechat {
    color: #07c160;
}

.share-btn-wechat:hover {
    border-color: #07c160;
    background: #f0fff0;
}

.share-btn-copy:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* =====================================================
 * 笔记与划重点
 * ===================================================== */
.highlight-text {
    background: #fff3cd;
    padding: 1px 4px;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.note-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    padding: 12px;
    min-width: 240px;
    z-index: 50;
    font-size: 13px;
}

.note-input-area {
    margin: 16px 0;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
}

.note-input-area textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 14px;
    font-family: var(--font-family);
    resize: vertical;
}

.note-char-count {
    font-size: 12px;
    color: var(--text-light);
    text-align: right;
    margin-top: 4px;
}

.note-char-count.over {
    color: var(--danger);
}

/* =====================================================
 * VIP页面
 * ===================================================== */
.vip-hero {
    text-align: center;
    padding: 60px 24px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.vip-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.vip-hero .vip-price-display {
    font-size: 48px;
    font-weight: 700;
    color: #f0c040;
    margin: 20px 0;
}

.vip-hero .vip-price-display small {
    font-size: 20px;
    font-weight: 400;
}

.vip-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.vip-feature {
    padding: 24px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    text-align: center;
}

.vip-feature .icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.vip-feature h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.vip-feature p {
    font-size: 13px;
    opacity: 0.8;
}

/* =====================================================
 * 打卡日历
 * ===================================================== */
.checkin-calendar {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    color: var(--text-secondary);
}

.calendar-cell.header {
    font-weight: 600;
    color: var(--text-light);
    font-size: 12px;
}

.calendar-cell.checked {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.calendar-cell.today {
    border: 2px solid var(--primary);
    font-weight: 600;
}

/* =====================================================
 * 用户中心
 * ===================================================== */
.user-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

.user-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 12px;
}

.user-name {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-vip-status {
    text-align: center;
    margin-bottom: 20px;
}

.user-menu {
    list-style: none;
}

.user-menu li {
    margin-bottom: 4px;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
}

.user-menu a:hover,
.user-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.user-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

/* =====================================================
 * 后台管理
 * ===================================================== */
.admin-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    min-height: calc(100vh - var(--header-height));
}

.admin-sidebar {
    background: #1a1a2e;
    padding: 20px 0;
}

.admin-sidebar .logo {
    color: #fff;
    padding: 0 20px;
    margin-bottom: 24px;
    font-size: 18px;
}

.admin-menu {
    list-style: none;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: all 0.2s;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.admin-content {
    padding: 24px;
    background: var(--bg-gray);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-title {
    font-size: 20px;
    font-weight: 600;
}

.admin-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.admin-table tr:hover td {
    background: var(--bg-gray);
}

/* =====================================================
 * 搜索框
 * ===================================================== */
.search-box {
    position: relative;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* =====================================================
 * 分类筛选
 * ===================================================== */
.category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.category-tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-gray);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: var(--font-family);
}

.category-tab:hover,
.category-tab.active {
    background: var(--primary);
    color: #fff;
}

/* =====================================================
 * 面包屑
 * ===================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .sep {
    color: var(--border);
}

/* =====================================================
 * 消息提示
 * ===================================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-success {
    background: #f0fff0;
    color: var(--success);
    border: 1px solid #b7eb8f;
}

.alert-danger {
    background: #fff2f0;
    color: var(--danger);
    border: 1px solid #ffccc7;
}

.alert-warning {
    background: #fffbe6;
    color: var(--warning);
    border: 1px solid #ffe58f;
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #91caff;
}

/* =====================================================
 * 分页
 * ===================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =====================================================
 * 空状态
 * ===================================================== */
.empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-light);
}

.empty .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

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

/* =====================================================
 * 模态框
 * ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    font-size: 20px;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--bg-gray);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* =====================================================
 * 主题色选择器
 * ===================================================== */
.theme-colors {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-color-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
}

.theme-color-item:hover {
    transform: scale(1.1);
}

.theme-color-item.active {
    border-color: var(--text);
}

/* =====================================================
 * 代金券
 * ===================================================== */
.coupon-card {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 12px;
}

.coupon-money {
    padding: 20px 24px;
    background: var(--primary);
    color: #fff;
    text-align: center;
    min-width: 100px;
}

.coupon-money .amount {
    font-size: 28px;
    font-weight: 700;
}

.coupon-money .unit {
    font-size: 13px;
}

.coupon-info {
    padding: 16px 20px;
    flex: 1;
}

.coupon-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.coupon-status {
    font-size: 12px;
    color: var(--text-light);
}

.coupon-card.used {
    opacity: 0.5;
}

.coupon-card.used .coupon-money {
    background: var(--text-light);
}

/* =====================================================
 * 响应式适配
 * ===================================================== */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 16px;
    }

    .nav {
        gap: 16px;
    }

    .nav a {
        font-size: 14px;
    }

    .main {
        padding: 20px 16px;
    }

    /* 文章页面响应式优化 */
    .breadcrumb {
        font-size: 13px;
        margin-bottom: 16px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .breadcrumb .sep {
        margin: 0 2px;
    }

    .article-header {
        margin-bottom: 24px;
    }

    .article-header h1 {
        font-size: 22px;
        line-height: 1.35;
        margin-bottom: 10px;
        word-break: break-word;
    }

    .article-header .meta {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 13px;
    }

    .share-bar {
        justify-content: center;
        margin: 20px 0;
        gap: 10px;
    }

    .share-btn {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .preview-login-tip {
        padding: 32px 20px;
        margin-top: -80px;
    }

    .preview-login-tip p {
        font-size: 15px;
        margin-bottom: 16px;
    }

    /* VIP功能区域响应式 */
    .note-input-area {
        padding: 0 4px;
    }

    .note-input-area h3 {
        font-size: 15px !important;
        margin-bottom: 10px !important;
    }

    .note-textarea {
        min-height: 100px;
        font-size: 14px;
        padding: 12px;
    }

    .note-char-count {
        font-size: 12px;
    }

    /* 文字高亮功能区域 */
    .mt-24[style*="padding"] {
        padding: 12px !important;
        margin-top: 16px !important;
    }

    .mt-24[style*="padding"] h3 {
        font-size: 15px !important;
        margin-bottom: 6px !important;
    }

    .mt-24[style*="padding"] p {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }

    /* 笔记列表 */
    .mt-24:not([style]) {
        margin-top: 16px !important;
    }

    .mt-24:not([style]) h3 {
        font-size: 15px !important;
        margin-bottom: 10px !important;
    }

    .mt-24:not([style]) > div[style] {
        padding: 10px !important;
        margin-bottom: 6px !important;
        border-radius: 6px !important;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .user-layout {
        grid-template-columns: 1fr;
    }

    .user-sidebar {
        position: static;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }

    .auth-box {
        padding: 24px;
    }

    .vip-hero h1 {
        font-size: 24px;
    }

    .vip-hero .vip-price-display {
        font-size: 36px;
    }

    .article-nav {
        flex-direction: column;
    }

    .article-nav-item.next {
        text-align: left;
    }

    .form-row {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    /* 移动端：目录改为顶部可折叠面板 */
    .toc {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 20px;
        padding: 0;
        border-radius: var(--radius);
        overflow: hidden;
    }

    .toc-title {
        cursor: pointer;
        user-select: none;
        padding: 14px 16px;
        margin-bottom: 0;
        border-bottom: none;
        background: var(--bg-gray);
        border-radius: var(--radius);
        transition: background 0.2s;
    }

    .toc-title:hover {
        background: #e8e8e8;
    }

    .toc-title .toc-toggle {
        display: inline-block;
    }

    .toc.collapsed .toc-toggle {
        transform: rotate(-90deg);
    }

    .toc-content {
        max-height: 400px;
        overflow-y: auto;
        padding: 12px 16px;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease,
                    padding 0.3s ease;
        opacity: 1;
        border-top: 1px solid var(--border);
        background: var(--bg-card);
    }

    .toc.collapsed .toc-content {
        max-height: 0;
        opacity: 0;
        padding: 0 16px;
        border-top: none;
        overflow: hidden;
    }

    .toc.collapsed {
        border-radius: var(--radius);
    }

    .modal {
        max-width: 100%;
    }

    .vip-features {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 文章页面平板端优化 */
    .article-layout {
        grid-template-columns: 1fr 180px;
        gap: 24px;
    }

    .article-header h1 {
        font-size: 26px;
    }

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

    .toc {
        max-height: calc(100vh - 120px);
        padding: 14px;
        font-size: 12.5px;
    }

    .share-bar {
        gap: 10px;
    }

    .preview-login-tip {
        padding: 36px 28px;
    }
}

/* =====================================================
 * 工具类
 * ===================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-light { color: var(--text-light); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-vip { color: var(--vip-gold); }
.font-bold { font-weight: 600; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.hidden { display: none; }
.w-full { width: 100%; }

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav.show {
        display: flex;
    }

    .nav a {
        padding: 10px 0;
    }
}

/* Markdown编辑器样式 */
.md-editor {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.md-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px;
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
}

.md-editor-toolbar button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.md-editor-toolbar button:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.md-editor-body {
    display: flex;
    min-height: 400px;
}

.md-editor-input {
    flex: 1;
    border: none;
    padding: 16px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    color: var(--text);
}

.md-editor-preview {
    flex: 1;
    padding: 16px;
    border-left: 1px solid var(--border);
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.7;
}

/* =====================================================
 * Markdown 响应式优化（全面适配）
 * ===================================================== */
@media screen and (max-width: 768px) {
    .article-content {
        font-size: 15.5px;
        line-height: 1.8;
        padding: 0 8px;
    }

    /* 标题自适应 */
    .article-content h1 {
        font-size: 1.65em;
        letter-spacing: -0.02em;
    }

    .article-content h2 {
        font-size: 1.45em;
        padding-left: 14px;
        margin-top: 1.6em;
    }

    .article-content h3 {
        font-size: 1.25em;
        padding-left: 12px;
        margin-top: 1.5em;
    }

    .article-content h4 { font-size: 1.12em; }
    .article-content h5 { font-size: 1.05em; }
    .article-content h6 { font-size: 0.95em; }

    /* 代码块移动端优化 */
    .article-content pre {
        padding: 16px 14px 16px 48px;
        font-size: 12.5px;
        line-height: 1.7;
        border-radius: 0 0 8px 8px;
    }

    .article-content .line-num {
        left: -42px;
        width: 36px;
        font-size: 11px;
        padding-right: 10px;
    }

    .article-content .code-block {
        margin: 1.6em 0;
        border-radius: 8px;
    }

    .article-content .code-block:hover {
        transform: none;
    }

    .article-content .code-header {
        padding: 10px 14px;
    }

    .article-content .code-lang {
        font-size: 10.5px;
    }

    /* 引用块 */
    .article-content blockquote {
        padding: 16px 18px 16px 14px;
        margin: 1.3em 0;
        border-radius: 0 8px 8px 0;
    }

    /* 表格横向滚动 */
    .article-content table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    .article-content th,
    .article-content td {
        padding: 10px 12px;
        white-space: nowrap;
    }

    /* 图片优化 */
    .article-content img {
        border-radius: 10px;
        margin: 1.5em auto 1.2em;
    }

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

    /* 列表 */
    .article-content ul,
    .article-content ol {
        padding-left: 1.4em;
        margin: 1.2em 0;
    }

    /* 隐藏非必要元素 */
    .heading-anchor {
        display: none !important;
    }

    /* 小屏幕：目录折叠面板优化 */
    .toc {
        position: relative;
        top: 0;
        max-height: none;
    }

    .toc-content {
        max-height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .article-content {
        font-size: 15px;
        line-height: 1.75;
        padding: 0 4px;
    }

    .article-content h1 { font-size: 1.55em; }
    .article-content h2 { font-size: 1.38em; padding-left: 12px; }
    .article-content h3 { font-size: 1.2em; padding-left: 10px; }
    .article-content h4 { font-size: 1.08em; }

    .article-content pre {
        padding: 14px 12px 14px 44px;
        font-size: 12px;
    }

    .article-content .line-num {
        left: -38px;
        width: 32px;
        font-size: 10.5px;
    }

    .article-content ul,
    .article-content ol {
        padding-left: 1.3em;
    }

    .article-content blockquote {
        padding: 14px 16px 14px 12px;
        border-radius: 0 6px 6px 0;
    }

    .article-content table th,
    .article-content table td {
        padding: 8px 10px;
        font-size: 12.5px;
    }

    .article-content code,
    .article-content :not(pre) > code {
        font-size: 0.84em;
    }

    /* 小屏幕文章页面额外优化 */
    .main {
        padding: 16px 12px;
    }

    .breadcrumb {
        font-size: 12px;
        margin-bottom: 12px;
        gap: 2px;
    }

    .article-header {
        margin-bottom: 20px;
    }

    .article-header h1 {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .article-header .meta {
        font-size: 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .share-bar {
        justify-content: center;
        margin: 16px 0;
        gap: 8px;
    }

    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .preview-login-tip {
        padding: 28px 16px;
        margin-top: -60px;
    }

    .preview-login-tip p {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .btn-lg {
        padding: 10px 24px;
        font-size: 15px;
    }

    /* VIP功能区域小屏优化 */
    .note-input-area h3 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .note-textarea {
        min-height: 80px;
        font-size: 13px;
        padding: 10px;
    }

    .note-char-count {
        font-size: 11px;
    }

    .mt-24[style*="padding"] {
        padding: 10px !important;
        margin-top: 12px !important;
    }

    .mt-24[style*="padding"] h3 {
        font-size: 14px !important;
    }

    .mt-24[style*="padding"] p {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }

    .mt-24:not([style]) {
        margin-top: 12px !important;
    }

    .mt-24:not([style]) h3 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .mt-24:not([style]) > div[style] {
        padding: 8px !important;
        margin-bottom: 4px !important;
        border-radius: 4px !important;
    }

    .mt-24:not([style]) > div[style] div[style*="font-size"] {
        font-size: 12px !important;
    }

    .mt-24:not([style]) > div[style] div:last-child {
        font-size: 11px !important;
        margin-top: 2px !important;
    }
}

/* =====================================================
 * 打印友好样式
 * ===================================================== */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        font-family: 'Times New Roman', SimSun, serif !important;
        line-height: 1.6 !important;
    }

    .header, .footer, .share-bar, .toc, .note-input-area,
    .article-nav, .btn, .nav, .mobile-menu-btn,
    .preview-login-tip, .article-nav-item {
        display: none !important;
    }

    .main {
        max-width: 100% !important;
        padding: 20px !important;
        margin: 0 !important;
    }

    .article-content {
        max-width: 100% !important;
        font-size: 12pt !important;
        line-height: 1.6 !important;
        color: #000 !important;
    }

    .article-content h1 {
        font-size: 18pt !important;
        color: #000 !important;
        background: none !important;
        -webkit-text-fill-color: #000 !important;
        border-bottom: 1px solid #333 !important;
        page-break-after: avoid;
    }

    .article-content h2 {
        font-size: 16pt !important;
        color: #000 !important;
        page-break-after: avoid;
    }

    .article-content h3 {
        font-size: 14pt !important;
        color: #000 !important;
        background: none !important;
        border-left: 2px solid #666 !important;
        page-break-after: avoid;
    }

    .article-content h4, .article-content h5, .article-content h6 {
        color: #000 !important;
        page-break-after: avoid;
    }

    .article-content p {
        text-align: justify !important;
        orphans: 3;
        widows: 3;
    }

    .article-content a {
        color: #000 !important;
        text-decoration: underline !important;
    }

    .article-content a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }

    .article-content img {
        max-width: 80% !important;
        height: auto !important;
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .article-content blockquote {
        background: #f5f5f5 !important;
        border-left: 3px solid #666 !important;
        page-break-inside: avoid;
    }

    .article-content pre {
        background: #f5f5f5 !important;
        color: #000 !important;
        border: 1px solid #ddd !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        font-size: 10pt !important;
        page-break-inside: avoid;
    }

    .article-content :not(pre) > code {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #ddd !important;
    }

    .article-content table {
        font-size: 11pt !important;
        page-break-inside: avoid;
    }

    .article-content th,
    .article-content td {
        border: 1px solid #333 !important;
        padding: 8px !important;
    }

    .article-content hr {
        border-top: 1px solid #999 !important;
        background: none !important;
    }

    @page {
        margin: 2cm;
        size: A4;
    }
}

/* =====================================================
 * 触摸优化与移动端交互增强
 * ===================================================== */
@media (max-width: 768px) {
    /* 触摸友好的按钮尺寸 */
    .btn {
        min-height: 44px;
        padding: 10px 18px;
    }

    .btn-sm {
        min-height: 36px;
        padding: 6px 14px;
    }

    /* 链接和可点击元素增加触摸区域 */
    .article-nav-item {
        padding: 14px;
        min-height: 48px;
    }

    /* 表单输入框优化 */
    .form-input,
    textarea,
    select {
        font-size: 16px;
        min-height: 44px;
    }

    /* 图片响应式优化 */
    .article-content img {
        max-width: 100%;
        height: auto;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    /* 防止内容溢出 */
    .article-content,
    .article-layout > div:first-child {
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* 标签样式优化 */
    .tag {
        font-size: 11px;
        padding: 2px 8px;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .article-header h1 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .preview-login-tip {
        padding: 24px 20px;
        margin-top: -60px;
    }

    .toc {
        max-height: calc(100vh - 80px);
    }
}

/* =====================================================
 * 首页 Hero 区域
 * ===================================================== */
.hero-section {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(22, 119, 255, 0.3) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(22, 119, 255, 0.15) 0%, transparent 50%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.05) 1px, transparent 1px),
                      radial-gradient(circle at 75% 75%, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 56px 32px 36px;
    z-index: 1;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #91caff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 28px;
    line-height: 1.6;
}

.hero-search {
    position: relative;
    max-width: 520px;
    margin: 0 auto 24px;
}

.hero-search input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: none;
    border-radius: 28px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    color: #fff;
    outline: none;
    transition: all 0.3s;
    font-family: var(--font-family);
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hero-search input:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.3), 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-search .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

.hero-vip-btn,
.hero-vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border-radius: 28px;
    font-size: 15px;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.4); }
    50% { box-shadow: 0 0 20px 8px rgba(212, 160, 23, 0.15); }
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px 32px;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hero-stat-num {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-stat-label {
    font-size: 12px;
    opacity: 0.7;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
}

/* =====================================================
 * 首页章节标题
 * ===================================================== */
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    color: var(--text);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 36px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
}

/* =====================================================
 * 专栏卡片增强样式
 * ===================================================== */
.card-column {
    position: relative;
}

.card-cover-wrap {
    position: relative;
    overflow: hidden;
}

.card-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.35) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-column:hover .card-cover-overlay {
    opacity: 1;
}

.card-cover-placeholder {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, #e6f0ff, #f0f5ff);
    color: var(--primary);
    opacity: 0.6;
}

.card-column .card-cover {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-column:hover .card-cover {
    transform: scale(1.06);
}

/* =====================================================
 * 网格动画（卡片依次入场）
 * ===================================================== */
.column-grid > *,
.article-grid > * {
    opacity: 0;
    transform: translateY(24px);
    animation: cardFadeIn 0.5s ease forwards;
}

.column-grid > *:nth-child(1) { animation-delay: 0.05s; }
.column-grid > *:nth-child(2) { animation-delay: 0.1s; }
.column-grid > *:nth-child(3) { animation-delay: 0.15s; }
.column-grid > *:nth-child(4) { animation-delay: 0.2s; }
.column-grid > *:nth-child(5) { animation-delay: 0.25s; }
.column-grid > *:nth-child(6) { animation-delay: 0.3s; }
.column-grid > *:nth-child(7) { animation-delay: 0.35s; }
.column-grid > *:nth-child(8) { animation-delay: 0.4s; }
.column-grid > *:nth-child(9) { animation-delay: 0.45s; }

.article-grid > *:nth-child(1) { animation-delay: 0.05s; }
.article-grid > *:nth-child(2) { animation-delay: 0.1s; }
.article-grid > *:nth-child(3) { animation-delay: 0.15s; }
.article-grid > *:nth-child(4) { animation-delay: 0.2s; }
.article-grid > *:nth-child(5) { animation-delay: 0.25s; }
.article-grid > *:nth-child(6) { animation-delay: 0.3s; }
.article-grid > *:nth-child(7) { animation-delay: 0.35s; }
.article-grid > *:nth-child(8) { animation-delay: 0.4s; }
.article-grid > *:nth-child(9) { animation-delay: 0.45s; }
.article-grid > *:nth-child(10) { animation-delay: 0.5s; }

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
 * 滚动显示动画
 * ===================================================== */
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
}

.animate-fade-up:nth-of-type(1) { animation-delay: 0.1s; }
.animate-fade-up:nth-of-type(2) { animation-delay: 0.2s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
 * 分类标签增强效果
 * ===================================================== */
.category-tab {
    position: relative;
    overflow: hidden;
}

.category-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.category-tab:hover::before,
.category-tab.active::before {
    opacity: 1;
}

.category-tab {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.25);
}

.category-tab.active {
    box-shadow: 0 4px 16px rgba(22, 119, 255, 0.35);
}

/* =====================================================
 * Hero 响应式适配
 * ===================================================== */
@media (max-width: 768px) {
    .hero-section {
        border-radius: 0;
        margin-left: -24px;
        margin-right: -24px;
        width: calc(100% + 48px);
    }

    .hero-content {
        padding: 40px 24px 28px;
    }

    .hero-title {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .hero-search {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .hero-search input {
        padding: 12px 16px 12px 42px;
        font-size: 14px;
    }

    .hero-vip-btn,
    .hero-vip-badge {
        padding: 8px 20px;
        font-size: 13px;
    }

    .hero-stats {
        gap: 16px;
        padding: 16px 20px;
    }

    .hero-stat-num {
        font-size: 20px;
    }

    .hero-stat-divider {
        height: 28px;
    }

    .column-grid > *,
    .article-grid > * {
        animation-delay: 0s !important;
        animation-duration: 0.3s;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .article-content {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .share-btn,
    .btn {
        border-width: 0.5px;
    }
}

.md-editor.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    border-radius: 0;
}

.md-editor.fullscreen .md-editor-body {
    height: calc(100vh - 48px);
}

/* 支付弹窗 */
.pay-qr {
    text-align: center;
    padding: 24px;
}

.pay-qr .qr-img {
    width: 200px;
    height: 200px;
    margin: 16px auto;
    border: 1px solid var(--border);
}

.pay-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

/* 专栏目录 */
.column-toc {
    list-style: none;
}

.column-toc li {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.column-toc li:last-child {
    border-bottom: none;
}

.column-toc .article-title {
    font-size: 15px;
    color: var(--text);
}

.column-toc .article-title:hover {
    color: var(--primary);
}

.column-toc .article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
}

/* 专栏详情头部 */
.column-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.column-cover {
    width: 200px;
    height: 150px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-gray);
    flex-shrink: 0;
}

.column-info {
    flex: 1;
}

.column-info h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.column-info .intro {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.column-info .meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .column-header {
        flex-direction: column;
    }

    .column-cover {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}

/* 文章详情头部 */
.article-header {
    margin-bottom: 32px;
}

.article-header h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.article-header .meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-light);
}

/* 文章布局（带目录） */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 32px;
    max-width: var(--max-width);
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    /* 移动端/平板：目录置顶显示 */
    .article-layout #tocContainer {
        order: -1;
    }
}

/* 预览遮罩 */
.preview-mask {
    position: relative;
}

.preview-mask::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(transparent, var(--bg));
    pointer-events: none;
}

.preview-login-tip {
    text-align: center;
    padding: 40px 24px;
    margin-top: -100px;
    position: relative;
    z-index: 1;
}

/* 选择框样式 */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
