:root {
  --bg-top: #d9efff;
  --bg-bottom: #eff5fb;
  --panel-bg: rgba(10, 31, 51, 0.82);
  --panel-border: rgba(255, 255, 255, 0.18);
  --text-main: #edf7ff;
  --text-soft: #bcd3e5;
  --accent: #ff6f3c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.75), transparent 32%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text-main);
  font-family: "Avenir Next", "PingFang SC", "Noto Sans SC", sans-serif;
}

body {
  position: relative;
}

#app {
  width: 100vw;
  height: 100vh;
}

.panel {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  width: min(360px, calc(100vw - 40px));
  padding: 18px 20px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(9, 25, 39, 0.28);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.1;
}

p,
li {
  color: var(--text-soft);
  line-height: 1.55;
}

ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.status {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.status-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#model-status {
  color: #ffffff;
  font-size: 15px;
}

.target-info {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
}

.target-row {
  margin-bottom: 4px;
}

.target-name {
  font-weight: 700;
  color: #ffffff;
}

.target-mode {
  color: var(--accent);
  margin-left: 8px;
}

.target-priority {
  margin-left: 8px;
}

.target-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 6px;
  margin-top: 6px;
}

.toggle-indicator {
  font-size: 11px;
  opacity: 0.42;
  transition: opacity 120ms ease;
}

.toggle-indicator[data-on="true"] {
  opacity: 1;
  color: #7cf7a0;
}

.toggle-indicator[data-on="true"]::before {
  content: "● ";
}

.controls-toggle {
  width: 100%;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.controls-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.controls-toggle.is-active {
  border-color: rgba(255, 111, 60, 0.62);
  background: rgba(255, 111, 60, 0.16);
}

.pointing-controls {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-height: 320px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 180ms ease, opacity 140ms ease, padding-top 180ms ease, border-color 180ms ease;
}

.pointing-controls.is-collapsed {
  max-height: 0;
  padding-top: 0;
  border-color: transparent;
  opacity: 0;
  pointer-events: none;
}

.control-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.control-row label {
  font-weight: 700;
}

.control-row output {
  min-width: 46px;
  color: #ffffff;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pointing-controls input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.exp-button {
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 111, 60, 0.14);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.exp-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.36);
}

.exp-button.is-active {
  border-color: rgba(255, 227, 137, 0.82);
  background: linear-gradient(135deg, rgba(255, 198, 82, 0.34), rgba(80, 190, 255, 0.18));
  box-shadow: 0 0 22px rgba(255, 196, 66, 0.24);
}

code {
  color: #ffffff;
}

@media (max-width: 720px) {
  .panel {
    left: 12px;
    top: 12px;
    width: calc(100vw - 24px);
    padding: 16px;
  }

  h1 {
    font-size: 22px;
  }
}

#bottom-bar {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: auto;
}

#bottom-bar a {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}
