﻿:root {
  color-scheme: dark;
  --bg: #0b0f10;
  --panel: rgba(18, 24, 25, 0.84);
  --panel-strong: #131a1b;
  --line: rgba(164, 189, 176, 0.18);
  --text: #edf6ed;
  --muted: #8fa199;
  --green: #82ff9e;
  --green-dim: rgba(130, 255, 158, 0.18);
  --orange: #ffad4d;
  --orange-dim: rgba(255, 173, 77, 0.22);
  --red: #ff5b5b;
  --steel: #8aa0a1;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Bahnschrift", "DIN Alternate", "Microsoft YaHei UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(130, 255, 158, 0.10), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(255, 173, 77, 0.11), transparent 30%),
    linear-gradient(135deg, #07090a 0%, #101717 55%, #080b0c 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.shell {
  width: min(1760px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 12px;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 8px;
  font-size: clamp(34px, 5vw, 72px);
  line-height: .95;
  letter-spacing: -0.06em;
  max-width: 980px;
}

.subtitle {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.status-card {
  min-width: 260px;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: rgba(9, 13, 14, 0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.status-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 22px var(--orange);
}

.status-dot.ready { background: var(--green); box-shadow: 0 0 22px var(--green); }
.status-dot.busy { background: #60a5fa; box-shadow: 0 0 22px #60a5fa; animation: pulse 900ms infinite alternate; }
.status-dot.error { background: var(--red); box-shadow: 0 0 22px var(--red); }

.status-card strong { display: block; }
.status-card small { color: var(--muted); }

.workspace {
  display: grid;
  grid-template-columns: minmax(440px, 0.92fr) minmax(520px, 1.08fr);
  gap: 18px;
}

.panel, .control-rig {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head h2 {
  font-size: 18px;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.panel-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

canvas {
  width: 100%;
  height: min(62vh, 620px);
  min-height: 420px;
  display: block;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 50%, rgba(130,255,158,.055), transparent 58%),
    linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid rgba(255,255,255,.08);
  cursor: crosshair;
}

.sim-panel canvas { cursor: default; }

.canvas-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  padding: 12px 4px 0;
}

.metric {
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(0,0,0,.24);
  border: 1px solid var(--line);
  text-align: right;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric strong { color: var(--orange); font-size: 20px; }

.control-rig {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.0fr 1.1fr 1.2fr 1.2fr;
  gap: 16px;
  padding: 18px;
}

.control-group {
  background: rgba(0,0,0,.20);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
}

.primary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

button {
  border: 0;
  color: var(--text);
  background: #1c2829;
  border: 1px solid rgba(255,255,255,.10);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

button:hover { transform: translateY(-1px); border-color: rgba(130,255,158,.42); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: wait; transform: none; }

button.primary {
  grid-column: span 3;
  color: #07100a;
  background: linear-gradient(135deg, var(--green), #d9ffc9);
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(130,255,158,.17);
}

button.ghost {
  background: rgba(130,255,158,.08);
  color: var(--green);
}

.sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}

label span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

label b { color: var(--text); }

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.readout h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

pre {
  margin: 0;
  max-height: 150px;
  overflow: auto;
  color: #bad4c6;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.45;
}

@keyframes pulse { from { opacity: .55; } to { opacity: 1; } }

@media (max-width: 1100px) {
  .hero { align-items: stretch; flex-direction: column; }
  .workspace { grid-template-columns: 1fr; }
  .control-rig { grid-template-columns: 1fr; }
}


.constraints {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.constraints h3 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  font-size: 15px;
}

.pass-point-note {
  color: #68f0ff;
}
