/* 数据可视化页面专用样式 */

/* 页面头部样式 */
.hero-section {
    background: linear-gradient(135deg, #4CAF50 0%, #8D6E63 100%);
    color: white;
    padding: 120px 0 80px;
    margin-top: 80px;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 区块头部样式 */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-header h2 i {
    color: #4CAF50;
    font-size: 2rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 图表容器样式 */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

/* 图表控制按钮 */
.chart-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.chart-controls .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e8f5e8;
    color: #4CAF50;
    border-color: #4CAF50;
}

/* 趋势网格布局 */
.trends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin: 3rem auto;
    max-width: 100%;
}

.trend-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    max-width: 100%;
    overflow: hidden;
}

.trend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.trend-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #4CAF50;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem auto;
    max-width: 100%;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4CAF50, #8D6E63);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.stat-content h3 {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
    font-weight: 500;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #4CAF50, #8D6E63);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-unit {
    font-size: 0.9rem;
    color: #999;
    font-weight: 500;
}

/* 数据来源部分 */
.data-sources {
    background: #f8f9fa;
    padding: 3rem 0;
    margin-top: 4rem;
}

.data-sources h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
}

.sources-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.source-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.source-item i {
    color: #4CAF50;
    font-size: 1.2rem;
}

.source-item span {
    color: #666;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 767px) {
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .trends-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .trend-card {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .chart-container {
        padding: 1.5rem;
    }
    
    .chart-controls {
        gap: 0.8rem;
    }
    
    .chart-controls .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .chart-container,
    .trend-card,
    .stat-card {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .trend-card {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .chart-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .chart-controls .btn {
        width: 100%;
        max-width: 200px;
    }
}
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .sources-list {
        grid-template-columns: 1fr;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 图表工具提示自定义样式 */
.echarts-tooltip {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #4CAF50 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

/* 导航菜单激活状态 */
.nav-menu a.active {
    color: #4CAF50 !important;
    font-weight: 600;
    position: relative;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #4CAF50;
    border-radius: 1px;
}