/**
 * VIP.NIEYI.CN 暖色主题样式表
 * 温暖、热情、专业的配色方案
 * 主色调:橙色系 (#e67e22, #d35400) 搭配暖黄 (#f1c40f)
 */

/* ===== CSS 变量定义 ===== */
:root {
  /* 基础背景与文本 */
  --bg-paper: #FAF8F1;          /* 主背景(米白) */
  --bg-card: #ffffff;           /* 卡片白 */
  --text-primary: #0E090F;      /* 标题/重点(深色) */
  --text-secondary: #797979;    /* 正文文本(中灰) */

  /* 辅助色 */
  --color-blue: #517381;        /* 蓝灰 - 链接/次按钮 */
  --color-sand: #dfb19b;        /* 浅粉/沙色 - 装饰 */
  --color-cream: #ffe4bb;       /* 米黄 - 背景高亮 */
  --color-terracotta: #C1685D;  /* 砖红 - 主按钮/重要操作 */

  --radius-md: 12px;
  --radius-sm: 8px;
  --spacing-unit: 4px;

  /* 工具与效果变量 */
  --border-color: rgba(81, 115, 129, 0.1);
  --shadow-color: rgba(81, 115, 129, 0.15);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 40px rgba(0,0,0,0.15);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  --success: #27ae60;
  --success-light: rgba(39, 174, 96, 0.15);
  --warning: #f39c12;
  --warning-light: rgba(243, 156, 18, 0.15);
  --danger: #e74c3c;
  --danger-light: rgba(231, 76, 60, 0.15);
  --info: #3498db;
  --info-light: rgba(52, 152, 219, 0.15);
  --gray-200: #e9ecef;
  --border-radius-lg: 16px;
  --border-radius-md: var(--radius-md);
  --border-radius-sm: var(--radius-sm);
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
}

/* ===== 全局样式 ===== */
* {
    box-sizing: border-box;
}

body {

/* 自适应容器 padding */
.container {
    padding-left: clamp(1rem, 3vw, 2rem);
    padding-right: clamp(1rem, 3vw, 2rem);
}
    overflow-x: hidden;  /* 防止水平滚动 */
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: var(--bg-paper);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ===== 排版 ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}



.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(193, 104, 93, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 104, 93, 0.4);
    color: white;
    text-decoration: none;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-blue);
    color: white;
    box-shadow: 0 4px 15px rgba(81, 115, 129, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(81, 115, 129, 0.4);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(193, 104, 93, 0.2);
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.card-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

/* ===== 徽章与标签 ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    vertical-align: middle;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-secondary {
    background: var(--color-blue);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-info {
    background: var(--info);
    color: white;
}

/* VIP 徽章 */
.vip-badge {
    background: var(--color-sand);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    animation: vipGlow 3s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vip-badge::before {
    content: '👑';
    font-size: 1rem;
}

@keyframes vipGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(223, 177, 155, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(223, 177, 155, 0.8), 0 0 50px rgba(193, 104, 93, 0.4);
    }
}

/* ===== 提示框 ===== */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid;
    position: relative;
    animation: slideInDown 0.3s ease;
}

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

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success);
    color: #155724;
}

.alert-warning {
    background-color: var(--warning-light);
    border-color: var(--warning);
    color: #856404;
}

.alert-danger {
    background-color: var(--danger-light);
    border-color: var(--danger);
    color: #721c24;
}

.alert-info {
    background-color: var(--info-light);
    border-color: var(--info);
    color: #0c5460;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-close {
    position: absolute;
    top: 50%;
    right: var(--spacing-md);
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-paper);
    color: #333;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: rgba(193, 104, 93, 0.3);
    box-shadow: 0 0 0 3px rgba(193, 104, 93, 0.1);
    background-color: var(--bg-paper);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
}

.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.form-text {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235d6d7e' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.762 2.937 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
}

/* ===== 导航栏 ===== */
.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: none;
}

.navbar-nav a {
    position: relative;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-blue);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
    width: 80%;
}

/* ===== 课程卡片 ===== */
.course-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(81,115,129,0.06);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(81,115,129,0.06);
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.course-card-img {
    position: relative;
    height: 180px;
    background: var(--color-cream);
    overflow: hidden;
}

