/**
 * Shared “game over” / winner chrome for Golf4Some games.
 * Load with: <link rel="stylesheet" href="/game-winner.css">
 * Wrap content in .gg-winner-sheet and add .gg-theme-dark or .gg-theme-light.
 */

.gg-winner-sheet {
  box-sizing: border-box;
  border-radius: 16px;
  padding: 1.35rem 1.1rem 1.25rem;
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}

.gg-winner-sheet.gg-theme-dark {
  background: #1e1e1e;
  color: #f0f0f0;
  border: 1px solid #333;
}

.gg-winner-sheet.gg-theme-light {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.gg-winner-congrats {
  font-size: clamp(1.85rem, 6.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.12;
  margin: 0 0 0.65rem;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.gg-winner-game {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.gg-theme-dark .gg-winner-game {
  color: #aaa;
}

.gg-theme-light .gg-winner-game {
  color: #666;
}

.gg-winner-hero-name {
  font-size: clamp(1.65rem, 7vw, 2.85rem);
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 0.35rem;
  word-break: break-word;
}

.gg-theme-dark .gg-winner-hero-name {
  color: #ffcc33;
}

.gg-theme-light .gg-winner-hero-name {
  color: #1b5e20;
}

.gg-winner-subline {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
  line-height: 1.35;
}

.gg-theme-dark .gg-winner-subline {
  color: #e0e0e0;
}

.gg-theme-light .gg-winner-subline {
  color: #424242;
}

.gg-winner-details {
  text-align: left;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

.gg-theme-light .gg-winner-details {
  border-top-color: rgba(0, 0, 0, 0.1);
}

.gg-winner-details h3 {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.gg-winner-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 1.35rem;
}

.gg-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: none;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}

.gg-btn-secondary {
  background: #444;
  color: #fff;
}

.gg-theme-light .gg-btn-secondary {
  background: #5c6564;
  color: #fff;
}

.gg-btn-primary {
  font-weight: 800;
}

/* Fullscreen overlay helper */
.gg-winner-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: max(16px, env(safe-area-inset-top)) 12px max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.gg-winner-overlay.is-open {
  display: flex;
}

.gg-theme-overlay-dark {
  background: rgba(14, 14, 16, 0.92);
}

.gg-theme-overlay-light {
  background: rgba(245, 245, 245, 0.97);
}

.gg-winner-overlay-inner {
  width: 100%;
  max-width: 460px;
  margin: auto;
}
