/* ═══════════════════════════════════════════
   ADLER-TAMAGOTCHI – Styles
   ═══════════════════════════════════════════ */

html {
  scroll-padding-top: 80px;
}

/* ── Sternenhimmel ── */
.star-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: starPulse var(--duration) ease-in-out infinite alternate;
}

@keyframes starPulse {
  0%   { opacity: var(--min-opacity); }
  100% { opacity: var(--max-opacity); }
}

/* ── Willkommens-Screen ── */
#welcome-screen {
  animation: welcomeFadeIn 0.6s ease-out;
}

@keyframes welcomeFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Adler-Visualisierung ── */
.adler-visual {
  position: relative;
  min-height: 160px;
}

.adler-sprite {
  transition: transform 0.3s ease;
  animation: adlerIdle 3s ease-in-out infinite;
  cursor: default;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adler-sprite-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  transition: width 0.4s ease, height 0.4s ease;
}

/* Jüngere Adler (Nestling/Ästling) sind etwas kleiner */
.adler-sprite.young .adler-sprite-img {
  width: 140px;
  height: 140px;
}

@keyframes adlerIdle {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-8px) scale(1.02); }
}

/* Adler-Stimmungen per CSS-Klasse */
.adler-sprite.happy {
  animation: adlerHappy 1.5s ease-in-out infinite;
}

@keyframes adlerHappy {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  25%      { transform: translateY(-10px) scale(1.05) rotate(-3deg); }
  50%      { transform: translateY(-5px) scale(1.02) rotate(3deg); }
  75%      { transform: translateY(-8px) scale(1.03) rotate(-2deg); }
}

.adler-sprite.hungry {
  animation: adlerHungry 2s ease-in-out infinite;
}

@keyframes adlerHungry {
  0%, 100% { transform: translateY(0) scale(1); }
  30%      { transform: translateY(2px) scale(0.98); }
  60%      { transform: translateY(-3px) scale(1); }
}

.adler-sprite.tired {
  animation: adlerTired 4s ease-in-out infinite;
}

@keyframes adlerTired {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  50%      { transform: translateY(3px) scale(0.97) rotate(-2deg); }
}

.adler-sprite.sad {
  animation: adlerSad 3s ease-in-out infinite;
}

@keyframes adlerSad {
  0%, 100% { transform: translateY(0) scale(0.95) rotate(0deg); }
  50%      { transform: translateY(2px) scale(0.93) rotate(-1deg); }
}

.adler-sprite.flying {
  animation: adlerFlying 1.8s ease-in-out infinite;
}

@keyframes adlerFlying {
  0%   { transform: translateY(0) scale(1) rotate(0deg); }
  25%  { transform: translateY(-20px) scale(1.1) rotate(-5deg); }
  50%  { transform: translateY(-10px) scale(1.05) rotate(5deg); }
  75%  { transform: translateY(-18px) scale(1.08) rotate(-3deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}

.adler-sprite.eating {
  animation: adlerEating 0.4s ease-in-out 3;
}

@keyframes adlerEating {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08) translateY(2px); }
}

.adler-sprite.training {
  animation: adlerTraining 0.6s ease-in-out 3;
}

@keyframes adlerTraining {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25%      { transform: scale(1.05) rotate(-5deg); }
  75%      { transform: scale(1.05) rotate(5deg); }
}

.adler-sprite.sleeping {
  animation: adlerSleeping 3s ease-in-out infinite;
}

@keyframes adlerSleeping {
  0%, 100% { transform: scale(0.95) rotate(-2deg); opacity: 0.8; }
  50%      { transform: scale(0.97) rotate(-1deg); opacity: 0.9; }
}

.adler-sprite.playing {
  animation: adlerPlaying 0.5s ease-in-out 4;
}

@keyframes adlerPlaying {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  25%      { transform: translateY(-12px) scale(1.06) rotate(-8deg); }
  75%      { transform: translateY(-8px) scale(1.04) rotate(8deg); }
}

.adler-sprite.grooming {
  animation: adlerGrooming 0.8s ease-in-out 3;
}

@keyframes adlerGrooming {
  0%, 100% { transform: scale(1) rotate(0deg); }
  33%      { transform: scale(1.03) rotate(-3deg); }
  66%      { transform: scale(1.03) rotate(3deg); }
}

.adler-sprite.sick {
  animation: adlerSick 1.5s ease-in-out infinite;
}

@keyframes adlerSick {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25%      { transform: scale(0.98) rotate(-2deg); }
  75%      { transform: scale(0.98) rotate(2deg); }
}

/* Stimmungs-Text */
.adler-mood-text {
  transition: color 0.3s ease;
}

.adler-mood-text.mood-happy { color: #22c55e; }
.adler-mood-text.mood-hungry { color: #f59e0b; }
.adler-mood-text.mood-tired { color: #3b82f6; }
.adler-mood-text.mood-sad { color: #64748b; }
.adler-mood-text.mood-angry { color: #ef4444; }

/* ── Kosten-Badge (rechts oben in Buttons) ── */
.adler-cost-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  white-space: nowrap;
  line-height: 1.3;
  z-index: 2;
}

.adler-coin-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
  white-space: nowrap;
  line-height: 1.3;
  z-index: 2;
}

/* ── Aktions-Karten ── */
.adler-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.adler-action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 119, 6, 0.3);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(217, 119, 6, 0.08);
}

.adler-action-card:active {
  transform: translateY(0) scale(0.97);
}

.adler-action-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.adler-action-card.locked {
  cursor: not-allowed;
}

.adler-action-card.locked > *:not(.adler-lock-badge) {
  opacity: 0;
  pointer-events: none;
}

.adler-action-card.locked .adler-lock-badge {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  gap: 4px;
  background: rgba(8, 10, 14, 0.92);
  border-radius: 16px;
  z-index: 10;
  color: #64748b;
  padding: 8px;
}

.adler-action-card.locked .adler-lock-badge span {
  font-size: 0.7rem;
  font-weight: 600;
}

.adler-action-card.locked:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── Lock-Badge (links oben in Buttons) ── */
.adler-lock-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #94a3b8;
  white-space: nowrap;
  line-height: 1.3;
  z-index: 2;
}

