        /* 全局样式 */
        :root {
            --primary-color: #00ffea;
            --secondary-color: #00b4ff;
            --accent-color: #00ff9d;
            --dark-bg: #0a0a12;
            --panel-bg: rgba(10, 15, 30, 0.95);
            --panel-border: rgba(0, 255, 234, 0.3);
            --text-color: #e0f0ff;
            --text-secondary: #b0d0ff;
            --neon-glow: 0 0 15px rgba(0, 255, 234, 0.7);
            --neon-glow-secondary: 0 0 15px rgba(0, 180, 255, 0.5);
        }
        
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: 'Rajdhani', 'Microsoft YaHei', sans-serif;
            background-color: var(--dark-bg);
            color: var(--text-color);
            overflow: hidden;
            font-weight: 500;
            min-height: 100vh;
            position: relative;
        }

        /* 主容器 */
        .main-container {
            display: grid;
            grid-template-columns: 250px 1fr 250px;
            width: 100%;
            height: 100vh;
            position: relative;
            overflow: hidden;
            background-color: var(--dark-bg);
        }

        /* 侧边栏 */
        .sidebar {
            grid-column: 1;
            background: linear-gradient(160deg, rgba(10, 15, 30, 0.95) 0%, rgba(5, 10, 20, 0.95) 100%);
            border-right: 1px solid var(--panel-border);
            padding: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            backdrop-filter: blur(12px);
            box-shadow: 0 0 40px rgba(0, 100, 255, 0.25);
            z-index: 10;
            position: relative;
            overflow-y: auto;
            overflow-x: hidden;
            max-height: 100vh;
            scrollbar-width: thin;
            scrollbar-color: var(--secondary-color) transparent;
        }
        
        .sidebar::-webkit-scrollbar {
            width: 6px;
        }
        
        .sidebar::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .sidebar::-webkit-scrollbar-thumb {
            background-color: var(--secondary-color);
            border-radius: 10px;
        }
        
        .sidebar::-webkit-scrollbar {
            width: 6px;
        }
        
        .sidebar::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .sidebar::-webkit-scrollbar-thumb {
            background-color: var(--secondary-color);
            border-radius: 10px;
        }

        .sidebar::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                135deg,
                rgba(0, 255, 234, 0.05) 0%,
                rgba(0, 255, 234, 0) 20%,
                rgba(0, 255, 234, 0) 80%,
                rgba(0, 255, 234, 0.05) 100%
            );
            pointer-events: none;
            z-index: -1;
        }

        /* 标题样式 */
        .sidebar-title {
            text-align: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(0, 212, 255, 0.3);
            position: relative;
        }

        .sidebar-title h1 {
            font-family: 'Orbitron', sans-serif;
            font-size: 2.2em;
            margin: 0;
            background: linear-gradient(90deg, #00ffea, #00b4ff, #00ffea);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 0 20px rgba(0, 200, 255, 0.5);
            letter-spacing: 2px;
            font-weight: 700;
            position: relative;
            animation: textGlow 3s ease-in-out infinite alternate;
        }

        @keyframes textGlow {
            0% { text-shadow: 0 0 10px rgba(0, 200, 255, 0.5); }
            100% { text-shadow: 0 0 25px rgba(0, 240, 255, 0.8); }
        }

        .sidebar-title::after {
            content: "";
            position: absolute;
            bottom: -1px;
            left: 25%;
            width: 50%;
            height: 2px;
            background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
            animation: linePulse 3s ease-in-out infinite;
        }

        @keyframes linePulse {
            0% { opacity: 0.5; }
            50% { opacity: 1; }
            100% { opacity: 0.5; }
        }

        /* 控制面板 */
        .control-panel {
            margin-top: 15px;
            margin-bottom: 5px;
            background: linear-gradient(145deg, rgba(20, 30, 50, 0.3) 0%, rgba(10, 20, 40, 0.4) 100%);
            border-radius: 12px;
            padding: 18px;
            border: 1px solid rgba(0, 180, 255, 0.15);
            box-shadow: 0 5px 15px rgba(0, 60, 120, 0.2),
                        inset 0 0 10px rgba(0, 150, 255, 0.1);
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
            min-height: 200px; /* 增加最小高度，可根据实际情况调整 */
        }

        .control-panel:hover {
            box-shadow: 0 5px 20px rgba(0, 100, 255, 0.4),
                        inset 0 0 15px rgba(0, 200, 255, 0.2);
            border-color: rgba(0, 212, 255, 0.3);
        }

        .control-panel::before {
            content: "";
            position: absolute;
            top: 5;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                135deg,
                rgba(0, 255, 234, 0.05) 0%,
                rgba(0, 255, 234, 0) 50%,
                rgba(0, 255, 234, 0.05) 100%
            );
            pointer-events: none;
            z-index: -1;
        }

        .simulation-title {
            font-family: 'Orbitron', sans-serif;
            font-size: 2em;
            color: var(--primary-color);
            text-shadow: var(--neon-glow);
            margin-bottom: 20px;
        }

        .control-panel h3 {
            color: var(--primary-color);
            font-family: 'Orbitron', sans-serif;
            font-size: 1.1em;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            letter-spacing: 1px;
            text-shadow: var(--neon-glow);
            position: relative;
        }

        .control-panel h3::before {
            content: "";
            display: inline-block;
            width: 8px;
            height: 8px;
            background: var(--primary-color);
            border-radius: 50%;
            margin-right: 12px;
            box-shadow: 0 0 8px var(--primary-color);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.2); opacity: 0.7; }
            100% { transform: scale(1); opacity: 1; }
        }

        .control-group {
            margin-bottom: 20px;
            position: relative;
        }

        label {
            display: block;
            margin-bottom: 10px;
            color: var(--text-secondary);
            font-size: 1em;
            letter-spacing: 0.5px;
            text-shadow: 0 0 5px rgba(0, 180, 255, 0.3);
        }

        .home-btn {
            display: flex;
            align-items: center;
            padding: 10px 15px;
            background: linear-gradient(90deg, rgba(0, 60, 120, 0.4), rgba(0, 30, 60, 0.6));
            color: var(--text-color);
            text-decoration: none;
            border-radius: 5px;
            font-size: 0.9em;
            transition: all 0.3s;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            margin-bottom: 5px;
            border: 1px solid rgba(0, 180, 255, 0.2);
            position: relative;
            overflow: hidden;
        }
        
        .home-btn::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                to bottom right,
                rgba(0, 255, 234, 0) 0%,
                rgba(0, 255, 234, 0.1) 50%,
                rgba(0, 255, 234, 0) 100%
            );
            transform: rotate(30deg);
            transition: all 0.5s;
            z-index: -1;
        }
        
        .home-btn:hover {
            background: linear-gradient(90deg, rgba(0, 80, 150, 0.5), rgba(0, 40, 80, 0.7));
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0, 100, 255, 0.3);
            border-color: rgba(0, 255, 234, 0.4);
        }
        
        .home-btn:hover::before {
            left: 100%;
        }
        
        .symbol {
            display: inline-block;
            margin-right: 8px;
            color: var(--primary-color);
            font-weight: bold;
            text-shadow: 0 0 5px var(--primary-color);
        }

                /* 图例容器样式 */
        .legend-container {
            margin-top: 5px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-right: 5px;
            padding-bottom: 10px;
        }
        
        /* 删除了内侧滚动条相关样式 */

        /* 图例项样式 */
        .legend-item {
            margin-bottom: 8px;
            background: rgba(0, 30, 60, 0.3);
            border-radius: 8px;
            padding: 8px;
            border: 1px solid rgba(0, 180, 255, 0.1);
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        /* 颜色条样式 */
        .color-bar {
            width: 80px;
            height: 20px;
            border-radius: 4px;
            position: relative;
            flex-shrink: 0;
        }
        
        /* 速度场渐变 */
        .velocity-gradient {
            background: linear-gradient(90deg, 
                hsl(0, 100%, 50%) 0%, 
                hsl(90, 100%, 50%) 25%,
                hsl(180, 100%, 50%) 50%,
                hsl(270, 100%, 50%) 75%,
                hsl(360, 100%, 50%) 100%);
            box-shadow: 0 0 8px rgba(0, 255, 234, 0.3);
        }
        
        /* 压力场渐变 */
        .pressure-gradient {
            background: linear-gradient(90deg, 
                #00f 0%, 
                #00ffff 50%, 
                #ff0000 100%);
            box-shadow: 0 0 8px rgba(255, 0, 0, 0.3);
        }
        
        /* 渐变标签 */
        .gradient-label {
            position: absolute;
            font-size: 0.8em;
            bottom: -20px;
            color: var(--text-secondary);
        }
        .gradient-label.left { left: 0; }
        .gradient-label.right { right: 0; }
        
        /* 流线示例 */
        .streamline-sample {
            width: 80px;
            height: 20px;
            position: relative;
            overflow: hidden;
            flex-shrink: 0;
        }
        .flow-arrow {
            position: absolute;
            width: 100%;
            height: 2px;
            background: #0f0;
            box-shadow: 0 0 8px #0f0;
            animation: flowAnim 2s infinite linear;
        }
        .flow-arrow::after {
            content: "";
            position: absolute;
            right: 0;
            top: -3px;
            border: 4px solid transparent;
            border-left-color: #0f0;
        }
        
        @keyframes flowAnim {
            from { transform: translateX(-100%); }
            to { transform: translateX(100%); }
        }
        
        /* 图例文字 */
        .legend-text {
            display: flex;
            flex-direction: column;
            gap: 4px;
            font-size: 0.9em;
        }
        .legend-text span:not(.highlight) {
            color: var(--text-secondary);
            font-size: 0.85em;
        }

        .radio-option {
            display: flex;
            align-items: center;
            cursor: pointer;
            padding: 12px 15px;
            background: rgba(20, 40, 70, 0.5);
            border-radius: 8px;
            border: 1px solid rgba(0, 180, 255, 0.3);
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }

        .radio-option:hover {
            background: rgba(0, 180, 255, 0.1);
            border-color: rgba(0, 212, 255, 0.5);
            box-shadow: 0 0 15px rgba(0, 180, 255, 0.2);
        }

        .radio-option input {
            margin-right: 12px;
            appearance: none;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(0, 180, 255, 0.5);
            border-radius: 50%;
            transition: all 0.2s;
            position: relative;
        }

        .radio-option input:checked {
            border-color: var(--primary-color);
            box-shadow: 0 0 10px rgba(0, 200, 255, 0.8);
        }

        .radio-option input:checked::after {
            content: "";
            position: absolute;
            top: 2px;
            left: 2px;
            width: 8px;
            height: 8px;
            background: var(--primary-color);
            border-radius: 50%;
            box-shadow: 0 0 5px var(--primary-color);
        }

        /* 教学说明 */
        .instruction-content {
            color: #c0e0ff;
            font-size: 0.95em;
            line-height: 1.6;
            margin-top: 15px;
        }

        .instruction-content p {
            margin-bottom: 15px;
            position: relative;
            padding-left: 15px;
            animation: fadeIn 0.5s ease-out;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateX(10px); }
            to { opacity: 1; transform: translateX(0); }
        }

        .instruction-content p::before {
            content: "➤";
            position: absolute;
            left: 0;
            color: var(--primary-color);
            font-size: 0.8em;
            top: 2px;
            animation: pulse 2s infinite;
        }

        .highlight {
            color: var(--primary-color);
            font-weight: 600;
            text-shadow: var(--neon-glow);
            position: relative;
        }

        .highlight::after {
            content: "";
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 1px;
            background: linear-gradient(90deg, var(--primary-color), transparent);
        }

        .value-display {
            display: inline-block;
            width: 50px;
            text-align: right;
            color: var(--primary-color);
            font-family: 'Orbitron', monospace;
            font-weight: 500;
            text-shadow: var(--neon-glow);
            letter-spacing: 1px;
            background: rgba(0, 180, 255, 0.1);
            padding: 2px 8px;
            border-radius: 4px;
            border: 1px solid rgba(0, 180, 255, 0.3);
        }

        /* 背景效果 */
        .cyber-grid {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: 
                linear-gradient(rgba(0, 255, 234, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 255, 234, 0.03) 1px, transparent 1px);
            background-size: 40px 40px;
            animation: gridScroll 40s linear infinite;
            z-index: -2;
        }

        @keyframes gridScroll {
            0% { background-position: 0 0; }
            100% { background-position: 800px 800px; }
        }

        .data-stream {
            position: fixed;
            width: 100%;
            height: 100%;
            background: repeating-linear-gradient(
                0deg,
                transparent 0px,
                transparent 20px,
                rgba(0, 255, 234, 0.05) 20px,
                rgba(0, 255, 234, 0.05) 22px
            );
            animation: streamFlow 20s linear infinite;
            z-index: -1;
        }

        @keyframes streamFlow {
            0% { background-position: 0 0; }
            100% { background-position: 0 100%; }
        }

        .sidebar-title {
            /* 原有样式保持不变 */
            padding: 15px 0; /* 根据图片高度调整 */
        }

        .title-image {
            display: block;
            margin: 0 auto;
            max-width: 100%;
            object-fit: contain;
            filter: drop-shadow(0 0 15px rgba(0, 255, 234, 0.5)); /* 添加霓虹光效 */
        }

        /* 移动端适配 */
        @media (max-width: 768px) {
            .title-image {
                width: 180px;
            }
        }

        .corner-decoration {
            position: fixed;
            width: 100px;
            height: 100px;
            border: 2px solid rgba(0, 255, 234, 0.3);
            box-shadow: 0 0 20px rgba(0, 200, 255, 0.3);
            animation: cornerGlow 4s ease-in-out infinite alternate;
            z-index: -1;
        }

        @keyframes cornerGlow {
            0% { box-shadow: 0 0 10px rgba(0, 200, 255, 0.3); }
            100% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.6); }
        }

        .corner-tl {
            top: 20px;
            left: 20px;
            border-right: none;
            border-bottom: none;
            border-radius: 10px 0 0 0;
        }

        .corner-tr {
            top: 20px;
            right: 20px;
            border-left: none;
            border-bottom: none;
            border-radius: 0 10px 0 0;
        }

        .corner-bl {
            bottom: 20px;
            left: 20px;
            border-right: none;
            border-top: none;
            border-radius: 0 0 0 10px;
        }

        .corner-br {
            bottom: 20px;
            right: 20px;
            border-left: none;
            border-top: none;
            border-radius: 0 0 10px 0;
        }

        /* 数字扫描线效果 */
        .scanlines {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                to bottom,
                rgba(0, 255, 234, 0.03) 0%,
                rgba(0, 255, 234, 0) 1%,
                rgba(0, 255, 234, 0) 99%,
                rgba(0, 255, 234, 0.03) 100%
            );
            background-size: 100% 2px;
            z-index: 1;
            pointer-events: none;
            animation: scanline 8s linear infinite;
        }

        @keyframes scanline {
            0% { background-position: 0 0; }
            100% { background-position: 0 100%; }
        }

        /* 响应式调整 */
        @media (max-width: 1600px) {
            .canvas-container {
                width: 600px;
                height: 600px;
            }
        }

        @media (max-width: 1400px) {
            .sidebar, .right-panel {
                width: 280px;
                padding: 20px;
            }
            
            .canvas-container {
                width: 500px;
                height: 500px;
            }
        }

        @media (max-width: 1200px) {
            .sidebar, .right-panel {
                width: 250px;
                padding: 15px;
            }
            
            .canvas-container {
                width: 400px;
                height: 400px;
            }
        }
                /* 修改悬浮按钮样式为图片 */
        .ai-assistant-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 70px;  /* 根据图片大小调整 */
            height: 70px; /* 根据图片大小调整 */
            cursor: pointer;
            z-index: 1000;
            transition: all 0.3s;
            background: none; /* 移除渐变背景 */
            border: none;     /* 移除边框 */
            box-shadow: 0 4px 20px rgba(0, 179, 255, 0.3);
            border-radius: 50%; /* 圆形图片 */
            overflow: hidden;   /* 确保图片不超出圆形边界 */
            padding: 0;         /* 移除内边距 */
        }

        .ai-btn-image {
            width: 100%;
            height: 100%;
            object-fit: cover;  /* 确保图片填充整个容器 */
            transition: transform 0.3s;
        }

        .ai-assistant-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 25px rgba(0, 179, 255, 0.4);
        }

        .ai-assistant-btn:hover .ai-btn-image {
            transform: scale(1.05);
        }

        /* AI对话框样式 - 科技风 */
        .ai-dialog {
            position: fixed;
            bottom: 100px;
            right: 30px;
            width: 380px;
            max-height: 500px;
            background: rgba(10, 25, 47, 0.95);
            backdrop-filter: blur(12px);
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            z-index: 1000;
            display: none;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid rgba(0, 255, 204, 0.1);
        }

        .ai-dialog.show {
            display: flex;
            animation: fadeInUp 0.3s ease-out;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .ai-dialog-header {
            background: linear-gradient(to right, rgba(0, 255, 204, 0.1), rgba(0, 179, 255, 0.1));
            color: white;
            padding: 15px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(136, 146, 176, 0.1);
        }

        .ai-dialog-title {
            font-weight: bold;
            font-size: 16px;
            color: #00ffcc;
        }

        .ai-dialog-close {
            background: none;
            border: none;
            color: #8892b0;
            font-size: 20px;
            cursor: pointer;
            transition: color 0.3s;
        }

        .ai-dialog-close:hover {
            color: #00ffcc;
        }

        .ai-dialog-body {
            flex: 1;
            padding: 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        /* 自定义滚动条 */
        .ai-dialog-body::-webkit-scrollbar {
            width: 6px;
        }

        .ai-dialog-body::-webkit-scrollbar-track {
            background: rgba(10, 25, 47, 0.5);
        }

        .ai-dialog-body::-webkit-scrollbar-thumb {
            background: rgba(0, 255, 204, 0.3);
            border-radius: 3px;
        }

        .ai-message {
            max-width: 85%;
            padding: 12px 16px;
            border-radius: 15px;
            font-size: 14px;
            line-height: 1.5;
            animation: messageAppear 0.3s ease-out;
        }

        @keyframes messageAppear {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .ai-message.user {
            align-self: flex-end;
            background: linear-gradient(to right, #00b3ff, #0062ff);
            color: white;
            border-bottom-right-radius: 5px;
        }

        .ai-message.bot {
            align-self: flex-start;
            background-color: #112240;
            color: white;
            border-bottom-left-radius: 5px;
            position: relative;
        }

        .ai-message.bot::before {
            content: '';
            position: absolute;
            left: -8px;
            top: 12px;
            width: 0;
            height: 0;
            border-top: 8px solid transparent;
            border-right: 8px solid #112240;
            border-bottom: 8px solid transparent;
        }

        .ai-message.user::after {
            content: '';
            position: absolute;
            right: -8px;
            top: 12px;
            width: 0;
            height: 0;
            border-top: 8px solid transparent;
            border-left: 8px solid #00b3ff;
            border-bottom: 8px solid transparent;
        }

        .ai-dialog-input {
            display: flex;
            padding: 12px;
            border-top: 1px solid rgba(136, 146, 176, 0.1);
            background-color: rgba(17, 34, 64, 0.5);
        }

        .ai-dialog-input input {
            flex: 1;
            padding: 10px 15px;
            background-color: #112240;
            border: 1px solid rgba(136, 146, 176, 0.3);
            border-radius: 20px;
            outline: none;
            font-size: 14px;
            color: white;
        }

        .ai-dialog-input input:focus {
            border-color: #00ffcc;
            box-shadow: 0 0 0 2px rgba(0, 255, 204, 0.2);
        }

        .ai-dialog-input button {
            margin-left: 10px;
            padding: 10px 20px;
            background: linear-gradient(to right, #00ffcc, #00b3ff);
            color: #0a192f;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            transition: opacity 0.3s;
        }

        .ai-dialog-input button:hover {
            opacity: 0.9;
        }

        .ai-dialog-input button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        /* 打字指示器 */
        .typing-indicator {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #00ffcc;
            margin-right: 4px;
            animation: typingAnimation 1.4s infinite ease-in-out;
        }

        @keyframes typingAnimation {
            0%, 60%, 100% { transform: translateY(0); }
            30% { transform: translateY(-5px); }
        }

        .typing-container {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            background-color: #112240;
            border-radius: 15px;
            color: #8892b0;
            font-size: 14px;
            max-width: 85%;
            align-self: flex-start;
            position: relative;
        }

        .typing-container::before {
            content: '';
            position: absolute;
            left: -8px;
            top: 12px;
            width: 0;
            height: 0;
            border-top: 8px solid transparent;
            border-right: 8px solid #112240;
            border-bottom: 8px solid transparent;
        }

        #fluidCanvas {
        position: relative !important;
        width: 100%;
        height: 100%;
        z-index: auto;
        display: block;
        background: #000;
        }
        
        .simulation-area {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px;
        position: relative;
        overflow: visible;
        min-height: 600px;
        margin: 0 auto;
        width: 100%;
        }
        
        /* 媒体查询，确保响应式布局 */
        @media (max-width: 1200px) {
            .main-container {
                grid-template-columns: 220px 1fr 220px;
            }
        }
        
        @media (max-width: 900px) {
            .main-container {
                grid-template-columns: 200px 1fr 200px;
            }
            
            .control-panel {
                padding: 12px;
            }
        }
        
        /* 美化控制面板 */
        .control-panel {
            margin: 0 0 5px 0;
            padding: 10px;
            background: rgba(10, 30, 60, 0.4);
            border-radius: 10px;
            border: 1px solid rgba(0, 180, 255, 0.2);
            max-height: 200px;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: var(--secondary-color) transparent;
        }
        
        .control-panel::-webkit-scrollbar {
            width: 5px;
        }
        
        .control-panel::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .control-panel::-webkit-scrollbar-thumb {
            background-color: var(--secondary-color);
            border-radius: 10px;
        }
        
        .button-group {
            margin-bottom: 10px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        /* 标题图片容器 */
        .sidebar-title {
            text-align: center;
            margin-bottom: 15px;
        }
        
        .title-image {
            max-width: 100%;
            height: auto;
            filter: drop-shadow(0 0 10px rgba(0, 255, 234, 0.7));
            transition: all 0.3s ease;
        }
        
        .title-image:hover {
            filter: drop-shadow(0 0 15px rgba(0, 255, 234, 1.0));
            transform: scale(1.02);
        }
        
        .canvas-container {
        width: 100%;
        max-width: 512px;
        aspect-ratio: 1/1;
        margin: 20px auto;
        background: #000;
        border: 5px solid rgba(0, 255, 234, 0.8);
        box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
        overflow: visible;
        position: relative;
        z-index: 100;
        display: block;
        }

        /* 新增样式修复 */
        select {
            width: 100%;
            padding: 8px 12px;
            background: rgba(20, 40, 70, 0.5);
            border: 1px solid rgba(0, 180, 255, 0.4);
            border-radius: 5px;
            color: var(--text-color);
            font-family: 'Rajdhani', sans-serif;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ffea'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 16px;
            transition: all 0.3s;
        }
        
        select:hover, select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 15px rgba(0, 200, 255, 0.3);
            outline: none;
        }
        
        input[type="range"] {
            width: 100%;
            height: 8px;
            appearance: none;
            -webkit-appearance: none;
            background: linear-gradient(to right, #0a1a2a, #112240);
            border-radius: 4px;
            border: 1px solid rgba(0, 180, 255, 0.3);
            box-shadow: inset 0 0 8px rgba(0, 60, 120, 0.5);
            margin: 10px 0;
            outline: none;
            transition: all 0.3s;
        }
        
        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            background: var(--primary-color);
            border-radius: 50%;
            border: 2px solid #0a0e17;
            box-shadow: 0 0 10px rgba(0, 200, 255, 0.8);
            cursor: pointer;
            transition: all 0.2s;
        }
        
        input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.15);
            box-shadow: 0 0 15px rgba(0, 240, 255, 1);
        }

/* 文件上传控件样式 */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.file-upload-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-button {
    background: linear-gradient(135deg, rgba(0, 180, 255, 0.2), rgba(0, 120, 255, 0.2));
    border: 1px solid rgba(0, 180, 255, 0.3);
    border-radius: 6px;
    color: var(--text-color);
    padding: 6px 12px;
    font-size: 0.9em;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.file-upload-button:hover {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.3), rgba(0, 140, 255, 0.3));
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 180, 255, 0.3);
}

