.share-card-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: scOverlayIn 0.3s ease;
  /* Allow vertical scrolling when the card + actions are taller than viewport (mobile portrait) */
  overflow-y: auto;
  padding: 60px 12px 24px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
/* Hide overlay scrollbar so it doesn't poke out on mobile */
.share-card-overlay { scrollbar-width: none; -ms-overflow-style: none; }
.share-card-overlay::-webkit-scrollbar { width: 0; height: 0; display: none; }
@keyframes scOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.share-card-container {
  position: relative;
  max-width: 440px;
  width: 90%;
  margin: auto 0;
}
@media (max-width: 640px) {
  .share-card-container { width: 100%; max-width: 380px; }
  /* Move the close button INSIDE the container so it doesn't get clipped above the scroll */
  .share-card-close {
    top: 4px !important;
    right: 4px !important;
    background: rgba(0,0,0,0.6) !important;
    width: 36px; height: 36px;
    border-radius: 50%;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px !important;
  }
  .share-card-actions { gap: 8px; }
  .share-card-actions button { padding: 9px 12px; font-size: 13px; flex: 1 1 auto; min-width: 0; }
}
.share-card-close {
  position: absolute;
  top: -40px; right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 2;
}
.share-card-canvas-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.share-card-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}
.share-card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.share-card-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.share-card-actions button:hover {
  transform: scale(1.05);
}
.share-card-actions button:active {
  transform: scale(0.97);
}
.sc-btn-download {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #000;
}
.sc-btn-x {
  background: #000;
  color: #fff;
  border: 1px solid #333 !important;
}
.sc-btn-facebook {
  background: #1877f2;
  color: #fff;
}
.sc-btn-copy {
  background: #333;
  color: #fff;
}
.sc-btn-instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
}
