:root {
    --bg-deep: #080918;
    --bg-card: rgba(18, 20, 40, 0.75);
    --bg-card-hover: rgba(25, 28, 55, 0.88);
    --text-primary: #e8e6f0;
    --text-secondary: #b8b5cc;
    --text-muted: #8a87a0;
    --accent-1: #a855f7;
    --accent-2: #ec4899;
    --accent-3: #06b6d4;
    --accent-4: #f59e0b;
    --gradient-1: linear-gradient(135deg, #a855f7, #6366f1, #3b82f6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-strong: rgba(255, 255, 255, 0.15);
    --glow-purple: 0 0 30px rgba(168, 85, 247, 0.3);
    --glow-pink: 0 0 30px rgba(236, 72, 153, 0.3);
    --glow-cyan: 0 0 30px rgba(6, 182, 212, 0.3);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --font-body: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse at 15% 10%, rgba(168, 85, 247, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 20%, rgba(236, 72, 153, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 40% 70%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 45%);
    background-attachment: fixed;
}

.container { max-width: 1320px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* 导航栏 */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(10, 11, 26, 0.82);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: #fff; flex-shrink: 0; }
.logo-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--gradient-1); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: var(--glow-purple); position: relative; }
.logo-icon::before { content: "⭐"; }
.main-nav { display: flex; align-items: center; gap: 10px; list-style: none; }
.main-nav a { padding: 8px 18px; border-radius: 30px; text-decoration: none; color: var(--text-secondary); font-weight: 600; font-size: 0.95rem; transition: var(--transition-fast); }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255, 255, 255, 0.06); }
.main-nav a.active { background: rgba(168, 85, 247, 0.2); color: #c084fc; box-shadow: 0 0 20px rgba(168, 85, 247, 0.15); }
.mobile-menu-btn {
    display: none; background: none; border: 1px solid rgba(168,85,247,0.4);
    color: var(--accent-1); font-size: 1.6rem; padding: 6px 12px; border-radius: 8px;
    cursor: pointer; transition: var(--transition-fast); margin-left: auto;
}
.mobile-menu-btn:hover { background: rgba(168,85,247,0.15); box-shadow: var(--glow-purple); }

/* 面包屑 */
.breadcrumb { padding: 14px 0; font-size: 0.85rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; white-space: normal; word-break: break-word; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.breadcrumb a:hover { color: #c084fc; }
.breadcrumb .current { color: #c084fc; font-weight: 600; white-space: normal; word-break: break-word; }

/* ====== 全宽文章主体 ====== */
.article-main {
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border); padding: 30px 28px;
    backdrop-filter: blur(10px); box-shadow: var(--shadow-card);
    min-width: 0; max-width: 100%;
    margin-bottom: 24px; position: relative;
}
.article-main::before { content: ''; position: absolute; top:0; left:0; right:0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent-1), transparent); opacity: 0.6; }

/* ====== 文章头部：左缩略图 220×110 + 右标题与参数 ====== */
.article-header { margin-bottom: 8px; }
.article-header-inner {
    display: flex;
    align-items: center; /* 垂直居中对齐 */
    gap: 20px;
}

/* 文章头部缩略图 */
.article-thumb {
    position: relative;
    width: 220px;
    height: 110px;
    flex: 0 0 220px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: var(--gradient-1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 18px rgba(168, 85, 247, 0.15);
}
.article-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.article-thumb img.img-error { display: none; }
.article-thumb .thumb-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    opacity: 0.85;
}
.article-thumb:hover img { transform: scale(1.06); }

/* 右侧文字区 */
.article-header-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* 文章头部 */
.article-header h1 {
    font-family: var(--font-heading); font-size: 1.9rem; font-weight: 900; line-height: 1.35;
    margin-bottom: 12px; color: var(--accent-1); text-shadow: 0 0 15px rgba(168,85,247,0.4);
    word-break: break-word;
}
.article-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 0.85rem; color: var(--text-muted); padding-bottom: 16px; border-bottom: 1px solid var(--glass-border); }
.article-meta span { display: flex; align-items: center; gap: 4px; }
.meta-date::before { content: "📅"; font-size: 0.85rem; }
.meta-views::before { content: "👁"; font-size: 0.85rem; }
.meta-author::before { content: "✍️"; font-size: 0.85rem; }

/* 文章内容 */
.article-content { font-size: 1rem; line-height: 1.9; color: var(--text-primary); padding-top: 20px; max-width: 100%; }
.article-content h2 { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; margin: 28px 0 12px; padding-left: 14px; border-left: 3px solid var(--accent-1); color: var(--accent-1); }
.article-content p { margin-bottom: 14px; }