.adler-lock-badge.hidden {
  display: none;
}

/* ── Mini-Spiel Badge (Gamecontroller) ── */
.adler-game-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  white-space: nowrap;
  line-height: 1.3;
  z-index: 2;
}

.adler-action-card .text-2xl {
  transition: transform 0.2s ease;
}

.adler-action-card:hover .text-2xl {
  transform: scale(1.15);
}

/* ── Futter-Optionen ── */
.food-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1px solid rgba(217, 119, 6, 0.15);
  background: rgba(217, 119, 6, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.food-option-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(217, 119, 6, 0.1);
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.1);
}

.food-option-card:active {
  transform: translateY(0) scale(0.97);
}

.food-option-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.food-option-card:disabled .adler-cost-badge {
  opacity: 0.6;
}

/* ── Status-Balken low-warning ── */
#status-bars .status-item {
  margin-bottom: 0.75rem;
}
#status-bars .status-item:last-child {
  margin-bottom: 0;
}
#status-bars .status-item .flex.items-center.justify-between {
  margin-bottom: 0.375rem;
}
#actions-panel {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.status-item.warning .h-full {
  animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* ── Nachrichten-Log ── */
#message-log {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#message-log::-webkit-scrollbar {
  width: 4px;
}

#message-log::-webkit-scrollbar-track {
  background: transparent;
}

#message-log::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.message-item {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal ── */
.adler-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
}

.adler-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.88);
}

/* ── Level-Up Effekt ── */
.level-up-flash {
  animation: levelUpFlash 1s ease-out;
}

@keyframes levelUpFlash {
  0%   { box-shadow: 0 0 0 rgba(217, 119, 6, 0); }
  30%  { box-shadow: 0 0 60px rgba(217, 119, 6, 0.4), inset 0 0 30px rgba(217, 119, 6, 0.1); }
  100% { box-shadow: 0 1px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
}

/* ── Adler-Nachrichten-Overlay (über dem Adler) ── */
#adler-message-overlay {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: calc(100% - 16px);
  background: rgba(8, 10, 14, 0.92);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 12px;
  padding: 8px 16px;
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

#adler-message-overlay.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Pflege-Optionen ── */
.care-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.15);
  background: rgba(34, 197, 94, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.care-option-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
}

.care-option-card:active {
  transform: translateY(0) scale(0.97);
}

.care-option-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.care-option-card.medicine-card {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.05);
}

.care-option-card.medicine-card:hover {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

/* ── Training-Optionen ── */
.training-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  background: rgba(139, 92, 246, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.training-option-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.training-option-card:active {
  transform: translateY(0) scale(0.97);
}

.training-option-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.training-option-card.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.training-option-card.locked > *:not(.adler-lock-badge):not(.adler-game-badge) {
  opacity: 0.3;
}

.training-option-card .adler-cost-badge {
  font-size: 0.65rem;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 4px;
}

/* ── Futter-Optionen locked ── */
.food-option-card.locked {
  cursor: not-allowed;
}

.food-option-card.locked > *:not(.adler-lock-badge) {
  opacity: 0;
  pointer-events: none;
}

.food-option-card.locked .adler-lock-badge {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  gap: 4px;
  background: rgba(8, 10, 14, 0.92);
  border-radius: 14px;
  z-index: 10;
  color: #64748b;
  padding: 8px;
}

.food-option-card.locked .adler-lock-badge span {
  font-size: 0.7rem;
  font-weight: 600;
}

.food-option-card.locked:hover {
  transform: none;
  border-color: rgba(217, 119, 6, 0.15);
  background: rgba(217, 119, 6, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── Spiel-Optionen ── */
.play-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.15);
  background: rgba(251, 191, 36, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.play-option-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.1);
}

.play-option-card:active {
  transform: translateY(0) scale(0.97);
}

.play-option-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.play-option-card.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.play-option-card.locked > *:not(.adler-lock-badge):not(.adler-game-badge) {
  opacity: 0.3;
}

/* ── Aktion-Cooldown-Overlay ── */
.adler-action-card.on-cooldown {
  position: relative;
  pointer-events: none;
}

.adler-action-card.on-cooldown > *:not(.adler-cooldown-overlay):not(.adler-lock-badge):not(.adler-coin-badge) {
  opacity: 0.25;
}

.adler-action-card.has-rest-overlay > *:not(.adler-rest-overlay):not(.adler-lock-badge):not(.adler-coin-badge) {
  opacity: 0.25;
}

.adler-cooldown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(8, 10, 14, 0.88);
  border-radius: 16px;
  z-index: 5;
  animation: cooldownPulse 1s ease-in-out infinite;
}

.adler-cooldown-overlay.hidden {
  display: none;
}

/* ── Rest-Overlay (blockiert durch Ausruhen) ── */
.adler-rest-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(8, 10, 14, 0.88);
  border-radius: 16px;
  z-index: 6;
  animation: restPulse 2s ease-in-out infinite;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.adler-rest-overlay.hidden {
  display: none;
}

@keyframes restPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

@keyframes cooldownPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

/* ── Spiel-Screen Einblende-Animation ── */
#game-screen {
  animation: gameFadeIn 0.5s ease-out;
}

