/* 通用重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 灯笼容器基础样式 - 确保层级和点击穿透 */
.deng-box, .deng-box1, .deng-box-left, .deng-box2-left {
    position: fixed;
    z-index: 999; /* 确保可见 */
    pointer-events: none; /* 核心：不遮挡下方元素点击 */
}

/* 桌面端布局 - 左右灯笼紧贴各自边框 */
/* 右侧灯笼1 - 快：紧贴右侧边框 */
.deng-box {
    top: -40px;
    right: 10px; /* 大幅缩短：从85px→10px，贴近右侧边框 */
}
/* 右侧灯笼2 - 乐：在第一个灯笼左侧，仍贴右侧区域 */
.deng-box1 {
    top: -30px;
    right: 70px; /* 从180px→70px，与第一个灯笼间距紧凑，不向中间靠 */
}
/* 左侧灯笼1 - 春：紧贴左侧边框 */
.deng-box-left {
    top: -40px;
    left: 10px; /* 从85px→10px，贴近左侧边框 */
}
/* 左侧灯笼2 - 节：在第一个灯笼右侧，仍贴左侧区域 */
.deng-box2-left {
    top: -30px;
    left: 70px; /* 从180px→70px，与第一个灯笼间距紧凑 */
}

/* 灯笼核心样式 */
.deng {
    position: relative;
    width: 120px;
    height: 90px;
    margin: 50px 0; /* 移除左右margin，避免额外偏移 */
    background: #d8000f;
    background: rgba(216, 0, 15, 0.8);
    border-radius: 50% 50%;
    transform-origin: 50% -100px;
    animation: swing 3s infinite ease-in-out;
    box-shadow: -5px 5px 50px 4px rgba(250, 108, 0, 1);
    pointer-events: none; /* 点击穿透 */
}

/* 左侧灯笼动画区分 */
.deng-left {
    animation: swing 4s infinite ease-in-out;
    box-shadow: 5px 5px 30px 4px rgba(252, 144, 61, 1);
}

.deng-a {
    width: 100px;
    height: 90px;
    background: #d8000f;
    background: rgba(216, 0, 15, 0.1);
    margin: 12px 8px 8px 8px;
    border-radius: 50% 50%;
    border: 2px solid #dc8f03;
    pointer-events: none;
}

.deng-b {
    width: 45px;
    height: 90px;
    background: #d8000f;
    background: rgba(216, 0, 15, 0.1);
    margin: -4px 8px 8px 26px;
    border-radius: 50% 50%;
    border: 2px solid #dc8f03;
    pointer-events: none;
}

.xian {
    position: absolute;
    top: -20px;
    left: 60px;
    width: 2px;
    height: 20px;
    background: #dc8f03;
    pointer-events: none;
}

.shui-a {
    position: relative;
    width: 5px;
    height: 20px;
    margin: -5px 0 0 59px;
    animation: swing 4s infinite ease-in-out;
    transform-origin: 50% -45px;
    background: #ffa500;
    border-radius: 0 0 5px 5px;
    pointer-events: none;
}

.shui-a-left {
    animation: swing 5s infinite ease-in-out;
}

.shui-b {
    position: absolute;
    top: 14px;
    left: -2px;
    width: 10px;
    height: 10px;
    background: #dc8f03;
    border-radius: 50%;
    pointer-events: none;
}

.shui-c {
    position: absolute;
    top: 18px;
    left: -2px;
    width: 10px;
    height: 35px;
    background: #ffa500;
    border-radius: 0 0 0 5px;
    pointer-events: none;
}

.deng:before {
    position: absolute;
    top: -7px;
    left: 29px;
    height: 12px;
    width: 60px;
    content: " ";
    display: block;
    z-index: 999;
    border-radius: 5px 5px 0 0;
    border: solid 1px #dc8f03;
    background: #ffa500;
    background: linear-gradient(to right, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
    pointer-events: none;
}

.deng:after {
    position: absolute;
    bottom: -7px;
    left: 10px;
    height: 12px;
    width: 60px;
    content: " ";
    display: block;
    margin-left: 20px;
    border-radius: 0 0 5px 5px;
    border: solid 1px #dc8f03;
    background: #ffa500;
    background: linear-gradient(to right, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
    pointer-events: none;
}

.deng-t {
    font-family: 华文行楷,Arial,Lucida Grande,Tahoma,sans-serif;
    font-size: 3.2rem;
    color: #dc8f03;
    font-weight: bold;
    line-height: 85px;
    text-align: center;
    pointer-events: none;
}

.night .deng-t,
.night .deng-box,
.night .deng-box1,
.night .deng-box-left,
.night .deng-box2-left {
    background: transparent !important;
}

/* 摆动动画 */
@keyframes swing {
    0% {
        transform: rotate(-10deg)
    }
    50% {
        transform: rotate(10deg)
    }
    100% {
        transform: rotate(-10deg)
    }
}

/* ========== 移动端适配（核心） ========== */
@media screen and (max-width: 970px) {
    /* 隐藏左侧所有灯笼 */
    .deng-box-left, .deng-box2-left {
        display: none;
    }

    /* 右侧灯笼1 - 快：紧贴右侧边框 + 向上移动（核心修改） */
    .deng-box {
        right: 0px !important; /* 完全贴右侧边框 */
        top: -70px !important; /* 从-40px→-80px，向上移动40px */
        transform: scale(0.4); 
        transform-origin: right center; /* 缩放基准点不变 */
    }

    /* 右侧灯笼2 - 乐：紧贴右侧 + 同步向上移动 */
    .deng-box1 {
        right: calc(0px + 40px) !important; /* 紧凑间距 */
        top: -60px !important; /* 从-30px→-70px，向上移动40px */
        transform: scale(0.4); 
        transform-origin: right center;
    }

    /* 移动端动画幅度减小，避免超出屏幕 */
    .deng {
        animation: swing 3s infinite ease-in-out;
        transform-origin: 50% -80px; 
    }
}