/* ==================== VAULT: CURATED COLLECTIONS ==================== */
/* Staff-curated genre collections and spotlights */

/* ==================== COLLECTIONS SECTION ==================== */
.collections-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--game-border);
  background: var(--game-bg-panel);
}

.collections-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.collections-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--game-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-icon {
  font-size: 16px;
}

.staff-curated-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
  border: 1px solid var(--game-gold);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--game-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-icon {
  font-size: 12px;
  animation: badge-sparkle 2s ease-in-out infinite;
}

@keyframes badge-sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* ==================== COLLECTIONS ROW ==================== */
.collections-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.collections-row::-webkit-scrollbar {
  height: 6px;
}

.collections-row::-webkit-scrollbar-track {
  background: var(--game-bg-dark);
  border-radius: 3px;
}

.collections-row::-webkit-scrollbar-thumb {
  background: var(--game-border);
  border-radius: 3px;
}

.collections-row::-webkit-scrollbar-thumb:hover {
  background: var(--game-gold);
}

/* ==================== COLLECTION CARD ==================== */
.collection-card {
  flex: 0 0 220px;
  min-height: 140px;
  scroll-snap-align: start;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.collection-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.collection-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.collection-card:hover .collection-card-glow {
  opacity: 1;
}

.collection-card-content {
  position: relative;
  z-index: 2;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.collection-icon {
  font-size: 36px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.collection-card:hover .collection-icon {
  transform: scale(1.15) rotate(5deg);
}

.collection-name {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.collection-pack-count {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: auto;
}

.collection-card-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease, color 0.3s ease;
}

.collection-card:hover .collection-card-arrow {
  transform: translateX(4px);
  color: white;
}

/* ==================== GENRE SPOTLIGHT ==================== */
.genre-spotlight {
  position: relative;
  min-height: 180px;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-bottom: 1px solid var(--game-border);
}

.genre-spotlight:hover {
  transform: scale(1.005);
}

.spotlight-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255, 255, 255, 0.15), transparent 60%);
  pointer-events: none;
}

.spotlight-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 1;
  pointer-events: none;
}

.spotlight-content {
  position: relative;
  z-index: 2;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.spotlight-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: white;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.spotlight-icon {
  font-size: 48px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  animation: spotlight-icon-float 4s ease-in-out infinite;
}

@keyframes spotlight-icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.spotlight-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 20px;
  color: white;
  margin: 0 0 8px 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  letter-spacing: 3px;
}

.spotlight-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 20px 0;
  max-width: 400px;
}

