/* ===== GoW Database – custom styles on top of Tailwind ===== */

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #6d28d9; border-radius: 3px; }

/* Troop card hover glow */
.troop-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.troop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.45);
}

/* Rarity badge colours */
.rarity-Common    { background: #6b7280; color: #fff; }
.rarity-Uncommon  { background: #16a34a; color: #fff; }
.rarity-Rare      { background: #2563eb; color: #fff; }
.rarity-UltraRare { background: #7c3aed; color: #fff; }
.rarity-Epic      { background: #d97706; color: #fff; }
.rarity-Legendary { background: #b45309; color: #fff; }
.rarity-Mythic    { background: #a9d0f5; color: #0c2a4a; }

/* Stat grid on troop cards */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 6px;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #cbd5e1;
}
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  font-size: 0.7rem;
  flex-shrink: 0;
  line-height: 1;
}
.stat-life   { color: #f87171; }
.stat-attack { color: #fb923c; }
.stat-armor  { color: #94a3b8; }
.stat-magic  { color: #c084fc; }

/* Mana colour dots */
.mana-Red    { background: #ef4444; }
.mana-Blue   { background: #3b82f6; }
.mana-Green  { background: #22c55e; }
.mana-Yellow { background: #eab308; }
.mana-Purple { background: #a855f7; }
.mana-Brown  { background: #92400e; }

/* Modal backdrop */
#modal-backdrop {
  backdrop-filter: blur(4px);
}

/* Sidebar filter labels */
.filter-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

/* Range input accent */
input[type="range"] {
  accent-color: #8b5cf6;
}

/* Kingdom card */
.kingdom-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kingdom-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.35);
}

/* Responsive sidebar toggle (mobile) */
@media (max-width: 767px) {
  #sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100%;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  #sidebar.open {
    transform: translateX(0);
  }
}

/* Skeleton loading shimmer */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite;
}