.upload-icon {
    font-size: 1.1em;
    color: var(--primary-color);
}

.file-name {
    font-size: 0.85em;
    color: var(--text-secondary);
    padding: 4px 8px;
    background: rgba(0, 50, 100, 0.2);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.reset-button {
    margin-top: 5px;
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.2), rgba(200, 50, 50, 0.2));
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 6px;
    color: var(--text-color);
    padding: 6px 12px;
    font-size: 0.9em;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reset-button:hover {
    background: linear-gradient(135deg, rgba(255, 120, 120, 0.3), rgba(220, 70, 70, 0.3));
    border-color: rgba(255, 150, 150, 0.5);
    box-shadow: 0 0 10px rgba(255, 100, 100, 0.3);
}

.reset-icon {
    font-size: 1.1em;
    color: #ff9d9d;
}

/* 1. 减小控制面板间的间距并修改最小高度 */
.control-panel {
    margin-top: 12px;
    margin-bottom: 12px;
    min-height: 150px; /* 调整最小高度 */
    padding: 15px; /* 减小内边距 */
}

/* 调整控制组间距更紧凑 */
.control-group {
    margin-bottom: 12px; /* 减小间距 */
}

/* 2. 增加图例容器尺寸 */
.legend-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    min-height: 240px; /* 增加最小高度 */
}

