/* 响应式设计增强 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .chart-wrapper {
        height: 300px;
    }
    
    .chart-type-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .chart-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .data-controls {
        flex-direction: column;
    }
    
    .filter-control {
        min-width: 100%;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .chart-title {
        font-size: 1.2rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示样式 */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    max-width: 200px;
}

/* 数据表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f5f5f5;
}

/* 导出按钮样式 */
.export-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 洞察卡片样式 */
.insights-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.insight-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.insight-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.insight-card ul {
    list-style: none;
    padding: 0;
}

.insight-card li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.insight-card li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ffd700;
    font-weight: bold;
}

/* 暗色主题 */
.dark-theme {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
}

.dark-theme .controls,
.dark-theme .chart-container,
.dark-theme .data-summary {
    background: #34495e;
    color: #ecf0f1;
}

.dark-theme .data-table {
    background: #34495e;
    color: #ecf0f1;
}

.dark-theme .data-table th {
    background: #2c3e50;
}

.dark-theme .data-table tr:hover {
    background: #3d566e;
}

.dark-theme .insight-card {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}