/* ==========================================================================
   END OF GAME SHARE SHEET
   Shown after a win: the generated poster, a row of platform targets and the
   fallbacks (save / copy) that carry the share when a platform has no web
   endpoint or the browser blocks the Web Share API.
   ========================================================================== */

.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(6px);
  animation: share-fade-in 0.24s ease-out;
}

.share-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(420px, 100%);
  max-height: 100%;
  padding: 18px;
  overflow-y: auto;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 16px;
  background: linear-gradient(160deg, #10281f, #061410);
  box-shadow: 0 18px 60px rgb(0 0 0 / 55%);
  color: #fff;
  animation: share-rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.share-preview {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52vh;
  border-radius: 10px;
  background: #061410;
  object-fit: contain;
}

.share-headline {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.share-targets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.share-target {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding: 10px 4px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 10px;
  background: rgb(255 255 255 / 6%);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.share-target:hover,
.share-target:focus-visible {
  background: rgb(255 255 255 / 14%);
  transform: translateY(-1px);
}

.share-target-icon {
  font-size: 22px;
  line-height: 1;
}

.share-target-label {
  white-space: nowrap;
}

.share-status {
  min-height: 2.6em;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: rgb(255 255 255 / 70%);
}

.share-actions {
  display: flex;
  gap: 8px;
}

.share-action {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #1fbf7a;
  color: #04150e;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.share-action:hover,
.share-action:focus-visible {
  filter: brightness(1.1);
}

.share-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 45%);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

@keyframes share-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes share-rise {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .share-overlay,
  .share-panel {
    animation: none;
  }

  .share-target {
    transition: none;
  }
}
