@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

:root {
    /* Colors - Modern Minimalist Palette */
    --bg: #fdfdfd;
    --bg-soft: #f8f9fb;
    --text: #0f172a;
    --text-light: #475569;
    --muted: #94a3b8;
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --primary-light: #fee2e2;
    --accent: #f1f5f9;
    --card: #ffffff;
    --border: #f1f5f9;
    --border-dark: #e2e8f0;
    --success: #10b981;
    --success-light: #ecfdf5;

    /* Spacing System (8px base) */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;
    --sp-16: 64px;

    /* Shadows - Elevation System */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --shadow-primary: 0 10px 22px rgba(239, 68, 68, 0.22);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.page {
    min-height: 100vh;
}

/* 课程详情页不需要强制撑满整屏，避免和 footer 之间出现大空白 */
.page.course-page {
    min-height: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-5) 0; /* 增加上下内边距 */
}

.logo {
    font-weight: 800;
    font-size: 24px; /* 稍微增大 Logo */
    letter-spacing: -0.5px;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-logo-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.nav {
    display: flex;
    gap: 40px; /* 大幅增加导航项之间的间距 */
    align-items: center;
}

.nav a {
    color: var(--text-light);
    font-weight: 600;
    font-size: 16px; /* 稍微增大字号 */
}

.nav a:hover {
    color: var(--primary);
}

/* Buttons */
.nav a.button {
    color: #ffffff;
}

.button {
    background: var(--primary);
    color: #ffffff; /* 默认按钮文字为白色 */
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-primary);
}

.button:hover {
    background: var(--primary-dark);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.3);
}

.button.small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.button.outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary-dark) !important; /* 强制二级按钮使用深蓝色文字，防止被基础类覆盖 */
    box-shadow: none;
}

.button.outline:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    background: var(--primary-light);
}

.link-button {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    font-weight: 600;
    font-size: 15px;
}

.link-button:hover {
    color: var(--primary);
}

/* Hero Section (Home) */
.hero-hero {
    background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 40%),
                radial-gradient(circle at bottom left, rgba(239, 68, 68, 0.06), transparent 40%);
    padding: var(--sp-16) 0 var(--sp-12);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--sp-12);
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(40px, 5vw, 64px);
    margin: var(--sp-4) 0 var(--sp-6);
    letter-spacing: -2px;
    color: var(--text);
}

.hero-copy p {
    color: var(--text-light);
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: var(--sp-8);
}

.pill {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-actions {
    display: flex;
    gap: var(--sp-4);
}

.hero-metrics {
    margin-top: var(--sp-12);
    display: flex;
    gap: var(--sp-10);
}

.hero-metrics div span {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.hero-metrics div small {
    color: var(--muted);
    font-weight: 600;
}

.visual-card {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: var(--sp-8);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

/* Course List Page */
.courses-hero {
    text-align: center;
    padding: var(--sp-16) 0 var(--sp-12);
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.06), transparent 70%);
}

.courses-hero h2 {
    font-size: 56px;
    letter-spacing: -2.5px;
    margin: var(--sp-4) 0 var(--sp-4);
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.courses-hero p {
    font-size: 20px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.course-grid {
    display: grid;
    gap: var(--sp-10);
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    padding-bottom: var(--sp-16);
    margin-top: 24px;
}

.course-card {
    background: var(--card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.course-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.course-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.course-cover-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-soft);
}

.course-card:hover img {
    transform: scale(1.05);
}

.course-card-body {
    padding: var(--sp-6);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-card-body h4 {
    font-size: 22px;
    margin-bottom: var(--sp-2);
}

.course-card-body p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: var(--sp-6);
}

.course-card-footer {
    margin-top: auto;
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.teacher-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Course Player & Sidebar */
.page.lesson-page {
    height: calc(100vh - 72px);
    overflow: hidden;
    display: block; /* 确保不是 flex，由内部 container 处理 */
}

.course-player-container {
    display: flex;
    height: 100%;
    width: 100%;
    background: #fff;
    overflow: hidden;
}

.course-sidebar {
    width: 360px;
    min-width: 360px; /* 确保宽度固定 */
    background: var(--bg-soft);
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
    overflow-y: auto;
}

.sidebar-header {
    padding: var(--sp-6);
    border-bottom: 1px solid var(--border);
}

.sidebar-header h4 {
    font-size: 18px;
    margin-bottom: var(--sp-4);
}

.mini-progress {
    height: 6px;
    background: var(--border-dark);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.mini-progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.5s ease;
}

.lesson-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--sp-4) 0;
}

/* Custom Scrollbar */
.lesson-nav::-webkit-scrollbar {
    width: 6px;
}
.lesson-nav::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-6);
    color: var(--text-light);
    font-weight: 500;
    position: relative;
}

