:root {
  --panel: #0b1220cc;
  --muted: #9aa4b2;
  --accent: #7dd3fc;
}
#container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 24px 0;
}

.wrap {
  width: auto;
  max-width: 96vw;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
}
.canvas-wrap {
  background: var(--panel);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 6px 24px rgba(2, 6, 23, 0.7);
}
canvas {
  display: block;
  width: 100%;
  height: 680px;
  width: 960px;
  background: linear-gradient(180deg, #071428, #082033);
  border-radius: 6px;
}
.sidebar {
  background: var(--panel);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 6px 24px rgba(2, 6, 23, 0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 680px;
}
.wrap h1 {
  margin: 0 0 6px 0;
  font-size: 18px;
}
.controls {
  display: flex;
  gap: 8px;
}
button {
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
button.secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.stat {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}
.leader {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}
.type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}
.badge {
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.small {
  font-size: 12px;
  color: var(--muted);
}
.footer {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
}
input {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent);
  padding: 6px 8px;
  border-radius: 6px;
  width: 60px;
}
label.small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
}

@media (max-width: 700px) {
  .wrap {
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .canvas-wrap,
  .sidebar {
    min-height: unset;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(2, 6, 23, 0.5);
  }
  canvas {
    height: 500px;
    width: 100%;
    border-radius: 4px;
  }
  h1 {
    font-size: 16px;
  }
  .stat,
  .type-row,
  .badge {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 5px;
  }
  .controls {
    flex-direction: column;
    gap: 6px;
  }
  button {
    padding: 7px 8px;
    font-size: 14px;
  }
  .footer {
    font-size: 11px;
    padding-bottom: 8px;
  }
  .row {
    gap: 6px;
  }
  input[type="range"] {
    width: 100%;
  }

  .canvas-wrap .row {
    display: none;
  }
}

@media (max-width: 420px) {
  #container {
    padding: 10px 0;
  }
  .wrap {
    gap: 8px;
  }
  .canvas-wrap,
  .sidebar {
    padding: 5px;
  }
  canvas {
    height: 600px;
  }
  h1 {
    font-size: 14px;
  }
}