/**
 * 春节喜庆灯笼样式
 * 参考 Discuz 插件实现
 */

/* ========== 四个灯笼样式 (denglong.htm) ========== */
.xnkl {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 9999;
}

/* 移动端隐藏四个灯笼 */
@media screen and (max-width: 768px) {
    .xnkl {
        display: none;
    }
}

/* 灯笼盒子定位 */
.deng-box01 {
    position: fixed;
    top: -30px;
    left: 10px;
    z-index: 9999;
    pointer-events: none;
}

.deng-box02 {
    position: fixed;
    top: -40px;
    left: 150px;
    z-index: 9999;
    pointer-events: none;
}

.deng-box03 {
    position: fixed;
    top: -40px;
    right: 150px;
    z-index: 9999;
    pointer-events: none;
}

.deng-box04 {
    position: fixed;
    top: -30px;
    right: 10px;
    z-index: 9999;
    pointer-events: none;
}

/* 灯笼主体 */
.deng {
    position: relative;
    width: 120px;
    height: 90px;
    margin: 50px;
    background: rgba(231, 2, 17, 0.8);
    border-radius: 50% 50%;
    transform-origin: 50% -100px;
    animation: swing 3s infinite ease-in-out;
    box-shadow: -5px 5px 50px 4px #fa6c00;
}

/* 外侧灯笼动画较慢 */
.deng-box01 .deng,
.deng-box04 .deng {
    animation: swing 5s infinite ease-in-out;
    box-shadow: -5px 5px 30px 4px #fc903d;
}

/* 灯笼内部装饰 */
.deng-a {
    width: 100px;
    height: 90px;
    background: rgba(216, 0, 15, 0.1);
    margin: 12px 8px 8px 8px;
    border-radius: 50% 50%;
    border: 2px solid #dc8f03;
}

.deng-b {
    width: 45px;
    height: 90px;
    background: rgba(216, 0, 15, 0.1);
    margin: -4px 8px 8px 26px;
    border-radius: 50% 50%;
    border: 2px solid #dc8f03;
}

/* 灯笼绳子 */
.xian {
    position: absolute;
    top: -20px;
    left: 60px;
    width: 2px;
    height: 20px;
    background: #dc8f03;
}

/* 灯笼流苏 */
.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: orange;
    border-radius: 0 0 5px 5px;
}

.shui-b {
    position: absolute;
    top: 14px;
    left: -2px;
    width: 10px;
    height: 10px;
    background: #dc8f03;
    border-radius: 50%;
}

.shui-c {
    position: absolute;
    top: 18px;
    left: -2px;
    width: 10px;
    height: 35px;
    background: orange;
    border-radius: 0 0 0 5px;
}

/* 灯笼顶部装饰 */
.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: orange;
    background: linear-gradient(
        to right,
        #dc8f03,
        orange,
        #dc8f03,
        orange,
        #dc8f03
    );
}

/* 灯笼底部装饰 */
.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: orange;
    background: linear-gradient(
        to right,
        #dc8f03,
        orange,
        #dc8f03,
        orange,
        #dc8f03
    );
}

/* 灯笼文字 */
.deng-t {
    font-family: "Microsoft YaHei", "SimHei", "黑体", Arial, sans-serif;
    font-size: 3.2rem;
    color: #dc8f03;
    font-weight: 700;
    line-height: 85px;
    text-align: center;
}

/* 摇摆动画 */
@keyframes swing {
    0% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
    100% {
        transform: rotate(-10deg);
    }
}

@-webkit-keyframes swing {
    0% {
        -webkit-transform: rotate(-10deg);
    }
    50% {
        -webkit-transform: rotate(10deg);
    }
    100% {
        -webkit-transform: rotate(-10deg);
    }
}


/* ========== 两个灯笼样式 (denglong2.htm) ========== */
.lantern-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 9999;
}

.lantern-modern-left,
.lantern-modern-right {
    position: fixed;
    top: 0;
    z-index: 9999;
    pointer-events: none;
}

.lantern-modern-left {
    left: 50px;
}

.lantern-modern-right {
    right: 50px;
}

.lantern-container {
    width: 150px;
    height: 100px;
    position: relative;
    line-height: 0;
    animation: lantern 5s infinite ease-in-out;
    transform-origin: 50% -100px;
}

