:root {
  color-scheme: dark;
  --ink: #100F12;
  --ink-soft: #1C1A22;
  --panel: rgba(28, 26, 34, .72);
  --panel-strong: rgba(28, 26, 34, .9);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(157, 78, 221, .32);
  --text: #FFFFFF;
  --muted: #8A8A93;
  --cyan: #9D4EDD;
  --blue: #7B2CBF;
  --pink: #7B2CBF;
  --lime: #6ef5b2;
  --shadow: 0 22px 70px rgba(0, 0, 0, .46);
  --spring: cubic-bezier(.2, .85, .25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 420px;
  height: 600px;
}

body {
  position: relative;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -12%, rgba(123, 44, 191, .18), transparent 38%),
    linear-gradient(155deg, #100F12 0%, #100F12 52%, #100F12 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(76px);
  opacity: .2;
  pointer-events: none;
  animation: ambient-float 9s ease-in-out infinite;
}

.ambient--cyan {
  top: -110px;
  right: -80px;
  background: var(--cyan);
}

.ambient--pink {
  bottom: 20px;
  left: -150px;
  background: var(--pink);
  animation-delay: -4.5s;
}

.noise {
  position: fixed;
  z-index: 0;
  inset: 0;
  opacity: .2;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
  pointer-events: none;
}

.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  isolation: isolate;
}

.app-layout::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .035);
  content: "";
  pointer-events: none;
}

.header {
  position: relative;
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 15, 18, .58);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .2);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.header::after {
  position: absolute;
  right: 17px;
  bottom: -1px;
  left: 17px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(157, 78, 221, .5), rgba(123, 44, 191, .42), transparent);
  content: "";
  opacity: .6;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(157, 78, 221, .24);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(157, 78, 221, .14), rgba(123, 44, 191, .08));
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 0 24px rgba(123, 44, 191, .16);
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span,
.brand-mark i {
  position: absolute;
  content: "";
}

.brand-mark::before {
  width: 18px;
  height: 18px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(157, 78, 221, .55);
}

.brand-mark::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 9px var(--cyan);
}

.brand-mark span {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.brand-mark i {
  width: 1px;
  height: 28px;
  background: linear-gradient(transparent, var(--pink), transparent);
}

.logo-text h1 {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -.65px;
  line-height: 1;
}

.brand-aim {
  background: linear-gradient(105deg, var(--cyan), #B66AF0 55%, #9D4EDD);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pro-badge {
  margin-left: 7px;
  border: 1px solid rgba(157, 78, 221, .24);
  border-radius: 999px;
  padding: 3px 6px;
  color: var(--cyan);
  background: rgba(157, 78, 221, .065);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo-text p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.status-indicator {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(110, 245, 178, .18);
  border-radius: 999px;
  padding: 0 10px;
  color: #a4ffd2;
  background: rgba(110, 245, 178, .055);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(110, 245, 178, .08), 0 0 12px rgba(110, 245, 178, .78);
  animation: status-pulse 2.2s ease-in-out infinite;
}

.controls-area {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 13px 14px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 78, 221, .3) transparent;
}

.controls-area::-webkit-scrollbar,
.scrollable-grid::-webkit-scrollbar {
  width: 4px;
}

.controls-area::-webkit-scrollbar-track,
.scrollable-grid::-webkit-scrollbar-track {
  background: transparent;
}

.controls-area::-webkit-scrollbar-thumb,
.scrollable-grid::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: linear-gradient(var(--cyan), var(--blue));
}

.intro-card,
.control-group {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(28, 26, 34, .82), rgba(16, 15, 18, .72));
  box-shadow: inset 0 1px rgba(255, 255, 255, .055), var(--shadow);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  overflow: hidden;
  animation: panel-enter .55s var(--spring) both;
}

.intro-card {
  min-height: 106px;
  padding: 16px;
  background:
    radial-gradient(circle at 78% 42%, rgba(157, 78, 221, .12), transparent 24%),
    linear-gradient(135deg, rgba(28, 26, 34, .88), rgba(16, 15, 18, .76));
}

.intro-card::before,
.control-group::before {
  position: absolute;
  top: 0;
  right: 16%;
  left: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .24), transparent);
  content: "";
}

.intro-copy {
  position: relative;
  z-index: 2;
  width: 66%;
}

.section-kicker {
  display: block;
  margin-bottom: 6px;
  color: #8A8A93;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.35px;
}

.intro-copy h2,
.group-heading h2 {
  color: #fff;
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -.7px;
}