.course-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.course-card:hover .course-card-img img {
    transform: scale(1.05);
}

.course-card-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
}

.course-card-body {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.course-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--danger);
}

.course-card-price .original {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-left: var(--spacing-xs);
}

/* ===== 课程详情页 ===== */
.course-hero {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0;
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.course-hero::before {
    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.05'%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");
    opacity: 0.3;
}

.course-hero-content {
    position: relative;
    z-index: 1;
}

.course-hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.course-price-tag {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-blue);
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: rgba(255,255,255,0.2);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    margin: var(--spacing-md) 0;
}

.course-price-tag .original {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.7);
    text-decoration: line-through;
    margin-left: var(--spacing-sm);
}

/* ===== 课程列表 ===== */
.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

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

.course-lesson-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.course-lesson-item:hover {
    background: var(--bg-card);
}

.course-lesson-item:last-child {
    border-bottom: none;
}

.lesson-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(193, 104, 93, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    font-weight: 700;
    margin-right: var(--spacing-md);
    flex-shrink: 0;
}

.lesson-info {
    flex: 1;
}

.lesson-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.lesson-duration {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.lesson-action {
    margin-left: var(--spacing-md);
}

/* ===== 进度条 ===== */
.progress {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width var(--transition-normal);
    position: relative;
}



/* ===== 侧边栏 ===== */
.sidebar {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
}

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

.sidebar-menu li {
    margin-bottom: var(--spacing-xs);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(193, 104, 93, 0.1);
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar-menu .icon {
    margin-right: var(--spacing-sm);
    font-size: 1.2rem;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xl);
}

.pagination .page-item {
    display: inline-flex;
}

.pagination .page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--primary-color);
    background: var(--bg-paper);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination .page-link:hover {
    background: rgba(193, 104, 93, 0.05);
    border-color: rgba(193, 104, 93, 0.2);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.disabled .page-link {
    color: var(--text-secondary);
    pointer-events: none;
    opacity: 0.6;
}

/* ===== 工具类 ===== */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--color-blue) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-secondary) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--color-blue) !important; }
.bg-light { background-color: var(--bg-card) !important; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.my-md { margin-top: var(--spacing-md); margin-bottom: var(--spacing-md); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-bold { font-weight: 700; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.rounded { border-radius: var(--border-radius-md); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-full { border-radius: 50%; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    :root {
        --spacing-md: 0.75rem;
        --spacing-lg: 1rem;
        --spacing-xl: 1.5rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

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

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .d-md-none {
        display: none !important;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .navbar,
    footer,
    .btn,
    .alert {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== 深色模式支持 (可选) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #252525;
        --text-primary: #e0e0e0;
        --text-secondary: #b0b0b0;
        --border-color: #333;
    }
}

/* ===== 动画 ===== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.4s ease;
}

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

/* ===== 加载状态 ===== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== 营销首页样式 ===== */

/* Hero 区域 */
.hero-section {
    background: var(--primary-color);
    color: var(--text-primary);  /* 改为深色文字，在砖红背景上更清晰 */
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    margin-bottom: 4rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M40 0l40 40-40 40L0 40 50 0zm25 25L75 50 50 75 25 50 50 25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: none;  /* 不限制宽度 */
    margin: 0;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    color: #000000;
    opacity: 1;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-btn {
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-btn-primary {
    background: white;
    color: var(--primary-color);
}

.hero-btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    color: var(--primary-color);
    text-decoration: none;
}

.hero-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.6);
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
    text-decoration: none;
}

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

/* 痛点区块 */
.pain-points {
    padding: 5rem 0;
    background: var(--bg-paper);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #0E090F;
    margin-bottom: 1rem;
    font-weight: 800;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.pain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;  /* 居中 */
    padding: 0 1.5rem;
}

.pain-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(81,115,129,0.06);
    transition: all var(--transition-normal);
    border: 1px solid rgba(81,115,129,0.06);
    position: relative;
    overflow: hidden;
}

.pain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}

.pain-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(81,115,129,0.10);
    border-color: var(--primary-color);
}

.pain-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.pain-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.pain-desc {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 课程模块区块 */
.courses-section {
    padding: 5rem 0;
    background: var(--bg-card);
}

/* ========== 课程列表页 Hero ========== */
.page-hero {
    background: var(--primary-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: 3rem;
}

.page-hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.125rem;
    opacity: 0.9;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.course-card-lg {
    background: var(--bg-card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(81,115,129,0.06);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(81,115,129,0.06);
}

.course-card-lg:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(81,115,129,0.10);
    border-color: var(--primary-color);
}

.course-thumb {
    position: relative;
    height: 200px;
    background: var(--color-cream);
    overflow: hidden;
}

.course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.course-card-lg:hover .course-thumb img {
    transform: scale(1.05);
}

.course-thumb-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.course-price-tag {
    background: rgba(255,255,255,0.95);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.course-price-tag .original {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 0.5rem;
}

.course-badge {
    background: rgba(255,255,255,0.95);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.course-badge-svip {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
}

.course-badge-vip {
    background: linear-gradient(135deg, #C1685D 0%, #B85C38 100%);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(193, 104, 93, 0.4);
}

.course-badge-regular {
    background: linear-gradient(135deg, #5CB85C 0%, #4CAE4C 100%);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(92, 184, 92, 0.4);
}

.course-info {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.course-stat {
    display: flex;
    gap: 1rem;
}

.course-stat-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* 适合人群区块 */
.audience-section {
    padding: 5rem 0;
    background: var(--bg-paper);
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.audience-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
}

.audience-card:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.audience-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    display: block;
}

.audience-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.audience-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 学员评价区块 */
.testimonials-section {
    padding: 5rem 0;
    background: var(--bg-card);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.testimonial-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(81,115,129,0.06);
    border: 1px solid rgba(81,115,129,0.06);
    transition: all var(--transition-normal);
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(81,115,129,0.10);
    border-color: var(--primary-color);
}

.testimonial-quote {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-style: italic;
    position: relative;
    padding-left: 2rem;
}

.testimonial-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: -1rem;
    left: 0;
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
}

.testimonial-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.testimonial-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.testimonial-rating {
    color: #f1c40f;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* CTA 区块 */
.cta-section {
    padding: 5rem 0;
    background: var(--primary-color);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 40px 40px 0 0;
    margin-top: 2rem;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M50 0l50 50-50 50L0 50 50 0zm25 25L75 50 50 75 25 50 50 25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;

    padding: 0 1.5rem;
}

.cta-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.cta-text {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: #000000;
    opacity: 1;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.cta-btn-white {
    background: white;
    color: var(--primary-color);
}

.cta-btn-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    color: var(--primary-color);
    text-decoration: none;
}

.cta-btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: none;
}

.cta-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
    text-decoration: none;
    transform: translateY(-4px);
}

/* 统计数据条 */
.stats-bar {
    background: var(--bg-card);
    padding: 3rem 0;
    margin: -3rem auto 4rem;
    position: relative;
    z-index: 10;
    max-width: 1000px;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
    padding: 0 2rem;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
    .hero-btn { padding: 1rem 2rem; font-size: 1.1rem; }
    .section-title { font-size: 2rem; }
    .cta-title { font-size: 2.25rem; }
    .cta-btn { padding: 1rem 2rem; font-size: 1.1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .stat-item h3 { font-size: 2.5rem; }
    .hero-cta, .cta-buttons { flex-direction: column; align-items: center; }
    .hero-btn, .cta-btn { width: 100%; max-width: 300px; }

    /* ===== 课程详情页移动端样式 ===== */
    .course-hero-section {
        padding: 2rem 0;
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }

    .course-hero-grid {
        grid-template-columns: 1fr;  /* 单列堆叠 */
        gap: 2rem;
    }

    .course-hero-main {
        padding-right: 0;
        text-align: center;
    }

    .course-hero-side {
        order: -1;  /* 封面显示在标题上方 */
    }

    .course-thumbnail,
    .course-thumbnail-placeholder {
        height: 180px;
        max-width: 200px;
        margin: 0 auto;
    }

    .course-content-grid {
        grid-template-columns: 1fr;  /* 侧边栏和内容堆叠 */
        gap: 1.5rem;
    }

    .course-sidebar {
        position: static;
        max-height: none;
        order: -1;  /* 目录显示在内容上方 */
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }

    .lesson-count {
        font-size: 0.8rem;
    }

    .nav-item {
        padding: 0.75rem 1rem;
        font-size: 1rem;  /* 移动端字体适中 */
    }

    .nav-item .lesson-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .nav-item .lesson-title {
        font-size: 0.95rem;  /* 与父元素一致,覆盖通用 .lesson-title */
    }

    .free-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .lesson-content {
        padding: 1.5rem 1rem;  /* 减小内边距 */
    }

    .lesson-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .lesson-title {
        font-size: 1.75rem;  /* 从 2.25rem 降低 */
    }

    .lesson-meta {
        gap: 0.5rem;
    }

    .lesson-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-btn {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-section { padding: 4rem 0; border-radius: 0 0 30px 30px; }
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.75rem; }
    .courses-grid { grid-template-columns: 1fr; }

    /* 课程详情页小屏优化 */
    .course-hero-section {
        padding: 1.5rem 0;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .course-hero-grid {
        gap: 1.5rem;
    }

    .course-thumbnail-placeholder {
        height: 140px;
        max-width: 140px;
    }

    .course-sidebar {
        margin-bottom: 1rem;
    }

    .nav-group-title {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .nav-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.95rem;
    }

    .nav-item .lesson-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .lesson-title {
        font-size: 0.95rem;  /* 与父元素一致 */
    }

    .lesson-content {
        padding: 1rem;  /* 小屏减小 padding */
        font-size: 1rem;
        overflow-x: auto;  /* 允许横向滚动 */
    }

    .lesson-content img,
    .lesson-content pre,
    .lesson-content table {
        max-width: 100%;  /* 确保媒体元素不溢出 */
        overflow-x: auto;
        display: block;
    }

    .lesson-header {
        margin-bottom: 1rem;
    }

    .lesson-title {
        font-size: 1.5rem;  /* 从 1.75rem 降低 */
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        max-width: none;
    }
}

/* 辅助工具 */
.hero-section .text-gradient {
    color: inherit;  /* 继承父级深色 */
    font-weight: 800;
}

.shadow-hero {
    box-shadow: 0 20px 60px rgba(193, 104, 93, 0.2);
}

/* ===== 课程详情页样式 ===== */
.course-page {
    padding: 2rem 0 4rem;
}

.course-hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a85c4d 100%);
    color: white;
    padding: 3rem 0;
    border-radius: 20px;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.course-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M50 0L100 50 50 100 0 50z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.2;
}

.course-hero-grid {
    display: grid;
    grid-template-columns: 1fr minmax(150px, 250px);  /* 左侧自适应,右侧封面最小150px最大250px */
    gap: 3rem;
    align-items: center;
    justify-content: center;  /* 水平居中 */
    position: relative;
    z-index: 1;
}

.course-hero-main {
    padding-right: 2rem;
    text-align: center;  /* 文字居中 */
}

.course-hero-side {
    padding-right: clamp(10px, 2vw, 30px);  /* 自适应右边距:最小10px,最大30px,随屏幕缩放 */
}

/* Hero 区域标题 - 白色,仅限 Hero 内 */
.course-hero-section .course-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.15);
    line-height: 1.2;
}

.course-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.course-meta-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;  /* 标签居中 */
}

.course-meta-tags .badge {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
    backdrop-filter: blur(10px);
}

.course-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.course-thumbnail-placeholder {
    width: 100%;
    height: 250px;
    background: var(--color-cream);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    opacity: 0.6;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* 课程内容网格 */
.course-content-grid {
    display: grid;
    grid-template-columns: minmax(200px, 280px) 1fr;  /* 侧边栏最小200px,最大280px,主内容自适应 */
    gap: 3rem;
    align-items: start;
    width: 100%;
}

/* 侧边栏 */
.course-sidebar {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.25rem;  /* 减小 padding */
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.lesson-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-paper);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.nav-group {
    margin-bottom: 1.5rem;
}

.nav-group-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

/* 导航内标题字体(覆盖通用 .lesson-title)*/
.nav-item .lesson-title {
    font-size: 0.95rem;  /* 与父元素一致 */
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item:hover {
    background: rgba(193, 104, 93, 0.08);
    color: var(--primary-color);
    text-decoration: none;
}

.nav-item.active {
    background: rgba(193, 104, 93, 0.12);
    color: var(--primary-color);
    font-weight: 600;
    border-left: 3px solid var(--primary-color);
}

.nav-item.locked {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-item.locked:hover {
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
}

.nav-item .lesson-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-paper);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.nav-item.active .lesson-number {
    background: var(--primary-color);
    color: white;
}

.nav-item .lesson-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.free-badge {
    font-size: 0.65rem;
    background: var(--success);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
}

/* 主内容区 */
.course-main {
    min-height: 500px;
    max-width: min(90vw, 1400px);  /* 自适应:最大 1400px 或视口的 90% */
    width: 100%;
    margin: 0 auto;  /* 居中 */
}

.lesson-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

/* 课程内容页 - 章节大标题(仅 .lesson-header 内生效) */
.lesson-header .lesson-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.lesson-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.lesson-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.lesson-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;  /* 从 2.5rem 减少 */
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.05rem;
    overflow-x: auto;  /* 防止内容溢出 */
}

.lesson-content img,
.lesson-content pre,
.lesson-content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

.lesson-content h1, .lesson-content h2, .lesson-content h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.lesson-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.lesson-content code {
    background: var(--bg-paper);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.lesson-content pre {
    background: #1e293b;
    color: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.lesson-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.lesson-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-md);
}

.lesson-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.lesson-content a:hover {
    opacity: 0.8;
}

/* 章节导航 */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.nav-btn {
    flex: 1;
    max-width: 48%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.prev-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.prev-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateX(-4px);
}

.next-btn {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    margin-left: auto;
}

.next-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateX(4px);
}

/* 权限不足页面 */
.access-denied {
    padding: 4rem 2rem;
    text-align: center;
}

.access-denied .lock-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    display: block;
    animation: lockShake 2s ease-in-out infinite;
}

@keyframes lockShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-5deg); }
    75% { transform: translateX(5px) rotate(5deg); }
}

