:root {
  --bg: #05070f;
  --panel: rgba(255, 255, 255, 0.07);
  --panel2: rgba(255, 255, 255, 0.10);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);
  --muted2: rgba(255, 255, 255, 0.58);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  --accent: #6ee7ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(900px 600px at 15% 10%, rgba(110, 231, 255, 0.16), transparent 55%),
    radial-gradient(900px 600px at 75% 20%, rgba(167, 139, 250, 0.12), transparent 60%),
    var(--bg);
  overflow: hidden;
}

.app {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 18px 12px;
}

.topbarCenter {
  flex: 1;
  display: flex;
  justify-content: center;
}

.brand {
  font-family: ui-rounded, "Segoe Print", "Segoe Script", "Bradley Hand", "Comic Sans MS", ui-sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.8px;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.95), rgba(124, 92, 255, 0.95));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 26px rgba(0,0,0,0.35);
}

.title h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.3px;
}

.subtitle {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.control {
  display: grid;
  grid-template-columns: auto 160px auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.control label {
  font-size: 12px;
  color: var(--muted2);
}

.controlValue {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  min-width: 44px;
  text-align: right;
}

input[type='range'] {
  width: 160px;
}

.btn {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.06));
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  user-select: none;
  font-weight: 700;
  color: var(--muted);
}

.toggle input {
  width: 16px;
  height: 16px;
}

.stage {
  position: relative;
  padding: 0 18px 12px;
}

#space {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow);
}

.info {
  position: absolute;
  right: 28px;
  top: 18px;
  width: min(340px, calc(100% - 48px));
  background: rgba(10, 12, 20, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.infoTitle {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 10px;
}

.infoGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  align-items: baseline;
}

.k {
  font-size: 12px;
  color: var(--muted2);
}

.v {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

.infoHint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.35;
}

.footer {
  padding: 0 18px 14px;
  color: var(--muted2);
  font-size: 12px;
}

@media (max-width: 950px) {
  .info {
    position: static;
    margin-top: 12px;
    width: 100%;
  }

  .stage {
    padding-bottom: 18px;
  }
}
