* {
  box-sizing: border-box;
}

/* Remove default spacing and make the page span the full viewport. */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  /* Prevent browser scrollbars while rendering a full-screen canvas. */
  overflow: hidden;
  background: #000;
}

/* Remove inline spacing behavior from canvas elements. */
canvas {
  display: block;
}

/* Overlay shown until the user grants motion permission. */
#permission-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Sits above the p5.js canvas. */
  z-index: 10;
  pointer-events: none; /* let touches pass through except for the button */
}

#permission-btn {
  pointer-events: all;
  padding: 18px 36px;
  font-family: monospace;
  font-size: 18px;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.05em;
  /* Subtle pulse to draw the user's eye. */
  animation: pulse 2s ease-in-out infinite;
}

#permission-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
