/* ==========================================
   НОВОГОДНЯЯ ТЕМАТИКА - New Year Theme
   ========================================== */

/* Новогодние цвета */
:root {
    --ny-red: #c41e3a;
    --ny-green: #165b33;
    --ny-gold: #ffd700;
    --ny-silver: #c0c0c0;
    --ny-snow: #fffafa;
    --ny-ice: #a5f2f3;
    --ny-dark-green: #0b3d0b;
    --ny-dark-red: #8b0000;
}

/* Контейнер для снежинок */
.snowflakes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Снежинка */
.snowflake {
    position: absolute;
    top: -10px;
    color: var(--ny-snow);
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    animation: snowfall linear infinite;
    opacity: 0.8;
}

.snowflake::after {
    content: '❄';
}

/* Различные размеры снежинок */
.snowflake:nth-child(1) { left: 1%; animation-duration: 10s; animation-delay: 0s; font-size: 1.2em; }
.snowflake:nth-child(2) { left: 10%; animation-duration: 12s; animation-delay: 1s; font-size: 0.8em; }
.snowflake:nth-child(3) { left: 20%; animation-duration: 8s; animation-delay: 0.5s; font-size: 1.5em; }
.snowflake:nth-child(4) { left: 30%; animation-duration: 14s; animation-delay: 2s; font-size: 0.9em; }
.snowflake:nth-child(5) { left: 40%; animation-duration: 11s; animation-delay: 1.5s; font-size: 1.1em; }
.snowflake:nth-child(6) { left: 50%; animation-duration: 9s; animation-delay: 0.3s; font-size: 1.3em; }
.snowflake:nth-child(7) { left: 60%; animation-duration: 13s; animation-delay: 2.5s; font-size: 0.7em; }
.snowflake:nth-child(8) { left: 70%; animation-duration: 10s; animation-delay: 1.2s; font-size: 1.4em; }
.snowflake:nth-child(9) { left: 80%; animation-duration: 15s; animation-delay: 0.8s; font-size: 1em; }
.snowflake:nth-child(10) { left: 90%; animation-duration: 11s; animation-delay: 3s; font-size: 1.2em; }
.snowflake:nth-child(11) { left: 5%; animation-duration: 12s; animation-delay: 4s; font-size: 0.9em; }
.snowflake:nth-child(12) { left: 15%; animation-duration: 9s; animation-delay: 0.7s; font-size: 1.1em; }
.snowflake:nth-child(13) { left: 25%; animation-duration: 14s; animation-delay: 2.3s; font-size: 0.8em; }
.snowflake:nth-child(14) { left: 35%; animation-duration: 10s; animation-delay: 1.8s; font-size: 1.3em; }
.snowflake:nth-child(15) { left: 45%; animation-duration: 13s; animation-delay: 0.4s; font-size: 1em; }
.snowflake:nth-child(16) { left: 55%; animation-duration: 11s; animation-delay: 2.8s; font-size: 0.7em; }
.snowflake:nth-child(17) { left: 65%; animation-duration: 8s; animation-delay: 1.3s; font-size: 1.5em; }
.snowflake:nth-child(18) { left: 75%; animation-duration: 16s; animation-delay: 0.9s; font-size: 0.9em; }
.snowflake:nth-child(19) { left: 85%; animation-duration: 12s; animation-delay: 3.5s; font-size: 1.2em; }
.snowflake:nth-child(20) { left: 95%; animation-duration: 10s; animation-delay: 1.7s; font-size: 1.1em; }
.snowflake:nth-child(21) { left: 3%; animation-duration: 13s; animation-delay: 2.1s; font-size: 0.8em; }
.snowflake:nth-child(22) { left: 13%; animation-duration: 9s; animation-delay: 0.6s; font-size: 1.4em; }
.snowflake:nth-child(23) { left: 23%; animation-duration: 15s; animation-delay: 3.2s; font-size: 1em; }
.snowflake:nth-child(24) { left: 33%; animation-duration: 11s; animation-delay: 1.1s; font-size: 0.9em; }
.snowflake:nth-child(25) { left: 43%; animation-duration: 14s; animation-delay: 2.6s; font-size: 1.3em; }
.snowflake:nth-child(26) { left: 53%; animation-duration: 10s; animation-delay: 0.2s; font-size: 0.7em; }
.snowflake:nth-child(27) { left: 63%; animation-duration: 12s; animation-delay: 1.9s; font-size: 1.2em; }
.snowflake:nth-child(28) { left: 73%; animation-duration: 8s; animation-delay: 3.8s; font-size: 1.1em; }
.snowflake:nth-child(29) { left: 83%; animation-duration: 16s; animation-delay: 0.1s; font-size: 0.8em; }
.snowflake:nth-child(30) { left: 93%; animation-duration: 13s; animation-delay: 2.4s; font-size: 1.5em; }

@keyframes snowfall {
    0% {
        transform: translateY(-10px) rotate(0deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(50px);
        opacity: 0;
    }
}

/* Новогодние гирлянды */
.garland {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 9998;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    pointer-events: none;
}

.garland-light {
    width: 12px;
    height: 20px;
    border-radius: 50% 50% 50% 50%;
    animation: glow 1.5s ease-in-out infinite alternate;
    box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    position: relative;
}

.garland-light::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: #333;
    border-radius: 2px;
}

