* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 1.3rem;
    font-weight: 600;
}

.chart-container canvas {
    width: 100% !important;
    height: 300px !important;
}

/* 数据编辑面板样式 */
.data-editor {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.data-editor h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 1.5rem;
}

.editor-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #f7fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #e2e8f0;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.data-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    align-items: end;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #4a5568;
}

.input-group input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.data-inputs button {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    background: #667eea;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.data-inputs button:hover {
    background: #5a6fd8;
}

.data-list {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: white;
    border-radius: 4px;
    border-left: 4px solid #667eea;
}

.data-item:last-child {
    margin-bottom: 0;
}

.data-item .delete-btn {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}

.data-item .delete-btn:hover {
    background: #c53030;
}

/* 导入导出按钮样式 */
.import-export-buttons {
    margin-top: 20px;
    text-align: center;
}

.import-export-buttons button,
.import-export-buttons label {
    margin: 5px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
    display: inline-block;
}

.import-export-buttons button:hover,
.import-export-buttons label:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.import-export-buttons button:first-child {
    background: #28a745;
    color: white;
}

.import-export-buttons label {
    background: #17a2b8;
    color: white;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .data-inputs {
        grid-template-columns: 1fr;
    }
    
    .editor-tabs {
        justify-content: center;
    }
}