@charset "UTF-8";

/* 阅读器页面样式 */

body.p-read {
    background-color: var(--dark-color);
}

/* 阅读器头部 */
.reader-header {
    background-color: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}

.reader-header.hidden {
    transform: translateY(-100%);
}

.reader-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reader-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.reader-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.reader-back-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.reader-comic-info {
    color: white;
}

.reader-comic-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 3px;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.reader-comic-title:hover {
    opacity: 0.8;
    text-decoration: underline !important;
}

.reader-chapter-info {
    font-size: 0.9rem;
    opacity: 0.8;
}

.reader-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reader-control-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reader-control-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 阅读器主要内容 */
.reader-container {
    padding-top: 80px;
    padding-bottom: 60px;
    min-height: 100vh;
}

.reader-content {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.reader-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.reader-page:last-child {
    border-bottom: none;
}

.page-number {
    margin-bottom: 15px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.page-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.reader-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    max-width: 900px;
    margin: 0 auto;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.chapter-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.chapter-select {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
}

/* 阅读器底部控制栏 */
.reader-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: transform 0.3s;
}

.reader-controls.hidden {
    transform: translateY(100%);
}

.reader-controls-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reader-controls-left, .reader-controls-center, .reader-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-label {
    color: white;
    font-size: 0.9rem;
}

.control-btn {
    color: white;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: background-color 0.3s;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .reader-controls-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .reader-controls-left, .reader-controls-center, .reader-controls-right {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .reader-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .reader-header-right {
        gap: 10px;
    }
    
    .reader-control-btn {
        width: 35px;
        height: 35px;
    }
    
    .reader-container {
        padding-top: 120px;
    }
    
    .nav-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .reader-comic-title {
        font-size: 1rem;
    }
    
    .reader-chapter-info {
        font-size: 0.8rem;
    }
    
    .reader-controls {
        padding: 10px 0;
    }
    
    .reader-page {
        padding: 10px;
    }
    
    .nav-btn span:last-child {
        display: none;
    }
    
    .nav-btn {
        padding: 12px;
    }
}

/* ========================================
   统一头部和底部样式（阅读页面）
   ======================================== */

/* 头部样式 - 深色主题 */
.in-header {
    background: linear-gradient(135deg, #2C3E50 0%, #34495e 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    border-bottom: none !important;
}

.in-header__logo.text-logo {
    color: white !important;
}

.in-header__nav ul li a {
    color: rgba(255, 255, 255, 0.9) !important;
}

.in-header__nav ul li.active a,
.in-header__nav ul li a:hover {
    color: white !important;
}

.in-header__nav ul li .underline {
    background: white !important;
}

.in-header__search .input {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.in-header__search .input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.in-header__search .input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.in-header__search .icon-ic_head_search {
    color: rgba(255, 255, 255, 0.7) !important;
}

.in-header__user .user-item a {
    color: rgba(255, 255, 255, 0.9) !important;
}

.in-header__user .user-item a:hover {
    color: white !important;
}

.in-header__user .user-item .iconfont {
    color: rgba(255, 255, 255, 0.9) !important;
}

.in-header__user .item-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

.in-header__avatar .text-avatar {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* 底部样式 */
.footer-wrapper {
    background-color: #1a1a1a;
    margin-top: 0;
}

.footer-bottom {
    padding: 30px 0 15px;
}

.footer-bottom p,
.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* 侧边栏 - 深色主题 */
.in-aside-handle .aside__item {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.in-aside-handle .aside__item:hover {
    background-color: rgba(255, 107, 107, 0.8);
}

.in-aside-handle .aside__item i {
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   章节列表侧边栏
   ======================================== */

/* Chapter List Sidebar */
.chapter-list-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.chapter-list-sidebar.active {
    right: 0;
}

.chapter-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chapter-list-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chapter-list-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.chapter-list-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.chapter-list-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.chapter-list-item:hover {
    background: #e9ecef;
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chapter-list-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.chapter-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
}

.chapter-list-item.active .chapter-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.chapter-name {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
}

.chapter-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

.chapter-list-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chapter-list-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Scrollbar styling for chapter list */
.chapter-list-content::-webkit-scrollbar {
    width: 8px;
}

.chapter-list-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chapter-list-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.chapter-list-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ========================================
   章节列表增强样式
   ======================================== */

/* 章节列表头部控制按钮 */
.chapter-list-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chapter-sort-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    color: white;
}

.chapter-sort-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.chapter-sort-btn .sort-icon {
    font-size: 16px;
    font-weight: bold;
}

/* 当前章节高亮样式 */
.chapter-list-item.current-chapter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-left: 4px solid #ffd700 !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    transform: scale(1.02);
    position: relative;
    animation: slideIn 0.5s ease-out;
}

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

.chapter-list-item.current-chapter::before {
    content: '▶';
    position: absolute;
    left: -20px;
    color: #ffd700;
    font-size: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: translateX(0); 
    }
    50% { 
        opacity: 0.6; 
        transform: translateX(-5px); 
    }
}

.chapter-list-item.current-chapter .chapter-number,
.chapter-list-item.current-chapter .chapter-name {
    color: white !important;
    font-weight: bold;
}

.chapter-list-item.current-chapter .chapter-badge {
    background: #ffd700 !important;
    color: #333 !important;
    font-weight: bold;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 5px #ffd700; 
    }
    50% { 
        box-shadow: 0 0 20px #ffd700, 0 0 30px #ffd700; 
    }
}

/* 章节列表项悬停效果优化 */
.chapter-list-item:not(.current-chapter):hover {
    background: #f8f9fa;
    transform: translateX(-5px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .chapter-list-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .chapter-list-sidebar.active {
        right: 0;
    }
    
    .chapter-list-header {
        padding: 15px 20px;
    }
    
    .chapter-list-item {
        padding: 12px 15px;
    }
    
    .chapter-number {
        width: 35px;
        height: 35px;
        font-size: 13px;
        margin-right: 12px;
    }
    
    .chapter-name {
        font-size: 14px;
    }
    
    .chapter-sort-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .chapter-list-item.current-chapter::before {
        left: -15px;
        font-size: 14px;
    }
}
