/* ========== 参考视频页面样式 ========== */

/* 覆盖首页 .main-content 的 flex 居中布局（首页用于单卡片居中，列表页需块级布局） */
.main-content {
  display: block;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
  align-items: initial;
  justify-content: initial;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  text-align: center;
}

/* ========== 页面标题区 ========== */
.page-header {
  margin-bottom: 24px;
}

/* ========== 加载状态 ========== */
.loading-state {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.loading-hint {
  font-size: 14px;
  color: var(--color-text-light);
}

/* ========== 视频列表（单列行式） ========== */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-card {
  background-color: var(--color-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s ease;
}

.video-card:hover {
  box-shadow: var(--shadow-hover);
}

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

/* 标题与作者区（占主要空间） */
.video-main {
  flex: 1;
  min-width: 0;
}

.video-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-author {
  font-size: 13px;
  color: var(--color-text-light);
}

/* 统计数据区 */
.video-stats {
  display: flex;
  gap: 18px;
  font-size: 13px;
  flex-shrink: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 50px;
}

.stat-label {
  color: var(--color-text-light);
  font-size: 11px;
}

.stat-value {
  color: var(--color-text);
  font-weight: 600;
  font-size: 13px;
}

/* 查看按钮 */
.video-link {
  flex-shrink: 0;
  padding: 8px 16px;
  background-color: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.video-link:hover {
  background-color: #4338ca;
}

/* ========== 空结果与错误 ========== */
.empty-state,
.error-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-text {
  font-size: 16px;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.error-msg {
  font-size: 15px;
  color: #ef4444;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ========== 操作栏 ========== */
.actions-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: center;
}

.actions-bar .btn {
  padding: 10px 28px;
  min-width: 140px;
}

/* ========== 响应式 ========== */
@media (max-width: 640px) {
  .video-card {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .video-title {
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
  }

  .video-stats {
    gap: 12px;
    width: 100%;
    padding-left: 44px;
  }

  .stat-item {
    min-width: 40px;
  }

  .video-link {
    margin-left: auto;
  }
}