.nav-item:hover:not(.locked) {
    background: rgba(239, 68, 68, 0.08);
    color: var(--primary);
}

.nav-item.active {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.nav-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-dark);
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
}

.nav-item.completed .status-icon {
    background: var(--success-light);
    color: var(--success);
}

.nav-item.active .status-icon {
    background: var(--primary);
    color: white;
}

.nav-item .status-icon svg {
    display: block;
}

.nav-item.completed .status-icon svg {
    stroke: var(--success);
}

.nav-item.locked .status-icon svg {
    stroke: var(--muted);
}

.nav-item.active .status-icon svg {
    stroke: white;
}

.lesson-content {
    flex-grow: 1;
    padding: var(--sp-10);
    overflow-y: auto;
    background: #fff;
}

.lesson-player {
    max-width: 1000px;
    margin: 0 auto;
}

.player-header {
    margin-bottom: var(--sp-8);
}

.player-header h2 {
    font-size: 32px;
    margin-top: var(--sp-2);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    background: #000;
}

.video-wrapper #player {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.player-footer {
    margin-top: var(--sp-8);
}

.hint-box {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-6);
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 15px;
}

.hint-box.success {
    background: var(--success-light);
    color: var(--success);
}

.lesson-forum {
    margin-top: var(--sp-10);
    padding-top: var(--sp-8);
    border-top: 1px solid var(--border);
}

.lesson-forum-head h3 {
    font-size: 24px;
    margin-bottom: 6px;
}

.forum-compose {
    margin-top: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
}

.forum-compose textarea,
.forum-reply-form textarea {
    width: 100%;
    min-height: 88px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.forum-compose-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forum-thread-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.forum-thread {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: 14px;
}

.forum-thread-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.forum-thread-content {
    margin: 8px 0 12px;
    color: var(--text-light);
    line-height: 1.65;
    font-size: 14px;
}

.forum-reply-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
}

.forum-reply-form {
    margin-top: 10px;
    padding: 10px;
    border: 1px dashed var(--border-dark);
    border-radius: var(--radius-md);
    background: var(--bg-soft);
}

.forum-reply-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.forum-reply-item {
    border-left: 3px solid var(--border-dark);
    padding-left: 10px;
}

.forum-empty {
    border: 1px dashed var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    color: var(--muted);
}

/* Auth Pages */
.auth-page {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: var(--sp-10) 0;
    position: relative;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.auth-panel {
    position: relative;
    z-index: 1;
    width: min(480px, 92vw);
    background: #fff;
    border-radius: var(--radius-xl);
    padding: var(--sp-10);
    box-shadow: var(--shadow-xl);
}

.auth-panel h2 {
    font-size: 32px;
    margin-bottom: var(--sp-2);
}

.auth-panel p {
    color: var(--text-light);
    margin-bottom: var(--sp-8);
}

form label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: var(--sp-2);
}

form input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
    font-family: inherit;
    font-size: 15px;
    margin-bottom: var(--sp-4);
    transition: var(--transition);
}

form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Quiz Chat */
.quiz-chat {
    max-width: 900px;
    margin: var(--sp-10) auto;
}

.chat-window {
    height: 500px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: var(--sp-6);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    box-shadow: var(--shadow-md);
}

.chat-bubble {
    max-width: 80%;
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--radius-lg);
    font-size: 15px;
    line-height: 1.6;
}

