@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #03040d;
  --panel: rgba(4, 6, 18, 0.90);
  --border: rgba(120, 160, 255, 0.12);
  --accent: #7b9fff;
  --text: #b8c4e8;
  --dim: rgba(184, 196, 232, 0.35);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Mono', monospace;
  overflow: hidden;
  height: 100vh;
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
}

#c {
  z-index: 1;
}

#planettech-stage {
  position: fixed;
  inset: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

#planettech-stage.active {
  opacity: 1;
  pointer-events: all;
}

#planettech-stage.loading {
  opacity: 0;
  pointer-events: none;
}

#terrain-c {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#terrain-c.visible {
  opacity: 1;
  pointer-events: all;
}

#hand-canvas {
  z-index: 12;
  pointer-events: none;
}

/* ── SIDEBAR ─────────────────────────────────────────── */
#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 290px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

#sidebar.collapsed {
  transform: translateX(-252px);
}

#sidebar-header {
  padding: 18px 14px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#sidebar-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#sidebar-title h1 {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #c4d4ff;
  text-transform: uppercase;
}

#sidebar-subtitle {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

#toggle-btn {
  background: none;
  border: 1px solid rgba(120, 160, 255, 0.2);
  color: var(--accent);
  border-radius: 4px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#toggle-btn:hover {
  background: rgba(120, 160, 255, 0.1);
  border-color: rgba(120, 160, 255, 0.4);
}

#cluster-filter {
  padding: 10px 12px 6px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-pill {
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-family: 'Space Mono', monospace;
  opacity: 0.5;
}

.filter-pill.active {
  opacity: 1;
  border-color: currentColor;
}

.filter-pill:hover {
  opacity: 0.85;
}

#search-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

#search {
  width: 100%;
  background: rgba(120, 160, 255, 0.05);
  border: 1px solid rgba(120, 160, 255, 0.15);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  outline: none;
  transition: border-color 0.2s;
}

#search:focus {
  border-color: rgba(120, 160, 255, 0.45);
}

#search::placeholder {
  color: rgba(184, 196, 232, 0.22);
}

#node-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

#node-list::-webkit-scrollbar,
#worker-list-inner::-webkit-scrollbar {
  width: 2px;
}

#node-list::-webkit-scrollbar-thumb,
#worker-list-inner::-webkit-scrollbar-thumb {
  background: rgba(120, 160, 255, 0.2);
  border-radius: 2px;
}

.node-item {
  padding: 7px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  font-size: 10px;
}

.node-item:hover {
  background: rgba(120, 160, 255, 0.06);
  border-left-color: rgba(120, 160, 255, 0.35);
}

.node-item.active {
  background: rgba(120, 160, 255, 0.11);
  border-left-color: var(--accent);
}

.node-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.node-label {
  flex: 1;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-tag {
  font-size: 8px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#worker-list {
  border-top: 1px solid var(--border);
  max-height: 200px;
  overflow-y: auto;
}

.worker-item {
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  border-left: 2px solid transparent;
  cursor: default;
}

.worker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: workerPulse 2s infinite;
}

@keyframes workerPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ── DETAIL PANEL ────────────────────────────────────── */
#detail-panel {
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  width: 330px;
  background: var(--panel);
  border-left: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

#detail-panel.open {
  transform: translateX(0);
}

#detail-top {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#detail-close {
  background: none;
  border: 1px solid rgba(120, 160, 255, 0.2);
  color: var(--accent);
  border-radius: 4px;
  min-width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#detail-close:hover {
  background: rgba(120, 160, 255, 0.1);
}

#detail-content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}

#detail-content::-webkit-scrollbar {
  width: 2px;
}

#detail-content::-webkit-scrollbar-thumb {
  background: rgba(120, 160, 255, 0.18);
}

.detail-cluster-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  border: 1px solid currentColor;
}

.detail-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.detail-body {
  font-size: 10px;
  line-height: 1.85;
  color: rgba(184, 196, 232, 0.65);
  margin-bottom: 14px;
}

.detail-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-stat {
  text-align: center;
}

.detail-stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  display: block;
}

.detail-stat-lbl {
  font-size: 8px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--dim);
  margin-bottom: 6px;
  margin-top: 2px;
}

.conn-item {
  padding: 6px 10px;
  margin-bottom: 3px;
  background: rgba(120, 160, 255, 0.04);
  border: 1px solid rgba(120, 160, 255, 0.08);
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.conn-item:hover {
  background: rgba(120, 160, 255, 0.1);
  border-color: rgba(120, 160, 255, 0.25);
}

.strength-bar {
  height: 2px;
  border-radius: 1px;
  margin: 12px 0 10px;
  background: rgba(120, 160, 255, 0.1);
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 1px;
  transition: width 0.5s ease;
}

.terrain-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-actions {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(120, 160, 255, 0.08);
  display: grid;
  gap: 7px;
}

.detail-action-btn {
  width: 100%;
  padding: 8px;
  background: rgba(120, 160, 255, 0.1);
  border: 1px solid rgba(120, 160, 255, 0.24);
  color: var(--accent);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.detail-action-btn:hover {
  background: rgba(120, 160, 255, 0.16);
  border-color: rgba(120, 160, 255, 0.42);
}

.detail-action-secondary {
  background: rgba(123, 255, 178, 0.07);
  border-color: rgba(123, 255, 178, 0.22);
  color: #7bffb2;
}

.detail-action-secondary:hover {
  background: rgba(123, 255, 178, 0.12);
  border-color: rgba(123, 255, 178, 0.42);
}

/* ── MODE BAR ────────────────────────────────────────── */
#mode-bar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 21;
  pointer-events: all;
  transition: opacity 0.3s;
}

#mode-bar.hidden {
  opacity: 0;
  pointer-events: none;
}

