/*!
 * 苏轼与徐霞客行迹图 - 样式文件
 * Author: https://github.com/Jaxon1216
 * GitHub: https://github.com/Jaxon1216
 */

/* ==================== 基础样式 ==================== */
* {
    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;
}

/* ==================== 顶部导航栏 - 淡雅中国风 ==================== */
#top-navigation {
    width: 100%;
    height: 70px;
    background: linear-gradient(180deg, #f8f5f0 0%, #f0ebe3 100%);
    border-bottom: 2px solid #d4c5b0;
    box-shadow: 0 2px 12px rgba(123, 104, 82, 0.08), 
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 200;
}

/* 添加装饰性纹理 */
#top-navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image: 
        repeating-linear-gradient(90deg, 
            transparent, 
            transparent 40px, 
            rgba(180, 160, 130, 0.03) 40px, 
            rgba(180, 160, 130, 0.03) 42px
        );
    pointer-events: none;
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 30px;
    max-width: 100%;
    gap: 20px;
}

.nav-title {
    color: #7b6852;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 3px;
    font-family: 'KaiTi', '楷体', 'STKaiti', '华文楷体', serif;
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(123, 104, 82, 0.15);
    position: relative;
    padding: 0 20px;
    white-space: nowrap;
}

/* 标题左右装饰 */
.nav-title::before,
.nav-title::after {
    content: '◆';
    position: absolute;
    color: #b4a082;
    font-size: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.nav-title::before {
    left: 0;
}

.nav-title::after {
    right: 0;
}

.nav-items {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.nav-item {
    padding: 10px 24px;
    color: #7b6852;
    background: linear-gradient(180deg, #ffffff 0%, #f5f0e8 100%);
    border: 1px solid #d4c5b0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    font-family: 'KaiTi', '楷体', 'STKaiti', '华文楷体', serif;
    letter-spacing: 2px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
                0 2px 6px rgba(123, 104, 82, 0.08);
}

/* 古典边角装饰 */
.nav-item::before,
.nav-item::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border: 1px solid #d4c5b0;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.nav-item::before {
    top: 3px;
    left: 3px;
    border-right: none;
    border-bottom: none;
}

.nav-item::after {
    bottom: 3px;
    right: 3px;
    border-left: none;
    border-top: none;
}

.nav-item:hover {
    background: linear-gradient(180deg, #fff9f0 0%, #f5e6d3 100%);
    border-color: #b8a589;
    color: #5d4e3d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1),
                0 4px 12px rgba(123, 104, 82, 0.15);
}

.nav-item:hover::before,
.nav-item:hover::after {
    opacity: 0.8;
    border-color: #b8a589;
}

.nav-item.active {
    background: linear-gradient(180deg, #f5e6d3 0%, #e8d4b8 100%);
    color: #5d4e3d;
    border-color: #b8a589;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6),
                inset 0 2px 8px rgba(123, 104, 82, 0.1),
                0 2px 8px rgba(123, 104, 82, 0.12);
}

.nav-item.active::before,
.nav-item.active::after {
    border-color: #9a8570;
    opacity: 0.7;
}

.nav-item.active:hover {
    background: linear-gradient(180deg, #f8eadb 0%, #ebd9c2 100%);
    transform: none;
}

#container {
    width: 100vw;
    height: calc(100vh - 70px);
    position: relative;
    background: #ffffff;
    display: flex;
}

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

/* ==================== 右侧控制面板 - 淡雅风格 ==================== */
#right-control-panel {
    width: 380px;
    height: 100%;
    background: linear-gradient(180deg, #faf8f5 0%, #f5f0e8 100%);
    backdrop-filter: blur(15px);
    border-left: 2px solid #d4c5b0;
    box-shadow: -4px 0 24px rgba(123, 104, 82, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.control-section {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(180, 160, 130, 0.2);
}

/* 第一行：播放控制按钮 + 播放速度 */
.player-and-speed-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: rgba(180, 160, 130, 0.05);
}

.player-and-speed-section .player-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #b8a589, #9a8570);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(123, 104, 82, 0.2);
    font-size: 16px;
    touch-action: manipulation;
}

.player-and-speed-section .player-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(123, 104, 82, 0.3);
    background: linear-gradient(135deg, #c4b19a, #a89077);
}

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

.player-and-speed-section .player-btn:disabled {
    background: #d4c5b0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

.speed-divider {
    width: 1px;
    height: 40px;
    background: rgba(180, 160, 130, 0.3);
    margin: 0 4px;
}

.speed-control-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.speed-label-compact {
    color: #2c3e50;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.speed-control-compact .custom-select-wrapper {
    min-width: 70px;
}

.speed-control-compact .custom-select {
    min-width: 70px;
}

/* 第二行：事件列表标题 + 时间范围 + 统计icon */
.events-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(180, 160, 130, 0.05);
    border-bottom: 2px solid rgba(180, 160, 130, 0.2);
}

/* 心境分析标题区域（复用事件列表标题风格） */
.mood-header-section {
    padding: 12px 20px;
    background: rgba(180, 160, 130, 0.05);
    border-bottom: 2px solid rgba(180, 160, 130, 0.2);
}

.events-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.section-title-inline {
    margin: 0;
    color: #7b6852;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    font-family: 'KaiTi', '楷体', 'STKaiti', '华文楷体', serif;
    letter-spacing: 1px;
}

.time-range-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(180, 160, 130, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(180, 160, 130, 0.25);
}

.time-range-text {
    color: #7b6852;
    font-size: 11px;
    font-weight: 600;
}

.time-range-separator {
    color: #b4a082;
    font-size: 10px;
}

.stats-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(180, 160, 130, 0.12);
    border: 1px solid rgba(180, 160, 130, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #9a8570;
    flex-shrink: 0;
}

.stats-icon-btn:hover {
    background: rgba(180, 160, 130, 0.2);
    border-color: #b8a589;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(123, 104, 82, 0.15);
}

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

.stats-icon-btn.active {
    background: #b8a589;
    color: white;
    border-color: #b8a589;
}

/* 全局路线按钮样式（方案 A：主色实心按钮，更显眼） */
.full-route-btn {
    background: #b8a589;
    border: 1px solid #9b8565;
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    font-family: 'KaiTi', '楷体', 'STKaiti', '华文楷体', serif;
    letter-spacing: 2px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(123, 104, 82, 0.35);
}

.full-route-btn:hover {
    background: #c7b18a;
    border-color: #b8a589;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(123, 104, 82, 0.45);
}

.full-route-btn:active {
    transform: scale(0.95) translateY(0);
    box-shadow: 0 1px 6px rgba(123, 104, 82, 0.3);
}

/* 第三行：事件列表 */
.events-list-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background: rgba(180, 160, 130, 0.02);
}

.events-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px 0 20px;
    scroll-behavior: smooth;
}

/* 心境分析列表容器，高度随内容自适应 */
.mood-list-section {
    padding: 0;
    background: rgba(180, 160, 130, 0.02);
}

.mood-list-container {
    padding: 12px 20px 12px 20px;
    overflow: visible;
}

/* 心境分析条目（方案二：极简虚线提示框） */
.mood-list-item {
    cursor: default;
    /* 对齐事件标题的文字风格 */
    color: #7b6852;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 500;
    /* 覆盖事件列表的左侧棕色边线等 */
    border-left: none;
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed rgba(184, 165, 137, 0.9);
    box-shadow: none;
    text-align: left; /* 内容文字左对齐 */
    width: 100%;
    box-sizing: border-box;
}

/* 覆盖事件列表的 hover 动画，让心境分析条目悬停时保持静止 */
.mood-list-item:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: none;
    box-shadow: none;
}

/* 确保心境条目不显示事件列表的左侧棕色边线 */
.event-list-item.mood-list-item {
    border-left: none;
}

/* 自定义滚动条样式 */
.events-list-container::-webkit-scrollbar {
    width: 6px;
}

.events-list-container::-webkit-scrollbar-track {
    background: rgba(180, 160, 130, 0.08);
    border-radius: 3px;
}

.events-list-container::-webkit-scrollbar-thumb {
    background: rgba(180, 160, 130, 0.35);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.events-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(180, 160, 130, 0.5);
}

.loading-events {
    text-align: center;
    color: #7f8c8d;
    padding: 40px 20px;
    font-size: 13px;
}

.event-list-item {
    padding: 12px 14px;
    margin-bottom: 8px;
    border-left: 3px solid #b8a589;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.event-list-item:hover {
    background: rgba(180, 160, 130, 0.12);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(123, 104, 82, 0.15);
}

.event-list-item.current {
    background: rgba(232, 212, 184, 0.4);
    border-left-color: #c4704e;
    box-shadow: 0 3px 12px rgba(123, 104, 82, 0.2);
    transform: translateX(5px);
}

.event-list-item.current::after {
    content: '';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c4704e;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-50%) scale(1.3);
    }
}

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

