:root {
  --bg: #0e1520;
  --bg-accent: #132133;
  --panel: rgba(12, 18, 28, 0.92);
  --panel-border: rgba(185, 210, 240, 0.12);
  --text: #eef4ff;
  --muted: #9eb0c8;
  --button: #f1f5f8;
  --button-text: #0f1c2b;
  --secondary: #223346;
  --secondary-text: #dce7f5;
  --accent: #58d4ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(88, 212, 255, 0.08), transparent 35%),
    linear-gradient(135deg, var(--bg), var(--bg-accent));
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  width: 100%;
  height: 100%;
}

.panel {
  padding: 20px 18px;
  border-right: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.panel-block {
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.controls-top {
  display: flex;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button.secondary {
  background: var(--secondary);
  color: var(--secondary-text);
}

label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.96rem;
}

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

.hint-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.hint-list span {
  display: inline-block;
  min-width: 52px;
  color: var(--text);
  font-weight: 700;
}

.stats {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  line-height: 1.6;
}

.stats strong {
  color: var(--text);
}

.nucleus-info {
  min-height: 132px;
}

.nucleus-info .headline {
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.nucleus-info .delta-good {
  color: #7df79f;
  font-weight: 700;
}

.nucleus-info .delta-bad {
  color: #ff8a8a;
  font-weight: 700;
}

.nucleus-info .delta-neutral {
  color: var(--muted);
  font-weight: 700;
}

.stage-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
}

#simCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .panel {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }
}
