:root {
  --matrix-bg: #010201;
  --matrix-bg-deep: #000000;
  --matrix-panel: rgba(3, 16, 7, 0.34);
  --matrix-panel-strong: rgba(4, 20, 8, 0.52);
  --matrix-panel-hover: rgba(8, 32, 14, 0.46);
  --matrix-text: #98ffb3;
  --matrix-text-dim: rgba(152, 255, 179, 0.7);
  --matrix-text-bright: #e1ffea;
  --matrix-line: rgba(98, 255, 150, 0.16);
  --matrix-line-strong: rgba(98, 255, 150, 0.42);
  --matrix-glow: rgba(62, 255, 136, 0.22);
  --matrix-glow-strong: rgba(98, 255, 150, 0.4);
  --matrix-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(54, 255, 126, 0.09);
  --matrix-shadow-hover:
    0 24px 48px rgba(0, 0, 0, 0.5),
    0 0 42px rgba(54, 255, 126, 0.18);
}

html.matrix-theme {
  color-scheme: dark;
  --background: #010201 !important;
  --foreground: var(--matrix-text) !important;
  --border: rgba(98, 255, 150, 0.14) !important;
  --input: rgba(98, 255, 150, 0.14) !important;
  --ring: rgba(98, 255, 150, 0.42) !important;
  --radius: 20px !important;
  --accent-1: #031106 !important;
  --accent-2: #071a0b !important;
  --accent-3: #0a2410 !important;
  --accent-4: #113719 !important;
  --accent-5: #194b24 !important;
  --accent-6: #1f6730 !important;
  --accent-7: #28943f !important;
  --accent-8: #35cc5a !important;
  --accent-9: #53ff85 !important;
  --accent-10: #72ff9d !important;
  --accent-11: #9fffb9 !important;
  --accent-12: #e1ffea !important;
}

html.matrix-theme,
html.matrix-theme body {
  background:
    radial-gradient(circle at 12% 18%, rgba(56, 255, 131, 0.12), transparent 24%),
    radial-gradient(circle at 88% 4%, rgba(56, 255, 131, 0.1), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(56, 255, 131, 0.08), transparent 40%),
    linear-gradient(180deg, #040805 0%, #010201 50%, #000000 100%) !important;
  color: var(--matrix-text) !important;
  font-family: Consolas, "JetBrains Mono", "Fira Code", "Courier New", monospace !important;
  text-shadow: 0 0 10px rgba(103, 255, 155, 0.08);
}

html.matrix-theme body {
  min-height: 100vh;
  overflow-x: hidden;
}

html.matrix-theme body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(120, 255, 170, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 255, 170, 0.03) 1px, transparent 1px);
  background-size: 100% 4px, 56px 56px;
  opacity: 0.28;
  mix-blend-mode: screen;
}

html.matrix-theme body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at center, transparent 34%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 14%, transparent 84%, rgba(255, 255, 255, 0.02));
}

html.matrix-theme #root {
  position: relative;
  z-index: 4;
}

html.matrix-theme a {
  color: #8fffaa !important;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease,
    filter 0.2s ease;
}

html.matrix-theme a:hover {
  color: var(--matrix-text-bright) !important;
  text-shadow: 0 0 16px rgba(98, 255, 150, 0.48);
  filter: brightness(1.08);
}

html.matrix-theme h1,
html.matrix-theme h2,
html.matrix-theme h3,
html.matrix-theme h4,
html.matrix-theme h5,
html.matrix-theme h6,
html.matrix-theme strong,
html.matrix-theme b,
html.matrix-theme th {
  color: var(--matrix-text-bright) !important;
  letter-spacing: 0.05em;
}

html.matrix-theme p,
html.matrix-theme span,
html.matrix-theme td,
html.matrix-theme label,
html.matrix-theme li,
html.matrix-theme small,
html.matrix-theme div {
  color: inherit;
}

html.matrix-theme button,
html.matrix-theme input,
html.matrix-theme select,
html.matrix-theme textarea,
html.matrix-theme [role="button"],
html.matrix-theme [data-slot="button"] {
  color: var(--matrix-text-bright) !important;
  border-color: var(--matrix-line) !important;
  background: linear-gradient(180deg, rgba(7, 21, 10, 0.62), rgba(2, 8, 3, 0.82)) !important;
  box-shadow:
    inset 0 1px 0 rgba(170, 255, 195, 0.08),
    0 0 16px rgba(66, 255, 129, 0.1) !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease !important;
}

html.matrix-theme button:hover,
html.matrix-theme [role="button"]:hover,
html.matrix-theme [data-slot="button"]:hover {
  transform: translateY(-1px);
  border-color: var(--matrix-line-strong) !important;
  box-shadow:
    inset 0 1px 0 rgba(170, 255, 195, 0.14),
    0 0 24px rgba(66, 255, 129, 0.18) !important;
}

html.matrix-theme nav,
html.matrix-theme header,
html.matrix-theme footer,
html.matrix-theme [role="dialog"],
html.matrix-theme .rt-DialogContent {
  background: linear-gradient(180deg, rgba(5, 18, 8, 0.5), rgba(2, 9, 4, 0.66)) !important;
  border-color: var(--matrix-line) !important;
  box-shadow: var(--matrix-shadow) !important;
  backdrop-filter: blur(12px);
}

