/* ==========================================================================
   专栏与合集专用样式 column.css
   说明：专栏列表、合集列表、专栏详情、合集详情的样式
   依赖：common.css（沿用 CSS 变量与基础组件）
   主色调：莫兰迪蓝灰 #64748B
   ========================================================================== */

/* ==========================================================================
   一、Tab 切换（专栏 / 合集）
   ========================================================================== */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 30px;
}
.tab {
  padding: 8px 24px;
  font-size: 15px;
  color: var(--color-text-secondary);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.tab:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.tab.active {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* ==========================================================================
   二、卡片网格（专栏 / 合集通用）
   ========================================================================== */
.column-grid,
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

/* ==========================================================================
   三、卡片样式
   ========================================================================== */
.column-card,
.collection-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.column-card:hover,
.collection-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* 卡片封面 */
.column-card .cover,
.collection-card .cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--color-primary-light);  /* 图片加载前占位底色 */
}

/* 卡片正文 */
.column-card .body,
.collection-card .body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* 名称 */
.column-card .name,
.collection-card .name {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  /* 单行省略 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 简介 */
.column-card .desc,
.collection-card .desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  /* 两行省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  flex: 1;
}

/* 卡片底部信息：文章数 / 订阅数 / 创建时间 */
.column-card .meta,
.collection-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-text-light);
}
.column-card .meta-left,
.collection-card .meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   四、状态标签（连载中 / 已完结）
   ========================================================================== */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  color: #fff;
  border-radius: var(--radius-sm);
  line-height: 1.5;
}
/* 连载中 */
.status-badge.ongoing {
  background: #0EA5E9;
}
/* 已完结 */
.status-badge.finished {
  background: #10B981;
}

/* ==========================================================================
   五、专栏详情头部
   ========================================================================== */
.column-detail-header {
  display: flex;
  gap: 28px;
  padding: 30px;
  margin: 30px 0;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* 头部封面 */
.column-detail-header .cover {
  width: 280px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--color-primary-light);
}

/* 头部信息区 */
.column-detail-header .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.column-detail-header .name {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
}
.column-detail-header .desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.column-detail-header .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 20px;
}
.column-detail-header .meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   六、订阅 / 收藏按钮
   ========================================================================== */
.subscribe-btn,
.collect-btn {
  align-self: flex-start;
  padding: 8px 24px;
  font-size: 14px;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.subscribe-btn:hover,
.collect-btn:hover {
  background: var(--color-primary-hover);
}
/* 已订阅 / 已收藏状态 */
.subscribe-btn.subscribed,
.collect-btn.collected {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

/* ==========================================================================
   七、章节列表
   ========================================================================== */
.chapter-list {
  margin: 20px 0 40px;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.chapter-list .list-title {
  padding: 18px 24px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-light);
}

/* 单个章节项 */
.chapter-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background 0.2s;
}
.chapter-item:last-child {
  border-bottom: none;
}
.chapter-item:hover {
  background: var(--color-bg-hover);
}

/* 序号 */
.chapter-item .index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 标题 */
.chapter-item .title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右侧元信息：时长 + 发布时间 */
.chapter-item .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--color-text-light);
  flex-shrink: 0;
}

/* 已读状态标记 */
.chapter-item .read-state {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.chapter-item .read-state.read {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}
.chapter-item .read-state.unread {
  color: var(--color-text-light);
  background: var(--color-primary-light);
}

/* ==========================================================================
   八、合集详情头部
   ========================================================================== */
.collection-detail-header {
  display: flex;
  gap: 28px;
  padding: 30px;
  margin: 30px 0;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.collection-detail-header .cover {
  width: 280px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--color-primary-light);
}
.collection-detail-header .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.collection-detail-header .name {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
}
.collection-detail-header .desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.collection-detail-header .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

/* ==========================================================================
   九、文章列表区标题（合集详情中复用 .article-card）
   ========================================================================== */
.section-block-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin: 10px 0 18px;
  padding-left: 12px;
  border-left: 4px solid var(--color-primary);
}

/* ==========================================================================
   十、响应式：移动端单列
   ========================================================================== */
@media (max-width: 1024px) {
  .column-grid,
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* 卡片网格改单列 */
  .column-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  /* 详情头部纵向布局 */
  .column-detail-header,
  .collection-detail-header {
    flex-direction: column;
    padding: 20px;
  }
  .column-detail-header .cover,
  .collection-detail-header .cover {
    width: 100%;
    height: 180px;
  }

  /* 章节项右元信息自适应 */
  .chapter-item {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
  }
  .chapter-item .title {
    order: 1;
    flex-basis: 100%;
  }
  .chapter-item .meta {
    order: 2;
  }
}