/* SOULS — Monochrome Manga Bleach Redesign + Emerald Green Speaking Aura */

:root {
  --reiatsu-white: #ffffff;
  --obsidian-void: #0e0e0e;
  --live-crimson: #dc2626;
  --speak-green: #23a55a;
  --dark-surface: #141313;
  --dark-surface-container-low: #1c1b1c;
  --dark-surface-container: #201f20;
  --dark-surface-container-high: #2b2a2a;
  --dark-outline: #919095;
  --dark-outline-variant: #343338;
}

.material-symbols-outlined,
.material-symbols-rounded,
.material-symbols-sharp,
.material-icons {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1 !important;
  box-sizing: content-box;
  overflow: hidden;
  white-space: nowrap;
  direction: ltr;
  vertical-align: middle;
}

/* Custom Dark Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* Bleach Reiatsu Aura Ring Animations */
@keyframes reiatsuRing {
  0% {
    transform: scale(0.96);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.16);
    opacity: 0.14;
  }
  100% {
    transform: scale(0.96);
    opacity: 0.72;
  }
}

@keyframes reiatsuOuterRing {
  0% {
    transform: scale(1.02);
    opacity: 0.42;
  }
  50% {
    transform: scale(1.28);
    opacity: 0;
  }
  100% {
    transform: scale(1.02);
    opacity: 0.42;
  }
}

@keyframes slashEnter {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes eqPulse {
  0%,
  100% {
    transform: scaleY(0.32);
  }
  50% {
    transform: scaleY(1);
  }
}

.animate-reiatsu-inner {
  animation: reiatsuRing 2100ms ease-in-out infinite;
}

.animate-reiatsu-outer {
  animation: reiatsuOuterRing 2100ms ease-in-out 360ms infinite;
}

.animate-slash-enter {
  animation: slashEnter 280ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.eq-bar-1 {
  animation: eqPulse 720ms ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: bottom;
}
.eq-bar-2 {
  animation: eqPulse 580ms ease-in-out 160ms infinite;
  transform-box: fill-box;
  transform-origin: bottom;
}
.eq-bar-3 {
  animation: eqPulse 820ms ease-in-out 300ms infinite;
  transform-box: fill-box;
  transform-origin: bottom;
}

/* Katana Light Sweep Button Effect */
.katana-btn {
  position: relative;
  overflow: hidden;
}
.katana-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, 0.32) 50%, transparent 72%);
  transform: translateX(-125%);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.katana-btn:hover::after {
  transform: translateX(125%);
}

/* Color Picker Swatches */
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.color-swatch:hover {
  transform: translateY(-2px);
}
.color-swatch.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px #0e0e0e, 0 0 0 3.5px #ffffff;
  transform: scale(1.06);
}

/* Custom Toggle Switches */
.switch-checkbox {
  display: none;
}
.switch-slider {
  width: 38px;
  height: 20px;
  background: #2b2a2a;
  border: 1px solid #47464b;
  border-radius: 9999px;
  position: relative;
  flex-shrink: 0;
  transition: background 160ms ease, border-color 160ms ease;
}
.switch-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #919095;
  border-radius: 50%;
  transition: transform 160ms ease, background 160ms ease;
}
.switch-checkbox:checked + .switch-slider {
  background: #ffffff;
  border-color: #ffffff;
}
.switch-checkbox:checked + .switch-slider::after {
  background: #0e0e0e;
  transform: translateX(18px);
}

/* Keybind Recording State */
.keybind-btn.recording {
  border-color: #23a55a !important;
  background: rgba(35, 165, 90, 0.14) !important;
  box-shadow: 0 0 14px rgba(35, 165, 90, 0.35);
}

/* Speaking Green Glow Helpers */
.speaking-avatar-glow {
  border-color: #23a55a !important;
  box-shadow: 0 0 14px rgba(35, 165, 90, 0.85) !important;
}

.speaking-card-glow {
  border-color: #23a55a !important;
  box-shadow: 0 0 28px rgba(35, 165, 90, 0.25), inset 0 0 18px rgba(35, 165, 90, 0.08) !important;
}

/* Toast Notification */
.toast-item {
  background: #0e0e0e;
  border: 1px solid #ffffff;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 6px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.75);
  animation: slashEnter 220ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .animate-reiatsu-inner,
  .animate-reiatsu-outer,
  .animate-slash-enter,
  .eq-bar-1,
  .eq-bar-2,
  .eq-bar-3 {
    animation: none !important;
  }
  .katana-btn::after {
    display: none;
  }
}
