customCourse.css 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. /* ============================================ */
  2. /* 自定义课程组件样式 */
  3. /* ============================================ */
  4. /* -------------------------- */
  5. /* 基础重置 */
  6. /* -------------------------- */
  7. .custom-course-container {
  8. margin: 0;
  9. padding: 0;
  10. box-sizing: border-box;
  11. }
  12. /* -------------------------- */
  13. /* 网页端样式 (桌面端) */
  14. /* -------------------------- */
  15. @media screen and (min-width: 769px) {
  16. .custom-course-container {
  17. width: 100%;
  18. min-height: 100vh;
  19. background-color: #f5f5f5;
  20. padding: 20px;
  21. }
  22. /* 视频播放区域 - 网页端隐藏 */
  23. .custom-course-video-container {
  24. display: none !important;
  25. }
  26. /* 课程详情页 - 网页端头部 */
  27. .custom-course-detail-header {
  28. background: linear-gradient(135deg, #44449c, #7F70C8);
  29. padding: 30px;
  30. color: white;
  31. display: flex;
  32. align-items: center;
  33. gap: 24px;
  34. border-radius: 12px;
  35. margin-bottom: 16px;
  36. }
  37. .custom-course-detail-cover {
  38. width: 180px;
  39. height: 120px;
  40. border-radius: 12px;
  41. overflow: hidden;
  42. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  43. }
  44. .custom-course-detail-cover img {
  45. width: 100%;
  46. height: 100%;
  47. object-fit: cover;
  48. }
  49. .custom-course-detail-info {
  50. flex: 1;
  51. }
  52. .custom-course-detail-title {
  53. font-size: 24px;
  54. font-weight: 700;
  55. margin-bottom: 8px;
  56. }
  57. .custom-course-detail-subtitle {
  58. font-size: 14px;
  59. opacity: 0.8;
  60. margin-bottom: 16px;
  61. }
  62. .custom-course-detail-progress {
  63. display: flex;
  64. align-items: center;
  65. gap: 12px;
  66. }
  67. .custom-course-detail-progress-bar {
  68. flex: 1;
  69. height: 8px;
  70. background: rgba(255, 255, 255, 0.3);
  71. border-radius: 4px;
  72. overflow: hidden;
  73. }
  74. .custom-course-detail-progress-fill {
  75. height: 100%;
  76. background: white;
  77. border-radius: 4px;
  78. }
  79. .custom-course-detail-progress-text {
  80. font-size: 14px;
  81. font-weight: 600;
  82. }
  83. .custom-course-detail-toolbar {
  84. display: flex;
  85. gap: 16px;
  86. padding: 16px 20px;
  87. background: white;
  88. border-radius: 12px;
  89. margin-bottom: 16px;
  90. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  91. }
  92. .custom-course-search-box {
  93. flex: 1;
  94. position: relative;
  95. }
  96. .custom-course-search-box input {
  97. width: 100%;
  98. padding: 10px 40px;
  99. border: 1px solid #ddd;
  100. border-radius: 20px;
  101. font-size: 14px;
  102. }
  103. .custom-course-search-box .search-icon {
  104. position: absolute;
  105. left: 14px;
  106. top: 50%;
  107. transform: translateY(-50%);
  108. color: #999;
  109. }
  110. .custom-course-sort-btn {
  111. display: flex;
  112. align-items: center;
  113. gap: 8px;
  114. padding: 10px 20px;
  115. background: #f5f5f5;
  116. border-radius: 20px;
  117. cursor: pointer;
  118. border: none;
  119. font-size: 14px;
  120. }
  121. .custom-course-chapter-list {
  122. max-width: 100%;
  123. margin: 0;
  124. }
  125. .custom-course-chapter-item {
  126. display: flex;
  127. align-items: flex-start;
  128. padding: 20px;
  129. background: white;
  130. border-radius: 12px;
  131. margin-bottom: 12px;
  132. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  133. cursor: pointer;
  134. transition: box-shadow 0.2s ease;
  135. }
  136. .custom-course-chapter-item:hover {
  137. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  138. }
  139. .custom-course-chapter-lock {
  140. width: 40px;
  141. height: 40px;
  142. display: flex;
  143. align-items: center;
  144. justify-content: center;
  145. color: #ddd;
  146. font-size: 20px;
  147. flex-shrink: 0;
  148. }
  149. .custom-course-chapter-lock.locked {
  150. color: #999;
  151. }
  152. .custom-course-chapter-lock.unlocked {
  153. color: #4CAF50;
  154. }
  155. .custom-course-chapter-info {
  156. flex: 1;
  157. padding-left: 16px;
  158. }
  159. .custom-course-chapter-title {
  160. font-size: 16px;
  161. font-weight: 600;
  162. color: #333;
  163. margin-bottom: 8px;
  164. }
  165. .custom-course-chapter-desc {
  166. font-size: 13px;
  167. color: #999;
  168. margin-bottom: 8px;
  169. line-height: 1.5;
  170. }
  171. .custom-course-chapter-meta {
  172. font-size: 13px;
  173. color: #999;
  174. display: flex;
  175. gap: 12px;
  176. }
  177. .custom-course-chapter-duration {
  178. display: flex;
  179. align-items: center;
  180. gap: 4px;
  181. }
  182. }
  183. /* -------------------------- */
  184. /* 手机端样式 */
  185. /* -------------------------- */
  186. @media screen and (max-width: 768px) {
  187. .custom-course-container {
  188. width: 100%;
  189. min-height: 100vh;
  190. background: #ffffff;
  191. padding: 0;
  192. margin: 0;
  193. }
  194. /* 视频播放区域 - 手机端显示 */
  195. .custom-course-video-container {
  196. display: block !important;
  197. width: 100%;
  198. background: #000;
  199. position: relative;
  200. }
  201. /* 视频头部工具栏 */
  202. .custom-course-video-header {
  203. display: flex !important;
  204. align-items: center;
  205. justify-content: space-between;
  206. padding: 12px;
  207. background: rgba(0, 0, 0, 0.8);
  208. position: absolute;
  209. top: 0;
  210. left: 0;
  211. right: 0;
  212. z-index: 100;
  213. }
  214. .custom-course-back-btn {
  215. width: 36px;
  216. height: 36px;
  217. display: flex;
  218. align-items: center;
  219. justify-content: center;
  220. background: rgba(255, 255, 255, 0.2);
  221. border-radius: 50%;
  222. border: none;
  223. color: white;
  224. cursor: pointer;
  225. font-size: 18px;
  226. }
  227. .custom-course-video-title {
  228. flex: 1;
  229. text-align: center;
  230. color: white;
  231. font-size: 14px;
  232. font-weight: 500;
  233. padding: 0 40px;
  234. overflow: hidden;
  235. text-overflow: ellipsis;
  236. white-space: nowrap;
  237. }
  238. .custom-course-video-controls {
  239. display: flex;
  240. gap: 8px;
  241. }
  242. .custom-course-control-btn {
  243. width: 36px;
  244. height: 36px;
  245. display: flex;
  246. align-items: center;
  247. justify-content: center;
  248. background: rgba(255, 255, 255, 0.2);
  249. border-radius: 50%;
  250. border: none;
  251. color: white;
  252. cursor: pointer;
  253. font-size: 18px;
  254. }
  255. /* 视频播放区域 */
  256. .custom-course-video-wrapper {
  257. width: 100%;
  258. height: 220px;
  259. position: relative;
  260. }
  261. .custom-course-video-placeholder {
  262. width: 100%;
  263. height: 100%;
  264. background: linear-gradient(135deg, #44449c, #7F70C8);
  265. display: flex;
  266. align-items: center;
  267. justify-content: center;
  268. position: relative;
  269. }
  270. .custom-course-play-icon {
  271. width: 60px;
  272. height: 60px;
  273. color: white;
  274. opacity: 0.9;
  275. }
  276. /* 课程详情页头部 - 手机端隐藏 */
  277. .custom-course-detail-header {
  278. display: none !important;
  279. }
  280. /* 工具栏 */
  281. .custom-course-detail-toolbar {
  282. display: flex;
  283. flex-direction: column;
  284. padding: 12px;
  285. gap: 12px;
  286. border-bottom: 1px solid #eee;
  287. background: white;
  288. }
  289. .custom-course-search-box {
  290. position: relative;
  291. }
  292. .custom-course-search-box input {
  293. width: 100%;
  294. padding: 12px 40px;
  295. border: 1px solid #ddd;
  296. border-radius: 25px;
  297. font-size: 14px;
  298. box-sizing: border-box;
  299. }
  300. .custom-course-search-box .search-icon {
  301. position: absolute;
  302. left: 14px;
  303. top: 50%;
  304. transform: translateY(-50%);
  305. color: #999;
  306. }
  307. .custom-course-sort-btn {
  308. padding: 12px;
  309. border-radius: 25px;
  310. justify-content: center;
  311. background: #f5f5f5;
  312. border: none;
  313. font-size: 14px;
  314. cursor: pointer;
  315. display: flex;
  316. align-items: center;
  317. justify-content: center;
  318. }
  319. /* 章节列表 */
  320. .custom-course-chapter-list {
  321. margin: 0;
  322. padding: 12px;
  323. background: #f8f8f8;
  324. }
  325. .custom-course-chapter-item {
  326. display: flex;
  327. align-items: flex-start;
  328. padding: 16px;
  329. background: white;
  330. border-radius: 16px;
  331. margin-bottom: 10px;
  332. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  333. cursor: pointer;
  334. }
  335. .custom-course-chapter-lock {
  336. width: 36px;
  337. height: 36px;
  338. display: flex;
  339. align-items: center;
  340. justify-content: center;
  341. font-size: 18px;
  342. flex-shrink: 0;
  343. }
  344. .custom-course-chapter-lock.locked {
  345. color: #ccc;
  346. }
  347. .custom-course-chapter-lock.unlocked {
  348. color: #4CAF50;
  349. }
  350. .custom-course-chapter-info {
  351. flex: 1;
  352. padding-left: 12px;
  353. }
  354. .custom-course-chapter-title {
  355. font-size: 15px;
  356. font-weight: 600;
  357. color: #333;
  358. margin-bottom: 6px;
  359. display: flex;
  360. align-items: center;
  361. gap: 6px;
  362. }
  363. .custom-course-chapter-desc {
  364. font-size: 12px;
  365. color: #999;
  366. margin-bottom: 6px;
  367. line-height: 1.5;
  368. display: -webkit-box;
  369. -webkit-line-clamp: 2;
  370. -webkit-box-orient: vertical;
  371. overflow: hidden;
  372. }
  373. .custom-course-chapter-meta {
  374. font-size: 12px;
  375. color: #999;
  376. gap: 10px;
  377. display: flex;
  378. align-items: center;
  379. }
  380. .custom-course-chapter-duration {
  381. display: flex;
  382. align-items: center;
  383. gap: 4px;
  384. }
  385. }
  386. /* -------------------------- */
  387. /* 空状态样式 */
  388. /* -------------------------- */
  389. .custom-course-empty {
  390. display: flex;
  391. flex-direction: column;
  392. align-items: center;
  393. justify-content: center;
  394. padding: 60px 20px;
  395. text-align: center;
  396. }
  397. .custom-course-empty-icon {
  398. width: 80px;
  399. height: 80px;
  400. border-radius: 50%;
  401. background: #f0f0f0;
  402. display: flex;
  403. align-items: center;
  404. justify-content: center;
  405. margin-bottom: 20px;
  406. font-size: 40px;
  407. color: #ccc;
  408. }
  409. .custom-course-empty-text {
  410. font-size: 16px;
  411. color: #999;
  412. margin-bottom: 20px;
  413. }