/* ========== 通用页面宽度 ========== */
.bookpress-primary {
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ========== 面包屑导航 ========== */
.bookpress-breadcrumb {
    margin-top: 25px;
    margin-bottom: 30px;
    padding: 12px 18px;
    font-size: 0.95rem;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.bookpress-breadcrumb a {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s;
    padding: 2px 4px;
}
.bookpress-breadcrumb a:hover {
    color: #1a252f;
    background: rgba(44,62,80,0.08);
}
.bookpress-breadcrumb .separator {
    margin: 0 12px;
    color: #bbb;
    font-size: 0.8rem;
    font-weight: 300;
    user-select: none;
}
.bookpress-breadcrumb .current {
    color: #222;
    font-weight: 600;
    background: rgba(0,0,0,0.02);
    padding: 2px 8px;
}

/* ========== 通用组件 ========== */
.bookpress-cover {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
    transition: transform 0.2s ease;
}
.bookpress-cover:hover {
    transform: scale(1.02);
}

/* ========== 单本图书页（左右两栏布局） ========== */
.bookpress-single-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.bookpress-left-column {
    flex: 1;
    min-width: 0;
}
.bookpress-right-column {
    flex: 0 0 300px;
    max-width: 300px;
}

/* 左栏区块样式 */
.bookpress-left-column .bookpress-single-book,
.bookpress-left-column .bookpress-content {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
}
.bookpress-left-column .bookpress-comments {
    background: transparent;
    padding: 0;
    border: none;
    margin-bottom: 20px;
}
.bookpress-left-column .bookpress-single-book {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

/* 封面与信息区 */
.bookpress-cover-area {
    flex: 0 0 300px;
    max-width: 300px;
}
.bookpress-cover-image {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
}
.bookpress-info-area {
    flex: 1;
    min-width: 280px;
}
.bookpress-title {
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    color: #222;
    line-height: 1.3;
}
.bookpress-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}
.bookpress-meta-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
}
.bookpress-meta-table th,
.bookpress-meta-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}
.bookpress-meta-table th {
    width: 80px;
    color: #888;
    font-weight: normal;
}

/* 原作名小字 */
.bookpress-original-title {
    font-size: 0.85rem;
    color: #888;
    margin-left: 8px;
    font-style: italic;
    font-weight: normal;
}

/* ========== 作者独立区域（美化） ========== */
.bookpress-author-section {
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 25px;
}
.bookpress-author-section .bookpress-author-card {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}
.bookpress-author-section .author-card-left {
    flex-shrink: 0;
    width: 100px;
}
.bookpress-author-section .author-card-avatar,
.bookpress-author-section .author-card-avatar-placeholder {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 2px solid #d0d0d0;
    display: block;
}
.bookpress-author-section .author-card-avatar-placeholder {
    background: #2c3e50;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bookpress-author-section .author-card-right {
    flex: 1;
    min-width: 0;
}
.bookpress-author-section .author-card-name {
    margin: 0 0 12px;
    font-size: 1.3rem;
    font-weight: 600;
}
.bookpress-author-section .author-card-name a {
    color: #333;
    text-decoration: none;
}
.bookpress-author-section .author-card-name a:hover {
    color: #1a252f;
}
.bookpress-author-section .author-card-bio {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}
.bookpress-author-section .author-card-bio p {
    margin-bottom: 0.8em;
}

/* ========== 评分与操作区（缩小与表格的间距） ========== */
.bookpress-rating-and-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 15px;
    padding: 20px 25px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    box-sizing: border-box;
}
.bookpress-user-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    max-width: 450px;
}
.bookpress-global-rating {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 18px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}
.bookpress-avg-rating-value {
    font-weight: 700;
    font-size: 2.4rem;
    color: #2c3e50;
    line-height: 1;
    margin-right: 2px;
}
.bookpress-global-rating::before {
    content: "★";
    font-size: 1.4rem;
    color: #2c3e50;
    margin-right: 4px;
}
.bookpress-user-actions .label {
    font-weight: 600;
    margin-right: 8px;
    color: #444;
    font-size: 0.9rem;
}
.bookpress-status-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}
.status-btn {
    background: #fff;
    border: 1px solid #ccc;
    padding: 7px 18px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.25s;
    font-weight: 500;
    color: #555;
}
.status-btn:hover {
    background: #f0f0f0;
    border-color: #aaa;
}
.status-btn.active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
.status-btn.remove {
    background: transparent;
    color: #aaa;
    border: none;
    padding: 6px 10px;
}
.status-btn.remove:hover {
    color: #c0392b;
}
.status-btn.remove.hidden {
    display: none;
}
.bookpress-rating-stars {
    display: flex;
    align-items: center;
}
.stars .star {
    font-size: 1.9rem;
    cursor: pointer;
    color: #d5d5d5;
    margin-right: 6px;
    transition: all 0.2s;
}
.stars .star:hover {
    color: #f1c40f;
    transform: scale(1.15);
}
.stars .star.filled {
    color: #f39c12;
}

