/* Theme Toggle Button - fixed внизу справа */
.theme-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 8px 30px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 10px 40px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn:active {
  transform: scale(0.95) rotate(15deg);
}

.theme-icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-icon svg {
  position: absolute;
  width: 24px;
  height: 24px;
  stroke: #ffffff;
  fill: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* По умолчанию (темная тема) - показываем солнце для переключения на светлую */
.theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Когда тема темная - показываем солнце (чтобы переключить на светлую) */
[data-theme="dark"] .theme-icon-sun,
html:not([data-theme]) .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-icon-moon,
html:not([data-theme]) .theme-icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Когда тема светлая - показываем луну (чтобы переключить на темную) */
[data-theme="light"] .theme-icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="light"] .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Анимация при переключении */
.theme-toggle-btn:active .theme-icon svg {
  transform: scale(0.9);
}

@media (max-width: 768px) {
  .theme-toggle-btn {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }
  
  .theme-icon svg {
    width: 20px;
    height: 20px;
  }
}

