/* 뱃지 시스템 스타일 */

/* 뱃지 획득 모달 */
.badge-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.badge-modal.show {
  display: flex;
}

.badge-modal__content {
  background: linear-gradient(135deg, #1e1b29 0%, #2a2635 100%);
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  position: relative;
  border: 2px solid rgba(111, 92, 255, 0.3);
  box-shadow: 0 10px 40px rgba(111, 92, 255, 0.2);
  animation: badgeSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgeSlideIn {
  0% {
    transform: scale(0.5) translateY(-50px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.badge-modal__icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  animation: badgePulse 2s ease infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(111, 92, 255, 0.5));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(245, 211, 108, 0.7));
  }
}

.badge-modal__title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #6f5cff, #f5d36c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge-modal__name {
  font-size: 18px;
  font-weight: 600;
  color: #f5d36c;
  margin-bottom: 15px;
}

.badge-modal__description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.badge-modal__condition {
  font-size: 13px;
  color: rgba(245, 211, 108, 0.8);
  background: rgba(245, 211, 108, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 25px;
  border: 1px solid rgba(245, 211, 108, 0.2);
}

.badge-modal__condition::before {
  content: '🎯 ';
  margin-right: 4px;
}

.badge-modal__close {
  background: linear-gradient(135deg, #6f5cff, #9d8bff);
  border: none;
  border-radius: 25px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 40px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.badge-modal__close:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(111, 92, 255, 0.4);
}

.badge-modal__close:active {
  transform: translateY(0);
}

/* 뱃지 리스트 (마이페이지 등에서 사용) */
.badge-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 15px;
  padding: 20px;
}

.badge-item {
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  background: rgba(111, 92, 255, 0.05);
  transition: all 0.3s ease;
}

.badge-item--locked {
  opacity: 0.3;
  filter: grayscale(1);
}

.badge-item--unlocked {
  cursor: pointer;
}

.badge-item--unlocked:hover {
  background: rgba(111, 92, 255, 0.1);
  transform: translateY(-3px);
}

.badge-item__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 8px;
}

.badge-item__name {
  font-size: 12px;
  color: #ffffff;
  font-weight: 500;
  margin-bottom: 4px;
}

.badge-item__desc {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.3;
}

/* 뱃지 카테고리 */
.badge-category {
  margin-bottom: 30px;
}

.badge-category__title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 15px;
  padding-left: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(111, 92, 255, 0.2);
}

/* 뱃지 진행도 */
.badge-progress {
  padding: 15px 20px;
  background: rgba(111, 92, 255, 0.05);
  border: 1px solid rgba(111, 92, 255, 0.2);
  border-radius: 12px;
  margin-bottom: 20px;
}

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

.badge-progress__text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.badge-progress__count {
  font-size: 16px;
  font-weight: 700;
  color: #f5d36c;
}

.badge-progress__bar {
  width: 100%;
  height: 8px;
  background: rgba(30, 27, 41, 0.5);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.badge-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #6f5cff 0%, #f5d36c 100%);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  position: relative;
  box-shadow: 0 0 10px rgba(111, 92, 255, 0.5);
}

.badge-progress__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* 새 뱃지 알림 뱃지 */
.badge-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgeBounce 1s ease infinite;
}

@keyframes badgeBounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* 뱃지 섹션 */
.badge-section {
  margin-bottom: 32px;
}

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

.badge-section__view-all {
  background: none;
  border: none;
  color: #6f5cff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.3s ease;
}

.badge-section__view-all:hover {
  color: #f5d36c;
  transform: translateX(4px);
}

/* 대표 뱃지 카드 */
.main-badge-card {
  background: linear-gradient(135deg, rgba(111, 92, 255, 0.1) 0%, rgba(245, 211, 108, 0.05) 100%);
  border: 1px solid rgba(111, 92, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 빈 상태 */
.main-badge-card__empty {
  text-align: center;
}

.main-badge-card__empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.main-badge-card__empty-text {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}

.main-badge-card__empty-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}

/* 뱃지 콘텐츠 */
.main-badge-card__content {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.main-badge-card__icon {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(111, 92, 255, 0.5));
}

.main-badge-card__info {
  flex: 1;
}

.main-badge-card__name {
  font-size: 18px;
  font-weight: 700;
  color: #f5d36c;
  margin-bottom: 8px;
}

.main-badge-card__desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}
