/**
 * Новогодние украшения для сайта
 * Автоматически отключаются после 8 января
 */

/* Контейнер для снежинок */
.snowflakes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Снежинка */
.snowflake {
    position: absolute;
    top: -60px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.6em;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    animation: snowfall linear infinite;
    opacity: 0;
    user-select: none;
    pointer-events: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.6;
    }
    95% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(calc(100vh + 60px)) rotate(360deg);
        opacity: 0;
    }
}

/* Контейнер ёлочек */
.trees-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    z-index: 9998;
    pointer-events: none;
}

/* SVG лента */
.ribbon-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* Крепление (золотая кнопка) - наверху */
.tree-pin {
    position: absolute;
    top: 0;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, 
        #FFD700 0%, 
        #DAA520 40%, 
        #B8860B 100%);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    z-index: 10;
}

/* Блик на кнопке */
.tree-pin::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 3px;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

/* Ёлочка - внизу, где провисает лента */
.tree {
    --tree-angle: 0deg;
    position: absolute;
    top: 22px;
    transform: translateX(-50%) rotate(var(--tree-angle));
    z-index: 5;
}

.tree-top {
    font-size: 26px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .tree-top {
        font-size: 18px;
    }
    .trees-container {
        height: 50px;
    }
    .ribbon-svg {
        height: 50px;
    }
    .tree {
        top: 16px;
    }
    .tree-pin {
        width: 8px;
        height: 8px;
    }
    .tree-pin::after {
        width: 3px;
        height: 3px;
        top: 1px;
        left: 2px;
    }
    .snowflake {
        font-size: 0.5em;
    }
}

/* Тёмная тема */
[data-bs-theme="dark"] .snowflake {
    color: rgba(220, 220, 240, 0.5);
    text-shadow: 0 0 3px rgba(200, 200, 255, 0.3);
}

[data-bs-theme="dark"] .tree-top {
    filter: brightness(1.2);
}

[data-bs-theme="dark"] .tree-pin {
    background: radial-gradient(circle at 30% 30%, 
        #FFC700 0%, 
        #CC9900 40%, 
        #997700 100%);
}

/* Печать */
@media print {
    .snowflakes-container,
    .trees-container {
        display: none !important;
    }
}

/* Уменьшение движения */
@media (prefers-reduced-motion: reduce) {
    .snowflake {
        animation: none;
        opacity: 0.3;
    }
}
