/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 导航样式 */
.navigation {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 1rem 0;
}

.nav-list li {
    margin: 0.25rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #555;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 主要内容区域 */
.main {
    padding: 3rem 0;
}

.chart-section {
    background: white;
    margin-bottom: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.section-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e1e8ed;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.chart-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: white;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    background: #667eea;
    color: white;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.chart-container {
    padding: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.chart-container.hidden {
    display: none;
}

.chart-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    height: 400px;
    position: relative;
}

.chart-wrapper.large {
    max-width: 800px;
    height: 600px;
}

.chart-info {
    flex: 1;
    min-width: 300px;
    padding: 1rem;
}

.chart-info h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
    padding-left: 1rem;
}

.chart-info p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* 数据统计样式 */
.data-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.stat {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    flex: 1;
    min-width: 150px;
    border-left: 3px solid #667eea;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

/* 数据表格样式 */
.data-table {
    margin-top: 1rem;
    overflow-x: auto;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.data-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* 洞见信息样式 */
.insights {
    margin-top: 1rem;
}

.insight-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #28a745;
}

.insight-title {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.insight-value {
    color: #666;
}

/* 成本分析样式 */
.cost-analysis {
    margin-top: 1rem;
}

.cost-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
}

.cost-type {
    display: block;
    font-weight: 600;
    color: #856404;
    margin-bottom: 0.25rem;
}

.cost-desc {
    color: #856404;
}

/* 直方图统计样式 */
.histogram-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

/* 支出明细样式 */
.expense-breakdown {
    margin-top: 1rem;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #e8f4fd;
    border-radius: 8px;
    border-left: 3px solid #17a2b8;
}

.expense-category {
    font-weight: 600;
    color: #0c5460;
}

.expense-amount {
    color: #0c5460;
}

/* 散点图分析样式 */
.scatter-analysis {
    margin-top: 1rem;
}

.analysis-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #d1ecf1;
    border-radius: 8px;
    border-left: 3px solid #17a2b8;
}

.analysis-title {
    display: block;
    font-weight: 600;
    color: #0c5460;
    margin-bottom: 0.25rem;
}

.analysis-value {
    color: #0c5460;
}

/* 发电量统计样式 */
.generation-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.year-stats {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-top: 3px solid #667eea;
}

.year-stats h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
}

.stat-item span:first-child {
    color: #666;
}

.stat-item span:last-child {
    font-weight: 600;
    color: #2c3e50;
}

/* 霍兰德类型样式 */
.holland-types {
    margin-top: 1rem;
}

.type-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #6f42c1;
}

.type-code {
    display: inline-block;
    font-weight: 600;
    color: #6f42c1;
    margin-right: 0.5rem;
}

.type-desc {
    color: #666;
}

/* 树种分析样式 */
.tree-analysis {
    margin-top: 1rem;
}

.tree-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #d4edda;
    border-radius: 8px;
    border-left: 3px solid #28a745;
}

.tree-name {
    display: block;
    font-weight: 600;
    color: #155724;
    margin-bottom: 0.25rem;
}

.tree-detail {
    color: #155724;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-list li {
        width: 100%;
        text-align: center;
    }
    
    .chart-container {
        flex-direction: column;
    }
    
    .chart-wrapper {
        max-width: 100%;
        height: 300px;
    }
    
    .generation-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .data-summary {
        flex-direction: column;
    }
    
    .stat {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .section-header {
        padding: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .chart-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-section {
    animation: fadeInUp 0.6s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}