html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block; 
    font-family: 'Microsoft YaHei', -apple-system, sans-serif;
    user-select: none; 
}
.leaflet-container {background-color: #ffffff !important;}

.floating-btn {
    position: fixed;
    left: 20px;
    bottom: 25px;
    z-index: 9999;
    background-color: #b90a7f; 
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 50px; 
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid #444;
    transition: all 0.2s ease;
}

.floating-btn:hover {background-color: #3d3d3d; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);}

.filter-modal {
    position: fixed;
    left: 20px;
    bottom: 85px;
    width: 320px;
    max-height: 75vh;
    background-color: #1e1e1e;
    color: #e0e0e0;
    z-index: 10000;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    overflow: hidden; 
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #252525;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid #333;
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}
.close-btn:hover { color: #ff5252; }

.search-box {padding: 12px 15px; background-color: #1e1e1e; border-bottom: 1px solid #333;}

.search-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    background: #121212; 
    border: 1px solid #444;
    color: white;
    border-radius: 6px;
    outline: none;
    font-size: 13px;
    transition: border-color 0.2s;
}

.search-box input:focus { border-color: #4caf50; }
.search-box input::placeholder { color: #666; }


.marker-list {flex: 1; overflow-y: auto; padding: 15px;}
.marker-list::-webkit-scrollbar { width: 6px; }
.marker-list::-webkit-scrollbar-thumb { background-color: #555; border-radius: 3px; }
.group { margin-bottom: 12px; }

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    background-color: #2a2a2a;
    border-radius: 6px;
    transition: background 0.2s;
}
.group-header:hover { background-color: #333; }
.header-title { font-weight: bold; font-size: 14px; color: #fff; }

.header-actions {display: flex; align-items: center; gap: 12px;}
.toggle-all-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888;
    transition: color 0.2s;
}
.toggle-all-btn:hover { color: #ddd; }
.eye-icon { width: 14px; height: 14px; opacity: 0.8; filter: invert(1); }
.arrow { font-size: 12px; color: #666; transition: transform 0.3s; }
.group.active .arrow { transform: rotate(90deg); }


.group-content { display: none; padding-top: 8px; }
.group.active .group-content { display: block; }



.item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    background: transparent;
    border-left: 3px solid transparent;
    transition: background 0.1s;
}

.item:hover { background: rgba(255,255,255,0.05); }
.item.selected {background: rgba(76, 175, 80, 0.1); border-left: 3px solid #4caf50;}


.item .icon {
    width: 26px; 
    height: 26px; 
    background: #444; 
    border-radius: 6px; 
    text-align: center; 
    line-height: 26px; 
    margin-right: 12px; 
    font-size: 12px;
    font-weight: bold;
    color: #aaa;
}
.item.selected .icon {background: #4caf50; color: #fff;}

.item .name { flex: 1; font-size: 13px; color: #ccc; }
.item.selected .name { color: #fff; }

.item .count { font-size: 12px; color: #666; }


.left-bottom-controls {
    position: fixed;
    margin-bottom: 60px;
    left: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column; 
    gap: 8px; 
    z-index: 9999;
}

.control-btn {
    background-color: rgba(90, 95, 100, 0.85); 
    color: #ffffff;
    border: 1px solid #777;
    padding: 10px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
}

.control-btn:hover {background-color: rgba(120, 125, 130, 1); color: #fff;}

.map-modal {left: 20px; right: auto; bottom: 130px; width: 280px;}


.map-item {
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    color: #ddd;
    font-size: 14px;
    transition: background 0.2s;
    border-radius: 4px;
    margin-bottom: 4px;
}

.map-item:hover {background-color: #333; color: #fff;}

.map-item.active {
    background-color: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    font-weight: bold;
    border-left: 3px solid #4caf50;
}


.map-group {margin-bottom: 4px;}
.map-group-header {
    padding: 12px 15px;
    background-color: #2a2a2a; 
    border-radius: 4px;
    cursor: pointer;
    color: #ddd;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    user-select: none;
}
.map-group-header:hover {background-color: #383838; color: #fff;}
.map-group-header .arrow {font-size: 12px; color: #888; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);}
.map-group.expanded .map-group-header .arrow {transform: rotate(90deg);}
.map-group-children {display: none; padding-left: 15px; padding-top: 4px;}
.map-group.expanded .map-group-children {display: block;}
.map-group-children .map-item {background-color: rgba(0, 0, 0, 0.15); border-bottom: 1px solid #222; padding: 10px 15px;}
.map-group-children .map-item:hover {background-color: #333;}
.map-group-children .map-item.active {background-color: rgba(76, 175, 80, 0.15);}




.popup-media-scroll {
    max-height: 180px; 
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 10px;
    padding-right: 4px; 
    display: flex;
    flex-direction: column;
    gap: 8px; 
}
.popup-img {width: 100%; border-radius: 4px; cursor: zoom-in; box-shadow: 0 1px 3px rgba(0,0,0,0.2); display: block;}
.popup-media-scroll::-webkit-scrollbar {width: 4px;}
.popup-media-scroll::-webkit-scrollbar-track {background: #f1f1f1; border-radius: 4px;}
.popup-media-scroll::-webkit-scrollbar-thumb {background-color: #bbb; border-radius: 4px;}
.popup-media-scroll::-webkit-scrollbar-thumb:hover {background-color: #888;}


.custom-attribution {
    position: fixed;
    bottom: 0; right: 0;
    z-index: 9998;
    background-color: rgba(255, 255, 255, 0.5); 
    padding: 4px 8px; 
    font-family: "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: #ffffff;
    display: flex;         
    align-items: center;  
    gap: 8px;             
    border-top-left-radius: 6px; 
    pointer-events: auto;
    box-shadow: -1px -1px 4px rgba(0,0,0,0.1); 
}
.attr-logo img {height: 26px; width: auto; display: block;}
.attr-text {display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: 11px; line-height: 1.2;}
.custom-attribution a {color: #B90A7F; text-decoration: none; font-weight: bold; }
.custom-attribution a:hover {text-decoration: underline;}

/* 🌟 侧边栏真实图标样式 */
.sidebar-icon-img {
    width: 26px; 
    height: 26px; 
    object-fit: contain; /* 保证图片按比例缩放，不会被拉伸变形 */
    margin-right: 12px; 
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3)); /* 给图标加点轻微的阴影更好看 */
    transition: all 0.2s ease;
}

/* 选中和未选中时的视觉区别 */
.item:not(.selected) .sidebar-icon-img {
    opacity: 0.4; /* 如果该类别被隐藏了，图标变暗并半透明 */
    filter: grayscale(100%); /* 变成黑白，提示玩家它被关掉了 */
}

.item.selected .sidebar-icon-img {
    opacity: 1;
    filter: none; /* 恢复彩色亮丽状态 */
}