/**
 * badge-showcase.css
 * バッジショーケースコンポーネントスタイル
 */

.badge-showcase {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.badge-showcase__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.badge-showcase__title {
  font-size: 20px;
  font-weight: 700;
  color: #212121;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.badge-showcase__title i {
  color: #ffd700;
  font-size: 24px;
}

.badge-showcase__count {
  padding: 6px 12px;
  background: linear-gradient(135deg, #ffd700 0%, #ff6b35 100%);
  color: white;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
}

.badge-showcase__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.badge-filters {
  display: flex;
  gap: 8px;
}

.badge-filter {
  padding: 8px 16px;
  background: transparent;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #757575;
  cursor: pointer;
  transition: all 0.2s ease;
}

.badge-filter:hover {
  background: #f5f5f5;
  color: #424242;
}

.badge-filter.active {
  background: linear-gradient(135deg, #ff6b35 0%, #ffb199 100%);
  border-color: #ff6b35;
  color: white;
}

.badge-sort {
  padding: 8px 12px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #424242;
  cursor: pointer;
}

.badge-showcase__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: #757575;
}

.badge-showcase__loading i {
  font-size: 32px;
  color: #ff6b35;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.badge-card {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.badge-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.badge-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.badge-card:hover::before {
  opacity: 1;
}

.badge-card[data-rarity='legendary'] {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
  animation: legendary-glow 3s ease-in-out infinite;
}

@keyframes legendary-glow {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 4px 24px rgba(255, 215, 0, 0.6);
  }
}

.badge-card[data-rarity='epic'] {
  background: linear-gradient(135deg, #e8d5f2 0%, #d1a8e5 100%);
}

.badge-card[data-rarity='rare'] {
  background: linear-gradient(135deg, #d5e8f2 0%, #a8cce5 100%);
}

.badge-card__rarity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.badge-card__rarity i {
  font-size: 12px;
}

.badge-card__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  position: relative;
}

.badge-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
  animation: badge-float 3s ease-in-out infinite;
}

@keyframes badge-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.badge-card__name {
  font-size: 14px;
  font-weight: 700;
  color: #212121;
  margin-bottom: 8px;
}

.badge-card[data-rarity='legendary'] .badge-card__name {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.badge-card__description {
  font-size: 12px;
  color: #757575;
  line-height: 1.4;
  margin-bottom: 12px;
  min-height: 32px;
}

.badge-card[data-rarity='legendary'] .badge-card__description {
  color: rgba(255, 255, 255, 0.9);
}

.badge-card__footer {
  display: flex;
  justify-content: center;
}

.badge-card__date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #757575;
}

.badge-card[data-rarity='legendary'] .badge-card__date {
  color: rgba(255, 255, 255, 0.8);
}

.badge-showcase__empty {
  text-align: center;
  padding: 60px 20px;
  color: #757575;
}

.badge-showcase__empty i {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.badge-showcase__empty p {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.badge-showcase__empty small {
  font-size: 13px;
}

@media (max-width: 768px) {
  .badge-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .badge-card {
    padding: 16px;
  }

  .badge-showcase__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .badge-filters {
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  .badge-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .badge-card__icon {
    width: 60px;
    height: 60px;
  }

  .badge-card__name {
    font-size: 13px;
  }

  .badge-card__description {
    font-size: 11px;
    min-height: 28px;
  }
}