.intro-copy h2 em {
  background: linear-gradient(95deg, var(--cyan), #B66AF0 52%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
}

.intro-copy p {
  max-width: 238px;
  margin-top: 5px;
  color: #8A8A93;
  font-size: 10px;
  line-height: 1.45;
}

.radar {
  position: absolute;
  top: 12px;
  right: 19px;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(157, 78, 221, .16);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 78, 221, .07), transparent 64%);
  box-shadow: inset 0 0 26px rgba(157, 78, 221, .04), 0 0 28px rgba(123, 44, 191, .08);
}

.radar::before,
.radar::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: linear-gradient(90deg, transparent, rgba(157, 78, 221, .3), transparent);
  content: "";
  transform: translate(-50%, -50%);
}

.radar::before { width: 86px; height: 1px; }
.radar::after { width: 1px; height: 86px; }

.radar span {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(157, 78, 221, .11);
  border-radius: 50%;
}

.radar span:nth-child(2) { inset: 25px; }
.radar span:nth-child(3) {
  inset: 31px;
  border: 0;
  background: #fff;
  box-shadow: 0 0 13px 4px rgba(157, 78, 221, .48);
}

.radar i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transform-origin: left center;
  animation: radar-sweep 3.8s linear infinite;
}

.intro-meta {
  position: absolute;
  right: 14px;
  bottom: 9px;
  display: flex;
  gap: 10px;
  color: #787780;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .8px;
}

.intro-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.intro-meta i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 6px var(--lime);
}

.control-group--library {
  padding: 14px 11px 11px 14px;
  animation-delay: .07s;
}

.group-heading,
.opacity-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.group-heading {
  margin: 0 3px 11px 1px;
}

.group-heading .section-kicker {
  margin-bottom: 4px;
}

.group-heading h2 {
  font-size: 15px;
  letter-spacing: -.35px;
}

.preset-count {
  border: 1px solid rgba(157, 78, 221, .13);
  border-radius: 999px;
  padding: 5px 7px;
  color: #8A8A93;
  background: rgba(157, 78, 221, .035);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 1px;
}

.scrollable-grid {
  max-height: 190px;
  padding: 1px 3px 3px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(157, 78, 221, .3) transparent;
  scrollbar-width: thin;
}

.crosshair-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.crosshair-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 82px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 13px;
  padding: 7px 4px 6px;
  color: #8A8A93;
  background: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  transition: color .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease, transform .22s var(--spring);
}

.crosshair-item::before {
  position: absolute;
  top: -45%;
  left: -75%;
  width: 60%;
  height: 190%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
  content: "";
  opacity: 0;
  transform: rotate(20deg);
  transition: left .5s ease, opacity .25s ease;
}

.crosshair-item::after {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border-radius: 50%;
  color: #100F12;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(157, 78, 221, .72);
  content: "✓";
  font-size: 7px;
  font-weight: 900;
  opacity: 0;
  transform: scale(.4) rotate(-35deg);
  transition: opacity .2s ease, transform .3s var(--spring);
}

.crosshair-item:hover {
  z-index: 2;
  border-color: rgba(157, 78, 221, .3);
  color: #FFFFFF;
  background: linear-gradient(145deg, rgba(157, 78, 221, .09), rgba(123, 44, 191, .04));
  box-shadow: 0 9px 22px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .08);
  transform: translateY(-2px);
}

.crosshair-item:hover::before {
  left: 120%;
  opacity: 1;
}

.crosshair-item:active {
  transform: translateY(0) scale(.97);
}

.crosshair-item:focus-visible,
.btn-primary:focus-visible,
.slider:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.crosshair-item.active {
  border-color: transparent;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(28, 26, 34, .98), rgba(16, 15, 18, .98)) padding-box,
    linear-gradient(135deg, var(--cyan), var(--blue) 52%, var(--pink)) border-box;
  box-shadow: 0 0 0 1px rgba(157, 78, 221, .05), 0 9px 28px rgba(123, 44, 191, .27), inset 0 0 20px rgba(157, 78, 221, .05);
  transform: translateY(-1px);
}

.crosshair-item.active::after {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.crosshair-visual {
  position: relative;
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  place-items: center;
  border-radius: 12px;
  background: radial-gradient(circle, rgba(157, 78, 221, .055), transparent 68%);
  transition: transform .25s var(--spring), filter .25s ease;
}

.crosshair-visual::before,
.crosshair-visual::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  background: rgba(157, 78, 221, .1);
  content: "";
  transform: translate(-50%, -50%);
}

