/*!
 * 毛泽东生平地理轨迹可视化 - 样式文件
 * Author: sansan0
 * GitHub: https://github.com/sansan0
 */

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
}

input[type="range"],
.leaflet-marker-icon,
.feedback-item,
.speed-btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #f5f7fa;
    overflow: hidden;
    color: #333;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#container {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: #ffffff;
}

#map {
    width: 100%;
    height: 100vh;
    background: #f0f0f0;
    transition: height 0.3s ease;
}

/* ==================== PC端统计面板 ==================== */
#stats-panel {
    position: absolute;
    top: 15px;
    right: -300px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    z-index: 1000;
    min-width: 240px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
}

#stats-panel.visible {
    right: 15px;
}

/* 统计面板悬停触发按钮 */
#stats-panel::before {
    content: "📊";
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    cursor: pointer;
}

#stats-hover-area {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 200px;
    z-index: 999;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    padding: 4px 0;
}

.stats-label {
    color: #7f8c8d;
}

.stats-value {
    font-weight: bold;
    color: #2c3e50;
}

/* 动画设置面板 */
.animation-settings {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ecf0f1;
}

.animation-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.animation-control label {
    color: #7f8c8d;
    font-size: 12px;
    min-width: 80px;
}

.animation-control input[type="range"] {
    width: 120px;
    height: 6px;
    background: #ecf0f1;
    outline: none;
    border-radius: 3px;
    cursor: pointer;
    -webkit-appearance: none;
    margin: 0 8px;
}

.animation-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
    transition: all 0.2s ease;
}

.animation-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.5);
}

.animation-control .value-display {
    color: #2c3e50;
    font-weight: bold;
    font-size: 11px;
    min-width: 45px;
    text-align: right;
    background: rgba(52, 152, 219, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

/* 镜头跟随开关 */
.camera-follow-control {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ecf0f1;
}

.camera-follow-control h5 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 12px;
}

.camera-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

.camera-toggle label {
    color: #7f8c8d;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.camera-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ecf0f1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #bdc3c7;
}

.camera-switch.active {
    background: #3498db;
    border-color: #3498db;
}

.camera-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.camera-switch.active::before {
    transform: translateX(20px);
}

.camera-switch:hover {
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.camera-switch.active:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.camera-status {
    font-size: 11px;
    font-weight: 600;
    color: #3498db;
    min-width: 30px;
    text-align: right;
}

.camera-switch:not(.active)+.camera-status {
    color: #7f8c8d;
}

/* ==================== 移动端控制按钮 ==================== */
.toggle-panel-btn {
    position: fixed;
    bottom: 250px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(174, 214, 241, 0.6);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    border: 1px solid rgba(174, 214, 241, 0.4);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.15);
    z-index: 1001;
    transition: all 0.3s ease;
    touch-action: manipulation;
    display: none;
    align-items: center;
    justify-content: center;
}

.toggle-panel-btn.visible {
    display: flex;
}

.toggle-panel-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(174, 214, 241, 0.45);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.25);
    border-color: rgba(174, 214, 241, 0.6);
}

.toggle-panel-btn:active {
    transform: scale(0.9);
    background: rgba(174, 214, 241, 0.6);
}

/* ==================== 当前事件信息（移动端）==================== */
.current-event-section {
    display: none;
    background: transparent;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.event-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.event-info-row:last-child {
    margin-bottom: 0;
}

.event-date-mobile {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 11px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    flex-shrink: 0;
}

.event-title-mobile {
    color: #2c3e50;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    flex: 1;
    margin: 0 8px;
    text-align: center;
}

.event-location-mobile {
    color: #7f8c8d;
    font-size: 11px;
    background: rgba(127, 140, 141, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 500;
    flex-shrink: 0;
}

.progress-info-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #7f8c8d;
    gap: 8px;
    padding: 0 4px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.info-label {
    color: #7f8c8d;
    font-weight: 500;
    white-space: nowrap;
}

.info-value {
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1px;
}

.info-unit {
    color: #7f8c8d;
    font-weight: 500;
    margin-left: 1px;
}

/* ==================== 时间轴控制面板 ==================== */
#timeline-control {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 800px;
    max-width: 1200px;
    width: 85%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 120px;
    transition: transform 1s ease, background 1s ease;
}

#timeline-control.music-playing {
    background: rgba(200, 16, 46, 0.2);
}

