/* ==================== UNDERGROUND VIBE ==================== */
/* Organic, alive, reactive - not a spreadsheet */

/* ==================== ORGANIC CARD FLOAT ==================== */
/* Cards drift like they're floating on water */

.zone-underground .card-space {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 32px 24px 140px;
  perspective: 1000px;
}

/* Jobs audit: Card drift animations REMOVED - "ambient movement" */
/* Cards are static. Hover provides all the interactivity needed. */

.zone-underground .sample-card:hover {
  transform: translateY(-4px) scale(1.02);
}

/* ==================== SOUND REACTIVE CARDS ==================== */
/* Jobs audit: Simplified - playing state is a border highlight, no pulsing */

.zone-underground .sample-card.playing {
  box-shadow: 
    0 0 20px var(--pulse-color, rgba(245, 158, 11, 0.4)),
    0 8px 32px rgba(0, 0, 0, 0.5);
  border-color: var(--pulse-color, rgba(245, 158, 11, 0.6));
}

/* Rarity colors for playing state */
.zone-underground .sample-card[data-rarity="common"].playing {
  --pulse-color: rgba(100, 100, 120, 0.4);
}

.zone-underground .sample-card[data-rarity="rare"].playing {
  --pulse-color: rgba(0, 212, 255, 0.5);
}

.zone-underground .sample-card[data-rarity="epic"].playing {
  --pulse-color: rgba(181, 55, 242, 0.5);
}

.zone-underground .sample-card[data-rarity="legendary"].playing {
  --pulse-color: rgba(255, 215, 0, 0.6);
  box-shadow: 
    0 0 30px rgba(255, 215, 0, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Jobs audit: Scanline overlay and music note animation REMOVED (decorative) */

/* ==================== DISCOVERY MOMENTS ==================== */
/* Jobs audit: Simplified discovery animation */

.zone-underground .sample-card.just-discovered {
  animation: discovered 0.2s ease-out;
}

@keyframes discovered {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Legendary gets same simple treatment */
.zone-underground .sample-card[data-rarity="legendary"].just-discovered {
  animation: discovered 0.2s ease-out;
}

/* ==================== MOBILE ADJUSTMENTS ==================== */
@media (max-width: 768px) {
  /* Reduce drift on mobile for performance */
  .zone-underground .sample-card {
    animation-duration: 12s;
  }
  
  /* Simpler pulse */
  .zone-underground .sample-card.playing {
    animation: cardPulseMobile 0.6s ease-in-out infinite;
  }
  
  @keyframes cardPulseMobile {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
  }
}

/* ==================== INFINITE SCROLL ==================== */
/* The never-ending dig experience */

.scroll-sentinel {
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  margin-bottom: 60px;
}

.scroll-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--zone-primary, #f59e0b);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.scroll-loader.hidden {
  display: none;
}

.scroll-loader-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--zone-primary, #f59e0b);
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

.scroll-end-message {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-end-message .end-icon {
  font-size: 18px;
}

/* Card space scrolls but scrollbar is invisible — page feels clean */
.zone-underground .card-space {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 120px);
  scrollbar-width: none; /* Firefox */
}

.zone-underground .card-space::-webkit-scrollbar {
  display: none; /* Chrome/Safari — hide scrollbar, still scrollable */
}

/* New cards slide in with a subtle animation */
.zone-underground .sample-card.just-discovered {
  animation: cardSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cardSlideIn {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