.event-list-date {
    color: #9a8570;
    font-size: 11px;
    font-weight: 600;
    background: rgba(180, 160, 130, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.event-list-location {
    color: #8a7968;
    font-size: 10px;
    background: rgba(180, 160, 130, 0.12);
    padding: 2px 5px;
    border-radius: 3px;
    flex-shrink: 0;
}

.event-list-title {
    color: #5d4e3d;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}

.event-list-item.current .event-list-title {
    font-weight: 600;
    color: #5d4e3d;
}

/* 统计信息弹出层 */
.stats-popup {
    position: absolute;
    top: 122px;
    right: 20px;
    width: 280px;
    background: rgba(250, 248, 245, 0.98);
    backdrop-filter: blur(20px);
    border: 2px solid #d4c5b0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(123, 104, 82, 0.15);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.stats-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.stats-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 2px solid rgba(180, 160, 130, 0.3);
    background: rgba(180, 160, 130, 0.08);
    border-radius: 10px 10px 0 0;
}

.stats-popup-header h4 {
    margin: 0;
    color: #7b6852;
    font-size: 14px;
    font-weight: 600;
    font-family: 'KaiTi', '楷体', 'STKaiti', '华文楷体', serif;
    letter-spacing: 1px;
}

.stats-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #7f8c8d;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

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

.stats-popup-close:active {
    transform: scale(0.9);
}

.stats-popup-content {
    padding: 16px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin: 6px 0;
    background: rgba(180, 160, 130, 0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.stats-item:hover {
    background: rgba(180, 160, 130, 0.15);
    transform: translateX(3px);
}

.stats-label {
    color: #8a7968;
    font-size: 13px;
    font-weight: 500;
}

.stats-value {
    font-weight: 600;
    color: #5d4e3d;
    font-size: 14px;
    background: rgba(180, 160, 130, 0.2);
    padding: 3px 10px;
    border-radius: 6px;
    min-width: 40px;
    text-align: center;
}

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

/* 动画设置面板 */
.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;
    -moz-appearance: none;
    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.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;
    -moz-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);
}

/* 下拉选项容器 - 向上弹出（默认用于PC端时间轴控制） */
.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);
}

/* 右侧控制面板中的下拉框 - 向下弹出 */
#right-control-panel .select-dropdown {
    top: 100%;
    bottom: auto;
    border-top: none;
    border-bottom: 1.5px solid #3498db;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 32px rgba(52, 152, 219, 0.2);
    transform: translateY(-8px);
}

