/* src/powerups/ui/powerup-styles.css */
/* Styling for power-up system UI components */

/* Power-up indicator (HUD badge near energy display) */
.powerup-indicator {
  position: absolute;
  top: 50%;
  left: 100%;
  display: flex;
  padding: 6px;
  min-width: 90px;
  max-width: 110px;
  border: 1px solid var(--accent);
  border-radius: 100vh;
  box-shadow: 0 0 10px rgba(0, 238, 255, 0.3);
  font-family: inherit;
  z-index: 12;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
  align-items: center;
  justify-content: space-between;
  translate: 0 -50%;
}

.powerup-indicator.visible {
  visibility: visible;
  opacity: 1;
}

.powerup-indicator-anchor {
  position: relative;
}

.powerup-indicator-type {
  color: var(--neon, #00ffcc);
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 0 4px rgba(0, 255, 204, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.powerup-indicator-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2em;
  height: 2em;
  line-height: 1;
  flex-shrink: 0;
}

.powerup-indicator-icon--svg svg {
  width: 2em;
  display: block;
  fill: currentColor;
  stroke: currentColor;
}

.powerup-indicator-icon--svg svg * {
  fill: currentColor;
  stroke: currentColor;
}

.powerup-indicator-name {
  line-height: 1.1;
}

.powerup-indicator-time {
  color: #cfe;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0.95;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .powerup-indicator {
    left: 90%;
    min-width: 70px;
    max-width: 90px;
    padding: 5px;
  }
  .powerup-indicator-icon {
    width: 1.5em;
    height: 1.5em;
  }

  .powerup-indicator-icon--svg svg {
    width: 1.5em;
    display: block;
    fill: currentColor;
    stroke: currentColor;
  }
  .powerup-indicator-type {
    font-size: 9px;
  }

  .powerup-indicator-time {
    font-size: 9px;
  }
}

/* Shop power-up cards */
.shop-powerup-card {
  position: relative;
}

.shop-powerup-card.active {
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.shop-powerup-card.shop-powerup-tool {
  border-color: rgba(255, 143, 163, 0.6);
}

.shop-powerup-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
  font-size: 10px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
  z-index: 1;
}

/* Powerup in inventory indicator */
.powerup-inventory-count {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--neon, #00ffcc);
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--neon, #00ffcc);
}

/* Research tree power-up indicator */
.research-powerup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(102, 204, 255, 0.2);
  border: 1px solid #66ccff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #66ccff;
  margin-top: 8px;
  animation: research-pulse 2s infinite;
}

@keyframes research-pulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(102, 204, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(102, 204, 255, 0.5);
  }
}

/* Button states for power-up use */
.shop-buy-btn.powerup-active {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
  cursor: default;
  opacity: 0.8;
}

.shop-buy-btn.powerup-use {
  background: linear-gradient(135deg, var(--neon, #00ffcc), #00d4aa);
  color: #000;
}

.shop-buy-btn.powerup-use:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 255, 204, 0.4);
}

.shop-buy-btn.powerup-blocked {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Powerup activation animation */
@keyframes powerup-activate {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.powerup-activating {
  animation: powerup-activate 0.5s ease-out;
}

.powerup-cell.powerup-cell-active {
  border-color: #00ffcc !important;
  box-shadow: 0 0 16px rgba(0, 255, 204, 0.6);
  animation: powerup-cell-pulse 1.8s ease-in-out infinite;
}

@keyframes powerup-cell-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.7);
  }
}

.powerup-bonus {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.scissors-overlay {
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  background: rgba(255, 143, 163, 0.18);
  border: 2px dashed rgba(255, 143, 163, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 28px;
  color: #ffdce5;
  text-shadow: 0 0 6px rgba(255, 143, 163, 0.6);
  animation: scissors-pulse 1.6s ease-in-out infinite;
}

.scissors-overlay::after {
  content: '✂️';
}

@keyframes scissors-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

/* Powerup effect visual feedback */
.xp-boost-active .xp-area {
  animation: xp-glow 1.5s infinite;
}

@keyframes xp-glow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(0, 255, 204, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(0, 255, 204, 0.8));
  }
}

.coin-boost-active #coinCount {
  animation: coin-glow 1.5s infinite;
}

@keyframes coin-glow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
  }
}

.energy-regen-boost-active #energyNum {
  animation: energy-glow 1.5s infinite;
}

@keyframes energy-glow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(255, 102, 255, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(255, 102, 255, 0.8));
  }
}

/* Shared icon helpers for store/storage power-up tiles */
.powerup-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  line-height: 1;
}

.powerup-icon svg {
  width: 1em;
  height: 1em;
  display: block;
}

.powerup-icon svg * {
  fill: currentColor;
  stroke: currentColor;
}

.shop-powerup-icon-holder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-powerup-icon-holder .powerup-icon {
  font-size: 2.75rem;
}

.storage-powerup-icon-holder .powerup-icon {
  font-size: 1.1rem;
  color: #ffd700;
}
