/* CSS Variables for Theme System */
:root {
  /* Dark Mode (Default) */
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #202020;
  --bg-hover: #202020;
  --bg-active: #202020;
  
  --text-primary: #ffffff;
  --text-secondary: #8696a0;
  --text-tertiary: #9ca3af;
  --text-muted: #6b7280;
  
  --border-color: #202020;
  --border-light: rgba(255, 255, 255, 0.1);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  
  --scrollbar-track: #000000;
  --scrollbar-thumb: #202020;
  --scrollbar-thumb-hover: #303030;
}

.light-mode {
  /* Light Mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-hover: #f3f4f6;
  --bg-active: #e5e7eb;
  
  --text-primary: #000000;
  --text-secondary: #374151;
  --text-tertiary: #6b7280;
  --text-muted: #9ca3af;
  
  --border-color: #e5e7eb;
  --border-light: rgba(0, 0, 0, 0.1);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  
  --scrollbar-track: #f3f4f6;
  --scrollbar-thumb: #d1d5db;
  --scrollbar-thumb-hover: #9ca3af;
}

/* Theme Switch Toggle - Animated Sun/Moon */
:root {
  --switch-scale: 0.8;
}

.switch {
  position: relative;
  display: inline-block;
  width: calc(var(--switch-scale) * 60px);
  height: calc(var(--switch-scale) * 34px);
  cursor: pointer;
  flex-shrink: 0;
}

.switch-input,
.switch #input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #2196f3;
  transition: 0.4s;
  z-index: 0;
  overflow: hidden;
}

.sun-moon {
  position: absolute;
  content: "";
  height: calc(var(--switch-scale) * 26px);
  width: calc(var(--switch-scale) * 26px);
  left: calc(var(--switch-scale) * 4px);
  bottom: calc(var(--switch-scale) * 4px);
  background-color: yellow;
  transition: 0.4s;
}

.switch-input:checked + .slider,
#input:checked + .slider {
  background-color: #1a1a1a;
}

.switch-input:focus + .slider,
#input:focus + .slider {
  box-shadow: 0 0 calc(var(--switch-scale) * 1px) #2196f3;
}

.switch-input:checked + .slider .sun-moon,
#input:checked + .slider .sun-moon {
  transform: translateX(calc(var(--switch-scale) * 26px));
  background-color: white;
  /* Removed animation: rotate-center - not defined in reference */
}

.moon-dot {
  opacity: 0;
  transition: 0.4s;
  fill: gray;
}

.switch-input:checked + .slider .sun-moon .moon-dot,
#input:checked + .slider .sun-moon .moon-dot {
  opacity: 1;
}

.slider.round {
  border-radius: calc(var(--switch-scale) * 34px);
}

.slider.round .sun-moon {
  border-radius: 50%;
}

#moon-dot-1 {
  left: calc(var(--switch-scale) * 10px);
  top: calc(var(--switch-scale) * 3px);
  position: absolute;
  width: calc(var(--switch-scale) * 6px);
  height: calc(var(--switch-scale) * 6px);
  z-index: 4;
}

#moon-dot-2 {
  left: calc(var(--switch-scale) * 2px);
  top: calc(var(--switch-scale) * 10px);
  position: absolute;
  width: calc(var(--switch-scale) * 10px);
  height: calc(var(--switch-scale) * 10px);
  z-index: 4;
}

#moon-dot-3 {
  left: calc(var(--switch-scale) * 16px);
  top: calc(var(--switch-scale) * 18px);
  position: absolute;
  width: calc(var(--switch-scale) * 3px);
  height: calc(var(--switch-scale) * 3px);
  z-index: 4;
}

#light-ray-1,
#light-ray-3,
#light-ray-2 {
  position: absolute;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

#light-ray-1 {
  left: calc(var(--switch-scale) * -8px);
  top: calc(var(--switch-scale) * -8px);
  width: calc(var(--switch-scale) * 43px);
  height: calc(var(--switch-scale) * 43px);
}

#light-ray-2 {
  left: -50%;
  top: -50%;
  width: calc(var(--switch-scale) * 55px);
  height: calc(var(--switch-scale) * 55px);
}

#light-ray-3 {
  left: calc(var(--switch-scale) * -18px);
  top: calc(var(--switch-scale) * -18px);
  width: calc(var(--switch-scale) * 60px);
  height: calc(var(--switch-scale) * 60px);
}

.cloud-light,
.cloud-dark {
  position: absolute;
  animation-name: cloud-move;
  animation-duration: 6s;
  animation-iteration-count: infinite;
}

.cloud-light {
  fill: #eee;
}

.cloud-dark {
  fill: #ccc;
  animation-delay: 1s;
}

#cloud-1 {
  left: calc(var(--switch-scale) * 30px);
  top: calc(var(--switch-scale) * 15px);
  width: calc(var(--switch-scale) * 40px);
}

#cloud-2 {
  left: calc(var(--switch-scale) * 44px);
  top: calc(var(--switch-scale) * 10px);
  width: calc(var(--switch-scale) * 20px);
}

#cloud-3 {
  left: calc(var(--switch-scale) * 18px);
  top: calc(var(--switch-scale) * 24px);
  width: calc(var(--switch-scale) * 30px);
}

#cloud-4 {
  left: calc(var(--switch-scale) * 36px);
  top: calc(var(--switch-scale) * 18px);
  width: calc(var(--switch-scale) * 40px);
}

#cloud-5 {
  left: calc(var(--switch-scale) * 48px);
  top: calc(var(--switch-scale) * 14px);
  width: calc(var(--switch-scale) * 20px);
}

#cloud-6 {
  left: calc(var(--switch-scale) * 22px);
  top: calc(var(--switch-scale) * 26px);
  width: calc(var(--switch-scale) * 30px);
}

@keyframes cloud-move {
  0% {
    transform: translateX(0px);
  }
  40% {
    transform: translateX(calc(var(--switch-scale) * 4px));
  }
  80% {
    transform: translateX(calc(var(--switch-scale) * -4px));
  }
  100% {
    transform: translateX(0px);
  }
}

.stars {
  transform: translateY(calc(var(--switch-scale) * -32px));
  opacity: 0;
  transition: 0.4s;
}

.star {
  fill: white;
  position: absolute;
  transition: 0.4s;
  animation-name: star-twinkle;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

.switch-input:checked + .slider .stars,
#input:checked + .slider .stars {
  transform: translateY(0);
  opacity: 1;
}

#star-1 {
  width: calc(var(--switch-scale) * 20px);
  top: calc(var(--switch-scale) * 2px);
  left: calc(var(--switch-scale) * 3px);
  animation-delay: 0.3s;
}

#star-2 {
  width: calc(var(--switch-scale) * 6px);
  top: calc(var(--switch-scale) * 16px);
  left: calc(var(--switch-scale) * 3px);
}

#star-3 {
  width: calc(var(--switch-scale) * 12px);
  top: calc(var(--switch-scale) * 20px);
  left: calc(var(--switch-scale) * 10px);
  animation-delay: 0.6s;
}

#star-4 {
  width: calc(var(--switch-scale) * 18px);
  top: calc(var(--switch-scale) * 0px);
  left: calc(var(--switch-scale) * 18px);
  animation-delay: 1.3s;
}

@keyframes star-twinkle {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.2);
  }
  80% {
    transform: scale(0.8);
  }
  100% {
    transform: scale(1);
  }
}

