/* CSS变量定义 - 主题系统（可被后台动态覆盖） */
:root {
    /* 颜色系统 */
    --bg-primary: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-secondary: #F1F5F9;
    --bg-hover: #F8FAFC;
    --primary: #1E3A8A;
    --primary-light: #3B82F6;
    --text-title: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --cognition: #7C3AED;
    --information: #0891B2;
    --psychology: #2563EB;
    --accent: #DC2626;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow: rgba(15, 23, 42, 0.08);
    --shadow-lg: rgba(15, 23, 42, 0.12);
    
    /* 字体系统 */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --font-size-base: 16px;
    --line-height: 1.7;
    --font-weight-title: 600;
    
    /* 布局系统 */
    --max-width: 1200px;
    --sidebar-position: right;
    --border-radius: 8px;
    --border-radius-sm: 6px;
    --border-radius-lg: 12px;
    
    /* 组件控制 */
    --show-search: 1;
    --show-breadcrumbs: 1;
    --show-author: 1;
    --show-tags: 1;
    --show-related: 1;
    --show-nav-prev-next: 1;
    --show-footer: 1;
    --show-back-to-top: 1;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* P2: 优化字体栈，优先使用系统字体 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    color: var(--text-body);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 头部样式 - 毛玻璃效果 */
header {
    background: rgba(30, 58, 138, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(30, 58, 138, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

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

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

/* P0: 替代之前logo的内联样式 */
.logo a {
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    position: relative;
}

.nav-links li {
    margin-left: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links li:hover {
    transform: translateY(-2px);
}

.nav-links li:first-child {
    margin-left: 0;
}

.nav-links li.main-nav {
    font-weight: 600;
    font-size: 1.05em;
}

.nav-links li.main-nav:hover {
    transform: translateY(-2px) scale(1.02);
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 10px 0;
    display: block;
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links li.main-nav a {
    font-weight: 600;
}

/* 菜单切换按钮样式 */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.menu-toggle:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* 巨型菜单样式 - 动画优化 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 15px 50px rgba(15, 23, 42, 0.15);
    border-radius: 16px;
    padding: 12px 16px;
    margin-top: 10px;
    min-width: 160px;
    width: max-content;
    max-width: 320px;
    display: block;
    z-index: 1001;
    border: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu .menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px; /* 减少间隙 */
}

.dropdown-menu .menu-column {
    display: flex;
    flex-direction: column;
}

.dropdown-menu .menu-column h4 {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px; /* 减少标题下的边距 */
    padding-bottom: 8px; /* 减少标题下的内边距 */
    border-bottom: 2px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu .menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.dropdown-menu li:hover {
    background-color: var(--bg-primary);
    transform: none;
    border-radius: 6px;
}

.dropdown-menu a {
    padding: 8px 10px; /* 减少链接内边距 */
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    color: var(--text-body);
}

.dropdown-menu a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a i {
    margin-right: 8px; /* 减少图标与文本的间隙 */
    font-size: 0.9rem;
    color: var(--primary);
    width: 16px;
    text-align: center;
}

/* 色彩编码系统 */
.color-psychology {
    color: var(--psychology);
}

.color-information {
    color: var(--information);
}

.color-cognition {
    color: var(--cognition);
}

.bg-psychology {
    background-color: var(--psychology);
}

.bg-information {
    background-color: var(--information);
}

.bg-cognition {
    background-color: var(--cognition);
}

/* 激活状态 */
.nav-links li.active a {
    color: white;
    font-weight: 600;
}

.nav-links li.active a::after {
    width: 100%;
}

/* 面包屑导航样式 */
.breadcrumb {
    background-color: var(--bg-card);
    padding: 14px 20px;
    margin-bottom: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--shadow);
    border: 1px solid var(--border);
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 12px;
    color: var(--text-muted);
}

.breadcrumb-item:last-child {
    color: var(--text-title);
    font-weight: 500;
}

.breadcrumb-item:last-child a {
    color: var(--text-title);
    pointer-events: none;
    cursor: default;
}

/* 主内容样式 */
main {
    padding: 40px 0 60px;
    min-height: 60vh;
}

/* 卡片式布局 - 增强设计 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.article-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 4px 16px var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    position: relative;
}

.article-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    border-color: var(--primary-light);
}

.article-card:hover::after {
    opacity: 1;
}

.article-card-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.article-card-category {
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-card-category.psychology {
    background: linear-gradient(135deg, var(--psychology) 0%, #3b82f6 100%);
}

.article-card-category.information {
    background: linear-gradient(135deg, var(--information) 0%, #06b6d4 100%);
}

.article-card-category.cognition {
    background: linear-gradient(135deg, var(--cognition) 0%, #8b5cf6 100%);
}

.article-card-source {
    color: var(--text-muted);
    font-size: 13px;
    margin-right: 12px;
    margin-bottom: 8px;
}

.article-card-time {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-card-time::before {
    content: '📅';
    font-size: 12px;
}

.article-card-title {
    font-size: 19px;
    font-weight: 700;
    margin: 16px 0;
    line-height: 1.4;
    flex: 1;
}

.article-card-title a {
    color: var(--text-title);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card-title a:hover {
    color: var(--primary);
}

.article-card-summary {
    color: var(--text-body);
    line-height: 1.7;
    margin: 16px 0;
    font-size: 14px;
    flex: 1;
}

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

.article-card-read-more {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-card-read-more:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.article-card-read-more i {
    margin-left: 4px;
    font-size: 12px;
    transition: transform 0.2s ease;
}

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

.article-card-meta {
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-card-meta::before {
    content: '👁';
    font-size: 14px;
}

/* 英雄区样式 - 科技感设计 */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 50%, #2563EB 100%);
    color: white;
    padding: 100px 0;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(37, 99, 235, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.hero-subtitle {
    font-size: 22px;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 400;
    letter-spacing: 3px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.hero-button {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 16px 42px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
    border: 2px solid transparent;
}

.hero-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.5);
    background-color: #b91c1c;
}

.hero-search {
    margin-top: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search-form {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.hero-search-input {
    flex: 1;
    padding: 18px 28px;
    border: none;
    font-size: 16px;
    background: transparent;
    color: var(--text-body);
}

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

.hero-search-input:focus {
    outline: none;
}

.hero-search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.hero-search-btn:hover {
    background: #1d4ed8;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

.hero-tags {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* 特色内容推荐 - 卡片化设计 */
.featured-section {
    margin-bottom: 60px;
}

.featured-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-title);
    padding-bottom: 14px;
    border-bottom: 3px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.featured-title::before {
    content: '';
    width: 6px;
    height: 28px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 3px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.featured-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 4px 16px var(--shadow);
    padding: 28px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--cognition) 0%, var(--information) 50%, var(--psychology) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    border-color: var(--primary-light);
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-card-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-title);
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-card:nth-child(1) .featured-card-title::before {
    content: '⭐';
}

.featured-card:nth-child(2) .featured-card-title::before {
    content: '🔥';
}

.featured-card:nth-child(3) .featured-card-title::before {
    content: '📚';
}

.featured-card-list {
    list-style: none;
    padding: 0;
}

.featured-card-list li {
    margin-bottom: 14px;
    padding-left: 24px;
    position: relative;
}

.featured-card-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.featured-card-list li:hover:before {
    background: var(--accent);
    transform: scale(1.2);
}

.featured-card-list a {
    color: var(--text-body);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.featured-card-list a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* 术语词典搜索框 - 突出设计 */
.term-search {
    background: linear-gradient(135deg, var(--bg-card) 0%, #f1f5f9 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    padding: 32px;
    margin-bottom: 50px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.term-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cognition), var(--information), var(--psychology));
}

.term-search-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-title);
    display: flex;
    align-items: center;
    gap: 10px;
}

.term-search-title::before {
    content: '🔍';
    font-size: 24px;
}

.term-search-form {
    position: relative;
}

.term-search-input {
    width: 100%;
    padding: 18px 140px 18px 24px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 17px;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.term-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.03);
    background-color: white;
}

.term-search-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
}

.term-search-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
}

.term-search-tags {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.term-search-tag {
    background: white;
    color: var(--text-body);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.term-search-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* 强化排版 */
h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 28px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-title);
    margin: 40px 0 20px;
    line-height: 1.3;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-title);
    margin: 30px 0 15px;
    line-height: 1.4;
}

p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-body);
    margin-bottom: 20px;
}

