/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 控制面板样式 */
.control-panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.chart-type-selector {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.style-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

.control-group label {
    font-weight: 600;
    color: #555;
}

.control-group select,
.control-group input[type="range"] {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.control-group select:focus,
.control-group input[type="range"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.control-group input[type="range"] {
    width: 100%;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn.secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn.reset {
    background: #ff6b6b;
    color: white;
}

.btn.export {
    background: #51cf66;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 图表容器样式 */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.chart {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    background: #f8f9fa;
}

.chart-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.chart-stats {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

/* 数据控制样式 */
.data-controls {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.data-controls h3 {
    margin-bottom: 15px;
    color: #333;
}

.data-controls h4 {
    margin-bottom: 15px;
    color: #555;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

/* 数据编辑器样式 */
.data-editor {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.table-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.data-table-container {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 500px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.data-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.data-table td {
    background: white;
    transition: background-color 0.2s ease;
}

.data-table tr:hover td {
    background: #f8f9fa;
}

.data-table input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.data-table input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.data-table input[readonly] {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

/* 数据输入样式 */
.data-input {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.data-input textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.data-input textarea:focus {
    outline: none;
    border-color: #667eea;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 底部样式 */
.footer {
    text-align: center;
    color: white;
    padding: 20px;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .style-controls {
        grid-template-columns: 1fr;
    }
    
    .chart {
        height: 300px;
    }
    
    .chart-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.control-panel,
.chart-container,
.data-controls {
    animation: fadeIn 0.6s ease-out;
}

/* 配色方案自定义 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #51cf66;
    --danger-color: #ff6b6b;
    --text-color: #333;
    --bg-color: #f8f9fa;
}

/* 主题切换支持 */
.theme-dark {
    --primary-color: #8b5cf6;
    --secondary-color: #a855f7;
    --text-color: #f8f9fa;
    --bg-color: #1a1a1a;
}