#timeline-control.hidden {
    transform: translateX(-50%) translateY(100%);
}

.timeline-info {
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
}

.time-point {
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.time-point.start {
    text-align: left;
}

.time-point.end {
    text-align: right;
}

.time-point .label {
    display: block;
    color: #7f8c8d;
    font-size: 10px;
    margin-bottom: 2px;
    font-weight: 600;
}

.time-point .value {
    color: #2c3e50;
    font-weight: 600;
}

/* PC端当前事件详情 */
.current-event-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.1);
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.current-event-details .event-date {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 11px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.current-event-details .event-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    flex: 1;
    min-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-event-details .event-location {
    color: #7f8c8d;
    font-size: 11px;
    background: rgba(127, 140, 141, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==================== 播放器控制区域 ==================== */
.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 16px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.player-controls-row {
    display: contents;
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.player-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    font-size: 14px;
    touch-action: manipulation;
}

.player-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.player-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(52, 152, 219, 0.4);
}

.player-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.progress-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.progress-container {
    position: relative;
    width: 100%;
    height: 24px;
    display: flex;
    align-items: center;
}

/* 时间轴滑块样式 */
#timeline-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(236, 240, 241, 0.5);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.3s ease;
}

#timeline-slider:focus {
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
    background: rgba(236, 240, 241, 0.7);
}

#timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
    border: 2px solid #ffffff;
    transition: all 0.2s ease;
}

#timeline-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.6), 0 0 0 3px rgba(52, 152, 219, 0.2);
}

#timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.6);
}

#timeline-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.6);
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #7f8c8d;
    padding: 0 4px;
}

.progress-item {
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.3s ease;
}

.progress-item span {
    color: #2c3e50;
    font-weight: 600;
}

/* PC端速度控制 */
.player-speed {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.speed-label {
    color: #7f8c8d;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* 自定义下拉选择器 */
.custom-select-wrapper {
    position: relative;
    z-index: 100;
}

.custom-select {
    position: relative;
    min-width: 80px;
    user-select: none;
}

.select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1.5px solid rgba(52, 152, 219, 0.25);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.08);
    gap: 8px;
}

.select-display:hover {
    border-color: rgba(52, 152, 219, 0.5);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.custom-select.open .select-display {
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1), 0 6px 20px rgba(52, 152, 219, 0.2);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.select-text {
    flex: 1;
    text-align: center;
}

.select-arrow {
    font-size: 10px;
    color: #3498db;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
}

/* 下拉选项容器 - 向上弹出 */
.select-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    border: 1.5px solid #3498db;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -8px 32px rgba(52, 152, 219, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.custom-select.open .select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 下拉选项 */
.select-option {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.select-option:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #2c3e50;
}

.select-option.selected {
    background: rgba(52, 152, 219, 0.15);
    color: #2c3e50;
    font-weight: 600;
}

.select-option.selected::before {
    content: "✓";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #3498db;
    font-size: 10px;
    font-weight: bold;
}

.select-option:not(:first-child) {
    border-top: 1px solid rgba(52, 152, 219, 0.1);
}

/* 点击选中动画效果 */
.select-option:active {
    background: rgba(52, 152, 219, 0.2);
    transform: scale(0.98);
}

/* 移动端速度控制 */
.speed-control {
    display: none;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.speed-btn {
    padding: 8px 12px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 6px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.8);
    color: #2c3e50;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-width: 44px;
    text-align: center;
}

.speed-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.speed-btn:active {
    transform: scale(0.95);
}

/* ==================== 详细信息面板 ==================== */
.location-detail-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    font-family: "Microsoft YaHei", Arial, sans-serif;
    z-index: 1500;
    max-width: 400px;
    max-height: 500px;
    display: none;
}

.location-detail-panel.visible {
    display: block;
}

.panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: rgba(0, 0, 0, 0.3); */
    z-index: 1499;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

.panel-backdrop.visible {
    opacity: 1;
    visibility: visible;
    display: block;
}

