/* 各节日专属祝福语样式 */

.fest-greeting {
    position: fixed;
    top: clamp(10px, 2.5vh, 22px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
    pointer-events: none;
    animation: festGreetingEnter 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fest-greeting__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fest-greeting__text {
    margin: 0;
    padding: 0;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    letter-spacing: 0.06em;
}

@keyframes festGreetingEnter {
    from { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(0.96); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ---- 圣诞：积雪木牌 + 红丝带 ---- */
.fest-greeting--christmas .fest-greeting__inner {
    padding: clamp(14px, 2.5vw, 20px) clamp(28px, 5vw, 44px) clamp(12px, 2vw, 16px);
    background: linear-gradient(180deg, #1a5c32 0%, #0d3d20 100%);
    border-radius: 4px 4px 8px 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12);
    min-width: min(88vw, 360px);
}
.fest-greeting--christmas .fest-greeting__inner::before {
    content: '';
    position: absolute;
    top: -8px; left: -4px; right: -4px;
    height: 14px;
    background: #fff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    box-shadow: 0 2px 8px rgba(255,255,255,.4);
}
.fest-greeting--christmas .fest-greeting__inner::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 50%;
    transform: translateX(-50%);
    width: 24px; height: 28px;
    background: linear-gradient(180deg, #c41e3a 0%, #8b0000 100%);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}
.fest-greeting--christmas .fest-greeting__text {
    color: #fff8e7;
    font-size: clamp(15px, 3vw, 20px);
    text-shadow: 0 1px 2px rgba(0,0,0,.5), 0 0 12px rgba(255,215,0,.3);
    font-family: Georgia, "Times New Roman", serif;
}

/* ---- 中秋：月华卷轴 ---- */
.fest-greeting--midautumn .fest-greeting__inner {
    padding: clamp(12px, 2vw, 18px) clamp(32px, 6vw, 52px);
    background: linear-gradient(90deg, rgba(25,20,60,.92) 0%, rgba(40,30,80,.88) 50%, rgba(25,20,60,.92) 100%);
    border-top: 2px solid rgba(255,220,120,.5);
    border-bottom: 2px solid rgba(255,220,120,.5);
    box-shadow: 0 0 30px rgba(255,200,80,.25), 0 8px 24px rgba(0,0,0,.4);
    min-width: min(90vw, 400px);
}
.fest-greeting--midautumn .fest-greeting__inner::before {
    content: '✦';
    position: absolute;
    top: -10px; left: 12%;
    color: rgba(255,220,120,.7);
    font-size: 12px;
    text-shadow: 0 0 8px rgba(255,200,80,.8);
}
.fest-greeting--midautumn .fest-greeting__inner::after {
    content: '✦';
    position: absolute;
    top: -10px; right: 12%;
    color: rgba(255,220,120,.7);
    font-size: 12px;
    text-shadow: 0 0 8px rgba(255,200,80,.8);
}
.fest-greeting--midautumn .fest-greeting__text {
    color: #ffeaa0;
    font-size: clamp(16px, 3.2vw, 22px);
    font-family: "华文楷体", "楷体", "STKaiti", serif;
    text-shadow: 0 0 8px rgba(255,200,80,.6), 0 2px 4px rgba(0,0,0,.5);
}

/* ---- 儿童：彩虹气泡牌 ---- */
.fest-greeting--children .fest-greeting__inner {
    padding: clamp(10px, 2vw, 14px) clamp(22px, 4.5vw, 36px);
    background: rgba(255,255,255,.95);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 4px 20px rgba(102,126,234,.35);
    min-width: min(85vw, 340px);
    position: relative;
}
.fest-greeting--children .fest-greeting__inner::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff6b9d, #ffd93d, #6bcb77, #4d96ff, #ff6b9d);
    background-size: 200% 100%;
    animation: fgRainbowShift 4s linear infinite;
    z-index: -1;
}
.fest-greeting--children .fest-greeting__text {
    font-size: clamp(15px, 3vw, 19px);
    background: linear-gradient(90deg, #e84393, #6c5ce7, #0984e3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
@keyframes fgRainbowShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ---- 元宵：宫灯对联 ---- */
.fest-greeting--lantern .fest-greeting__inner {
    display: flex;
    align-items: stretch;
    gap: clamp(8px, 2vw, 14px);
    padding: clamp(8px, 1.5vw, 12px) clamp(12px, 2.5vw, 20px);
    background: linear-gradient(180deg, rgba(180,20,20,.95) 0%, rgba(120,10,10,.98) 100%);
    border: 2px solid #ffd700;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(255,100,50,.4), inset 0 0 30px rgba(0,0,0,.3);
    min-width: min(88vw, 380px);
}
.fest-greeting--lantern .fg-lantern-icon {
    flex-shrink: 0;
    width: clamp(22px, 5vw, 28px);
    align-self: center;
    height: clamp(32px, 7vw, 40px);
    background: radial-gradient(ellipse at 50% 40%, #ff6b4a 0%, #cc0000 70%);
    border-radius: 50% 50% 45% 45%;
    border: 1px solid #ffd700;
    box-shadow: inset 0 -4px 8px rgba(0,0,0,.3), 0 0 12px rgba(255,80,40,.5);
    position: relative;
}
.fest-greeting--lantern .fg-lantern-icon::before {
    content: '';
    position: absolute;
    top: -4px; left: 50%;
    transform: translateX(-50%);
    width: 8px; height: 4px;
    background: #ffd700;
    border-radius: 2px 2px 0 0;
}
.fest-greeting--lantern .fest-greeting__text {
    flex: 1;
    color: #ffd700;
    font-size: clamp(15px, 3vw, 20px);
    font-family: "华文楷体", "楷体", serif;
    text-shadow: 0 1px 2px rgba(0,0,0,.6), 0 0 10px rgba(255,200,50,.4);
    align-self: center;
}

/* ---- 端午：卡通龙舟（粽子划桨举牌） ---- */
.fest-greeting--dragonboat {
    top: clamp(6px, 1.5vh, 16px);
    z-index: 10005;
}
.fest-greeting--dragonboat .fest-greeting__inner {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: min(98vw, 560px);
    overflow: visible;
}
.fest-greeting--dragonboat .fg-dragonboat {
    position: relative;
    width: min(98vw, 560px);
}
.fest-greeting--dragonboat .fg-db-scene {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(2,136,209,.22));
    animation: fgDbBob 4s ease-in-out infinite alternate;
}

@keyframes fgDbBob {
    0% { transform: translateY(0) rotate(-0.4deg); }
    100% { transform: translateY(-5px) rotate(0.4deg); }
}

@media (max-width: 768px) {
    .fest-greeting { top: 8px; }
    .fest-greeting--christmas .fest-greeting__inner,
    .fest-greeting--midautumn .fest-greeting__inner,
    .fest-greeting--lantern .fest-greeting__inner,
    .fest-greeting--dragonboat .fest-greeting__inner {
        min-width: 92vw;
    }
}

@media (max-width: 480px) {
    .fest-greeting--children .fest-greeting__inner::before {
        animation: none;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .fest-greeting { display: none; }
}
