:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #020715;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 50% 25%, rgba(16, 39, 72, 0.28), transparent 42%),
    linear-gradient(145deg, #020511 0%, #030917 45%, #020411 100%);
  color: rgba(244, 249, 255, 0.92);
  touch-action: none;
  user-select: none;
}

.app-aura {
  position: fixed;
  inset: -24px;
  z-index: 0;
  pointer-events: none;
  background:
    conic-gradient(from 130deg at 50% 50%, rgba(255, 47, 147, 0.16), rgba(74, 213, 255, 0.18), rgba(142, 255, 86, 0.13), rgba(255, 230, 92, 0.15), rgba(255, 47, 147, 0.16));
  filter: blur(34px) saturate(1.2);
  opacity: 0.42;
  animation: auraDrift 18s linear infinite;
  transform-origin: center;
}

@keyframes auraDrift {
  to {
    transform: rotate(1turn);
  }
}

canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
}

.settings-dot {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(215, 232, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(214, 234, 255, 0.12), 0 12px 35px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.settings-dot:hover,
.settings-dot:focus-visible {
  background: rgba(215, 232, 255, 0.13);
  transform: scale(1.06);
  outline: none;
}

.settings-dot span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(226, 241, 255, 0.86);
  box-shadow: 0 0 18px rgba(95, 198, 255, 0.88);
}

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 5;
  width: min(360px, calc(100vw - 24px));
  height: 100%;
  padding: 24px 18px;
  overflow-y: auto;
  background: rgba(4, 12, 27, 0.84);
  border-left: 1px solid rgba(207, 229, 255, 0.14);
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(22px);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.settings-panel.open {
  transform: translateX(0);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-head p {
  margin: 0 0 4px;
  color: rgba(206, 227, 255, 0.58);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.panel-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0;
}

.close-panel {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(218, 236, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(240, 248, 255, 0.86);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.field {
  display: grid;
  gap: 9px;
  margin: 0 0 17px;
}

.field span {
  color: rgba(231, 242, 255, 0.72);
  font-size: 13px;
}

select,
input[type="text"],
input[type="range"],
.clear-button,
.install-button,
.small-button {
  width: 100%;
}

select,
input[type="text"] {
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(216, 234, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(246, 250, 255, 0.94);
  font: inherit;
}

.custom-group {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid rgba(216, 234, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.color-grid label,
.feature-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: rgba(231, 242, 255, 0.74);
  font-size: 13px;
}

.color-grid input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 2px;
  border: 1px solid rgba(216, 234, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

input[type="range"] {
  accent-color: #78ddff;
}

.clear-button,
.install-button,
.small-button {
  height: 42px;
  margin-top: 8px;
  border: 1px solid rgba(216, 234, 255, 0.18);
  border-radius: 8px;
  background: rgba(135, 214, 255, 0.11);
  color: rgba(246, 250, 255, 0.92);
  font: inherit;
  cursor: pointer;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0 12px;
}

.feature-grid label {
  padding: 7px 8px;
  border: 1px solid rgba(216, 234, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.feature-grid input[type="checkbox"] {
  accent-color: #78ddff;
}

.small-button {
  height: 38px;
  margin: 0;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.055);
}

.small-button.active {
  border-color: rgba(126, 225, 255, 0.42);
  background: rgba(103, 221, 255, 0.17);
  box-shadow: inset 0 0 18px rgba(111, 222, 255, 0.08);
}

.install-button {
  background: linear-gradient(90deg, rgba(255, 76, 168, 0.18), rgba(83, 218, 255, 0.16), rgba(143, 255, 115, 0.14));
}

.content-status {
  margin: 14px 0 0;
  color: rgba(213, 231, 255, 0.46);
  font-size: 12px;
}

@media (max-width: 560px) {
  .settings-dot {
    top: 14px;
    right: 14px;
  }

  .settings-panel {
    width: min(330px, calc(100vw - 18px));
    padding: 20px 16px;
  }
}
