/* ============================================ */ /* 自定义课程组件样式 */ /* ============================================ */ /* -------------------------- */ /* 基础重置 */ /* -------------------------- */ .custom-course-container { margin: 0; padding: 0; box-sizing: border-box; } /* -------------------------- */ /* 网页端样式 (桌面端) */ /* -------------------------- */ @media screen and (min-width: 769px) { .custom-course-container { width: 100%; min-height: 100vh; background-color: #f5f5f5; padding: 20px; } /* 视频播放区域 - 网页端隐藏 */ .custom-course-video-container { display: none !important; } /* 课程详情页 - 网页端头部 */ .custom-course-detail-header { background: linear-gradient(135deg, #44449c, #7F70C8); padding: 30px; color: white; display: flex; align-items: center; gap: 24px; border-radius: 12px; margin-bottom: 16px; } .custom-course-detail-cover { width: 180px; height: 120px; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); } .custom-course-detail-cover img { width: 100%; height: 100%; object-fit: cover; } .custom-course-detail-info { flex: 1; } .custom-course-detail-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; } .custom-course-detail-subtitle { font-size: 14px; opacity: 0.8; margin-bottom: 16px; } .custom-course-detail-progress { display: flex; align-items: center; gap: 12px; } .custom-course-detail-progress-bar { flex: 1; height: 8px; background: rgba(255, 255, 255, 0.3); border-radius: 4px; overflow: hidden; } .custom-course-detail-progress-fill { height: 100%; background: white; border-radius: 4px; } .custom-course-detail-progress-text { font-size: 14px; font-weight: 600; } .custom-course-detail-toolbar { display: flex; gap: 16px; padding: 16px 20px; background: white; border-radius: 12px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); } .custom-course-search-box { flex: 1; position: relative; } .custom-course-search-box input { width: 100%; padding: 10px 40px; border: 1px solid #ddd; border-radius: 20px; font-size: 14px; } .custom-course-search-box .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #999; } .custom-course-sort-btn { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: #f5f5f5; border-radius: 20px; cursor: pointer; border: none; font-size: 14px; } .custom-course-chapter-list { max-width: 100%; margin: 0; } .custom-course-chapter-item { display: flex; align-items: flex-start; padding: 20px; background: white; border-radius: 12px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); cursor: pointer; transition: box-shadow 0.2s ease; } .custom-course-chapter-item:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); } .custom-course-chapter-lock { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #ddd; font-size: 20px; flex-shrink: 0; } .custom-course-chapter-lock.locked { color: #999; } .custom-course-chapter-lock.unlocked { color: #4CAF50; } .custom-course-chapter-info { flex: 1; padding-left: 16px; } .custom-course-chapter-title { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 8px; } .custom-course-chapter-desc { font-size: 13px; color: #999; margin-bottom: 8px; line-height: 1.5; } .custom-course-chapter-meta { font-size: 13px; color: #999; display: flex; gap: 12px; } .custom-course-chapter-duration { display: flex; align-items: center; gap: 4px; } } /* -------------------------- */ /* 手机端样式 */ /* -------------------------- */ @media screen and (max-width: 768px) { .custom-course-container { width: 100%; min-height: 100vh; background: #ffffff; padding: 0; margin: 0; } /* 视频播放区域 - 手机端显示 */ .custom-course-video-container { display: block !important; width: 100%; background: #000; position: relative; } /* 视频头部工具栏 */ .custom-course-video-header { display: flex !important; align-items: center; justify-content: space-between; padding: 12px; background: rgba(0, 0, 0, 0.8); position: absolute; top: 0; left: 0; right: 0; z-index: 100; } .custom-course-back-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.2); border-radius: 50%; border: none; color: white; cursor: pointer; font-size: 18px; } .custom-course-video-title { flex: 1; text-align: center; color: white; font-size: 14px; font-weight: 500; padding: 0 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .custom-course-video-controls { display: flex; gap: 8px; } .custom-course-control-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.2); border-radius: 50%; border: none; color: white; cursor: pointer; font-size: 18px; } /* 视频播放区域 */ .custom-course-video-wrapper { width: 100%; height: 220px; position: relative; } .custom-course-video-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #44449c, #7F70C8); display: flex; align-items: center; justify-content: center; position: relative; } .custom-course-play-icon { width: 60px; height: 60px; color: white; opacity: 0.9; } /* 课程详情页头部 - 手机端隐藏 */ .custom-course-detail-header { display: none !important; } /* 工具栏 */ .custom-course-detail-toolbar { display: flex; flex-direction: column; padding: 12px; gap: 12px; border-bottom: 1px solid #eee; background: white; } .custom-course-search-box { position: relative; } .custom-course-search-box input { width: 100%; padding: 12px 40px; border: 1px solid #ddd; border-radius: 25px; font-size: 14px; box-sizing: border-box; } .custom-course-search-box .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #999; } .custom-course-sort-btn { padding: 12px; border-radius: 25px; justify-content: center; background: #f5f5f5; border: none; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; } /* 章节列表 */ .custom-course-chapter-list { margin: 0; padding: 12px; background: #f8f8f8; } .custom-course-chapter-item { display: flex; align-items: flex-start; padding: 16px; background: white; border-radius: 16px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); cursor: pointer; } .custom-course-chapter-lock { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; } .custom-course-chapter-lock.locked { color: #ccc; } .custom-course-chapter-lock.unlocked { color: #4CAF50; } .custom-course-chapter-info { flex: 1; padding-left: 12px; } .custom-course-chapter-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; } .custom-course-chapter-desc { font-size: 12px; color: #999; margin-bottom: 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .custom-course-chapter-meta { font-size: 12px; color: #999; gap: 10px; display: flex; align-items: center; } .custom-course-chapter-duration { display: flex; align-items: center; gap: 4px; } } /* -------------------------- */ /* 空状态样式 */ /* -------------------------- */ .custom-course-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; } .custom-course-empty-icon { width: 80px; height: 80px; border-radius: 50%; background: #f0f0f0; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 40px; color: #ccc; } .custom-course-empty-text { font-size: 16px; color: #999; margin-bottom: 20px; }