/* === Sci-Park 核心样式表 (v11.0 本地部署版 - 纯净文本排版) === */
/* 包含：首页、文章页、综述页的所有样式，已修复通讯作者显示问题 */

:root {
    /* --- 全局变量与配色 --- */
    --font-main: "Inter", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: "Georgia", "Times New Roman", "Songti SC", serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    
    --bg-body: #F9FAFB;
    --white: #ffffff;
    
    /* 品牌色：天大蓝 */
    --primary: #00356B;
    --primary-dark: #002347;
    --primary-light: #EFF6FF;
    
    /* 辅助色：荣耀金 */
    --gold-main: #C09D63;
    --gold-light: #E4CFA8;
    
    /* 文字色 */
    --text-main: #1F2937;
    --text-light: #6B7280;
    
    /* 阴影层级 */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    
    /* 综述模式变量占位 */
    --accent: #0284c7; 
}

/* 综述模式覆盖 (紫色系) */
body.mode-review {
    --primary: #5E35B1; 
    --primary-dark: #311B92;
    --primary-light: #F3E8FF;
    --accent: #7B1FA2;
    --gold-main: #8E24AA; 
}

/* --- 基础重置 --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    margin: 0; 
    font-family: var(--font-main); 
    background: var(--bg-body); 
    color: var(--text-main); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
}
a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; border: none; outline: none; background: none; }

/* --- 导航栏 --- */
.park-nav { background: rgba(255,255,255,0.98); height: 70px; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(10px); }
.nav-inner { max-width: 1200px; margin: 0 auto; height: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; position: relative; }

.nav-side-block { display: flex; flex-direction: column; justify-content: center; line-height: 1.3; cursor: pointer; transition: opacity 0.2s; }
.nav-side-block:hover { opacity: 0.7; }
.nav-upper-text { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.nav-lower-text { font-size: 0.7rem; font-weight: 500; color: var(--text-light); font-family: Arial, sans-serif; letter-spacing: 0.5px; text-transform: uppercase; }

.nav-title-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 10; width: 60%; }
.nav-title-box h1 { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--primary); letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-title-box small { display: block; font-size: 0.7rem; color: var(--gold-main); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-top: 2px; }
.nav-logo { align-items: flex-end; text-align: right; }
.nav-logo .nav-upper-text { font-weight: 900; letter-spacing: 1px; }

/* --- Hero 区域 --- */
.hero-section { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: var(--white); text-align: center; position: relative; overflow: hidden; }
.hero-section::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E"); pointer-events: none; }

.hero-index { padding: 60px 20px 50px; }
.hero-article { padding: 80px 20px 130px; }
.hero-content { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto; }

/* --- 搜索框 --- */
.search-wrapper { position: relative; margin: 0 auto 35px; max-width: 600px; height: 54px; display: flex; align-items: center; }
.search-icon-box { position: absolute; left: 20px; width: 24px; height: 24px; z-index: 20; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.search-icon-box svg { width: 22px; height: 22px; stroke: rgba(255,255,255,0.9); stroke-width: 2.5; fill: none; }
.search-input { width: 100%; height: 100%; padding: 0 20px 0 58px; border-radius: 50px; border: 2px solid rgba(255,255,255,0.3); background: rgba(0,0,0,0.2); color: var(--white); font-size: 1.1rem; backdrop-filter: blur(5px); transition: all 0.2s ease; -webkit-appearance: none; }
.search-input::placeholder { color: rgba(255,255,255,0.6); font-size: 1rem; }
.search-input:focus { background: rgba(0,0,0,0.5); border-color: var(--gold-main); outline: none; box-shadow: 0 0 0 4px rgba(192, 157, 99, 0.25); }

/* --- 筛选器 --- */
.filter-container { margin-top: 30px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.15); }
.filter-row { margin-bottom: 25px; display: flex; flex-direction: column; align-items: center; }
.filter-label { font-size: 0.75rem; color: var(--gold-main); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 15px; opacity: 1; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.filter-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; max-width: 950px; }

