/* ==========================================================================
   混沌理论与蝴蝶效应 — 课程网站样式
   ========================================================================== */

:root {
    --bg-dark: #0a0e1f;
    --bg-darker: #060912;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border-color: rgba(255, 255, 255, 0.10);
    --text-primary: #e8ecf8;
    --text-secondary: #9aa3c0;
    --text-muted: #6b7390;
    --accent-cyan: #00d4ff;
    --accent-magenta: #ff4d94;
    --accent-gold: #ffb347;
    --accent-violet: #8b5cf6;
    --accent-green: #4ade80;
    --accent-red: #f87171;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
    --gradient-hot: linear-gradient(135deg, #ff4d94 0%, #ffb347 100%);
    --nav-height: 64px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.35);
    --font-serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
    --font-sans: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-sans);
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 背景装饰 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.08), transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(0, 212, 255, 0.06), transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(255, 77, 148, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ========== 导航栏 ========== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(6, 9, 18, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.logo-icon {
    font-size: 22px;
    filter: drop-shadow(0 0 8px rgba(255, 77, 148, 0.6));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu li a {
    display: block;
    padding: 8px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14.5px;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
}

.nav-menu li a:hover {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
}

/* 移动端汉堡按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ========== Hero 首屏 ========== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-darker);
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(6, 9, 18, 0.35) 0%, rgba(6, 9, 18, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    max-width: 900px;
    animation: fadeUp 1s ease-out;
}

.hero-eyebrow {
    display: inline-block;
    color: var(--accent-cyan);
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    border: 1px solid rgba(0, 212, 255, 0.35);
    padding: 6px 20px;
    border-radius: 100px;
    margin-bottom: 28px;
    background: rgba(0, 212, 255, 0.06);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.25;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, #b8c4ff 40%, #00d4ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 20px 60px rgba(0, 212, 255, 0.15);
}

.hero-subtitle {
    font-size: clamp(15px, 2.2vw, 19px);
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 6px 24px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 34px rgba(0, 212, 255, 0.45);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.06);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1.5px;
    height: 40px;
    margin: 10px auto 0;
    background: linear-gradient(to bottom, transparent, var(--accent-cyan));
    animation: scrollPulse 2s ease-in-out infinite;
}

/* ========== 通用区块 ========== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-alt {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    color: var(--accent-magenta);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 640px;
    margin: 0 auto;
}

/* 滚动入场动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 课程大纲 ========== */
.syllabus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.syllabus-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 26px 24px;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.syllabus-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.syllabus-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-soft);
    border-color: rgba(0, 212, 255, 0.25);
}

.syllabus-card:hover::before {
    opacity: 1;
}

.syllabus-week {
    display: inline-block;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
    font-size: 12.5px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 14px;
}

.syllabus-card h3 {
    font-size: 16.5px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.syllabus-card ul {
    list-style: none;
}

.syllabus-card ul li {
    font-size: 13.5px;
    color: var(--text-secondary);
    padding: 4px 0;
    position: relative;
    padding-left: 18px;
}

.syllabus-card ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-magenta);
    opacity: 0.6;
}

.syllabus-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.info-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    text-align: center;
    transition: all 0.3s ease;
}

.info-item:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: var(--bg-card-hover);
}

