body {
  background: #0b0f14;
  color: #7cffb2;
  font-family: monospace;
  text-align: center;
  padding: 20px;
}

h1, h2 {
  color: #00e6ff;
}

#eco {
  font-size: 18px;
  margin-bottom: 10px;
}

#controls {
  margin-bottom: 10px;
}

#gardenStatus {
  opacity: 0;
  transition: opacity 0.6s ease;
  margin-bottom: 10px;
}

#gardenStatus.active {
  opacity: 1;
}

button {
  background: #111;
  border: 1px solid #00e6ff;
  color: #00e6ff;
  padding: 8px 12px;
  margin: 4px;
  cursor: pointer;
}

button:hover {
  background: #00e6ff;
  color: #000;
}

/* Barra stabilità */
#gardenStabilityContainer {
  width: 320px;
  margin: 10px auto;
}

#gardenStabilityBar {
  width: 100%;
  height: 14px;
  border: 1px solid #00e6ff;
  background: #111;
}

#gardenStabilityFill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg,#3aff7a,#00e6ff);
  transition: width 0.3s linear, background 0.3s linear;
}

/* Monster */
.monster {
  border: 1px solid rgba(58,255,122,0.5);
  margin: 12px auto;
  padding: 10px;
  width: 260px;
  background: rgba(17,17,17,0.6);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.monster.vanishing {
  opacity: 0;
  transform: translateY(-6px);
}

.monster.rare {
  border-color: #c77dff;
  color: #e0aaff;
  animation: pulse 1.5s infinite;
}

/* Sprite */
.monster-sprite {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  margin-bottom: 6px;
  animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 6px #c77dff; }
  50% { box-shadow: 0 0 18px #c77dff; }
  100% { box-shadow: 0 0 6px #c77dff; }
}

/* ===============================
   BANNER FASE DI LYRA
   =============================== */
#lyraPhaseBanner {
  margin: 10px auto 20px;
  padding: 8px 18px;
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 10px;
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 0.85;
}

/* ===============================
   CANVAS PLATFORM
   =============================== */
#gameCanvas {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 20px auto;
  background: #081820;
  border: 2px solid #00e6ff;
  image-rendering: pixelated;
  touch-action: none;
}

/* ===============================
   TOUCH CONTROLS
   =============================== */

/* desktop: sempre nascosti */
#touchControls {
  display: none;
}

/* mobile */
@media (max-width: 768px) {

  body {
    padding: 10px;
  }

  /* touch visibili SOLO su mobile */
  #touchControls {
    position: fixed;
    top: 220px;
    left: 0;
    right: 0;

    display: flex;
    justify-content: center;
    gap: 12px;

    z-index: 1000;
    touch-action: none;
  }

  #touchControls div {
    width: 44px;
    height: 44px;

    font-size: 20px;
    border-radius: 12px;

    background: rgba(0,0,0,0.85);
    border: 2px solid #00e6ff;
    color: #00e6ff;

    display: flex;
    align-items: center;
    justify-content: center;

    user-select: none;
    touch-action: none;
  }

  /* spazio per evitare sovrapposizioni */
  #gameCanvas {
    margin-top: 90px;
  }

  #gardenStabilityContainer {
    margin: 14px auto;
  }
}
