:root {
  color-scheme: dark;
  --bg: #090a14;
  --surface: #121428;
  --accent: #4ad296;
  --accent-strong: #2ea574;
  --text: #e7edf5;
  --muted: #96a3bb;
  --border: rgba(90, 110, 150, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  display: flex;
  justify-content: center;
}

#app-root {
  width: 100%;
  max-width: 640px;
  padding: 24px 16px 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

h1,
h2,
p {
  margin: 0;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hidden {
  display: none !important;
}

.app-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.app-heading h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.04em;
}

.app-heading p {
  font-size: 0.95rem;
  color: var(--muted);
}

.menu-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

button {
  font: inherit;
  padding: 14px 18px;
  border: none;
  border-radius: 16px;
  background: var(--accent);
  color: #04120b;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  touch-action: manipulation;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

button:active {
  transform: scale(0.98);
  filter: brightness(0.92);
}

.info-text {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.run-view {
  gap: 24px;
}

.status-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.status-label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.status-value {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
}

.canvas-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.canvas-card h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.canvas-wrapper {
  position: relative;
  width: 100%;
}

.canvas-wrapper canvas {
  width: 100%;
  height: auto;
  display: block;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.warning-text {
  font-size: 0.85rem;
  color: #f0b56b;
  text-align: center;
}

@media (min-width: 540px) {
  #app-root {
    padding: 32px 24px 64px;
  }

  .controls {
    flex-direction: row;
    justify-content: center;
  }

  .controls button {
    min-width: 160px;
  }
}
