/* Perfect Circle Game Styles */

.perfect-circle-frame {
  position: relative;
  cursor: crosshair;
  overflow: hidden;
  touch-action: none; /* Prevent scrolling while drawing */
  user-select: none;
}

/* Tall enough for a good size of circle, and the frame ends where the canvas does. */
.perfect-circle-frame canvas {
  display: block;
  width: 100%;
  height: clamp(340px, 62vh, 560px);
}

/* HUD - best score display */
#hud {
  position: absolute;
  top: 12px;
  right: 16px;
  color: var(--soft);
  font-family: monospace;
  font-size: 0.95rem;
  z-index: 2;
}

/* Instructions overlay */
#instructions {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--soft);
  font-size: 1.1rem;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#instructions.hidden {
  opacity: 0;
}

/* Score display after drawing */
#scoreDisplay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
  pointer-events: none; /* a new line can start right on top of the score */
}

#scoreDisplay.hidden {
  display: none;
}

#scoreValue {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

#tryAgain {
  pointer-events: auto;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}

#tryAgain:hover {
  opacity: 0.85;
}

@media (max-width: 768px) {
  #scoreValue {
    font-size: 2.2rem;
  }
}