.panel-header {
    padding: 12px 16px;
    border-bottom: 2px solid #3498db;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 12px 12px 0 0;
    position: relative;
}

/* 移动端拖拽指示器 */
.panel-drag-handle {
    width: 40px;
    height: 4px;
    background: #bdc3c7;
    border-radius: 2px;
    margin: 0 auto 12px;
    cursor: grab;
    display: none;
    transition: all 0.25s ease;
    position: relative;
    z-index: 10;
}

.panel-drag-handle:active,
.panel-drag-handle.dragging {
    cursor: grabbing;
    background: #7f8c8d;
    width: 60px;
    height: 5px;
    transform: scaleY(1.2);
    box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
}

.panel-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: bold;
}

.panel-header .visit-summary {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 4px;
}

.panel-header .visit-count-highlight {
    color: #e74c3c;
    font-weight: bold;
}

.panel-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #7f8c8d;
    line-height: 1;
    padding: 2px;
    touch-action: manipulation;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:hover {
    color: #e74c3c;
}

.panel-close:active {
    color: #e74c3c;
    transform: scale(0.9);
}

.panel-content {
    padding: 8px;
    max-height: 400px;
    overflow-y: auto;
}

/* 事件列表项 */
.event-item {
    margin: 6px 0;
    padding: 8px 10px;
    border-left: 3px solid #3498db;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* .event-item:nth-child(even) {
    background: #f8f9fa;
}

.event-item:nth-child(odd) {
    background: #ffffff;
} */

.event-item:hover {
    background: rgba(52, 152, 219, 0.08);
    transform: translateX(2px);
}

.event-item.current-event {
    background: rgba(52, 152, 219, 0.1);
    border-left-color: #e74c3c;
    font-weight: 600;
}

/* 事件项点击反馈动画 */
.event-item-clicked {
    background: rgba(52, 152, 219, 0.2) !important;
    transform: translateX(4px) !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3) !important;
}

/* 可点击提示 */
.event-item::before {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #bdc3c7;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.event-item:hover::before {
    opacity: 0.6;
}

.event-item.current-event::before {
    border-top-color: #e74c3c;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.event-labels {
    display: flex;
    align-items: center;
    gap: 8px;
}

.visit-order-number {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    border: 1px solid #bdc3c7;
    flex-shrink: 0;
    order: 1;
}

.event-date-item {
    color: #2c3e50;
    font-size: 12px;
    font-weight: 600;
    flex: 1;
    order: 2;
}

.visit-order {
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
    order: 3;
}

.event-description {
    font-size: 11px;
    color: #34495e;
    line-height: 1.4;
    margin-bottom: 3px;
}

.event-age {
    font-size: 10px;
    color: #7f8c8d;
}

/* 途径事件特殊样式 */
.transit-event {
    border-left-color: #95a5a6;
    background: rgba(149, 165, 166, 0.05) !important;
}

.transit-event:hover {
    background: rgba(149, 165, 166, 0.1) !important;
}

.transit-order {
    background: #95a5a6;
    color: white;
}


/* 出生事件特殊样式 */
.birth-event {
    border-left-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05) !important;
}

.birth-event:hover {
    background: rgba(231, 76, 60, 0.1) !important;
}

.birth-order {
    background: #e74c3c;
    color: white;
}

/* 起点事件特殊样式 */
.start-event {
    border-left-color: #27ae60;
    background: rgba(39, 174, 96, 0.05) !important;
}

.start-event:hover {
    background: rgba(39, 174, 96, 0.1) !important;
}

.start-order {
    background: #27ae60;
    color: white;
}

/* 活动事件特殊样式 */
.activity-event {
    border-left-color: #f39c12;
    background: rgba(243, 156, 18, 0.05) !important;
}

.activity-event:hover {
    background: rgba(243, 156, 18, 0.1) !important;
}

.activity-order {
    background: #f39c12;
    color: white;
}