/* 内容区 */
.bookpress-content {
    margin-top: 0;
    line-height: 1.8;
    color: #444;
}
.bookpress-content h2 {
    font-size: 1.5rem;
    margin: 1.5em 0 0.8em;
    padding-bottom: 0.3em;
    border-bottom: 2px solid #eee;
    color: #333;
}
.bookpress-content h3 {
    font-size: 1.3rem;
    margin: 1.2em 0 0.6em;
    color: #444;
    border-left: 4px solid #2c3e50;
    padding-left: 12px;
}
.bookpress-content h4 {
    font-size: 1.1rem;
    margin: 1em 0 0.5em;
    color: #555;
}

/* 目录与丛书信息（在正文后） */
.bookpress-contents,
.bookpress-series-info {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
}
.bookpress-contents h3,
.bookpress-series-info h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.bookpress-contents-text,
.bookpress-series-info-text {
    white-space: pre-wrap;
    line-height: 1.8;
    color: #555;
}

/* ========== 右栏小工具样式（背景与左栏统一） ========== */
.bookpress-right-column .widget {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 20px;
    margin-bottom: 20px;
}
.bookpress-right-column .widget:last-child {
    margin-bottom: 0;
}
.bookpress-right-column .widget-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* ========== 标签、相关推荐、上下篇 ========== */
.bookpress-tags {
    margin: 20px 0;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.bookpress-tags-label {
    font-weight: 600;
    color: #555;
    margin-right: 8px;
}
.bookpress-tag-item {
    display: inline-block;
    background: #eef2f7;
    color: #555;
    padding: 4px 12px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.bookpress-tag-item:hover {
    background: #2c3e50;
    color: #fff;
}
.bookpress-related {
    margin: 30px 0;
    background: #fff;
    padding: 25px;
    border: 1px solid #e8e8e8;
}
.bookpress-related-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c3e50;
}
.bookpress-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.bookpress-related-card {
    text-align: center;
}
.bookpress-related-cover-link {
    display: block;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #ddd;
    transition: transform 0.2s;
}
.bookpress-related-cover-link:hover {
    transform: translateY(-3px);
}
.bookpress-related-cover {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 2/3;
    object-fit: cover;
}
.bookpress-related-book-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}
.bookpress-related-book-title a {
    color: #333;
    text-decoration: none;
}
.bookpress-related-book-title a:hover {
    color: #2c3e50;
}
.bookpress-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0;
    background: #fff;
    padding: 20px;
    border: 1px solid #e8e8e8;
}
.bookpress-nav-item {
    flex: 1;
    min-width: 0;
}
.bookpress-nav-item.next {
    text-align: right;
}
.nav-label {
    display: block;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    word-break: break-word;
    transition: color 0.2s;
}
.nav-link:hover {
    color: #2c3e50;
}
.nav-empty {
    color: #bbb;
    font-style: italic;
}

/* ========== 归档页英雄区及网格 ========== */
.bookpress-hero {
    position: relative;
    margin-top: 40px;
    margin-bottom: 40px;
    overflow: hidden;
    border: 1px solid #d0d0d0;
}
.bookpress-hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 40px;
    text-align: center;
    background: rgba(44,62,80,0.7);
}
.bookpress-hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px 0;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    letter-spacing: 4px;
}
.bookpress-hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-weight: 300;
}
.bookpress-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    z-index: 1;
}
.bookpress-books-archive-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}
.bookpress-archive-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.bookpress-archive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.bookpress-archive-cover-link {
    display: block;
    width: 100%;
    padding-top: 140%;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}
