/*!
 * Wydenglong - 节日横幅 / 倒计时问候 / 特效样式
 * 由插件钩子自动注入，与灯笼样式(denglong.css)配套使用
 */

/* =========================================================
 * 灯笼延迟出现（Banner 开启时先展示 Banner）
 * ========================================================= */
.wydenglong-lanterns {
    opacity: 1;
    visibility: visible;
    transition: opacity .8s ease, visibility .8s ease;
}
.wydenglong-lanterns.wydenglong-pending {
    opacity: 0;
    visibility: hidden;
}

/* =========================================================
 * 特效画布（全屏、不拦截点击）
 * ========================================================= */
#wydenglong-fx {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9998;
    pointer-events: none;
}

/* =========================================================
 * 顶部节日横幅 Banner（优先展示，从上往下拉开）
 * ========================================================= */
.wydenglong-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    height: auto;               /* 高度自适应：由图片比例 / 内容决定 */
    min-height: 220px;          /* 无图时红色喜庆底的最小高度 */
    background: linear-gradient(180deg, #C8102E 0%, #E8402F 45%, #C8102E 100%);
    box-shadow: 0 4px 30px rgba(180, 0, 0, 0.35);
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .7s cubic-bezier(.22, .9, .25, 1), visibility 0s linear .7s;
    overflow: hidden;
    pointer-events: none;
}
.wydenglong-banner-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform .7s cubic-bezier(.22, .9, .25, 1);
    pointer-events: auto;
}
.wydenglong-banner-closing {
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .7s cubic-bezier(.55, 0, .55, .2), visibility 0s linear .7s;
    pointer-events: none;
}

/* 横幅背景图：全宽自适应显示，横幅高度随图片比例自动变化 */
.wydenglong-banner-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
}

/* 内容覆盖层：覆盖整个横幅，祝福语按位置显示 */
.wydenglong-banner-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 48px;
    box-sizing: border-box;
    text-align: center;
}

.wydenglong-banner-text {
    font-size: 34px;
    font-weight: 700;
    color: #FFD700;
    letter-spacing: 6px;
    line-height: 1.5;
    text-shadow: 0 2px 8px rgba(120, 0, 0, 0.55), 0 0 24px rgba(255, 215, 0, 0.35);
    font-family: "Microsoft YaHei", "SimHei", "PingFang SC", sans-serif;
}

/* 祝福语位置（父容器 .wydenglong-banner-inner 为 absolute 定位） */
.wydenglong-banner-text-pos-tl { position: absolute; top: 28px; left: 36px; text-align: left; letter-spacing: 4px; }
.wydenglong-banner-text-pos-tc { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); text-align: center; }
.wydenglong-banner-text-pos-tr { position: absolute; top: 28px; right: 36px; text-align: right; letter-spacing: 4px; }
.wydenglong-banner-text-pos-ml { position: absolute; top: 50%; left: 36px; transform: translateY(-50%); text-align: left; letter-spacing: 4px; }
.wydenglong-banner-text-pos-mr { position: absolute; top: 50%; right: 36px; transform: translateY(-50%); text-align: right; letter-spacing: 4px; }
.wydenglong-banner-text-pos-bl { position: absolute; bottom: 28px; left: 36px; text-align: left; letter-spacing: 4px; }
.wydenglong-banner-text-pos-bc { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); text-align: center; }
.wydenglong-banner-text-pos-br { position: absolute; bottom: 28px; right: 36px; text-align: right; letter-spacing: 4px; }

@media (max-width: 768px) {
    .wydenglong-banner { min-height: 160px; }
    .wydenglong-banner-inner { padding: 16px 20px; }
    .wydenglong-banner-text { font-size: 24px; letter-spacing: 4px; }
    .wydenglong-banner-text-pos-tl,
    .wydenglong-banner-text-pos-tr,
    .wydenglong-banner-text-pos-ml,
    .wydenglong-banner-text-pos-mr,
    .wydenglong-banner-text-pos-bl,
    .wydenglong-banner-text-pos-br { left: 18px; right: 18px; text-align: center; }
}

.wydenglong-banner-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #FFF;
    font-size: 18px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: background .25s ease, transform .25s ease;
    font-family: Arial, sans-serif;
}
.wydenglong-banner-close:hover {
    background: rgba(255, 255, 255, 0.42);
    transform: rotate(90deg);
}

/* =========================================================
 * 底部倒计时 + 节日问候条
 * 左侧倒计时，右侧祝福语
 * ========================================================= */
.wydenglong-countdown {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 26px;
    background: linear-gradient(90deg, #A60F26 0%, #D92B2B 55%, #A60F26 100%);
    border-top: 2px solid rgba(255, 215, 0, 0.5);
    color: #FFF;
    font-size: 14px;
    box-shadow: 0 -4px 24px rgba(150, 0, 0, 0.3);
    box-sizing: border-box;
    transition: transform .5s ease, opacity .5s ease;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.wydenglong-countdown.wydenglong-count-hide {
    transform: translateY(110%);
    opacity: 0;
}

.wydenglong-count-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}
.wydenglong-count-name {
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 1px;
}
.wydenglong-count-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}
.wydenglong-cd-num {
    display: inline-block;
    min-width: 30px;
    padding: 3px 6px;
    text-align: center;
    background: #7A0B1E;
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 5px;
    font-weight: 700;
    font-size: 16px;
    color: #FFD700;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}
.wydenglong-cd-today {
    font-size: 16px;
    font-weight: 700;
    color: #FFE58F;
    letter-spacing: 2px;
}

.wydenglong-count-greet {
    flex: 0 1 auto;
    max-width: 46%;
    text-align: right;
    font-size: 15px;
    letter-spacing: 1px;
    color: #FFE58F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wydenglong-count-close {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #FFF;
    font-size: 15px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: background .25s ease;
    font-family: Arial, sans-serif;
}
.wydenglong-count-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* =========================================================
 * 移动端适配
 * ========================================================= */
@media (max-width: 768px) {
    .wydenglong-banner {
        height: 240px;
    }
    .wydenglong-banner-text {
        font-size: 22px;
        letter-spacing: 3px;
    }
    .wydenglong-banner-img {
        max-width: 300px;
        max-height: 110px;
        margin-bottom: 8px;
    }
    .wydenglong-banner-inner {
        padding: 16px 30px;
    }

    .wydenglong-countdown {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 14px;
        font-size: 12.5px;
    }
    .wydenglong-count-greet {
        max-width: 100%;
        width: 100%;
        text-align: center;
        font-size: 13.5px;
        white-space: normal;
    }
    .wydenglong-cd-num {
        min-width: 24px;
        padding: 2px 4px;
        font-size: 13px;
    }
    .wydenglong-count-close {
        position: absolute;
        right: 8px;
        top: 8px;
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 13px;
    }
}
