/* 
  河北省优质课专项定制 - 卢瑟福α粒子散射与原子结构探究课件系统
  设计语言：现代深空物理学实验室风格 (Deep Slate, Laser Glow, Glassmorphism)
*/

:root {
    --bg-dark: #080c14;
    --bg-card: rgba(15, 23, 42, 0.85);
    --border-color: rgba(255, 255, 255, 0.12);
    --primary-cyan: #00f2fe;
    --accent-gold: #ffd32a;
    --danger-red: #ff4757;
    --success-green: #2ed573;
    --warning-orange: #ffa502;
    --electron-blue: #3867d6;
    --text-main: #f1f2f6;
    --text-muted: #a4b0be;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-stack: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background-color: #080c14;
    background-color: var(--bg-dark);
    color: #f1f2f6;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
}

button, select, input, label {
    touch-action: manipulation;
}

/* 顶部优质课导航横幅 */
.app-header {
    background: rgba(11, 16, 26, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 16px;
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    flex-shrink: 0;
    z-index: 1002;
}

.header-left {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lesson-badge {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.app-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #00f2fe;
    background: linear-gradient(90deg, #fff, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-tools {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-tools > * + * {
    margin-left: 6px;
}

.tool-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border-color);
    color: #f1f2f6;
    color: var(--text-main);
    font-size: 12px;
    padding: 5px 11px;
    border-radius: 10px;
    cursor: pointer;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tool-btn:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    color: #00f2fe;
}

.tool-btn.btn-active {
    background: #00f2fe;
    color: #000;
    font-weight: 600;
}

/* 教学流程步骤标签栏 */
.steps-nav-bar {
    background: rgba(15, 23, 42, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 16px;
    display: -webkit-flex;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex-shrink: 0;
}

.steps-nav-bar > * + * {
    margin-left: 6px;
}

.step-tab {
    background: transparent;
    border: 1px solid transparent;
    color: #a4b0be;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.step-tab .step-num {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 700;
    margin-right: 4px;
}

.step-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.step-tab.active {
    background: rgba(0, 242, 254, 0.12);
    border-color: #00f2fe;
    color: #00f2fe;
    font-weight: 600;
}

.step-tab.active .step-num {
    background: #00f2fe;
    color: #000;
}

/* 主内容容器 */
.main-container {
    -webkit-flex: 1;
    flex: 1;
    min-height: 0;
    padding: 6px 12px 8px 12px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* 步骤面板切换 */
.step-content-panel {
    display: none;
    -webkit-flex: 1;
    flex: 1;
}

.step-content-panel.active {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-flex: 1;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

/* 核心模拟工作区布局（使用 Flexbox 兼容老版本 iPad Safari） */
.sim-workbench-grid {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    gap: 12px;
    -webkit-flex: 1;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

/* 右侧统计与历史记录栏 */
.right-sidebar-card {
    width: 280px;
    -webkit-flex: 0 0 280px;
    flex: 0 0 280px;
    margin-left: 12px;
    background: rgba(15, 23, 42, 0.85);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 10px 12px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 100%;
    min-height: 0;
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-cyan);
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
    flex-shrink: 0;
}

/* 模型预设按钮列表（贴合手稿） */
.preset-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preset-btn .preset-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
}

.preset-btn .preset-desc {
    font-size: 10.5px;
    color: var(--text-muted);
    line-height: 1.25;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.preset-btn.active {
    background: rgba(0, 242, 254, 0.12);
    border-color: var(--primary-cyan);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.preset-btn.active .preset-header {
    color: var(--primary-cyan);
}

/* 手稿特别标注标签 */
.sketch-tag {
    background: rgba(255, 211, 42, 0.2);
    color: var(--accent-gold);
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 600;
}

/* 中央画布视窗 */
.center-canvas-wrapper {
    background: #0a0e17;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
    flex: 1;
    min-height: 0;
    height: 100%;
}

.canvas-header-info {
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.model-title-badge {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-subtitle-badge {
    font-size: 12px;
    color: var(--accent-gold);
}

/* 画布缩放控制工具组样式 */
.canvas-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 7px;
}

.zoom-prefix {
    font-size: 11px;
    color: var(--text-muted);
    margin-right: 2px;
}

.zoom-btn {
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: var(--primary-cyan);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    line-height: 1.2;
}

.zoom-btn:hover {
    background: var(--primary-cyan);
    color: #000;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.zoom-val-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    min-width: 40px;
    text-align: center;
    font-family: monospace;
}

.zoom-reset-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    padding: 2px 6px;
}

.zoom-reset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: none;
}

.header-right-actions {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
}

.header-right-actions > * + * {
    margin-left: 6px;
}

.canvas-stage-box {
    position: relative;
    -webkit-flex: 1;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 160px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
}

.atom-canvas-element {
    -webkit-flex: 1;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 160px;
    display: block;
    touch-action: none;
}

/* 画布左上角悬浮：自主建模电荷操作台 */
.canvas-top-left-hud {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 35;
    pointer-events: auto;
    width: 204px;
    background: rgba(11, 16, 26, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 8px;
}

.canvas-top-left-hud > * + * {
    margin-top: 8px;
}

.canvas-top-left-hud .builder-buttons-group > * + * {
    margin-top: 6px;
}

/* 原子形态选择器 (空心 vs 实心) - 高兼容性重构 */
.structure-switch-hud {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    width: 100%;
    box-sizing: border-box;
}

.structure-switch-label {
    font-size: 12px;
    font-weight: 700;
    color: #a4b0be;
    color: var(--text-muted, #a4b0be);
    white-space: nowrap;
}

.structure-toggle-buttons {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    background: #080c14;
    background: rgba(0, 0, 0, 0.55);
    padding: 2px 3px;
    border-radius: 8px;
    border: 1px solid #334155;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.struct-toggle-btn {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    box-sizing: border-box;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 4px 9px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 6px;
    cursor: pointer;
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.struct-toggle-btn + .struct-toggle-btn {
    margin-left: 5px;
}

.struct-toggle-btn:hover {
    color: #ffffff;
    background-color: #334155;
}

/* 空心按钮激活态：高对比青色发光 */
.struct-toggle-btn.active,
.struct-toggle-btn#btnToggleHollow.active {
    background-color: #0c2b3d !important;
    background-color: rgba(0, 242, 254, 0.25) !important;
    border-color: #00f2fe !important;
    color: #00f2fe !important;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.45) !important;
}

/* 实心按钮激活态：高对比深天蓝发光 */
.struct-toggle-btn#btnToggleSolid.active {
    background-color: #0369a1 !important;
    background-color: rgba(14, 165, 233, 0.4) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.55) !important;
}

/* 实心模式提示盒子 */
.solid-info-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.solid-info-tip {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    padding: 8px 10px;
}

.solid-tip-header {
    font-size: 12px;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 4px;
}

.solid-tip-text {
    font-size: 11px;
    line-height: 1.45;
    color: #cbd5e1;
    margin: 0;
}

/* 首次进入引导选择弹窗：先让学生选择原子是空心还是实心 */
.structure-choice-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.choice-modal-box {
    background: rgba(15, 23, 42, 0.96);
    border: 1.5px solid rgba(0, 242, 254, 0.35);
    border-radius: 18px;
    padding: 28px 32px;
    max-width: 580px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 36px rgba(0, 242, 254, 0.18);
    text-align: center;
}

.choice-modal-badge {
    display: inline-block;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid var(--primary-cyan);
    color: var(--primary-cyan);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.choice-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.choice-modal-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 22px;
    line-height: 1.5;
}

.choice-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.choice-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 20px 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: inherit;
    font: inherit;
    outline: none;
}

.choice-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.07);
}

.choice-card-hollow:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 10px 28px rgba(0, 242, 254, 0.25);
}

