/* === Shared Animated Background === */
body.animated-bg {
  background: linear-gradient(
    135deg,
    #667eea 0%,
    #764ba2 25%,
    #f093fb 50%,
    #4facfe 75%,
    #00f2fe 100%
  );
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  position: relative;
  overflow-x: hidden;
}

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

body.animated-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(1deg);
  }
  66% {
    transform: translateY(10px) rotate(-1deg);
  }
}

/* === Shared Footer === */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 3001;
}
.site-footer a {
  color: inherit;
  text-decoration: none;
  opacity: 0.9;
}
.site-footer a:hover {
  text-decoration: underline;
  opacity: 1;
}
.site-footer .separator {
  opacity: 0.5;
}

/* === NEW: Shared Professional Theme Toggle Switch === */
.theme-toggle-switch.professional {
  --knob-size: 26px;
  --container-width: 70px;
  --container-height: 34px;

  position: relative;
  display: inline-flex;
  align-items: center;
  width: var(--container-width);
  height: var(--container-height);
  padding: 0 4px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--dash-border);
  background-color: var(--dash-bg);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle-switch.professional .toggle-knob {
  position: absolute;
  top: 3px;
  left: 4px;
  width: var(--knob-size);
  height: var(--knob-size);
  background-color: var(--dash-card-bg);
  border-radius: 50%;
  box-shadow: var(--dash-shadow);
  display: grid;
  place-items: center;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.3s ease;
  overflow: hidden;
}

.theme-toggle-switch.professional .sun-icon,
.theme-toggle-switch.professional .moon-icon {
  position: absolute;
  font-size: 0.9rem;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.3s ease;
}

/* Light Mode Styles */
html[data-theme='light'] .theme-toggle-switch.professional {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
}
html[data-theme='light'] .theme-toggle-switch.professional .toggle-knob {
  transform: translateX(0);
  background-color: #ffffff;
}
html[data-theme='light'] .theme-toggle-switch.professional .sun-icon {
  opacity: 1;
  color: #f59e0b;
  transform: rotate(0deg);
}
html[data-theme='light'] .theme-toggle-switch.professional .moon-icon {
  opacity: 0;
  transform: rotate(90deg);
}

/* Dark Mode Styles */
html[data-theme='dark'] .theme-toggle-switch.professional {
  background-color: #2d3748;
  border-color: #4a5568;
}
html[data-theme='dark'] .theme-toggle-switch.professional .toggle-knob {
  transform: translateX(32px);
  background-color: #4a5568;
}
html[data-theme='dark'] .theme-toggle-switch.professional .sun-icon {
  opacity: 0;
}
html[data-theme='dark'] .theme-toggle-switch.professional .moon-icon {
  opacity: 1;
  color: #f0e68c;
}
