/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ee4c2c;
    --secondary-color: #f05732;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --error-color: #dc3545;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-link:hover {
    opacity: 0.8;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 主要内容 */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero .feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero .feature span:not(.feature-icon) {
    color: #333;
}

.feature-icon {
    font-size: 1.5rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* 课程区域 */
.courses-section, .about-section, .learning-path {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

/* 课程网格 */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.course-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

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

.course-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
}

.course-number {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.course-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.course-body {
    padding: 1.5rem;
}

.sections-count {
    color: #666;
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-list {
    list-style: none;
    margin-bottom: 1rem;
}

.section-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.section-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.more-sections {
    color: #999;
    font-style: italic;
}

.course-footer {
    padding: 0 1.5rem 1.5rem;
}

/* 特色网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon-large {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: #666;
    line-height: 1.8;
}

/* 学习路径 */
.learning-path {
    background-color: var(--light-color);
}

.path-timeline {
    max-width: 800px;
    margin: 3rem auto 0;
    position: relative;
}

.path-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.path-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.path-marker {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    z-index: 1;
}

.path-content {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.path-content h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.path-content p {
    color: #666;
}

/* CTA 区域 */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.cta-content .btn-primary:hover {
    background-color: var(--light-color);
}

/* 面包屑导航 */
.breadcrumb {
    background-color: var(--light-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #999;
}

/* 章节页面 */
.chapter-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.chapter-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.chapter-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.chapter-meta {
    font-size: 1.1rem;
    opacity: 0.9;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-icon {
    font-size: 1.3rem;
}

.sections-section {
    padding: 3rem 0;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.section-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.section-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

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

.section-number {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
}

.chapter-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* 小节页面布局 */
.section-layout {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-sticky {
    position: sticky;
    top: 80px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.sidebar-link:hover {
    background-color: var(--light-color);
}

.sidebar-link.active {
    background-color: var(--primary-color);
    color: white;
}

.link-number {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
}

.link-text {
    font-size: 0.95rem;
}

.section-main {
    flex: 1;
    min-width: 0;
}

.section-header {
    margin-bottom: 2rem;
}

.section-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-main .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* 内容卡片 */
.content-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.content-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.content-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.content-card p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-card ul, .content-card ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-card li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.content-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.content-card table th,
.content-card table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.content-card table th {
    background-color: var(--light-color);
    font-weight: 600;
}

.content-card pre {
    background-color: #1e1e1e;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
    border: 1px solid #333;
    position: relative;
}

.content-card pre code {
    display: block;
    padding: 1rem;
    padding-left: 3.5rem;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #d4d4d4;
    counter-reset: line;
}

/* 代码行 */
.content-card pre code .code-line {
    display: block;
    position: relative;
    padding-left: 0.5rem;
    min-height: 1.6em;
}

.content-card pre code .code-line::before {
    counter-increment: line;
    content: counter(line);
    position: absolute;
    left: -3rem;
    width: 2.5rem;
    text-align: right;
    color: #6e7681;
    font-size: 0.8rem;
    user-select: none;
    border-right: 1px solid #333;
    padding-right: 0.75rem;
}

/* 复制按钮 */
.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #a0a0a0;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.code-copy-btn svg {
    width: 14px;
    height: 14px;
}

.content-card pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.code-copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* 代码语法高亮基础色 */
.content-card pre code .keyword { color: #569cd6; }
.content-card pre code .string { color: #ce9178; }
.content-card pre code .comment { color: #6a9955; }
.content-card pre code .number { color: #b5cea8; }
.content-card pre code .function { color: #dcdcaa; }
.content-card pre code .class-name { color: #4ec9b0; }

.content-card code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #24292e;
}

/* 内联代码 */
.content-card p code,
.content-card li code {
    background: #f0f0f0;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: #e83e8c;
}

/* 应用网格 */
.application-grid, .ml-types, .features, .case-studies, .tensor-dimensions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.app-item, .type-card, .feature, .case, .dim-card {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.app-item h4, .type-card h4, .feature h4, .case h4, .dim-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* 代码示例 */
.code-example {
    margin: 1.5rem 0;
}

.code-example h4 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* 练习区域 */
.exercise-section {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.exercise-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.exercise-icon {
    font-size: 2rem;
}

.exercise-card {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.exercise-question {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

/* 选择题 */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.quiz-option input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-text {
    font-size: 1rem;
}

/* 匹配题 - 填空选择式 */
.matching-options-box {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.options-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
}

.options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.option-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.matching-fill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.fill-item:hover {
    border-color: #cbd5e1;
}

.fill-item.correct {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.fill-item.incorrect {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.fill-question {
    flex: 1;
    font-weight: 500;
    color: var(--text-color);
    min-width: 120px;
}

.fill-arrow {
    color: var(--text-muted);
    font-size: 1.25rem;
}

.fill-input-wrapper {
    min-width: 100px;
}

.fill-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    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='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.fill-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.fill-select:hover {
    border-color: var(--primary-color);
}

.fill-status {
    font-size: 1.25rem;
    min-width: 28px;
    text-align: center;
}

.fill-item.correct .fill-status::after {
    content: '✓';
    color: #10b981;
    font-weight: bold;
}

.fill-item.incorrect .fill-status::after {
    content: '✗';
    color: #ef4444;
    font-weight: bold;
}

.fill-item.correct .fill-select,
.fill-item.incorrect .fill-select {
    pointer-events: none;
    opacity: 0.8;
}

/* 移动端填空题适配 */
@media (max-width: 768px) {
    .fill-item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .fill-question {
        flex: none;
        width: 100%;
    }

    .fill-arrow {
        display: none;
    }

    .fill-input-wrapper {
        flex: 1;
    }

    .options-list {
        gap: 0.5rem;
    }

    .option-badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* 提交按钮脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.pulse-animation {
    animation: pulse 1.5s infinite;
}

/* 代码编辑器 */
.code-editor {
    margin-bottom: 1rem;
}

.code-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    background-color: #f6f8fa;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
}

.code-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.code-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.code-output {
    background-color: #f6f8fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1rem;
    display: none;
}

.code-output.show {
    display: block;
}

.code-output pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

/* 练习反馈 */
.exercise-feedback {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
}

.exercise-feedback.show {
    display: block;
}

.exercise-feedback.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.exercise-feedback.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* 小节导航 */
.section-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    opacity: 0.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .sections-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    /* 代码块移动端适配 */
    .content-card pre code {
        font-size: 0.8rem;
        padding-left: 3rem;
    }

    .content-card pre code .code-line::before {
        left: -2.5rem;
        width: 2rem;
        font-size: 0.7rem;
    }

    .code-copy-btn {
        opacity: 1;
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }

    .code-copy-btn span {
        display: none;
    }

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

    .navbar .container {
        position: relative;
    }

    .nav-brand a {
        font-size: 1.2rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .logo-text {
        display: none;
    }

    /* 显示移动端菜单按钮 */
    .mobile-menu-toggle {
        display: flex;
    }

    /* 移动端菜单样式 */
    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 60px);
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        flex-direction: column;
        padding: 2rem 0;
        gap: 0;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1rem;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        text-align: left;
    }

    .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
        opacity: 1;
    }

    /* Hero 区域 */
    .hero {
        padding: 2.5rem 0;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-features {
        gap: 1rem;
    }

    .hero .feature {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* 章节标题 */
    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* 课程和特色网格 */
    .courses-grid, .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .course-card {
        margin: 0 5px;
    }

    /* 学习路径 */
    .path-timeline::before {
        left: 20px;
    }

    .path-item {
        gap: 1rem;
    }

    .path-marker {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .path-content {
        padding: 1rem;
    }

    .path-content h4 {
        font-size: 1.1rem;
    }

    /* 小节页面布局 */
    .section-layout {
        flex-direction: column;
        padding: 1rem 0;
        gap: 1rem;
    }

    .sidebar {
        width: 100%;
        order: 2;
    }

    .sidebar-sticky {
        position: static;
        max-height: 300px;
        overflow-y: auto;
    }

    .sidebar-title {
        font-size: 1rem;
    }

    .sidebar-link {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .section-main {
        order: 1;
    }

    .section-main .section-title {
        font-size: 1.75rem;
    }

    /* 内容卡片 */
    .content-card {
        padding: 1.25rem;
    }

    .content-card h3 {
        font-size: 1.5rem;
    }

    .content-card h4 {
        font-size: 1.15rem;
    }

    .content-card table {
        font-size: 0.875rem;
        display: block;
        overflow-x: auto;
    }

    .content-card pre {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    /* 应用网格 */
    .application-grid, .ml-types, .features, .case-studies, .tensor-dimensions {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* 练习区域 */
    .exercise-section {
        padding: 1.25rem;
    }

    .exercise-title {
        font-size: 1.5rem;
    }

    .exercise-card {
        padding: 1.25rem;
    }

    .exercise-question {
        font-size: 1.05rem;
    }

    .quiz-option {
        padding: 0.75rem;
    }

    .quiz-option input[type="radio"] {
        width: 18px;
        height: 18px;
        margin-right: 0.75rem;
    }

    .code-textarea {
        font-size: 0.875rem;
        min-height: 150px;
    }

    .code-actions {
        flex-direction: column;
    }

    .code-actions .btn {
        width: 100%;
    }

    /* 导航按钮 */
    .chapter-navigation, .section-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }

    .chapter-navigation .btn,
    .section-navigation .btn {
        width: 100%;
        text-align: center;
    }

    /* 页脚 */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* CTA 区域 */
    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    /* 面包屑 */
    .breadcrumb {
        font-size: 0.875rem;
    }

    .breadcrumb .container {
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕优化 */
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-main .section-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    .content-card {
        padding: 1rem;
    }

    .exercise-section {
        padding: 1rem;
    }

    .exercise-card {
        padding: 1rem;
    }

    .quiz-option {
        padding: 0.625rem;
        font-size: 0.9rem;
    }

    .code-textarea {
        font-size: 0.8rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .quiz-option {
        min-height: 48px;
    }

    .sidebar-link {
        min-height: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* 横屏优化 */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-layout {
        padding: 1rem 0;
    }
}

/* ===========================
   控制台 CTA 部分样式
   =========================== */
.console-cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0a0e14 0%, #1a1f2e 100%);
    position: relative;
    overflow: hidden;
}

.console-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(238, 76, 44, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.console-cta-card {
    background: rgba(21, 26, 33, 0.8);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    padding: 3rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.console-cta-card:hover {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 15px 50px rgba(0, 255, 136, 0.2);
    transform: translateY(-5px);
}

.console-cta-icon {
    font-size: 5rem;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
    animation: float 3s ease-in-out infinite;
}

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

.console-cta-content {
    flex: 1;
}

.console-cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, #00ff88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.console-cta-desc {
    color: #9ca3af;
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.console-cta-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.console-feature-tag {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.console-feature-tag:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
    transform: scale(1.05);
}

.console-cta-btn {
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(238, 76, 44, 0.4);
    position: relative;
    overflow: hidden;
}

.console-cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.console-cta-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .console-cta-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2.5rem;
    }

    .console-cta-icon {
        font-size: 4rem;
        margin: 0 auto;
    }

    .console-cta-features {
        justify-content: center;
    }

    .console-cta-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .console-cta-section {
        padding: 3rem 0;
    }

    .console-cta-card {
        padding: 2rem 1.5rem;
    }

    .console-cta-title {
        font-size: 1.5rem;
    }

    .console-cta-desc {
        font-size: 1rem;
    }

    .console-cta-icon {
        font-size: 3rem;
    }

    .console-cta-features {
        gap: 0.5rem;
    }

    .console-feature-tag {
        font-size: 0.813rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .console-cta-title {
        font-size: 1.25rem;
    }

    .console-cta-features {
        flex-direction: column;
        align-items: stretch;
    }

    .console-feature-tag {
        text-align: center;
    }
}

/* 代码块复制按钮 */
.code-block {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0;
    transition: all 0.3s;
    font-family: 'Noto Sans SC', sans-serif;
    z-index: 10;
}

.code-block:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.copy-btn.copied {
    background: var(--success-color);
    border-color: var(--success-color);
}

/* pre标签内的复制按钮 */
pre.code-block {
    position: relative;
}

pre.code-block .copy-btn {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
}

pre.code-block:hover .copy-btn {
    opacity: 1;
}
