/* ========== 课程详情页样式 ========== */
.page-course-detail {
    background: #f5f7fb;
    min-height: calc(100vh - 200px);
}

/* 面包屑导航 */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 12px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.breadcrumb-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    flex-shrink: 0;
}
.breadcrumb-text {
    font-size: 14px;
    color: #6c7a8a;
    word-break: break-word;
}
.breadcrumb-text a {
    color: #4a627a;
    transition: color 0.2s;
    text-decoration: none;
}
.breadcrumb-text a:hover {
    color: #fc3930;
}
.breadcrumb-text .sep {
    margin: 0 6px;
    color: #cbd5e1;
}
.breadcrumb-text .current {
    color: #fc3930;
    font-weight: 500;
}

/* ========== 课程卡片 - 左右布局核心 ========== */
.course-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    overflow: hidden;
}

.course-card-inner {
    display: flex;
    gap: 40px;
    padding: 24px;
    flex-wrap: wrap;
}

/* 左侧封面 - 固定比例 */
.course-fengm {
    flex: 0 0 500px;
    max-width: 500px;
}

.cover-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cover-link img {
    width: 100%;
    height: auto;
    display: block;
}

.cover-play {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.cover-link:hover .cover-play {
    opacity: 1;
}

.cover-play img {
    width: 48px;
    height: 48px;
}

/* 右侧信息 - 自适应剩余宽度 */
.course-info {
    flex: 1;
	margin-top: 5px;
    min-width: 200px;
}

.course-name {
    font-size: 24px;
    font-weight: 700;
    color: #1f2f3e;
    margin: 0 0 12px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.meta-level {
    background: #f0eef4;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #4a627a;
    display: inline-block;
}

.course-desc {
	color: #6c7a8a;
	font-size: 15px;
	line-height: 26px;
	margin-bottom: 15px;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
}

.course-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.stat {
    color: #6c7a8a;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat i {
    font-style: normal;
}

.btn-study {
    background: #fc3930;
    color: #fff;
    padding: 12px 40px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(252, 57, 48, 0.3);
}

.btn-study:hover {
    background: #e62e24;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(252, 57, 48, 0.4);
    color: #fff;
}

/* 广告位 */
.ad-box {
    margin-bottom: 20px;
}
.ad-box img {
    width: 100%;
    display: block;
}

/* ========== 两栏内容区 ========== */
.content-wrapper {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.content-left {
    flex: 1;
    min-width: 0;
}

.content-right {
    width: 320px;
    flex-shrink: 0;
}

/* 章节目录面板 */
.panel {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 2px solid #fc3930;
}

.panel-head h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2f3e;
    margin: 0;
}

.panel-head h3 i {
    color: #fc3930;
    margin-right: 8px;
}

/* 章节目录列表 */
.chapter-item {
    border-bottom: 1px solid #f0eef2;
}

.chapter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fafcfd;
    cursor: pointer;
    transition: background 0.2s;
}

.chapter-title:hover {
    background: #f5f7fb;
}

.chapter-title .name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2f3e;
}

.chapter-title .toggle {
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.chapter-title .toggle .hide {
    color: #fc3930;
}

.chapter-title .toggle .show {
    color: #94a3b8;
}

.chapter-title .toggle i {
    margin-left: 4px;
}

.video-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.video-list li {
    border-bottom: 1px solid #f5f7fb;
}

.video-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px 12px 48px;
    text-decoration: none;
    transition: all 0.2s;
}

.video-list li:hover {
    background: #fef2f0;
}

.video-list li:hover .v-name {
    color: #fc3930;
}

.v-name {
    font-size: 14px;
    color: #4a627a;
}

.v-time {
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

.vip-block {
    text-align: center;
    padding: 32px 24px;
    background: #fafcfd;
    margin-top: 12px;
    color: #6c7a8a;
    font-size: 14px;
}

.vip-block i {
    color: #94a3b8;
    margin-right: 8px;
}

/* ========== 右侧推荐课程 ========== */
.side-card {
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s;
    margin-bottom: 24px;
}

.side-card:hover {
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.08);
}