.chat-bubble.assistant {
    background: var(--bg-soft);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Footer */
.footer {
    background: var(--bg-soft);
    padding: var(--sp-16) 0 var(--sp-10);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--sp-10);
}

.footer h4 {
    font-size: 18px;
    margin-bottom: var(--sp-6);
}

.footer a {
    display: block;
    color: var(--text-light);
    margin-bottom: var(--sp-3);
    font-size: 15px;
}

.footer a:hover {
    color: var(--primary);
}

/* Utilities */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.alert {
    padding: var(--sp-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--sp-6);
    font-weight: 500;
}
.alert-error { background: #fef2f2; color: #991b1b; }
.alert-success { background: var(--success-light); color: var(--success); }

/* Course Detail (Higgsfield) */
.course-detail-page {
    padding: var(--sp-12) 0;
}

.course-detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--sp-10);
    align-items: start;
}

.course-main-info h1 {
    font-size: 48px;
    letter-spacing: -1.5px;
    margin-bottom: var(--sp-4);
}

.course-main-info .description {
    font-size: 20px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: var(--sp-8);
    max-width: 800px;
}

.course-meta-strip {
    display: flex;
    gap: var(--sp-8);
    margin-bottom: var(--sp-10);
    padding: var(--sp-4) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-item small {
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.meta-item span {
    font-weight: 700;
    color: var(--text);
}

.course-sidebar-card {
    background: var(--card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.sidebar-video-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
    overflow: hidden;
}

.sidebar-video-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.sidebar-content {
    padding: var(--sp-8);
}

.sidebar-price {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: var(--sp-6);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-price .free-badge {
    font-size: 12px;
    padding: 2px 8px;
    background: var(--success-light);
    color: var(--success);
    border-radius: 4px;
}

.sidebar-features {
    margin-top: var(--sp-8);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-light);
}

.feature-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

.lesson-section {
    margin-top: var(--sp-12);
}

.lesson-section h3 {
    font-size: 24px;
    margin-bottom: var(--sp-6);
}

.modern-lesson-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.modern-lesson-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-5) var(--sp-6);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.modern-lesson-item:hover:not(.locked) {
    border-color: var(--primary);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.modern-lesson-item.locked {
    opacity: 0.6;
    background: var(--bg-soft);
    cursor: not-allowed;
}

.lesson-info-left {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.lesson-number {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.modern-lesson-item.done .lesson-number {
    background: var(--success-light);
    color: var(--success);
}

.lesson-title-box strong {
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

@media (max-width: 1024px) {
    .course-detail-grid {
        grid-template-columns: 1fr;
    }
    .course-sidebar-card {
        position: static;
        margin-top: var(--sp-8);
    }
}

/* Home Specific */
.home-hero {
    padding: var(--sp-16) 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 10%, rgba(239, 68, 68, 0.08), transparent 34%),
        radial-gradient(circle at 85% 85%, rgba(239, 68, 68, 0.05), transparent 30%);
}

.home-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-12);
    align-items: center;
}

.home-hero-content h1 {
    font-size: 64px;
    line-height: 1.1;
    letter-spacing: -3px;
    margin: var(--sp-4) 0 var(--sp-6);
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-hero-content p {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: var(--sp-8);
    max-width: 540px;
}

.home-hero-actions {
    margin-bottom: var(--sp-6);
}

.home-proof-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--sp-8);
}

.home-proof-row p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
}

.home-proof-avatars {
    display: inline-flex;
    align-items: center;
}

.home-proof-avatars span {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    border: 2px solid #fff;
    margin-left: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #fb7185, #ef4444);
}

.home-proof-avatars span:first-child {
    margin-left: 0;
}

.home-value-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-8);
}

.home-value-item {
    padding: var(--sp-4);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.home-value-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.home-value-item p {
    margin: 0;
    line-height: 1.5;
}

.home-visual-stack {
    position: relative;
    height: 560px;
}

.home-product-frame {
    position: absolute;
    right: 20px;
    top: 36px;
    width: min(520px, 100%);
    padding: 24px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
}

.home-product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-5);
    font-size: 14px;
    font-weight: 700;
}

.home-live-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.home-live-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--primary);
}

