/* 课程详情页样式 */
.course-detail-container {
    padding: 40px 0;
}

.course-detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.course-header {
    margin-bottom: 30px;
}

.course-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.course-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* 章节列表 */
.chapters-list {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.chapter-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.chapter-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.chapter-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.badge-free-small {
    background-color: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
}

.chapter-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.sections-list {
    margin-left: 20px;
}

.section-item {
    margin-bottom: 10px;
}

.section-link {
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.section-link:hover {
    background-color: #f5f7fa;
}

.section-link.locked {
    color: #999;
    cursor: not-allowed;
}

.lock-icon {
    margin-left: auto;
}

.no-sections {
    color: #999;
    font-size: 14px;
    font-style: italic;
}

.purchase-prompt {
    text-align: center;
    padding: 30px;
    background: #fff3cd;
    border-radius: 8px;
    margin-top: 20px;
    color: #856404;
}

/* 侧边栏 */
.course-detail-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.course-info-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-label {
    color: #666;
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    color: #333;
}

.info-value.status-completed {
    color: #28a745;
}

.info-value.price {
    color: #667eea;
    font-size: 18px;
}

.btn-purchase {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.purchased-badge {
    text-align: center;
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 20px;
}

/* 小节详情页 */
.section-detail-container {
    padding: 40px 0;
}

.section-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.breadcrumb {
    margin-bottom: 30px;
    color: #666;
    font-size: 14px;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.section-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.section-body {
    color: #333;
    line-height: 1.8;
    font-size: 16px;
}

.section-body p {
    margin-bottom: 15px;
}

.video-container {
    margin: 30px 0;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.attachment-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-download {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.section-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.nav-link {
    color: #667eea;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #f5f7fa;
}

/* 推荐课程侧边栏 */
.recommended-courses {
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.recommended-course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.rec-course-header {
    padding: 30px 20px;
    color: white;
    text-align: center;
}

.rec-course-header h4 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.rec-course-body {
    padding: 20px;
}

.rec-course-body p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.rec-course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.badge-price-small {
    background-color: #fff3cd;
    color: #856404;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
}

.rec-course-date {
    color: #999;
    font-size: 12px;
}

.btn-view-small {
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-view-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 支付弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.close {
    font-size: 28px;
    cursor: pointer;
    opacity: 0.8;
}

.close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px 25px;
    text-align: center;
}

.payment-amount {
    font-size: 18px;
    margin-bottom: 25px;
}

.payment-amount span {
    color: #667eea;
    font-size: 24px;
    font-weight: 700;
}

.qrcode-container {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.loading {
    color: #666;
}

#qrcodeImage {
    max-width: 100%;
    height: auto;
}

.payment-tip {
    font-size: 14px;
    color: #999;
}

/* 响应式 */
@media (max-width: 1024px) {
    .course-detail-layout,
    .section-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .course-detail-sidebar,
    .section-detail-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .section-content {
        padding: 20px;
    }
    
    .section-title {
        font-size: 24px;
    }
}
