/* CSS变量定义 */
:root {
  --primary-color: #007bff;
  --danger-color: #e53e3e;
  --danger-hover: #c53030;

  --text-color: #333;
  --text-muted: #666;
  --text-light: #999;
  --text-white: #fff;
  --border-color: #ddd;
  --bg-color: #fff;
  --bg-course: #f8f9fa;

  --max-width: 1200px;
}

/* 基础样式重置 */
* {
  box-sizing: border-box;
}

/* 通用容器样式 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 15px;
}

/* 面包屑导航 */
.cj-breadcrumb {
  padding: 20px 0;
}

.cj-breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.cj-breadcrumb a:hover {
  text-decoration: underline;
}

.cj-breadcrumb span {
  margin: 0 8px;
  color: var(--text-muted);
}

.cj-icon-home {
  margin-right: 8px;
}

/* 通用加载状态 */
.course-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  color: var(--text-muted);
  font-size: 16px;
  position: relative;
}

.course-loading::after {
  content: "";
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: course-spin 1s linear infinite;
}

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

/* 通用分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  background-color: var(--bg-color);
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--primary-color);
}

.page-link:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.page-link.active {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.page-link.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--text-muted);
  padding: 0 4px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .container {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 10px;
  }
}