.home-product-course {
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.home-product-course img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.home-product-course-meta {
    padding: var(--sp-4);
}

.home-product-course-meta strong {
    display: block;
    margin-bottom: 2px;
}

.home-product-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: var(--sp-5);
    margin-bottom: var(--sp-3);
}

.home-product-progress strong {
    font-size: 28px;
    line-height: 1;
}

.home-product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--sp-4);
}

.home-product-badges span {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.home-float-card {
    z-index: 3;
}

.home-float-card-verified {
    top: 10px;
    left: 0;
    width: 250px;
}

.home-float-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.home-primary-icon {
    background: var(--primary);
    color: #fff;
}

.home-float-card-score {
    bottom: 24px;
    left: 40px;
    width: 230px;
    background: var(--bg-soft);
}

.home-float-card-score strong {
    font-size: 34px;
    line-height: 1.1;
    display: block;
    margin: 2px 0 6px;
}

.ai-logo-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.ai-logo-track {
    display: flex;
    width: max-content;
    gap: 14px;
    animation: aiLogoScroll 36s linear infinite;
}

.ai-logo-item {
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-full);
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    box-shadow: var(--shadow-sm);
}

@keyframes aiLogoScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.floating-card {
    position: absolute;
    background: #fff;
    border-radius: var(--radius-xl);
    padding: var(--sp-6);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    transition: var(--transition);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.floating-card:nth-child(2) {
    animation-delay: -3s;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
    margin-top: var(--sp-8);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--border);
}

.stat-item h3 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.stat-item p {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
}

.home-why-section {
    padding: 120px 0;
}

.home-why-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 84px;
    align-items: center;
}

.home-why-intro h2 {
    font-size: 48px;
    line-height: 1.1;
    margin: 18px 0 18px;
}

.home-why-intro > p {
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 22px;
    max-width: 560px;
}

.home-why-highlight {
    border: 1px solid var(--border-dark);
    background: linear-gradient(140deg, #fff 0%, #fef2f2 100%);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 20px;
}

.home-why-highlight strong {
    display: block;
    margin-bottom: 4px;
}

.home-why-cards {
    display: grid;
    gap: 14px;
}

.home-why-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: 18px;
    transition: var(--transition);
}

.home-why-card:hover {
    transform: translateX(8px);
    border-color: #fecaca;
    box-shadow: var(--shadow-md);
}

.home-why-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.home-why-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
}

.home-why-card p {
    margin: 0;
}

.home-why-visual {
    position: relative;
}

.home-why-panel {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    background: #fff;
    padding: 26px;
}

.home-why-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.home-why-panel-head span {
    display: inline-block;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.home-why-path {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-why-path-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-soft);
}

.home-why-path-item span {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border-dark);
    font-size: 12px;
    font-weight: 800;
    color: var(--text-light);
    flex-shrink: 0;
}

.home-why-path-item strong {
    font-size: 15px;
    line-height: 1.35;
}

.home-why-path-item p {
    margin: 2px 0 0;
}

