:root {
  color-scheme: dark;
  --bg-top: #08161d;
  --bg-bottom: #10252f;
  --panel: rgba(7, 13, 20, 0.82);
  --panel-border: rgba(191, 232, 255, 0.14);
  --text: #eef9ff;
  --muted: #9eb2c2;
  --accent: #7fd8ff;
  --accent-soft: rgba(127, 216, 255, 0.18);
  --warm: #ffd38d;
  --shadow: rgba(0, 0, 0, 0.28);
  font-family: "IBM Plex Sans", "Avenir Next", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top, rgba(127, 216, 255, 0.1), transparent 32%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text);
}

#app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  display: block;
  opacity: 0;
  pointer-events: none;
}

#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: grab;
}

#overlay.is-dragging {
  cursor: grabbing;
}

.panel {
  height: 100vh;
  overflow-y: auto;
  padding: 24px 20px 28px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-left: 1px solid var(--panel-border);
  box-shadow: -14px 0 40px var(--shadow);
}

.eyebrow,
.caption,
label,
span {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.02;
  max-width: 9ch;
}

.intro,
.caption {
  line-height: 1.45;
}

.group {
  margin-top: 22px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.row + input,
.row + select,
.row + button,
.row + canvas {
  margin-top: 8px;
}

input[type="range"],
select,
button,
input[type="file"] {
  width: 100%;
}

input[type="range"] {
  accent-color: var(--accent);
}

select,
button,
input[type="file"] {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

button {
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(127, 216, 255, 0.18), rgba(255, 211, 141, 0.12)),
    rgba(255, 255, 255, 0.04);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 12px;
  border-radius: 14px;
  background: var(--accent-soft);
}

.stat strong {
  display: block;
  margin-top: 5px;
  font-size: 1.2rem;
  color: var(--warm);
}

#targetPreview {
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #0a1016;
}

@media (max-width: 960px) {
  #app {
    grid-template-columns: 1fr;
  }

  .panel {
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--panel-border);
  }

  #scene {
    height: 60vh;
  }

  .stage {
    height: 60vh;
  }
}