/* ==================== 地图标记样式 ==================== */
.location-marker {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 根据访问次数的标记尺寸 */
.location-marker.visits-1 {
    width: 14px;
    height: 14px;
    font-size: 8px;
}

.location-marker.visits-2 {
    width: 18px;
    height: 18px;
    font-size: 9px;
}

.location-marker.visits-3 {
    width: 22px;
    height: 22px;
    font-size: 10px;
}

.location-marker.visits-4-plus {
    width: 26px;
    height: 26px;
    font-size: 11px;
}

/* 根据事件类型的标记颜色 */
.marker-birth {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.marker-international {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.marker-long-distance {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.marker-short-distance {
    background: linear-gradient(135deg, #1abc9c, #16a085);
}

.marker-activity {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.marker-mixed {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.marker-transit {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.marker-movement {
    background: linear-gradient(135deg, #34495e, #2c3e50);
}

.location-marker.current {
    animation: pulse 1s infinite;
    transform: scale(1.3);
    z-index: 1000;
}

.location-marker.visited {
    opacity: 0.7;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(52, 152, 219, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* ==================== 加载和错误状态 ==================== */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 2000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 2000;
    color: #e74c3c;
    max-width: 500px;
    border: 1px solid #e74c3c;
}

/* ==================== 滚动条样式 ==================== */
.panel-content::-webkit-scrollbar,
.music-modal::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track,
.music-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb,
.music-modal::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.panel-content::-webkit-scrollbar-thumb:hover,
.music-modal::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* 音乐弹窗专用滚动条样式 */
.music-modal::-webkit-scrollbar {
    width: 8px;
}

.music-modal::-webkit-scrollbar-track {
    background: rgba(243, 156, 18, 0.1);
    border-radius: 4px;
}

.music-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.music-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}

/* Firefox 滚动条样式 */
.music-modal {
    scrollbar-width: thin;
    scrollbar-color: rgba(243, 156, 18, 0.6) rgba(243, 156, 18, 0.1);
}

/* ==================== 反馈功能样式 ==================== */
.feedback-btn {
    position: fixed;
    bottom: 300px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(168, 230, 207, 0.6);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    border: 1px solid rgba(168, 230, 207, 0.4);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(39, 174, 96, 0.15);
    z-index: 1001;
    transition: all 0.3s ease;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(168, 230, 207, 0.45);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.25);
    border-color: rgba(168, 230, 207, 0.6);
}

.feedback-btn:active {
    transform: scale(0.9);
    background: rgba(168, 230, 207, 0.6);
}

/* 反馈弹窗背景遮罩 */
.feedback-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2499;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

.feedback-backdrop.visible {
    opacity: 1;
    visibility: visible;
    display: block;
}

/* 反馈弹窗主体 */
.feedback-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 2500;
    width: 400px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
}

.feedback-modal.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    display: block;
}

/* 反馈弹窗头部 */
.feedback-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.feedback-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.feedback-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    line-height: 1;
    padding: 4px;
    touch-action: manipulation;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.feedback-modal-close:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.feedback-modal-close:active {
    transform: scale(0.9);
}

/* 反馈弹窗内容 */
.feedback-modal-content {
    padding: 8px 0 16px;
}

.feedback-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(236, 240, 241, 0.6);
    touch-action: manipulation;
}

.feedback-item:last-child {
    border-bottom: none;
}

.feedback-item:hover {
    background: rgba(52, 152, 219, 0.05);
}

.feedback-item:active {
    background: rgba(52, 152, 219, 0.1);
    transform: scale(0.98);
}

.feedback-icon {
    font-size: 20px;
    margin-right: 16px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.feedback-info {
    flex: 1;
    min-width: 0;
}

.feedback-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.feedback-desc {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.3;
}

.feedback-arrow {
    font-size: 16px;
    color: #bdc3c7;
    margin-left: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.feedback-item:hover .feedback-arrow {
    color: #3498db;
    transform: translateX(2px);
}

/* ==================== 音乐播放功能样式 ==================== */
.music-btn {
    position: fixed;
    bottom: 370px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(241, 196, 15, 0.6);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    border: 1px solid rgba(241, 196, 15, 0.4);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(243, 156, 18, 0.15);
    z-index: 1001;
    transition: all 0.3s ease;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(241, 196, 15, 0.45);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(243, 156, 18, 0.25);
    border-color: rgba(241, 196, 15, 0.6);
}

.music-btn:active {
    transform: scale(0.9);
    background: rgba(241, 196, 15, 0.6);
}

.music-btn.playing {
    background: rgba(46, 204, 113, 0.4);
    border-color: rgba(46, 204, 113, 0.4);
    animation: musicPulse 2s infinite;
}

@keyframes musicPulse {
    0% {
        box-shadow: 0 2px 12px rgba(46, 204, 113, 0.15);
    }

    50% {
        box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
    }

    100% {
        box-shadow: 0 2px 12px rgba(46, 204, 113, 0.15);
    }
}

/* 音乐弹窗背景遮罩 */
.music-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2599;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

.music-backdrop.visible {
    opacity: 1;
    visibility: visible;
    display: block;
}

/* 音乐弹窗主体 */
.music-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 2600;
    width: 420px;
    max-width: 95vw;
    max-height: 90vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
    overflow-y: auto;
}

.music-modal.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    display: block;
}

/* 音乐弹窗头部 */
.music-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(243, 156, 18, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.music-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.music-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    line-height: 1;
    padding: 4px;
    touch-action: manipulation;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.music-modal-close:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.music-modal-close:active {
    transform: scale(0.9);
}

/* 音乐弹窗内容 */
.music-modal-content {
    padding: 20px 24px;
}

/* 当前歌曲信息 */
.current-song-info {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(236, 240, 241, 0.6);
    margin-bottom: 20px;
}

.song-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.song-artist {
    font-size: 14px;
    color: #7f8c8d;
}

/* 音乐播放控制 */
.music-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.music-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
    font-size: 16px;
    touch-action: manipulation;
}

.music-control-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.music-control-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(243, 156, 18, 0.4);
}

.music-play-btn {
    width: 56px;
    height: 56px;
    font-size: 20px;
}

.music-control-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 音乐进度条 */
.music-progress-container {
    margin-bottom: 20px;
}

.music-progress-bar {
    width: 100%;
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 8px;
}

.music-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    width: 0%;
    transition: width 0.1s ease;
}

.music-time-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7f8c8d;
}

/* 音量控制 */
.music-volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(243, 156, 18, 0.05);
    border-radius: 8px;
}

.volume-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.volume-slider {
    flex: 1;
    height: 4px;
    background: #ecf0f1;
    outline: none;
    border-radius: 2px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f39c12;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.3);
    border: 2px solid #ffffff;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #e67e22;
    transform: scale(1.1);
}

