/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* 主布局 */
.main-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* 左侧面板 */
.left-panel {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 250px;
}

.left-panel h3 {
    margin-top: 0;
    color: #555;
    font-size: 16px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

.control-group input[type="text"],
.control-group select {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.control-group input[type="range"] {
    width: 100%;
    margin-top: 5px;
}

/* 画布容器 */
.canvas-container {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
}

#mainCanvas {
    border: 1px solid #ccc;
    background-color: black;
    cursor: crosshair;
}

#statusBar {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* 控制按钮 */
.control-buttons {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.control-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.control-buttons button:hover {
    background-color: #45a049;
}

.control-buttons button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.control-buttons select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 对话框样式 */
.dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
}

.dialog-content.large {
    max-width: 800px;
}

.dialog-content h3 {
    margin-top: 0;
    color: #333;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.config-grid label {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.config-grid input,
.config-grid select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.dialog-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.dialog-buttons button:first-child {
    background-color: #4CAF50;
    color: white;
}

.dialog-buttons button:last-child {
    background-color: #f44336;
    color: white;
}

/* 曲线显示控件 */
.curve-controls {
    margin-top: 10px;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.curve-controls label {
    color: #666;
    font-size: 14px;
}

.curve-controls select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#curveCanvas {
    border: 1px solid #ccc;
    background-color: white;
    display: block;
    margin: 0 auto;
}
