/* 小说书架样式 */
.novel-bookshelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.novel-book {
  transition: all 0.3s ease;
  transform: translateY(0);
}

.novel-book:hover {
  transform: translateY(-10px);
}

.book-cover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
}

.book-cover:hover {
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
  transform: scale(1.05);
}

.book-cover h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: white;
}

.book-author {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* 小说章节导航样式 */
.novel-body {
  background-color: #f5f5f5;
}

.dark-mode .novel-body {
  background-color: #1a1a2e;
}

.novel-main {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
  padding: 20px;
}

.chapter-nav {
  flex: 0 0 250px;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 20px;
  height: fit-content;
}

.chapter-nav h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #333;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.chapter-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-nav li {
  margin-bottom: 10px;
}

.chapter-nav a {
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 8px 12px;
  border-radius: 5px;
}

.chapter-nav a:hover {
  color: #667eea;
  background-color: rgba(102, 126, 234, 0.1);
}

.novel-content {
  flex: 1;
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chapter-toggle {
  display: none;
  background-color: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.chapter-toggle:hover {
  background-color: #5a6fd8;
  transform: translateY(-2px);
}

/* 暗黑模式小说书架样式 */
.dark-mode .book-cover {
  background: linear-gradient(135deg, #4a5bd8 0%, #664ba2 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.dark-mode .book-cover:hover {
  box-shadow: 0 8px 20px rgba(74, 91, 216, 0.4);
}

/* 暗黑模式小说章节导航样式 */
.dark-mode .chapter-nav {
  background-color: #16213e;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.dark-mode .chapter-nav h3 {
  color: #e0e0e0;
  border-bottom-color: #667eea;
}

.dark-mode .chapter-nav a {
  color: #b0b0b0;
}

.dark-mode .chapter-nav a:hover {
  color: #667eea;
  background-color: rgba(102, 126, 234, 0.1);
}

.dark-mode .novel-content {
  background-color: #16213e;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.dark-mode .chapter-toggle {
  background-color: #4a5bd8;
}

.dark-mode .chapter-toggle:hover {
  background-color: #3a47b8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .novel-main {
    flex-direction: column;
    padding: 10px;
  }
  
  .chapter-nav {
    flex: none;
    position: static;
    margin-bottom: 20px;
    display: none;
  }
  
  .chapter-nav.show {
    display: block;
  }
  
  .chapter-toggle {
    display: block;
    margin-top: 10px;
  }
  
  .novel-content {
    padding: 20px;
  }
  
  .novel-bookshelf {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .book-cover {
    height: 200px;
    padding: 30px 15px;
  }
  
  .book-cover h3 {
    font-size: 1.1rem;
  }
}

/* 拼音首字母索引样式 */
.initial-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
  padding: 15px;
  background-color: rgba(245, 245, 245, 0.8);
  border-radius: 8px;
  overflow-x: auto;
  justify-content: center;
}

.initial-item {
  display: inline-block;
  padding: 6px 12px;
  background-color: #e0e0e0;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 32px;
  text-align: center;
  font-size: 0.9rem;
}

.initial-item:hover {
  background-color: #667eea;
  color: white;
}

.initial-item.active {
  background-color: #667eea;
  color: white;
}

/* 暗黑模式首字母索引 */
.dark-mode .initial-index {
  background: rgba(40, 40, 40, 0.8);
}

.dark-mode .initial-item {
  background: #3a3a3a;
  color: #ddd;
}

.dark-mode .initial-item:hover,
.dark-mode .initial-item.active {
  background: #667eea;
  color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .initial-index {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 10px;
  }
}
