/* 系列文章多层嵌套展示样式 - 纵向时间线版 v3.0 */

/* === 第一层：series-group（系列组） === */
.series-timeline {
  position: relative;
  padding-left: 28px;
  margin: 20px 0;
}

.series-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 1px;
}

.timeline-node {
  position: relative;
  margin-bottom: 24px;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #764ba2;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #764ba2;
  z-index: 1;
}

.timeline-dot-simple {
  background: #aaa;
  box-shadow: 0 0 0 2px #aaa;
}

.series-group-header {
  cursor: pointer;
  position: relative;
  padding: 14px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f5 100%);
  border-radius: 10px;
  transition: all 0.2s ease;
  user-select: none;
}

.series-group-header:hover {
  background: linear-gradient(135deg, #f0f0f5 0%, #e8e8f0 100%);
  box-shadow: 0 2px 8px rgba(118, 75, 162, 0.1);
}

.series-group-header.collapsed {
  border-radius: 10px;
}

.series-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.series-group-count {
  font-size: 13px;
  font-weight: 400;
  color: #888;
  background: #e8e8f0;
  padding: 1px 10px;
  border-radius: 10px;
}

.series-group-description {
  margin: 6px 0 0;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.series-group-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #999;
  transition: transform 0.2s ease;
}

.series-group-body {
  padding: 12px 0 4px 16px;
  margin-left: 8px;
}

/* === 第二层：series-card（系列卡片） === */
.series-card {
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  transition: background 0.2s ease;
  background: #fff;
  border: 1px solid #eee;
}

.series-card:hover {
  background: #fafafa;
  border-color: #ddd;
}

.series-card-header {
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.series-card-header:hover {
  background: #f5f5fa;
}

.series-card-header.expanded {
  border-bottom: 1px solid #e0e0e0;
}

.series-card-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8E44AD;
  flex-shrink: 0;
}

.series-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
}

.series-card-count {
  font-size: 12px;
  font-weight: 400;
  color: #888;
  background: #e8e8e8;
  padding: 1px 8px;
  border-radius: 10px;
}

.series-card-toggle {
  font-size: 11px;
  color: #999;
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.series-card-body {
  padding: 12px 16px 8px 20px;
  position: relative;
}

.series-subline {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d0d0d8;
  border-radius: 1px;
}

/* === 第三层：volume-cards-grid（卷卡片网格） === */
.volume-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 4px 0;
}

.volume-card {
  background: #f9f9fc;
  border: 1px solid #e8e8ee;
  border-radius: 8px;
  padding: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.volume-card:hover {
  background: #f0f0f8;
  border-color: #d0d0d8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.series-tag {
  display: inline-block;
  font-size: 11px;
  color: #8E44AD;
  background: #f0e8f8;
  padding: 1px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.volume-name {
  margin: 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.volume-name a {
  color: #333;
  text-decoration: none;
}

.volume-name a:hover {
  color: #8E44AD;
}

.volume-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #888;
  margin: 6px 0;
}

.volume-chapters-preview ul li a:hover {
  color: #8E44AD !important;
}

.volume-btn {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #8E44AD;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #d0c0e0;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.volume-btn:hover {
  background: #8E44AD;
  color: #fff;
  border-color: #8E44AD;
}

/* === 单篇系列（<2篇） === */
.series-card-single {
  padding: 8px 16px;
}

.series-article-link {
  display: block;
  padding: 6px 0;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.series-article-link:hover {
  color: #8E44AD;
}

/* === 独立文章区 === */
.other-articles-section {
  margin-top: 28px;
}

.other-articles-section .series-title {
  font-size: 17px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8e8e8;
}

.standalone-section {
  position: relative;
}

.standalone-header {
  margin-bottom: 8px;
}

.standalone-title {
  font-size: 17px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.standalone-count {
  font-size: 13px;
  font-weight: 400;
  color: #888;
  background: #e8e8f0;
  padding: 1px 10px;
  border-radius: 10px;
}

.standalone-list {
  padding-left: 16px;
  border-left: 2px solid #e8e8e8;
  margin-left: 8px;
}

.standalone-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  transition: background 0.15s ease;
  border-radius: 4px;
}

.standalone-item:hover {
  background: #f5f5fa;
}

.standalone-item time {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
}

.standalone-item a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.standalone-item a:hover {
  color: #8E44AD;
}

/* === 响应式 === */
@media (max-width: 768px) {
  .series-timeline { padding-left: 22px; }
  .series-timeline::before { left: 4px; }
  .timeline-dot { left: -22px; width: 12px; height: 12px; }
  .series-group-header { padding: 10px 12px; }
  .series-group-title { font-size: 16px; }
  .series-group-description { font-size: 12px; }
  .series-card-header { padding: 10px 12px; }
  .series-card-title { font-size: 14px; }
  .volume-cards-grid { grid-template-columns: 1fr; }
  .volume-card { padding: 10px; }
}

@media (max-width: 480px) {
  .series-timeline { padding-left: 18px; }
  .timeline-dot { left: -18px; width: 10px; height: 10px; }
  .series-group-toggle { right: 10px; }
  .volume-meta { font-size: 11px; }
}

/* === 暗色模式 === */
@media (prefers-color-scheme: dark) {
  .series-timeline::before { background: linear-gradient(180deg, #4a3a6a 0%, #5a4a7a 100%); }
  .timeline-dot { background: #6a5a8a; box-shadow: 0 0 0 2px #6a5a8a; }
  .series-group-header { background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%); }
  .series-group-header:hover { background: linear-gradient(135deg, #252525 0%, #2a2a2a 100%); }
  .series-group-title { color: #eee; }
  .series-group-count { background: #333; color: #aaa; }
  .series-group-description { color: #999; }
  .series-card { background: #1a1a1a; border-color: #333; }
  .series-card:hover { background: #222; }
  .series-card-header:hover { background: #2a2a2a; }
  .series-card-title { color: #eee; }
  .series-card-count { background: #333; color: #aaa; }
  .series-card-marker { background: #9a7aba; }
  .series-subline { background: #333; }
  .volume-card { background: #1e1e1e; border-color: #333; }
  .volume-card:hover { background: #252525; border-color: #444; }
  .volume-name a { color: #ddd; }
  .volume-meta { color: #888; }
  .other-articles-section .series-title { color: #eee; border-bottom-color: #333; }
  .standalone-list { border-left-color: #333; }
  .standalone-item a { color: #ddd; }
}