.filter-btn { 
    background: rgba(0, 0, 0, 0.25); 
    border: 1px solid rgba(255, 255, 255, 0.3); 
    color: #ffffff; 
    padding: 6px 18px; 
    border-radius: 30px; 
    font-size: 0.9rem; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    display: inline-flex; align-items: center; 
    font-weight: 500; backdrop-filter: blur(2px); 
}
.filter-btn:hover { background: rgba(255, 255, 255, 0.15); border-color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.filter-btn.active { background: var(--gold-main); border-color: var(--gold-main); color: #002347; font-weight: 700; box-shadow: 0 0 15px rgba(192, 157, 99, 0.5); }
.tag-count { font-size: 0.85em; font-weight: 400; opacity: 0.8; margin-left: 6px; font-family: var(--font-mono); background: none; color: inherit; padding: 0; border-radius: 0; }
.filter-btn.active .tag-count { background: none; color: inherit; opacity: 0.9; }
.status-bar { margin-top: 20px; font-size: 0.9rem; opacity: 0.8; min-height: 1.4em; font-weight: 500; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }

/* --- 卡片系统 --- */
.main-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; position: relative; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-md); transition: transform 0.3s, box-shadow 0.3s; border: 1px solid #eee; display: flex; flex-direction: column; position: relative; cursor: pointer; height: 100%; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--gold-light); }
.card-ribbon { position: absolute; top: 12px; right: 12px; background: #DC2626; color: white; font-size: 0.65rem; font-weight: 800; padding: 3px 8px; border-radius: 4px; z-index: 10; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.card-category { position: absolute; top: 12px; left: 12px; background: rgba(0, 53, 107, 0.9); backdrop-filter: blur(4px); color: white; padding: 3px 8px; font-size: 0.65rem; font-weight: 700; border-radius: 4px; text-transform: uppercase; }
body.mode-review .card-category { background: rgba(74, 20, 140, 0.9); }
.card-cover { height: 190px; background: var(--white); padding: 20px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #f0f0f0; }
.card-cover img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.5s; }
.card:hover .card-cover img { transform: scale(1.05); }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-light); margin-bottom: 10px; align-items: center; }
.journal-tag { font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; }
body.mode-review .journal-tag { background: #F3E8FF; color: var(--primary); }
.card-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 8px; line-height: 1.4; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-origin { font-size: 0.8rem; color: #9CA3AF; font-style: italic; margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-summary { font-size: 0.9rem; color: #4B5563; margin-bottom: 16px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; text-align: justify; }
.card-footer { border-top: 1px dashed #eee; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-size: 0.7rem; background: #F3F4F6; color: #555; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.read-more { font-size: 0.85rem; font-weight: 700; color: var(--gold-main); display: flex; align-items: center; gap: 4px; }
body.mode-review .read-more { color: var(--accent); }
.pagination { display: flex; justify-content: center; gap: 15px; margin-top: 50px; align-items: center; }
.page-btn { padding: 8px 24px; background: var(--white); border: 1px solid #ddd; border-radius: 20px; cursor: pointer; transition: 0.2s; font-weight: 600; color: var(--text-main); }
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- 文章/综述详情页 --- */
.article-wrapper { max-width: 900px; margin: -100px auto 60px; padding: 60px 70px; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-lg); position: relative; z-index: 10; scroll-behavior: smooth; }
.meta-badge { display: inline-block; background: rgba(255,255,255,0.15); padding: 5px 15px; border-radius: 20px; font-size: 0.9rem; border: 1px solid rgba(255,255,255,0.25); margin-bottom: 25px; backdrop-filter: blur(4px); font-weight: 600; letter-spacing: 0.5px; }
.article-h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 25px; line-height: 1.3; }
.publish-info { font-size: 1rem; opacity: 0.95; line-height: 1.6; }
.publish-info .origin { font-style: italic; opacity: 0.8; font-size: 0.95rem; display: block; margin-bottom: 12px; font-family: var(--font-serif); }

/* --- 通讯作者列表优化 (单行居中模式) --- */
.publish-info .corr-line {
    font-size: 1rem; opacity: 0.95; line-height: 1.6;
    margin-top: 5px; 
    text-align: center; /* 关键：文字整体居中 */
    display: block; 
}

/* 移除所有 Flex 布局和胶囊样式，回归纯文本 */
.publish-info .corr-author {
    color: var(--gold-main); 
    font-weight: 700; 
    display: inline; /* 关键：内联元素，使其随文字流动 */
    /* 移除之前的 flex, gap, margin-top 等属性 */
}
body.mode-review .corr-author { color: #E1BEE7; }

/* 正文排版 */
.article-content { font-size: 1.15rem; line-height: 1.9; color: #374151; font-family: var(--font-serif); text-rendering: optimizeLegibility; word-break: break-word; line-break: strict; }
.article-content p { margin: 0 0 1.15em 0; text-align: justify; text-justify: inter-ideograph; }
.article-content h2 { font-family: var(--font-main); font-size: 1.6rem; color: var(--primary); border-left: 5px solid var(--gold-main); padding-left: 18px; margin: 2.2em 0 0.8em; font-weight: 800; line-height: 1.2; scroll-margin-top: 95px; }
.article-content h3 { font-family: var(--font-main); font-size: 1.3rem; font-weight: 700; color: var(--text-main); margin-top: 1.6em; margin-bottom: 0.6em; border-bottom: 1px solid #eee; padding-bottom: 8px; display: inline-block; scroll-margin-top: 95px; }
body.mode-review .article-content h2 { border-left-color: var(--accent); }
body.mode-review .article-content h3 { border-bottom-color: #E1BEE7; color: var(--primary); }

/* 核心高亮列表样式 */
.highlight-list { list-style: none; padding: 0; margin: 0 0 30px 0; }
.highlight-list li { position: relative; padding-left: 30px; margin-bottom: 15px; color: #4B5563; font-weight: 500; }
.highlight-list li::before { content: "✓"; position: absolute; left: 0; top: 2px; color: var(--white); background: var(--gold-main); width: 20px; height: 20px; border-radius: 50%; font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: bold; }
body.mode-review .highlight-list li::before { background: var(--accent); }

/* 组件：导读框 */
.intro-box, .framework-box { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 35px; margin-bottom: 40px; }
.intro-header { text-align: center; margin-bottom: 25px; }
.intro-label { color: var(--primary); font-size: 1.1rem; font-weight: 900; letter-spacing: 3px; border-bottom: 2px solid var(--gold-light); padding-bottom: 5px; text-transform: uppercase; font-family: var(--font-main); }
body.mode-review .intro-label { border-bottom-color: var(--accent); }
.intro-text { font-style: italic; color: #555; text-align: justify; font-size: 1.05rem; }
.intro-img {
    display: block;
    margin: 30px auto 0;
    border-radius: 8px;
    border: 1px solid #eee;
    width: 500px;
    box-shadow: var(--shadow-md);
}

/* 组件：图文与公式 */
.figure-block { margin-top: 1.6em; padding-top: 0.2em; }
.figure-container { margin: 18px 0 25px; display: flex; flex-direction: column; align-items: center; }
.figure-wrapper { background: var(--white); border: 1px solid #eee; border-radius: 8px; box-shadow: var(--shadow-md); overflow: hidden; text-align: center; margin-bottom: 15px; padding: 0; }
.figure-wrapper img { display: block; width: 100%; height: auto; }
.figure-wrapper.full-width { width: 100%; }
.figure-wrapper.half-width { width: 70%; max-width: 550px; }
.figure-caption { font-size: 0.9rem; font-weight: 700; color: #4B5563; text-align: center; font-family: var(--font-main); }
.figure-caption.inside { margin: 0; padding: 12px 16px; border-top: 1px solid #E5E7EB; background: #F9FAFB; color: #374151; font-size: 0.9rem; font-weight: 700; text-align: center; }
.figure-desc { background: #FAFAFA; padding: 20px 25px; border-radius: 8px; font-size: 1rem; color: #4B5563; text-align: justify; border-left: 4px solid #E5E7EB; width: 100%; }
.math-container { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 20px 0; padding: 10px 5px; text-align: center; }

/* 页内目录 */
.article-toc { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; margin: 0 0 26px; border: 1px solid rgba(31,41,55,0.10); border-radius: 14px; background: linear-gradient(180deg, rgba(59,130,246,0.06), rgba(59,130,246,0.02)); }
body.mode-review .article-toc { background: linear-gradient(180deg, rgba(103,58,183,0.08), rgba(103,58,183,0.03)); }
.article-toc a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 0.95rem; font-weight: 700; text-decoration: none; border: 1px solid rgba(59,130,246,0.18); color: var(--primary); background: rgba(255,255,255,0.65); }
body.mode-review .article-toc a { border-color: rgba(103,58,183,0.20); color: #512DA8; }
.article-toc a:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(17,24,39,0.10); }

/* 引用与页脚 */
.citation-box { background: #1F2937; color: #F3F4F6; padding: 35px; border-radius: 12px; font-family: var(--font-mono); font-size: 0.85rem; margin-top: 70px; overflow-wrap: break-word; line-height: 1.8; }
.citation-box .doi-link { word-break: break-all; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; }
.btn-action { display: flex; width: fit-content; margin: 25px auto 0; align-items: center; gap: 8px; background: var(--primary); color: white; padding: 12px 30px; border-radius: 50px; font-weight: 700; transition: 0.2s; border: 1px solid rgba(255,255,255,0.2); font-family: var(--font-main); text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.9rem; }
.btn-action:hover { background: var(--gold-main); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
body.mode-review .btn-action:hover { background: var(--accent); }
footer { text-align: center; padding: 40px 0; color: var(--text-light); font-size: 0.85rem; border-top: 1px solid #eee; margin-top: 60px; background: var(--white); }

/* 辅助功能 */
.skip-link { position: absolute; left: -999px; top: 10px; z-index: 9999; background: #111827; color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: 0.95rem; }
.skip-link:focus { left: 12px; outline: 3px solid rgba(96,165,250,0.6); outline-offset: 2px; }
.noscript-warning { max-width: 900px; margin: 18px auto 0; padding: 12px 16px; border-radius: 12px; background: rgba(17,24,39,0.06); color: #111827; font-size: 0.95rem; line-height: 1.6; }
#back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: var(--primary); color: white; border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 900; font-size: 1.5rem; }
#back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: var(--gold-main); transform: translateY(-3px); }

/* --- 移动端适配 --- */
@media (max-width: 768px) {
    .nav-inner { padding: 0 15px; }
    .nav-upper-text { display: none; } 
    .nav-logo .nav-upper-text { display: block; font-size: 0.9rem; }
    .hero-index { padding: 60px 15px 50px; }
    .hero-article { padding: 70px 15px 90px; }
    .article-h1 { font-size: 1.6rem; }
    .article-wrapper { margin: -60px 0 0; padding: 40px 20px; border-radius: 20px 20px 0 0; box-shadow: none; width: 100%; }
    .figure-wrapper.half-width { width: 100%; max-width: 100%; }
    .filter-group { gap: 8px; }
    .filter-btn { padding: 5px 14px; font-size: 0.85rem; }
    .card-cover { height: 160px; }
    .article-toc { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .article-toc::-webkit-scrollbar { display: none; }
    .article-toc a { white-space: nowrap; }
    .noscript-warning { margin: 12px 12px 0; }
}

/* --- 打印模式优化 --- */
@media print {
    .park-nav, .search-wrapper, .filter-container, .pagination, footer, .btn-action, .skip-link, #back-to-top, .article-toc { display: none !important; }
    .article-wrapper { box-shadow: none; margin: 0; padding: 0; width: 100%; }
    .hero-section { background: white; color: black; padding: 20px 0; border-bottom: 2px solid #000; }
    .hero-section::before { display: none; }
    .article-h1, .nav-title-box h1, .filter-label { color: black; }
    .card { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
    body { font-size: 12pt; line-height: 1.5; color: #000; background: #fff; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
    .figure-wrapper { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
    .intro-box, .framework-box { break-inside: avoid; border: 1px solid #ccc; background: none; }
}
