/* 时间轴样式 */
.timeline-container {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: white;
}

.timeline-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-title i {
    font-size: 20px;
}

.timeline-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.current-time-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

.timeline-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.timeline-slider-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.timeline-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.timeline-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-top: 5px;
}

.timeline-buttons {
    display: flex;
    gap: 10px;
}

.timeline-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.timeline-btn:active {
    transform: translateY(0);
}

.timeline-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timeline-btn i {
    font-size: 14px;
}

.play-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    font-weight: 600;
}

.play-btn:hover {
    background: white;
}

.timeline-speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
}

.speed-select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.speed-select option {
    background: #667eea;
    color: white;
}

/* 时间范围选择器 */
.timeline-range-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.range-input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    width: 140px;
}

.range-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.apply-range-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.apply-range-btn:hover {
    background: white;
    transform: translateY(-2px);
}

/* 时间标记 */
.timeline-markers {
    position: relative;
    height: 30px;
    margin-top: 10px;
}

.timeline-marker {
    position: absolute;
    width: 2px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-marker:hover {
    background: white;
    height: 25px;
}

.timeline-marker::after {
    content: attr(data-year);
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

/* 动画效果 */
.chart-updating {
    opacity: 0.6;
    transition: opacity 0.3s;
}

.chart-updated {
    opacity: 1;
    transition: opacity 0.3s;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .timeline-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .timeline-buttons {
        flex-wrap: wrap;
    }

    .timeline-range-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .range-input {
        width: 100%;
    }
}
