/* ==========================================
   1. LAYOUT & HINTERGRUND
   ========================================== */
body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  background-image: url("../images/kneipe_quadrat.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ==========================================
   2. DAS HUHN (SICHTFENSTER)
   ========================================== */
.huhn-standard {
  flex-shrink: 0;
  width: 90vw;
  max-width: 1080px;
  aspect-ratio: 1 / 1;
  background-image: url("../images/rausch.svg");
  background-repeat: no-repeat;
  background-size: 600% 100%;
  background-position: 0 0;
  background-color: transparent !important;
  margin: 0 auto;
  cursor: pointer;
  z-index: 10;
  /* Sanftes Hüpfen beim Füttern */
  transition: transform 0.15s ease-out;
}

/* Deaktiviert Transition während der Animation */
.huhn-standard.wasted {
  transition: none;
}

.wasted {
  animation:
    wasted-wobble 2s infinite ease-in-out,
    play-rausch 3s steps(6) infinite forwards;
}

/* ==========================================
   3. BEDIENELEMENTE (BUTTON & TEXT)
   ========================================== */
.ui-controls {
  padding: 20px 0 50px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 20;
}

#feed-btn {
  background-color: #ffde00;
  border: 3px solid #000;
  padding: 15px 30px;
  font-family: sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 5px 0 #000;
  transition: all 0.1s;
  -webkit-tap-highlight-color: transparent;
}

#feed-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #000;
}

#feed-btn:disabled {
  background-color: #ccc;
  box-shadow: none;
  cursor: not-allowed;
}

#status-text {
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1.1rem;
}

/* ==========================================
   4. DIE MOTOREN (KEYFRAMES) - WICHTIG!
   ========================================== */
@keyframes play-rausch {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: 120% 0;
  }
}

@keyframes wasted-wobble {
  0%,
  100% {
    transform: rotate(0deg) translateX(0px);
  }
  25% {
    transform: rotate(-6deg) translateX(-15px);
  }
  50% {
    transform: rotate(6deg) translateX(15px);
  }
  75% {
    transform: rotate(-4deg) translateX(-8px);
  }
}