#right-control-panel .custom-select.open .select-display {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

#right-control-panel .custom-select.open .select-dropdown {
    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;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.7);
    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: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bdc3c7;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.event-item.current-event::before {
    background: #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 {
    position: relative;
    border-radius: 0;
    border: none;
    box-shadow: none;
    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);
    /* 移除背景图，改用 HTML img 标签 */
    background: transparent;
    overflow: visible !important;
}

/* 确保图钉图片在最上层 (但数字在更上层) */
.pin-img {
    position: relative;
    z-index: 2;
}

/* 数字样式 */
.visit-count {
    position: absolute;
    z-index: 3;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    line-height: 1;
    pointer-events: none;
    display: none;
}

/* 根据访问次数的标记尺寸 - 同步放大 */
.location-marker.visits-1 {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.location-marker.visits-2 {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.location-marker.visits-3 {
    width: 42px;
    height: 42px;
    font-size: 14px;
}

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

/* 事件类型 class 保留以便未来扩展，但不再改变底图颜色（统一用 marker.green.png） */
/* .marker-birth {} */
/* .marker-international {} */
/* .marker-long-distance {} */
/* .marker-short-distance {} */
/* .marker-activity {} */
/* .marker-mixed {} */
/* .marker-transit {} */
/* .marker-movement {} */

.location-marker.current {
    z-index: 1000;
}

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

/* 当前事件的红色呼吸灯 - 波纹扩散效果 */
.breath-highlight-wrapper {
    pointer-events: none;
    /* 降低层级，确保在标记点和其他覆盖物下方 */
    z-index: -1;
}

.ripple-container {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

.ripple-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px; /* 居中对齐 */
    border-radius: 50%;
    /* 清晰的圆环边框 */
    border: 2px solid rgba(255, 50, 50, 0.9);
    /* 半透明填充 */
    background: rgba(255, 50, 50, 0.15);
    /* 柔和的外发光 */
    box-shadow: 0 0 10px 2px rgba(255, 0, 0, 0.4),
                inset 0 0 5px 1px rgba(255, 100, 100, 0.3);
    opacity: 0;
    transform: scale(0);
    animation: ripple-expand 2s ease-out infinite;
}

/* 第二个波纹延迟 0.6s */
.ripple-wave-2 {
    animation-delay: 0.6s;
}

/* 第三个波纹延迟 1.2s */
.ripple-wave-3 {
    animation-delay: 1.2s;
}

@keyframes ripple-expand {
    0% {
        opacity: 0;
        transform: scale(0.5);
        border-width: 4px;
    }
    10% {
        opacity: 1;
        transform: scale(0.8);
        border-width: 2.5px;
    }
    50% {
        opacity: 0.8;
        transform: scale(1.5);
        border-width: 1.3px;
    }
    80% {
        opacity: 0.5;
        transform: scale(2.5);
        border-width: 0.8px;
    }
    100% {
        opacity: 0;
        transform: scale(3);
        border-width: 0.67px;
    }
}

/* ==================== 呼吸灯新样式 (HTML结构版) ==================== */

/* 1. 扩散的波纹动画 (外圈) */
.breath-wave {
    position: absolute;
    z-index: 0; /* 最底层 */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* 红色边框 */
    border: 2px solid rgba(231, 76, 60, 0.8);
    /* 内部填充淡红 */
    background: rgba(231, 76, 60, 0.1);
    /* 强制底边居中定位 */
    left: 50%;
    top: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    
    /* 动画：从小到大扩散 */
    animation: ripple-new 2s ease-out infinite;
}

/* 2. 中心固定的实心红圈 (内圈) */
.breath-center {
    position: absolute;
    z-index: 1; /* 在波纹之上，但在图钉之下 */
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e74c3c; /* 实心红 */
    box-shadow: 0 0 4px rgba(192, 57, 43, 0.6);
    
    /* 强制底边居中定位 */
    left: 50%;
    top: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* 废弃旧的伪元素写法 */
/* .location-marker.current::before { ... } */
/* .location-marker.current::after { ... } */

/* 新的波纹动画 */
@keyframes ripple-new {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 1;
        border-width: 3px;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
        border-width: 0px;
    }
}

/* ==================== 加载和错误状态 ==================== */
#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;
}

/* 镜头速度滑块特殊样式 */
#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;
}

