/*
 * 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;
}

/* Titles live inside the play surface. While idle the name stays readable;
   once the run replaces the status line, the title hides and the status grows. */
.play-surface-title {
  font-size: clamp(1.875rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.play-surface-status {
  margin-top: 0.85rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  line-height: 1.15;
}

.play-surface-heading.hidden + .play-surface-status {
  margin-top: 0;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 650;
}

@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. Same black/white panel as the compare dialog. */
.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(0, 0, 0, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.copy-feedback {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 20rem);
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  border-radius: 3px;
  border: 1px solid var(--mb-border, #2e2e2e);
  background: var(--mb-card, #1c1c1c);
  color: var(--mb-text, #f2f2f2);
  padding: 1.35rem 1.25rem 1.2rem;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  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);
}

.copy-feedback.is-error {
  border-color: var(--mb-border-strong, #4a4a4a);
}

.copy-feedback.is-error .copy-feedback-icon {
  background: var(--mb-inset, #141414);
  color: var(--mb-text, #f2f2f2);
  border-color: var(--mb-border-strong, #4a4a4a);
}

.copy-feedback-icon {
  display: inline-flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px solid var(--mb-border, #2e2e2e);
  background: var(--mb-inset, #141414);
  color: var(--mb-text, #f2f2f2);
}

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

.copy-feedback-message {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mb-text, #f2f2f2);
}

.crosshair-toast {
  border-radius: 3px;
  border: 1px solid var(--mb-border, #2e2e2e);
  background: var(--mb-card, #1c1c1c);
  color: var(--mb-text, #f2f2f2);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.crosshair-toast.is-error {
  border-color: var(--mb-border-strong, #4a4a4a);
  background: var(--mb-inset, #141414);
}

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

/* Centered compare confirmation. Matches the black/white theme. */
.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(0, 0, 0, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.compare-toast {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 24rem);
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  border-radius: 3px;
  border: 1px solid var(--mb-border, #2e2e2e);
  background: var(--mb-card, #1c1c1c);
  color: var(--mb-text, #f2f2f2);
  padding: 1.5rem 1.35rem 1.25rem;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  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);
}

.compare-toast.is-error {
  border-color: var(--mb-border-strong, #4a4a4a);
}

.compare-toast.is-error .compare-toast-icon {
  background: var(--mb-inset, #141414);
  color: var(--mb-text, #f2f2f2);
  border-color: var(--mb-border-strong, #4a4a4a);
}

.compare-toast-icon {
  display: inline-flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px solid var(--mb-border, #2e2e2e);
  background: var(--mb-inset, #141414);
  color: var(--mb-text, #f2f2f2);
}

.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: var(--mb-text, #f2f2f2);
}

.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: 3px;
  border: 1px solid var(--mb-solid, #f4f4f4);
  background: var(--mb-solid, #f4f4f4);
  color: var(--mb-solid-text, #111111);
  padding: 0.65rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.compare-toast-action:hover,
.compare-toast-action:focus-visible {
  background: var(--mb-solid-hover, #ffffff);
  border-color: var(--mb-solid-hover, #ffffff);
  color: var(--mb-solid-text, #111111);
  outline: none;
}

.compare-toast-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  border-radius: 3px;
  border: 1px solid var(--mb-border, #2e2e2e);
  background: transparent;
  color: var(--mb-text, #f2f2f2);
  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: var(--mb-border-strong, #4a4a4a);
  background: var(--mb-hover, #2a2a2a);
  color: var(--mb-text, #f2f2f2);
  outline: none;
}

.compare-toast-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  border-radius: 3px;
  border: 1px solid var(--mb-border, #2e2e2e);
  background: transparent;
  color: var(--mb-text, #f2f2f2);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.compare-toast-clear.hidden {
  display: none;
}

.compare-toast-clear:hover,
.compare-toast-clear:focus-visible {
  border-color: var(--mb-border-strong, #4a4a4a);
  background: var(--mb-hover, #2a2a2a);
  color: var(--mb-text, #f2f2f2);
  outline: none;
}

.compare-toast.is-limit .compare-toast-actions {
  flex-direction: column;
}

.compare-toast.is-limit .compare-toast-action,
.compare-toast.is-limit .compare-toast-clear,
.compare-toast.is-limit .compare-toast-dismiss {
  width: 100%;
}

@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;
  }
}

/* Light and dark surfaces are in monochrome.css */


.dark .bg-white {
  background-color: #2a2a2a !important;
}

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

.dark .bg-white\/95 {
  background-color: rgba(42, 42, 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: #141414;
  border: 1px solid #2e2e2e;
  color: #f2f2f2;
}

/* 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: var(--mb-text, #f2f2f2) !important;
  -webkit-text-fill-color: var(--mb-text, #f2f2f2);
  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: #1c1c1c;
  border-color: #2e2e2e;
  border-radius: 3px;
  box-shadow: none;
}

.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: #1c1c1c;
  border-color: #2e2e2e;
  box-shadow: none;
}

.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: var(--mb-hover, #2a2a2a) !important;
  border: 1px solid var(--mb-border, #2e2e2e) !important;
  color: var(--mb-text, #f2f2f2) !important;
  -webkit-text-fill-color: var(--mb-text, #f2f2f2) !important;
  width: auto !important;
  flex: 0 0 auto;
  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);
}

/* Homepage tools panel — flat PLAY / TRY / TEST chips */
.tool-play-btn {
  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: none;
  transition: background 0.15s ease;
}

.tool-play-btn--yellow {
  background: #f6d34d;
  color: #1a1408;
}

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

.group:hover .tool-play-btn,
.group:focus-visible .tool-play-btn {
  background: #e11d48;
}

.group:hover .tool-play-btn.tool-play-btn--yellow,
.group:focus-visible .tool-play-btn.tool-play-btn--yellow {
  background: #ffe56a;
  color: #1a1408;
}
/* ---------------------------------------------------------------------------
   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;
  }
}
