/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Custom styles for the application */
html {
  font-family: 'Gabarito', sans-serif !important;
  color-scheme: dark;
  background: #181818;
}

body {
  background: #181818;
  color: #e2e8f0;
}

@keyframes page-fade-up-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-fade-up {
  opacity: 0;
  transform: translateY(18px);
  animation: page-fade-up-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: opacity, transform;
}

.page-fade-up-delay-1 {
  animation-delay: 120ms;
}

.page-fade-up-delay-2 {
  animation-delay: 220ms;
}

.page-fade-up-delay-3 {
  animation-delay: 320ms;
}

@media (max-width: 1279px) {
  .mice-directory-layout.page-fade-up {
    opacity: 1;
    transform: none;
    animation: none;
    will-change: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-fade-up,
  .page-fade-up-delay-1,
  .page-fade-up-delay-2,
  .page-fade-up-delay-3 {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Login page: gentle float on feature cards (preserves rotation via transform) */
@keyframes login-float-y {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -6px;
  }
}

.login-float {
  animation: login-float-y 4.2s ease-in-out infinite;
  animation-delay: var(--login-float-delay, 0s);
  will-change: translate;
}

.login-float:hover,
.login-float:focus-visible {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .login-float {
    animation: none;
    will-change: auto;
  }
}

@keyframes compare-cta-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
  }

  35% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(96, 165, 250, 0.24);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
  }
}