.mode-btn {
  background: rgba(4, 6, 18, 0.82);
  border: 1px solid rgba(120, 160, 255, 0.18);
  color: rgba(184, 196, 232, 0.55);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.mode-btn:hover {
  background: rgba(120, 160, 255, 0.08);
  color: var(--text);
  border-color: rgba(120, 160, 255, 0.35);
}

.mode-btn.active {
  background: rgba(120, 160, 255, 0.14);
  color: #c4d4ff;
  border-color: rgba(120, 160, 255, 0.5);
}

/* ── BREADCRUMB ──────────────────────────────────────── */
#breadcrumb {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(4, 6, 18, 0.75);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.bc-item {
  color: var(--dim);
  cursor: pointer;
  transition: color 0.2s;
}

.bc-item:hover {
  color: var(--text);
}

.bc-item.bc-active {
  color: #c4d4ff;
}

.bc-sep {
  color: rgba(120, 160, 255, 0.3);
}

.bc-sep2 {
  color: rgba(120, 160, 255, 0.3);
}

.hidden {
  display: none !important;
}

/* ── BACK BUTTON ─────────────────────────────────────── */
#back-btn {
  position: fixed;
  bottom: 50px;
  right: 16px;
  z-index: 21;
  background: rgba(4, 6, 18, 0.85);
  border: 1px solid rgba(120, 160, 255, 0.3);
  color: var(--accent);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  transition: all 0.25s;
  backdrop-filter: blur(10px);
}

#back-btn:hover {
  background: rgba(120, 160, 255, 0.12);
  border-color: rgba(120, 160, 255, 0.6);
}

/* ── STATS BAR ───────────────────────────────────────── */
#stats-bar {
  position: fixed;
  bottom: 0;
  left: 290px;
  right: 0;
  padding: 7px 20px;
  background: rgba(3, 4, 13, 0.80);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 20px;
  font-size: 9px;
  color: var(--dim);
  backdrop-filter: blur(10px);
  z-index: 15;
  align-items: center;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-val {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── TOOLTIP ─────────────────────────────────────────── */
#tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(4, 6, 18, 0.96);
  border: 1px solid rgba(120, 160, 255, 0.25);
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 10px;
  max-width: 210px;
  transform: translate(-50%, -115%);
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 100;
  backdrop-filter: blur(12px);
}

#tooltip.show {
  opacity: 1;
}

#tooltip-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #d4e0ff;
  margin-bottom: 2px;
}

#tooltip-cluster {
  font-size: 9px;
  margin-bottom: 2px;
}

#tooltip-sub {
  color: var(--dim);
  font-size: 9px;
}

/* ── CONTROLS HINT ───────────────────────────────────── */
#controls-hint {
  position: fixed;
  bottom: 36px;
  left: 306px;
  font-size: 9px;
  color: rgba(184, 196, 232, 0.18);
  pointer-events: none;
  z-index: 15;
  letter-spacing: 0.05em;
  line-height: 2;
}

/* ── HAND TRACKING ───────────────────────────────────── */
#landing-loader {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 28;
  width: min(320px, calc(100vw - 48px));
  padding: 18px 18px 16px;
  background: rgba(4, 6, 18, 0.86);
  border: 1px solid rgba(120, 160, 255, 0.22);
  border-radius: 8px;
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#landing-loader.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#landing-loader-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #d6e2ff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}

#landing-loader-sub {
  margin-top: 5px;
  font-size: 9px;
  color: rgba(184, 196, 232, 0.48);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

#landing-loader-track {
  height: 3px;
  margin-top: 14px;
  background: rgba(120, 160, 255, 0.14);
  border-radius: 2px;
  overflow: hidden;
}

#landing-loader-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #7b9fff, #7bffb2);
  border-radius: 2px;
  transition: width 0.15s ease;
}

#hand-toggle {
  position: fixed;
  bottom: 46px;
  right: 16px;
  z-index: 22;
  background: rgba(4, 6, 18, 0.82);
  border: 1px solid rgba(120, 160, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

#hand-toggle:hover {
  background: rgba(120, 160, 255, 0.1);
  border-color: rgba(120, 160, 255, 0.45);
}

#hand-toggle.active {
  border-color: #7bffb2;
  box-shadow: 0 0 12px rgba(123, 255, 178, 0.3);
}