.volume-value {
    font-size: 12px;
    color: #2c3e50;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

/* 播放列表 */
.music-playlist {
    margin-bottom: 20px;
}

.music-playlist h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.playlist-items {
    max-height: 200px;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.playlist-item:hover {
    background: rgba(243, 156, 18, 0.1);
}

.playlist-item.active {
    background: rgba(243, 156, 18, 0.15);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.playlist-item-info {
    flex: 1;
}

.playlist-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.playlist-item-artist {
    font-size: 12px;
    color: #7f8c8d;
}

.playlist-item-duration {
    font-size: 12px;
    color: #95a5a6;
    font-weight: 500;
}

/* 本地音乐上传 */
.music-upload-section h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.upload-area {
    text-align: center;
    padding: 20px;
    border: 2px dashed rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    background: rgba(243, 156, 18, 0.05);
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.upload-btn:active {
    transform: scale(0.98);
}

.upload-hint {
    font-size: 12px;
    color: #7f8c8d;
    margin: 0;
}


.animation-control input[type="range"] {
    width: 120px;
    height: 6px;
    background: #ecf0f1;
    outline: none;
    border-radius: 3px;
    cursor: pointer;
    -webkit-appearance: none;
}

.animation-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
    transition: all 0.2s ease;
}

.animation-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.5);
}

/* 镜头速度滑块特殊样式 */
#camera-speed-slider {
    background: linear-gradient(to right,
            #e74c3c 0%, #e74c3c 25%,
            /* 快速 - 红色 */
            #f39c12 25%, #f39c12 50%,
            /* 正常 - 橙色 */
            #3498db 50%, #3498db 75%,
            /* 慢速 - 蓝色 */
            #9b59b6 75%, #9b59b6 100%
            /* 极慢 - 紫色 */
        );
    height: 8px;
    border-radius: 4px;
}

