/* LongBiosci 公共样式 */
:root {
    --primary: #0f3460;
    --secondary: #16213e;
    --accent: #e94560;
    --success: #00A86B;
    --info: #1976d2;
    --purple: #533483;
}

/* 全站平滑滚动 + 无障碍焦点样式 */
html { scroll-behavior: smooth; }

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

/* 打印样式 */
@media print {
  .header-main, .bottom-nav, .giscus { display: none; }
  body { background: white; }
  .container { box-shadow: none; border-radius: 0; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
}

.header-main {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 50px 40px;
    text-align: center;
    color: white;
}

.header-main h1 { font-size: 36px; margin-bottom: 10px; }
.header-main p { color: #aaa; }

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 30px;
}

.nav-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e8e8e8;
}

.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: var(--info);
}

.nav-card h3 { color: var(--primary); font-size: 18px; margin-bottom: 8px; font-weight: 600; }
.nav-card p { color: #444; font-size: 13px; line-height: 1.5; }

.back-link {
    display: inline-block;
    padding: 20px 30px;
    color: var(--info);
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover { text-decoration: underline; }

.item {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--info);
    border-top: 1px solid #eee;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.item h3 { color: #1a1a2e; margin-bottom: 10px; font-weight: 600; font-size: 17px; }
.item p { color: #333; line-height: 1.7; font-size: 15px; }

.tag {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
}

.tag.blue { background: var(--info); }
.tag.purple { background: var(--purple); }
.tag.accent { background: var(--accent); }

.footer {
    background: #f5f5f5;
    padding: 25px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* 文章阅读优化（手机友好） */
.article-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
}

.breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
    padding: 8px 0;
}
.breadcrumb a {
    color: #4fc3f7;
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-current] { color: #555; }

.article-header {
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.article-header .tag {
    background: var(--success);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 10px;
}

.article-header .date {
    color: #999;
    font-size: 13px;
}

.article-header h1 {
    font-size: 24px;
    color: #1a1a2e;
    margin: 15px 0;
    line-height: 1.4;
}

.article-header .source {
    color: #666;
    font-size: 13px;
}

.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}

.article-content h2 {
    color: var(--primary);
    font-size: 18px;
    margin: 25px 0 15px;
    padding-left: 10px;
    border-left: 3px solid var(--accent);
}

.article-content p {
    margin-bottom: 15px;
}

.article-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 内文重点强调（红色） */
.highlight-red { color: #e74c3c; font-weight: 500; }

/* 新闻文章主图样式 */
.featured-img {
    display: block;
    margin-bottom: 5px;
}

/* 外部来源图样式（带圆角） */
.external-img {
    display: block;
    margin-bottom: 5px;
    max-width: 100%;
    border-radius: 8px;
}

/* 移动端页面标题 */
.mobile-section-title {
    color: #0f3460;
    margin-bottom: 15px;
}

/* 页面版权文本 */
.footer-copy,
.about-copy {
    margin-top: 40px;
    color: #999;
    font-size: 14px;
}

/* 外部链接样式（替代 inline style="color:var(--info)"） */
.external-link {
    color: var(--info);
}

/* 页面副标题（封面副标题等） */
.page-subtitle {
    margin-top: 20px;
    color: #aaa;
    font-size: 16px;
}

/* 研究结果数据表样式 */
.result-box {
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 1.05em;
}

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

.result-table td {
    padding: 8px;
    border: 1px solid #dee2e6;
}

.result-table-header td {
    background: #e9ecef;
    font-weight: bold;
}

.result-table-highlight {
    text-align: center;
    color: #c0392b;
    font-weight: bold;
}

.footer-copy { margin-top: 5px; }

/* 内页 logo（控制高度） */
.logo-inline {
    height: 50px;
    margin-bottom: 1rem;
}

/* 内页返回链接 */
.back-home {
    color: #00A86B;
    display: inline-block;
    margin-bottom: 1rem;
}

/* 通用 section 标题（绿色 #00A86B） */
.section-title {
    color: #00A86B;
    margin-bottom: 1rem;
}

/* 子标题文本 */
.sub-text {
    margin-bottom: 20px;
    color: #666;
}

/* 数据说明框 */
.data-box {
    margin-top: 40px;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 12px;
}

.data-box h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.data-box p {
    color: #666;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 600px) {
    /* 全站移动端优化 */
    html { font-size: 16px; }
    
    .nav-grid { grid-template-columns: 1fr !important; padding: 12px !important; gap: 10px !important; }
    .container { border-radius: 0 !important; margin: 0; box-shadow: none; }
    
    /* 移动端字体和间距优化 */
    body { font-size: 15px; line-height: 1.8; -webkit-text-size-adjust: 100%; }
    .header-main { padding: 25px 15px !important; }
    .header-main h1 { font-size: 22px !important; }
    .header-main p { font-size: 13px !important; }
    .nav-card { padding: 16px !important; min-height: 70px; }
    .nav-card h3 { font-size: 15px !important; margin-bottom: 6px !important; }
    .nav-card p { font-size: 13px !important; }
    
    .item { padding: 14px !important; margin-bottom: 12px !important; }
    .item h3 { font-size: 15px !important; margin-bottom: 8px !important; }
    .item p { font-size: 14px !important; line-height: 1.6 !important; }
    
    .back-link { padding: 12px 15px !important; font-size: 14px !important; display: block; }
    .footer { padding: 15px !important; font-size: 12px !important; }
    h1, h2, h3, h4 { line-height: 1.4; }
    
    /* 手机文章阅读优化 */
    .article-container { padding: 12px !important; }
    .article-header h1 { font-size: 18px !important; }
    .article-content { font-size: 14px !important; line-height: 1.8 !important; }
    .article-content h2 { font-size: 15px !important; }
    .breadcrumb { font-size: 12px !important; }
    
    /* 触摸友好 - 增大点击区域 */
    a, button { min-height: 44px; display: inline-flex; align-items: center; }
    
    /* 图片自适应 */
    img { max-width: 100%; height: auto; }
    
    /* 表格横向滚动 */
    table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* 免责声明文本样式 */
.disclaimer {
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* 英文站底部链接样式 */
.footer-link {
    color: #a0dcd0;
    margin: 0 1rem;
}

/* 表格居中文本样式 */
.table-center {
    text-align: center;
}
