/* ==========================================================================
   🎭 아바타 (Avatar Skin & BM Collection System) 스타일
   ========================================================================== */

#tab-avatar {
  flex-direction: column;
  height: 100%;
  gap: 6px;
  overflow: hidden;
  padding: 6px 8px;
}

/* 1. 아바타 수집 대시보드 */
.avatar-dashboard {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.avatar-dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avatar-count-pill, .avatar-equipped-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pill-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
}

.pill-val {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fbbf24;
}

.avatar-passive-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
}

.passive-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: -0.01em;
}

.passive-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.passive-chip {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 7px;
  border-radius: 8px;
}

/* 2. 🧵 원단 재봉 공방 (펫 알 부화기 스타일 재사용 + 분홍 테마) */
.sewing-banner {
  background: linear-gradient(135deg, rgba(88, 28, 90, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: rgba(244, 114, 182, 0.45);
  margin-bottom: 6px;
}

/* 4. 53종 아바타 그리드 */
.avatar-grid-scroll {
  padding-right: 2px;
}

/* 현재 착용 의상 카드 (펫 장착 슬롯 패널과 같은 위치/스타일) */
.avatar-equipped-grid {
  grid-template-columns: 1fr;
}
.avatar-equipped-card {
  flex-direction: row;
  gap: 10px;
  padding: 4px 8px;
  cursor: pointer;
}
.avatar-equipped-card img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  flex: 0 0 auto;
}
.avatar-equipped-card .aeq-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.avatar-equipped-card .aeq-name {
  font-size: 12px;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar-equipped-card .aeq-stats {
  font-size: 10px;
  color: #cbd5e1;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.avatar-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.avatar-card:active {
  transform: scale(0.96);
}

.avatar-card.equipped {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.45);
}

.avatar-card.locked {
  filter: grayscale(0.65) brightness(0.75);
}

/* 티어별 테두리 및 글로우 */
.avatar-card[data-tier="common"] { border-color: rgba(148, 163, 184, 0.4); }
.avatar-card[data-tier="uncommon"] { border-color: rgba(74, 222, 128, 0.5); }
.avatar-card[data-tier="rare"] { border-color: rgba(56, 189, 248, 0.6); }
.avatar-card[data-tier="epic"] { border-color: rgba(192, 132, 252, 0.7); box-shadow: 0 0 8px rgba(192, 132, 252, 0.2); }
.avatar-card[data-tier="legendary"] { border-color: rgba(251, 191, 36, 0.8); box-shadow: 0 0 12px rgba(251, 191, 36, 0.3); }
.avatar-card[data-tier="mythic"] { border-color: rgba(244, 63, 94, 0.9); box-shadow: 0 0 14px rgba(244, 63, 94, 0.4); }

.avatar-tier-pill {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  position: absolute;
  top: 4px;
  left: 4px;
}

.avatar-tier-pill.tier-common { background: rgba(148, 163, 184, 0.25); color: #cbd5e1; }
.avatar-tier-pill.tier-uncommon { background: rgba(74, 222, 128, 0.25); color: #4ade80; }
.avatar-tier-pill.tier-rare { background: rgba(56, 189, 248, 0.25); color: #38bdf8; }
.avatar-tier-pill.tier-epic { background: rgba(192, 132, 252, 0.25); color: #c084fc; }
.avatar-tier-pill.tier-legendary { background: rgba(251, 191, 36, 0.25); color: #fbbf24; }
.avatar-tier-pill.tier-mythic { background: rgba(244, 63, 94, 0.25); color: #fb7185; }

.avatar-equipped-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #fbbf24;
  color: #000;
  font-size: 0.52rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 6px;
}

.avatar-card-img-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  position: relative;
}

.avatar-card-img {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
}

.avatar-lock-icon {
  position: absolute;
  font-size: 1.1rem;
}

.avatar-card-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: #f1f5f9;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.avatar-card-passive {
  font-size: 0.58rem;
  color: #38bdf8;
  font-weight: 700;
  text-align: center;
}

/* 5. 아바타 상세 모달 */
.avatar-detail-sheet {
  max-width: 360px;
}

.avatar-detail-body {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.avatar-preview-box {
  width: 100px;
  height: 110px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.avatar-preview-halo {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  filter: blur(15px);
  z-index: 0;
}

#avatar-modal-preview-img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
  z-index: 1;
  transition: transform 0.1s ease;
}

.avatar-preview-box.modal-attack-strike #avatar-modal-preview-img {
  animation: previewStrike 0.26s ease-out;
}

@keyframes previewStrike {
  0% { transform: translateX(0) scale(1); }
  35% { transform: translateX(6px) scale(1.15); filter: brightness(1.2) drop-shadow(0 0 6px #f59e0b); }
  100% { transform: translateX(0) scale(1); filter: none; }
}

.avatar-action-switch {
  position: absolute;
  bottom: 4px;
  display: flex;
  gap: 4px;
  z-index: 2;
}

.btn-anim-switch {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-anim-switch.active {
  background: #3b82f6;
  color: #fff;
  border-color: #60a5fa;
}

.avatar-info-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.avatar-modal-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.avatar-modal-name-row h4 {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
}

.avatar-modal-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.avatar-modal-badge.locked {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.avatar-modal-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.35;
  margin: 0;
}

.avatar-modal-stats {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-stat-title {
  font-size: 0.62rem;
  font-weight: 800;
  color: #38bdf8;
}

.modal-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
}

.text-gold { color: #fbbf24; }

.avatar-modal-actions {
  display: flex;
  gap: 8px;
}

.btn-equip-avatar {
  flex: 1;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}

.btn-buy-avatar {
  flex: 1;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}

/* 6. 소환 결과 모달 */
.summon-result-sheet {
  max-width: 380px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.summon-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 6px 2px;
  margin-bottom: 12px;
}

.summon-card {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid #64748b;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.summon-card-thumb {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
}

.summon-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summon-card-tier {
  font-size: 0.55rem;
  font-weight: 800;
}

.summon-card-name {
  font-size: 0.75rem;
  font-weight: 900;
  color: #fff;
}

.summon-card-status {
  font-size: 0.58rem;
  font-weight: 700;
  color: #4ade80;
}

.summon-card-status.dup {
  color: #fbbf24;
}

/* ============================================================================
   📜 [아바타 & 펫 보유 효과 대시보드 UI]
   ============================================================================ */
.collection-dashboard-panel {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.pet-dashboard-panel {
  border-color: rgba(56, 189, 248, 0.35);
  padding: 5px 8px;
  margin-bottom: 4px;
}

.pet-dashboard-panel .collection-dashboard-header {
  gap: 4px;
}

.collection-dashboard-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.collection-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.col-count-chip {
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #b45309);
  border: 1px solid #fde047;
  padding: 2px 8px;
  border-radius: 12px;
}

.col-chip {
  font-size: 0.65rem;
  font-weight: 800;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
}

.col-icon {
  font-size: 1.1rem;
}