/* 3. 增大中间画布尺寸 */
.simulation-area {
    padding: 10px;
}

/* 添加画布容器样式 */
.canvas-container {
    width: 100%;
    height: 85vh; /* 更大的视口高度 */
    max-width: 85vh; /* 保持方形 */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#fluidCanvas {
    width: 100%;
    height: 100%;
    max-width: 640px; /* 更大的最大宽度 */
    max-height: 640px; /* 更大的最大高度 */
    border-radius: 6px;
    border: 1px solid var(--panel-border);
    box-shadow: 0 0 30px rgba(0, 180, 255, 0.4);
}

/* 4. 右侧面板调整 */
.panel-section {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    min-height: 220px; /* 增加最小高度 */
}

.instruction-content {
    line-height: 1.8; /* 增加行距 */
    flex-grow: 1;
    font-size: 1em;
    padding: 8px 0;
}

/* 调整 AI 输入区域布局 */
.ai-dialog-input {
    display: flex;
    align-items: center; /* 垂直居中 */
    padding: 10px 12px; /* 调整内边距 */
    border-top: 1px solid rgba(136, 146, 176, 0.1);
    background-color: rgba(17, 34, 64, 0.5);
    gap: 8px; /* 元素之间的间隙 */
  }
    
    /* 调整录音按钮大小和样式 */
  #recordBtn {
    background: none;
    border: 1px solid rgba(136, 146, 176, 0.3);
    color: #8892b0;
    font-size: 18px; /* 调整图标大小 */
    cursor: pointer;
    padding: 0; /* 移除内边距 */
    border-radius: 50%;
    transition: all 0.3s;
    width: 38px;  /* 调整宽度 */
    height: 38px; /* 调整高度 */
    flex-shrink: 0; /* 防止按钮被压缩 */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #recordBtn:hover {
    background-color: #112240;
    color: #00ffcc;
    border-color: #00ffcc;
  }
  #recordBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
    
  /* 调整输入框 */
  .ai-dialog-input input {
    flex: 1; /* 占据剩余空间 */
    padding: 10px 15px;
    background-color: #112240;
    border: 1px solid rgba(136, 146, 176, 0.3);
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    color: white;
  }
  .ai-dialog-input input:focus {
    border-color: #00ffcc;
    box-shadow: 0 0 0 2px rgba(0, 255, 204, 0.2);
  }
    
  /* 调整发送按钮 */
  .ai-dialog-input button#aiSendBtn { /* 使用更精确的选择器 */
    margin-left: 0; /* 移除左边距，使用 gap 控制间距 */
    padding: 10px 18px; /* 微调内边距 */
    background: linear-gradient(to right, #00ffcc, #00b3ff);
    color: #0a192f;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: opacity 0.3s;
    flex-shrink: 0; /* 防止按钮被压缩 */
  }
  .ai-dialog-input button#aiSendBtn:hover {
    opacity: 0.9;
  }
  .ai-dialog-input button#aiSendBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
    
  /* 状态显示文本 */
  #recordingStatus {
    font-size: 12px;
    color: #8892b0;
    /* margin-left: 5px; */ /* 使用 gap 控制间距 */
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 60px; /* 给点最小宽度防止布局跳动 */
    text-align: left;
  }

