/* Новогодняя тема - активируется с 20 декабря по 10 января */

/* Новогодние цвета и градиенты */
:root {
    --newyear-red: #d32f2f;
    --newyear-green: #2e7d32;
    --newyear-gold: #ffd700;
    --newyear-silver: #c0c0c0;
    --newyear-snow: #ffffff;
}

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

/* Скрываем снежинки на страницах ридера */
.reeder_body ~ #snow-container,
#snow-container:has(~ .reeder_body),
body.reeder-page #snow-container,
body:has(.reeder_body) #snow-container,
body:has(#reeder) #snow-container {
    display: none !important;
}

/* Альтернативный способ для старых браузеров */
.reeder_body {
    position: relative;
}

.reeder_body ~ #snow-container {
    display: none !important;
}

/* Снежинки */
.snowflake {
    position: absolute;
    color: #ffffff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    user-select: none;
    animation: fall linear infinite;
    opacity: 0.8;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Новогодние украшения на заголовках */
.newyear-header-decoration {
    position: relative;
    display: inline-block;
}

.newyear-header-decoration::before,
.newyear-header-decoration::after {
    content: '❄';
    color: var(--newyear-red);
    font-size: 0.8em;
    margin: 0 5px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Новогодние акценты на кнопках */
.newyear-theme .btn-primary,
.newyear-theme button.btn-primary {
    background: linear-gradient(135deg, var(--newyear-red) 0%, #b71c1c 100%);
    transition: all 0.3s ease;
}

.newyear-theme .btn-primary:hover,
.newyear-theme button.btn-primary:hover {
    background: linear-gradient(135deg, #b71c1c 0%, var(--newyear-red) 100%);
    transform: translateY(-2px);
}

/* Новогодние акценты на ссылках */
.newyear-theme a {
    transition: color 0.3s ease;
}

.newyear-theme a:hover {
    color: var(--newyear-red);
}

/* Новогодний фон для навигации */
.newyear-theme .navbar,
.newyear-theme nav {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.1) 0%, rgba(46, 125, 50, 0.1) 100%);
}

/* Новогодние украшения на логотипе */
.newyear-theme .logo-container {
    position: relative;
}

.newyear-theme .logo-container::before {
    content: '🎄';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    animation: swing 3s ease-in-out infinite;
}

.newyear-theme .logo-container::after {
    content: '🎁';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    animation: swing 3s ease-in-out infinite 1.5s;
}

@keyframes swing {
    0%, 100% {
        transform: translateY(-50%) rotate(-5deg);
    }
    50% {
        transform: translateY(-50%) rotate(5deg);
    }
}

/* Новогодние звездочки на фоне */
.newyear-theme body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(211, 47, 47, 0.2), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(46, 125, 50, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(211, 47, 47, 0.15), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(46, 125, 50, 0.15), transparent),
        radial-gradient(2px 2px at 90% 50%, rgba(211, 47, 47, 0.2), transparent);
    background-size: 200% 200%;
    animation: twinkle 10s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Новогодние баннеры и уведомления */
.newyear-theme .alert-success {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.9) 0%, rgba(27, 94, 32, 0.9) 100%);
    color: #fff;
}

.newyear-theme .alert-info {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.9) 0%, rgba(13, 71, 161, 0.9) 100%);
    color: #fff;
}

/* Новогодние карточки */
.newyear-theme .card {
    transition: all 0.3s ease;
}

.newyear-theme .card:hover {
    transform: translateY(-2px);
}

/* Новогодние иконки */
.newyear-theme .fa-star,
.newyear-theme .fa-heart {
    color: var(--newyear-red);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .newyear-theme .logo-container::before,
    .newyear-theme .logo-container::after {
        display: none;
    }
    
    .snowflake {
        font-size: 0.8em;
    }
}

/* Новогодние игрушки в верхней части сайта */
.newyear-theme .header {
    position: relative;
    overflow: visible;
}

.newyear-toys-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: visible;
}

.newyear-toy {
    position: absolute;
    font-size: 1.5em;
    animation: toy-swing 3s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}

.newyear-toy:nth-child(1) {
    left: 5%;
    top: -10px;
    animation-delay: 0s;
}

.newyear-toy:nth-child(2) {
    left: 15%;
    top: -10px;
    animation-delay: 0.5s;
}

.newyear-toy:nth-child(3) {
    left: 25%;
    top: -10px;
    animation-delay: 1s;
}

.newyear-toy:nth-child(4) {
    left: 35%;
    top: -10px;
    animation-delay: 1.5s;
}

.newyear-toy:nth-child(5) {
    left: 50%;
    top: -10px;
    animation-delay: 0.2s;
}

.newyear-toy:nth-child(6) {
    left: 65%;
    top: -10px;
    animation-delay: 0.7s;
}

.newyear-toy:nth-child(7) {
    left: 75%;
    top: -10px;
    animation-delay: 1.2s;
}

.newyear-toy:nth-child(8) {
    left: 85%;
    top: -10px;
    animation-delay: 1.7s;
}

.newyear-toy:nth-child(9) {
    left: 95%;
    top: -10px;
    animation-delay: 0.4s;
}

@keyframes toy-swing {
    0%, 100% {
        transform: rotate(-10deg) translateY(0);
    }
    50% {
        transform: rotate(10deg) translateY(5px);
    }
}

/* Адаптивность для новогодних игрушек */
@media (max-width: 768px) {
    .newyear-toy {
        font-size: 1.2em;
    }
    
    .newyear-toy:nth-child(n+5) {
        display: none;
    }
}

/* Отключение новогодней темы для темной темы (опционально) */
.dark-theme.newyear-theme {
    /* Можно добавить специальные стили для темной темы */
}

/* Новогодние конфетти (опционально, для особых событий) */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--newyear-red);
    position: absolute;
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(2n) {
    background: var(--newyear-green);
    animation-delay: 0.5s;
}

.confetti:nth-child(3n) {
    background: var(--newyear-gold);
    animation-delay: 1s;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

