#wam-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#wam-overlay.open { display: flex; }

#wam-modal {
  background: #0f0f0f;
  border: 1px solid #222;
  border-radius: 20px;
  padding: 24px;
  width: 420px;
  max-width: 96vw;
  position: relative;
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

/* Header */
#wam-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
#wam-title { font-size: 16px; font-weight: 700; color: #fff; }
#wam-secret { font-size: 11px; color: #444; margin-top: 2px; }
#wam-close {
  background: none; border: 1px solid #2a2a2a; border-radius: 8px;
  color: #666; padding: 4px 12px; cursor: pointer; font-size: 13px;
}
#wam-close:hover { background: #1a1a1a; color: #aaa; }

/* HUD */
#wam-hud {
  display: flex;
  justify-content: space-between;
  background: #161616;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 18px;
}
.wam-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wam-stat-label { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 1px; }
.wam-stat-val { font-size: 20px; font-weight: 800; color: #fff; }

/* Grid */
#wam-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}

.wam-hole {
  position: relative;
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

/* Dirt mound */
.wam-dirt {
  position: absolute;
  bottom: 0;
  width: 90%;
  height: 28px;
  background: #3d2a1a;
  border-radius: 50%;
  border-top: 3px solid #5a3d22;
  z-index: 1;
}

/* Mole */
.wam-mole {
  position: absolute;
  bottom: 10px;
  width: 58px;
  height: 62px;
  background: #7a5c3a;
  border-radius: 50% 50% 40% 40%;
  cursor: pointer;
  z-index: 2;
  transform: translateY(100%);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  border: 2px solid #5a3d22;
}

.wam-mole.show { transform: translateY(18%); }
.wam-mole.hide { transform: translateY(100%); transition: transform 0.2s ease-in; }
.wam-mole.whacked {
  transform: translateY(100%) scale(0.8);
  transition: transform 0.15s ease-in;
}

.wam-mole:hover { filter: brightness(1.1); }

/* Mole face */
.wam-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  gap: 4px;
  pointer-events: none;
}
.wam-eyes {
  display: flex;
  gap: 10px;
}
.wam-eyes span {
  width: 9px; height: 9px;
  background: #1a0a00;
  border-radius: 50%;
  display: block;
  position: relative;
}
.wam-eyes span::after {
  content: '';
  position: absolute;
  top: 1px; left: 2px;
  width: 3px; height: 3px;
  background: #fff;
  border-radius: 50%;
}
.wam-nose {
  width: 10px; height: 7px;
  background: #c06040;
  border-radius: 50%;
}
.wam-mouth {
  width: 16px; height: 6px;
  border: 2px solid #1a0a00;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

/* Start / End screens */
#wam-start-screen, #wam-end-screen {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: rgba(10,10,10,0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 20;
}
#wam-end-emoji { font-size: 48px; }
#wam-start-title { font-size: 18px; font-weight: 700; color: #fff; }
#wam-start-text { font-size: 13px; color: #666; }
#wam-end-score-label { font-size: 13px; color: #666; }
#wam-end-score { font-size: 52px; font-weight: 900; color: #fff; line-height: 1; }
#wam-end-msg { font-size: 14px; color: #888; }

#wam-start-btn, #wam-play-again {
  background: #e8a020;
  border: none;
  border-radius: 12px;
  color: #000;
  padding: 11px 36px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: 0.5px;
}
#wam-start-btn:hover, #wam-play-again:hover { background: #f0b030; }

/* Floating +1 */
#wam-hit-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}
#wam-hit-fx span {
  position: absolute;
  font-size: 18px;
  font-weight: 900;
  color: #e8a020;
  animation: wamFloat 0.7s ease-out forwards;
  transform: translateX(-50%);
}
@keyframes wamFloat {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-50px); }
}