/* Realms of Conflict - Additional Styles */

/* Smooth transitions for interactive elements */
.game-tab, .tab-btn, .faction-card {
  transition: all 0.3s ease;
}

/* Faction card hover effects */
.faction-card:hover > div {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Resource cards animation */
.resource-card {
  transition: transform 0.2s ease;
}

.resource-card:hover {
  transform: translateY(-2px);
}

/* Custom scrollbar for battle logs */
.battle-log::-webkit-scrollbar {
  width: 8px;
}

.battle-log::-webkit-scrollbar-track {
  background: #374151;
  border-radius: 4px;
}

.battle-log::-webkit-scrollbar-thumb {
  background: #6B7280;
  border-radius: 4px;
}

.battle-log::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Unit type icons */
.unit-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Building icons */
.building-icon {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

/* Faction-specific gradients */
.faction-light {
  background: linear-gradient(135deg, #3B82F6, #60A5FA);
}

.faction-fury {
  background: linear-gradient(135deg, #EF4444, #F87171);
}

/* Loading states */
.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Combat type indicators */
.combat-melee { color: #EF4444; }
.combat-ranged { color: #10B981; }
.combat-magic { color: #8B5CF6; }
.combat-support { color: #F59E0B; }

/* Position indicators */
.position-front { border-left: 4px solid #EF4444; }
.position-mid { border-left: 4px solid #F59E0B; }
.position-back { border-left: 4px solid #10B981; }

/* Battle result animations */
.victory {
  animation: victory-flash 0.5s ease-in-out;
}

.defeat {
  animation: defeat-flash 0.5s ease-in-out;
}

@keyframes victory-flash {
  0% { background-color: transparent; }
  50% { background-color: rgba(34, 197, 94, 0.3); }
  100% { background-color: transparent; }
}

@keyframes defeat-flash {
  0% { background-color: transparent; }
  50% { background-color: rgba(239, 68, 68, 0.3); }
  100% { background-color: transparent; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .resource-card {
    padding: 0.75rem;
  }
  
  .unit-icon {
    font-size: 1.5rem;
  }
  
  .building-icon {
    font-size: 1.25rem;
  }
}

/* Tooltip styles */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1F2937;
  color: white;
  padding: 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
}