@keyframes compare-count-bump {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.compare-cta-link {
  transform-origin: center;
}

.compare-cta-link.compare-link-pulse {
  animation: compare-cta-pulse 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.compare-cta-count.compare-count-bump {
  animation: compare-count-bump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.compare-add-button-shell {
  position: absolute;
}

.compare-add-button-tooltip {
  display: none;
}

@media (min-width: 768px) {
  .compare-add-button-tooltip {
    display: block;
    pointer-events: none;
    position: absolute;
    right: calc(100% + 0.5rem);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    white-space: nowrap;
    border-radius: 9999px;
    border: 1px solid #334155;
    background: rgba(2, 6, 23, 0.96);
    color: #f8fafc;
    padding: 0.45rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .compare-add-button-shell:hover .compare-add-button-tooltip,
  .compare-add-button-shell:focus-within .compare-add-button-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* Product image hover magnify (desktop / fine pointer)
   Scale/origin are animated in JS (slow ramp-in); CSS only handles soft frame lift. */
.image-magnify {
  cursor: zoom-in;
  transform-style: preserve-3d;
  transition: box-shadow 0.4s ease;
}

.image-magnify img,
.image-magnify picture,
.image-magnify .mouse-card-image {
  /* JS drives transform each frame; keep will-change for smooth paint */
  will-change: transform;
  transform-origin: center center;
  /* Avoid fighting the JS ramp — no CSS transform transition while magnifying */
  transition: none;
}

.image-magnify.is-magnifying {
  z-index: 5;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

@media (hover: none), (pointer: coarse) {
  .image-magnify {
    cursor: default;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-magnify {
    transition: none;
  }
}

/* Centered copy confirmation (eDPI / sensitivity / shared tools) */
.copy-feedback-portal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.copy-feedback-portal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.copy-feedback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.copy-feedback {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 20rem);
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: #1a2744;
  color: #f8fafc;
  padding: 1.35rem 1.25rem 1.2rem;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.08),
    0 22px 55px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.copy-feedback-portal.is-open .copy-feedback.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.copy-feedback.is-error {
  border-color: rgba(248, 113, 113, 0.35);
}

.copy-feedback.is-error .copy-feedback-icon {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.3);
}

.copy-feedback-icon {
  display: inline-flex;
  height: 2.6rem;
  width: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
}

.copy-feedback-icon-svg {
  height: 1.2rem;
  width: 1.2rem;
}

.copy-feedback-message {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: #f8fafc;
}

@media (prefers-reduced-motion: reduce) {
  .copy-feedback,
  .copy-feedback-portal {
    transition: none;
  }
}

/* Centered compare confirmation popup (site blue) */
.compare-toast-portal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.compare-toast-portal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

html.filters-drawer-open .compare-toast-portal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.compare-toast-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.compare-toast {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 24rem);
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: #1a2744;
  color: #f8fafc;
  padding: 1.5rem 1.35rem 1.25rem;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.compare-toast-portal.is-open .compare-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.compare-toast.is-error {
  border-color: rgba(248, 113, 113, 0.35);
}

.compare-toast.is-error .compare-toast-icon {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.3);
}

.compare-toast-icon {
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
}

.compare-toast-icon-svg {
  height: 1.25rem;
  width: 1.25rem;
}

.compare-toast-message {
  margin: 0;
  max-width: 20rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: #f8fafc;
}

.compare-toast-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.compare-toast-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  white-space: nowrap;
  border-radius: 9999px;
  border: none;
  background: #0ea5e9;
  color: #ffffff;
  padding: 0.65rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.15s ease;
}

.compare-toast-action:hover,
.compare-toast-action:focus-visible {
  background: #38bdf8;
  outline: none;
}

.compare-toast-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: #cbd5e1;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.compare-toast-dismiss:hover,
.compare-toast-dismiss:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .compare-cta-link.compare-link-pulse,
  .compare-cta-count.compare-count-bump {
    animation: none;
  }

  .compare-add-button-tooltip,
  .compare-toast,
  .compare-toast-portal {
    transition: none;
  }
}

html.light {
  color-scheme: dark;
  background: #181818;
}

html.light body {
  background: #181818;
  color: #e2e8f0;
}

html.light body:has(.mice-directory-page) {
  background: #181818;
  color: #e2e8f0;
}

html.theme-light body:has(.mice-directory-page) {
  background: #181818;
  color: #e2e8f0;
}

html.theme-light body:has(.mice-directory-page) main {
  background: #181818;
}

.mice-directory-page {
  background: #181818;
}

.theme-light .mice-directory-page {
  background: #181818 !important;
  color: #e2e8f0;
}

.theme-light .mice-directory-page [data-mouse-filters-v2-target="drawer"] {
  background: #020617 !important;
  border-color: #334155 !important;
}

.theme-light .mice-directory-page .mice-filter-section {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: #334155 !important;
}

.theme-light .mice-directory-page .bg-\[\#181818\],
.theme-light .mice-directory-page .bg-slate-950,
.theme-light .mice-directory-page .bg-slate-950\/90,
.theme-light .mice-directory-page .bg-[#0d1b45],
.theme-light .mice-directory-page .bg-[#0d1b45]\/90,
.theme-light .mice-directory-page .bg-[#0d1b45]\/85,
.theme-light .mice-directory-page .bg-[#0d1b45]\/80,
.theme-light .mice-directory-page .bg-slate-800 {
  background-color: inherit;
}

.theme-light .mice-directory-page .bg-\[\#181818\] {
  background-color: #181818 !important;
}

.theme-light .mice-directory-page .bg-slate-950,
.theme-light .mice-directory-page .bg-slate-950\/90 {
  background-color: #020617 !important;
}

.theme-light .mice-directory-page .bg-[#0d1b45],
.theme-light .mice-directory-page .bg-[#0d1b45]\/90,
.theme-light .mice-directory-page .bg-[#0d1b45]\/85,
.theme-light .mice-directory-page .bg-[#0d1b45]\/80 {
  background-color: #0f172a !important;
}

.theme-light .mice-directory-page .bg-slate-800 {
  background-color: #1e293b !important;
}

.theme-light .mice-directory-page .border-slate-800,
.theme-light .mice-directory-page .border-slate-700,
.theme-light .mice-directory-page .border-slate-600,
.theme-light .mice-directory-page .border-slate-500 {
  border-color: #334155 !important;
}

.theme-light .mice-directory-page .divide-slate-800 > :not([hidden]) ~ :not([hidden]) {
  border-color: #334155 !important;
}

.theme-light .mice-directory-page .text-slate-100,
.theme-light .mice-directory-page .text-slate-200,
.theme-light .mice-directory-page .text-white {
  color: #f8fafc !important;
}

.theme-light .mice-directory-page .text-slate-300,
.theme-light .mice-directory-page .text-slate-400,
.theme-light .mice-directory-page .text-gray-400,
.theme-light .mice-directory-page .text-gray-500,
.theme-light .mice-directory-page .text-gray-600,
.theme-light .mice-directory-page .text-gray-700 {
  color: #94a3b8 !important;
}

.theme-light .mice-directory-page select,
.theme-light .mice-directory-page input[type="search"],
.theme-light .mice-directory-page input[type="number"],
.theme-light .mice-directory-page select[multiple] {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

.theme-light .mice-directory-page select option {
  background: #0f172a;
  color: #e2e8f0;
}

.mice-directory-page #mouse-filters-form {
  color: #e2e8f0;
}

.mice-directory-page #mouse-filters-form section {
  backdrop-filter: blur(10px);
}

.mice-directory-page #mouse-filters-form button,
.mice-directory-page #mouse-filters-form label,
.mice-directory-page #mouse-filters-form h2,
.mice-directory-page #mouse-filters-form p,
.mice-directory-page #mouse-filters-form span {
  color: inherit;
}

.mice-directory-page #mouse-filters-form [data-controller="accordion"] > button {
  color: #f8fafc;
}

.mice-directory-page #mouse-filters-form [data-accordion-target="toggleIcon"] {
  color: #94a3b8;
}

.mice-directory-page #mouse-filters-form .text-gray-700,
.mice-directory-page #mouse-filters-form .text-gray-600,
.mice-directory-page #mouse-filters-form .text-gray-500 {
  color: #94a3b8 !important;
}

.mice-directory-page #mouse-filters-form select,
.mice-directory-page #mouse-filters-form input[type="search"],
.mice-directory-page #mouse-filters-form input[type="number"] {
  color: #e2e8f0;
}

.mice-directory-page #mouse-filters-form select option {
  background: #0f172a;
  color: #e2e8f0;
}

.mice-directory-page #mouse-filters-form .multi-range-slider > .bg-gray-200 {
  background: #334155 !important;
}

.mice-directory-page #mouse-filters-form .multi-range-slider > .bg-blue-600 {
  background: #2563eb !important;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.25);
}

.mice-directory-page #mouse-filters-form .multi-range-slider input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0 0 0 2px #1e3a8a;
}

.mice-directory-page #mouse-filters-form .multi-range-slider input[type="range"]::-moz-range-thumb {
  box-shadow: 0 0 0 2px #1e3a8a;
}

.mice-directory-page #mouse-filters-form .color-filter-row,
.mice-directory-page #mouse-filters-form #color-filter-list,
.mice-directory-page #mouse-filters-form select[multiple],
.mice-directory-page #mouse-filters-form .max-h-64 {
  scrollbar-color: #64748b #0f172a;
}