.choice-card-solid:hover {
    border-color: #38bdf8;
    box-shadow: 0 10px 28px rgba(56, 189, 248, 0.35);
}

.card-icon-area {
    font-size: 38px;
    line-height: 1;
    margin-bottom: 2px;
}

.card-name {
    font-size: 16.5px;
    font-weight: 800;
    color: #fff;
}

.card-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
    min-height: 52px;
}

.card-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 4px;
}

.card-tag.tag-blue {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

/* 屏幕中央实验结果浮层提示 */
.center-result-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 25;
    padding: 16px 36px;
    border-radius: 14px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    text-align: center;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: centerOverlayPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.center-result-overlay.overlay-fail {
    background: rgba(20, 10, 16, 0.88);
    border: 2px solid #ff4757;
    color: #ff4757;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 28px rgba(255, 71, 87, 0.45);
    text-shadow: 0 0 14px rgba(255, 71, 87, 0.5);
}

.center-result-overlay.overlay-success {
    background: rgba(8, 28, 20, 0.88);
    border: 2px solid #2ed573;
    color: #2ed573;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 28px rgba(46, 213, 115, 0.45);
    text-shadow: 0 0 14px rgba(46, 213, 115, 0.5);
}

@keyframes centerOverlayPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.82);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 控制工具条（底部横排） */
.canvas-bottom-controls {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.canvas-bottom-controls.canvas-bottom-single {
    justify-content: center;
    padding: 10px 14px;
}

.btn-beam-large {
    font-size: 14.5px !important;
    padding: 8px 28px !important;
    border-radius: 8px !important;
    letter-spacing: 0.5px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.action-btn.btn-primary {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    color: #000;
    font-weight: 600;
    border: none;
}

.action-btn.btn-primary:hover {
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
}

.action-btn.btn-danger {
    background: rgba(255, 71, 87, 0.15);
    border-color: var(--danger-red);
    color: var(--danger-red);
}

.action-btn.btn-active {
    background: var(--accent-gold);
    color: #000;
    font-weight: 600;
    border-color: var(--accent-gold);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.slider-container input[type="range"] {
    accent-color: var(--primary-cyan);
    cursor: pointer;
}

/* 右侧栏：数据统计与智能诊断反馈 */
.stat-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    text-align: center;
}

.stat-item .stat-num {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
}

.stat-item .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-straight .stat-num { color: var(--success-green); }
.stat-deflect .stat-num { color: var(--accent-gold); }
.stat-rebound .stat-num { color: var(--danger-red); }

/* 智能评价与诊断卡片 */
.evaluation-card {
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.eval-title {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.eval-message {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-main);
    white-space: pre-line;
}

.eval-hint {
    font-size: 12px;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 3px solid var(--accent-gold);
    color: #ffd32a;
}

.eval-success {
    background: rgba(46, 213, 115, 0.12);
    border-color: var(--success-green);
}
.eval-success .eval-title { color: var(--success-green); }

.eval-danger {
    background: rgba(255, 71, 87, 0.12);
    border-color: var(--danger-red);
}
.eval-danger .eval-title { color: var(--danger-red); }

.eval-warning {
    background: rgba(255, 165, 2, 0.12);
    border-color: var(--warning-orange);
}
.eval-warning .eval-title { color: var(--warning-orange); }

.eval-info {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--primary-cyan);
}
.eval-info .eval-title { color: var(--primary-cyan); }

/* 自主建模大按钮控制区 */
.builder-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.model-builder-btn {
    border: none;
    border-radius: var(--radius-md);
    padding: 7px 11px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.model-builder-btn.btn-reset-model {
    -webkit-justify-content: center;
    justify-content: center;
}

.model-builder-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

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

.btn-add-pos {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.25), rgba(255, 107, 129, 0.15));
    border: 1px solid #ff4757;
    color: #ff6b81;
}
.btn-add-pos:hover {
    background: #ff4757;
    color: #fff;
    box-shadow: 0 0 14px rgba(255, 71, 87, 0.5);
}
.btn-add-pos:hover .pill-pos {
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.btn-add-neg {
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.25), rgba(0, 242, 254, 0.15));
    border: 1px solid #2ed573;
    color: #2ed573;
}
.btn-add-neg:hover {
    background: #2ed573;
    color: #000;
    box-shadow: 0 0 14px rgba(46, 213, 115, 0.5);
}
.btn-add-neg:hover .pill-neg {
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    border-color: rgba(0, 0, 0, 0.35);
}