.info-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.info-value {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.teacher-contact {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.contact-line {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 28px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.contact-line:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: var(--bg-card-hover);
}

.contact-divider {
    width: 1px;
    height: 16px;
    background: var(--border-color);
}

@media (max-width: 640px) {
    .contact-line {
        flex-direction: column;
        gap: 8px;
    }
    .contact-divider {
        width: 40px;
        height: 1px;
    }
}

/* ========== 视频讲座 ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s ease;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(0, 212, 255, 0.3);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, #141a35 0%, #1e1435 100%);
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.video-card:hover .video-placeholder {
    color: var(--accent-cyan);
    transform: scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-secondary);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 6px;
}

.video-info {
    padding: 18px 20px;
}

.video-chapter {
    display: inline-block;
    font-size: 12px;
    color: var(--accent-gold);
    background: rgba(255, 179, 71, 0.1);
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 8px;
}

.video-info h3 {
    font-size: 16.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.video-info p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.upload-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    margin-top: 16px;
}

/* ========== 图片图库 ========== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: zoom-in;
    border: 1px solid var(--border-color);
    aspect-ratio: 1;
    background: #0d1226;
}

.gallery-canvas {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-canvas {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 9, 18, 0.92) 0%, rgba(6, 9, 18, 0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.gallery-overlay p {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-family: var(--font-serif);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 14, 0.92);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
}

.modal.open {
    display: flex;
    animation: fadeIn 0.25s ease;
}

#modalCanvas {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.modal-caption {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 40px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-magenta);
}

/* ========== 文档资料 ========== */
.materials-list {
    max-width: 860px;
    margin: 0 auto 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.material-item {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    transition: all 0.3s ease;
}

.material-item:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 212, 255, 0.25);
    transform: translateX(4px);
}

.material-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.material-icon.pdf {
    background: rgba(248, 113, 113, 0.12);
    color: var(--accent-red);
}

.material-icon.doc {
    background: rgba(74, 222, 128, 0.12);
    color: var(--accent-green);
}

.material-icon.link {
    background: rgba(0, 212, 255, 0.12);
    color: var(--accent-cyan);
}

.material-info {
    flex: 1;
}

.material-info h3 {
    font-size: 15.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.material-info span {
    font-size: 13px;
    color: var(--text-muted);
}

.material-download {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

.material-download:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: not-allowed;
}

.material-download:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.35);
}

/* ========== 交互模拟器 ========== */
.simulator-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 36px;
    transition: border-color 0.3s ease;
}

.simulator-block:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.sim-header {
    margin-bottom: 24px;
}

.sim-header h3 {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.sim-header p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.8;
}

.sim-body {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.sim-canvas-wrap {
    flex: 1;
    min-width: 300px;
    background: #0a0f24;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.sim-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
}

.sim-dual {
    display: flex;
    gap: 2px;
}

/* Lorenz Map iframe 区块：用全宽展示内嵌全屏模拟器 */
.sim-fullwidth { display: block; width: 100%; }
.lorenz-map-frame {
    display: block;
    width: 100%;
    height: 1100px;
    border: 0;
    border-radius: var(--radius-md);
    background: #0b1a2c;
}
.linear-map-frame {
    display: block;
    width: 100%;
    height: 1100px;
    border: 0;
    border-radius: var(--radius-md);
    background: #0b1a2c;
}
.logistic-map-frame {
    display: block;
    width: 100%;
    height: 1100px;
    border: 0;
    border-radius: var(--radius-md);
    background: #0b1a2c;
}
.billiard-chaos-frame {
    display: block;
    width: 100%;
    height: 1100px;
    border: 0;
    border-radius: var(--radius-md);
    background: #0b1a2c;
}
.sim-fullscreen-link {
    display: inline-block;
    margin-left: 12px;
    font-size: 13px;
    color: var(--accent-cyan);
    text-decoration: none;
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 6px;
    padding: 2px 10px;
    transition: background 0.2s, color 0.2s;
}
.sim-fullscreen-link:hover {
    background: rgba(0, 212, 255, 0.12);
    color: #ffffff;
}

/* ========== 留言问答区 ========== */
.message-board {
    max-width: 860px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    box-shadow: var(--shadow-soft);
}

.waline-wrap {
    min-height: 120px;
}

/* 未配置服务端地址时的"开通中"占位提示 */
.message-notice {
    text-align: center;
    padding: 36px 16px;
}
.message-notice .notice-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}
.message-notice p {
    color: var(--text-primary);
    font-size: 16px;
}
.message-notice .notice-sub {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
}

/* ========== 自研留言区组件 ========== */
.cb-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.cb-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
}
.cb-form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.cb-input {
    flex: 1;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}