.theme-light .bg-slate-950,
.theme-light .bg-slate-950\/95,
.theme-light .bg-slate-950\/80,
.theme-light .bg-slate-950\/70,
.theme-light .bg-[#0d1b45],
.theme-light .bg-[#0d1b45]\/90,
.theme-light .bg-[#0d1b45]\/70 {
  background-color: #ffffff !important;
}

.theme-light .bg-slate-800,
.theme-light .bg-slate-950\/70,
.theme-light .bg-slate-950\/95,
.theme-light .bg-[#0d1b45]\/70,
.theme-light .bg-[#0d1b45]\/90 {
  background-color: #f8fafc !important;
}

.theme-light .bg-black,
.theme-light .bg-black\/95,
.theme-light .bg-\[\#181818\],
.theme-light .bg-\[\#181818\]\/95 {
  background-color: #ffffff !important;
}

.theme-light .text-white {
  color: #0f172a !important;
}

.theme-light .text-gray-200,
.theme-light .text-gray-300,
.theme-light .text-gray-400 {
  color: #475569 !important;
}

.theme-light .hover\:bg-gray-700:hover,
.theme-light .hover\:bg-gray-800:hover {
  background-color: #e2e8f0 !important;
}

.theme-light .border-slate-800,
.theme-light .border-slate-700,
.theme-light .border-slate-600 {
  border-color: #cbd5e1 !important;
}

.theme-light .text-slate-100,
.theme-light .text-slate-200 {
  color: #0f172a !important;
}

.theme-light .text-slate-300 {
  color: #334155 !important;
}

.theme-light .text-slate-400 {
  color: #475569 !important;
}

.theme-light .text-slate-500 {
  color: #64748b !important;
}

.theme-light .hover\:bg-slate-800:hover,
.theme-light .hover\:bg-slate-700:hover,
.theme-light .hover\:bg-blue-950\/40:hover {
  background-color: #f1f5f9 !important;
}

.theme-light .hover\:text-blue-300:hover {
  color: #1d4ed8 !important;
}

.dark .bg-white {
  background-color: #0f172a !important;
}

.dark .bg-white\/90 {
  background-color: rgba(15, 23, 42, 0.9) !important;
}

.dark .bg-white\/95 {
  background-color: rgba(15, 23, 42, 0.95) !important;
}

.mouse-card-image-surface,
.mouse-card-image-picture,
.mouse-card-image {
  background: #ffffff !important;
}

.mouse-card-image-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.dark .bg-gray-50 {
  background-color: #111827 !important;
}

.dark .bg-gray-100 {
  background-color: #1e293b !important;
}

.dark .bg-gray-200,
.dark .bg-gray-300 {
  background-color: #334155 !important;
}

.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-300,
.dark .border-slate-100,
.dark .border-slate-200,
.dark .border-slate-300,
.dark .border-blue-100 {
  border-color: #334155 !important;
}

.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: #334155 !important;
}

.dark .text-black,
.dark .text-gray-900,
.dark .text-slate-900,
.dark .text-\[\#181818\] {
  color: #f8fafc !important;
}

.dark .text-gray-800,
.dark .text-slate-800 {
  color: #e2e8f0 !important;
}

.dark .text-gray-700,
.dark .text-slate-700 {
  color: #cbd5e1 !important;
}

.dark .text-gray-600,
.dark .text-gray-500,
.dark .text-slate-600,
.dark .text-slate-500 {
  color: #94a3b8 !important;
}

.dark .text-gray-400,
.dark .text-slate-400 {
  color: #64748b !important;
}

.dark .text-blue-500,
.dark .text-blue-600,
.dark .text-blue-700 {
  color: #60a5fa !important;
}

.dark .hover\:bg-gray-50:hover,
.dark .hover\:bg-gray-100:hover,
.dark .hover\:bg-slate-50:hover {
  background-color: #1e293b !important;
}

.dark .hover\:text-gray-700:hover,
.dark .hover\:text-gray-800:hover,
.dark .hover\:text-slate-700:hover {
  color: #e2e8f0 !important;
}

.dark .hover\:text-blue-700:hover,
.dark .hover\:text-blue-600:hover,
.dark .group:hover .group-hover\:text-blue-700 {
  color: #93c5fd !important;
}

.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.dark select,
.dark textarea {
  background-color: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
}

/* Embedded calculator fields: label lives in the outer shell, so the control
   must stay transparent (otherwise global dark form styles paint a thin bar). */
.calc-field {
  min-height: 3.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.calc-field select,
.dark .calc-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.dark .calc-field select {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: #f1f5f9 !important;
  min-height: 1.75rem;
  height: 1.75rem;
  line-height: 1.75rem;
  font-size: 0.9375rem;
  width: 100%;
}

.calc-field select {
  cursor: pointer;
}

.calc-field select option,
.dark .calc-field select option {
  background-color: #1c1e23;
  color: #f1f5f9;
  font-size: 0.9375rem;
  padding: 0.65rem 0.85rem;
  min-height: 2.25rem;
  line-height: 1.5;
}

.calc-field input::placeholder {
  color: #64748b !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
  color: #64748b;
}

.dark input[type="checkbox"],
.dark input[type="radio"] {
  accent-color: #3b82f6;
}

.dark option {
  background-color: #0f172a;
  color: #e2e8f0;
}

.dark [data-controller="mouse-filters-v2"] section {
  background: rgba(15, 23, 42, 0.72);
  border-color: #334155;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

.dark .prose,
.dark .prose p,
.dark .prose li,
.dark .prose span {
  color: #cbd5e1;
}

.dark .prose h1,
.dark .prose h2,
.dark .prose h3,
.dark .prose h4,
.dark .prose strong,
.dark .prose b {
  color: #f8fafc;
}

.dark .dpi-card,
.dark .dpi-panel {
  background: #1a2744;
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.dark .dpi-card__value,
.dark .dpi-panel__title {
  color: #f8fafc;
}

.dark .dpi-input,
.dark .dpi-input:focus {
  background: transparent;
  border-color: transparent;
  color: #e2e8f0;
}

.dark .dpi-track {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dark .dpi-track__rail {
  background: rgba(148, 163, 184, 0.35);
}

.dark .dpi-track__progress {
  background: #38bdf8;
}

.dark .dpi-target-circle,
.dark .dpi-crosshair__dot {
  background: #0b1220;
}

.dark .dpi-crosshair__hint {
  color: #94a3b8;
}

.dark .dpi-track--recording .dpi-track__rail {
  background: rgba(248, 113, 113, 0.55);
}

/* Unit select inside DPI analyzer distance field */
#dpi-analyzer #dpi-unit {
  background-color: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
  min-height: 1.5rem;
  height: auto;
  line-height: 1.25rem;
  font-size: 0.875rem;
  padding: 0.2rem 0.45rem;
}

/* Gaming mouse graphic — dark theme defaults (site is dark) */

.dark .keycap {
  border-color: #334155;
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.05);
}

.dark .keycap-code {
  color: rgba(226, 232, 240, 0.55);
}

.mouse-part {
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.mouse-part--active {
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.9);
  opacity: 1 !important;
  transform: translateY(1px);
}

.mouse-part--tested:not(.mouse-part--active) {
  opacity: 0.65 !important;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.4);
}

.mouse-part.scroll-arrow {
  color: #e5e7eb;
}

.mouse-part.scroll-arrow.mouse-part--active {
  color: #38bdf8;
}

.mouse-part.scroll-arrow.mouse-part--tested:not(.mouse-part--active) {
  color: #bae6fd;
}

.mouse-test-status--active {
  border-color: rgba(56, 189, 248, 0.45) !important;
  background: rgba(14, 165, 233, 0.12) !important;
  color: #e0f2fe !important;
}

.mouse-test-status--tested {
  border-color: rgba(52, 211, 153, 0.35) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #d1fae5 !important;
}

.dpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.dpi-card__label {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.dpi-card__value {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
}

.dpi-card__value--split {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.dpi-input {
  width: 100%;
  border: 1px solid #cbd5f5;
  border-radius: 0.75rem;
  padding: 0.35rem 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  background: #ffffff;
  transition: border 120ms ease, box-shadow 120ms ease;
}

.dpi-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.dpi-input--select {
  padding-right: 2rem;
  min-width: 7rem;
  flex: 1 1 auto;
}

.dpi-input--compact {
  width: 6rem;
  flex: 0 0 auto;
}

.dpi-metric {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: #0f172a;
  color: #f1f5f9;
}

.dpi-metric__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.7);
}

.dpi-metric__value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.dpi-track {
  position: relative;
  height: 132px;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 25px 50px rgba(15, 23, 42, 0.08);
  overflow: visible;
  --track-start: 10%;
  --track-end: 90%;
  --crosshair-position: var(--track-start);
  --target-position: var(--track-end);
}

.dpi-track[data-axis="x-"] {
  --crosshair-position: var(--track-end);
  --target-position: var(--track-start);
}

.dpi-track__rail {
  position: absolute;
  top: 50%;
  left: var(--track-start);
  right: calc(100% - var(--track-end));
  height: 4px;
  background: #cbd5f5;
  transform: translateY(-50%);
}

.dpi-track__progress {
  position: absolute;
  top: 50%;
  left: var(--track-start);
  height: 4px;
  transform: translateY(-50%);
  width: 0;
  background: #38bdf8;
  transition: width 80ms linear;
  transform-origin: left center;
}

.dpi-track[data-axis="x-"] .dpi-track__progress {
  left: auto;
  right: calc(100% - var(--track-end));
  transform-origin: right center;
}

.dpi-track__target {
  position: absolute;
  top: 50%;
  left: var(--target-position);
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 2;
}

.dpi-target-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
  background: #ffffff;
}

.dpi-target-circle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
}

.dpi-target-label {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #22c55e;
  font-weight: 600;
}

.dpi-crosshair {
  position: absolute;
  top: 50%;
  left: var(--crosshair-position);
  transform: translate(-50%, -50%);
  border: none;
  background: none;
  cursor: grab;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  z-index: 2;
}

.dpi-crosshair__hint {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.dpi-crosshair__dot {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #ffffff;
}

.dpi-crosshair__dot::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #ef4444;
}

.dpi-crosshair--active {
  cursor: grabbing;
}

.dpi-track--recording .dpi-track__rail {
  background: #fca5a5;
}

.dpi-panel {
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.75rem;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
}

.dpi-panel__title {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.dpi-panel__subtitle {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: #38bdf8;
}

/* ---------------------------------------------------------------------------
   Modern gaming mouse graphic (mouse tester)
   --------------------------------------------------------------------------- */

.mouse-visual {
  width: 220px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 0 0.5rem;
  background: transparent;
}

.mouse-shell {
  position: relative;
  width: 200px;
  height: 360px;
  margin: 0 auto;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.45));
}

/* Soft RGB under-glow */
.mouse-rgb {
  position: absolute;
  inset: 8% 6% 4%;
  border-radius: 48% 48% 46% 46% / 28% 28% 58% 58%;
  background: radial-gradient(ellipse at 50% 70%, rgba(56, 189, 248, 0.35), transparent 68%),
    radial-gradient(ellipse at 50% 20%, rgba(99, 102, 241, 0.22), transparent 55%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
  animation: mouse-rgb-pulse 4.5s ease-in-out infinite;
}

@keyframes mouse-rgb-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.mouse-top {
  position: relative;
  z-index: 2;
  display: flex;
  height: 148px;
  width: 100%;
  overflow: hidden;
  border-radius: 100px 100px 8px 8px / 92px 92px 8px 8px;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  border-bottom: none;
  background: linear-gradient(180deg, #2a3a58 0%, #1a2744 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.mouse-button {
  position: relative;
  flex: 1;
  background: linear-gradient(165deg, #3d516f 0%, #243352 48%, #1a2744 100%);
  transition: background 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  overflow: hidden;
}

.mouse-button-gloss {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, transparent 42%);
  pointer-events: none;
}

.mouse-button--left {
  border-right: 1px solid rgba(15, 23, 42, 0.55);
  border-top-left-radius: 100px 92px;
}

.mouse-button--right {
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  border-top-right-radius: 100px 92px;
}

.mouse-button.mouse-part--active {
  background: linear-gradient(165deg, #38bdf8 0%, #2563eb 55%, #1d4ed8 100%);
  filter: brightness(1.08);
}

.mouse-button.mouse-part--tested:not(.mouse-part--active) {
  background: linear-gradient(165deg, #334e72 0%, #1e3a5f 50%, #16304f 100%);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35);
  opacity: 1 !important;
}

.mouse-scroll {
  pointer-events: none;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  z-index: 4;
}

.mouse-wheel {
  height: 72px;
  width: 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(148, 163, 184, 0.55);
  background:
    repeating-linear-gradient(
      180deg,
      #0b1220 0px,
      #0b1220 3px,
      #334155 3px,
      #334155 5px
    );
  box-shadow:
    0 0 0 3px rgba(14, 165, 233, 0.18),
    0 0 16px rgba(56, 189, 248, 0.35),
    inset 0 0 8px rgba(0, 0, 0, 0.55);
}

.mouse-wheel.mouse-part--active {
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.55),
    0 0 22px rgba(56, 189, 248, 0.65),
    inset 0 0 8px rgba(0, 0, 0, 0.4);
  border-color: #7dd3fc;
}

.mouse-wheel.mouse-part--tested:not(.mouse-part--active) {
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.3),
    0 0 12px rgba(56, 189, 248, 0.25);
  opacity: 1 !important;
}

.mouse-part.scroll-arrow {
  font-size: 0.55rem;
  line-height: 1;
  color: rgba(148, 163, 184, 0.75);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.mouse-part.scroll-arrow.mouse-part--active {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.9);
  transform: none;
}

.mouse-part.scroll-arrow.mouse-part--tested:not(.mouse-part--active) {
  color: #7dd3fc;
}

.mouse-body {
  position: relative;
  z-index: 1;
  height: 210px;
  width: 100%;
  margin: -2px auto 0;
  border-radius: 12px 12px 100px 100px / 18px 18px 120px 120px;
  border: 1.5px solid rgba(148, 163, 184, 0.28);
  border-top: none;
  background:
    radial-gradient(ellipse 70% 40% at 50% 18%, rgba(56, 189, 248, 0.08), transparent 70%),
    linear-gradient(180deg, #1e2d4a 0%, #121c33 42%, #0b1220 100%);
  box-shadow:
    inset 0 12px 28px rgba(0, 0, 0, 0.35),
    inset 0 -20px 40px rgba(2, 6, 23, 0.5);
  overflow: hidden;
}

.mouse-body-texture {
  position: absolute;
  inset: 12% 14% 22%;
  border-radius: 40% 40% 48% 48% / 30% 30% 55% 55%;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(148, 163, 184, 0.07) 0.6px, transparent 0.8px);
  background-size: 7px 7px;
  opacity: 0.9;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}

.mouse-dpi-dots {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  pointer-events: none;
}

.mouse-dpi-dots i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #0ea5e9;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.8);
  opacity: 0.85;
}

.mouse-dpi-dots i:nth-child(2) {
  opacity: 0.55;
}

.mouse-dpi-dots i:nth-child(3) {
  opacity: 0.3;
}

.mouse-sensor {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 40% 35%, #f87171 0%, #991b1b 55%, #450a0a 100%);
  box-shadow:
    0 0 12px rgba(239, 68, 68, 0.55),
    inset 0 0 4px rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.mouse-body.mouse-part--active {
  box-shadow:
    inset 0 12px 28px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(56, 189, 248, 0.5);
}

.mouse-side {
  position: absolute;
  left: -14px;
  top: 152px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 5;
}

.mouse-side-button {
  width: 20px;
  height: 42px;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
  border: 1.5px solid rgba(100, 116, 139, 0.65);
  border-right: none;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: rgba(148, 163, 184, 0.75);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 2px 0 6px rgba(255, 255, 255, 0.06),
    -2px 2px 8px rgba(0, 0, 0, 0.35);
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.mouse-side-button.mouse-part--active {
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
  color: #fff;
  border-color: #7dd3fc;
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.55),
    inset 2px 0 6px rgba(255, 255, 255, 0.2);
  opacity: 1 !important;
  transform: translateX(-1px);
}

.mouse-side-button.mouse-part--tested:not(.mouse-part--active) {
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  opacity: 1 !important;
}

/* Soft rubberized side grips */
.mouse-grip {
  position: absolute;
  z-index: 0;
  width: 22px;
  height: 120px;
  top: 168px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.75));
  border: 1px solid rgba(71, 85, 105, 0.5);
  pointer-events: none;
}

.mouse-grip--left {
  left: 4px;
  border-radius: 18px 6px 14px 40px;
  transform: rotate(-4deg);
}

.mouse-grip--right {
  right: 4px;
  border-radius: 6px 18px 40px 14px;
  transform: rotate(4deg);
}

.keycap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-width: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
  box-shadow: inset 0 -2px 0 rgba(15, 23, 42, 0.07);
  transition: background 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.keycap--active {
  border-color: #dbeafe;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 18px rgba(148, 163, 184, 0.28);
  transform: translateY(1px);
}

.keycap--tested:not(.keycap--active) {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #0f172a;
  box-shadow: inset 0 -2px 0 rgba(30, 64, 175, 0.15);
}

.keycap--active .keycap-code,
.keycap--tested .keycap-code {
  color: rgba(15, 23, 42, 0.58);
}

.keycap-label {
  font-size: 0.95rem;
}

.keycap-code {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(15, 23, 42, 0.5);
}

.keycap--wide {
  min-width: 4rem;
}

.keycap--xl {
  min-width: 5.5rem;
}

.keycap--space {
  flex: 1;
  min-width: 12rem;
}

.keycap--arrow {
  align-items: center;
  text-align: center;
  min-width: 3.25rem;
}

.multi-range-slider {
  position: relative;
}

.multi-range-slider input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  margin: 0;
  width: 100%;
  height: 8px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.multi-range-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
  border: none;
}