/* ====== 正文描述区域：用背景圈起来，更显眼 ====== */
.article-intro {
    position: relative;
    background:
        linear-gradient(160deg, rgba(168, 85, 247, 0.13) 0%, rgba(99, 102, 241, 0.07) 45%, rgba(236, 72, 153, 0.05) 100%),
        rgba(10, 11, 26, 0.55);
    border: 1px solid rgba(168, 85, 247, 0.32);
    border-left: 4px solid var(--accent-1);
    border-radius: var(--radius);
    padding: 26px 28px 22px;
    margin: 18px 0 10px;
    box-shadow:
        0 0 36px rgba(168, 85, 247, 0.10) inset,
        0 8px 28px rgba(0, 0, 0, 0.32),
        0 0 24px rgba(168, 85, 247, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
}
.article-intro::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-2), transparent);
    opacity: 0.75;
    pointer-events: none;
}
.article-intro::after {
    content: '';
    position: absolute; top: -60px; right: -60px;
    width: 180px; height: 180px; border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.22), transparent 70%);
    pointer-events: none;
}
.article-intro > *:last-child { margin-bottom: 0; }
.article-intro > p:first-child { margin-top: 0; }
.article-intro .highlight-box {
    background: rgba(168, 85, 247, 0.16);
    border-left-color: var(--accent-2);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.10) inset;
}
.article-intro blockquote {
    background: rgba(6, 182, 212, 0.07);
    border-left-color: var(--accent-3);
}
.article-intro blockquote::before { color: rgba(6, 182, 212, 0.16); }

.article-content .highlight-box { background: rgba(168,85,247,0.1); border-left: 4px solid var(--accent-1); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; margin: 18px 0; font-size: 0.95rem; line-height: 1.7; }

.article-content ul { list-style: none; padding-left: 0; margin: 18px 0; }
.article-content ul li { position: relative; padding-left: 26px; margin-bottom: 8px; line-height: 1.8; color: var(--text-primary); transition: var(--transition-fast); }
.article-content ul li::before { content: ''; position: absolute; left: 4px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-1); box-shadow: 0 0 8px rgba(168, 85, 247, 0.5); transition: var(--transition-fast); }
.article-content ul li:hover::before { box-shadow: 0 0 16px rgba(168, 85, 247, 0.8); transform: scale(1.3); }

.article-content blockquote {
    margin: 20px 0; padding: 18px 22px;
    background: rgba(168, 85, 247, 0.06);
    border-left: 4px solid var(--accent-1);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary); font-style: italic;
    position: relative; overflow: hidden;
}
.article-content blockquote::before {
    content: '"'; position: absolute; top: -10px; left: 12px;
    font-size: 4rem; color: rgba(168, 85, 247, 0.12);
    font-family: Georgia, serif; line-height: 1; pointer-events: none;
}
.article-content blockquote p { margin-bottom: 6px; }
.article-content blockquote p:last-child { margin-bottom: 0; }

.article-content strong { color: #fff; font-weight: 800; background: linear-gradient(180deg, transparent 60%, rgba(168, 85, 247, 0.25) 60%); padding: 0 2px; }
.article-content em { color: var(--accent-2); font-style: italic; }
.article-content a { color: var(--accent-3); text-decoration: none; font-weight: 600; border-bottom: 1px dashed rgba(6, 182, 212, 0.4); transition: var(--transition-fast); padding: 0 2px; }
.article-content a:hover { color: #22d3ee; border-bottom-style: solid; border-bottom-color: rgba(34, 211, 238, 0.7); text-shadow: 0 0 12px rgba(6, 182, 212, 0.4); }

.article-content hr { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--glass-border-strong), transparent); margin: 28px 0; }

/* ====== 缩略图文章列表（每行4篇，四层结构） ====== */
.topic-section { margin-top: 8px; margin-bottom: 8px; }
.topic-section-title {
    font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800;
    margin: 30px 0 6px; padding-left: 14px; border-left: 3px solid var(--accent-1);
    color: var(--accent-1); display: flex; align-items: center; gap: 8px;
}
.topic-section-desc { font-size: 0.9rem; color: var(--text-muted); padding-left: 17px; margin-bottom: 20px; }

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.topic-card {
    display: flex; flex-direction: column;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius); overflow: hidden;
    text-decoration: none; color: inherit;
    transition: var(--transition-smooth);
    min-width: 0;
}
.topic-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.55);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-card-hover), var(--glow-purple);
}

/* 第一层：缩略图（padding-top 撑高 + 绝对定位铺满，确保完全覆盖） */
.topic-thumb {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gradient-1);
}
.topic-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}
.topic-thumb img.img-error { display: none; }
.topic-thumb .thumb-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    opacity: 0.85;
}
.topic-card:hover .topic-thumb img { transform: scale(1.07); }

/* 卡片文字区 */
.topic-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-width: 0; }