.cb-input:focus,
.cb-textarea:focus {
    border-color: var(--accent-cyan);
}
.cb-input::placeholder,
.cb-textarea::placeholder {
    color: var(--text-muted);
}
.cb-textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.cb-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.cb-hint {
    font-size: 12px;
    color: var(--text-muted);
}
.cb-btn {
    background: var(--gradient-primary);
    border: none;
    color: #06121f;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.cb-btn:hover {
    filter: brightness(1.1);
}
.cb-btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.cb-admin-bar {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}
.cb-admin-box {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}
.cb-admin-box .cb-input {
    flex: none;
    width: 180px;
    padding: 6px 10px;
    font-size: 13px;
}
.cb-admin-box .cb-btn {
    padding: 6px 14px;
    font-size: 13px;
}
.cb-status {
    min-height: 20px;
    font-size: 13px;
    color: var(--accent-cyan);
    padding: 6px 2px;
}
.cb-list {
    margin-top: 6px;
}
.cb-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 30px 0;
}
.cb-item {
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.02);
}
.cb-item.cb-item-admin {
    border-left-color: var(--accent-cyan);
}
.cb-item.cb-item-pinned {
    border-left-color: #ffc857;
}
.cb-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cb-nick {
    font-weight: 600;
    color: var(--text-primary);
}
.cb-badge {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.cb-badge-admin {
    color: var(--accent-cyan);
    border-color: rgba(0, 212, 255, 0.4);
}
.cb-badge-pin,
.cb-badge-pending {
    color: #ffc857;
    border-color: rgba(255, 200, 87, 0.4);
}
.cb-badge-deleted {
    color: #ff5d73;
    border-color: rgba(255, 93, 115, 0.4);
}
.cb-time {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}
.cb-content {
    margin-top: 8px;
    color: var(--text-primary);
    line-height: 1.7;
    word-break: break-word;
    white-space: pre-wrap;
}
.cb-item-actions {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.cb-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent-cyan);
    font-size: 13px;
    padding: 2px 0;
}
.cb-link-btn:hover {
    text-decoration: underline;
}
.cb-link-danger {
    color: #ff5d73;
}
.cb-reply-box {
    margin-top: 10px;
}
.cb-reply-textarea {
    min-height: 60px;
}
.cb-reply-bar {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}
.cb-reply-bar .cb-btn {
    padding: 8px 16px;
    font-size: 13px;
}
.cb-children {
    margin-left: 22px;
    border-left: 1px dashed var(--border-color);
    padding-left: 14px;
}
@media (max-width: 640px) {
    .cb-children {
        margin-left: 10px;
        padding-left: 10px;
    }
}

.sim-canvas-half {
    flex: 1;
    position: relative;
    background: #0a0f24;
}

.sim-canvas-half canvas {
    display: block;
    width: 100%;
    height: auto;
}

.sim-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11.5px;
    color: var(--text-muted);
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 12px;
    border-radius: 100px;
}

.sim-controls {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 13.5px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group label span {
    color: var(--accent-cyan);
    font-weight: 600;
    font-family: monospace;
    background: rgba(0, 212, 255, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
    transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
}

.control-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.sim-btn {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
}

.sim-readout {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 13px;
}

.sim-readout > div {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: var(--text-secondary);
}

.sim-readout strong {
    color: var(--text-primary);
    font-family: monospace;
}

/* ========== 页脚 ========== */
footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 48px 0;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 6px;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-beian {
    margin-top: 8px;
    font-size: 12px;
}

.footer-beian a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-beian a:hover {
    color: var(--text-primary);
}

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

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

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(0.6); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* ========== 响应式 ========== */
@media (max-width: 960px) {
    .sim-body {
        flex-direction: column;
    }
    .sim-controls {
        width: 100%;
    }
    .sim-dual {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(6, 9, 18, 0.97);
        backdrop-filter: blur(16px);
        padding: 16px 24px;
        border-bottom: 1px solid var(--border-color);
        gap: 4px;
        transform: translateY(-120%);
        transition: transform 0.35s ease;
        z-index: 999;
    }

    .nav-menu.open {
        transform: translateY(0);
    }

    .nav-menu li a {
        padding: 12px 14px;
        font-size: 15px;
    }

    .section {
        padding: 70px 0;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .material-item {
        flex-wrap: wrap;
    }

    .material-download {
        width: 100%;
    }

    .simulator-block {
        padding: 20px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
