/* =================================================================================
   Seyyahız Badge System Styling
   ================================================================================= */

/* Rarity Color Variables */
:root {
  --tier-common: #94a3b8;
  --tier-common-glow: rgba(148, 163, 184, 0.15);
  
  --tier-rare: #0ea5e9;
  --tier-rare-glow: rgba(14, 165, 233, 0.25);
  
  --tier-epic: #8b5cf6;
  --tier-epic-glow: rgba(139, 92, 246, 0.35);
  
  --tier-legendary: #f59e0b;
  --tier-legendary-glow: rgba(245, 158, 11, 0.5);
  
  --tier-mythic: #ef4444;
  --tier-mythic-glow: rgba(239, 68, 68, 0.65);
}

/* Badge Layout Customizations */
.hud-badges-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.5rem;
  justify-content: flex-start;
}

/* Base Badge Wrapper */
.hud-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 72px; /* Slightly wider layout for name visibility */
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 3D Tilt & Hover Scale */
.hud-badge:hover {
  transform: translateY(-5px) scale(1.08);
}

/* Badge Icon Area */
.badge-icon {
  width: 54px !important; /* Override inline styles if any */
  height: 54px !important;
  border-radius: 50% !important; /* Circle look */
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Inline SVG styling */
.badge-icon svg.badge-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.3s ease, transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* Locked badge state (grayscale and low opacity) */
.hud-badge.locked {
  opacity: 0.35;
  filter: grayscale(0.95);
  cursor: not-allowed;
}

.hud-badge.locked:hover {
  transform: none;
}

.hud-badge.locked::after {
  content: "🔒";
  position: absolute;
  top: -4px;
  right: 4px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.9);
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  filter: grayscale(0);
}

/* Hover Glowing & Breathing effects depending on Tier */
.hud-badge[data-tier="Common"] .badge-icon:hover {
  border-color: var(--tier-common) !important;
  box-shadow: 0 0 12px var(--tier-common-glow);
}

.hud-badge[data-tier="Rare"] .badge-icon:hover {
  border-color: var(--tier-rare) !important;
  box-shadow: 0 0 15px var(--tier-rare-glow);
}

.hud-badge[data-tier="Epic"] .badge-icon:hover {
  border-color: var(--tier-epic) !important;
  box-shadow: 0 0 20px var(--tier-epic-glow);
}

.hud-badge[data-tier="Legendary"] .badge-icon:hover {
  border-color: var(--tier-legendary) !important;
  box-shadow: 0 0 25px var(--tier-legendary-glow);
  animation: pulse-legendary 2s infinite alternate;
}

.hud-badge[data-tier="Mythic"] .badge-icon:hover {
  border-color: var(--tier-mythic) !important;
  box-shadow: 0 0 30px var(--tier-mythic-glow);
  animation: pulse-mythic 1.5s infinite alternate;
}

/* Label text below badges */
.hud-badge .hud-badge-name {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.2s ease;
}

.hud-badge:hover .hud-badge-name {
  color: #fff;
}

/* Dynamic glow/pulse keyframes */
@keyframes pulse-legendary {
  0% {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3), inset 0 2px 4px rgba(255,255,255,0.05);
  }
  100% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.7), 0 0 10px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
  }
}

@keyframes pulse-mythic {
  0% {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4), inset 0 2px 4px rgba(255,255,255,0.05);
  }
  100% {
    box-shadow: 0 0 32px rgba(239, 68, 68, 0.9), 0 0 15px rgba(239, 68, 68, 0.5);
    transform: translateY(-3px) scale(1.02);
  }
}

/* =================================================================================
   Detailed Badge Modal (Interactive Info Cards)
   ================================================================================= */
.badge-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.badge-detail-modal.active {
  opacity: 1;
  pointer-events: all;
}

.badge-detail-content {
  background: linear-gradient(135deg, #1e1e24 0%, #121215 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.badge-detail-modal.active .badge-detail-content {
  transform: scale(1);
}

.badge-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.badge-modal-close:hover {
  color: #fff;
}

.badge-detail-graphic {
  width: 100px;
  height: 100px;
  margin: 1.5rem auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.badge-detail-tier {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.badge-tier-mythic {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.badge-tier-legendary {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.badge-tier-epic {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.badge-tier-rare {
  background: rgba(14, 165, 233, 0.2);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.badge-tier-common {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.badge-detail-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.badge-detail-desc {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.badge-detail-status {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.badge-status-label {
  color: #64748b;
}

.badge-status-value {
  font-weight: 600;
}

.badge-status-value.unlocked {
  color: #10b981;
}

.badge-status-value.locked {
  color: #ef4444;
}