@keyframes gameFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .adler-sprite-img {
    width: 140px;
    height: 140px;
  }
  .adler-sprite.young .adler-sprite-img {
    width: 110px;
    height: 110px;
  }
}

@media (max-width: 600px) {
  .adler-action-card {
    padding: 12px 8px;
  }

  .food-option-card {
    padding: 10px 8px;
  }

  .adler-sprite-img {
    width: 120px;
    height: 120px;
  }
  .adler-sprite.young .adler-sprite-img {
    width: 90px;
    height: 90px;
  }

  .mm-slot {
    width: 32px;
    height: 32px;
  }

  .mm-color-btn {
    width: 42px;
    height: 42px;
  }

  .mm-color-palette {
    gap: 12px;
  }

  .mm-actions-row {
    gap: 14px;
  }
}

/* ── Mastermind (Folgeflug) ── */
.mm-board {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.mm-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mm-current-row {
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(217, 119, 6, 0.08);
  animation: mmCurrentPulse 2s ease-in-out infinite;
}

@keyframes mmCurrentPulse {
  0%, 100% { border-color: rgba(217, 119, 6, 0.25); }
  50%      { border-color: rgba(217, 119, 6, 0.5); }
}

.mm-empty-row {
  opacity: 0.35;
}

.mm-guess-slots {
  display: flex;
  gap: 8px;
}

.mm-slot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mm-slot:hover {
  transform: scale(1.1);
}

.mm-slot-filled {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mm-slot-active {
  cursor: pointer;
}

.mm-slot-empty.mm-slot-selected {
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
  animation: mmSlotGlow 1.2s ease-in-out infinite;
}

@keyframes mmSlotGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(251, 191, 36, 0.3); }
  50%      { box-shadow: 0 0 18px rgba(251, 191, 36, 0.5); }
}

.mm-feedback {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 80px;
}

.mm-feedback-placeholder {
  opacity: 0.3;
}

.mm-peg {
  font-size: 12px;
  line-height: 1;
}

/* Color palette */
.mm-color-palette {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 12px;
  flex-wrap: wrap;
}

.mm-color-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mm-color-btn:hover {
  transform: scale(1.15);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.15);
}

.mm-color-btn:active {
  transform: scale(0.95);
}

/* Actions row */
.mm-actions-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 14px;
}

/* ── Himmelsfang Effekte ── */
.play-score-popup {
  position: absolute;
  font-size: 0.9rem;
  font-weight: 700;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
  animation: playPopupFloat 0.9s ease-out forwards;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.play-score-popup.positive { color: #4ade80; }

.play-score-popup.eagle-eye {
  color: #fbbf24;
  animation: playPopupEagle 0.9s ease-out forwards;
}

.play-score-popup.negative { color: #f87171; }

.play-score-popup.time-bonus { color: #22d3ee; font-size: 1rem; }

.play-score-popup.diamond-bonus { color: #c084fc; font-size: 1rem; }

@keyframes playPopupFloat {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  60%  { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-40px) scale(0.8); }
}

@keyframes playPopupEagle {
  0%   { opacity: 1; transform: translateY(0) scale(1.2); }
  30%  { transform: translateY(-10px) scale(1.4); }
  60%  { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-45px) scale(0.8); }
}

.play-eagle-flash {
  animation: eagleFlashPulse 0.4s ease-out;
}

@keyframes eagleFlashPulse {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.6; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.3); }
}

.play-storm-flash {
  animation: playStormFlash 0.3s ease-out;
}

@keyframes playStormFlash {
  0%   { box-shadow: inset 0 0 30px rgba(239, 68, 68, 0.5); }
  50%  { box-shadow: inset 0 0 60px rgba(239, 68, 68, 0.3); }
  100% { box-shadow: none; }
}

/* ── Schatzsuche ── */
.treasure-cell {
  aspect-ratio: 1;
  background: rgba(30, 58, 95, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.2rem;
  user-select: none;
}
.treasure-cell:hover {
  background: rgba(40, 70, 110, 0.7);
  border-color: rgba(251, 191, 36, 0.4);
  transform: scale(1.05);
}
.treasure-cell.revealed {
  cursor: default;
  transform: none;
}
.treasure-cell.revealed-empty {
  background: rgba(20, 40, 70, 0.4);
  border-color: rgba(255, 255, 255, 0.05);
}
.treasure-cell.revealed-gem {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  animation: treasureGemReveal 0.4s ease-out;
}
.treasure-cell.revealed-trap {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  animation: treasureTrapShake 0.3s ease-out;
}
.treasure-cell.revealed-missed {
  background: rgba(100, 100, 100, 0.15);
  border-color: rgba(255, 255, 255, 0.05);
  opacity: 0.7;
}
.treasure-proximity {
  font-weight: 700;
  font-size: 1rem;
}
.treasure-proximity[data-num="1"] { color: #60a5fa; }
.treasure-proximity[data-num="2"] { color: #4ade80; }
.treasure-proximity[data-num="3"] { color: #fbbf24; }
.treasure-proximity[data-num="4"] { color: #f97316; }
.treasure-proximity[data-num="5"] { color: #ef4444; }
.treasure-proximity[data-num="6"] { color: #dc2626; }
@keyframes treasureGemReveal {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes treasureTrapShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.play-diamond-active {
  animation: playDiamondGlow 1.5s ease-in-out infinite;
}

@keyframes playDiamondGlow {
  0%, 100% { box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.15), 0 0 15px rgba(168, 85, 247, 0.1); }
  50%      { box-shadow: inset 0 0 40px rgba(168, 85, 247, 0.25), 0 0 25px rgba(168, 85, 247, 0.2); }
}

/* ── Wetter-Effekte (Hintergrund) ── */
.adler-weather-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease;
}

.adler-weather-rain,
.adler-weather-storm {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.adler-weather-rain::before,
.adler-weather-storm::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    transparent,
    transparent 80px,
    rgba(120, 180, 255, 0.08) 80px,
    rgba(120, 180, 255, 0.08) 82px
  );
  animation: rainFall 0.6s linear infinite;
}

@keyframes rainFall {
  from { transform: translateY(-82px); }
  to   { transform: translateY(0); }
}

.adler-weather-snow::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: snowDrift 8s linear infinite;
}

@keyframes snowDrift {
  from { transform: translateY(-30px) translateX(0); }
  to   { transform: translateY(30px) translateX(15px); }
}

.adler-weather-sunny::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at top right, rgba(255, 200, 50, 0.06), transparent 60%);
}

.adler-weather-cloudy::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.08) 0%, transparent 60%);
}

