
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}


body {
  height: 100vh;
  width: 100vw;
  background-color: rgb(58, 129, 0);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  cursor: none;
  user-select: none;
  font-family: sans-serif;
  position: relative;
  padding: 0.5rem;
}

#cursor {
  width: 80px;
  height: 80px;
  position: fixed;
  top: -9999px; left: -9999px;
  background-image: url('./assets/hammer.png');
  background-size: 100% 100%;
  transform: translate(-20%, -20%);
  transition: transform 0.08s;
  pointer-events: none;
  z-index: 999;
}
#cursor.active {
  transform: translate(-20%, -20%) rotate(-45deg) scale(0.85);
}

#hud {
  position: relative;
  display: flex;
  gap: 24px;
  margin-bottom: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  top: 200px;
}
.hud-box {
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 5px;

  padding: 3rem 4rem;
  min-width: 170px;

  background: rgba(0, 0, 0, 0.15);
  text-align: center;

  transform: translateY(-8px); 
}
.hud-label {
  font-size: 2rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.hud-val {
  font-size: 2.2rem;
  font-weight: 700;
}
.level-badge {
  background: #ffd700;
  color: #3a3a00;

  padding: 0.6rem 1.8rem;
  height: 10rem;

  font-weight: 700;
  font-size: 4rem;
  letter-spacing: 1px;

  display: flex;
  align-items: center;   
  justify-content: center; 
}


#progress-label {
  position: relative;
  font-size: 3rem;
  opacity: 0.7;
  margin-bottom: 4px;
  top: 210px;
}
#progress-bar-wrap {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  height: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  top: 240px;
}
#progress-bar {
  height: 100%;
  background: #ffd700;
  border-radius: 20px;
  transition: width 0.35s ease;
  width: 0%;
}

#board {
  display: grid;
  justify-content: center;
  align-content: center;
  width: 100%;
  flex: 1;
}

.hole {
  background-color: rgb(165, 85, 11);
  border-radius: 50%;
  box-shadow:
    inset 0 10px 0 7px rgb(53, 21, 6),
    inset 0 20px 20px 15px rgba(0, 0, 0, 0.3),
    0 0 5px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  transition: transform 0.1s;
}
.hole.whacked { transform: scale(0.94); }

.mole-wrap {
  width: 70%;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}
.mole-wrap.up      { transform: translateX(-50%) translateY(0); }
.mole-wrap.whacked { transform: translateX(-50%) translateY(30%); opacity: 0.7; }

.mole-img {
  width: 100%;
  display: block;
}
.mole-emoji {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 2.8rem;
  line-height: 1;
  padding-bottom: 4px;
}

#level-banner {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: #ffd700;
  color: #333;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-size: 2rem;
  font-weight: 700;
  z-index: 50;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
#level-banner.show { transform: translate(-50%, -50%) scale(1); }

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 20;
  padding: 2rem;
}
#overlay h2 { font-size: 4rem; text-align: center; }
#overlay p  { font-size: 3rem; opacity: 0.9; text-align: center; max-width: 1000px; line-height: 1.5; }


.btn {
  background: teal;
  color: #fff;
  border: 2px solid teal;
  border-radius: 8px;
  padding: 0.6rem 2rem;
  font-size: 1.1rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}
.btn:hover { background: transparent; color: #fff; }

.btn.gold { background: #ffd700; border-color: #ffd700; color: #333; }
.btn.gold:hover { background: transparent; color: #ffd700; }