html.matrix-theme [class*="bg-white"],
html.matrix-theme [class*="bg-gray"],
html.matrix-theme [class*="bg-zinc"],
html.matrix-theme [class*="bg-slate"],
html.matrix-theme [class*="bg-neutral"],
html.matrix-theme .bg-background,
html.matrix-theme .bg-accent-1,
html.matrix-theme .bg-accent-2,
html.matrix-theme .bg-accent-3,
html.matrix-theme .bg-accent-4 {
  background-color: transparent !important;
}

html.matrix-theme [class*="text-black"],
html.matrix-theme [class*="text-gray"],
html.matrix-theme [class*="text-zinc"],
html.matrix-theme [class*="text-slate"],
html.matrix-theme [class*="text-muted"],
html.matrix-theme .text-foreground,
html.matrix-theme .text-muted-foreground {
  color: var(--matrix-text-dim) !important;
}

html.matrix-theme [class*="border-white"],
html.matrix-theme [class*="border-gray"],
html.matrix-theme [class*="border-zinc"],
html.matrix-theme [class*="border-slate"],
html.matrix-theme [class*="border-neutral"],
html.matrix-theme .border,
html.matrix-theme .border-b,
html.matrix-theme .border-t,
html.matrix-theme .border-l,
html.matrix-theme .border-r {
  border-color: var(--matrix-line) !important;
}

html.matrix-theme code,
html.matrix-theme pre,
html.matrix-theme kbd {
  color: var(--matrix-text-bright) !important;
  background: rgba(4, 18, 8, 0.72) !important;
  border: 1px solid rgba(111, 255, 157, 0.18) !important;
}

html.matrix-theme table {
  border-collapse: separate;
  border-spacing: 0;
}

html.matrix-theme tr:nth-child(even) {
  background: rgba(40, 255, 120, 0.025) !important;
}

html.matrix-theme ::selection {
  background: rgba(89, 255, 134, 0.22);
  color: #effff5;
}

html.matrix-theme ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html.matrix-theme ::-webkit-scrollbar-track {
  background: rgba(5, 18, 8, 0.72);
}

html.matrix-theme ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(69, 255, 129, 0.58), rgba(24, 138, 60, 0.72));
  border-radius: 999px;
  border: 1px solid rgba(4, 14, 5, 0.9);
}

html.matrix-theme .matrix-grid,
html.matrix-theme .matrix-vignette,
html.matrix-theme .matrix-noise,
html.matrix-theme .matrix-scan,
html.matrix-theme .matrix-rain,
html.matrix-theme .matrix-orbs,
html.matrix-theme .matrix-ticker {
  pointer-events: none;
}

html.matrix-theme .matrix-grid,
html.matrix-theme .matrix-vignette,
html.matrix-theme .matrix-noise,
html.matrix-theme .matrix-scan,
html.matrix-theme .matrix-rain,
html.matrix-theme .matrix-orbs {
  position: fixed;
  inset: 0;
}

html.matrix-theme .matrix-grid {
  z-index: 0;
  background:
    radial-gradient(circle at top, rgba(96, 255, 154, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(92, 255, 142, 0.06) 0, transparent 54%);
  animation: matrixBreath 8s ease-in-out infinite;
}

html.matrix-theme .matrix-noise {
  z-index: 1;
  opacity: 0.1;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.18) 0.7px, transparent 0.7px),
    radial-gradient(rgba(98, 255, 150, 0.18) 0.7px, transparent 0.7px);
  background-position: 0 0, 13px 17px;
  background-size: 20px 20px;
  mix-blend-mode: screen;
  animation: matrixNoise 0.35s steps(4) infinite;
}

html.matrix-theme .matrix-scan {
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(109, 255, 164, 0.06) 46%,
    rgba(169, 255, 199, 0.16) 50%,
    rgba(109, 255, 164, 0.06) 54%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateY(-100%);
  animation: matrixSweep 10s linear infinite;
}

html.matrix-theme .matrix-vignette {
  z-index: 3;
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.68);
}

html.matrix-theme .matrix-rain {
  z-index: 1;
  opacity: 0.34;
}

html.matrix-theme .matrix-orbs {
  z-index: 1;
  overflow: hidden;
}

html.matrix-theme .matrix-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.26;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(96, 255, 154, 0.72), rgba(96, 255, 154, 0));
}

html.matrix-theme .matrix-orb--1 {
  top: 6%;
  left: 8%;
  width: 22vw;
  height: 22vw;
  animation: matrixFloatA 13s ease-in-out infinite;
}

html.matrix-theme .matrix-orb--2 {
  right: 5%;
  top: 24%;
  width: 16vw;
  height: 16vw;
  animation: matrixFloatB 18s ease-in-out infinite;
}

html.matrix-theme .matrix-orb--3 {
  left: 36%;
  bottom: 10%;
  width: 20vw;
  height: 20vw;
  animation: matrixFloatC 15s ease-in-out infinite;
}

