/* 番茄小说数据分析平台 - 通用组件样式 */

/* 筛选区域 */
.filter-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-item label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.filter-item select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 120px;
}

.filter-item select:hover {
    border-color: #ff6b35;
}

.filter-item select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.08);
}

/* Tab内容区域 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 统计卡片 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #ff6b35;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
}

/* 区块 */
.section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 3px solid #ff6b35;
    padding-bottom: 0.5rem;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* 排名徽章 */
.ranking {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background: #ff6b35;
    color: white;
    font-weight: bold;
}

.ranking.top3 {
    background: #f59e0b;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 20px;
    font-size: 0.85rem;
}

.status-serializing {
    background: #d1fae5;
    color: #065f46;
}

/* 功能特性 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s;
}

.feature-item:hover {
    border-color: #ff6b35;
    background: #f9fafb;
}

.feature-item h3 {
    color: #ff6b35;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.feature-item p {
    color: #666;
    font-size: 0.95rem;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
    background: white;
    margin-top: 2rem;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}

/* 响应式 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .container {
        padding: 1rem;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    .filter-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .category-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ==================== 新增样式 ==================== */

/* 筛选栏 */
.filter-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* 分类Tab */
.category-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-button {
    padding: 0.5rem 1.25rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    white-space: nowrap;
    color: #666;
}

.tab-button:hover {
    border-color: #ff6b35;
    background: rgba(255, 107, 107, 0.05);
    color: #ff6b35;
}

.tab-button.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* 筛选下拉框 */
.filter-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 2rem;
    background-color: white;
}

