/* Snake Overlay Power-Ups — platform hub */

img:is([sizes="auto" i], [sizes^="auto," i]) {
  contain-intrinsic-size: 3000px 1500px;
}

.item-card:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

.life-card-wide:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 15px 35px rgba(255, 153, 170, 0.5) !important;
}

.equip-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

.current-score:hover,
.current-level:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

/* Fixed status bar — width synced to parent via JS */
.snake-powerups-status-bar {
  --snake-status-top: 3.5rem;
  position: fixed;
  top: var(--snake-status-top);
  left: 0;
  right: auto;
  width: 100%;
  z-index: 10040;
  margin: 0;
  padding: 10px 16px 12px;
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 7, 0.98) 0%,
    rgba(5, 5, 7, 0.94) 70%,
    rgba(5, 5, 7, 0.88) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-sizing: border-box;
}

.snake-powerups-status-title {
  text-align: center;
  color: #ff7043;
  background: #333;
  padding: 3px 8px;
  font-weight: bold;
  font-size: 14px;
  margin: 0 0 10px;
  border-radius: 4px;
}

.snake-powerups-status-bar .game-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.snake-powerups-status-bar .current-score,
.snake-powerups-status-bar .current-level {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 25px;
}

.snake-powerups-status-bar .current-score {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.2));
  border: 2px solid #ffd700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.snake-powerups-status-bar .current-level {
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(135, 206, 235, 0.2));
  border: 2px solid #87ceeb;
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.2);
}

.snake-powerups-status-emoji {
  font-size: 18px;
}

.snake-powerups-status-label {
  font-size: 14px;
  font-weight: bold;
  color: white;
}

.snake-powerups-status-bar #current-score {
  color: #ffd700;
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.snake-powerups-status-bar #current-level {
  color: #87ceeb;
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.snake-powerups-status-spacer {
  height: 108px;
}

.snake-overlay-powerups-page {
  padding-bottom: 88px;
}

.snake-overlay-inventory {
  margin-top: 8px;
}

.snake-overlay-shop {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  margin: 20px 0 0;
}

.custom-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  z-index: 10060;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 350px;
  border: 2px solid #26d0ce;
}

.custom-toast.show {
  transform: translateX(-50%) translateY(0);
}

.custom-toast.success {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
  border-color: #26d0ce;
}

.custom-toast.error {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  border-color: #ff4757;
}

.custom-toast.warning {
  background: linear-gradient(135deg, #feca57, #ff9ff3);
  border-color: #ffd700;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.toast-message {
  font-weight: bold;
  font-size: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#equipdiv {
  position: fixed;
  bottom: 0;
  left: 0;
  right: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 16px 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(
    to top,
    rgba(5, 5, 7, 0.98) 0%,
    rgba(5, 5, 7, 0.92) 45%,
    rgba(5, 5, 7, 0.75) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10050;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
  box-sizing: border-box;
}

.equip-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0;
}

#equip {
  text-align: center;
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  background: linear-gradient(135deg, #0f766e 0%, #047857 55%, #065f46 100%);
  border: 1px solid rgba(45, 212, 191, 0.35);
  box-shadow:
    0 4px 18px rgba(13, 148, 136, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  font-size: 15px;
  color: #fff;
}

#equip span {
  font-weight: bold;
}

@media (max-width: 768px) {
  .snake-overlay-shop {
    flex-direction: column !important;
    align-items: center !important;
  }

  .item-card {
    max-width: 300px !important;
    width: 100% !important;
  }

  .life-card-wide {
    flex-direction: column !important;
    text-align: center !important;
    width: 95% !important;
  }

  .life-card-wide > div:nth-child(2) {
    text-align: center !important;
  }

  .snake-powerups-status-bar .game-info {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .snake-powerups-status-spacer {
    height: 148px;
  }

  .custom-toast {
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100px);
  }

  .custom-toast.show {
    transform: translateY(0);
  }
}
