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

/* 可点击行的样式 */
.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-row:hover {
    background: #f0f8ff !important;
}

/* 抽屉遮罩层 */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* 抽屉主体 */
.drawer {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    min-width: 400px;
    max-width: 900px;
    height: 100vh;
    background: white;
    z-index: 10001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.drawer.open {
    right: 0 !important;
    display: flex !important;
}

/* 抽屉宽度调整手柄 */
.drawer-resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 10;
}

.drawer-resize-handle:hover,
.drawer.resizing {
    background: rgba(255, 107, 107, 0.3);
}

/* 抽屉头部 */
.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.drawer-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

/* 书籍详情抽屉的header特殊样式 */
.drawer-header .book-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-right: auto;
    padding-right: 50px;
}

.drawer-header .book-detail-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #666;
}

/* 关闭按钮 */
.drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.drawer-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* 抽屉内容区 */
.drawer-content {
    padding: 20px;
}

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

.book-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    padding-right: 40px;
    line-height: 1.4;
}

.book-detail-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
}

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

.book-detail-body {
    padding: 24px;
}

.book-detail-section {
    margin-bottom: 24px;
}

.book-detail-section:last-child {
    margin-bottom: 0;
}

.book-detail-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid #ff6b35;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.book-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fafbfc;
    border-radius: 8px;
    font-size: 13px;
}

.book-detail-item .label {
    color: #666;
}

.book-detail-item .value {
    font-weight: 500;
    color: #1a1a1a;
}

.book-detail-description {
    background: #fafbfc;
    padding: 16px;
    border-radius: 8px;
    line-height: 1.8;
    color: #555;
    font-size: 14px;
}

.book-detail-description .highlight-tag {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 2px;
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b35;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95em;
}

.book-detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.book-detail-tag {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b35;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* ==================== 排名变化样式 ==================== */

.rank-change-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-change-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fafbfc;
    border-radius: 6px;
    font-size: 13px;
}

.rank-change-date {
    color: #999;
    font-size: 12px;
    min-width: 90px;
}

.rank-change-rank {
    font-weight: 600;
    color: #333;
    min-width: 60px;
}

.rank-change-value {
    font-weight: bold;
}

.rank-change-value.up {
    color: #27ae60;
}

.rank-change-value.down {
    color: #e74c3c;
}

.rank-change-value.neutral {
    color: #999;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .drawer {
        width: 100%;
        right: -100%;
    }

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