/* ============ Новогодний режим ============ */
.ny-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1034; overflow: hidden; }
.ny-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ny-off .ny-layer, .ny-off .ny-canvas, .ny-off .ny-el { display: none !important; }

/* Гирлянда */
.ny-garland { position: fixed; left: 0; right: 0; height: 60px; pointer-events: none; z-index: 1036; }
.ny-garland svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ny-bulb {
    position: absolute; width: 12px; height: 20px; margin-left: -6px; border-radius: 50% 50% 45% 45%;
    background: var(--c); box-shadow: 0 0 6px 2px var(--c), 0 0 18px 4px var(--c);
    animation: nyBlink 1.6s infinite ease-in-out; animation-delay: var(--d);
}
.ny-bulb::before { content: ""; position: absolute; top: -5px; left: 3px; width: 6px; height: 6px; background: #444; border-radius: 2px; }
@keyframes nyBlink { 0%, 100% { opacity: 1; filter: brightness(1.2); } 50% { opacity: .25; box-shadow: none; filter: brightness(.6); } }

/* Сосульки */
.ny-icicles { position: fixed; left: 0; right: 0; height: 40px; display: flex; pointer-events: none; z-index: 1035; overflow: hidden; }
.ny-icicle {
    flex: 0 0 auto; margin: 0 1px;
    background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(190,225,255,.7) 60%, rgba(160,210,255,0));
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    filter: drop-shadow(0 2px 2px rgba(0,60,120,.25));
    transform-origin: top center; animation: nyDrip 6s infinite ease-in-out; animation-delay: var(--d);
}
@keyframes nyDrip { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.08); } }

/* Шары */
.ny-ball-wrap { position: fixed; width: 2px; pointer-events: none; z-index: 1033; transform-origin: top center; animation: nySwing 4s infinite ease-in-out; animation-delay: var(--d); }
.ny-ball-wrap::before { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: var(--len); background: rgba(200,200,200,.8); }
.ny-ball {
    position: absolute; top: var(--len); left: calc(var(--s) / -2); width: var(--s); height: var(--s); border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff 0, var(--c) 18%, var(--c2) 75%);
    box-shadow: inset -4px -6px 10px rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.3);
}
.ny-ball::before { content: ""; position: absolute; top: -6px; left: 50%; margin-left: -5px; width: 10px; height: 8px; background: linear-gradient(#ddd, #999); border-radius: 2px; }
@keyframes nySwing { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

/* Ёлка */
.ny-tree { position: fixed; left: 8px; bottom: 0; width: 150px; z-index: 1033; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.ny-tree svg { width: 100%; height: auto; display: block; }
.ny-tree .lt { animation: nyBlink 1.4s infinite; }
.ny-tree .star { transform-origin: 75px 18px; animation: nyStar 2.4s infinite ease-in-out; }
@keyframes nyStar { 0%, 100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 4px #ffd700); } 50% { transform: scale(1.15) rotate(10deg); filter: drop-shadow(0 0 12px #ffd700); } }

/* Дед Мороз на санях */
.ny-santa { position: fixed; top: 20%; left: 100%; font-size: 44px; white-space: nowrap; z-index: 1036; pointer-events: none; line-height: 1; }
.ny-santa .bob { display: inline-block; animation: nyBob 1.2s infinite ease-in-out; }
.ny-santa .trail { font-size: 18px; vertical-align: middle; opacity: .9; }
@keyframes nyBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Дед Мороз с поздравлением */
.ny-greeting { position: fixed; right: 16px; bottom: 136px; z-index: 1037; display: flex; align-items: flex-end; gap: 8px; pointer-events: none; }
.ny-greeting .santa-face {
    pointer-events: auto; cursor: pointer; width: 64px; height: 64px; border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #fff 0, #ffe9e9 60%, #d62828 61%); border: 3px solid #fff;
    display: flex; align-items: center; justify-content: center; font-size: 40px; box-shadow: 0 6px 18px rgba(0,0,0,.35);
    animation: nyWave 3s infinite ease-in-out;
}
@keyframes nyWave { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-10deg); } 30% { transform: rotate(10deg); } 45% { transform: rotate(0); } }
.ny-bubble {
    pointer-events: auto; max-width: 240px; background: #fff; color: #b00020; border-radius: 16px 16px 4px 16px;
    padding: 12px 30px 12px 14px; font-weight: 600; font-size: .92rem; box-shadow: 0 8px 24px rgba(0,0,0,.3); position: relative;
    transform-origin: bottom right; transition: transform .35s ease, opacity .35s ease;
}
.ny-bubble.hide { transform: scale(0); opacity: 0; }
.ny-bubble .x { position: absolute; top: 4px; right: 8px; cursor: pointer; color: #999; font-size: 18px; line-height: 1; }

/* Отсчёт */
.ny-countdown {
    position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 1037; pointer-events: auto;
    background: linear-gradient(135deg, #b30000, #e53935); color: #fff; border: 2px solid #ffd54f; border-radius: 30px;
    padding: 7px 34px 7px 16px; font-weight: 700; font-size: .92rem; box-shadow: 0 6px 20px rgba(0,0,0,.35); white-space: nowrap;
}
.ny-countdown .x { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; opacity: .8; }
.ny-countdown b { color: #ffd54f; font-variant-numeric: tabular-nums; }

/* Искры за курсором */
.ny-spark { position: fixed; pointer-events: none; z-index: 1038; font-size: 14px; animation: nySpark .9s forwards ease-out; }
@keyframes nySpark { to { transform: translate(var(--dx), 30px) scale(.2) rotate(180deg); opacity: 0; } }

/* Кнопка вкл/выкл эффектов для посетителя */
.ny-toggle {
    position: fixed; right: 18px; bottom: 74px; z-index: 1039; width: 46px; height: 46px; border-radius: 50%; border: 0;
    background: #1e88e5; color: #fff; font-size: 20px; box-shadow: 0 6px 18px rgba(0,0,0,.3); pointer-events: auto;
}
.ny-off .ny-toggle { display: block !important; background: #78909c; }

@media (max-width: 768px) {
    .ny-tree { width: 92px; left: 2px; }
    .ny-santa { font-size: 30px; }
    .ny-greeting { bottom: 128px; right: 10px; }
    .ny-greeting .santa-face { width: 52px; height: 52px; font-size: 32px; }
    .ny-bubble { max-width: 180px; font-size: .82rem; }
    .ny-countdown { font-size: .78rem; padding: 6px 30px 6px 12px; bottom: 10px; }
    .ny-garland { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .ny-bulb, .ny-ball-wrap, .ny-icicle, .ny-greeting .santa-face { animation: none !important; }
}
