body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #fffb8f, #ff8fd8, #8fe7ff);
  color: #2f1451;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", cursive;
  cursor: none;
}

.world {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

* {
  cursor: none;
}

.mobile-controls {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: none;
  gap: 0.75rem;
  z-index: 6;
}

.mobile-controls button {
  border: 4px solid #2f1451;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  color: #2f1451;
  font: inherit;
  font-weight: 700;
  padding: 0.9rem 1.1rem;
  min-width: 82px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  touch-action: manipulation;
}

.mobile-controls button:active {
  transform: translateY(2px) scale(0.98);
}

.big-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 9999;
  background: url("Curser.cur") center center / contain no-repeat;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
  will-change: transform, left, top;
}

#bowl {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  border: 0;
  background: transparent;
  padding: 0;
  z-index: 3;
  cursor: pointer;
}

#bowl img {
  width: 96px;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.food {
  position: absolute;
  width: 42px;
  height: 42px;
  z-index: 4;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  cursor: grab;
}

.food.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25));
}

.character-eat {
  animation: eat-bounce 0.35s ease-out;
}

.explosion {
  position: absolute;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffd54f 22%, #ff7a00 48%, #ff2d55 72%, rgba(255, 45, 85, 0) 100%);
  color: #2f1451;
  font-size: 2.6rem;
  font-weight: 900;
  text-shadow: 2px 2px 0 #fff;
  pointer-events: none;
  animation: explode 0.9s ease-out forwards;
}

.title {
  position: absolute;
  top: 1rem;
  left: 50%;
  margin: 0;
  transform: translateX(-50%) rotate(-4deg);
  font-size: clamp(1.8rem, 4vw, 4rem);
  text-align: center;
  text-shadow: 4px 4px 0 #ffffff, 8px 8px 0 #ff4fd8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: wobble 1.2s infinite ease-in-out;
  z-index: 2;
  pointer-events: none;
}

#counter {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  padding: 0.65rem 0.9rem;
  border: 4px solid #2f1451;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 2px 2px 0 #fffb8f;
}

#character {
  position: absolute;
  left: 0;
  top: 0;
  width: min(140px, 18vw);
  height: auto;
  image-rendering: auto;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  transform-origin: center center;
}

@keyframes wobble {
  0%,
  100% {
    transform: translateX(-50%) rotate(-4deg) scale(1.03);
  }
  50% {
    transform: translateX(-50%) rotate(4deg) scale(1.08);
  }
}

@keyframes eat-bounce {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
  70% {
    transform: scale(0.96);
  }
}

@keyframes explode {
  0% {
    transform: scale(0.2);
    opacity: 1;
  }
  70% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@media (pointer: coarse) {
  .big-cursor {
    display: none;
  }

  .mobile-controls {
    display: flex;
  }

  #counter {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.9rem;
  }

  .title {
    width: min(92vw, 28rem);
    font-size: clamp(1.2rem, 5vw, 2.4rem);
  }

  #character {
    width: min(120px, 28vw);
  }

  #bowl img {
    width: 78px;
  }
}
