:root {
  --bg: #05060a;
  --bg-elevated: #10131b;
  --bg-elevated-soft: #151926;
  --border-subtle: #252a3a;
  --accent: #8f5dff;
  --accent-soft: rgba(143, 93, 255, 0.18);
  --accent-strong: rgba(143, 93, 255, 0.32);
  --text: #f5f7ff;
  --text-muted: #9aa0be;
  --danger: #ff4b6a;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.6);
  --shadow-subtle: 0 0 0 1px rgba(255, 255, 255, 0.02);
  --transition-fast: 160ms ease-out;
  --gap: 1.25rem;
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    Segoe UI, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-stack);
  background: radial-gradient(circle at top, #161c33 0, #05060a 52%, #020309 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}

.shell {
  width: 100%;
  max-width: 1080px;
  background: linear-gradient(145deg, rgba(143, 93, 255, 0.12), rgba(3, 9, 23, 0.96));
  border-radius: 28px;
  padding: 28px 24px 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.shell::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 15% 0%, rgba(143, 93, 255, 0.13), transparent 55%),
    radial-gradient(circle at 85% 0%, rgba(73, 209, 255, 0.16), transparent 55%);
  opacity: 0.8;
  pointer-events: none;
  z-index: -1;
}

.shell-inner {
  position: relative;
  z-index: 1;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.title-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-dot {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: conic-gradient(from 220deg, #8f5dff, #49d1ff, #8f5dff);
  box-shadow: 0 0 18px rgba(143, 93, 255, 0.9);
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
}

.subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 460px;
}

.pill-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pill {
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(3, 12, 26, 0.92), rgba(8, 19, 40, 0.92));
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pill span.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #45ff9d;
  box-shadow: 0 0 8px rgba(69, 255, 157, 0.8);
}

main {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
  gap: 1.5rem;
}

@media (max-width: 880px) {
  main {
    grid-template-columns: minmax(0, 1fr);
  }
  body {
    padding: 16px 10px;
  }
  .shell {
    padding: 20px 16px 20px;
    border-radius: 20px;
  }
}

.card {
  background: radial-gradient(circle at top left, rgba(143, 93, 255, 0.16), rgba(6, 9, 20, 0.96));
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.02), transparent 45%);
  opacity: 0.6;
  pointer-events: none;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 380px;
}

.badge {
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid rgba(143, 93, 255, 0.5);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(226, 216, 255, 0.9);
  white-space: nowrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

@media (max-width: 560px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.field-label span.secondary {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.76rem;
  color: #656d8a;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.field {
  position: relative;
}

.field span.axis-tag {
  position: absolute;
  top: 7px;
  left: 10px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7078a0;
  pointer-events: none;
}

input[type="number"] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(3, 7, 15, 0.9);
  color: var(--text);
  padding: 18px 10px 8px 10px;
  padding-left: 30px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background var(--transition-fast),
              transform var(--transition-fast);
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 0 18px rgba(143, 93, 255, 0.35);
  background: rgba(8, 13, 30, 1);
  transform: translateY(-1px);
}

input[readonly] {
  background: rgba(7, 11, 23, 0.8);
  border-style: dashed;
  color: #c5c9ea;
}

.subtext {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #727aa0;
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.radio-row {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  background: rgba(3, 4, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-muted);
  transition: background var(--transition-fast), color var(--transition-fast),
              box-shadow var(--transition-fast), border-color var(--transition-fast);
  border: 1px solid transparent;
  user-select: none;
}

.radio-option.active {
  background: linear-gradient(135deg, var(--accent-strong), rgba(9, 13, 27, 0.9));
  color: #f5f1ff;
  border-color: rgba(143, 93, 255, 0.7);
  box-shadow: 0 0 14px rgba(143, 93, 255, 0.65);
}

.radio-option input {
  display: none;
}

.radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(5, 6, 12, 0.9);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
  position: relative;
}

.radio-option.active .radio-dot::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 20%, #ffffff, #ffe5ff);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.btn {
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(18, 24, 46, 0.96), rgba(5, 9, 20, 1));
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background var(--transition-fast), border-color var(--transition-fast),
              box-shadow var(--transition-fast), transform var(--transition-fast),
              color var(--transition-fast);
}

.btn span.icon {
  font-size: 0.95rem;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.65);
  transform: translateY(-0.5px);
  color: #c6cbe9;
}

.btn-ghost {
  background: transparent;
  border-style: dashed;
}

.btn-ghost:hover {
  background: rgba(5, 7, 14, 0.9);
}

.distance-output {
  margin-top: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 8, 20, 0.9);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  align-items: center;
  justify-content: space-between;
}

.distance-value {
  font-weight: 600;
  font-size: 0.9rem;
  color: #ebefff;
}

.distance-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.aside-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.list li {
  margin-bottom: 0.35rem;
}

.list strong {
  color: #d6dbff;
  font-weight: 500;
}

.footnote {
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: #6b7399;
}

.tagline {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tagline span {
  color: #e7dcff;
}