/* ==================== 图层切换控件样式 ==================== */
.leaflet-control-layers {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(52, 152, 219, 0.25) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
    padding: 8px 10px !important;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    min-width: 100px;
}

.leaflet-control-layers-base {
    margin-bottom: 0;
}

.leaflet-control-layers-base label {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #2c3e50;
    font-weight: 500;
    position: relative;
}

.leaflet-control-layers-base label:hover {
    background: rgba(52, 152, 219, 0.08);
}

.leaflet-control-layers-base label:active {
    transform: scale(0.98);
}

.leaflet-control-layers-base input[type="radio"] {
    margin-right: 6px;
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: #3498db;
    flex-shrink: 0;
}

.leaflet-control-layers-base label span {
    flex: 1;
    user-select: none;
}

/* 选中状态的标签样式 */
.leaflet-control-layers-base input[type="radio"]:checked + span {
    color: #3498db;
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 导航栏移动端适配 */
    #top-navigation {
        height: auto;
        min-height: 60px;
        padding: 8px 0;
    }

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 8px 15px;
    }

    .nav-title {
        font-size: 18px;
        letter-spacing: 2px;
        padding: 0 15px;
    }

    .nav-items {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .nav-item {
        padding: 8px 16px;
        font-size: 13px;
        letter-spacing: 1px;
    }

    #container {
        height: auto;
        min-height: calc(100vh - 80px);
    }

    /* 城市标签移动端适配 */
    .city-label-tooltip {
        font-size: 10px;
        padding: 2px 2px;
        letter-spacing: 0.5px;
    }

    .leaflet-control-layers {
        padding: 6px 8px !important;
        min-width: 90px;
    }
    
    .leaflet-control-layers-base label {
        padding: 5px 6px;
        font-size: 11px;
    }
    
    .leaflet-control-layers-base input[type="radio"] {
        width: 13px;
        height: 13px;
        margin-right: 5px;
    }
}