.lantern-center {
    position: relative;
    height: 100%;
    background-color: red;
    border-radius: 120px;
    box-shadow: 0 0 80px -10px red;
}

.lantern-line {
    height: 100%;
    text-align: center;
}

.lantern-line:before,
.lantern-line:after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    border: 2px solid #ecaa2f;
    border-radius: 50%;
    transform: translate(-50%, 0);
}

.lantern-line:before {
    width: 75%;
    height: 100%;
}

.lantern-line:after {
    width: 35%;
    height: 100%;
}

.lantern-text-wrap {
    display: inline-block;
    vertical-align: top;
    height: 100%;
}

.lantern-text {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: 700;
    color: #ecaa2f;
    writing-mode: vertical-lr;
    text-align: center;
    letter-spacing: 5px;
    font-family: "Microsoft YaHei", "SimHei", sans-serif;
}

.lantern-top,
.lantern-bottom {
    width: 40%;
    height: 8px;
    background-color: #ecaa2f;
    position: relative;
    z-index: 1;
}

.lantern-top {
    margin: 0 auto -2px;
    border-radius: 5px 5px 0 0;
}

.lantern-bottom {
    margin: -2px auto 0;
    border-radius: 0 0 5px 5px;
}

.lantern-top-rope,
.lantern-bottom-rope {
    width: 4px;
    background-color: #ecaa2f;
    margin: 0 auto;
}

.lantern-top-rope {
    height: 65px;
}

.lantern-bottom-rope {
    position: relative;
    height: 20px;
    animation: lantern 3s infinite ease-in-out;
    transform-origin: 50% -45px;
}

.lantern-bottom-rope:after {
    content: "";
    position: absolute;
    top: 100%;
    left: -4px;
    width: 12px;
    height: 50px;
    background: linear-gradient(
        #f00,
        #e36d00 3px,
        #fbd342 5px,
        #e36d00 8px,
        #e36d00 12px,
        #f00 16px,
        rgba(255, 0, 0, 0.8) 26px,
        rgba(255, 0, 0, 0.6)
    );
    border-radius: 5px 5px 0 0;
}

@keyframes lantern {
    0% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
    100% {
        transform: rotate(-10deg);
    }
}

@-webkit-keyframes lantern {
    0% {
        -webkit-transform: rotate(-10deg);
    }
    50% {
        -webkit-transform: rotate(10deg);
    }
    100% {
        -webkit-transform: rotate(-10deg);
    }
}

/* 两个灯笼移动端适配 */
@media screen and (max-width: 720px) {
    .lantern-modern-left {
        left: 20px;
    }
    .lantern-modern-right {
        right: 20px;
    }
    .lantern-container {
        width: 100px;
        height: 60px;
    }
    .lantern-top-rope {
        width: 3px;
        height: 45px;
    }
    .lantern-center {
        box-shadow: 0 0 40px -10px red;
    }
    .lantern-top,
    .lantern-bottom {
        width: 35%;
        height: 6px;
    }
    .lantern-top {
        margin-bottom: -0.5px;
    }
    .lantern-bottom {
        margin-top: -0.5px;
    }
    .lantern-bottom-rope {
        width: 2px;
    }
    .lantern-bottom-rope:after {
        left: -2px;
        width: 6px;
        height: 25px;
    }
    .lantern-text {
        font-size: 14px;
        letter-spacing: 2px;
    }
}

@media screen and (max-width: 420px) {
    .lantern-modern-left {
        left: 10px;
    }
    .lantern-modern-right {
        right: 10px;
    }
    .lantern-container {
        width: 80px;
        height: 50px;
    }
    .lantern-top-rope {
        width: 3px;
        height: 42px;
    }
    .lantern-center {
        box-shadow: 0 0 40px -10px red;
    }
    .lantern-top,
    .lantern-bottom {
        width: 35%;
        height: 4px;
    }
    .lantern-top {
        margin-bottom: 0;
    }
    .lantern-bottom {
        margin-top: 0;
    }
    .lantern-bottom-rope {
        width: 2px;
    }
    .lantern-bottom-rope:after {
        left: -2px;
        width: 6px;
        height: 25px;
    }
    .lantern-text {
        font-size: 14px;
        letter-spacing: 2px;
    }
    .lantern-line:before,
    .lantern-line:after {
        border-width: 1px;
    }
}