.btn-reset-model {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}
.btn-reset-model:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.count-pill {
    font-size: 11.5px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 5px;
    line-height: 1.35;
}
.pill-pos {
    background: rgba(255, 71, 87, 0.22);
    color: #ff8a9b;
    border: 1px solid rgba(255, 71, 87, 0.45);
}
.pill-neg {
    background: rgba(46, 213, 115, 0.22);
    color: #55efc4;
    border: 1px solid rgba(46, 213, 115, 0.45);
}

.badge-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}
.tag-muted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}
.tag-success {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.4);
}
.tag-danger {
    background: rgba(255, 71, 87, 0.2);
    color: #ff6b81;
    border: 1px solid rgba(255, 71, 87, 0.4);
}
.tag-warning {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
    border: 1px solid rgba(255, 165, 2, 0.4);
}

/* 侧边栏Tab切换 */
.sidebar-tab-header {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 2px;
    gap: 3px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.sidebar-tab-btn.active {
    background: var(--primary-cyan);
    color: #000;
}

/* 极简现象统计进度条 */
.simple-stat-bars {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 7px;
    flex-shrink: 0;
}

.simple-stat-bars > * + * {
    margin-top: 6px;
}

.simple-stat-row {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 3px;
}

.simple-stat-head {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    font-size: 12px;
}

.dot-label {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
    font-weight: 600;
}

.dot-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot-green { background: #2ed573; }
.dot-yellow { background: #ffd32a; }
.dot-red { background: #ff4757; }

.simple-stat-val strong {
    font-size: 13px;
    color: #fff;
}
.simple-stat-val small {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 2px;
}

.simple-bar-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.simple-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.25s ease;
}
.fill-green { background: #2ed573; }
.fill-yellow { background: #ffd32a; }
.fill-red { background: #ff4757; }

/* 显微镜方位快捷按钮组 */
.angle-preset-group {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px 4px;
    gap: 4px;
}

.angle-preset-group .ctrl-label {
    font-size: 12px;
    color: var(--text-muted);
    padding: 0 4px;
}

.angle-preset-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.angle-preset-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.angle-preset-btn.active {
    background: rgba(0, 242, 254, 0.18);
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
}

/* 历史模型列表箱 */
.history-list-box {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 380px;
}

.history-list-box > * + * {
    margin-top: 6px;
}

.history-empty-tip {
    font-size: 11.5px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 10px;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    line-height: 1.5;
}

.history-model-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 8px;
    transition: all 0.2s ease;
}

.history-model-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.hist-card-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
}

.hist-mini-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.hist-card-main {
    -webkit-flex: 1;
    flex: 1;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.history-card-header {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
}

.history-card-header strong {
    font-size: 12px;
    color: #fff;
}

.history-card-actions {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
    gap: 6px;
}

/* ==========================================
   步骤二：视频播放器与真实实验重现样式
   ========================================== */
.video-layout-grid {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-flex: 1;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.video-player-container {
    background: #080c14;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    -webkit-flex: 1;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.video-canvas-view {
    -webkit-flex: 1;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 160px;
    display: block;
    touch-action: none;
}

.native-video-tag {
    -webkit-flex: 1;
    flex: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-control-bar {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid var(--border-color);
    padding: 6px 14px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.video-buttons-row {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
}

.video-ctrl-group {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
}

.video-ctrl-group > * + * {
    margin-left: 6px;
}

.history-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 100%;
    min-height: 0;
}

.rutherford-quote {
    background: rgba(255, 211, 42, 0.08);
    border-left: 3px solid var(--accent-gold);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: #ffeaa7;
    font-style: italic;
}

.conflict-box {
    background: rgba(255, 71, 87, 0.1);
    border: 1px dashed var(--danger-red);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
}

.conflict-box h4 {
    color: var(--danger-red);
    margin-bottom: 4px;
    font-size: 12.5px;
}

/* ==========================================
   步骤四：宏微结合全景样式
   ========================================== */
.macro-workbench-grid {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 12px;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.macro-canvas-wrapper {
    background: #080c14;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.macro-canvas-element {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 160px;
    display: block;
}

.macro-phenomenon-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition-fast);
}

.macro-phenomenon-card.phenom-straight {
    border-left: 3px solid #2ed573;
}

.macro-phenomenon-card.phenom-deflect {
    border-left: 3px solid #ffd32a;
}

.macro-phenomenon-card.phenom-rebound {
    border-left: 3px solid #ff4757;
}

.phenom-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
}

.phenom-badge {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.badge-straight {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
}

.badge-deflect {
    background: rgba(255, 211, 42, 0.15);
    color: #ffd32a;
}

.badge-rebound {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.phenom-count {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

.phenom-inference {
    font-size: 11.5px;
    color: #e2e8f0;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px 6px;
    border-radius: 4px;
}

/* ==========================================
   步骤五：科学总结对比表样式
   ========================================== */
.summary-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.comparison-table th, 
.comparison-table td {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary-cyan);
    font-weight: 600;
}

.comparison-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.scale-metaphor-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
}

.metaphor-item h4 {
    color: var(--primary-cyan);
    margin-bottom: 6px;
    font-size: 15px;
}

.metaphor-item p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* 课堂画笔白板浮层 */
#whiteboardCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
}

#whiteboardCanvas.active-pen {
    cursor: crosshair;
}

.whiteboard-controls-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: 30px;
    padding: 8px 20px;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 242, 254, 0.15);
    z-index: 1003;
}

.pen-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease;
}

.pen-color-dot:hover {
    transform: scale(1.15);
}

.pen-color-dot.active {
    border-color: #fff;
    transform: scale(1.25);
    box-shadow: 0 0 8px currentColor;
}

.pen-width-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pen-width-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.pen-width-btn.active {
    background: var(--primary-cyan);
    color: #000;
    font-weight: 700;
    border-color: var(--primary-cyan);
}

/* 庆祝彩色碎片动画 */
.confetti-piece {
    position: fixed;
    top: -10px;
    width: 10px;
    height: 10px;
    z-index: 9999;
    pointer-events: none;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* 响应式适配：小屏幕笔记本、老款 iPad (1024x768 / 768x1024) 与移动端 */
@media (max-width: 1150px), (max-height: 780px) {
    .app-header {
        padding: 4px 12px;
    }
    .app-title {
        font-size: 14.5px;
    }
    .steps-nav-bar {
        padding: 3px 12px;
    }
    .step-tab {
        padding: 4px 10px;
        font-size: 12px;
    }
    .main-container {
        padding: 4px 8px 6px 8px;
    }
    .right-sidebar-card {
        width: 240px;
        -webkit-flex: 0 0 240px;
        flex: 0 0 240px;
        margin-left: 8px;
        padding: 8px 10px;
    }
    .stat-item {
        padding: 6px 6px;
    }
    .stat-item .stat-num {
        font-size: 16px;
    }
    .canvas-top-left-hud {
        top: 8px;
        left: 8px;
        width: 170px;
        padding: 8px;
    }
    .model-builder-btn {
        padding: 6px 8px;
        font-size: 11.5px;
    }
    .center-result-overlay {
        font-size: 22px;
        padding: 12px 24px;
    }
    .video-control-bar {
        padding: 4px 10px;
    }
    .canvas-bottom-controls.canvas-bottom-single {
        padding: 6px 12px;
    }
    .btn-beam-large {
        font-size: 13.5px !important;
        padding: 6px 22px !important;
    }
}

/* 竖屏 iPad / 窄屏设备适配 */
@media (max-width: 820px) {
    .lesson-badge {
        display: none;
    }
    .sim-workbench-grid {
        -webkit-flex-direction: column;
        flex-direction: column;
        overflow-y: auto;
    }
    .center-canvas-wrapper {
        min-height: 360px;
        -webkit-flex: 1 1 auto;
        flex: 1 1 auto;
    }
    .right-sidebar-card {
        width: 100%;
        -webkit-flex: 0 0 auto;
        flex: 0 0 auto;
        margin-left: 0;
        margin-top: 8px;
        max-height: 220px;
    }
    .stat-card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