.adler-weather-windy::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(90deg, transparent 0%, rgba(147, 197, 253, 0.05) 50%, transparent 100%);
  animation: windDrift 3s ease-in-out infinite;
}

@keyframes windDrift {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── Event-Popup ── */
.adler-event-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 6000;
  min-width: 260px;
  max-width: 340px;
  text-align: center;
  padding: 24px 32px;
  border-radius: 20px;
  background: rgba(15, 18, 25, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(217, 119, 6, 0.1);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.adler-event-popup.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.adler-event-popup .event-emoji {
  animation: eventEmojiBounce 0.6s ease-out;
}

@keyframes eventEmojiBounce {
  0%   { transform: scale(0.3); opacity: 0; }
  60%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

/* ── Tägliche Belohnung ── */
.daily-reward-btn {
  animation: dailyPulse 2s ease-in-out infinite;
}

.daily-reward-btn:hover {
  animation: none;
  transform: scale(1.05);
}

@keyframes dailyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3); }
  50%      { box-shadow: 0 0 20px 4px rgba(34, 197, 94, 0.2); }
}

.daily-reward-btn.collected {
  opacity: 0.5;
  pointer-events: none;
  animation: none;
}

/* ── Gebäude-Karten ── */
.building-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1px solid rgba(234, 179, 8, 0.15);
  background: rgba(234, 179, 8, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.building-card:hover {
  transform: translateY(-2px);
  border-color: rgba(234, 179, 8, 0.35);
  background: rgba(234, 179, 8, 0.1);
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.1);
}

.building-card:active {
  transform: translateY(0) scale(0.97);
}

.building-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.building-card.built {
  opacity: 0.6;
  cursor: not-allowed;
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.08);
}

.building-card.built .adler-cost-badge {
  display: none;
}

.building-card.built:hover {
  transform: none;
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.building-card.locked {
  cursor: not-allowed;
}

.building-card.locked > *:not(.adler-lock-badge) {
  opacity: 0;
  pointer-events: none;
}

.building-card.locked .adler-lock-badge {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  gap: 4px;
  background: rgba(8, 10, 14, 0.92);
  border-radius: 14px;
  z-index: 10;
  color: #64748b;
  padding: 8px;
}

.building-card.locked .adler-lock-badge span {
  font-size: 0.7rem;
  font-weight: 600;
}

.building-card.locked:hover {
  transform: none;
  border-color: rgba(234, 179, 8, 0.15);
  background: rgba(234, 179, 8, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.building-card .text-2xl {
  transition: transform 0.2s ease;
}

.building-card:hover .text-2xl {
  transform: scale(1.15);
}

/* ── Menü-Übergänge ── */
#action-buttons,
#habitat-content,
#food-menu,
#care-menu,
#deco-menu,
#play-menu,
#training-menu {
  transition: opacity 0.2s ease;
}

/* ── Habitat-Slots ── */
.habitat-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.habitat-slot.empty:hover {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.08);
}

.habitat-slot-add {
  font-size: 1rem;
  opacity: 0.35;
  transition: opacity 0.2s ease;
  user-select: none;
}

.habitat-slot.empty:hover .habitat-slot-add {
  opacity: 0.7;
}

.habitat-slot.occupied {
  border-style: solid;
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.05);
  flex-direction: column;
  gap: 2px;
}

.habitat-slot.occupied:hover {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.08);
}

.habitat-slot-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.habitat-slot-name {
  font-size: 0.6rem;
  color: #94a3b8;
  font-weight: 600;
  line-height: 1;
}

.habitat-slot.occupied:hover .habitat-slot-name {
  color: #fca5a5;
}

.habitat-slot-remove {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.55rem;
  color: #ef4444;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.habitat-slot.occupied:hover .habitat-slot-remove {
  opacity: 0.8;
}

/* ── Deko-Optionen ── */
.deco-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.15);
  background: rgba(34, 197, 94, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.deco-option-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
}

.deco-option-card:active {
  transform: translateY(0) scale(0.97);
}

.deco-option-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.deco-option-card.owned {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.deco-option-card .text-xl {
  transition: transform 0.2s ease;
}

.deco-option-card:hover .text-xl {
  transform: scale(1.15);
}

/* ═══ Tab Navigation ═══ */
.adler-tab-btn {
  flex: 1 1 calc(50% - 0.25rem);
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  white-space: nowrap;
}
.adler-tab-btn:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.05);
}
.adler-tab-btn.active {
  color: #fbbf24;
  background: rgba(217,119,6,0.15);
  box-shadow: 0 0 12px rgba(217,119,6,0.1);
}

/* ═══ Tab Panels ═══ */
.adler-tab-panel {
  width: 100%;
}

