/* Pacote */
.pack-envelope {
  width: 140px;
  height: 180px;
  background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 50%, #1e40af 100%);
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.pack-envelope:hover { transform: translateY(-4px) scale(1.02); }
.pack-envelope.shake { animation: packShake 0.5s ease-in-out 3; }
.pack-envelope.opening {
  animation: packOpen 0.8s ease forwards;
  pointer-events: none;
}
@keyframes packShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}
@keyframes packOpen {
  0% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1.1) rotate(-5deg); opacity: 1; }
  100% { transform: scale(0.3) translateY(40px); opacity: 0; }
}

/* Cartas do pacote */
.sticker-card {
  width: 88px;
  height: 120px;
  perspective: 600px;
}
.sticker-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.sticker-card.flipped .sticker-card-inner { transform: rotateY(180deg); }
.sticker-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.sticker-card-back {
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1d4ed8;
  font-size: 0.65rem;
}
.sticker-card-front {
  transform: rotateY(180deg);
  background: #fff;
}
.sticker-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Álbum */
.album-slot {
  aspect-ratio: 3/4;
  border: 2px dashed #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
  position: relative;
  overflow: hidden;
  transition: all 0.15s ease;
}
.album-slot.colado {
  border-style: solid;
  border-color: #e5e7eb;
  background: #fff;
}
.album-slot.can-paste {
  border-color: #2563eb;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  animation: pastePulse 1.2s ease infinite;
}
@keyframes pastePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2); }
}
.album-slot.paste-flash {
  animation: pastePop 0.45s ease;
}
@keyframes pastePop {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.album-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-slot .slot-num {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  color: #9ca3af;
  z-index: 1;
}
.album-slot.colado .slot-num { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }

.inventory-item {
  width: 56px;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: border-color 0.15s;
}
.inventory-item.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}
.inventory-item img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 4px;
}

.overlay-pack {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