.filter-select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* 搜索框 */
.search-box input {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 250px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #ff6b35;
    width: 300px;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* 热力色 */
.heat-low {
    color: #6b7280;
    font-weight: 500;
}

.heat-medium {
    color: #ff6b35;
    font-weight: 600;
}

.heat-high {
    color: #f59e0b;
    font-weight: 700;
}

/* 表格行可点击 */
.book-row {
    cursor: pointer;
    transition: background 0.2s;
}

.book-row:hover {
    background: #f9fafb;
}

/* 详情面板 */
.detail-panel {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.detail-panel.open {
    right: 0;
}

.detail-panel-content {
    padding: 2rem;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.detail-header h3 {
    font-size: 1.5rem;
    color: #333;
    line-height: 1.4;
    padding-right: 2rem;
}

.close-button {
    background: none;
    border: none;
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    line-height: 1;
    transition: color 0.3s;
}

.close-button:hover {
    color: #333;
}

.detail-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 详情数据卡片 */
.detail-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-stat {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-stat .label {
    font-size: 0.85rem;
    color: #6b7280;
}

.detail-stat .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

/* 详情区块 */
.detail-section h4 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.detail-section p,
.detail-desc {
    color: #666;
    line-height: 1.8;
}

.author-sign {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 0.25rem !important;
}

/* 标签容器 */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* 平台标签（番茄官方标签） */
.tag-platform {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff6b35;
    font-weight: 500;
}

/* 提取标签（程序从简介提取） */
.tag-extracted {
    background: #fef3c7;
    color: #92400e;
}

/* 关键词高亮 */
.keyword-highlight {
    background: #fef3c7;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

/* 相似书籍 */
.similar-books {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.similar-book-item {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.similar-book-item:hover {
    background: #e5e7eb;
}

.similar-book-item strong {
    color: #333;
}

.similarity-score {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.similar-book-item p {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* 操作按钮 */
.detail-actions {
    margin-top: 1rem;
}

.action-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b35;
    text-decoration: none;
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.action-button:hover {
    background: rgba(255, 107, 107, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.action-button.primary {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
}

.error {
    text-align: center;
    padding: 3rem;
    color: #ef4444;
}

/* ==================== 按钮统一样式 ==================== */

/* 所有按钮的基础样式 */
button {
    font-family: inherit;
    border: none;
    outline: none;
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.3);
}

/* ==================== 收藏夹样式 ==================== */

/* 收藏夹按钮 */
.favorites-toggle {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.favorites-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.favorites-toggle:active {
    transform: translateY(0);
}

/* 收藏夹区域 */
.favorites-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 收藏按钮（详情面板） */
.action-button.favorited {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* 取消收藏按钮 */
.remove-favorite-btn {
    padding: 0.25rem 0.75rem;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.remove-favorite-btn:hover {
    background: #fecaca;
}

/* ==================== 趋势分析页样式 ==================== */

/* 词云容器 */
.wordcloud-container {
    width: 100%;
    height: 400px;
    position: relative;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hint {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* 洞察卡片 */
.insights-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.insight-card {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff6b35;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.insight-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.insight-card p {
    font-size: 1rem;
    line-height: 1.6;
}

.insight-card strong {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

/* ==================== 对比工具页样式 ==================== */

/* 对比选择区域 */
.compare-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .compare-selection {
        grid-template-columns: 1fr;
    }
}

/* 搜索区域 */
.search-area-wrapper {
    position: relative;
}

.search-area {
    width: 100%;
}

#bookSearchInput {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

#bookSearchInput:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* 搜索结果 */
.search-results {
    position: absolute;
    left: 0;
    width: 100%;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    box-sizing: border-box;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.search-result-item:hover {
    background: #f9fafb;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item strong {
    display: block;
    color: #333;
}

.search-result-item span {
    color: #6b7280;
    font-size: 0.9rem;
}

.search-result-item small {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* 已选书籍 */
.selected-books h4 {
    margin-bottom: 1rem;
    color: #555;
}

.selected-books-list {
    min-height: 100px;
}

.selected-book-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.selected-book-item strong {
    color: #333;
}

.selected-book-item span {
    color: #6b7280;
    font-size: 0.9rem;
}

.remove-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #fecaca;
}

/* 对比按钮区域 */
.section .action-button {
    margin: 0 0.5rem 0 0;
}

/* 对比结果 */
.compare-result {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 对比表格 */
.compare-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

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

.compare-table th,
.compare-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.compare-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #555;
}

.compare-table tbody tr:hover {
    background: #f9fafb;
}

/* 图表容器 */
.compare-charts {
    margin: 2rem 0;
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-container h4 {
    margin-bottom: 1rem;
    color: #555;
}

/* 分析结论 */
.compare-analysis {
    margin-top: 2rem;
}

.analysis-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
}

.analysis-card h4 {
    margin-bottom: 1rem;
}

.analysis-card p {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.analysis-card strong {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.no-result {
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* 单选按钮组样式 */
.radio-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
    user-select: none;
}

.radio-label:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.radio-label input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    color: #ff6b35;
    font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b35;
}

/* 筛选摘要 */
.filter-summary {
    background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid #ff6b35;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

.filter-summary span {
    font-weight: 600;
    color: #ff6b35;
}

/* 可点击的卡片标题 */
.clickable-title,
.clickable-title *,
.clickable-title *::before,
.clickable-title *::after {
    cursor: pointer !important;
}

.clickable-title {
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
    position: relative;
}

.clickable-title:hover {
    background: rgba(255, 107, 107, 0.08);
}

.clickable-title:hover .card-title {
    color: #ff6b35;
}

.clickable-title::after {
    content: '→';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #ff6b35;
    font-size: 18px;
    pointer-events: none;
}

.clickable-title:hover::after {
    opacity: 1;
}

/* 查看更多行样式 */
.view-more-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.view-more-row:hover {
    background-color: rgba(255, 107, 107, 0.05);
}

.view-more-row span:hover {
    text-decoration: underline;
}

/* ==================== 书籍详情抽屉样式 ==================== */

/* 抽屉容器 */
.drawer {
    position: fixed;
    top: 0;
    right: -600px; /* 默认隐藏在屏幕右侧外 */
    width: 600px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 10000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 抽屉打开状态 */
.drawer.open {
    right: 0;
}

/* 抽屉遮罩层 */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

/* 遮罩层打开状态 */
.drawer-overlay.open {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

/* 抽屉调整宽度手柄 */
.drawer-resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s;
}

.drawer-resize-handle:hover {
    background: #ff6b35;
}

.drawer.resizing .drawer-resize-handle {
    background: #ff6b35;
}

/* 抽屉头部 */
.drawer-header {
    flex-shrink: 0;
    padding: 24px;
    border-bottom: 1px solid #e8e8e8;
    background: rgba(255, 107, 107, 0.1);
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff6b35;
}

/* 抽屉关闭按钮 */
.drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 书籍详情标题 */
.book-detail-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-right: 40px;
}

/* 书籍详情元数据 */
.book-detail-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    opacity: 0.9;
}

/* 书籍详情主体 */
.book-detail-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* 书籍详情区域 */
.book-detail-section {
    margin-bottom: 24px;
}

.book-detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff6b35;
    display: inline-block;
}

/* 书籍详情网格布局 */
.book-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* 书籍详情项 */
.book-detail-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.book-detail-item .label {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.book-detail-item .value {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

/* 书籍详情标签 */
.book-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.book-detail-tag {
    padding: 6px 12px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff6b35;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

/* 书籍详情简介 */
.book-detail-description {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ff6b35;
}

/* 高亮标签 */
.highlight-tag {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .drawer {
        width: 100%;
        right: -100%;
    }

    .book-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* 章节分析按钮样式 */
.btn-analysis {
    padding: 6px 12px;
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-analysis:hover {
    transform: translateY(-2px);
    background: rgba(255, 107, 107, 0.15);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.btn-analysis:active {
    transform: translateY(0);
}

.btn-collect {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    color: #f59e0b;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-collect:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.2) 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-collect:active {
    transform: translateY(0);
}

/* 待分析列表项样式 */
.analysis-queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.analysis-queue-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.analysis-queue-item.selected {
    border: 2px solid #ff6b35;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(255, 140, 97, 0.05) 100%);
}

.analysis-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.analysis-book-info {
    flex: 1;
}

.analysis-book-title {
    font-weight: 600;
    font-size: 15px;
    color: #2d3748;
    margin-bottom: 4px;
}

.analysis-book-meta {
    font-size: 13px;
    color: #718096;
}

.analysis-remove-btn {
    padding: 6px 12px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.analysis-remove-btn:hover {
    background: #c53030;
    transform: scale(1.05);
}

/* 对比视图样式 */
.analysis-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.analysis-compare-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.analysis-metric {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.analysis-metric:last-child {
    border-bottom: none;
}

.analysis-metric-label {
    color: #718096;
    font-size: 14px;
}

.analysis-metric-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.analysis-chart-container {
    margin-top: 20px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
}

/* ==================== Hero按钮样式（首页主按钮风格） ==================== */
.btn-hero {
    padding: 14px 32px !important;
    background: #d63031 !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(214, 48, 49, 0.3) !important;
    font-size: 16px !important;
    border-radius: 50px !important;
    border: none !important;
}

.btn-hero:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(214, 48, 49, 0.4) !important;
    background: #c0392b !important;
}

.btn-hero:active {
    transform: translateY(0) !important;
}