/* ═══ Achievements ═══ */
.achievement-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-align: center;
  overflow: hidden;
}
.achievement-card.locked {
  opacity: 0.45;
  filter: grayscale(0.8);
}
.achievement-card.locked .achievement-lock {
  display: block;
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.65rem;
  line-height: 1;
}
.achievement-card.unlocked {
  opacity: 1;
  filter: none;
  background: rgba(251,191,36,0.06);
  border-color: rgba(251,191,36,0.2);
  box-shadow: 0 0 15px rgba(251,191,36,0.08);
}
.achievement-card.unlocked::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.7rem;
  color: #4ade80;
  font-weight: bold;
}
.achievement-lock {
  display: none;
}

/* Achievement Popup */
.achievement-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 1000;
  background: radial-gradient(ellipse at center, rgba(217,119,6,0.2) 0%, rgba(10,12,16,0.95) 70%);
  border: 2px solid rgba(251,191,36,0.4);
  border-radius: 1.5rem;
  padding: 2rem 2.5rem;
  text-align: center;
  box-shadow: 0 0 60px rgba(217,119,6,0.3), 0 0 120px rgba(217,119,6,0.1);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.achievement-popup.hidden {
  display: block !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.achievement-popup:not(.hidden) {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.achievement-popup.achievement-enter {
  animation: achievement-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.achievement-popup.achievement-exit {
  animation: achievement-fade 0.6s ease-out forwards;
}
@keyframes achievement-pop {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes achievement-fade {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) translateY(-20px); }
}

/* ═══ Level-Up Popup ═══ */
.levelup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1099;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s;
}
.levelup-backdrop.hidden {
  display: block !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.levelup-backdrop:not(.hidden) {
  opacity: 1;
}
.levelup-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 1100;
  background: radial-gradient(ellipse at center, rgba(16,185,129,0.2) 0%, rgba(10,12,16,0.95) 70%);
  border: 2px solid rgba(52,211,153,0.5);
  border-radius: 1.5rem;
  padding: 2rem 2.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 0 60px rgba(16,185,129,0.3), 0 0 120px rgba(16,185,129,0.1), 0 0 200px rgba(251,191,36,0.1);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  min-width: 280px;
}
.levelup-popup.hidden {
  display: flex !important;
  flex-direction: column;
  opacity: 0 !important;
  pointer-events: none !important;
}
.levelup-popup:not(.hidden) {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.levelup-popup.levelup-enter {
  animation: levelup-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.levelup-popup.levelup-exit {
  animation: levelup-fade 0.6s ease-out forwards;
}
@keyframes levelup-pop {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes levelup-fade {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) translateY(-20px); }
}

/* Level-Up Sparkles */
.levelup-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.levelup-sparkles .sparkle {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0;
}
.levelup-popup:not(.hidden) .sparkle {
  animation: sparkle-float 2.5s ease-out infinite;
}
.levelup-sparkles .s1 { left: 10%; top: 20%; animation-delay: 0s; }
.levelup-sparkles .s2 { left: 85%; top: 15%; animation-delay: 0.3s; }
.levelup-sparkles .s3 { left: 50%; top: 5%; animation-delay: 0.6s; }
.levelup-sparkles .s4 { left: 15%; top: 80%; animation-delay: 0.9s; }
.levelup-sparkles .s5 { left: 80%; top: 75%; animation-delay: 1.2s; }
.levelup-sparkles .s6 { left: 45%; top: 90%; animation-delay: 1.5s; }
@keyframes sparkle-float {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 1; transform: translateY(-10px) scale(1); }
  80% { opacity: 0.6; transform: translateY(-30px) scale(0.8); }
  100% { opacity: 0; transform: translateY(-50px) scale(0.3); }
}

/* Level-Up Close Button */
.levelup-close-btn {
  margin-top: 1.2rem;
  padding: 0.5rem 2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(16,185,129,0.3), rgba(251,191,36,0.3));
  border: 1px solid rgba(52,211,153,0.4);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}
.levelup-close-btn:hover {
  background: linear-gradient(135deg, rgba(16,185,129,0.5), rgba(251,191,36,0.5));
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(16,185,129,0.3);
}

/* Level-Up Confetti */
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ═══ Trust Bar ═══ */
.trust-bar-container {
  position: relative;
  height: 0.5rem;
  background: rgba(255,255,255,0.08);
  border-radius: 9999px;
  overflow: hidden;
}
.trust-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease, background 0.5s ease;
}

/* ═══ Knowledge Cards ═══ */
.knowledge-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  padding: 0.5rem 0;
}
.knowledge-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.75rem;
  border-radius: 1rem;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
}
.knowledge-card.unlocked {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  box-shadow: 0 0 12px rgba(16,185,129,0.06);
}
.knowledge-card.unlocked:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16,185,129,0.15);
}
.knowledge-card.discoverable {
  background: rgba(251,191,36,0.08);
  border: 1px dashed rgba(251,191,36,0.3);
  cursor: pointer;
  animation: card-pulse 2s ease-in-out infinite;
}
.knowledge-card.discoverable:hover {
  background: rgba(251,191,36,0.15);
  transform: translateY(-2px);
}
.knowledge-card.locked {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  opacity: 0.5;
}
.knowledge-card-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.knowledge-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.25rem;
}
.knowledge-card-text {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}
.knowledge-card.unlocked .knowledge-card-title {
  color: #34d399;
}
.knowledge-card.discoverable .knowledge-card-title {
  color: #fbbf24;
}
@keyframes card-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(251,191,36,0); }
  50% { box-shadow: 0 0 15px rgba(251,191,36,0.15); }
}

