body{
    margin:0;
    padding:0;
    font-family:Microsoft YaHei;
}

#map{
    position:absolute;
    top:0;
    bottom:0;
    width:100%;
}

.info{
    position:absolute;
    top:20px;
    left:20px;
    background:white;
    padding:12px 18px;
    border-radius:10px;
    box-shadow:0 5px 15px rgba(0,0,0,0.15);
    z-index:10;
}

#autoPlayBtn {
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border: none;
    border-radius: 4px;
    background: #4FA3FF;
    color: white;
    font-weight: bold;
    transition: all 0.2s;
}

#autoPlayBtn:hover {
    background: #2F80ED;
}

#openAreaModalBtn {
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border: none;
    border-radius: 4px;
    background: #4FA3FF;
    color: white;
    font-weight: bold;
    transition: all 0.2s;
}

#openAreaModalBtn:hover {
    background: #2F80ED;
}

.mapboxgl-popup-content {
    padding: 4px 6px !important; /* 上下内边距 4px，左右 6px */
    background: rgba(255,255,255,0.8);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.mapboxgl-popup-tip {
    border-top-color: rgba(255,255,255,0.8);
}

#liveTextBar{
    position:absolute;
    bottom:0;
    left:0;
    width:100%;

    display:flex;
    align-items:center;

    box-sizing:border-box;   /* 关键 */

    background:rgba(0,0,0,0.65);
    color:white;

    padding:14px 20px;
    font-size:16px;

    z-index:20;
    backdrop-filter: blur(4px);
}

#liveText{
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    width:80%;          /* 占屏幕80% */
    max-width:1400px;   /* 防止超大屏太夸张 */
    text-align:center;
}

#liveVideoBox{
    position:absolute;
    right:20px;
    bottom:80px;

    width:240px;
    height:135px;

    border-radius:10px;
    overflow:hidden;

    box-shadow:0 5px 20px rgba(0,0,0,0.3);
    background:#000;

    z-index:20;
}

#liveVideo{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* 底部已播放字幕按钮 */
#showCompletedBtn{
    margin-left:auto;
    margin-right:30px;

    cursor:pointer;
    font-size:12px;
    padding:2px 6px;
    border:none;
    border-radius:4px;
    background:#4FA3FF;
    color:white;
    font-weight:bold;
}

#showCompletedBtn:hover {
    background: #2F80ED;
}

/* 已播放字幕容器 */
#completedTextsBox {
    position: absolute; /* 可以浮在底部字幕上方或下方 */
    bottom: 56px; /* 适当抬高，避免覆盖字幕条 */
    left: 0px;
    right: 0px;
    max-height: 150px;
    background: rgba(0,0,0,0.65);
    color: white;
    font-size: 14px;
    overflow-y: auto;
    padding: 16px 24px;
    border-radius: 0px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    display: none; /* 默认隐藏 */
    z-index: 25;
}

/* 滚动条样式美化 */
#completedTextsBox::-webkit-scrollbar {
    width: 6px;
}

#completedTextsBox::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

#completedTextsBox::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

/* 小人群整体轻微走动 */

/* 腿动画 */
.person .leg1,
.person .leg2{
    transform-box: fill-box;
    transform-origin: top;
}

.person .leg1{
    animation: legForward 0.8s infinite ease-in-out;
}

.person .leg2{
    animation: legBack 0.8s infinite ease-in-out;
}

@keyframes legForward{
    0%{transform:rotate(-25deg);}
    50%{transform:rotate(25deg);}
    100%{transform:rotate(-25deg);}
}

@keyframes legBack{
    0%{transform:rotate(25deg);}
    50%{transform:rotate(-25deg);}
    100%{transform:rotate(25deg);}
}

/* 四个人不同步 */
.p1 .leg1{animation-delay:0s;}
.p2 .leg1{animation-delay:0.2s;}
.p3 .leg1{animation-delay:0.4s;}
.p4 .leg1{animation-delay:0.6s;}

.p1 .leg2{animation-delay:0s;}
.p2 .leg2{animation-delay:0.2s;}
.p3 .leg2{animation-delay:0.4s;}
.p4 .leg2{animation-delay:0.6s;}

/* 时间条：当前时间 + 直播时长 */
#timeBar{
    position:absolute;
    top:10px;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    align-items:center;
    gap:10px; /* 左右间距 */
    background:rgba(0,0,0,0.65);
    padding:6px 14px;
    border-radius:6px;
    font-size:14px;
    font-weight:600;
    color:white;
    box-shadow:0 2px 8px rgba(0,0,0,0.15);
    z-index:20;
}

#currentTime, #liveDuration{
    color:white;
}

.timeSeparator{
    color:white;
    font-weight:600;
}

.liveLine{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:4px 0;
    border-bottom:1px solid #eee;
}

.jumpBtn{
    background:#4FA3FF;
    border:none;
    color:white;
    padding:3px 8px;
    border-radius:4px;
    cursor:pointer;
    font-size:12px;
}

.jumpBtn:hover{
    background:#2d8cff;
}

#htmlContainer {
    width: 900px;
    height: 300px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100px;
    border: none;        /* 去掉红色边框 */
    border-radius: 12px; /* 圆角 */
    background: #fff;    /* 白色背景 */
    overflow: hidden;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;        /* 默认隐藏，只有播放 HTML 时显示 */
}

/* 板块弹窗全局样式 */
.areaModalMask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.55);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}
.areaModalBox {
    width: 75%;
    max-width: 900px;
    max-height: 70vh;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.areaTitle {
    font-size: 18px;
    font-weight: bold;
    color: #111;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dddddd;
}
.districtWrap {
    margin-bottom: 20px;
}
.districtName {
    font-size: 15px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 10px;
}
.blockList {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}
.blockItem {
    padding: 6px 13px;
    background: #e8f3ff;
    color: #0969cc;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid #c9e1ff;
    transition: 0.2s all;
}
.blockItem:hover {
    background: #4FA3FF;
    color: #ffffff;
    border-color: #4FA3FF;
}
/* 滚动条美化 */
.areaModalBox::-webkit-scrollbar {
    width: 7px;
}
.areaModalBox::-webkit-scrollbar-track {
    background: #f5f7fa;
    border-radius: 4px;
}
.areaModalBox::-webkit-scrollbar-thumb {
    background: #b9d7f7;
    border-radius: 4px;
}