/* 阅读页面专用样式 */
#reading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 0;
}

.reading-header {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.reading-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.reading-header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* 书籍卡片链接样式 */
.book-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* 推荐书籍区域样式 */
#recommended-books {
    background: rgba(102, 126, 234, 0.15); /* 淡紫色半透明背景 */
    margin: 40px 0;
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px); /* 添加模糊效果增强现代感 */
}

#recommended-books .section-title {
    font-size: 1.8rem;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 推荐书籍榜单样式 - 一行一本书 */
#recommended-books .books-grid {
    display: flex;
    flex-direction: column;
    gap: 0; /* 移除间隙，使用分界线代替 */
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* 榜单书籍条目样式 */
#recommended-books .book-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s ease;
    color: #333;
    display: flex;
    flex-direction: row;
    height: auto;
    cursor: pointer;
    margin: 0;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.833); /* 添加分界线 */
}

/* 最后一本书不显示分界线 */
#recommended-books .book-card:last-child {
    border-bottom: none;
}

#recommended-books .book-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 榜单书籍封面样式 */
#recommended-books .book-cover {
    height: 150px;
    width: 120px;
    min-width: 120px;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
    border-radius: 5px;
}

#recommended-books .book-card:hover .book-cover {
    height: 150px;
}

/* 榜单书籍信息样式 */
#recommended-books .book-info {
    padding: 0 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* 列表页仅展示概况：隐藏互动元素（桌面与移动端通用） */
#recommended-books .book-actions { display: none !important; }
#recommended-books .book-comments { display: none !important; }

#recommended-books .book-card:hover .book-info {
    padding: 0 20px;
}

#recommended-books .book-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #4e54c8;
}

#recommended-books .book-description {
    flex-grow: 1;
    margin-bottom: 15px;
    line-height: 1.6;
    /* 默认显示描述信息 */
    max-height: 200px;
    opacity: 1;
    overflow: hidden;
}

#recommended-books .book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#recommended-books .book-card:hover .book-meta {
    opacity: 1;
}

/* 优秀作者区域样式 */
#featured-authors {
    background: rgba(118, 75, 162, 0.15); /* 淡紫红色半透明背景 */
    margin: 40px 0;
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px); /* 添加模糊效果增强现代感 */
}

#featured-authors .section-title {
    font-size: 1.8rem;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 优秀作者容器样式 */
#featured-authors .authors-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 优秀作者信息样式 */
#featured-authors .author-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #333;
    display: flex;
    flex-direction: column;
    padding: 20px;
    width: 100%;
    max-width: 1000px;
}

#featured-authors .author-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#featured-authors .author-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #4e54c8;
}

#featured-authors .author-description {
    flex-grow: 1;
    margin-bottom: 15px;
    line-height: 1.6;
}

#featured-authors .author-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#featured-authors .author-info:hover .author-meta {
    opacity: 1;
}

.author-date {
    color: #777;
    font-size: 0.9rem;
}

.author-tag {
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* 其他书籍区域样式 */
#other-books {
    background: rgba(78, 84, 200, 0.15); /* 淡蓝紫色半透明背景 */
    margin: 40px 0;
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px); /* 添加模糊效果增强现代感 */
}

#other-books .section-title {
    font-size: 1.8rem;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 其他书籍网格样式 - 每行三个固定大小 */
#other-books .books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 固定大小的书籍卡片样式 */
#other-books .book-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    /* 固定卡片大小 */
    min-width: 250px;
    max-width: 300px;
    min-height: 400px;
    margin: 0 auto;
    padding: 0;
}

#other-books .book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

#other-books .book-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
}

#other-books .book-card:hover .book-cover {
    height: 200px; /* 保持高度不变 */
}

#other-books .book-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

#other-books .book-card:hover .book-info {
    padding: 20px; /* 保持内边距不变 */
}

#other-books .book-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #4e54c8;
}

#other-books .book-description {
    flex-grow: 1;
    margin-bottom: 15px;
    line-height: 1.6;
    /* 默认显示描述信息 */
    max-height: 200px;
    opacity: 1;
    overflow: hidden;
}

#other-books .book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#other-books .book-card:hover .book-meta {
    opacity: 1;
}

.book-date {
    color: #777;
    font-size: 0.9rem;
}

.book-tag {
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .reading-header {
        padding: 40px 20px;
    }
    
    .reading-header h2 {
        font-size: 2rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }
    
    .book-card {
        margin-bottom: 10px;
    }
    
    .book-card:hover .book-cover {
        height: 200px;
    }
    
    .book-card:hover .book-info {
        padding: 20px;
    }
    
    .book-card:hover .book-description {
        max-height: 0;
        opacity: 0;
    }
    
    /* 推荐书籍区域在移动端的响应式处理 */
    #recommended-books .book-card {
        flex-direction: row;
        padding: 15px;
        min-height: 200px;
    }
    
    #recommended-books .book-cover {
        width: 120px;
        height: 160px;
        min-width: 120px;
        flex-shrink: 0;
    }
    
    #recommended-books .book-info {
        padding: 0 15px;
        flex: 1;
    }
    
    #recommended-books .book-actions {
        display: none; /* 列表页不展示点赞/收藏/分享 */
    }
    
    #recommended-books .action-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    #recommended-books .book-comments { display: none; }
    
    #recommended-books .comment-form {
        margin-top: 10px;
    }
    
    #recommended-books .comment-input {
        min-height: 60px;
    }
    
    #recommended-books .comment-form-actions {
        justify-content: center;
    }
    
    /* 其他书籍区域在移动端的响应式处理 */
    #other-books .books-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }
    
    #other-books .book-card {
        min-width: auto;
        max-width: none;
        min-height: auto;
        width: 100%;
    }
}

/* 博客元素样式 */
.book-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.star.active {
    color: #ffd700;
}

.rating-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.book-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.action-btn.liked {
    background: #ff6b6b;
    color: white;
}

.action-btn.favorited {
    background: #ffd700;
    color: #333;
}

.action-btn .icon {
    font-size: 1rem;
}

.action-btn .count {
    font-weight: 600;
}

.action-btn .text {
    font-weight: 500;
}

/* 评论系统样式 */
.book-comments {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comments-header h4 {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

.add-comment-btn {
    background: #4e54c8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-comment-btn:hover {
    background: #3a3f9e;
}

.comments-list {
    margin-bottom: 15px;
}

.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    background: #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.comment-text {
    color: #555;
    line-height: 1.4;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-date {
    color: #999;
    font-size: 0.8rem;
}

.comment-like {
    background: none;
    border: none;
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.comment-like:hover {
    background: #f0f0f0;
    color: #ff6b6b;
}

.comment-form {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.comment-input {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.comment-input:focus {
    outline: none;
    border-color: #4e54c8;
}

.comment-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.submit-comment, .cancel-comment {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-comment {
    background: #4e54c8;
    color: white;
}

.submit-comment:hover {
    background: #3a3f9e;
}

.cancel-comment {
    background: #f5f5f5;
    color: #666;
}

.cancel-comment:hover {
    background: #e0e0e0;
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card {
    animation: fadeInUp 0.6s ease forwards;
}

.book-card:nth-child(2) {
    animation-delay: 0.2s;
}

.book-card:nth-child(3) {
    animation-delay: 0.4s;
}