strong {
    font-weight: 600;
    color: var(--text-title);
}

/* 强调文本 */
.accent {
    color: var(--accent);
    font-weight: 600;
}

/* 焦点样式 - 提高无障碍访问性 */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.15);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 防止页面跳动 */
body.menu-open {
    overflow: hidden;
}

/* 跳转到主内容链接 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        margin-top: 60px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dropdown-menu {
        min-width: 280px;
        padding: 18px;
        left: -50px;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    p {
        font-size: 15px;
    }
    
    .breadcrumb {
        padding: 12px 16px;
        margin-bottom: 20px;
    }
    
    .term-search {
        padding: 18px;
        margin-bottom: 30px;
    }
    
    .featured-section {
        margin-bottom: 40px;
    }
    
    .featured-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* ============================================================
   页脚 - 全新设计
   ============================================================ */
footer {
    background: #0a1628;
    color: white;
    padding: 72px 0 0;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

/* 顶部彩色光带 */
.footer-glow-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        #7C3AED 0%,
        #2563EB 33%,
        #0891B2 66%,
        #DC2626 100%);
}

/* 背景装饰纹理 */
footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(37,99,235,0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 20%, rgba(124,58,237,0.06) 0%, transparent 40%);
    pointer-events: none;
}

/* 四列主布局 */
.footer-main {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
    gap: 48px;
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

/* 列通用 */
.footer-col {
    min-width: 0;
}

/* ---- 品牌列 ---- */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.footer-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.footer-desc {
    color: rgba(255,255,255,0.6);
    font-size: 13.5px;
    line-height: 1.85;
    margin-bottom: 20px;
}

/* 话题标签 */
.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.footer-tag {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.footer-tag:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background: rgba(59,130,246,0.08);
}

/* 社交图标 */
.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

.footer-social-btn:hover {
    background: var(--primary);
    border-color: var(--primary-light);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37,99,235,0.4);
}