.spotlight-cta {
  background: white;
  color: #1a1a1a;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spotlight-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ==================== COLLECTION MODAL ==================== */
.collection-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.collection-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.collection-modal {
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: var(--game-bg-panel);
  border: 2px solid var(--game-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

.collection-modal-backdrop.active .collection-modal {
  transform: scale(1) translateY(0);
}

.collection-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collection-modal-close:hover {
  background: var(--rarity-mythic);
  border-color: var(--rarity-mythic);
  transform: rotate(90deg);
}

/* Modal Hero */
.collection-modal-hero {
  position: relative;
  padding: 48px 40px;
  min-height: 200px;
}

.modal-hero-content {
  position: relative;
  z-index: 2;
}

.modal-staff-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--game-gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--game-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.modal-icon {
  font-size: 56px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.modal-title {
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin: 0 0 12px 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-description {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 16px 0;
  max-width: 600px;
  line-height: 1.6;
}

.modal-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.modal-stat-divider {
  opacity: 0.5;
}

/* Modal Packs Grid */
.collection-modal-packs {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: var(--game-bg-dark);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-content: start;
}

.collection-modal-packs::-webkit-scrollbar {
  width: 8px;
}

.collection-modal-packs::-webkit-scrollbar-track {
  background: var(--game-bg-dark);
}

.collection-modal-packs::-webkit-scrollbar-thumb {
  background: var(--game-border);
  border-radius: 4px;
}

.collection-modal-packs::-webkit-scrollbar-thumb:hover {
  background: var(--game-border-hover);
}

/* Collection Pack Item */
.collection-pack-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--game-bg-panel);
  border: 2px solid var(--game-border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.collection-pack-item:hover {
  transform: translateX(4px);
  border-color: var(--game-gold);
}

/* Rarity borders */
.collection-pack-item.rarity-uncommon { border-color: var(--rarity-uncommon); }
.collection-pack-item.rarity-rare { border-color: var(--rarity-rare); }
.collection-pack-item.rarity-epic { border-color: var(--rarity-epic); }
.collection-pack-item.rarity-legendary { 
  border-color: var(--rarity-legendary); 
  box-shadow: 0 0 15px var(--glow-legendary);
}
.collection-pack-item.rarity-mythic { 
  border-color: var(--rarity-mythic); 
  box-shadow: 0 0 20px var(--glow-mythic);
}

.pack-item-artwork {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.pack-item-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pack-item-rarity {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2px 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  text-align: center;
  text-transform: uppercase;
  color: white;
  background: rgba(0, 0, 0, 0.7);
}

.pack-item-rarity.mythic { background: var(--rarity-mythic); }
.pack-item-rarity.legendary { background: var(--rarity-legendary); color: #1a1a1a; }
.pack-item-rarity.epic { background: var(--rarity-epic); }
.pack-item-rarity.rare { background: var(--rarity-rare); }
.pack-item-rarity.uncommon { background: var(--rarity-uncommon); color: #1a1a1a; }
.pack-item-rarity.common { background: var(--rarity-common); color: #1a1a1a; }

.pack-item-info {
  flex: 1;
  min-width: 0;
}

.pack-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--game-text);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pack-item-creator {
  font-size: 11px;
  color: var(--game-text-dim);
}

.pack-item-price {
  padding: 8px 12px;
  background: var(--game-bg-slot);
  border: 1px solid var(--game-gold);
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--game-gold);
  white-space: nowrap;
}

.pack-item-price.free {
  background: var(--rarity-uncommon);
  border-color: var(--rarity-uncommon);
  color: white;
}

/* Empty Collection */
.collection-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--game-text-dim);
}

.collection-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.5;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .collections-section {
    padding: 16px;
  }
  
  .collections-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .collection-card {
    flex: 0 0 180px;
    min-height: 120px;
  }
  
  .collection-card-content {
    padding: 16px;
  }
  
  .collection-icon {
    font-size: 28px;
    margin-bottom: 8px;
  }
  
  .collection-name {
    font-size: 12px;
  }
  
  /* Genre Spotlight Mobile */
  .genre-spotlight {
    min-height: 160px;
  }
  
  .spotlight-content {
    padding: 24px 20px;
  }
  
  .spotlight-icon {
    font-size: 36px;
  }
  
  .spotlight-title {
    font-size: 14px;
    letter-spacing: 2px;
  }
  
  .spotlight-subtitle {
    font-size: 12px;
    margin-bottom: 16px;
  }
  
  .spotlight-cta {
    padding: 10px 18px;
    font-size: 11px;
  }
  
  /* Modal Mobile */
  .collection-modal {
    width: 100%;
    max-width: 100%;
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    top: auto;
  }
  
  .collection-modal-hero {
    padding: 32px 20px;
    min-height: 160px;
  }
  
  .modal-icon {
    font-size: 40px;
  }
  
  .modal-title {
    font-size: 22px;
  }
  
  .modal-description {
    font-size: 13px;
  }
  
  .collection-modal-packs {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 12px;
  }
  
  .collection-pack-item {
    padding: 10px;
    gap: 10px;
  }
  
  .pack-item-artwork {
    width: 52px;
    height: 52px;
  }
  
  .pack-item-price {
    padding: 6px 10px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .collection-card {
    flex: 0 0 160px;
    min-height: 110px;
  }
  
  .spotlight-badge {
    font-size: 7px;
    padding: 4px 10px;
  }
  
  .spotlight-title {
    font-size: 12px;
  }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  .badge-sparkle,
  .spotlight-icon-float,
  .pulse-live {
    animation: none;
  }
  
  .collection-card:hover,
  .genre-spotlight:hover {
    transform: none;
  }
  
  .collection-card:hover .collection-icon {
    transform: none;
  }
}
