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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #303133;
    background-color: #f5f7fa;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

/* 左侧边栏 */
.sidebar {
    width: 180px;
    min-width: 150px;
    max-width: 400px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

/* 可调节的分割线 */
.resizer {
    width: 4px;
    background-color: #e4e7ed;
    cursor: col-resize;
    flex-shrink: 0;
    position: relative;
    transition: background-color 0.2s;
}

.resizer:hover {
    background-color: #409eff;
}

.resizer::before {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    top: 0;
    bottom: 0;
    cursor: col-resize;
}

.connector-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    padding: 8px 0;
}

.connector-item {
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 14px;
    color: #606266;
}

.connector-item:hover {
    background-color: #f5f7fa;
    color: #409eff;
}

.connector-item.active {
    background: linear-gradient(90deg, #409eff 0%, #66b1ff 100%);
    color: #fff;
    font-weight: 500;
}

.connector-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #fff;
}

.connector-item.active:hover {
    background: linear-gradient(90deg, #66b1ff 0%, #85c1ff 100%);
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    overflow: hidden;
}

.content-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
}

.empty-state {
    text-align: center;
    color: #909399;
    margin-top: 100px;
    font-size: 14px;
}

/* 表单样式 */
.params-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-group label {
    display: inline-block;
    min-width: 140px;
    font-weight: 500;
    color: #606266;
    font-size: 13px;
    text-align: right;
}

.form-group input[type="number"],
.form-group input[type="text"] {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
    background-color: #fff;
}

.form-group input[type="number"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.form-group input[type="number"]:hover,
.form-group input[type="text"]:hover {
    border-color: #c0c4cc;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    margin: 20px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e4e7ed;
    position: relative;
}

.section-title:first-child {
    margin-top: 0;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #409eff 0%, #66b1ff 100%);
}

/* 按钮样式 */
.content-footer {
    padding: 12px 20px;
    border-top: 1px solid #e4e7ed;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background-color: #fafafa;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 70px;
}

.btn-primary {
    background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #66b1ff 0%, #85c1ff 100%);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(64, 158, 255, 0.3);
}

.btn-secondary {
    background-color: #fff;
    color: #606266;
    border: 1px solid #dcdfe6;
}

.btn-secondary:hover {
    color: #409eff;
    border-color: #409eff;
    background-color: #ecf5ff;
    transform: translateY(-1px);
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 消息提示 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s;
}

.message.success {
    background-color: #f0f9ff;
    color: #67c23a;
    border: 1px solid #b3e19d;
}

.message.error {
    background-color: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 安装规则表格样式 */
.installation-rules {
    margin-top: 20px;
}

.rules-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.rules-table th,
.rules-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid #dcdfe6;
    font-size: 13px;
}

.rules-table th {
    background-color: #f5f7fa;
    font-weight: 600;
    color: #606266;
}

.rules-table td input.rule-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}

.rules-table td input.rule-input:focus {
    outline: none;
    border-color: #409eff;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background-color: #f56c6c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-small:hover {
    background-color: #f78989;
}

/* 复选框样式 */
.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.form-group label[style*="display: flex"] {
    min-width: 140px;
    text-align: right;
    justify-content: flex-end;
}

/* 板厚参数表格样式 */
.board-thickness-table {
    margin-top: 20px;
}

.thickness-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.thickness-table th,
.thickness-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid #dcdfe6;
    font-size: 13px;
}

.thickness-table th {
    background-color: #f5f7fa;
    font-weight: 600;
    color: #606266;
}

.thickness-table td input.thickness-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}

.thickness-table td input.thickness-input:focus {
    outline: none;
    border-color: #409eff;
}

/* 调试面板样式 */
.debug-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background-color: #1e1e1e;
    color: #d4d4d4;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    border-top: 2px solid #409eff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.debug-header {
    padding: 10px 15px;
    background-color: #252526;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    align-items: center;
    gap: 10px;
}

.debug-header h3 {
    margin: 0;
    font-size: 14px;
    color: #fff;
    flex: 1;
}

.debug-header button {
    padding: 5px 15px;
    background-color: #0e639c;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.debug-header button:hover {
    background-color: #1177bb;
}

.debug-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.debug-content .log-info {
    color: #4ec9b0;
}

.debug-content .log-warn {
    color: #dcdcaa;
}

.debug-content .log-error {
    color: #f48771;
}

.debug-content .log-success {
    color: #4ec9b0;
}

.debug-toggle-btn {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 8px 15px;
    background-color: #409eff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.debug-toggle-btn:hover {
    background-color: #66b1ff;
}
