:root {
  --bg: #0b0f14;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --accent: #7dd3fc;
  --danger: #fb7185;
  --good: #86efac;
  --warn: #fde047;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background: radial-gradient(1200px 700px at 60% 10%, rgba(125, 211, 252, 0.12), transparent 55%),
    radial-gradient(900px 650px at 20% 20%, rgba(134, 239, 172, 0.08), transparent 60%),
    radial-gradient(900px 650px at 10% 80%, rgba(251, 113, 133, 0.08), transparent 60%), var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(10px);
}

.brand__title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

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

.topbar__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  flex: 1;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.chip__k {
  opacity: 0.9;
}

.topbar__actions {
  display: flex;
  gap: 10px;
}

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  padding: 14px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel--left {
  padding: 14px;
}

.panel--main {
  display: flex;
  flex-direction: column;
}

.card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel2);
  margin-bottom: 12px;
}

.card__title {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.86);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.stat__label {
  font-size: 12px;
  color: var(--muted);
}

.stat__value {
  margin-top: 6px;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.4px;
  font-family: var(--mono);
}

.upgrades {
  display: grid;
  gap: 10px;
}

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(125, 211, 252, 0.08);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}

.btn--ghost {
  width: auto;
  padding: 10px 12px;
}

.btn--danger {
  width: auto;
  padding: 10px 12px;
  border-color: rgba(251, 113, 133, 0.34);
}

.btn--danger:hover {
  border-color: rgba(251, 113, 133, 0.52);
  background: rgba(251, 113, 133, 0.12);
}

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

.stage {
  padding: 14px;
  display: grid;
  place-items: center;
}

.stage3d {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  position: relative;
}

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

.footer {
  padding: 10px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.footer__kbd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kbd {
  font-family: var(--mono);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.86);
}

.footer__status {
  font-family: var(--mono);
}

.botlist {
  display: grid;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
}

.botrow {
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
  display: grid;
  gap: 4px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--mono);
  font-size: 11px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--accent);
}

.toasts {
  position: fixed;
  top: 74px;
  right: 14px;
  display: grid;
  gap: 10px;
  z-index: 50;
  pointer-events: none;
}

.toast {
  pointer-events: none;
  min-width: 260px;
  max-width: 340px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(-6px);
  opacity: 0;
  animation: toast-in 220ms ease forwards;
  font-family: var(--mono);
  color: rgba(255, 255, 255, 0.92);
}

.toast__title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.toast__desc {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

.toast--good {
  border-color: rgba(134, 239, 172, 0.28);
}

@keyframes toast-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .topbar__stats {
    display: none;
  }
  .toasts {
    top: 66px;
  }
}

