:root {
  color-scheme: dark;
  --ink: #eff7f2;
  --muted: rgba(239, 247, 242, 0.64);
  --glass: rgba(6, 18, 20, 0.48);
  --line: rgba(239, 247, 242, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #071314;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 420px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 241, 154, 0.42), transparent 28%),
    linear-gradient(180deg, #7bd1f2 0%, #b4dece 48%, #699351 100%);
}

#artCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.title-panel {
  position: absolute;
  top: clamp(18px, 4vw, 44px);
  left: clamp(18px, 4vw, 48px);
  max-width: min(520px, calc(100vw - 36px));
  pointer-events: none;
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.42);
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: clamp(0.72rem, 1.8vw, 0.86rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 9vw, 7rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.controls {
  position: absolute;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.controls button {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.controls button:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 247, 242, 0.34);
  background: rgba(255, 255, 255, 0.14);
}

.controls button:active {
  transform: translateY(0);
}

.pause-icon,
.pause-icon::after {
  width: 5px;
  height: 18px;
  border-radius: 2px;
  background: currentColor;
}

.pause-icon {
  position: relative;
  display: block;
  transform: translateX(-4px);
}

.pause-icon::after {
  position: absolute;
  top: 0;
  left: 9px;
  content: "";
}

.controls button.is-paused .pause-icon {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid currentColor;
  border-radius: 2px;
  background: transparent;
  transform: translateX(2px);
}

.controls button.is-paused .pause-icon::after {
  display: none;
}

.reset-icon {
  width: 19px;
  height: 19px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.reset-icon::after {
  position: absolute;
  top: 11px;
  right: 10px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  content: "";
  transform: rotate(22deg);
}

@media (max-width: 640px) {
  .stage {
    min-height: 100svh;
  }

  .controls {
    gap: 8px;
  }

  .controls button {
    width: 40px;
    height: 40px;
  }
}
