/* 抽卡相关占位样式：后续可以丰富动画细节 */

.dp-gacha-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.dp-gacha-card-wrapper {
  perspective: 1200px;
}

.dp-gacha-card {
  width: 240px;
  height: 340px;
  border-radius: 26px;
  box-shadow: var(--dp-shadow-soft);
  position: relative;
}

.dp-gacha-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dp-gacha-card-inner.is-flipped {
  transform: rotateY(180deg);
  animation: cardShine 0.8s ease-out;
}

@keyframes cardShine {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

.dp-gacha-card-face {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dp-gacha-card-front {
  background: linear-gradient(160deg, #fff1f4, #ffd9e5);
  color: var(--dp-accent);
}

.dp-gacha-card-back {
  background: #ffffff;
  transform: rotateY(180deg);
  flex-direction: column;
  gap: 10px;
  padding: 0;
}

.dp-gacha-card-back img {
  width: 100%;
  height: 60%;
  object-fit: cover;
}

.dp-gacha-card-info {
  padding: 12px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dp-gacha-card-info h3 {
  margin: 0;
  font-size: 16px;
}

.dp-gacha-card-info p {
  margin: 0;
  font-size: 13px;
  color: var(--dp-text-sub);
}

.dp-gacha-card-hint {
  font-size: 15px;
  text-align: center;
}

.dp-gacha-actions {
  display: flex;
  gap: 12px;
}

.dp-ghost-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid #ffd5e1;
  background: transparent;
  color: var(--dp-accent);
  cursor: pointer;
}

.dp-ghost-btn:disabled,
.dp-primary-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dp-gacha-status {
  font-size: 13px;
  color: var(--dp-text-sub);
}

.dp-gacha-collection {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.dp-gacha-collection-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #f5f5f5;
  padding-bottom: 8px;
  text-align: center;
  filter: grayscale(1);
  opacity: 0.6;
  transition: all 0.3s ease;
  cursor: pointer;
}

.dp-gacha-collection-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.dp-gacha-collection-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.dp-gacha-collection-item--owned {
  filter: grayscale(0);
  opacity: 1;
  box-shadow: var(--dp-shadow-card);
  animation: cardUnlock 0.5s ease-out;
}

@keyframes cardUnlock {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.dp-gacha-collection-title {
  display: block;
  font-size: 13px;
  margin-top: 6px;
}

.dp-gacha-collection-rarity {
  font-size: 11px;
  color: var(--dp-text-sub);
}

.dp-gacha-rarity {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  width: fit-content;
}

.badge-r {
  background: rgba(255, 154, 158, 0.15);
  color: var(--dp-accent);
}
.badge-sr {
  background: rgba(255, 190, 133, 0.2);
  color: #ff8f2d;
}
.badge-ssr {
  background: rgba(193, 152, 255, 0.15);
  color: #9050ff;
}