.multi-range-slider input[type="range"]::-moz-range-track {
  height: 8px;
  background: transparent;
  border: none;
}

.multi-range-slider input[type="range"]::-ms-track {
  height: 8px;
  background: transparent;
  border: none;
  color: transparent;
}

.multi-range-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 9999px;
  background: #1d4ed8;
  border: 2px solid #ffffff;
  margin-top: -4px;

}

.multi-range-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  height: 16px;
  width: 16px;
  border-radius: 9999px;
  background: #1d4ed8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #1d4ed8;
}

.multi-range-slider input[type="range"]::-ms-thumb {
  pointer-events: auto;
  height: 16px;
  width: 16px;
  border-radius: 9999px;
  background: #1d4ed8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #1d4ed8;
}

/* Homepage tools panel — gold NEW / status chip */
.tool-rail-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-width: 2.65rem;
  height: 1.65rem;
  padding: 0 0.5rem;
  border-radius: 0.45rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.tool-rail-badge--gold {
  background: #d4a017;
  color: #1a1405;
  border: 1px solid rgba(212, 160, 23, 0.9);
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.28);
}

.tool-rail-badge--blue {
  background: rgba(37, 99, 235, 0.28);
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.tool-rail-badge--fire {
  background: #ff3b1f;
  color: #fff7ed;
  border: 1px solid rgba(255, 200, 80, 0.75);
  box-shadow:
    0 0 12px rgba(255, 60, 0, 0.65),
    0 0 22px rgba(255, 120, 0, 0.35);
  animation: tool-rail-fire-badge-pulse 1.4s ease-in-out infinite;
}

/* ---------------------------------------------------------------------------
   Mouse Hunt — fire rail card (hover + active)
   --------------------------------------------------------------------------- */

.tool-rail-fire {
  border-color: rgba(255, 80, 30, 0.35) !important;
  background:
    radial-gradient(120% 140% at 10% 120%, rgba(255, 60, 0, 0.22), transparent 55%),
    radial-gradient(90% 100% at 90% 110%, rgba(255, 160, 0, 0.12), transparent 50%),
    rgba(20, 8, 6, 0.55) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 90, 40, 0.12);
}

