.footer {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    color: #666;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.copyright {
    margin: 0;
    line-height: 1.5;
}

.icp-link {
    color: inherit;
    text-decoration: none;
}

.icp-link:hover {
    color: #0066cc;
    text-decoration: underline;
}
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f8ff;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-theme {
    background-color: #2c2c2c;
    color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header h1 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.dark-theme .header {
    background: #3c3c3c;
}

.dark-theme .header h1 {
    color: #ecf0f1;
}

.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.controls button, .controls select {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #64b5f6;
    color: white;
    font-size: 14px;
    transition: background-color 0.3s;
}

.controls button:hover {
    background: #42a5f5;
}

.controls select {
    background: #e3f2fd;
    color: #333;
    border: 1px solid #ddd;
}

/* 书籍列表样式 */
#book-sidebar {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* 双栏容器样式 */
.dual-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: #e3f2fd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-height: 600px;
    overflow-y: auto;
}

#book-list {
    display: flex;
    gap: 10px;
}

#book-list li {
    display: inline;
    font-size: 16px;
    cursor: pointer; /* 添加手型光标 */
    transition: all 0.3s ease; /* 添加过渡动画 */
}

/* 添加鼠标悬停效果 */
#book-list li:hover {
    font-size: 18px; /* 稍微增大字体 */
    font-weight: bold; /* 加粗字体 */
}

/* 确保书籍列表栏的宽度与双栏容器一致 */
.main-content > #book-sidebar {
    width: 100%;
}

/* 为书籍列表栏添加边距，以确保与双栏容器的左右边界对齐 */
.main-content > #book-sidebar {
    margin-left: auto;
    margin-right: auto;
}

/* 书籍列表和双栏容器之间的间隔 */
.main-content > *:not(.dual-container) {
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .dual-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 200px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls button, .controls select {
        width: 100%;
    }
}

.dark-theme .sidebar {
    background: #1a2942;
}

.sidebar h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.dark-theme .sidebar h3 {
    color: #ecf0f1;
}

#toc-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.toc-item {
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toc-item:hover {
    background: #ecf0f1;
}

.dark-theme .toc-item:hover {
    background: #4c4c4c;
}

/* 阅读器容器 */
.reader-container {
    flex: 1;
    background: #e3f2fd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 600px;
    height: 100%;
}

.dark-theme .reader-container {
    background: #1a2942;
}

/* EPUB查看器 */
#viewer {
    width: 100%;
    min-height: 500px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dark-theme #viewer {
    border-color: #555;
}

/* 进度条样式 */
.progress {
    margin-top: 20px;
    text-align: center;
}

#current-location {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

#reading-progress {
    width: 100%;
    height: 8px;
    border-radius: 4px;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 200px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls button, .controls select {
        width: 100%;
    }
}

/* 导航按钮样式 */
.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nav-button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #64b5f6;
    color: white;
    font-size: 14px;
    transition: background-color 0.3s;
    min-width: 80px;
    text-align: center;
}

.nav-button:hover {
    background: #42a5f5;
}

.nav-button:disabled {
    background: #bbdefb;
    cursor: not-allowed;
}

/* 主题样式 */
body.light-theme {
    background-color: #e3f2fd;
    color: #333333;
}

body.eye-care-theme {
    background-color: #c3e6cb;
    color: #155724;
}

body.warm-theme {
    background-color: #ffeaa7;
    color: #856404;
}

body.dark-theme {
    background-color: #2c3e50;
    color: #ecf0f1;
}

/* EPUB内容样式 */
.epub-container {
    padding: 20px;
    line-height: 1.6;
}

.epub-container h1, .epub-container h2, .epub-container h3 {
    margin: 20px 0 10px 0;
    color: #2c3e50;
}

.epub-container p {
    margin-bottom: 15px;
    text-align: justify;
}

.dark-theme .epub-container h1,
.dark-theme .epub-container h2,
.dark-theme .epub-container h3 {
    color: #ecf0f1;
}

/* PDF悬浮菜单栏样式 */
#pdf-floating-menu {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(52, 152, 219, 0.8); /* 提高透明度 */
    color: white;
    padding: 10px 15px; /* 调整内边距 */
    border-radius: 3px; /* 改为较小的圆角 */
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transition: opacity 0.3s, background-color 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
}

#pdf-floating-menu button {
    background: rgba(255, 255, 255, 0.3); /* 提高透明度 */
    border: 1px solid rgba(255, 255, 255, 0.5); /* 调整边框透明度 */
    color: white;
    cursor: pointer;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 8px; /* 减小圆角以匹配整体风格 */
    transition: background-color 0.3s;
    font-size: 12px;
}

#pdf-floating-menu button:hover {
    background: rgba(255, 255, 255, 0.4); /* 调整悬停效果 */
}

#pdf-floating-menu select {
    padding: 5px 8px;
    border-radius: 8px; /* 减小圆角 */
    border: 1px solid rgba(255, 255, 255, 0.5); /* 调整边框透明度 */
    background: rgba(255, 255, 255, 0.3); /* 提高透明度 */
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
}

#pdf-floating-menu select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

#pdf-floating-menu select option {
    background: #3498db;
    color: white;
}

#pdf-floating-menu span {
    font-weight: bold;
    font-size: 12px;
}

/* 悬浮球样式 */
.floating-ball {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #64b5f6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1001;
    border: none;
}

.floating-ball:hover {
    background-color: #42a5f5;
    transform: scale(1.1);
}

.floating-ball svg {
    width: 24px;
    height: 24px;
}

/* 悬浮球文字提示样式 */
.floating-ball-tooltip {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    display: none;
    z-index: 1002;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.floating-ball-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}
