/* General page styling */
body {
  margin: 0;
  font-family: sans-serif;
  background: #111;
  color: #eee;
}

/* Left‑hand menu */
#menu {
  position: absolute;
  left: 10px;
  top: 10px;
  background: #222;
  padding: 10px;
  border-radius: 6px;
}
.unit {
  cursor: pointer;
  margin: 5px 0;
  padding: 4px;
  background: #333;
  border-radius: 4px;
}
.unit:hover { background: #444; }
.unit.selected { outline: 2px solid #0af; }

/* Canvas */
#battlefield {
  display: block;
  margin: auto;
  background: #222;
}

/* HUD (gold) */
#hud {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(0,0,0,0.5);
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: bold;
}

/* Control buttons */
#controls {
  position: absolute;
  right: 10px;
  top: 10px;
}
button {
  margin: 5px;
  padding: 8px 12px;
  background: #555;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
button:hover { background: #666; }

  :root {
      --lightness: 50%;
      --code-background: #ddd;
  }
  /* -------------------------- Weird Footer ----------------------*/
  footer {
          position: absolute;
          left:20%;
          bottom:0;
          background: #FFF;
          text-align: center;
          clear: both;
          display: block;
          padding:10px;
          border: 2px dashed red;
          z-index: 20;
      }
  footer a:hover {
      display: inline-block;
      animation: 0.2s infinite alternate linear wiggle;

      background: linear-gradient(in hsl longer hue 45deg, hsl(0deg, 75%, var(--lightness)) 10%, hsl(0deg, 75%, var(--lightness)) 90%);
      background-clip: text;
      color: transparent;
  }
      @keyframes wiggle {
          from {
              transform: skewX(-8deg);
          }
          to {
              transform: skewX(8deg);
          }
      }