.tool-rail-fire__embers {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 70%, rgba(255, 220, 120, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 28% 85%, rgba(255, 120, 40, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 55% 78%, rgba(255, 200, 80, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 72% 90%, rgba(255, 90, 30, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 88% 68%, rgba(255, 170, 60, 0.7), transparent);
  animation: tool-rail-embers 2.4s linear infinite;
}

.tool-rail-fire__flame {
  pointer-events: none;
  position: absolute;
  bottom: -18%;
  width: 2.1rem;
  height: 2.6rem;
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(ellipse at 50% 80%, #fff3a0 0%, #ffb020 28%, #ff4d00 62%, transparent 78%);
  filter: blur(0.5px);
  opacity: 0.35;
  mix-blend-mode: screen;
  transform-origin: 50% 100%;
  animation: tool-rail-flame 0.9s ease-in-out infinite alternate;
}

.tool-rail-fire__flame--a {
  left: 8%;
  animation-delay: 0s;
}

.tool-rail-fire__flame--b {
  left: 42%;
  width: 2.5rem;
  height: 3rem;
  opacity: 0.42;
  animation-delay: 0.18s;
}

.tool-rail-fire__flame--c {
  right: 10%;
  left: auto;
  width: 1.9rem;
  height: 2.4rem;
  opacity: 0.32;
  animation-delay: 0.32s;
}

.tool-rail-fire__icon {
  background: rgba(255, 60, 20, 0.22) !important;
  color: #ffb4a0 !important;
  box-shadow: 0 0 14px rgba(255, 70, 20, 0.35);
}

.tool-rail-fire__title {
  color: #fff1e8 !important;
}

.tool-rail-fire__desc {
  color: #f0a090 !important;
}

/* Hover: turn the heat up */
.tool-rail-fire:hover,
.tool-rail-fire:focus-visible {
  border-color: rgba(255, 120, 40, 0.75) !important;
  background:
    radial-gradient(120% 160% at 20% 120%, rgba(255, 50, 0, 0.45), transparent 58%),
    radial-gradient(100% 120% at 85% 100%, rgba(255, 180, 0, 0.28), transparent 55%),
    rgba(40, 8, 4, 0.85) !important;
  box-shadow:
    0 0 0 1px rgba(255, 140, 40, 0.35),
    0 10px 28px rgba(255, 40, 0, 0.35),
    inset 0 0 24px rgba(255, 80, 0, 0.18);
  transform: translateY(-1px);
}

.tool-rail-fire:hover .tool-rail-fire__flame,
.tool-rail-fire:focus-visible .tool-rail-fire__flame {
  opacity: 0.85;
  animation-duration: 0.55s;
  filter: blur(0.2px) saturate(1.25);
}

.tool-rail-fire:hover .tool-rail-fire__embers,
.tool-rail-fire:focus-visible .tool-rail-fire__embers {
  opacity: 1;
  animation-duration: 1.2s;
}

.tool-rail-fire:hover .tool-rail-fire__icon,
.tool-rail-fire:focus-visible .tool-rail-fire__icon {
  background: rgba(255, 70, 20, 0.4) !important;
  color: #ffe0c8 !important;
  box-shadow: 0 0 18px rgba(255, 90, 20, 0.65);
  transform: scale(1.06);
}

.tool-rail-fire:hover .tool-rail-badge--fire,
.tool-rail-fire:focus-visible .tool-rail-badge--fire {
  background: #ff2a00;
  box-shadow:
    0 0 16px rgba(255, 50, 0, 0.9),
    0 0 28px rgba(255, 160, 0, 0.45);
  transform: scale(1.08) rotate(-2deg);
}

/* Active page: always lit */
.tool-rail-fire--active,
.tool-rail-fire.is-active {
  border-color: rgba(255, 140, 50, 0.85) !important;
  background:
    radial-gradient(130% 160% at 15% 120%, rgba(255, 45, 0, 0.5), transparent 58%),
    radial-gradient(110% 130% at 90% 100%, rgba(255, 190, 40, 0.32), transparent 55%),
    rgba(48, 10, 4, 0.92) !important;
  box-shadow:
    0 0 0 1px rgba(255, 150, 50, 0.4),
    0 12px 32px rgba(255, 40, 0, 0.4),
    inset 0 0 28px rgba(255, 90, 0, 0.22);
}

.tool-rail-fire--active .tool-rail-fire__flame,
.tool-rail-fire.is-active .tool-rail-fire__flame {
  opacity: 0.9;
  animation-duration: 0.5s;
}

.tool-rail-fire--active .tool-rail-fire__embers,
.tool-rail-fire.is-active .tool-rail-fire__embers {
  opacity: 1;
}

.tool-rail-fire--active .tool-rail-fire__icon,
.tool-rail-fire.is-active .tool-rail-fire__icon {
  background: rgba(255, 80, 20, 0.45) !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(255, 100, 20, 0.75);
}

@keyframes tool-rail-flame {
  0% {
    transform: translateY(4px) scaleX(0.92) scaleY(0.95) rotate(-4deg);
  }
  50% {
    transform: translateY(0) scaleX(1.05) scaleY(1.12) rotate(3deg);
  }
  100% {
    transform: translateY(-2px) scaleX(0.96) scaleY(1.05) rotate(-2deg);
  }
}

@keyframes tool-rail-embers {
  0% {
    transform: translateY(0);
    opacity: 0.45;
  }
  50% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-10px);
    opacity: 0.35;
  }
}

@keyframes tool-rail-fire-badge-pulse {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(255, 60, 0, 0.55),
      0 0 18px rgba(255, 120, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 16px rgba(255, 50, 0, 0.85),
      0 0 28px rgba(255, 160, 0, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-rail-fire__flame,
  .tool-rail-fire__embers,
  .tool-rail-badge--fire {
    animation: none !important;
  }

  .tool-rail-fire:hover {
    transform: none;
  }
}

/* Homepage tools panel — red PLAY chip on Popular tools */
.tool-play-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 2.65rem;
  height: 1.65rem;
  padding: 0 0.45rem;
  border-radius: 0.45rem;
  background: #cd1042;
  color: #fff;
  box-shadow: 0 6px 16px rgba(205, 16, 66, 0.35);
  transform-origin: center;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.tool-play-btn__label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}

.tool-play-btn__spark {
  position: absolute;
  top: -0.35rem;
  right: -0.3rem;
  font-size: 0.55rem;
  line-height: 1;
  color: #fecdd3;
  opacity: 0.95;
  transform: rotate(12deg) scale(0.9);
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease;
}

/* Fun hover: jump + slight turn + spark pop */
.group:hover .tool-play-btn,
.group:focus-visible .tool-play-btn {
  background: #e11d48;
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.45);
  animation: tool-play-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group:hover .tool-play-btn__spark,
.group:focus-visible .tool-play-btn__spark {
  opacity: 1;
  animation: tool-play-spark 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tool-play-bounce {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  35% {
    transform: translateY(-5px) rotate(-10deg) scale(1.12);
  }
  60% {
    transform: translateY(-1px) rotate(8deg) scale(1.06);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1.04);
  }
}

@keyframes tool-play-spark {
  0% {
    transform: rotate(12deg) scale(0.85);
  }
  40% {
    transform: rotate(28deg) scale(1.35) translate(1px, -2px);
  }
  100% {
    transform: rotate(18deg) scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .group:hover .tool-play-btn,
  .group:focus-visible .tool-play-btn,
  .group:hover .tool-play-btn__spark,
  .group:focus-visible .tool-play-btn__spark {
    animation: none;
  }

  .group:hover .tool-play-btn,
  .group:focus-visible .tool-play-btn {
    transform: scale(1.05);
  }
}
/* ---------------------------------------------------------------------------
   Tool fullscreen mode
   Wrap interactive tool UI with data-controller="tool-fullscreen".
   --------------------------------------------------------------------------- */

.tool-fullscreen-shell {
  position: relative;
}

.tool-fullscreen-shell:fullscreen,
.tool-fullscreen-shell:-webkit-full-screen,
.tool-fullscreen-shell.is-tool-fullscreen {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0 !important;
  border: none !important;
  display: flex;
  flex-direction: column;
  background: #1a2744;
  padding: 1rem;
  overflow: auto;
  box-shadow: none !important;
}

.tool-fullscreen-shell.is-tool-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
}

html.tool-fullscreen-open,
body.tool-fullscreen-open {
  overflow: hidden;
}


.tool-fullscreen-shell:fullscreen .tool-fullscreen-pad,
.tool-fullscreen-shell:-webkit-full-screen .tool-fullscreen-pad,
.tool-fullscreen-shell.is-tool-fullscreen .tool-fullscreen-pad,
.tool-fullscreen-shell:fullscreen #tool-pad,
.tool-fullscreen-shell:-webkit-full-screen #tool-pad,
.tool-fullscreen-shell.is-tool-fullscreen #tool-pad,
.tool-fullscreen-shell:fullscreen #tool-canvas,
.tool-fullscreen-shell:-webkit-full-screen #tool-canvas,
.tool-fullscreen-shell.is-tool-fullscreen #tool-canvas,
.tool-fullscreen-shell:fullscreen #mouse-click-pad,
.tool-fullscreen-shell:-webkit-full-screen #mouse-click-pad,
.tool-fullscreen-shell.is-tool-fullscreen #mouse-click-pad,
.tool-fullscreen-shell:fullscreen #reaction-panel,
.tool-fullscreen-shell:-webkit-full-screen #reaction-panel,
.tool-fullscreen-shell.is-tool-fullscreen #reaction-panel,
.tool-fullscreen-shell:fullscreen #aim-arena,
.tool-fullscreen-shell:-webkit-full-screen #aim-arena,
.tool-fullscreen-shell.is-tool-fullscreen #aim-arena,
.tool-fullscreen-shell:fullscreen #apm-board-wrap,
.tool-fullscreen-shell:-webkit-full-screen #apm-board-wrap,
.tool-fullscreen-shell.is-tool-fullscreen #apm-board-wrap,
.tool-fullscreen-shell:fullscreen #dpi-track,
.tool-fullscreen-shell:-webkit-full-screen #dpi-track,
.tool-fullscreen-shell.is-tool-fullscreen #dpi-track,
.tool-fullscreen-shell:fullscreen #polling-lock-panel,
.tool-fullscreen-shell:-webkit-full-screen #polling-lock-panel,
.tool-fullscreen-shell.is-tool-fullscreen #polling-lock-panel,
.tool-fullscreen-shell:fullscreen #typing-stage,
.tool-fullscreen-shell:-webkit-full-screen #typing-stage,
.tool-fullscreen-shell.is-tool-fullscreen #typing-stage {
  flex: 1 1 auto;
  min-height: min(70vh, 720px);
  height: auto;
}

.tool-fullscreen-shell:fullscreen .cs2-crosshair-generator__preview-shell,
.tool-fullscreen-shell:-webkit-full-screen .cs2-crosshair-generator__preview-shell,
.tool-fullscreen-shell.is-tool-fullscreen .tool-fullscreen-pad.overflow-hidden > .relative {
  min-height: min(50vh, 480px);
}


.tool-fullscreen-shell:fullscreen .tool-fullscreen-stats,
.tool-fullscreen-shell:-webkit-full-screen .tool-fullscreen-stats,
.tool-fullscreen-shell.is-tool-fullscreen .tool-fullscreen-stats {
  flex-shrink: 0;
}

.tool-fullscreen-shell:fullscreen .tool-fullscreen-controls,
.tool-fullscreen-shell:-webkit-full-screen .tool-fullscreen-controls,
.tool-fullscreen-shell.is-tool-fullscreen .tool-fullscreen-controls,
.tool-fullscreen-shell:fullscreen .tool-fullscreen-toolbar,
.tool-fullscreen-shell:-webkit-full-screen .tool-fullscreen-toolbar,
.tool-fullscreen-shell.is-tool-fullscreen .tool-fullscreen-toolbar {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .tool-fullscreen-shell:fullscreen,
  .tool-fullscreen-shell:-webkit-full-screen,
  .tool-fullscreen-shell.is-tool-fullscreen {
    padding: 1.25rem 1.5rem;
  }
}