/* --- 图例样式 --- */
.legend-container {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 图例项之间的间距 */
    padding: 10px 0;
  }
  
  .legend-item {
    display: flex;
    align-items: center;
    gap: 8px; /* 色条和文字之间的间距 */
  }
  
  .color-bar {
    width: 100px; /* 色条宽度 */
    height: 15px;  /* 色条高度 */
    border: 1px solid #555; /* 可选：给色条一个边框 */
    position: relative; /* 用于定位标签 */
  }
  
  .legend-text {
    font-size: 12px;
    color: #abb2bf; /* 浅灰色文字 */
    display: flex;
    flex-direction: column; /* 让描述文字垂直排列 */
  }
  
  .legend-text .highlight {
    font-weight: bold;
    color: #e5c07b; /* 高亮颜色，例如金色 */
  }
  
  /* 压力场渐变标签 */
  .gradient-label {
    position: absolute;
    top: 100%; /* 定位到色条下方 */
    margin-top: 2px; /* 与色条的间距 */
    font-size: 10px;
    color: #8892b0;
  }
  .gradient-label.left {
    left: 0;
  }
  .gradient-label.right {
    right: 0;
  }
  
  
  /* --- 渐变定义 --- */
  
  .velocity-gradient {
    /* 近似 d3.interpolateTurbo: 蓝 -> 青 -> 绿 -> 黄 -> 红 */
    background: linear-gradient(to right, #30123b, #41b7c4, #80d484, #f9fc9d, #f46d43, #a50026);
  }
  
  .pressure-gradient {
    /* d3.interpolateRdBu: 蓝 -> 白 -> 红 */
    background: linear-gradient(to right, #0571b0, #92c5de, #f7f7f7, #f4a582, #ca0020);
  }
  
  .material-gradient {
    /* d3.interpolateSinebow (彩虹色) */
    background: linear-gradient(to right, red, orange, yellow, lime, cyan, blue, purple);
  }
  