:root {
  color-scheme: dark;
  --bg: #05050a;
  --panel: #11131d;
  --panel-2: #181c2b;
  --line: #3e476e;
  --text: #ebefff;
  --muted: #a9b2d8;
  --accent: #66f5ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at 15% -10%, #2f3f78 0%, #101527 40%, #05060d 100%);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.app {
  width: min(1100px, 100%);
  display: grid;
  gap: 0.9rem;
}

.hero,
.controls,
.stage {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(20, 25, 45, 0.92), rgba(10, 12, 22, 0.95));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(179, 198, 255, 0.1);
}

.hero {
  padding: 0.95rem 1.15rem;
}

.hero h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  letter-spacing: 0.03em;
  text-shadow: 0 0 14px rgba(102, 245, 255, 0.35);
}

.hero p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.8rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

input[type="text"],
select,
input[type="range"] {
  width: 100%;
  border: 1px solid #505c8e;
  border-radius: 9px;
  background: #101528;
  color: #f5f7ff;
  padding: 0.56rem 0.64rem;
  font-size: 0.92rem;
}

input[type="range"] {
  padding: 0.3rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.check input {
  accent-color: #66f5ff;
}

.actions {
  display: flex;
  gap: 0.5rem;
  align-items: end;
}

button {
  border: 1px solid #596aad;
  border-radius: 10px;
  background: #1a2449;
  color: #f0f6ff;
  font-weight: 700;
  padding: 0.6rem 0.95rem;
  cursor: pointer;
}

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

button.primary {
  border-color: #87f4ff;
  background: linear-gradient(180deg, #2e8cb2, #1f5f81);
}

.stage {
  padding: 0.8rem;
}

canvas {
  width: 100%;
  max-width: 740px;
  height: auto;
  display: block;
  margin-inline: auto;
  border-radius: 10px;
  border: 1px solid #6678b7;
  background: #ece8de;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.status {
  margin: 0.65rem 0 0;
  text-align: center;
  color: #ffd99e;
  min-height: 1.3em;
}

@media (max-width: 860px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: flex-start;
  }
}
