/* ========== 课程详情页面样式 ========== */

/* 主色调定义 - 橙色系（封面背景除外） */
:root {
    --primary-color: #FF6B35;
    --primary-light: #FF8F66;
    --primary-dark: #E55A25;
    --primary-gradient: linear-gradient(135deg, #FF6B35 0%, #FF8F66 100%);
    --accent-color: #FF9F5A;
    --text-dark: #333;
    --text-gray: #666;
    --text-light: #999;
    --bg-light: #f5f5f5;
    --border-color: #e8e8e8;
}

/* ========== 页面基础 ========== */
.course-detail-page {
    min-height: 100vh;
    background: var(--bg-light);
}

/* ========== 课程英雄区域 ========== */
.course-hero {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4C1D95 100%);
    padding: 50px 0 60px;
    position: relative;
    overflow: hidden;
}

.course-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 143, 102, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

.course-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.course-hero-content {
    display: flex;
    gap: 40px;
    align-items: center;
    position: relative;
}

.course-hero-info {
    flex: 1;
    color: #fff;
}

.course-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin-bottom: 16px;
}

.course-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.course-desc {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.95;
    margin-bottom: 24px;
}

.course-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    opacity: 0.95;
}

.meta-item em {
    font-style: normal;
    font-weight: 600;
}

.meta-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-action {
    display: flex;
    align-items: center;
    gap: 16px;
}

.course-price {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.btn-study {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    background: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-study:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    background: var(--primary-gradient);
    color: #fff;
}

.btn-collect {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    font-size: 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-collect:hover {
    background: rgba(255, 255, 255, 0.25);
}

.course-hero-image {
    width: 400px;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
}

.course-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== 课程内容区域 ========== */
.course-content {
    padding: 40px 0 60px;
}

.course-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
}

.course-tab {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-gray);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-tab:hover {
    color: var(--primary-color);
}

.course-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 内容区域样式 ========== */
.content-section {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.content-body {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
}

.content-body p {
    margin-bottom: 16px;
}

.content-body p:last-child {
    margin-bottom: 0;
}

/* ========== 课程特色列表 ========== */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-icon {
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

/* ========== 学习内容列表 ========== */
.content-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.content-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.content-item:hover {
    background: #FFF5F0;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.1);
}

.content-item-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 20px;
}

.content-item-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.content-item-info p {
    font-size: 13px;
    color: #999;
    margin: 0;
}

/* ========== 课程大纲 ========== */
.outline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.outline-item {
    margin-bottom: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.outline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.outline-header:hover {
    background: #FFF5F0;
}

.outline-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.outline-number {
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.outline-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.outline-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.outline-arrow svg {
    width: 16px;
    height: 16px;
    fill: #999;
}

.outline-item.active .outline-arrow {
    transform: rotate(180deg);
}

.outline-body {
    display: none;
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.outline-item.active .outline-body {
    display: block;
}

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

.outline-chapters li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px dashed #f0f0f0;
}

.outline-chapters li:last-child {
    border-bottom: none;
}

.outline-chapters li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    flex-shrink: 0;
}

.outline-duration {
    margin-left: auto;
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

/* ========== 讲师介绍 ========== */
.teacher-info {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.teacher-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-details {
    flex: 1;
}

.teacher-details h4 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.teacher-title {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.teacher-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
}

/* ========== 加载状态 ========== */
.loading {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 响应式适配 ========== */
@media screen and (max-width: 992px) {
    .course-hero-content {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .course-hero-image {
        width: 100%;
        max-width: 500px;
        height: 250px;
    }

    .course-title {
        font-size: 28px;
    }

    .course-meta {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .course-hero {
        padding: 30px 0 40px;
    }

    .course-title {
        font-size: 24px;
    }

    .course-desc {
        font-size: 14px;
    }

    .course-meta {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .meta-item {
        font-size: 13px;
    }

    .course-action {
        flex-wrap: wrap;
    }

    .course-price {
        font-size: 28px;
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-study {
        flex: 1;
        padding: 12px 30px;
    }

    .btn-collect {
        padding: 12px 20px;
    }

    .course-hero-image {
        height: 200px;
    }

    .course-tabs {
        flex-wrap: wrap;
    }

    .course-tab {
        flex: 0 0 calc(50% - 4px);
        padding: 12px 16px;
        font-size: 14px;
    }

    .content-section {
        padding: 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .content-list {
        grid-template-columns: 1fr;
    }

    .teacher-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .teacher-avatar {
        width: 100px;
        height: 100px;
    }
}

@media screen and (max-width: 480px) {
    .course-hero {
        padding: 20px 0 30px;
    }

    .course-title {
        font-size: 20px;
    }

    .course-desc {
        font-size: 13px;
        line-height: 1.6;
    }

    .course-badge {
        font-size: 11px;
        padding: 4px 12px;
    }

    .course-hero-image {
        height: 180px;
        border-radius: 12px;
    }

    .course-tabs {
        gap: 6px;
        padding: 6px;
    }

    .course-tab {
        flex: 0 0 calc(50% - 3px);
        padding: 10px 12px;
        font-size: 13px;
    }

    .content-section {
        padding: 16px;
        border-radius: 12px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .content-body {
        font-size: 14px;
    }

    .feature-list li {
        padding: 12px 0;
        font-size: 14px;
    }

    .outline-header {
        padding: 14px 16px;
    }

    .outline-title {
        font-size: 14px;
    }

    .outline-body {
        padding: 14px 16px;
    }

    .teacher-avatar {
        width: 80px;
        height: 80px;
    }

    .teacher-details h4 {
        font-size: 18px;
    }
}