/* ═══ Mini-Spiele ═══ */
.minigame-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.minigame-modal > div {
  background: linear-gradient(135deg, rgba(15,20,35,0.98), rgba(10,12,16,0.98));
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 1.5rem;
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(217,119,6,0.2);
}
.minigame-header {
  text-align: center;
  margin-bottom: 1rem;
}
.minigame-header h3 {
  margin-bottom: 0.25rem;
}
.minigame-score {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.minigame-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.minigame-result {
  text-align: center;
  padding: 1rem 0;
}
.minigame-rewards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}
.minigame-rewards span {
  background: rgba(255,255,255,0.06);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
}

/* Memory Grid */
.minigame-memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 320px;
  margin: 0 auto;
}
.memory-card {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(30,58,95,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  font-size: 1.5rem;
  user-select: none;
}
.memory-card:hover {
  background: rgba(30,58,95,0.7);
  transform: scale(1.05);
}
.memory-card.flipped,
.memory-card.matched {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.3);
}
.memory-card.matched {
  opacity: 0.7;
  pointer-events: none;
}
.memory-card-front,
.memory-card-back {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Memory Card Types */
.memory-card.memory-type-blitz {
  border-color: rgba(251, 191, 36, 0.4);
}
.memory-card.memory-type-blitz.flipped,
.memory-card.memory-type-blitz.matched {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}
.memory-card.memory-type-wirbel {
  border-color: rgba(139, 92, 246, 0.4);
}
.memory-card.memory-type-wirbel.flipped,
.memory-card.memory-type-wirbel.matched {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}
.memory-card.memory-type-stoer {
  border-color: rgba(239, 68, 68, 0.4);
}
.memory-card.memory-type-stoer.flipped,
.memory-card.memory-type-stoer.matched {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* Memory Card Preview */
.memory-card.preview {
  background: rgba(251, 191, 36, 0.15) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  animation: memoryPreviewPulse 0.5s ease-in-out;
}
@keyframes memoryPreviewPulse {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Memory Card Matched Animation */
.memory-card.matched {
  animation: memoryMatchPop 0.4s ease-out;
}
@keyframes memoryMatchPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Memory Time Warning */
.memory-time-normal {
  transition: color 0.3s ease;
}
.memory-time-warning {
  color: #ef4444 !important;
  animation: memoryTimePulse 0.5s ease-in-out infinite;
}
@keyframes memoryTimePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Memory Score Popup */
.memory-popup-area {
  position: relative;
  height: 24px;
  margin-bottom: 4px;
  overflow: hidden;
}
.memory-score-popup {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  font-weight: 700;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  animation: memoryScoreFloat 1.2s ease-out forwards;
}
.memory-score-popup.positive {
  color: #4ade80;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}
.memory-score-popup.eagle-eye {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}
.memory-score-popup.time-bonus {
  color: #4ade80;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
  font-size: 1rem;
}
.memory-score-popup.wirbel-bonus {
  color: #a78bfa;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  font-size: 1rem;
}
.memory-score-popup.stoer-penalty {
  color: #f87171;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  font-size: 0.95rem;
}
@keyframes memoryScoreFloat {
  0% { opacity: 1; top: 0; }
  60% { opacity: 1; top: -8px; }
  100% { opacity: 0; top: -18px; }
}

/* Rhythm Game */
.minigame-rhythm-container {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}
.minigame-rhythm-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(30,58,95,0.5);
  border: 3px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.minigame-rhythm-circle.active {
  background: rgba(251,191,36,0.3);
  border-color: #fbbf24;
  box-shadow: 0 0 30px rgba(251,191,36,0.4);
  transform: scale(1.15);
}
.minigame-rhythm-circle.hit {
  background: rgba(16,185,129,0.3);
  border-color: #34d399;
  box-shadow: 0 0 20px rgba(16,185,129,0.4);
}
.minigame-rhythm-circle.missed {
  background: rgba(239,68,68,0.3);
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239,68,68,0.4);
}

/* Minigame Selection Cards */
.minigame-selection {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}
.minigame-select-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.5rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  text-align: center;
}
.minigame-select-card:hover {
  background: rgba(251,191,36,0.1);
  border-color: rgba(251,191,36,0.2);
  transform: translateY(-2px);
}
.minigame-select-card.locked {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
.minigame-select-card.locked:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  transform: none;
}

/* ── Adler Buttons (Minigame) ── */
.adler-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.adler-btn:active {
  transform: scale(0.96);
}

.adler-btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.adler-btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}
.adler-btn-primary:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.adler-btn-secondary {
  background: rgba(100, 116, 139, 0.3);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.adler-btn-secondary:hover {
  background: rgba(100, 116, 139, 0.5);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.adler-btn-secondary:active {
  transform: translateY(0) scale(0.96);
  background: rgba(100, 116, 139, 0.6);
}

.adler-btn-start {
  padding: 0.65rem 2rem;
  font-size: 1rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.02em;
}
.adler-btn-start:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.55);
  transform: translateY(-2px);
}
.adler-btn-start:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

/* ── Stat-Rate Badges ── */
.stat-rate {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  padding: 1px 5px;
  border-radius: 9999px;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.stat-rate--positive {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.2);
}
.stat-rate--negative {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.2);
}
.stat-rate--neutral {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

/* ─── Rate bars (tiny directional indicators below stat bars) ─── */
.rate-bar {
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: opacity 0.3s ease;
  display: none;
}
.rate-bar::after {
  content: '';
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 1px;
  transition: all 0.6s ease;
}
.rate-bar[data-direction="positive"]::after {
  left: 50%;
  width: var(--rate-fill-width, 0%);
  background: #4ade80;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}
.rate-bar[data-direction="negative"]::after {
  right: 50%;
  width: var(--rate-fill-width, 0%);
  background: #f87171;
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
}
.rate-bar[data-direction="neutral"]::after {
  left: 50%;
  transform: translateX(-50%);
  width: 2px !important;
  background: #94a3b8;
}

/* ── Jagdtraining (Suchen & Finden) ── */
.hunt-area {
  position: relative;
  width: 100%;
  min-height: 320px;
  max-height: 450px;
  border-radius: 12px;
  overflow: hidden;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(76, 175, 80, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(56, 142, 60, 0.4) 0%, transparent 45%),
    radial-gradient(ellipse at 45% 80%, rgba(46, 125, 50, 0.3) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 20%, rgba(102, 187, 106, 0.2) 0%, transparent 35%),
    linear-gradient(135deg, #1a3a1a 0%, #2d5a2d 20%, #3a7a2a 35%, #4a8a3a 50%, #3d6b2e 65%, #2d5a2d 80%, #1a4a1a 100%);
  border: 2px solid rgba(74, 222, 128, 0.3);
  cursor: crosshair;
}
.hunt-area.with-background {
  background-image: url('../img/hunt_background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hunt-area.hunt-landscape {
  position: relative;
  overflow: hidden;
}
.hunt-area.hunt-landscape::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.2) 100%);
  z-index: 1;
  pointer-events: none;
}
/* Wind-Animation für das Jagd-Training */
.hunt-area.hunt-landscape::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.015) 40px,
    rgba(255,255,255,0.015) 42px
  );
  z-index: 1;
  pointer-events: none;
  animation: hunt-wind 8s linear infinite;
}
@keyframes hunt-wind {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(42px) translateY(-10px); }
}
/* Raschel-Effekt wenn Beute spawn */
.hunt-rustle {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,195,74,0.35) 0%, rgba(76,175,80,0.15) 40%, transparent 70%);
  animation: hunt-rustle-pulse 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes hunt-rustle-pulse {
  0% { transform: scale(0.5); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}
.hunt-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 5;
  animation: pulse 1.5s ease-in-out infinite;
}
.hunt-overlay-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251,191,36,0.5);
}
.hunt-prey {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  user-select: none;
  cursor: pointer;
  transition: opacity 0.3s;
}
.hunt-prey:hover {
  filter: brightness(1.3) !important;
}
.hunt-combo-popup {
  position: absolute;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 0 0 6px rgba(251,191,36,0.7);
  pointer-events: none;
  z-index: 10;
  animation: huntPopup 0.8s ease-out forwards;
}
@keyframes huntPopup {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(1.3); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* ── Zielflug-Mini-Spiel ── */
.target-area {
  position: relative;
  width: 100%;
  min-height: 280px;
  max-height: 400px;
  border-radius: 12px;
  overflow: hidden;
  cursor: crosshair;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(135,206,235,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(135,206,235,0.1) 0%, transparent 40%),
    linear-gradient(180deg, #1a3a5f 0%, #2d5a8a 30%, #4a8ab0 55%, #87ceeb 80%, #b0d4e8 100%);
  border: 2px solid rgba(251,191,36,0.3);
}
.target-area.with-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.target-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, transparent 15%, transparent 85%, rgba(0,0,0,0.15) 100%);
  z-index: 1;
  pointer-events: none;
}
.target-area::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 60px,
    rgba(255,255,255,0.01) 60px,
    rgba(255,255,255,0.01) 62px
  );
  z-index: 1;
  pointer-events: none;
  animation: target-wind 10s linear infinite;
}
@keyframes target-wind {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(62px) translateY(-8px); }
}

