
        /* 基础重置与字体 */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
            --glass-border: #30363d;
        }

        body {
            background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
            color: #c9d1d9;
            line-height: 1.6;
            padding: 20px;
            min-height: 100vh;
            transition: all 0.3s ease;
        }

        /* 亮色模式 */
        body.light-mode {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            color: #212529;
        }

        /* 主容器 */
        .container {
            max-width: 1000px;
            margin: 0 auto;
            background-color: rgba(22, 27, 34, 0.7);
            border: 1px solid #30363d;
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
            transition: all 0.3s ease;
        }

        body.light-mode .container {
            background-color: rgba(255, 255, 255, 0.9);
            border: 1px solid #ced4da;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        }

        /* 标题 */
        h2 {
            color: #ffffff;
            text-align: left;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #30363d;
            font-size: 1.5em;
            transition: all 0.3s ease;
        }

        body.light-mode h2 {
            color: #212529;
            border-bottom: 1px solid #ced4da;
        }

        h3 {
            color: #58a6ff;
            margin-top: 25px;
            margin-bottom: 15px;
            font-size: 1.3em;
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
        }

        body.light-mode h3 {
            color: #0d6efd;
        }

        h3::before {
            content: "";
            display: inline-block;
            width: 4px;
            height: 16px;
            background-color: #58a6ff;
            border-radius: 2px;
            margin-right: 8px;
            transition: all 0.3s ease;
        }

        body.light-mode h3::before {
            background-color: #0d6efd;
        }

        /* 基础配置区域 */
        .basic-config {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 25px;
            padding: 20px;
            background-color: rgba(13, 17, 23, 0.5);
            border-radius: 8px;
            border: 1px solid #30363d;
            transition: all 0.3s ease;
        }

        body.light-mode .basic-config {
            background-color: rgba(248, 249, 250, 0.8);
            border: 1px solid #ced4da;
        }

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

        .config-group label {
            color: #8b949e;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }

        body.light-mode .config-group label {
            color: #495057;
        }

        /* 新增：模式配置相关样式 */
        .mode-config-row {
            display: flex;
            gap: 12px;
            align-items: flex-end;
            margin-bottom: 20px;
            padding: 15px;
            background-color: rgba(13, 17, 23, 0.5);
            border-radius: 8px;
            border: 1px solid #30363d;
            transition: all 0.3s ease;
        }

        body.light-mode .mode-config-row {
            background-color: rgba(248, 249, 250, 0.8);
            border: 1px solid #ced4da;
        }

        .mode-select { 
            flex: 1; 
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .mode-button { 
            flex: 0 0 auto; 
        }

        select {
            background-color: #0d1117;
            border: 1px solid #30363d;
            border-radius: 6px;
            color: #c9d1d9;
            padding: 8px 12px;
            font-size: 0.95em;
            transition: all 0.2s;
            width: 100%;
            min-width: 200px;
        }

        body.light-mode select {
            background-color: #ffffff;
            border: 1px solid #ced4da;
            color: #212529;
        }

        select:focus {
            outline: none;
            border-color: #58a6ff;
            box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
        }

        body.light-mode select:focus {
            border-color: #0d6efd;
            box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
        }

        select:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        /* 新增：参数配置网格 */
        .config-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 25px;
            padding: 15px;
            background-color: rgba(13, 17, 23, 0.5);
            border-radius: 8px;
            border: 1px solid #30363d;
            transition: all 0.3s ease;
        }

        body.light-mode .config-grid {
            background-color: rgba(248, 249, 250, 0.8);
            border: 1px solid #ced4da;
        }

        .config-grid > div {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .config-grid label {
            color: #8b949e;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }

        body.light-mode .config-grid label {
            color: #495057;
        }

        /* 新增：自定义按钮样式 */
        .btn-warning {
            background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
        }

        .btn-warning:hover {
            background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
            border-color: #f59e0b;
        }

        .btn-warning2 {
            background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
        }

        .btn-warning2:hover {
            background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
            border-color: #ef4444;
        }

        button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none !important;
            background: linear-gradient(180deg, #374151 0%, #1f2937 100%) !important;
            border-color: #374151 !important;
        }

        body.light-mode button:disabled {
            background: linear-gradient(180deg, #adb5bd 0%, #6c757d 100%) !important;
            border-color: #adb5bd !important;
        }

        /* 阶段配置区域 - 修改为隐藏 */
        .phase-config {
            display: none; /* 隐藏Phase配置区域 */
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 25px;
        }

        .phase-card {
            background-color: rgba(13, 17, 23, 0.5);
            border: 1px solid #30363d;
            border-radius: 8px;
            padding: 20px;
            transition: all 0.2s;
        }

        body.light-mode .phase-card {
            background-color: rgba(248, 249, 250, 0.8);
            border: 1px solid #ced4da;
        }

        .phase-card:hover {
            border-color: #3a424e;
        }

        body.light-mode .phase-card:hover {
            border-color: #adb5bd;
        }

        .phase-card h3 {
            margin-top: 0;
        }

        .config-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
        }

        .config-row label {
            min-width: 90px;
            color: #8b949e;
            font-size: 0.95em;
            transition: all 0.3s ease;
        }

        body.light-mode .config-row label {
            color: #495057;
        }

        /* 输入框样式 */
        input {
            background-color: #0d1117;
            border: 1px solid #30363d;
            border-radius: 6px;
            color: #c9d1d9;
            padding: 8px 12px;
            font-size: 0.95em;
            transition: all 0.2s;
            width: 80px;
            text-align: center;
        }

        body.light-mode input {
            background-color: #ffffff;
            border: 1px solid #ced4da;
            color: #212529;
        }

        input:focus {
            outline: none;
            border-color: #58a6ff;
            box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
        }

        body.light-mode input:focus {
            border-color: #0d6efd;
            box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
        }

        /* 按钮组 */
        .button-group {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin: 30px 0;
            flex-wrap: wrap;
        }

        /* 新增：灯光控制按钮样式 */
        .light-controls {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-bottom: 20px;
        }

        .light-btn {
            padding: 8px 16px;
            min-width: auto;
            font-size: 0.9em;
        }

        .light-on-btn {
            background: linear-gradient(180deg, #ffc107 0%, #ff8c00 100%);
        }

        .light-on-btn:hover {
            background: linear-gradient(180deg, #ffca2c 0%, #ffc107 100%);
            border-color: #ffca2c;
        }

        .light-off-btn {
            background: linear-gradient(180deg, #6c757d 0%, #343a40 100%);
        }

        .light-off-btn:hover {
            background: linear-gradient(180deg, #adb5bd 0%, #6c757d 100%);
            border-color: #adb5bd;
        }

        button {
            background: linear-gradient(180deg, #238636 0%, #196c2e 100%);
            color: white;
            border: 1px solid rgba(240, 246, 252, 0.1);
            border-radius: 8px;
            padding: 12px 24px;
            font-size: 1em;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            min-width: 140px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        body.light-mode button {
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        button:hover {
            background: linear-gradient(180deg, #2ea043 0%, #238636 100%);
            border-color: #3fb950;
            transform: translateY(-2px);
        }

        button:active {
            transform: translateY(0);
        }

        /* 云数据按钮特殊样式 */
        .cloud-btn {
            background: linear-gradient(180deg, #8957e5 0%, #6f42c1 100%);
        }

        .cloud-btn:hover {
            background: linear-gradient(180deg, #9561e9 0%, #7c4fd3 100%);
            border-color: #8a63d2;
        }
/* 重新选择按钮样式 */
.btn-warning {
    background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
}

.btn-warning:hover {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
}
        /* 输出与日志区域 - 修改为隐藏 */
        .output-area {
            display: none; /* 隐藏输出区域 */
            margin-top: 25px;
        }

        .output-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .output-header h3 {
            margin-bottom: 0;
        }

        .output-controls {
            display: flex;
            gap: 10px;
        }

        .copy-btn {
            background: linear-gradient(180deg, #1f6feb 0%, #1158c7 100%);
            padding: 6px 12px;
            min-width: auto;
            font-size: 0.85em;
        }

        .copy-btn:hover {
            background: linear-gradient(180deg, #2c7cec 0%, #1f6feb 100%);
        }

        pre {
            background-color: #0d1117;
            border: 1px solid #30363d;
            border-radius: 8px;
            padding: 18px;
            color: #8b949e;
            font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
            font-size: 0.9em;
            overflow-x: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
            margin-top: 10px;
            max-height: 300px;
            overflow-y: auto;
            transition: all 0.3s ease;
        }

        body.light-mode pre {
            background-color: #ffffff;
            border: 1px solid #ced4da;
            color: #212529;
        }

        #out {
            color: #58a6ff;
            font-weight: bold;
            transition: all 0.3s ease;
        }

        body.light-mode #out {
            color: #0d6efd;
        }

        #log {
            color: #8b949e;
            font-size: 0.85em;
            transition: all 0.3s ease;
        }

        body.light-mode #log {
            color: #495057;
        }

        /* 设备状态面板 */
        .device-status {
            background-color: rgba(13, 17, 23, 0.5);
            border: 1px solid #30363d;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 15px;
            transition: all 0.3s ease;
        }

        body.light-mode .device-status {
            background-color: rgba(248, 249, 250, 0.8);
            border: 1px solid #ced4da;
        }

        .status-indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background-color: #f85149;
        }

        .status-indicator.connected {
            background-color: #3fb950;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.7; }
            100% { opacity: 1; }
        }

        .status-text {
            flex-grow: 1;
        }

        .device-name {
            color: #c9d1d9;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        body.light-mode .device-name {
            color: #212529;
        }

        .device-status-text {
            color: #8b949e;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }

        body.light-mode .device-status-text {
            color: #495057;
        }

        /* 新增：设备信息样式 */
        .device-info {
            height: 120px;
            background: rgba(20, 20, 30, 0.8);
            border-radius:8px;
            padding:10px;
            font-family:monospace;
            font-size:0.85rem;
            white-space:pre-wrap;
            margin-bottom:12px;
            border: 1px solid var(--glass-border);
            color: #8b949e;
            overflow-y: auto;
            transition: all 0.3s ease;
        }

        body.light-mode .device-info {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid #ced4da;
            color: #495057;
        }

        /* 新增：日志相关样式 */
        .log { 
            height:620px; 
            overflow-y:auto; 
            background: rgba(20, 20, 30, 0.8); 
            border-radius:8px; 
            padding:10px; 
            font-family:monospace; 
            font-size:0.86rem; 
            border: 1px solid var(--glass-border);
            transition: all 0.3s ease;
        }

        body.light-mode .log {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid #ced4da;
        }

        .log-entry { 
            margin-bottom:8px; 
            padding-bottom:6px; 
            border-bottom:1px solid rgba(255,255,255,0.03); 
            transition: all 0.3s ease;
        }

        body.light-mode .log-entry {
            border-bottom:1px solid rgba(0,0,0,0.05);
        }

        .timestamp { 
            color:#3498db; 
            font-size:0.78rem; 
            margin-right:6px; 
            transition: all 0.3s ease;
        }

        body.light-mode .timestamp {
            color:#0d6efd;
        }

        /* 响应式调整 */
        @media (max-width: 768px) {
            .container {
                padding: 15px;
            }
            
            .phase-config {
                grid-template-columns: 1fr;
            }
            
            .config-row {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .config-row label {
                margin-bottom: 5px;
            }
            
            input {
                width: 100%;
            }
            
            .button-group {
                flex-direction: column;
                align-items: center;
            }
            
            button {
                width: 100%;
                max-width: 300px;
            }
            
            .device-status {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .mode-config-row {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }

            .mode-button {
                width: 100%;
            }

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

            select {
                min-width: 100%;
            }

            .light-controls {
                justify-content: center;
            }
            
            .device-info {
                height: 150px;
            }
        }