#webcam {
  position: fixed;
  bottom: 90px;
  right: 16px;
  width: 160px;
  height: 120px;
  border-radius: 8px;
  border: 1px solid rgba(120, 160, 255, 0.2);
  object-fit: cover;
  z-index: 22;
  opacity: 0;
  transform: scaleX(-1);
  transition: opacity 0.4s;
  background: #000;
}

#webcam.active {
  opacity: 0.85;
}

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(120, 160, 255, 0);
  }

  50% {
    box-shadow: 0 0 12px 4px rgba(120, 160, 255, 0.15);
  }
}

.node-item.active {
  animation: pulseGlow 2s infinite;
}

/* ── TERRAIN OVERLAY HUD ─────────────────────────────── */
#terrain-hud {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(4, 6, 18, 0.82);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 21;
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

#terrain-hud.show {
  opacity: 1;
}

/* ── PLANET EDITOR PANEL ─────────────────────────────── */
#planet-editor {
  position: fixed;
  left: 290px;
  top: 0;
  height: 100%;
  width: 300px;
  background: rgba(3, 4, 16, 0.96);
  border-right: 1px solid rgba(120, 160, 255, 0.14);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  z-index: 25;
  transform: translateX(calc(-100% - 290px));
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

#planet-editor.open {
  transform: translateX(0);
}

#pe-header {
  padding: 16px 14px 12px;
  border-bottom: 1px solid rgba(120, 160, 255, 0.1);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

#pe-header-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#pe-galaxy {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

#pe-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #c4d4ff;
}

#pe-close {
  background: none;
  border: 1px solid rgba(120, 160, 255, 0.2);
  color: var(--accent);
  border-radius: 4px;
  min-width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

#pe-close:hover {
  background: rgba(120, 160, 255, 0.12);
}

#pe-preview-wrap {
  padding: 16px 14px 12px;
  border-bottom: 1px solid rgba(120, 160, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

#pe-preview-canvas {
  border-radius: 50%;
  width: 100px;
  height: 100px;
  box-shadow: 0 0 28px rgba(120, 160, 255, 0.12);
  flex-shrink: 0;
  display: block;
}

#pe-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pe-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text);
}

.pe-stat-icon {
  font-size: 13px;
}

.pe-stat-lbl {
  font-size: 8px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pe-seed-wrap {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

#pe-seed-val {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.pe-section-label {
  padding: 8px 14px 4px;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(184, 196, 232, 0.35);
  flex-shrink: 0;
}

#pe-presets {
  padding: 4px 14px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border-bottom: 1px solid rgba(120, 160, 255, 0.1);
  flex-shrink: 0;
}

.pe-chip {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(184, 196, 232, 0.55);
  font-family: 'Space Mono', monospace;
  transition: all 0.18s;
}

.pe-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.pe-chip.active {
  background: color-mix(in srgb, var(--chip-color) 18%, transparent);
  border-color: color-mix(in srgb, var(--chip-color) 60%, transparent);
  color: white;
  box-shadow: 0 0 8px color-mix(in srgb, var(--chip-color) 30%, transparent);
}

#pe-sliders {
  flex: 1;
  overflow-y: auto;
  padding: 6px 14px 6px;
}

#pe-sliders::-webkit-scrollbar {
  width: 2px;
}

#pe-sliders::-webkit-scrollbar-thumb {
  background: rgba(120, 160, 255, 0.2);
}

.pe-slider-row {
  margin-bottom: 12px;
}

.pe-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 9px;
}

.pe-slider-label span:first-child {
  color: var(--text);
  letter-spacing: 0.05em;
}

.pe-slider-val {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-size: 9px;
}

.pe-slider-track {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

.pe-slider-fill {
  position: absolute;
  left: 0;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(80, 120, 255, 0.6), rgba(120, 200, 255, 0.9));
  pointer-events: none;
  z-index: 1;
  transition: width 0.05s;
}

.pe-range {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(120, 160, 255, 0.12);
  outline: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.pe-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #7b9fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 6px rgba(120, 160, 255, 0.5);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.pe-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 10px rgba(120, 160, 255, 0.75);
}

.pe-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #7b9fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

#pe-actions {
  padding: 12px 14px;
  border-top: 1px solid rgba(120, 160, 255, 0.1);
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.pe-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: 7px;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  transition: all 0.2s;
}

.pe-btn-ghost {
  background: rgba(120, 160, 255, 0.06);
  border: 1px solid rgba(120, 160, 255, 0.18);
  color: rgba(184, 196, 232, 0.6);
}

.pe-btn-ghost:hover {
  background: rgba(120, 160, 255, 0.12);
  color: var(--text);
  border-color: rgba(120, 160, 255, 0.35);
}

.pe-btn-primary {
  background: rgba(120, 160, 255, 0.18);
  border: 1px solid rgba(120, 160, 255, 0.45);
  color: #c4d4ff;
  font-weight: 700;
}

.pe-btn-primary:hover {
  background: rgba(120, 160, 255, 0.28);
  border-color: rgba(120, 160, 255, 0.7);
  box-shadow: 0 0 12px rgba(120, 160, 255, 0.2);
}