.home-why-path-item.done span {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

.home-why-path-item.active {
    border-color: #fecaca;
    background: #fff1f2;
}

.home-why-path-item.active span {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.home-why-result {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.home-why-result strong {
    display: block;
    margin-top: 3px;
    font-size: 24px;
}

/* Mobile Drawer */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    margin-left: auto; /* 确保在 flex 容器中靠右 */
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transition: var(--transition);
    padding: 24px;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    right: 0;
}

.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-nav a {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.course-card-footer .button.small {
    color: #000 !important; /* 查看详情文字变黑 */
    background: var(--bg-soft);
    border: 1px solid var(--border-dark);
    box-shadow: none;
}

.course-card-footer .button.small:hover {
    background: var(--border-dark);
    transform: none;
}

/* About Page */
.about-hero {
    padding: 136px 0 108px;
    background:
        radial-gradient(circle at 20% 10%, rgba(239, 68, 68, 0.08), transparent 34%),
        radial-gradient(circle at 85% 70%, rgba(239, 68, 68, 0.06), transparent 36%);
}

.about-hero-inner {
    max-width: 840px;
}

.about-hero-inner h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -1.8px;
    margin: 16px 0 18px;
}

.about-hero-inner p {
    font-size: 19px;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

.about-story {
    padding: 48px 0 52px;
}

.about-story-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-story-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.about-story-card:hover {
    transform: translateY(-4px);
    border-color: #fecaca;
    box-shadow: var(--shadow-md);
}

.about-story-card h3 {
    font-size: 20px;
    margin-bottom: 14px;
}

.about-story-card p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.7;
}

.about-flow-head {
    text-align: center;
    margin-bottom: 54px;
}

.about-flow-head h2 {
    margin-top: 14px;
    font-size: clamp(30px, 4.5vw, 46px);
}

.about-flow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.about-flow-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.about-flow-item span {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.about-flow-item h4 {
    font-size: 17px;
    margin-bottom: 10px;
}

.about-flow-item p {
    margin: 0;
}

.about-cta-section {
    padding: 52px 0 32px;
}

.about-cta-card {
    background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
    border: 1px solid #fecaca;
    border-radius: var(--radius-xl);
    padding: 54px;
    text-align: center;
}

.about-cta-card h3 {
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 10px;
}

.about-cta-card p {
    margin: 0 auto 30px;
    max-width: 680px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-inner {
        display: flex;
        flex-direction: row !important; /* 强制左右排列 */
        align-items: center;
        justify-content: space-between;
    }
    .desktop-nav { display: none; }
    .mobile-menu-toggle { display: block; }
    .home-hero-inner { grid-template-columns: 1fr; text-align: center; }
    .home-hero-content p { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .home-proof-row { justify-content: center; }
    .home-value-grid { grid-template-columns: 1fr; text-align: left; }
    .stat-grid { justify-content: center; }
    .home-visual-stack { height: 500px; margin-top: var(--sp-10); }
    .home-product-frame { left: 0; right: 0; margin: 0 auto; width: min(580px, 100%); }
    .home-float-card-verified { left: 10px; }
    .home-float-card-score { left: auto; right: 12px; }
    .section-split { grid-template-columns: 1fr !important; gap: var(--sp-10) !important; }
    .media-card { height: 400px !important; order: -1; }
    .home-why-grid { grid-template-columns: 1fr; gap: 44px; }
    .home-why-intro h2 { font-size: 40px; }
    .home-why-intro > p { max-width: none; }
    .about-hero { padding: 110px 0 82px; }
    .about-story { padding: 24px 0 28px; }
    .about-story-grid { grid-template-columns: 1fr; }
    .about-flow-head { margin-bottom: 32px; }
    .about-flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-cta-section { padding: 34px 0 22px; }
    .about-cta-card { padding: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    
    /* Course Player Responsive */
    .page.lesson-page { height: auto; overflow: visible; }
    .course-player-container { flex-direction: column; height: auto; }
    .course-sidebar { width: 100%; min-width: 100%; border-right: none; border-bottom: 1px solid var(--border-dark); }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: row !important;
        padding: var(--sp-4) 0;
    }
    .course-player-container { flex-direction: column; height: auto; overflow: visible; }
    .course-sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .lesson-content { padding: var(--sp-6); }
    
    .home-hero-content h1 { font-size: 36px; letter-spacing: -1px; }
    .home-hero-content p { font-size: 16px; }
    .ai-logo-track { animation-duration: 28s; }
    .ai-logo-item { padding: 8px 14px; font-size: 12px; }
    .about-hero { padding: 94px 0 62px; }
    .about-hero-inner p { font-size: 16px; }
    .about-story { padding: 18px 0 24px; }
    .about-story-card { padding: 22px; }
    .about-flow-grid { grid-template-columns: 1fr; }
    .about-flow-item { padding: 20px; }
    .about-cta-section { padding: 28px 0 20px; }
    .about-cta-card { padding: 28px; text-align: left; }
    .about-cta-card p { margin-left: 0; margin-right: 0; }
    .about-cta-card .hero-actions { justify-content: flex-start; }
    .home-why-section { padding: 84px 0; }
    .home-why-intro h2 { font-size: 32px; }
    .home-why-intro > p { font-size: 16px; }
    .home-why-highlight { text-align: left; }
    .home-why-card { text-align: left; }
    .home-why-result strong { font-size: 20px; }
    .home-proof-row p { font-size: 13px; }
    .home-value-item strong { font-size: 13px; }
    .stat-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
    .stat-item h3 { font-size: 20px; }
    .home-visual-stack { display: none; }
    
    /* Step by Step Section Responsive */
    .step-section-grid {
        grid-template-columns: 1fr !important;
        gap: 60px !important;
        text-align: center;
    }
    .step-intro {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .step-list {
        width: 100%;
    }
    .modern-lesson-item {
        transform: none !important; /* 移除手机端的阶梯偏移 */
        padding: 24px !important;
        text-align: left; /* 保持步骤内容左对齐，方便阅读 */
    }
    .modern-lesson-item h4 {
        font-size: 18px !important;
    }
    .modern-lesson-item p {
        font-size: 13px !important;
    }
    
    .course-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
    .course-detail-grid { grid-template-columns: 1fr; }
    .course-main-info h1 { font-size: 32px; }
    .course-meta-strip { flex-wrap: wrap; gap: var(--sp-4); }
    
    .footer-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
    
    .admin-header { flex-direction: column; align-items: flex-start !important; gap: 24px; }
    .admin-header .button { width: 100%; }
    
    .admin-form-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .admin-form-actions { display: flex !important; flex-direction: column !important; gap: 12px !important; }
    .admin-form-actions a.button, .admin-form-actions button { width: 100% !important; margin: 0 !important; display: flex !important; }
    
    .lesson-row { grid-template-columns: 1fr !important; }
    .lesson-row > div:last-child { text-align: left !important; }
    
    /* Admin Dashboard Responsive */
    table thead { display: none; }
    table, table tbody, table tr, table td { display: block; width: 100%; }
    table tr { margin-bottom: 16px; border: 1px solid var(--border-dark); border-radius: var(--radius-md); padding: 16px; }
    table td { padding: 8px 0 !important; border: none !important; }
    table td:last-child { text-align: left !important; }
    .admin-actions { justify-content: flex-start !important; }
}

/* Profile Page */
.profile-banner {
    height: 200px;
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
    position: relative;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
}

.profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-header {
    background: #fff;
    padding: 0 var(--sp-8) var(--sp-8);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    border: 1px solid var(--border);
    border-top: none;
    margin-bottom: var(--sp-10);
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: var(--sp-6);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    border: 4px solid #fff;
    background: #fff;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
}

.profile-info {
    flex-grow: 1;
    padding-top: var(--sp-4);
}

.profile-info h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--text-light);
    font-size: 15px;
}

.profile-stats {
    display: flex;
    gap: var(--sp-8);
}

.profile-stat-item {
    text-align: center;
}

.profile-stat-item strong {
    display: block;
    font-size: 20px;
    color: var(--text);
}

.profile-stat-item span {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
}

.profile-section {
    margin-bottom: var(--sp-12);
}

.profile-section h2 {
    font-size: 24px;
    margin-bottom: var(--sp-6);
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--sp-6);
}

.learning-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.learning-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.learning-card-thumb {
    aspect-ratio: 16 / 9;
    background: var(--bg-soft);
    position: relative;
}

.learning-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.learning-card-body {
    padding: var(--sp-5);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.learning-card h3 {
    font-size: 18px;
    margin-bottom: var(--sp-2);
    line-height: 1.4;
}

.learning-progress {
    margin-top: auto;
    padding-top: var(--sp-4);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.progress-track {
    height: 6px;
    background: var(--bg-soft);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--sp-6);
}

.cert-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    text-align: center;
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.cert-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--sp-4);
}

.cert-card h3 {
    font-size: 18px;
    margin-bottom: var(--sp-2);
}

.cert-card p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: var(--sp-4);
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-bottom: var(--sp-6);
    }
    
    .profile-avatar {
        margin-top: -60px;
    }
    
    .profile-stats {
        margin-top: var(--sp-4);
        width: 100%;
        justify-content: center;
    }
}