#camera-speed-slider::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border: 3px solid #2c3e50;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.4);
}

#camera-speed-slider::-webkit-slider-thumb:hover {
    background: #ecf0f1;
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(44, 62, 80, 0.6);
}

#camera-speed-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(44, 62, 80, 0.6);
}

.animation-control .value-display {
    color: #2c3e50;
    font-weight: bold;
    font-size: 11px;
    min-width: 45px;
    text-align: right;
    background: rgba(52, 152, 219, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.2s ease;
}

/* 镜头速度显示特殊样式 */
#camera-speed-display {
    background: rgba(44, 62, 80, 0.1);
    border-color: rgba(44, 62, 80, 0.2);
    color: #2c3e50;
    font-weight: 600;
}


/*  诗句动画样式  */
.poetry-message {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;

    font-family: 'KaiTi', '楷体', 'STKaiti', '华文楷体', 'Times New Roman', serif !important;

    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;

    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.6s ease-in-out,
        filter 0.8s ease-out !important;
}




/* ==================== 响应式媒体查询 ==================== */

/* 移动端样式 (≤768px) */
@media (max-width: 768px) {

    .event-item {
        padding: 12px;
        margin: 8px 0;
        border-radius: 8px;
        position: relative;
    }

    .event-item::before {
        right: 16px;
    }

    .event-item:active {
        background: rgba(52, 152, 219, 0.15) !important;
        transform: translateX(2px) scale(0.98);
    }

    /* 基础布局 */
    .custom-select-wrapper {
        display: none;
    }

    /* 地图高度动态调整 */
    #map.panel-hidden {
        height: 100vh;
    }

    #map.panel-visible {
        height: calc(100vh - 240px);
    }

    /* 隐藏PC端元素 */
    #stats-panel,
    #stats-hover-area {
        display: none;
    }

    /* 显示移动端元素 */
    .toggle-panel-btn {
        display: flex;
    }

    .current-event-section {
        display: block;
    }

    /* 浮动按钮组 */
    .feedback-btn {
        bottom: 310px;
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .music-btn {
        bottom: 370px;
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    /* 弹窗样式 */
    .feedback-modal,
    .music-modal {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-width: none;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        max-height: 80vh;
    }

    .feedback-modal.visible,
    .music-modal.visible {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* 弹窗头部样式统一 */
    .feedback-modal-header,
    .music-modal-header {
        padding: 24px 20px 16px;
    }

    .feedback-modal-header h3,
    .music-modal-header h3 {
        font-size: 16px;
        text-align: center;
        flex: 1;
    }

    .feedback-modal-close,
    .music-modal-close {
        top: 20px;
        right: 16px;
        min-width: 44px;
        min-height: 44px;
        font-size: 24px;
    }

    /* 弹窗内容样式 */
    .feedback-modal-content,
    .music-modal-content {
        padding: 16px 20px;
    }

    .feedback-item {
        padding: 20px 24px;
    }

    .feedback-icon {
        font-size: 22px;
        margin-right: 16px;
        width: 30px;
    }

    .feedback-title {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .feedback-desc {
        font-size: 13px;
    }

    .feedback-arrow {
        font-size: 18px;
    }

    /* 音乐播放控制移动端样式 */
    .music-controls {
        gap: 16px;
    }

    .music-control-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .music-play-btn {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }

    .playlist-items {
        max-height: 150px;
    }

    .playlist-item {
        padding: 10px;
    }

    .playlist-item-title {
        font-size: 13px;
    }

    .playlist-item-artist {
        font-size: 11px;
    }

    .upload-area {
        padding: 16px;
    }

    .upload-btn {
        padding: 12px 24px;
    }

    /* 时间轴控制移动端样式 */
    #timeline-control {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(20px);
        padding: 15px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        max-height: 275px;
        min-width: auto;
        width: 100%;
        border-radius: 0;
        transform: none;
        transition: transform 0.3s ease, background 0.8s ease;
    }


    #timeline-control.music-playing {
        background: rgba(200, 16, 46, 0.2);
    }

    #timeline-control.hidden {
        transform: translateY(100%);
    }

    .timeline-info,
    .current-event-details {
        display: none;
    }

    /* 播放控制移动端样式 */
    .player-controls {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0;
        background: transparent;
        border: none;
    }

    .player-controls-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 30px;
    }

    .player-buttons {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    .player-btn {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }

    /* 进度条移动端样式 */
    .progress-section {
        flex: none;
        width: 100%;
    }

    .progress-container {
        height: 40px;
        padding: 8px 0;
        display: flex;
        align-items: center;
    }

    #timeline-slider {
        height: 16px;
        border-radius: 8px;
        width: 100%;
    }

    #timeline-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    .progress-details {
        display: none;
    }

    /* 速度控制移动端显示 */
    .player-speed {
        display: none;
    }

    .speed-control {
        display: flex;
    }

    /* 详细信息面板移动端样式 */
    .location-detail-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(15px);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
        font-family: "Microsoft YaHei", Arial, sans-serif;
        z-index: 2000;
        max-height: 70vh;
        max-width: none;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        border-top: 1px solid rgba(52, 152, 219, 0.3);
        display: block;
        will-change: transform;
    }

    .location-detail-panel.visible {
        transform: translateY(0);
    }

    .location-detail-panel.dragging {
        will-change: transform;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
    }

    .panel-backdrop {
        display: block;
        z-index: 1999;
    }

    .panel-backdrop.visible {
        opacity: 1;
        visibility: visible;
        display: block;
    }

    .panel-backdrop.dragging {
        will-change: opacity;
    }

    /* 移动端拖拽指示器显示 */
    .panel-drag-handle {
        display: block;
        width: 40px;
        height: 4px;
        background: #bdc3c7;
        border-radius: 2px;
        margin: 0 auto 12px;
        cursor: grab;
        transition: all 0.25s ease;
        position: relative;
        z-index: 10;
    }

    .panel-drag-handle:active,
    .panel-drag-handle.dragging {
        cursor: grabbing;
        background: #7f8c8d;
        width: 60px;
        height: 5px;
        transform: scaleY(1.2);
        box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
    }

    /* 面板头部拖拽优化 */
    .panel-header {
        padding: 16px 20px 12px;
        border-radius: 16px 16px 0 0;
        position: relative;
        cursor: grab;
        touch-action: pan-y;
        padding-top: 20px;
        user-select: none;
        transition: background-color 0.2s ease;
    }

    .panel-header.dragging {
        cursor: grabbing;
        background-color: rgba(52, 152, 219, 0.03);
    }

    .panel-header h3,
    .panel-header .visit-summary {
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .panel-header.dragging h3,
    .panel-header.dragging .visit-summary {
        opacity: 0.8;
    }

    .panel-header h3 {
        font-size: 16px;
    }

    .panel-header .visit-summary {
        font-size: 12px;
    }

    /* 关闭按钮移动端 */
    .panel-close {
        top: 12px;
        right: 16px;
        font-size: 24px;
        min-width: 44px;
        min-height: 44px;
        z-index: 30;
        pointer-events: auto;
        transition: all 0.2s ease;
    }

    .panel-close:active {
        transform: scale(0.9);
        background-color: rgba(231, 76, 60, 0.1);
        border-radius: 50%;
    }

    /* 移动端面板内容 */
    .panel-content {
        padding: 12px 16px;
        max-height: calc(70vh - 100px);
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        overscroll-behavior: contain;
    }

    .event-item {
        margin: 8px 0;
        padding: 12px;
        border-radius: 8px;
        /* background: #ffffff; */
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .event-date-item {
        font-size: 13px;
    }

    .event-description {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .event-age {
        font-size: 11px;
    }

    /* 移动端地图标记尺寸 */
    .location-marker.visits-1 {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }

    .location-marker.visits-2 {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }

    .location-marker.visits-3 {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .location-marker.visits-4-plus {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

/* 超小屏幕优化 (≤360px) */
@media (max-width: 360px) {

    /* 时间轴控制 */
    #timeline-control {
        padding: 12px;
    }

    .player-btn {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }

    /* 当前事件信息 */
    .event-title-mobile {
        font-size: 12px;
    }

    .progress-info-mobile {
        font-size: 10px;
        gap: 6px;
    }

    .info-item {
        gap: 3px;
    }

    /* 浮动按钮位置 */
    .toggle-panel-btn {
        bottom: 245px;
    }

    .feedback-btn {
        bottom: 305px;
    }

    .music-btn {
        bottom: 365px;
    }

    /* 音乐播放控制 */
    .music-modal-content {
        padding: 12px 16px;
    }

    .music-controls {
        gap: 12px;
    }

    .music-control-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .music-play-btn {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
}

/* 横屏手机优化 (依然有问题，暂时忽略)*/
@media (max-height: 500px) and (orientation: landscape) and (max-width: 768px) {

    /* 地图高度 */
    #map.panel-visible {
        height: calc(100vh - 140px);
    }

    /* 时间轴控制 */
    #timeline-control {
        max-height: 140px;
        padding: 10px;
    }

    .current-event-section {
        padding: 8px;
        margin-bottom: 8px;
    }

    /* 详细信息面板 */
    .location-detail-panel {
        max-height: 60vh;
    }

    /* 浮动按钮位置 */
    .toggle-panel-btn {
        bottom: 145px;
    }

    .feedback-btn {
        bottom: 205px;
    }

    .music-btn {
        bottom: 155px;
    }

    /* 音乐播放控制 */
    .music-modal {
        max-height: 85vh;
    }

    .playlist-items {
        max-height: 120px;
    }
}

/* 桌面端样式 (≥769px) */
@media (min-width: 769px) {

    /* 隐藏移动端元素 */
    .toggle-panel-btn {
        display: none !important;
    }

    .speed-control {
        display: none;
    }

    .current-event-section {
        display: none !important;
    }

    .panel-backdrop {
        display: none;
    }

    .panel-drag-handle {
        display: none;
    }

    /* 显示桌面端元素 */
    .player-speed {
        display: flex;
    }

    .progress-details {
        display: flex;
    }

    /* 浮动按钮位置 */
    .feedback-btn {
        bottom: 20px;
    }

    .music-btn {
        bottom: 80px;
    }

    /* 面板样式重置 */
    .panel-header {
        cursor: default;
        touch-action: auto;
    }

    .player-controls-row {
        display: contents;
    }

    .player-controls {
        flex-direction: row;
        gap: 20px;
        padding: 12px 16px;
        background: rgba(52, 152, 219, 0.05);
        border-radius: 12px;
        border: 1px solid rgba(52, 152, 219, 0.1);
    }

    /* 弹窗样式 - 居中显示 */
    .feedback-modal,
    .music-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        width: 400px;
        max-width: 95vw;
        border-radius: 16px;
        max-height: 90vh;
    }

    .music-modal {
        width: 420px;
    }

    .feedback-modal.visible,
    .music-modal.visible {
        transform: translate(-50%, -50%) scale(1);
    }

    /* 弹窗头部样式 */
    .feedback-modal-header,
    .music-modal-header {
        padding: 20px 24px 16px;
    }

    .feedback-modal-header h3,
    .music-modal-header h3 {
        font-size: 18px;
        text-align: left;
    }

    .feedback-modal-close,
    .music-modal-close {
        top: 16px;
        right: 20px;
        min-width: 32px;
        min-height: 32px;
        font-size: 24px;
    }

    /* 弹窗内容样式 */
    .feedback-modal-content,
    .music-modal-content {
        padding: 20px 24px;
    }

    .feedback-item {
        padding: 16px 24px;
    }

    .feedback-icon {
        font-size: 20px;
        width: 28px;
    }

    .feedback-title {
        font-size: 15px;
    }

    .feedback-desc {
        font-size: 12px;
    }

    .feedback-arrow {
        font-size: 16px;
    }

    /* 当前事件详情优化 */
    .current-event-details .event-title {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 200px;
    }
}

/* 大屏幕优化 (≥1400px) */
@media (min-width: 1400px) {
    .current-event-details .event-title {
        font-size: 13px;
    }

    .current-event-details {
        gap: 16px;
    }
}