:root {
  --bg: #080a12;
  --ink: #f6f0dc;
  --muted: #b8bfd7;
  --gold: #f7c948;
  --violet: #6f54ff;
  --cyan: #55d6ff;
  --danger: #ff5e7a;
}

* {
  box-sizing: border-box;
}

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

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 32%, #17203a, #080a12 70%);
}

.screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 25% 25%, rgba(85, 214, 255, 0.14), transparent 30rem),
    radial-gradient(circle at 75% 20%, rgba(111, 84, 255, 0.22), transparent 32rem),
    rgba(5, 7, 12, 0.68);
  z-index: 5;
}

.screen.hidden {
  display: none;
}

.panel {
  width: min(720px, 100%);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid rgba(247, 201, 72, 0.42);
  border-radius: 18px;
  background: rgba(7, 10, 22, 0.86);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.panel.compact {
  width: min(560px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: 0;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3.4rem, 10vw, 6.8rem);
}

h2 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
}

.lede,
#resultCopy {
  max-width: 58ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

button,
a.secondary {
  min-height: 46px;
  border-radius: 8px;
  border: 0;
  padding: 0 18px;
  color: #07101c;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  background: var(--gold);
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8ecf7;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.controls span,
.hud span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
}

.hud {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: none;
}

.hud strong {
  color: var(--gold);
}

.mobile-controls {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: none;
  grid-template-columns: 74px;
  gap: 8px;
}

.mobile-controls div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-controls button {
  min-height: 44px;
  padding: 0 10px;
  background: rgba(232, 236, 247, 0.9);
}

.mobile-controls .capture {
  background: var(--gold);
}

@media (hover: none), (max-width: 780px) {
  .mobile-controls {
    display: grid;
  }

  .panel {
    padding-bottom: 150px;
  }
}
