:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #151515;
  --text: #eeeeee;
  --muted: #a4a4a4;
  --line: #303030;
  --accent: #40d0ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

.app {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
}

.panel {
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--panel);
  padding: 18px 16px;
}

.panel h1 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
}

.panel-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.panel-top h1 {
  margin: 0;
}

.lang-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
}

.lang-switch button {
  width: auto;
  min-height: 30px;
  padding: 0 12px;
  background: #242424;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 650;
}

.lang-switch button.active {
  background: var(--accent);
  color: #001017;
  border-color: transparent;
}

.control {
  margin-bottom: 16px;
}

.advanced {
  margin: 2px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 0;
}

.advanced summary {
  cursor: pointer;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.control-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

label {
  font-size: 14px;
  font-weight: 650;
}

.value-input {
  width: 72px;
  height: 30px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #0c0c0c;
  color: var(--text);
  padding: 0 8px;
  text-align: right;
  font: inherit;
}

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

.control p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.toggles {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: var(--text);
}

.toggles label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #001017;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

.status {
  margin-top: 14px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
}

.shortcut-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  background: #000;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: absolute;
  left: 12px;
  bottom: 12px;
  pointer-events: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  padding: 8px 10px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.35;
}

.app.fullscreen {
  display: block;
}

.app.fullscreen .panel {
  display: none;
}

.app.fullscreen .stage {
  width: 100vw;
  height: 100vh;
}

.app.fullscreen .hud {
  display: none;
}
