/* 古籍插件全局样式 - 完整版 */

/* 公共容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 归档页与分类页卡片样式 */
.ancient-book-archive.card-style,
.ancient-book-taxonomy.card-style {
    background: #f5f5f0;
    padding: 2rem 0;
}

.archive-header,
.taxonomy-header {
    text-align: left;
    margin-bottom: 2rem;
}

.archive-title,
.taxonomy-title {
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0;
    color: #1e2a2e;
}

.archive-description,
.taxonomy-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* 栏目导航 */
.category-nav {
    margin-bottom: 2rem;
    background: #fff;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow-x: auto;
    white-space: nowrap;
}

.nav-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.nav-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e2f;
    margin-right: 0.2rem;
}

.nav-link {
    display: inline-block;
    font-size: 0.85rem;
    padding: 0.2rem 0.6rem;
    background: #f3f4f6;
    border-radius: 20px;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #8b5a2b;
    color: #fff;
}

/* 书籍列表卡片 */
.book-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.book-card {
    display: flex;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}

.book-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.book-cover {
    flex: 0 0 55%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0;
    padding: 0;
    min-height: 280px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.book-card:hover .book-cover {
    transform: scale(1.02);
    filter: brightness(1.02);
}

.book-cover-placeholder {
    flex: 0 0 55%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    min-height: 280px;
}

.book-info {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-meta-top {
    font-size: 0.85rem;
    color: #8b5a2b;
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.book-meta-top span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.book-meta-top span:not(:last-child)::after {
    content: "·";
    margin-left: 0.5rem;
}

.book-title {
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.book-title a {
    text-decoration: none;
    color: #1e2a2e;
    transition: color 0.2s;
}

.book-title a:hover {
    color: #8b5a2b;
}

.book-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.book-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.book-meta a {
    color: #6c757d;
    text-decoration: none;
}

.book-meta a:hover {
    color: #8b5a2b;
}

.book-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 1.2rem;
    flex: 1;
}

.book-actions {
    text-align: right;
    margin-top: auto;
}

.btn-read, .btn-download {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: #8b5a2b;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-read {
    background: #fff;
    color: #8b5a2b;
    border: 1px solid #8b5a2b;
}

.btn-read:hover {
    background: #8b5a2b;
    color: #fff;
    border-color: #8b5a2b;
}

.btn-download {
    background: #2c7a4d;
    border: none;
}

.btn-download:hover {
    background: #1e5a3a;
    transform: translateY(-1px);
}

/* 分页 */
.pagination {
    margin-top: 2rem;
    text-align: center;
}

.pagination-inner {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pagination-inner a,
.pagination-inner span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination-inner a {
    background: #f3f4f6;
    color: #2c3e2f;
}

.pagination-inner a:hover {
    background: #e5e7eb;
    color: #8b5a2b;
}

.pagination-inner .current {
    background: #8b5a2b;
    color: #fff;
}

/* 单页样式 */
.single-ancient-book.shuge-style {
    background: #faf9f5;
    padding: 2rem 0;
}

.book-layout {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.book-content {
    flex: 2;
    min-width: 0;
}

.book-sidebar {
    flex: 1;
    min-width: 280px;
}

.book-header-inline {
    margin-bottom: 1.5rem;
    text-align: center;
}

.book-title {
    font-size: 2rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
    color: #1e2a2e;
}

.book-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
}

.book-subtitle span {
    margin: 0 0.3rem;
}

.book-subtitle span:not(:last-child)::after {
    content: "·";
    margin-left: 0.6rem;
}

.book-summary,
.book-biography,
.book-comments {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1rem;
    color: #000;
}

.book-biography h2,
.book-comments h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem;
    border-left: 3px solid #8b5a2b;
    padding-left: 0.75rem;
}

.book-details {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.book-details h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem;
    border-left: 3px solid #8b5a2b;
    padding-left: 0.75rem;
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.detail-item {
    display: flex;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 0.6rem;
}

.detail-item strong {
    width: 110px;
    flex-shrink: 0;
    font-weight: 600;
    color: #4a5568;
}

.detail-item span {
    color: #1e2a2e;
}

.admin-score {
    color: #e0a800;
}

.reader-rating-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.reader-rating-card h3 {
    font-size: 1rem;
    margin: 0 0 0.8rem;
}

.rating-stars .star {
    font-size: 1.2rem;
    cursor: pointer;
    color: #ddd;
    letter-spacing: 2px;
}

.rating-stars .star.active {
    color: #ffc107;
}

.rating-info {
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.download-link-bottom {
    margin-top: 1rem;
}

.btn-download {
    display: inline-block;
    background: #8b5a2b;
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.85rem;
}

.related-books {
    margin-top: 2rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
}

.related-books h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem;
    border-left: 3px solid #8b5a2b;
    padding-left: 0.75rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.related-item {
    text-align: center;
}

.related-cover img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.related-item h3 {
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}

.related-item a {
    text-decoration: none;
    color: #1e2a2e;
}

.related-item a:hover {
    color: #8b5a2b;
}

/* 评论样式 */
.book-comments .comment-list {
    list-style: none;
    padding: 0;
}

.book-comments .comment {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: #f8f5ed;
    border-radius: 8px;
}

.book-comments .comment-author {
    font-weight: 600;
}

.book-comments .comment-metadata {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.book-comments .comment-content {
    font-size: 0.9rem;
}

.comment-respond {
    margin-top: 1rem;
}

.comment-respond input,
.comment-respond textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.comment-respond .form-submit input {
    background: #8b5a2b;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    width: auto;
}

/* 短代码网格 */
.ancient-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.ancient-books-grid .book-item {
    text-align: center;
}

.ancient-books-grid .book-item img {
    max-width: 100%;
    border-radius: 8px;
}

/* 响应式 */
@media (max-width: 768px) {
    .book-card {
        flex-direction: column;
    }
    .book-cover,
    .book-cover-placeholder {
        flex: 0 0 200px !important;
        width: 100%;
        min-height: 200px;
    }
    .book-info {
        padding: 1.2rem;
    }
    .book-title {
        font-size: 1.2rem;
    }
    .book-actions {
        text-align: left;
        margin-top: 0.5rem;
    }
    .btn-read, .btn-download {
        margin-left: 0;
        margin-right: 0.5rem;
    }

    .book-layout {
        flex-direction: column;
    }
    .detail-item {
        flex-direction: column;
    }
    .detail-item strong {
        width: auto;
        margin-bottom: 0.2rem;
    }
}