/* 全局样式 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-color);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.shadow {
    box-shadow: var(--shadow);
}

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

.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .nav-link {
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--secondary-color);
}

/* 图表容器样式 */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    margin: 20px 0;
}

/* 时间轴样式 */
.timeline-container {
    padding: 20px 0;
}

#timeline-slider {
    height: 10px;
    margin: 30px 0;
}

.noUi-connect {
    background: var(--secondary-color);
}

.noUi-handle {
    border-radius: 50%;
    background: var(--secondary-color);
    box-shadow: var(--shadow);
}

.timeline-event {
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary-color);
    background-color: white;
    border-radius: 0 8px 8px 0;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.timeline-event:hover {
    transform: translateX(5px);
}

.timeline-event h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.timeline-event .event-year {
    font-weight: bold;
    color: var(--secondary-color);
}

.timeline-event .event-description {
    margin-top: 10px;
}

.timeline-controls .btn-group {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

/* 政策分析样式 */
.policy-content {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.policy-title {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.policy-background {
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.policy-impact {
    margin-top: 20px;
}

.policy-impact-item {
    padding: 10px;
    margin-bottom: 10px;
    border-left: 3px solid var(--accent-color);
    background-color: rgba(231, 76, 60, 0.05);
}

/* 结论部分样式 */
.key-observations li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
    
    .timeline-controls .btn-group {
        display: flex;
        flex-wrap: wrap;
    }
    
    .timeline-controls .btn {
        flex: 1 0 50%;
        margin-bottom: 5px;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 打印样式优化 */
@media print {
    .navbar, .timeline-controls, footer {
        display: none;
    }
    
    .card {
        box-shadow: none !important;
        margin-bottom: 30px !important;
    }
    
    .chart-container {
        page-break-inside: avoid;
    }
}
