/* ==== НОВОГОДНИЙ СТИЛЬ ==== */

/* Снежинки - нежная анимация */
@keyframes snowfall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes snowfall-alternate {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(-100px) rotate(-360deg);
    opacity: 0;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Контейнер для снежинок */
/* изменили z-index на очень низкий, чтобы снежинки были позади всего содержимого */
.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -10vh;
  /* Белый цвет со светлым контуром для видимости на белом фоне */
  color: white;
  font-size: 1.5em;
  font-family: Arial, sans-serif;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.4), 0 0 8px rgba(100, 150, 255, 0.5);
  opacity: 0.9;
  user-select: none;
}

/* Снежинки с разными задержками */
/* Увеличены различия в длительности анимации (10s-16s) и задержках (0-7.5s) для равномерного распределения по экрану без групп */
.snowflake:nth-child(1) {
  left: 5%;
  animation: snowfall 10s linear infinite;
  animation-delay: 0s;
}
.snowflake:nth-child(2) {
  left: 10%;
  animation: snowfall 13s linear infinite;
  animation-delay: 5s;
}
.snowflake:nth-child(3) {
  left: 15%;
  animation: snowfall-alternate 11s linear infinite;
  animation-delay: 1.5s;
}
.snowflake:nth-child(4) {
  left: 20%;
  animation: snowfall 14s linear infinite;
  animation-delay: 6s;
}
.snowflake:nth-child(5) {
  left: 30%;
  animation: snowfall-alternate 12s linear infinite;
  animation-delay: 2s;
}
.snowflake:nth-child(6) {
  left: 40%;
  animation: snowfall 15s linear infinite;
  animation-delay: 4.5s;
}
.snowflake:nth-child(7) {
  left: 50%;
  animation: snowfall-alternate 10s linear infinite;
  animation-delay: 0.5s;
}
.snowflake:nth-child(8) {
  left: 60%;
  animation: snowfall 16s linear infinite;
  animation-delay: 7s;
}
.snowflake:nth-child(9) {
  left: 70%;
  animation: snowfall-alternate 11s linear infinite;
  animation-delay: 3s;
}
.snowflake:nth-child(10) {
  left: 80%;
  animation: snowfall 12s linear infinite;
  animation-delay: 6.5s;
}
.snowflake:nth-child(11) {
  left: 90%;
  animation: snowfall-alternate 14s linear infinite;
  animation-delay: 1.2s;
}
.snowflake:nth-child(12) {
  left: 25%;
  animation: snowfall 13s linear infinite;
  animation-delay: 5.5s;
}
.snowflake:nth-child(13) {
  left: 45%;
  animation: snowfall-alternate 15s linear infinite;
  animation-delay: 2.5s;
}
.snowflake:nth-child(14) {
  left: 65%;
  animation: snowfall 10.5s linear infinite;
  animation-delay: 4s;
}
.snowflake:nth-child(15) {
  left: 85%;
  animation: snowfall-alternate 12s linear infinite;
  animation-delay: 7.5s;
}

/* Мерцание праздничных огней */
@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Добавляем динамический градиент для заголовков */
/* Праздничное подсвечивание для H1 и H2 */
.new-year-glow h1,
.new-year-glow h2 {
  background: linear-gradient(135deg, #22c55e, #10b981, #34d399, #22c55e);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

/* Праздничный блеск для кнопок */
@keyframes festiveGlow {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3), 0 4px 6px -1px rgb(0 0 0 / 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.6), 0 4px 6px -1px rgb(0 0 0 / 0.1);
  }
}

/* Расширяем применение new-year-button на все кнопки */
/* Убрали праздничный блеск для кнопок */

/* Небольшое мерцание для иконок */
.new-year-icon {
  animation: twinkle 3s ease-in-out infinite;
}

/* Нежные праздничные цвета для фона */
:root[data-theme="light"] .new-year-accent {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
}

:root[data-theme="dark"] .new-year-accent {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
}

/* Праздничная линия под заголовками */
/* Убрали праздничную линию под заголовками */

/* Рождественская гирлянда декоративная (тонкая) */
/* Убрали рождественскую гирлянду */

/* Отключение анимаций на мобильных для экономии батареи */
@media (prefers-reduced-motion: reduce) {
  .snowflake,
  .new-year-glow h1,
  .new-year-glow h2,
  .new-year-button,
  .new-year-icon,
  .garland-light {
    animation: none !important;
    opacity: 1 !important;
  }
  .snowflake {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* Оптимизация на мобильных */
@media (max-width: 768px) {
  .snowflake {
    font-size: 1.2em;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4), 0 0 6px rgba(100, 150, 255, 0.5);
  }

  .snowflake:nth-child(n + 8) {
    display: none;
  }
}

/* soft snowfall */
.ny-snow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.ny-snowflake {
  position: absolute;
  top: -10vh;
  left: calc(var(--x) * 100%);
  font-size: 2rem;
  opacity: 0.85;
  transform: scale(var(--scale));
  animation: ny-snowfall var(--duration) linear infinite;
  animation-delay: var(--delay);
  will-change: transform;
}

@keyframes ny-snowfall {
  0% { transform: translateY(-10vh) translateX(0) scale(var(--scale)); }
  50% { transform: translateY(50vh) translateX(5vw) scale(var(--scale)); }
  100% { transform: translateY(110vh) translateX(-5vw) scale(var(--scale)); }
}

/* elegant garland */
.ny-garland {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  padding: 0 4vw;
  z-index: 9000;
}

.ny-light {
  --colors: #ff4b4b, #ffd453, #8aff81, #68a3ff, #ff82ea;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: ny-glow 2s infinite;
  animation-delay: calc(var(--i) * .12s);
  filter: blur(1.5px);
}

@keyframes ny-glow {
  0%, 100% { box-shadow: 0 0 6px currentColor; }
  50% { box-shadow: 0 0 12px currentColor; }
}

.ny-light:nth-child(5n + 1) { color: #ff4b4b; }
.ny-light:nth-child(5n + 2) { color: #ffd453; }
.ny-light:nth-child(5n + 3) { color: #8aff81; }
.ny-light:nth-child(5n + 4) { color: #68a3ff; }
.ny-light:nth-child(5n + 5) { color: #ff82ea; }

/* titles */
.ny-title {
  text-shadow: 0 0 12px rgba(255,255,255,.6);
  transition: text-shadow .4s;
}

/* buttons */
.ny-button {
  position: relative;
  transition: all .3s ease;
}

.ny-button:hover {
  box-shadow: 0 0 12px rgba(255,255,255,.5);
  transform: translateY(-2px);
}