.bookpress-archive-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.bookpress-archive-card:hover .bookpress-archive-cover {
    transform: scale(1.05);
}
.bookpress-archive-info {
    padding: 15px;
    text-align: center;
}
.bookpress-archive-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.4;
}
.bookpress-archive-title a {
    color: #333;
    text-decoration: none;
}
.bookpress-archive-title a:hover {
    color: #2c3e50;
}
.bookpress-archive-publisher {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}
.bookpress-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    justify-content: center;
}
.cat-link {
    display: inline-block;
    padding: 8px 20px;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
}
.cat-link:hover {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
.cat-link.active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

/* ========== 作者存档页样式 ========== */
.bookpress-author-archive {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    text-align: center;
}
.bookpress-author-archive .author-avatar {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 4px solid #e0e0e0;
}
.bookpress-author-archive .author-avatar-placeholder {
    width: 150px;
    height: 150px;
    background: #2c3e50;
    color: #fff;
    font-size: 4rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 4px solid #e0e0e0;
}
.bookpress-author-archive .author-name {
    font-size: 2rem;
    margin: 0 0 20px;
    color: #222;
}
.bookpress-author-archive .author-bio {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    text-align: left;
    margin-top: 20px;
}

/* ========== 短代码网格及小工具 ========== */
.bookpress-books.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    margin: 30px 0;
}
.bookpress-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bookpress-widget-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    align-items: center;
    gap: 12px;
}
.bookpress-widget-cover {
    width: 45px;
    height: auto;
    border: 1px solid #ddd;
}
.bookpress-widget-author {
    font-size: 0.8rem;
    color: #aaa;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .bookpress-primary { padding: 0 15px; }
    .bookpress-single-layout { flex-direction: column; }
    .bookpress-right-column { flex: 1; max-width: 100%; }
    .bookpress-left-column .bookpress-single-book { flex-direction: column; }
    .bookpress-rating-and-actions { flex-direction: column; align-items: flex-start; padding: 15px; }
    .bookpress-user-actions { max-width: 100%; }
    .bookpress-related-grid { grid-template-columns: repeat(2, 1fr); }
    .bookpress-post-nav { flex-direction: column; gap: 15px; }
    .bookpress-books-archive-grid { grid-template-columns: repeat(2, 1fr); }
    .bookpress-author-archive { padding: 20px; }
}
@media (max-width: 480px) {
    .bookpress-books-archive-grid { grid-template-columns: 1fr; }
}

/* ========== 目录折叠按钮 ========== */
.contents-toggle-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 16px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    transition: all 0.2s;
}
.contents-toggle-btn:hover {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

/* ========== 译者卡片（“创作者在读到”） ========== */
.bookpress-translator-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 25px;
    margin-bottom: 20px;
}
.translator-section-title {
    font-size: 1.2rem;
    color: #333;
    margin: 0 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.translator-card-inner {
    display: flex;
    gap: 20px;
    align-items: center;
}
.translator-card-left {
    flex-shrink: 0;
    width: 100px;
}
.translator-card-avatar,
.translator-card-avatar-placeholder {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 2px solid #d0d0d0;
    display: block;
}
.translator-card-avatar-placeholder {
    background: #2c3e50;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.translator-card-right {
    flex: 1;
    min-width: 0;
}
.translator-card-name {
    margin: 0 0 12px;
    font-size: 1.3rem;
    font-weight: 600;
}
.translator-card-name a {
    color: #333;
    text-decoration: none;
}
.translator-card-name a:hover {
    color: #2c3e50;
}
.translator-card-bio {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}
.translator-card-bio p {
    margin-bottom: 0.8em;
}

/* ========== 作者/译者存档页 ========== */
.bookpress-author-archive {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border: 1px solid #e0e0e0;
    text-align: center;
}
.author-avatar-wrap {
    margin-bottom: 20px;
}
.author-avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid #e0e0e0;
    display: inline-block;
}
.author-name {
    font-size: 2rem;
    margin: 0 0 20px;
    color: #222;
}
.author-bio {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
}
.author-books-heading {
    font-size: 1.5rem;
    margin: 40px 0 20px;
    text-align: center;
    color: #333;
}
/* 复用图书归档网格样式，需确保 .bookpress-books-archive-grid 已定义 */

/* ========== 分页样式（政务风格，加强权重） ========== */
.bookpress-pagination .page-numbers,
.page-numbers {  /* 双保险 */
    display: inline-block;
    padding: 6px 14px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid #d0d0d0;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.bookpress-pagination .page-numbers:hover,
.page-numbers:hover {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
.bookpress-pagination .page-numbers.current,
.page-numbers.current {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
.bookpress-pagination .page-numbers.dots,
.page-numbers.dots {
    background: transparent;
    border: none;
    color: #999;
    padding: 6px 10px;
}
/* 兼容WordPress默认分页（如果主题输出类名不同） */
.nav-links .page-numbers {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid #d0d0d0;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.nav-links .page-numbers:hover {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
.nav-links .page-numbers.current {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
.nav-links .page-numbers.dots {
    background: transparent;
    border: none;
    color: #999;
    padding: 6px 10px;
}