/* ==================== 页面底部版权信息 ==================== */
.site-footer {
    position: fixed;
    left: 0;
    right: 380px; /* 与右侧控制面板宽度一致，避免覆盖面板底部 */
    bottom: 0;
    z-index: 3000;
    font-size: 11px;
    color: #7b6852;
    text-align: left;
    padding: 6px 18px;
    background: linear-gradient(180deg, #f8f5f0ee 0%, #f0ebe3ee 100%);
    border-top: 1px solid #d4c5b0;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    box-shadow: 0 -2px 8px rgba(123, 104, 82, 0.12);
    pointer-events: none;
}

/* ==================== 城市名称标签样式 - 淡雅风格 ==================== */
.city-label-tooltip {
    background: rgba(250, 248, 245, 0.95);
    border: 1px solid rgba(180, 160, 130, 0.4);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(123, 104, 82, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: #7b6852;
    font-size: 10px;
    font-weight: 400;
    font-family: 'KaiTi', '楷体', 'STKaiti', '华文楷体', serif;
    letter-spacing: 1px;
    padding: 2px 2px;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.city-label-tooltip::before {
    border-right-color: rgba(180, 160, 130, 0.4);
}

/* 移除默认的 tooltip 箭头边框 */
.leaflet-tooltip-left.city-label-tooltip::before {
    display: none;
}

.leaflet-tooltip-right.city-label-tooltip::before {
    display: none;
}

/* 当前事件的标签突出显示 */
.location-marker.current + .city-label-tooltip {
    background: linear-gradient(135deg, rgba(245, 230, 211, 0.98) 0%, rgba(232, 212, 184, 0.98) 100%);
    border-color: rgba(196, 112, 78, 0.5);
    color: #c4704e;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(196, 112, 78, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ==================== 当前事件Popup样式 ==================== */
.current-event-popup .leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #c0392b;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(192, 57, 43, 0.25);
    padding: 0;
    min-width: 200px;
    max-width: 300px;
}

.current-event-popup .leaflet-popup-content {
    margin: 6px 7px;
    line-height: 1.6;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

.current-event-popup .leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #c0392b;
    border-top: none;
    border-right: none;
}

/* ==================== 引导弹窗样式 ==================== */
.intro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.intro-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.intro-content {
    background: linear-gradient(135deg, #fffcf5 0%, #f5e6d3 100%);
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    padding: 40px;
    text-align: center;
    position: relative;
    border: 1px solid #d4c4a8;
}

.intro-header h2 {
    color: #8b4513;
    margin-bottom: 10px;
    font-size: 2rem;
    font-family: "KaiTi", "楷体", "STKaiti", serif;
}

.intro-subtitle {
    color: #5d4037;
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: bold;
    letter-spacing: 2px;
}

.intro-theme-text {
    background-color: rgba(139, 69, 19, 0.05);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #8b4513;
    text-align: left;
}

.intro-theme-text p {
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
}

.intro-guide h3 {
    margin-bottom: 20px;
    color: #666;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.guide-steps {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 30px;
}

.step {
    flex: 1;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.step-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.step p {
    font-size: 0.9rem;
    color: #666;
}

.start-btn {
    background-color: #8b4513;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.start-btn:hover {
    background-color: #a0522d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

/* 导航栏帮助按钮样式 */
.nav-help-btn {
    background: transparent;
    border: 1px solid #b8a589;
    color: #7b6852;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    margin-left: 10px;
    font-family: 'KaiTi', '楷体', 'STKaiti', serif;
}

.nav-help-btn:hover {
    background: rgba(184, 165, 137, 0.2);
    border-color: #8b4513;
    color: #5d4037;
}