html.matrix-theme .matrix-surface {
  position: relative !important;
  overflow: hidden !important;
  transform-style: preserve-3d;
  border: 1px solid var(--matrix-line) !important;
  background:
    linear-gradient(180deg, rgba(8, 23, 11, 0.18), rgba(2, 8, 3, 0.42)) !important;
  box-shadow: var(--matrix-shadow), inset 0 1px 0 rgba(170, 255, 195, 0.04) !important;
  backdrop-filter: blur(16px) saturate(118%);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease !important;
  will-change: transform, box-shadow;
}

html.matrix-theme .matrix-surface::before,
html.matrix-theme .matrix-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

html.matrix-theme .matrix-surface::before {
  background:
    linear-gradient(120deg, transparent 12%, rgba(140, 255, 182, 0.08) 28%, transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  transform: translateX(-120%);
  transition: transform 0.45s ease;
}

html.matrix-theme .matrix-surface::after {
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(144, 255, 185, 0.06);
  box-shadow:
    inset 0 0 28px rgba(0, 255, 115, 0.035),
    inset 0 0 2px rgba(193, 255, 214, 0.18);
}

html.matrix-theme .matrix-surface:hover,
html.matrix-theme .matrix-surface.is-hot {
  border-color: var(--matrix-line-strong) !important;
  background:
    linear-gradient(180deg, rgba(10, 28, 13, 0.3), rgba(3, 10, 4, 0.44)) !important;
  box-shadow: var(--matrix-shadow-hover), inset 0 1px 0 rgba(170, 255, 195, 0.08) !important;
}

html.matrix-theme .matrix-surface:hover::before,
html.matrix-theme .matrix-surface.is-hot::before {
  transform: translateX(115%);
}

html.matrix-theme .matrix-surface .matrix-chipline {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(166, 255, 191, 0.68);
}

html.matrix-theme .matrix-chipline::before,
html.matrix-theme .matrix-chipline::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(98, 255, 150, 0), rgba(98, 255, 150, 0.42), rgba(98, 255, 150, 0));
}

html.matrix-theme .matrix-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  overflow: hidden;
  padding: 10px 0 12px;
  border-top: 1px solid rgba(92, 255, 142, 0.16);
  background:
    linear-gradient(180deg, rgba(1, 7, 2, 0), rgba(1, 7, 2, 0.86)),
    linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(92, 255, 142, 0.06), rgba(0, 0, 0, 0));
}

html.matrix-theme .matrix-ticker-track {
  display: inline-flex;
  gap: 36px;
  min-width: max-content;
  padding-left: 100%;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(167, 255, 193, 0.84);
  animation: matrixTicker 24s linear infinite;
}

html.matrix-theme .matrix-ticker-track span {
  text-shadow: 0 0 12px rgba(83, 255, 149, 0.28);
}

html.matrix-theme .matrix-corner {
  position: fixed;
  z-index: 5;
  width: 90px;
  height: 90px;
  border-color: rgba(114, 255, 165, 0.34);
  opacity: 0.65;
  pointer-events: none;
}

html.matrix-theme .matrix-corner--tl {
  top: 18px;
  left: 18px;
  border-top: 2px solid;
  border-left: 2px solid;
}

html.matrix-theme .matrix-corner--tr {
  top: 18px;
  right: 18px;
  border-top: 2px solid;
  border-right: 2px solid;
}

html.matrix-theme .matrix-corner--bl {
  left: 18px;
  bottom: 58px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}

html.matrix-theme .matrix-corner--br {
  right: 18px;
  bottom: 58px;
  border-bottom: 2px solid;
  border-right: 2px solid;
}

@keyframes matrixTicker {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-100%, 0, 0);
  }
}

@keyframes matrixSweep {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

@keyframes matrixBreath {
  0%,
  100% {
    opacity: 0.9;
    filter: brightness(1);
  }

  50% {
    opacity: 1;
    filter: brightness(1.08);
  }
}

@keyframes matrixNoise {
  0% {
    transform: translate3d(0, 0, 0);
  }

  25% {
    transform: translate3d(-1%, 1%, 0);
  }

  50% {
    transform: translate3d(1%, -1%, 0);
  }

  75% {
    transform: translate3d(0.5%, 1%, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes matrixFloatA {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(2vw, 1vw, 0) scale(1.08);
  }
}

@keyframes matrixFloatB {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-2vw, 1.4vw, 0) scale(0.94);
  }
}

@keyframes matrixFloatC {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(1vw, -1.8vw, 0) scale(1.04);
  }
}

@media (max-width: 720px) {
  html.matrix-theme .matrix-orb--1,
  html.matrix-theme .matrix-orb--2,
  html.matrix-theme .matrix-orb--3 {
    width: 32vw;
    height: 32vw;
    opacity: 0.18;
  }

  html.matrix-theme .matrix-ticker-track {
    gap: 18px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  html.matrix-theme .matrix-corner {
    width: 56px;
    height: 56px;
    opacity: 0.4;
  }

  html.matrix-theme .matrix-corner--bl,
  html.matrix-theme .matrix-corner--br {
    bottom: 52px;
  }
}