/* 第二层：标题 */
.topic-title {
    font-family: var(--font-heading); font-size: 1rem; font-weight: 800; line-height: 1.45;
    color: var(--text-primary); margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; transition: var(--transition-fast);
    word-break: break-word;
}
.topic-card:hover .topic-title { color: #c084fc; text-shadow: 0 0 12px rgba(168, 85, 247, 0.35); }

/* 第三层：发布时间 */
.topic-date {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.76rem; color: var(--text-muted);
    padding-bottom: 8px; border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}
.topic-date::before { content: "📅"; font-size: 0.78rem; }

/* 第四层：描述信息 */
.topic-desc {
    font-size: 0.84rem; line-height: 1.75; color: var(--text-secondary);
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden; word-break: break-word;
}

/* 了解更多引导行 */
.read-more-line { margin-top: 24px; margin-bottom: 20px; padding: 12px 0; font-size: 0.9rem; color: var(--text-secondary); border-bottom: 1px solid var(--glass-border); }
.read-more-line a { color: var(--accent-1); text-decoration: none; font-weight: 600; }
.read-more-line a:hover { text-decoration: underline; }

/* 相关文章区域 */
.related-section { background: rgba(0,0,0,0.2); border-radius: var(--radius); border: 1px solid var(--glass-border); padding: 20px; margin-bottom: 24px; }
.related-title { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; letter-spacing: 1px; }
.related-title::before { content: "📌"; }
.related-list { list-style: none; counter-reset: related-counter; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.related-list li { border-bottom: 1px solid rgba(255,255,255,0.04); counter-increment: related-counter; }
.related-list li a { display: flex; align-items: center; gap: 10px; padding: 10px 8px; text-decoration: none; color: var(--text-primary); border-radius: 6px; transition: var(--transition-fast); min-width: 0; overflow: hidden; width: 100%; }
.related-list li a:hover { background: rgba(168,85,247,0.08); }
.related-num { flex-shrink: 0; width: 20px; text-align: center; font-weight: 700; color: var(--accent-1); }
.related-num::before { content: counter(related-counter, decimal-leading-zero); }
.related-item-title { flex: 1 1 0%; min-width: 0; width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-date { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }

/* 上一篇/下一篇导航（顶部增加间距，与上方文章卡片拉开距离） */
.article-prev-next { display: flex; justify-content: space-between; gap: 20px; margin: 36px 0 24px; padding: 0; }
.prev-link, .next-link {
    flex: 1; background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 16px 20px; transition: var(--transition-smooth); min-width: 0;
}
.prev-link:hover, .next-link:hover { border-color: var(--accent-1); box-shadow: var(--glow-purple); background: rgba(168, 85, 247, 0.06); }
.next-link { text-align: right; }
.pn-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.5px; }
.article-prev-next a {
    color: var(--text-primary); text-decoration: none; font-weight: 600; font-size: 0.95rem; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: var(--transition-fast);
}
.article-prev-next a:hover { color: var(--accent-1); text-shadow: 0 0 12px rgba(168, 85, 247, 0.3); }

/* 标签 */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--glass-border); }
.article-tags a { padding: 5px 14px; border-radius: 16px; font-size: 0.8rem; text-decoration: none; background: rgba(255,255,255,0.05); color: var(--text-secondary); transition: var(--transition-fast); }
.article-tags a:hover { background: rgba(168,85,247,0.2); color: #fff; }

/* 页脚 */
.site-footer { border-top:1px solid var(--glass-border); padding:24px 0; text-align:center; color:var(--text-muted); margin-top: 10px; }
.site-footer .container a {
    color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
    transition: color 0.25s, text-shadow 0.25s, transform 0.25s;
    position: relative; display: inline-block;
}
.site-footer .container a::after {
    content: ''; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
    background: var(--accent-1); transform: scaleX(0); transition: transform 0.25s ease;
}
.site-footer .container a:hover { color: #c084fc; text-shadow: 0 0 12px var(--glow-purple); transform: translateY(-1px); }
.site-footer .container a:hover::after { transform: scaleX(1); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-bottom: 12px; }
.footer-copy { font-size: 0.85rem; opacity: 0.8; }

/* ========== 响应式 ========== */
@media (max-width: 1100px) {
    .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .related-list { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(10,11,26,0.96); backdrop-filter: blur(20px); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--glass-border); z-index: 999; gap: 14px; }
    .main-nav.active { display: flex; }
    .mobile-menu-btn { display: block; }
    .article-main { padding: 20px 16px; }
    .article-header h1 { font-size: 1.5rem; white-space: normal; word-break: break-word; }
    .article-header-inner { flex-direction: column; gap: 14px; align-items: stretch; }
    .article-thumb { width: 100%; height: 0; padding-top: 50%; flex: none; }
    .article-thumb img { position: absolute; inset: 0; }
    .article-intro { padding: 20px 18px 16px; border-left-width: 3px; }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .topic-body { padding: 12px 13px 14px; gap: 7px; }
    .topic-title { font-size: 0.94rem; }
    .topic-desc { font-size: 0.8rem; -webkit-line-clamp: 3; }
    .article-prev-next { flex-direction: column; gap: 12px; margin: 28px 0 20px; }
    .next-link { text-align: left; }
    .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
    .article-meta { font-size: 0.8rem; }
    .article-header h1 { font-size: 1.35rem; }
    .article-intro { padding: 16px 14px 12px; }
    .topic-grid { grid-template-columns: 1fr; }
    .topic-desc { -webkit-line-clamp: 4; }
    .topic-section-title { font-size: 1.1rem; }
}