/* Target types */
.mg-target {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  user-select: none;
  transition: transform 0.15s ease;
}
.mg-target.type-standard {
  background: radial-gradient(circle, #fbbf24 0%, #d97706 60%, #92400e 100%);
  box-shadow: 0 0 12px rgba(251,191,36,0.5), 0 0 4px rgba(251,191,36,0.8);
}
.mg-target.type-gold {
  background: radial-gradient(circle, #fde68a 0%, #fbbf24 40%, #f59e0b 70%, #d97706 100%);
  box-shadow: 0 0 20px rgba(251,191,36,0.7), 0 0 6px rgba(251,191,36,0.9);
  animation: targetGoldPulse 0.8s ease-in-out infinite;
}
.mg-target.type-quick {
  background: radial-gradient(circle, #93c5fd 0%, #3b82f6 60%, #1e40af 100%);
  box-shadow: 0 0 10px rgba(59,130,246,0.5), 0 0 3px rgba(59,130,246,0.8);
}
.mg-target.type-time {
  background: radial-gradient(circle, #86efac 0%, #22c55e 60%, #15803d 100%);
  box-shadow: 0 0 14px rgba(34,197,94,0.5), 0 0 4px rgba(34,197,94,0.8);
  animation: targetTimePulse 1s ease-in-out infinite;
}
.mg-target.type-decoy {
  background: radial-gradient(circle, #fca5a5 0%, #ef4444 50%, #991b1b 100%);
  box-shadow: 0 0 14px rgba(239,68,68,0.5), 0 0 4px rgba(239,68,68,0.8);
  animation: targetDecoyPulse 0.5s ease-in-out infinite;
}

@keyframes targetGoldPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(251,191,36,0.7), 0 0 6px rgba(251,191,36,0.9); }
  50% { box-shadow: 0 0 30px rgba(251,191,36,0.9), 0 0 10px rgba(251,191,36,1); }
}
@keyframes targetTimePulse {
  0%, 100% { box-shadow: 0 0 14px rgba(34,197,94,0.5), 0 0 4px rgba(34,197,94,0.8); }
  50% { box-shadow: 0 0 24px rgba(34,197,94,0.7), 0 0 8px rgba(34,197,94,1); }
}
@keyframes targetDecoyPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(239,68,68,0.5), 0 0 4px rgba(239,68,68,0.8); transform: scale(1); }
  50% { box-shadow: 0 0 22px rgba(239,68,68,0.7), 0 0 8px rgba(239,68,68,1); transform: scale(1.05); }
}

/* Timer ring around targets */
.target-timer-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.8);
  pointer-events: none;
  animation: targetTimerShrink var(--timer-duration, 2s) linear forwards;
}
@keyframes targetTimerShrink {
  0% { clip-path: polygon(50% 0%, 50% 50%, 100% 0%, 100% 100%, 50% 100%, 50% 50%, 0% 100%, 0% 0%); opacity: 1; }
  25% { clip-path: polygon(50% 0%, 50% 50%, 100% 50%, 100% 100%, 50% 100%, 50% 50%, 0% 100%, 0% 50%); opacity: 0.9; }
  50% { clip-path: polygon(50% 0%, 50% 50%, 100% 50%, 100% 50%, 50% 50%, 50% 50%, 0% 50%, 0% 0%); opacity: 0.8; }
  75% { clip-path: polygon(50% 0%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 0% 50%, 0% 0%); opacity: 0.6; }
  100% { clip-path: polygon(50% 0%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 0% 0%, 0% 0%); opacity: 0.3; }
}