.garland-light:nth-child(5n+1) { color: #ff0000; animation-delay: 0s; }
.garland-light:nth-child(5n+2) { color: #00ff00; animation-delay: 0.3s; }
.garland-light:nth-child(5n+3) { color: #0000ff; animation-delay: 0.6s; }
.garland-light:nth-child(5n+4) { color: #ffff00; animation-delay: 0.9s; }
.garland-light:nth-child(5n+5) { color: #ff00ff; animation-delay: 1.2s; }

@keyframes glow {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Новогодний баннер */
.new-year-banner {
    background: linear-gradient(135deg, var(--ny-dark-green) 0%, var(--ny-green) 50%, var(--ny-dark-green) 100%);
    border: 3px solid var(--ny-gold);
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    text-align: center;
    max-width: 600px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.new-year-banner::before {
    content: '🎄';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5em;
    animation: treeSway 2s ease-in-out infinite;
}

.new-year-banner::after {
    content: '🎄';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
    font-size: 2.5em;
    animation: treeSway 2s ease-in-out infinite reverse;
}

@keyframes treeSway {
    0%, 100% { transform: translateY(-50%) rotate(-3deg); }
    50% { transform: translateY(-50%) rotate(3deg); }
}

.new-year-banner h2 {
    color: var(--ny-gold);
    font-size: 1.8em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px var(--ny-gold);
    animation: goldShimmer 2s ease-in-out infinite;
}

@keyframes goldShimmer {
    0%, 100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px var(--ny-gold); }
    50% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 40px var(--ny-gold), 0 0 60px var(--ny-gold); }
}

.new-year-banner p {
    color: var(--ny-snow);
    margin-top: 10px;
    font-size: 1.1em;
}

/* Новогодние украшения для заголовков */
.ny-decorated {
    position: relative;
    display: inline-block;
}

.ny-decorated::before {
    content: '⭐';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    animation: starTwinkle 1s ease-in-out infinite alternate;
}

.ny-decorated::after {
    content: '⭐';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    animation: starTwinkle 1s ease-in-out infinite alternate-reverse;
}

@keyframes starTwinkle {
    0% { opacity: 0.5; transform: translateY(-50%) scale(0.8); }
    100% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

/* Новогодний стиль для карточек */
.stat-box.ny-themed {
    border: 2px solid var(--ny-gold) !important;
    background: linear-gradient(180deg, 
        rgba(22, 91, 51, 0.3) 0%, 
        rgba(60, 40, 10, 0.7) 50%, 
        rgba(22, 91, 51, 0.3) 100%) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Праздничные кнопки */
.button.ny-button {
    background: linear-gradient(135deg, var(--ny-red) 0%, var(--ny-dark-red) 100%);
    border: 2px solid var(--ny-gold);
    color: var(--ny-snow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.button.ny-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--ny-gold);
}

.button.ny-button::before {
    content: '🎁';
    position: absolute;
    left: 10px;
    animation: bounce 0.5s ease-in-out infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}


/* Праздничный footer */
.footer.ny-footer {
    background: linear-gradient(135deg, var(--ny-dark-green) 0%, var(--ny-green) 100%);
    border-top: 3px solid var(--ny-gold);
    position: relative;
}

.footer.ny-footer::before {
    content: '🎅';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
}

.footer.ny-footer::after {
    content: '🎁';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    animation: giftShake 0.5s ease-in-out infinite alternate;
}

@keyframes giftShake {
    0% { transform: translateY(-50%) rotate(-5deg); }
    100% { transform: translateY(-50%) rotate(5deg); }
}

/* Праздничный header */
.header.ny-header {
    background: linear-gradient(135deg, var(--ny-dark-red) 0%, var(--ny-red) 50%, var(--ny-dark-red) 100%) !important;
    border-bottom: 3px solid var(--ny-gold);
    position: relative;
}

.header.ny-header h1 {
    color: var(--ny-gold) !important;
    text-shadow: 0 0 20px var(--ny-gold), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Конфетти эффект при загрузке */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 10000;
    pointer-events: none;
}

.confetti:nth-child(odd) {
    background: var(--ny-red);
}

.confetti:nth-child(even) {
    background: var(--ny-gold);
}

.confetti:nth-child(3n) {
    background: var(--ny-green);
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Мигающие звёзды на фоне */
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: starBlink 2s ease-in-out infinite;
}

@keyframes starBlink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .new-year-banner {
        padding: 15px 50px;
    }
    
    .new-year-banner::before,
    .new-year-banner::after {
        font-size: 1.5em;
    }
    
    .new-year-banner h2 {
        font-size: 1.3em;
    }
    
    .christmas-tree {
        font-size: 2.5em;
        bottom: 10px;
        right: 10px;
    }
    
    .countdown-item {
        min-width: 55px;
        padding: 8px 10px;
    }
    
    .countdown-number {
        font-size: 1.5em;
    }
    
    .garland-light {
        width: 8px;
        height: 14px;
    }
}

/* Специальные эффекты для ссылок */
a.ny-link {
    color: var(--ny-gold) !important;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

a.ny-link:hover {
    color: var(--ny-snow) !important;
    text-shadow: 0 0 10px var(--ny-gold);
}

a.ny-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ny-gold);
    transition: width 0.3s ease;
}

a.ny-link:hover::after {
    width: 100%;
}
