body {
  --seasonal-theme: christmas;
}

.seasonal-decoration {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 15px;
  z-index: 50;
  pointer-events: none;
}

.seasonal-decoration > * {
  display: none;
}

body[data-theme='carnival'] .carnival-confetti,
body[data-theme='carnival'] .carnival-mask,
body[data-theme='christmas'] .christmas-tree,
body[data-theme='christmas'] .snow-effect,
body[data-theme='easter'] .easter-bunny,
body[data-theme='easter'] .easter-eggs,
body[data-theme='new-year'] .new-year-clock,
body[data-theme='new-year'] .new-year-fireworks {
  display: block;
}

.christmas-tree {
  position: relative;
  font-size: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 4px 15px rgba(255, 215, 0, 0.4));
  animation: 2s infinite alternate treeGlow;
  transition: transform 0.3s;
  pointer-events: all;
  cursor: pointer;
}

.christmas-tree:hover {
  transform: scale(1.15) rotate(-3deg);
  animation: 0.5s treeShake;
}

.tree-star {
  position: absolute;
  top: -20px;
  font-size: 20px;
  animation:
    1s infinite alternate starTwinkle,
    3s linear infinite starRotate;
  filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.9));
}

.tree-top {
  margin: 0;
  animation: 3s ease-in-out infinite treeSwing;
}

.ornament {
  position: absolute;
  font-size: 12px;
  animation: 2s ease-in-out infinite ornamentSwing;
}

.ornament-1 {
  top: 15px;
  left: -5px;
  animation-delay: 0s;
}

.ornament-2 {
  top: 25px;
  right: -5px;
  animation-delay: 0.3s;
}

.ornament-3 {
  top: 35px;
  left: 5px;
  animation-delay: 0.6s;
}


.snow-effect {
  position: absolute;
  width: 600px;
  height: 85px;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  overflow: hidden;
}

.snow-effect::after,
.snow-effect::before {
  content: '❄️';
  position: absolute;
  top: 0;
  font-size: 12px;
  animation: 4s linear infinite snowFall;
  opacity: 0.8;
}

.snow-effect::before {
  left: 20%;
  animation-delay: 0s;
}

.snow-effect::after {
  left: 80%;
  animation-delay: 2s;
  font-size: 11px;
}

@keyframes treeGlow {
  0% {
    filter: drop-shadow(0 4px 15px rgba(255, 215, 0, 0.3));
  }
  100% {
    filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.7));
  }
}

@keyframes treeShake {
  0%,
  100% {
    transform: scale(1.15) rotate(-3deg);
  }
  25% {
    transform: scale(1.15) rotate(-5deg);
  }
  75% {
    transform: scale(1.15) rotate(-1deg);
  }
}

@keyframes treeSwing {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

@keyframes starTwinkle {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes starRotate {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes ornamentSwing {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-3px) rotate(5deg);
  }
}

@keyframes snowFall {
  0% {
    transform: translateY(0) rotate(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  93% {
    transform: translateY(79px) rotate(340deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(83px) rotate(360deg);
    opacity: 0;
  }
}

.new-year-fireworks {
  position: absolute;
  font-size: 32px;
  animation: 3s infinite fireworksBurst;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
}

.new-year-clock {
  font-size: 40px;
  animation: 1s infinite clockTick;
}

@keyframes fireworksBurst {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

@keyframes clockTick {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

.carnival-mask {
  font-size: 40px;
  animation: 2s ease-in-out infinite maskDance;
  filter: drop-shadow(0 4px 15px rgba(255, 0, 255, 0.6));
}

.carnival-confetti {
  position: absolute;
  font-size: 20px;
  animation: 2s linear infinite confettiFall;
}

@keyframes maskDance {
  0%,
  100% {
    transform: rotate(-10deg) translateY(0);
  }
  50% {
    transform: rotate(10deg) translateY(-5px);
  }
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translateY(60px) rotate(360deg);
    opacity: 0;
  }
}

.easter-bunny {
  font-size: 40px;
  animation: 2s ease-in-out infinite bunnyHop;
  filter: drop-shadow(0 4px 10px rgba(255, 192, 203, 0.6));
}

.easter-eggs {
  font-size: 24px;
  animation: 3s ease-in-out infinite eggWobble;
}

@keyframes bunnyHop {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes eggWobble {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

body.dark-mode .seasonal-decoration {
  filter: brightness(1.2);
}

body.dark-mode .christmas-tree {
  filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.6));
}

body.dark-mode .new-year-fireworks {
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1));
}

body.dark-mode .carnival-mask {
  filter: drop-shadow(0 4px 20px rgba(255, 0, 255, 0.8));
}

body.dark-mode .easter-bunny {
  filter: drop-shadow(0 4px 15px rgba(255, 192, 203, 0.8));
}

@media (max-width: 768px) {
  .seasonal-decoration {
    font-size: 0.7em;
    gap: 8px;
  }
  .christmas-tree {
    font-size: 32px;
  }
  .tree-star {
    font-size: 14px;
    top: -15px;
  }
  .ornament {
    font-size: 8px;
  }
  .snow-effect {
    width: 120px;
    height: 60px;
  }
  .new-year-clock,
  .new-year-fireworks {
    font-size: 24px;
  }
  .carnival-mask,
  .easter-bunny {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  header .seasonal-decoration {
    display: none !important;
  }
  .dashboard-section {
    position: relative;
  }
  .dashboard-header {
    position: relative;
    overflow: visible;
  }
  .dashboard-header h2 {
    position: relative;
    display: inline-block;
  }
  .dashboard-header h2::after {
    content: '🎄';
    display: inline-block;
    margin-left: 8px;
    font-size: 1.3em;
    animation:
      2s infinite alternate treeGlow,
      3s ease-in-out infinite treeSwing;
    filter: drop-shadow(0 2px 10px rgba(255, 215, 0, 0.5));
    transform-origin: bottom center;
    vertical-align: middle;
    position: relative;
  }
  .dashboard-header h2::before {
    content: '❄️ ✨';
    position: absolute;
    right: -30px;
    top: -10px;
    font-size: 0.6em;
    animation: 3s linear infinite snowFallMobile;
    opacity: 0.8;
    pointer-events: none;
    white-space: nowrap;
  }
  body[data-theme='christmas'] .dashboard-header h2::before {
    content: '⭐ ❄️';
  }
  @keyframes snowFallMobile {
    0% {
      transform: translateY(-10px) rotate(0);
      opacity: 0;
    }
    10%,
    90% {
      opacity: 0.8;
    }
    100% {
      transform: translateY(40px) rotate(360deg);
      opacity: 0;
    }
  }
  body[data-theme='new-year'] .dashboard-header h2::after {
    content: '🎆';
    animation: 3s infinite fireworksBurst;
  }
  body[data-theme='carnival'] .dashboard-header h2::after {
    content: '🎭';
    animation: 2s ease-in-out infinite maskDance;
  }
  body[data-theme='easter'] .dashboard-header h2::after {
    content: '🐰';
    animation: 2s ease-in-out infinite bunnyHop;
  }
  body[data-theme='default'] .dashboard-header h2::after,
  body[data-theme='default'] .dashboard-header h2::before,
  body[data-theme='default'] .dashboard-header::after {
    content: '';
    display: none;
  }
}