.card-header {
    border-bottom: 2px solid #fc3930;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2f3e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon {
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #fc3930;
    border-radius: 4px;
}

.course-list-side {
    list-style: none;
    margin: 0;
    padding: 0;
}

.course-item-side {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf2f7;
}

.course-item-side:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.course-item-side .course-cover {
    width: 100px;
    flex-shrink: 0;
}

.course-item-side .course-cover img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.course-item-side .course-info {
    flex: 1;
    min-width: 0;
}

.course-title-side {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.course-title-side a {
    color: #1f2f3e;
    text-decoration: none;
    transition: color 0.2s;
}

.course-title-side a:hover {
    color: #fc3930;
}

.course-item-side .course-meta {
    font-size: 12px;
    color: #8ba0bc;
    margin-top: 4px;
}

/* ========== 响应式适配 ========== */

/* 平板竖屏 (≤ 992px) */
@media screen and (max-width: 992px) {
    .page-course-detail .layui-container {
        padding: 16px 12px !important;
    }
    
    .course-name {
        font-size: 22px;
    }
    
    .content-right {
        width: 100%;
    }
    
    .course-fengm {
		flex: 0 360px;
		max-width: 360px;
    }
	.course-desc{
		font-size: 14px;
		margin-bottom: 5px;
		-webkit-line-clamp: 3;
	}
	.course-stats{
		margin-bottom: 10px;
	}
}

/* 手机横屏 (≤ 768px) - 改为上下布局 */
@media screen and (max-width: 768px) {
    .course-card-inner {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .course-fengm {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }
    
    .course-info {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .course-name {
        font-size: 20px;
    }
    
    .course-stats {
        margin-bottom: 20px;
    }
    
    .btn-study {
        display: block;
        text-align: center;
        padding: 12px 0;
        width: 100%;
    }
    
    .breadcrumb-nav {
        padding: 10px 14px;
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    .breadcrumb-text {
        font-size: 12px;
    }
    
    .panel-head {
        padding: 12px 16px;
    }
    
    .panel-head h3 {
        font-size: 16px;
    }
    
    .chapter-title {
        padding: 14px 16px;
    }
    
    .chapter-title .name {
        font-size: 14px;
    }
    
    .video-list li a {
        padding: 12px 16px 12px 28px;
    }
    
    .v-name {
        font-size: 13px;
    }
    
    .side-card {
        padding: 16px;
    }
    
    .course-item-side .course-cover {
        width: 100px;
    }
}

/* 手机竖屏 (≤ 480px) */
@media screen and (max-width: 480px) {
    .page-course-detail .layui-container {
        padding: 12px 8px !important;
    }
    
    .course-card-inner {
        padding: 16px;
        gap: 16px;
    }
    
    .course-name {
        font-size: 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .meta-level {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .course-desc {
        font-size: 13px;
    }
    
    .course-stats {
        gap: 16px;
        margin-bottom: 16px;
    }
    
    .stat {
        font-size: 12px;
    }
    
    .breadcrumb-nav {
        padding: 8px 12px;
        border-radius: 10px;
        margin-bottom: 12px;
    }
    
    .breadcrumb-text {
        font-size: 11px;
    }
    
    .panel {
        border-radius: 16px;
    }
    
    .panel-head {
        padding: 10px 14px;
    }
    
    .panel-head h3 {
        font-size: 15px;
    }
    
    .chapter-title {
        padding: 12px 14px;
    }
    
    .chapter-title .name {
        font-size: 13px;
    }
    
    .video-list li a {
        padding: 10px 14px 10px 22px;
    }
    
    .v-name {
        font-size: 12px;
    }
    
    .v-time {
        font-size: 11px;
    }
    
    .vip-block {
        padding: 20px 14px;
        font-size: 12px;
    }
    
    .side-card {
        padding: 14px;
        border-radius: 20px;
    }
    
    .card-header h3 {
        font-size: 16px;
    }
    
    .course-item-side {
        flex-direction: column;
        gap: 10px;
    }
    
    .course-item-side .course-cover {
        width: 100%;
    }
    
    .course-title-side {
        font-size: 13px;
    }
    
    .course-item-side .course-meta {
        font-size: 11px;
    }
}