/* Mothman Mini Golf – styles */
.mothman-golf {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: #0a0a12;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8e0d5;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 8px; /* optional – remove if you want sharp edges */
}

.mothman-golf * {
  box-sizing: border-box;
}

.mothman-golf .mg-ui {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #12121c 0%, #0a0a12 100%);
  border-bottom: 1px solid #2a1a2a;
  font-size: 13px;
  letter-spacing: 0.04em;
  z-index: 10;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.mothman-golf .mg-ui span {
  opacity: 0.9;
  white-space: nowrap;
}

.mothman-golf .mg-ui strong {
  color: #ff6b6b;
  font-weight: 600;
}

/* Explicit styles to override Tailwind preflight / global button resets */
.mothman-golf button.mg-reset,
.mothman-golf .mg-reset {
  all: unset;
  box-sizing: border-box;
  display: inline-block;
  background: #ff6b6b !important;
  color: #0a0a12 !important;
  border: none !important;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  line-height: 1.2;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.15s, transform 0.1s;
}

.mothman-golf button.mg-reset:hover,
.mothman-golf .mg-reset:hover {
  filter: brightness(1.1);
}

.mothman-golf button.mg-reset:active,
.mothman-golf .mg-reset:active {
  transform: scale(0.96);
}

/* Floating reset on the play area – always visible during play */
.mothman-golf .mg-reset-float {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 15;
  padding: 7px 14px !important;
  font-size: 13px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* New Game – distinct from Ball Reset */
.mothman-golf button.mg-newgame,
.mothman-golf .mg-newgame {
  all: unset;
  box-sizing: border-box;
  display: inline-block;
  background: #4a5568 !important;
  color: #e8e0d5 !important;
  border: none !important;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  line-height: 1.2;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.15s, transform 0.1s;
}

.mothman-golf button.mg-newgame:hover,
.mothman-golf .mg-newgame:hover {
  filter: brightness(1.15);
}

.mothman-golf button.mg-newgame:active,
.mothman-golf .mg-newgame:active {
  transform: scale(0.96);
}

.mothman-golf .mg-canvas-wrap {
  flex: 1;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.mothman-golf canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #0a0a12;
  cursor: crosshair;
  touch-action: none;
}

.mothman-golf .mg-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(8, 6, 14, 0.82);
  z-index: 20;
  text-align: center;
  padding: 24px;
  transition: opacity 0.25s ease;
}

.mothman-golf .mg-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.mothman-golf .mg-overlay h1 {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  margin-bottom: 8px;
  color: #ff6b6b;
  text-shadow: 0 0 18px rgba(255, 80, 80, 0.45);
  letter-spacing: 0.06em;
}

.mothman-golf .mg-overlay p {
  font-size: clamp(0.9rem, 2.8vw, 1.05rem);
  max-width: 340px;
  line-height: 1.45;
  opacity: 0.9;
  margin-bottom: 22px;
}

.mothman-golf .mg-btn {
  background: #ff6b6b;
  color: #0a0a12;
  border: none;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 20px rgba(255, 100, 100, 0.35);
}

.mothman-golf .mg-btn:active {
  transform: scale(0.97);
}

.mothman-golf .mg-hint {
  margin-top: 18px;
  font-size: 0.8rem;
  opacity: 0.55;
}

.mothman-golf .mg-power {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(220px, 70%);
  height: 8px;
  background: #1a1a24;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 5;
  pointer-events: none;
}

.mothman-golf .mg-power.visible {
  opacity: 1;
}

.mothman-golf .mg-power-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4ade80, #fbbf24, #ff6b6b);
  border-radius: 4px;
  transition: width 0.05s linear;
}
