/* 全局样式 */
:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-primary: #6366f1;
    --border-primary: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 阅读内容样式 */
.reader-paragraph {
    margin-bottom: 1.5rem;
    text-align: justify;
    text-justify: inter-ideograph;
}

/* 章节列表样式 */
.chapter-item {
    transition: all 0.2s ease;
}

.chapter-item:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.chapter-item.active {
    background-color: rgba(99, 102, 241, 0.2);
    border-left: 3px solid var(--accent-primary);
}

/* 收藏书籍项样式 */
.favorite-book {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    background-color: rgba(99, 102, 241, 0.05);
    transition: all 0.2s ease;
}

.favorite-book:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.favorite-book h4 {
    font-weight: 500;
    margin-bottom: 4px;
    color: #e0e0e0;
}

.favorite-book p {
    font-size: 0.8rem;
    color: #a0a0a0;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #reader-content {
        padding: 1.5rem;
    }
    
    .favorite-book {
        padding: 8px;
    }
}

/* 文字截断 */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}