/* ---- 导航列通用 ---- */
.footer-col-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 14px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-list li {
    margin-bottom: 11px;
}

.footer-nav-list a {
    color: rgba(255,255,255,0.62);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    padding: 3px 0;
}

.footer-nav-list a i {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.footer-nav-list a:hover {
    color: white;
    transform: translateX(4px);
}

.footer-nav-list a:hover i {
    color: var(--accent);
}

/* ---- 联系列 ---- */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: rgba(255,255,255,0.62);
    font-size: 13.5px;
    line-height: 1.5;
}

.contact-icon {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--primary-light);
    flex-shrink: 0;
}

/* 邮箱订阅表单 */
.footer-subscribe p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
}

.subscribe-form {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
}

.subscribe-form input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 14px;
    font-size: 13px;
    color: white;
    outline: none;
    min-width: 0;
}

.subscribe-form input::placeholder {
    color: rgba(255,255,255,0.3);
}

.subscribe-form button {
    background: var(--primary);
    border: none;
    padding: 10px 16px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.subscribe-form button:hover {
    background: var(--primary-light);
}

/* ---- 底部版权栏 ---- */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.footer-bottom-left p {
    font-size: 13px;
    color: rgba(255,255,255,0.38);
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.footer-bottom-right a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-right a:hover {
    color: rgba(255,255,255,0.8);
}

.footer-bottom-right .sep {
    color: rgba(255,255,255,0.2);
}

/* 移动端响应式 - 优化适配 */
@media (max-width: 768px) {
    header {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .nav-links {
        flex-direction: column;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(30, 58, 138, 0.98);
        backdrop-filter: blur(12px);
        padding: 20px;
        display: flex;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition: all 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    
    .nav-links li {
        margin: 0;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links li:hover {
        transform: none;
    }
    
    .nav-links a {
        padding: 16px 0;
        display: block;
        font-size: 16px;
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
        cursor: pointer;
        font-size: 1.5rem;
        padding: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .menu-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 12px;
        margin: 8px 0;
        min-width: auto;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-menu .menu-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .dropdown-menu .menu-column h4 {
        color: rgba(255, 255, 255, 0.9);
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }
    
    .dropdown-menu a {
        color: rgba(255, 255, 255, 0.8);
        padding: 10px 8px;
    }
    
    .dropdown-menu a:hover {
        color: white;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-menu a i {
        color: rgba(255, 255, 255, 0.6);
    }
    
    main {
        padding: 20px 0;
    }
    
    .hero-section {
        padding: 60px 0;
        margin-top: 56px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .hero-button {
        padding: 14px 32px;
        font-size: 15px;
    }
    
    .hero-search {
        margin-top: 30px;
    }
    
    .hero-search-form {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .hero-search-input {
        padding: 16px 20px;
        border-radius: 16px 16px 0 0;
    }
    
    .hero-search-btn {
        border-radius: 0 0 16px 16px;
        padding: 14px;
    }
    
    .hero-tags {
        gap: 8px;
    }
    
    .hero-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-title {
        font-size: 22px;
    }
    
    h1 {
        font-size: 26px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    p {
        font-size: 15px;
    }
    
    .breadcrumb {
        padding: 12px 16px;
        margin-bottom: 20px;
    }
    
    .term-search {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .term-search-title {
        font-size: 18px;
    }
    
    .term-search-input {
        padding: 14px 120px 14px 18px;
        font-size: 15px;
    }
    
    .term-search-tags {
        gap: 8px;
    }
    
    .term-search-tag {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .featured-section {
        margin-bottom: 40px;
    }
    
    /* 页脚移动端 */
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-col-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .section {
        padding: 20px;
    }
    
    .hotspot-card {
        padding: 20px;
    }
    
    .tool-section {
        padding: 20px;
    }
}

/* 动画效果 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.article-item {
    animation: fadeIn 0.5s ease forwards;
}

.article-item:nth-child(1) { animation-delay: 0.1s; }
.article-item:nth-child(2) { animation-delay: 0.2s; }
.article-item:nth-child(3) { animation-delay: 0.3s; }
.article-item:nth-child(4) { animation-delay: 0.4s; }
.article-item:nth-child(5) { animation-delay: 0.5s; }
.article-item:nth-child(6) { animation-delay: 0.6s; }
.article-item:nth-child(7) { animation-delay: 0.7s; }
.article-item:nth-child(8) { animation-delay: 0.8s; }
.article-item:nth-child(9) { animation-delay: 0.9s; }

/* 理论科普页面样式 */
.page-title {
    font-size: 2.2rem;
    color: var(--text-title);
    margin-bottom: 40px;
    text-align: center;
    font-weight: 700;
}

.section {
    background-color: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

.section h2 {
    color: var(--text-title);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
}

.section h3 {
    color: var(--text-title);
    margin-top: 30px;
    margin-bottom: 15px;
}

.section p {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 15px;
}

.concept-list {
    list-style: none;
    padding: 0;
}

.concept-list li {
    margin-bottom: 20px;
    padding-left: 20px;
    position: relative;
}

.concept-list li:before {
    content: "•";
    color: var(--primary);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    font-weight: 700;
}

.case-study {
    background-color: var(--bg-primary);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.case-study h4 {
    color: var(--text-title);
    margin-bottom: 10px;
}

/* 实战指南页面样式 */
.tip-box {
    background-color: rgba(30, 58, 138, 0.05);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.tip-box h4 {
    color: var(--text-title);
    margin-bottom: 10px;
}

.tip-list {
    list-style: none;
    padding: 0;
}

.tip-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.tip-list li:before {
    content: "✓";
    color: #059669;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.checklist {
    background-color: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border);
}

.checklist h4 {
    color: var(--text-title);
    margin-bottom: 15px;
}

.checklist ul {
    list-style: none;
    padding: 0;
}

.checklist li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.checklist li:before {
    content: "□";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* 热点观察页面样式 */
.hotspot-card {
    background-color: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

.hotspot-card h2 {
    color: var(--text-title);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
}

.hotspot-card h3 {
    color: var(--text-title);
    margin-top: 30px;
    margin-bottom: 15px;
}

.hotspot-card p {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 15px;
}

.analysis-section {
    background-color: var(--bg-primary);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.analysis-section h4 {
    color: var(--text-title);
    margin-bottom: 15px;
}

.manipulation-techniques {
    list-style: none;
    padding: 0;
}

.manipulation-techniques li {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.manipulation-techniques li:before {
    content: "→";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: 600;
}

.countermeasures {
    background-color: rgba(5, 150, 105, 0.05);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.countermeasures h4 {
    color: var(--text-title);
    margin-bottom: 15px;
}

.countermeasures ul {
    list-style: none;
    padding: 0;
}

.countermeasures li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.countermeasures li:before {
    content: "✓";
    color: #059669;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 工具资源页面样式 */
.tool-section {
    background-color: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

.tool-section h2 {
    color: var(--text-title);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
}

.tool-section h3 {
    color: var(--text-title);
    margin-top: 30px;
    margin-bottom: 15px;
}

.tool-section p {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 15px;
}

.questionnaire {
    background-color: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border);
}

.questionnaire h4 {
    color: var(--text-title);
    margin-bottom: 15px;
}

.questionnaire ul {
    list-style: none;
    padding: 0;
}

.questionnaire li {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.questionnaire li:before {
    content: "Q";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.resource-list {
    list-style: none;
    padding: 0;
}

.resource-list li {
    margin-bottom: 20px;
    padding: 18px;
    background-color: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.resource-list h4 {
    color: var(--text-title);
    margin-bottom: 6px;
}

.resource-list p {
    color: var(--text-body);
    margin-bottom: 6px;
}

/* ============================================
   P2: 骨架屏加载动画
   ============================================ */
.skeleton-line {
    display: block;
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin-bottom: 12px;
}

.skeleton-line-short { width: 40%; height: 12px; }
.skeleton-line-medium { width: 70%; }
.skeleton-line-long { width: 90%; }
.skeleton-line-tag { width: 80px; height: 22px; border-radius: 20px; margin-bottom: 16px; }
.skeleton-line-title { width: 85%; height: 20px; margin-bottom: 16px; }
.skeleton-line-text { width: 100%; }
.skeleton-line-shorter { width: 60%; }

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

.skeleton-card {
    opacity: 1;
    pointer-events: none;
}

/* ============================================
   P2: 返回顶部按钮
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.35);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(30, 58, 138, 0.45);
}

.back-to-top:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 24px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

/* ============================================
   P2: 暗色模式
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0B1120;
        --bg-card: #1A2332;
        --primary: #60A5FA;
        --primary-light: #93C5FD;
        --text-title: #F1F5F9;
        --text-body: #CBD5E1;
        --text-muted: #94A3B8;
        --cognition: #A78BFA;
        --information: #22D3EE;
        --psychology: #60A5FA;
        --accent: #F87171;
        --border: #334155;
        --shadow: rgba(0, 0, 0, 0.3);
    }

    body {
        color: var(--text-body);
        background-color: var(--bg-primary);
    }

    header {
        background: rgba(15, 23, 42, 0.95);
    }

    header.scrolled {
        background: rgba(15, 23, 42, 0.98);
    }

    .dropdown-menu {
        background: #1A2332;
        border-color: var(--border);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    }

    .dropdown-menu a {
        color: var(--text-body);
    }

    .hero-section {
        background: linear-gradient(135deg, #0B1120 0%, #1E3A8A 50%, #1e40af 100%);
    }

    .hero-search-form {
        background: rgba(26, 35, 50, 0.95);
    }

    .hero-search-input {
        background: transparent;
        color: var(--text-body);
    }

    .featured-card-list a {
        color: var(--text-body);
    }

    .term-search {
        background: linear-gradient(135deg, var(--bg-card) 0%, #0B1120 100%);
    }

    .term-search-input {
        background-color: var(--bg-card);
        color: var(--text-body);
        border-color: var(--border);
    }

    .article-card {
        background-color: var(--bg-card);
        border-color: var(--border);
    }

    .article-card-cover-placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .skeleton-line {
        background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
        background-size: 200% 100%;
    }
}

/* ============================================
   P1: 文章卡片封面图
   ============================================ */
.article-card-cover {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-primary);
    flex-shrink: 0;
}

.article-card-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
}

.article-card-cover-placeholder i {
    font-size: 48px;
}

@media (max-width: 768px) {
    .article-card-cover {
        height: 160px;
    }
    .article-card-cover-placeholder i {
        font-size: 36px;
    }
}

/* ============================================
   P1: 空状态 & 加载状态
   ============================================ */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.6;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 13px !important;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ============================================
   P0: 替代内联样式的按钮容器和按钮
   ============================================ */
.load-more-wrap {
    text-align: center;
    margin: 24px 0 40px;
    display: none;
}

.load-more-btn {
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.3);
}

.load-more-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* ============================================
   公告栏
   ============================================ */
.announcement-bar {
    background: linear-gradient(90deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 10px 0;
    margin-top: 70px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 900;
}

@media (max-width: 768px) {
    .announcement-bar {
        margin-top: 56px;
        padding: 8px 0;
        font-size: 13px;
    }
}

.announcement-slider {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.announcement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.announcement-item strong {
    background: var(--accent);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.announcement-text {
    opacity: 0.92;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.announcement-date {
    font-size: 12px;
    opacity: 0.6;
    flex-shrink: 0;
}

/* 公告栏存在时，hero-section 不再需要 margin-top */
.announcement-bar + .hero-section,
.announcement-bar ~ .hero-section {
    margin-top: 0;
}

/* ============================================
   友情链接区块
   ============================================ */
.friend-links-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.friend-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.friend-links-grid.friend-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.friend-link-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 18px;
    text-decoration: none;
    color: var(--text-body);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.friend-link-card:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.12);
}

.friend-link-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
}

.friend-link-icon {
    color: var(--primary);
    font-size: 14px;
    opacity: 0.7;
}

.friend-link-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   文章详情页 - article.php
   ============================================ */
.article-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 20px 80px;
}

/* 面包屑 */
.article-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 36px;
    padding: 12px 18px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

.article-breadcrumb a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.article-breadcrumb .sep {
    color: var(--border);
    margin: 0 2px;
}

.article-breadcrumb span:last-child {
    color: var(--text-title);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

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

.article-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.article-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.article-badge.cognition {
    background: linear-gradient(135deg, var(--cognition), #8b5cf6);
}

.article-badge.information {
    background: linear-gradient(135deg, var(--information), #06b6d4);
}

.article-badge.psychology {
    background: linear-gradient(135deg, var(--psychology), #3b82f6);
}

.article-date,
.article-views {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-title);
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.article-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    padding: 16px 20px;
    border-left: 4px solid var(--primary);
    background: rgba(30, 58, 138, 0.04);
    border-radius: 0 8px 8px 0;
}

/* 文章内容排版 */
.article-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-body);
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
    word-break: break-word;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-title);
    font-weight: 700;
    line-height: 1.4;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.article-content h1 { font-size: 28px; }
.article-content h2 {
    font-size: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.article-content h3 { font-size: 19px; }
.article-content h4 { font-size: 17px; }

.article-content p {
    margin-bottom: 1.5em;
    font-size: 17px;
    line-height: 1.85;
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.article-content a:hover {
    color: var(--primary-light);
}

.article-content strong,
.article-content b {
    font-weight: 700;
    color: var(--text-title);
}

.article-content em,
.article-content i {
    font-style: italic;
}

.article-content blockquote {
    margin: 24px 0;
    padding: 16px 24px;
    border-left: 4px solid var(--primary);
    background: rgba(30, 58, 138, 0.04);
    border-radius: 0 8px 8px 0;
    color: var(--text-muted);
    font-style: italic;
    font-size: 16px;
}

.article-content blockquote p {
    margin-bottom: 0;
    font-size: 16px;
}

.article-content pre {
    background: #1e2d3d;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin: 24px 0;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
}

.article-content code {
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 14px;
}

.article-content ul,
.article-content ol {
    padding-left: 28px;
    margin-bottom: 1.5em;
}

.article-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 24px 0;
    box-shadow: 0 4px 20px var(--shadow);
    display: block;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
}

.article-content th {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

.article-content td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
}

.article-content tr:nth-child(even) td {
    background: rgba(30, 58, 138, 0.03);
}

.article-content hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 36px 0;
}

/* 标签区 */
.article-tags {
    margin-bottom: 36px;
}

.article-tags h4 {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(30, 58, 138, 0.15);
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

/* 上一篇/下一篇导航 */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 36px;
}

.article-nav a {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 22px;
    text-decoration: none;
    color: var(--text-body);
    transition: all 0.25s ease;
}

.article-nav a:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px var(--shadow);
    transform: translateY(-2px);
    color: var(--text-body);
}

.article-nav .nav-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.article-nav .nav-next .nav-label {
    justify-content: flex-end;
}

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

.article-nav .nav-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-title);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 返回首页按钮 */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    transition: all 0.25s ease;
}

.back-home:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-4px);
}

/* 文章详情页响应式 */
@media (max-width: 768px) {
    .article-page {
        padding: 28px 16px 60px;
    }

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

    .article-content {
        font-size: 16px;
    }

    .article-content p {
        font-size: 16px;
    }

    .article-nav {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .article-nav .nav-next .nav-label {
        justify-content: flex-start;
    }

    .article-breadcrumb span:last-child {
        max-width: 160px;
    }
}

/* 暗色模式 - 文章详情 */
@media (prefers-color-scheme: dark) {
    .article-content blockquote {
        background: rgba(96, 165, 250, 0.06);
    }

    .article-content code {
        background: rgba(96, 165, 250, 0.1);
        color: var(--primary-light);
    }

    .article-content pre {
        background: #0d1b2e;
    }

    .article-content tr:nth-child(even) td {
        background: rgba(96, 165, 250, 0.04);
    }

    .article-content th {
        background: var(--primary);
    }

    .article-subtitle {
        background: rgba(96, 165, 250, 0.06);
    }

    .tag {
        background: rgba(96, 165, 250, 0.1);
        color: var(--primary);
        border-color: rgba(96, 165, 250, 0.2);
    }

    .article-nav a {
        background: var(--bg-card);
        border-color: var(--border);
    }
}

/* ============================================
   分类页 - category.php
   ============================================ */

/* 分类英雄区 */
.category-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 60%, #2563EB 100%);
    color: white;
    padding: 60px 0 48px;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(124,58,237,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(8,145,178,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.category-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.category-hero .container {
    position: relative;
    z-index: 1;
}

.category-hero h1 {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.category-hero h1 i {
    font-size: 28px;
    opacity: 0.85;
}

.category-hero .cat-desc {
    font-size: 16px;
    opacity: 0.88;
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 16px;
}

.category-hero .cat-count,
.category-hero .cat-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    opacity: 0.75;
    background: rgba(255,255,255,0.12);
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
}

@media (max-width: 768px) {
    .category-hero {
        padding: 40px 0 32px;
        margin-top: 56px;
    }
    .category-hero h1 {
        font-size: 26px;
    }
}

/* 分类内容区布局 */
.category-content {
    padding: 40px 0 80px;
}

.category-content .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    .category-content .container {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* 文章列表头部 */
.posts-main {
    min-width: 0;
}

.posts-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.posts-list-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-title);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.posts-list-header h2::before {
    content: '';
    width: 5px;
    height: 22px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.sort-info {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 分类文章卡片 */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 20px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.3s ease;
}

.post-card:hover {
    box-shadow: 0 8px 32px var(--shadow);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

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

.post-card.featured {
    border-left: 3px solid var(--cognition);
    background: linear-gradient(to right, rgba(124,58,237,0.03) 0%, var(--bg-card) 40%);
}

.post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.post-card-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--cognition), #8b5cf6);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.post-card-date,
.post-card-views {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-title);
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-summary {
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.post-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.post-card-readmore:hover {
    color: var(--accent);
    transform: translateX(4px);
}

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

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    color: var(--text-body);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.pagination .current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

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

.pagination .dots {
    border: none;
    background: transparent;
    color: var(--text-muted);
}

/* 空状态（分类页）*/
.category-content .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.category-content .empty-state i {
    font-size: 56px;
    margin-bottom: 20px;
    display: block;
    opacity: 0.4;
}

.category-content .empty-state h3 {
    font-size: 20px;
    color: var(--text-title);
    margin-bottom: 10px;
}

.category-content .empty-state p {
    font-size: 15px;
    margin-bottom: 24px;
}

.category-content .empty-state a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    transition: all 0.25s ease;
}

.category-content .empty-state a:hover {
    background: var(--primary);
    color: white;
}

/* 侧边栏 */
.sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 24px;
}

.sidebar-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}

.sidebar-section h3 i {
    color: var(--primary);
    font-size: 15px;
}

.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-cat-list li {
    margin-bottom: 4px;
}

.sidebar-cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text-body);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-cat-list a:hover {
    background: rgba(30, 58, 138, 0.06);
    color: var(--primary);
    border-color: rgba(30, 58, 138, 0.1);
}

.sidebar-cat-list a.active {
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary);
    border-color: rgba(30, 58, 138, 0.15);
    font-weight: 700;
}

.sidebar-cat-list .cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 7px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

/* 分类页暗色模式 */
@media (prefers-color-scheme: dark) {
    .category-hero {
        background: linear-gradient(135deg, #0B1120 0%, #1E3A8A 60%, #1e40af 100%);
    }

    .post-card {
        background: var(--bg-card);
        border-color: var(--border);
    }

    .post-card.featured {
        background: linear-gradient(to right, rgba(167,139,250,0.06) 0%, var(--bg-card) 40%);
        border-left-color: var(--cognition);
    }

    .sidebar-section {
        background: var(--bg-card);
        border-color: var(--border);
    }

    .sidebar-cat-list a:hover {
        background: rgba(96, 165, 250, 0.08);
    }

    .sidebar-cat-list a.active {
        background: rgba(96, 165, 250, 0.1);
        border-color: rgba(96, 165, 250, 0.2);
    }

    .pagination a,
    .pagination span {
        background: var(--bg-card);
        border-color: var(--border);
        color: var(--text-body);
    }
}

/* ============================================
   首页 main 区域顶部 padding（无公告时）
   ============================================ */
.hero-section + main,
.hero-section ~ main {
    padding-top: 40px;
}

/* 公告栏存在时 hero 顶部边距调整 */
body > .announcement-bar + .hero-section {
    margin-top: 0;
}

/* ============================================
   文章封面大图
   ============================================ */
.article-cover {
    margin-bottom: 36px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--shadow);
}

.article-cover img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* ============================================
   阅读进度条
   ============================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ============================================
   文章详情页 - 内容区域优先级修复
   文章内容中的 h2/h3 不应继承全局样式中的 margin-top: 70px
   ============================================ */
.article-content h1 { margin-bottom: 0.75em; margin-top: 1.5em; }
.article-content h2 { margin-top: 2em; margin-bottom: 0.75em; }
.article-content h3 { margin-top: 1.8em; margin-bottom: 0.6em; }

/* ============================================
   首页 hero 下方 main 不需要额外的 padding
   ============================================ */
.hero-section + main {
    padding-top: 40px;
}

/* ============================================
   响应式补丁：分类页在移动端侧边栏排序
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        order: -1;
        position: static;
    }

    .sidebar-section {
        margin-bottom: 0;
    }
}

/* ============================================
   暗色模式 - 额外补丁
   ============================================ */
@media (prefers-color-scheme: dark) {
    .friend-link-card {
        background: var(--bg-card);
        border-color: var(--border);
        color: var(--text-body);
    }

    .friend-link-card:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

    .announcement-bar {
        background: linear-gradient(90deg, #0B1120 0%, #1e3a8a 100%);
    }

    .article-cover {
        box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    }
}

/* 超小屏（< 480px）页脚优化 */
@media (max-width: 480px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-col-brand {
        grid-column: auto;
    }

    .footer-logo-text {
        font-size: 1.3rem;
    }

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

    .subscribe-form input {
        border-radius: 8px 8px 0 0;
    }

    .subscribe-form button {
        border-radius: 0 0 8px 8px;
        padding: 12px;
    }
}

/* ============================================================
   ✨ 新UI功能样式区 - 后台可控
   ============================================================ */

/* ① 骨架屏扫光动画（shimmer）增强 */
@keyframes skeleton-shimmer-enhanced {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
body.ui-skeleton-shimmer .skeleton-line {
    background: linear-gradient(
        90deg,
        #e2e8f0 0px,
        #f8fafc 80px,
        #e2e8f0 160px
    );
    background-size: 400px 100%;
    animation: skeleton-shimmer-enhanced 1.2s ease-in-out infinite;
}
[data-theme="dark"] body.ui-skeleton-shimmer .skeleton-line,
body.dark-mode.ui-skeleton-shimmer .skeleton-line {
    background: linear-gradient(
        90deg,
        #1e293b 0px,
        #334155 80px,
        #1e293b 160px
    );
    background-size: 400px 100%;
    animation: skeleton-shimmer-enhanced 1.2s ease-in-out infinite;
}

/* ② 文章卡片封面图 hover 放大 */
body.ui-card-zoom .article-card {
    overflow: hidden;
}
body.ui-card-zoom .article-card-cover {
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    will-change: transform;
}
body.ui-card-zoom .article-card:hover .article-card-cover {
    transform: scale(1.07);
}

/* ③ Hero 区动态背景（脉冲圆圈 + 扫描线） */
body.ui-hero-animate .hero-section {
    overflow: hidden;
}
body.ui-hero-animate .hero-section::after {
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: hero-grid-drift 20s linear infinite;
}
@keyframes hero-grid-drift {
    0%   { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* Hero 脉冲圆圈 */
body.ui-hero-animate .hero-section .hero-pulse-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: hero-pulse 4s ease-out infinite;
    pointer-events: none;
    z-index: 0;
}
body.ui-hero-animate .hero-section .hero-pulse-ring:nth-child(1) { width: 300px; height: 300px; top: -80px; right: 5%; animation-delay: 0s; }
body.ui-hero-animate .hero-section .hero-pulse-ring:nth-child(2) { width: 500px; height: 500px; top: -180px; right: -5%; animation-delay: 1.5s; }
body.ui-hero-animate .hero-section .hero-pulse-ring:nth-child(3) { width: 200px; height: 200px; bottom: -60px; left: 3%; animation-delay: 0.8s; }

@keyframes hero-pulse {
    0%   { transform: scale(0.8); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* Hero 标题打字机光标效果 */
body.ui-hero-animate .hero-title::after {
    content: '|';
    display: inline-block;
    margin-left: 4px;
    opacity: 1;
    animation: blink-caret 0.8s step-end infinite;
    color: rgba(255,255,255,0.7);
    font-weight: 300;
}
@keyframes blink-caret {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ④ 首页精选大卡片（第一篇文章）布局 */
body.ui-featured-hero .article-grid .article-card:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
    max-height: 340px;
}
body.ui-featured-hero .article-grid .article-card:first-child .article-card-cover {
    width: 42%;
    height: auto;
    min-height: 240px;
    flex-shrink: 0;
    border-radius: 0;
}
body.ui-featured-hero .article-grid .article-card:first-child .article-card-content {
    padding: 36px 40px;
    justify-content: center;
}
body.ui-featured-hero .article-grid .article-card:first-child .article-card-title {
    font-size: 24px;
    line-height: 1.35;
}
body.ui-featured-hero .article-grid .article-card:first-child .article-card-summary {
    font-size: 15px;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
body.ui-featured-hero .article-grid .article-card:first-child::after {
    height: 100%;
    width: 4px;
    top: 0;
    right: auto;
    left: 0;
    opacity: 1;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
}
@media (max-width: 768px) {
    body.ui-featured-hero .article-grid .article-card:first-child {
        flex-direction: column;
        max-height: none;
    }
    body.ui-featured-hero .article-grid .article-card:first-child .article-card-cover {
        width: 100%;
        height: 200px;
    }
}

/* ⑤ 移动端底部导航栏 */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    z-index: 999;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
}
[data-theme="dark"] .mobile-bottom-nav,
body.dark-mode .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.97);
    border-top-color: #1e293b;
}
.mobile-bottom-nav ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    margin: 0;
    padding: 0;
}
.mobile-bottom-nav ul li {
    flex: 1;
}
.mobile-bottom-nav ul li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    gap: 4px;
    transition: color 0.2s ease;
    min-height: 54px;
}
.mobile-bottom-nav ul li a i {
    font-size: 18px;
    transition: transform 0.2s ease;
}
.mobile-bottom-nav ul li a:hover,
.mobile-bottom-nav ul li a.active {
    color: var(--primary);
}
.mobile-bottom-nav ul li a:hover i,
.mobile-bottom-nav ul li a.active i {
    transform: translateY(-2px);
}
.mobile-bottom-nav ul li.nav-search-btn a {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    margin: -14px auto 0;
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.4);
    padding: 0;
    min-height: auto;
    font-size: 0;
}
.mobile-bottom-nav ul li.nav-search-btn a i {
    font-size: 20px;
    margin: 0;
}
@media (max-width: 768px) {
    body.ui-bottom-nav .mobile-bottom-nav {
        display: block;
    }
    body.ui-bottom-nav {
        padding-bottom: 60px;
    }
    /* 底部导航显示时隐藏返回顶部按钮（避免重叠） */
    body.ui-bottom-nav .back-to-top {
        bottom: 76px;
    }
}

/* ⑥ 文章侧边栏 sticky 跟随 */
body.ui-sticky-sidebar .article-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
body.ui-sticky-sidebar .article-sidebar::-webkit-scrollbar {
    width: 4px;
}
body.ui-sticky-sidebar .article-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ⑦ 文章目录（TOC） */
.article-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}
.article-toc-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.article-toc-title i {
    color: var(--primary);
}
.article-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.article-toc-list li {
    margin-bottom: 8px;
}
.article-toc-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    display: block;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}
.article-toc-list a:hover,
.article-toc-list a.toc-active {
    color: var(--primary);
    background: rgba(30, 58, 138, 0.06);
    border-left-color: var(--primary);
}
.toc-h3 > a {
    padding-left: 20px !important;
    font-size: 12px;
}
.toc-h4 > a {
    padding-left: 36px !important;
    font-size: 12px;
    opacity: 0.8;
}
/* 目录折叠按钮 */
.toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 12px;
    padding: 0 4px;
    margin-left: auto;
    transition: transform 0.2s ease;
}
.toc-toggle.collapsed {
    transform: rotate(-90deg);
}
.article-toc.collapsed .article-toc-list {
    display: none;
}

/* ⑧ 阅读进度条颜色增强（由后台控制颜色主题） */
body.ui-progress-rainbow .reading-progress {
    background: linear-gradient(
        90deg,
        var(--cognition) 0%,
        var(--primary-light) 50%,
        var(--information) 100%
    );
    height: 4px;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* ⑨ 文章详情页两栏布局（内容 + 侧边栏） */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}
.article-main-col {
    min-width: 0;
}
.article-sidebar {
    min-width: 0;
}
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        display: none;
    }
}

/* ⑩ 搜索框焦点发光动效 */
.hero-search-form:focus-within {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 3px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(255, 255, 255, 0.15);
    transform: scale(1.01);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-search-form {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ======== 思维导图 XMind 样式 ======== */
.xmind-embed {
    transition: all 0.3s ease;
}
.xmind-embed:hover {
    box-shadow: 0 4px 20px rgba(124, 92, 252, 0.15);
}
.xmind-embed.xmind-expanded {
    padding: 0;
    background: transparent;
    border: none;
}
.xmind-embed.xmind-expanded .xmind-viewer {
    display: block !important;
}
.xmind-embed.xmind-expanded > div:first-child {
    display: none;
}