/* Target timer using conic-gradient */
.target-timer-ring-v2 {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
}

/* Score popup */
.target-score-popup {
  position: absolute;
  font-size: 0.9rem;
  font-weight: 800;
  pointer-events: none;
  z-index: 20;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  animation: targetScoreFloat 1s ease-out forwards;
  white-space: nowrap;
}
.target-score-popup.positive { color: #4ade80; }
.target-score-popup.negative { color: #f87171; }
.target-score-popup.eagle-eye { color: #fbbf24; }
.target-score-popup.time-bonus { color: #22c55e; }

@keyframes targetScoreFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  30% { opacity: 1; transform: translateY(-10px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-40px) scale(0.8); }
}

/* Eagle eye flash */
.target-eagle-eye-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(251,191,36,0.3) 0%, transparent 70%);
  pointer-events: none;
  z-index: 15;
  animation: eagleEyeFlash 0.4s ease-out forwards;
}
@keyframes eagleEyeFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Target hit effect */
.target-hit-effect {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
  animation: targetHitRing 0.5s ease-out forwards;
}
@keyframes targetHitRing {
  0% { transform: scale(0.5); opacity: 1; border-width: 3px; }
  100% { transform: scale(2); opacity: 0; border-width: 0px; }
}

/* ═══ Flugshow Mini-Spiel ═══ */

.flyshow-countdown-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  border-radius: 1.5rem;
  z-index: 15;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.flyshow-countdown-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.flyshow-countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  font-weight: 900;
  color: #f59e0b;
  text-shadow: 0 0 30px rgba(245,158,11,0.6), 0 4px 12px rgba(0,0,0,0.5);
  z-index: 20;
  animation: flyshowCountdownPulse 1s ease infinite;
  pointer-events: none;
  user-select: none;
}
.flyshow-countdown.flyshow-countdown-go {
  color: #4ade80;
  text-shadow: 0 0 30px rgba(74,222,128,0.7), 0 4px 12px rgba(0,0,0,0.5);
  font-size: 42px;
  animation: flyshowCountdownGo 0.5s ease forwards;
}
@keyframes flyshowCountdownPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.85; }
}
@keyframes flyshowCountdownGo {
  0% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
.flyshow-trick-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin: 8px 0;
  background: rgba(30, 58, 95, 0.5);
  border-radius: 16px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  min-height: 80px;
}

.flyshow-current-trick {
  font-size: 48px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.flyshow-current-trick.flyshow-trick-pop {
  animation: flyshowTrickPop 0.3s ease;
}

.flyshow-current-name {
  font-size: 14px;
  font-weight: bold;
  color: #f59e0b;
  margin-top: 4px;
}

.flyshow-buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 0;
}

.flyshow-trick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border-radius: 12px;
  background: rgba(30, 58, 95, 0.6);
  border: 2px solid var(--trick-color, #6b7280);
  color: white;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 2px;
}

.flyshow-trick-btn:hover {
  background: rgba(30, 58, 95, 0.9);
  transform: scale(1.05);
  box-shadow: 0 0 12px color-mix(in srgb, var(--trick-color) 40%, transparent);
}

.flyshow-trick-btn:active {
  transform: scale(0.95);
}

.flyshow-trick-btn.flyshow-btn-success {
  background: rgba(34, 197, 94, 0.3);
  border-color: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.4);
}

.flyshow-trick-btn.flyshow-btn-wrong {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

.flyshow-audience-bar {
  position: relative;
  width: 100%;
  height: 20px;
  background: rgba(30, 58, 95, 0.5);
  border-radius: 10px;
  overflow: hidden;
  margin: 6px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.flyshow-audience-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #6b7280, #9ca3af);
  transition: width 0.4s ease, background 0.4s ease;
}

.flyshow-audience-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.flyshow-popup-area {
  position: relative;
  min-height: 24px;
  overflow: hidden;
}

.flyshow-score-popup {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: bold;
  pointer-events: none;
  animation: flyshowPopupFloat 0.9s ease forwards;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.flyshow-score-popup.positive {
  color: #4ade80;
}

.flyshow-score-popup.negative {
  color: #ef4444;
}

@keyframes flyshowTrickPop {
  0% { transform: scale(0.5); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes flyshowPopupFloat {
  0% { opacity: 1; top: 0; }
  100% { opacity: 0; top: -30px; }
}