.crosshair-visual::before { width: 39px; height: 1px; }
.crosshair-visual::after { width: 1px; height: 39px; }

.crosshair-item img {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .36));
  pointer-events: none;
  transition: transform .25s var(--spring), filter .25s ease;
}

.crosshair-item:hover img {
  filter: drop-shadow(0 0 8px rgba(157, 78, 221, .32));
  transform: scale(1.09);
}

.crosshair-item.active img {
  filter: drop-shadow(0 0 9px rgba(157, 78, 221, .42));
  transform: scale(1.05);
}

.crosshair-item > span:last-child {
  width: 100%;
  overflow: hidden;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .05px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-group--opacity {
  padding: 14px 15px 13px;
  animation-delay: .14s;
}

.opacity-heading {
  align-items: center;
  margin-bottom: 13px;
}

.opacity-heading .section-kicker {
  margin-bottom: 4px;
}

.opacity-heading label {
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
}

#opacityVal {
  min-width: 51px;
  border: 1px solid rgba(157, 78, 221, .2);
  border-radius: 10px;
  padding: 7px 8px;
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(157, 78, 221, .1), rgba(123, 44, 191, .08));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 0 18px rgba(123, 44, 191, .09);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.slider-shell {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
}

.slider-icon {
  position: relative;
  display: block;
  border: 1px solid rgba(157, 78, 221, .42);
  border-radius: 50%;
}

.slider-icon--low { width: 8px; height: 8px; }
.slider-icon--high { width: 13px; height: 13px; box-shadow: 0 0 10px rgba(157, 78, 221, .18); }

.slider {
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--blue) 54%, var(--pink) 100%);
  box-shadow: 0 0 14px rgba(123, 44, 191, .18), inset 0 1px 2px rgba(0, 0, 0, .28);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  border: 3px solid #1C1A22;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--cyan), 0 0 18px rgba(157, 78, 221, .72);
  cursor: grab;
  transition: transform .2s var(--spring), box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 2px var(--cyan), 0 0 24px rgba(157, 78, 221, .9);
  transform: scale(1.14);
}

.slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(.96);
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  margin: 7px 19px 0 21px;
  color: #65646D;
  font-size: 5.5px;
  font-weight: 800;
  letter-spacing: .8px;
}

.footer {
  position: relative;
  flex: 0 0 auto;
  padding: 12px 14px 13px;
  border-top: 1px solid var(--line);
  background: rgba(16, 15, 18, .78);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, .22);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.btn-primary {
  position: relative;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  color: #FFFFFF;
  background: linear-gradient(105deg, #B66AF0 0%, var(--cyan) 28%, #9D4EDD 62%, #7B2CBF 100%);
  background-size: 150% 100%;
  box-shadow: 0 10px 28px rgba(123, 44, 191, .3), 0 0 26px rgba(157, 78, 221, .12), inset 0 1px rgba(255, 255, 255, .58);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .7px;
  overflow: hidden;
  text-transform: uppercase;
  transition: background-position .4s ease, box-shadow .25s ease, transform .25s var(--spring);
}

.btn-primary::before {
  position: absolute;
  top: -80%;
  left: -35%;
  width: 22%;
  height: 250%;
  background: rgba(255, 255, 255, .48);
  content: "";
  filter: blur(7px);
  transform: rotate(18deg);
  transition: left .58s ease;
}

.btn-primary::after {
  margin-left: 9px;
  content: "↗";
  font-size: 13px;
}

.btn-primary:hover {
  background-position: 100% 0;
  box-shadow: 0 13px 34px rgba(123, 44, 191, .4), 0 0 32px rgba(157, 78, 221, .2), inset 0 1px rgba(255, 255, 255, .66);
  transform: translateY(-2px);
}

.btn-primary:hover::before { left: 125%; }
.btn-primary:active { box-shadow: 0 5px 18px rgba(123, 44, 191, .28); transform: translateY(0) scale(.985); }

.footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  color: #787780;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .3px;
}

.footer-note span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 7px rgba(110, 245, 178, .8);
}

@keyframes ambient-float {
  0%, 100% { opacity: .16; transform: translate3d(0, 0, 0) scale(1); }
  50% { opacity: .24; transform: translate3d(14px, 12px, 0) scale(1.08); }
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.78); }
}

@keyframes radar-sweep {
  to { transform: rotate(360deg); }
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
