/* ============================================================
   课程模块样式（courses / my-courses / course-play / courses-admin 共用）
   依赖 style.css 的公共类与 banks.css 的通用卡片/表格/弹窗样式
   ============================================================ */

/* ---------------- 课程市场 hero ---------------- */
.courses-hero {
  background: linear-gradient(135deg, #1d3f8f 0%, #3f6fd8 55%, #5f8fe0 100%);
  color: #fff;
  padding: 34px 0 30px;
}
.courses-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.courses-hero h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: 1px; }
.courses-hero p { margin: 0; opacity: 0.85; font-size: 14px; }
.courses-hero .hero-links { display: flex; gap: 10px; }
.courses-hero .hero-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 10px; font-size: 13px;
  transition: background 0.15s;
}
.courses-hero .hero-link:hover { background: rgba(255, 255, 255, 0.28); }

/* ---------------- 筛选条（与题库市场同结构） ---------------- */
.courses-filters {
  max-width: 1080px; margin: 18px auto 0; padding: 0 20px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.courses-select {
  padding: 8px 12px; border: 1px solid #d8dee8; border-radius: 10px;
  background: #fff; font-size: 14px; color: #333; min-width: 140px;
}
.courses-search { display: flex; gap: 8px; margin-left: auto; }
.courses-search input {
  padding: 8px 12px; border: 1px solid #d8dee8; border-radius: 10px; font-size: 14px; width: 220px;
}

/* ---------------- 课程卡片流 ---------------- */
.courses-grid {
  max-width: 1080px; margin: 18px auto 40px; padding: 0 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 900px) { .courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .courses-grid { grid-template-columns: 1fr; } }

.course-card {
  background: #fff; border: 1px solid #e6eaf1; border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.course-card:hover { box-shadow: 0 8px 22px rgba(29, 63, 143, 0.14); transform: translateY(-2px); }

.course-card-head { display: flex; gap: 12px; }
.course-cover {
  width: 64px; height: 64px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 1.3;
  padding: 6px; word-break: break-all; overflow: hidden;
}
.course-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.course-card-title { font-size: 15px; font-weight: 700; color: #222; margin: 0 0 4px; line-height: 1.4; }
.course-card-meta { font-size: 12px; color: #7a8494; }
.course-card-meta .org-tag { color: #1d3f8f; font-weight: 600; }

.course-card-stats { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #7a8494; }
.course-card-foot { display: flex; justify-content: space-between; align-items: center; }
.course-price { font-size: 16px; font-weight: 700; }
.course-price.free { color: #e02e2e; }
.course-price.paid { color: #d97706; }
.course-owned { color: #1d3f8f; font-size: 13px; font-weight: 600; }

/* 渐变封面色板（按标题哈希取色） */
.course-cover.c0 { background: linear-gradient(135deg, #2c6e49, #4c956c); }
.course-cover.c1 { background: linear-gradient(135deg, #1d3f8f, #3f6fd8); }
.course-cover.c2 { background: linear-gradient(135deg, #8a4f1d, #c97b34); }
.course-cover.c3 { background: linear-gradient(135deg, #6d2a52, #a85683); }
.course-cover.c4 { background: linear-gradient(135deg, #24555e, #4a8f9c); }
.course-cover.c5 { background: linear-gradient(135deg, #4a3f8f, #7a6fd8); }

/* ---------------- 我的课程：进度条 ---------------- */
.progress-track {
  height: 6px; border-radius: 999px; background: #eef1f6; overflow: hidden; margin-top: 6px;
}
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3f6fd8, #5f8fe0); }
.progress-text { font-size: 12px; color: #7a8494; margin-top: 4px; }

/* ---------------- 看课页：播放器 + 课时侧栏 ---------------- */
.play-wrap {
  max-width: 1080px; margin: 22px auto 48px; padding: 0 20px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start;
}
@media (max-width: 900px) { .play-wrap { grid-template-columns: 1fr; } }

.play-main {
  background: #14181f; border-radius: 14px; overflow: hidden; border: 1px solid #232a35;
}
.play-main video { display: block; width: 100%; max-height: 520px; background: #000; }
.play-title-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; color: #e8ecf2; font-size: 14px;
}
.play-title-bar .lesson-now { font-weight: 600; }
.play-title-bar .lesson-pos { font-size: 12px; color: #9aa7b8; }

.play-panel {
  background: #fff; border: 1px solid #e6eaf1; border-radius: 14px; padding: 14px;
  max-height: 640px; display: flex; flex-direction: column;
}
.play-panel h3 { margin: 0 0 10px; font-size: 15px; color: #222; }
.play-panel .panel-sub { font-size: 12px; color: #7a8494; margin-bottom: 8px; }
.lesson-list { overflow-y: auto; }
.lesson-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border: 1px solid transparent; border-radius: 10px;
  background: none; cursor: pointer; font-size: 13.5px; color: #333;
}
.lesson-item:hover { background: #f4f7fd; }
.lesson-item.current { background: #eef3fd; border-color: #bcd0f5; color: #1d3f8f; font-weight: 600; }
.lesson-item .lesson-idx {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: #eef1f6;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #555;
}
.lesson-item.done .lesson-idx { background: #1d3f8f; color: #fff; }
.lesson-item .lesson-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-item .lesson-dur { flex: none; font-size: 12px; color: #9aa3b2; }

/* ---------------- 后台统计卡 ---------------- */
.courses-admin-stats-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .courses-admin-stats-row { grid-template-columns: repeat(3, 1fr); } }
