/* 统一文献卡片样式 */
.literature-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    background: #f8fafc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.literature-card summary {
    font-weight: 600;
    cursor: pointer;
    color: #1e40af;
}

.literature-card details[open] {
    margin-top: 12px;
}

/* 索引表格美化 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th, table td {
    border: 1px solid #cbd5e1;
    padding: 10px 12px;
    text-align: left;
}

table th {
    background: #f1f5f9;
    font-weight: 600;
}

/* 返回顶部按钮（纯 CSS，无 JS） */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1e40af;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
}

.back-to-top:hover {
    background: #1e3a8a;
}

/* 移动端侧边栏优化 */
@media (max-width: 768px) {
    .chapter { font-size: 0.95rem; }
}

/* 文献卡片内部样式优化 */
.literature-card p {
    margin: 8px 0;
}

.literature-card .metadata {
    font-size: 0.9em;
    color: #64748b;
    margin-bottom: 12px;
}

.literature-card .links {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 索引页面样式 */
.index-section h2 {
    color: #1e40af;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    margin-top: 24px;
}

.index-section h3 {
    color: #374151;
    margin-top: 16px;
}

/* 搜索高亮 */
.highlight {
    background-color: #fef3c7;
    padding: 2px 4px;
    border-radius: 3px;
}