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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #718096;
    font-size: 1.1rem;
}

main {
    padding-bottom: 2rem;
}

.chart-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.chart-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
}

.chart-description {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.7;
}

footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 1.5rem 0;
    color: #718096;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .chart-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .chart-section h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .chart-section {
        padding: 1rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .chart-description {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-section {
    animation: fadeInUp 0.6s ease-out;
}

.chart-section:nth-child(1) { animation-delay: 0.1s; }
.chart-section:nth-child(2) { animation-delay: 0.2s; }
.chart-section:nth-child(3) { animation-delay: 0.3s; }
.chart-section:nth-child(4) { animation-delay: 0.4s; }
.chart-section:nth-child(5) { animation-delay: 0.5s; }

/* 控制按钮样式 */
.controls-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.edit-btn, .reset-btn, .export-btn, .add-data-btn, .apply-btn, .cancel-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.reset-btn {
    background: #f59e0b;
    color: white;
}

.reset-btn:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.export-btn {
    background: #10b981;
    color: white;
}

.export-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.add-data-btn {
    background: #8b5cf6;
    color: white;
}

.add-data-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}

.apply-btn {
    background: #22c55e;
    color: white;
}

.apply-btn:hover {
    background: #16a34a;
}

.cancel-btn {
    background: #ef4444;
    color: white;
}

.cancel-btn:hover {
    background: #dc2626;
}

/* 数据编辑器样式 */
.data-editor {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

.data-editor.hidden {
    display: none;
}

.data-editor h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.data-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    color: #4a5568;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-group input,
.input-group textarea,
.input-group select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group textarea {
    resize: vertical;
    min-height: 60px;
}

.parameter-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.param-input {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.param-input label {
    font-size: 0.85rem;
    color: #718096;
}

.param-input input {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.range-inputs input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.range-inputs span {
    color: #718096;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .controls-container {
        justify-content: center;
    }
    
    .parameter-inputs {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
}

/* Canvas 样式优化 */
canvas {
    max-width: 100%;
    height: auto !important;
}