.jigsaw-container {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

#blogImageModal .modal-dialog {
  max-width: 100%;
  margin: 0;
}

#blogImageModal .modal-content {
  height: 100vh;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

#blogImageModal .modal-header {
  flex: 0 0 auto;
  border-bottom: none;
}

#blogImageModal .modal-body {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

#blogImageModal .modal-body .jigsaw-container {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

#blogImageModal .modal-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jigsaw-overlay {
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: radial-gradient(circle at top, #202a60, #050712);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-in-out;
}

.jigsaw-overlay.jigsaw-active {
  opacity: 1;
  pointer-events: auto;
}

.jigsaw-overlay.jigsaw-solved {
  background: transparent;
  box-shadow: none;
}

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

#jigsaw-puzzle-canvas,
#jigsaw-fireworks-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

#jigsaw-puzzle-canvas {
  background: radial-gradient(circle at top, #151a3a, #050712);
  z-index: 1;
}

.jigsaw-overlay.jigsaw-solved #jigsaw-puzzle-canvas {
  background: transparent;
}

#jigsaw-fireworks-canvas {
  pointer-events: none;
  z-index: 2;
}

.jigsaw-stats {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #f5f5f5;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  z-index: 3;
}

.jigsaw-stat-label {
  opacity: 0.75;
  margin-right: 0.15rem;
}

.jigsaw-stat {
  display: flex;
  align-items: center;
}

.jigsaw-hint {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #f5f5f5;
  font-size: 0.7rem;
  z-index: 3;
}

/* Spot the Ball --------------------------------------------------------- */

.spotball-modal-content {
  background-color: #000;
  color: #fff;
}

.spotball-container {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 120px);
  background: #000;
  overflow: hidden;
}

.spotball-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: filter 0.4s ease;
}

.spotball-image-fail {
  filter: grayscale(100%);
}

#spotball-overlay,
#spotball-fireworks {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#spotball-overlay {
  pointer-events: auto;
}

.spotball-hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  color: #fff;
  z-index: 5;
}

.spotball-result-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-size: 6rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
}

.spotball-result-success {
  color: #3fbf3f;
}

.spotball-result-fail {
  color: #ff3b3b;
}

.spotball-result-icon.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
