/**
 * 节日装点主题模块样式
 * @version 1.3
 */

/* 灯笼容器 */
.festival-deng-box1 {
    position: fixed;
    top: -40px;
    right: -20px;
    z-index: 9999;
    pointer-events: none;
}

.festival-deng-box2 {
    position: fixed;
    top: -30px;
    right: 10px;
    z-index: 9999;
    pointer-events: none;
}

.festival-deng-box3 {
    position: fixed;
    top: -40px;
    left: -20px;
    z-index: 9999;
    pointer-events: none;
}

.festival-deng-box4 {
    position: fixed;
    top: -30px;
    left: 10px;
    z-index: 9999;
    pointer-events: none;
}

/* 使用更具体的选择器替代 !important */
body .festival-deng-box2 .festival-deng,
body .festival-deng-box4 .festival-deng {
    position: relative;
    width: 120px;
    height: 90px;
    margin: 50px;
    background: #d8000f;
    background: rgba(216, 0, 15, 0.8);
    border-radius: 50% 50%;
    transform-origin: 50% -100px;
    -webkit-transform-origin: 50% -100px;
    animation: festival-swing 5s infinite ease-in-out;
    -webkit-animation: festival-swing 5s infinite ease-in-out;
    box-shadow: -5px 5px 30px 4px rgba(252, 144, 61, 1);
}

body .festival-deng {
    position: relative;
    width: 120px;
    height: 90px;
    margin: 50px;
    background: #d8000f;
    background: rgba(216, 0, 15, 0.8);
    border-radius: 50% 50%;
    transform-origin: 50% -100px;
    -webkit-transform-origin: 50% -100px;
    animation: festival-swing 3s infinite ease-in-out;
    -webkit-animation: festival-swing 3s infinite ease-in-out;
    box-shadow: -5px 5px 50px 4px rgba(250, 108, 0, 1);
}

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

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

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

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

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

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

.festival-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: -webkit-linear-gradient(left, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
    background: -moz-linear-gradient(left, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
    background: -o-linear-gradient(left, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
    background: linear-gradient(to right, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
}

.festival-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: -webkit-linear-gradient(left, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
    background: -moz-linear-gradient(left, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
    background: -o-linear-gradient(left, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
    background: linear-gradient(to right, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
}

.festival-deng-t {
    font-family: "华文行楷", "STXingkai", "KaiTi", "Microsoft YaHei", Arial, sans-serif;
    font-size: 36px;
    color: #dc8f03;
    font-weight: bold;
    line-height: 85px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.festival-deng-t,
.festival-deng-box1,
.festival-deng-box2,
.festival-deng-box3,
.festival-deng-box4 {
    background: transparent;
}

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

@-webkit-keyframes festival-swing {
    0% { -webkit-transform: rotate(-10deg); }
    50% { -webkit-transform: rotate(10deg); }
    100% { -webkit-transform: rotate(-10deg); }
}

/* 梅花树 */
.festival-meiha {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 999;
    width: 350px;
    height: 231px;
    pointer-events: none;
    background: transparent url('../img/mh.png') no-repeat right top;
    background-size: contain;
    animation: festival-gradually 3s linear 1;
    -webkit-animation: festival-gradually 3s linear 1;
}

@keyframes festival-gradually {
    0% { opacity: 0.1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

@-webkit-keyframes festival-gradually {
    0% { opacity: 0.1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* 点击文字样式 */
.festival-click-text {
    position: absolute;
    z-index: 999999;
    font-weight: bold;
    color: #ff6651;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
    pointer-events: none;
    transition: all 1.5s ease-out;
}

/* 移动端适配 - 改进版 */
@media (max-width: 768px) {
    .festival-deng-box1,
    .festival-deng-box2,
    .festival-deng-box3,
    .festival-deng-box4 {
        transform: scale(0.7);
    }
    
    .festival-meiha {
        width: 250px;
        height: 165px;
    }
    
    .festival-deng-t {
        font-size: 28px;
        line-height: 70px;
    }
}

/* 小屏幕隐藏部分特效避免遮挡 */
@media (max-width: 480px) {
    .festival-deng-box1,
    .festival-deng-box3 {
        display: none; /* 隐藏上方的灯笼 */
    }
    
    .festival-deng-box2,
    .festival-deng-box4 {
        transform: scale(0.5); /* 进一步缩小下方的灯笼 */
    }
    
    .festival-meiha {
        width: 150px;
        height: 99px;
        opacity: 0.7; /* 降低梅花透明度 */
    }
}

/* 确保画布正确显示 */
.festival-firework-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
}