.vip-cta-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 占位符 */
.lesson-placeholder {
    text-align: center;
    padding: 4rem 2rem;
}

.placeholder-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.lesson-placeholder h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.lesson-placeholder p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .course-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .course-hero-side {
        order: -1;
    }

    .course-thumbnail,
    .course-thumbnail-placeholder {
        height: 200px;
        max-width: 300px;
        margin: 0 auto;
    }

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

    .course-sidebar {
        position: static;
        max-height: none;
    }

    .nav-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .nav-item .lesson-title {
        font-size: 0.9rem;  /* 继承父元素 */
    }

    .lesson-title {
        font-size: 1.75rem;
    }

    .lesson-content {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .course-hero-section {
        padding: 2rem 0;
        border-radius: 12px;
    }

    .course-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .lesson-navigation {
        flex-direction: column;
    }

    .nav-btn {
        max-width: 100%;
    }
}

/* 辅助类 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}



/* ===== 会员等级徽章(统一美化) ===== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    line-height: 1;
}
.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* VIP 徽章:金色渐变 + 金色边框 */
.badge-vip {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B6508;
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 2px 10px rgba(255, 165, 0, 0.35);
}

/* 付费/regular 徽章:蓝紫渐变 */
.badge-new {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* 免费徽章:绿色渐变 */
.badge-free {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: #ffffff;
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.4);
}

/* 徽章微动画(悬停时轻微上浮) */
.badge:hover {
    transform: translateY(-1px);
}

/* SVIP 徽章:深紫色 + 金色边框 */
.badge-svip {
    background: linear-gradient(135deg, #2c1a4d 0%, #1a0f2e 100%);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 2px 12px rgba(44, 26, 77, 0.5), 0 0 20px rgba(255, 215, 0, 0.2);
    position: relative;
}
.badge-svip::after {
    content: '✨';
    margin-left: 4px;
    font-size: 0.7em;
}
