* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    font-weight: 300;
}

.controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 500;
    color: #555;
}

.control-group input[type="text"],
.control-group input[type="file"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#exportBtn {
    background-color: #27ae60;
}

#exportBtn:hover {
    background-color: #229954;
}

#clearBtn {
    background-color: #e74c3c;
}

#clearBtn:hover {
    background-color: #c0392b;
}

.main-content {
    display: flex;
    gap: 20px;
}

#canvas-container {
    flex: 1;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 600px;
    position: relative;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.axis-settings,
.legend,
.data-input {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.axis-settings h3,
.legend h3,
.data-input h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.axis-group {
    margin-bottom: 10px;
}

.axis-group label {
    display: inline-block;
    width: 80px;
    font-weight: 500;
    color: #555;
}

.axis-group input {
    width: calc(100% - 90px);
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

#legend-container {
    max-height: 200px;
    overflow-y: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.legend-item:hover {
    background-color: #f8f9fa;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
}

.legend-label {
    flex: 1;
    font-size: 14px;
}

.legend-remove {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.legend-remove:hover {
    background-color: #c0392b;
}

#dataInput {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
}

#plotBtn {
    margin-top: 10px;
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .axis-settings,
    .legend,
    .data-input {
        flex: 1;
        min-width: 280px;
    }
}

/* 加载动画 */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #3498db;
}

/* 工具提示 */
.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
} 