/* ==================== THE VAULT — Renaissance ==================== */
/* A treasure room, not a spreadsheet. Your trophies live here.     */
/* 60-30-10: warm void → surfaces → gold/artwork accents            */

/* ===== Kill discover chrome in vault & lab ===== */
.zone-collection .discover-controls,
.zone-collection .discover-header,
.zone-lab .discover-controls,
.zone-lab .discover-header {
  display: none !important;
}

/* Hide header search in vault — vault has its own */
.zone-collection #search-input {
  display: none !important;
}

/* ===== Vault Atmosphere — warm, candlelit chamber ===== */
.zone-collection .bg-void {
  background: radial-gradient(ellipse at 50% 20%, #1a1410 0%, #0e0c0a 50%, #080706 100%) !important;
}

.zone-collection .bg-glow {
  background: radial-gradient(ellipse at 50% 15%, rgba(212, 175, 55, 0.03) 0%, transparent 50%) !important;
}

/* ===== Ambient Particles — dust motes / fireflies ===== */
.vault-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.vault-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  animation: vault-float linear infinite;
}

.vault-particle:nth-child(odd) {
  background: rgba(255, 255, 255, 0.15);
}

@keyframes vault-float {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-20px) translateX(40px); opacity: 0; }
}

/* ===== Shell ===== */
#card-space.vault-mode {
  padding-top: 8px !important;
}

.vault-shell {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 32px 120px;
  min-height: 60vh;
  z-index: 1;
}

/* ===== Entrance Overlay ===== */
.vault-entrance {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #080706;
  animation: vault-entrance-fade 2s ease forwards;
  pointer-events: none;
}

@keyframes vault-entrance-fade {
  0% { opacity: 1; }
  60% { opacity: 1; }
  100% { opacity: 0; }
}

.vault-entrance-chest {
  position: relative;
  width: 80px;
  height: 64px;
  margin-bottom: 24px;
}

/* CSS pixel art chest */
.vault-chest-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 32px;
  background: linear-gradient(180deg, #8B6914 0%, #6B4F10 100%);
  border: 2px solid #A07818;
  border-radius: 2px 2px 4px 4px;
}

.vault-chest-body::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--gold, #d4af37);
  border: 1px solid #c4a030;
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}

.vault-chest-lid {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 20px;
  background: linear-gradient(180deg, #A07818 0%, #8B6914 100%);
  border: 2px solid #B08820;
  border-radius: 4px 4px 0 0;
  border-bottom: none;
  transform-origin: bottom center;
  animation: vault-lid-open 1.2s ease 0.3s forwards;
}

@keyframes vault-lid-open {
  0% { transform: translateX(-50%) rotateX(0deg); }
  100% { transform: translateX(-50%) rotateX(-110deg); }
}

.vault-chest-glow {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 0) 100%);
  animation: vault-glow-reveal 1.2s ease 0.6s forwards;
}

@keyframes vault-glow-reveal {
  0% { background: radial-gradient(ellipse, rgba(212, 175, 55, 0) 0%, transparent 70%); }
  100% { background: radial-gradient(ellipse, rgba(212, 175, 55, 0.4) 0%, transparent 70%); }
}

.vault-entrance-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(212, 175, 55, 0);
  animation: vault-text-reveal 0.8s ease 0.8s forwards;
}

@keyframes vault-text-reveal {
  0% { color: rgba(212, 175, 55, 0); }
  100% { color: rgba(212, 175, 55, 0.5); }
}

/* ===== Vault Header ===== */
.vault-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
  animation: vault-fade-in 0.5s ease 0.1s both;
}

@keyframes vault-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.vault-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.vault-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary, rgba(255,255,255,0.87));
  letter-spacing: -0.02em;
}

.vault-collection-count {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--gold, #d4af37);
  opacity: 0.5;
}

.vault-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vault-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 6px;
  color: rgba(212, 175, 55, 0.7);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vault-action-btn:hover {
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.25);
  color: rgba(212, 175, 55, 0.9);
}

.vault-action-btn svg {
  width: 14px;
  height: 14px;
}

/* ===== Toolbar (search + sort + filters) ===== */
.vault-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 16px;
  animation: vault-fade-in 0.5s ease 0.15s both;
}

/* Search */
.vault-search-wrap {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.vault-search {
  width: 100%;
  padding: 8px 32px 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: var(--text-primary, rgba(255,255,255,0.87));
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.vault-search::placeholder {
  color: var(--text-disabled, rgba(255,255,255,0.15));
}

.vault-search:focus {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.06);
}

.vault-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  font-size: 12px;
  padding: 4px;
  line-height: 1;
}

.vault-search-clear:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* Divider */
.vault-toolbar-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

/* Type filters — inline pills */
.vault-type-filters {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.vault-type-btn {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-tertiary, rgba(255,255,255,0.3));
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.vault-type-btn:hover {
  color: var(--text-secondary, rgba(255,255,255,0.55));
}

.vault-type-btn.is-active {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.2);
  color: rgba(212, 175, 55, 0.8);
}

.vault-type-count {
  font-size: 10px;
  opacity: 0.5;
  margin-left: 3px;
}

/* Sort */
.vault-sort {
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

.vault-sort-btn {
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-tertiary, rgba(255,255,255,0.3));
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vault-sort-btn:hover {
  color: var(--text-secondary, rgba(255,255,255,0.55));
}

.vault-sort-btn.is-active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, rgba(255,255,255,0.87));
}

/* ===== Section Headers (Your Creations / Saved / Local) ===== */
.vault-section {
  margin-bottom: 8px;
  animation: vault-fade-in 0.5s ease 0.2s both;
}

.vault-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0 12px;
}

.vault-section-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary, rgba(255,255,255,0.3));
  letter-spacing: 1px;
}

.vault-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), transparent);
}

.vault-section-count {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--text-tertiary, rgba(255,255,255,0.3));
}

/* ===== Card Grid — Adaptive Density ===== */
.vault-cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  animation: vault-cards-in 0.6s ease 0.25s both;
}

@keyframes vault-cards-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Solo card — hero pedestal */
.vault-cards--solo {
  grid-template-columns: 1fr;
  max-width: 340px;
  margin: 0 auto;
}

/* Solo vault card — square art, no hero mode needed */
.vault-cards--solo .ygo-card .ygo-card-art {
  aspect-ratio: 1;
}

.vault-cards--solo .ygo-card {
  box-shadow: 
    0 4px 40px rgba(212, 175, 55, 0.06),
    0 0 80px rgba(212, 175, 55, 0.03);
}

/* Few cards (2-3) — larger, centered */
.vault-cards--few {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

/* Medium (4-8) */
.vault-cards--medium {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ===== Vault Card Enhancements (ownership glow) ===== */
.vault-cards .ygo-card {
  transition: transform 0.25s ease, box-shadow 0.4s ease;
}

/* Ownership shimmer at rest — rarity-colored */
.vault-cards .ygo-card[data-rarity="common"] {
  box-shadow: 0 1px 4px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.03);
}

.vault-cards .ygo-card[data-rarity="rare"] {
  box-shadow: 0 1px 8px rgba(0,0,0,0.3), 0 0 12px rgba(59,130,246,0.04), 0 0 0 1px rgba(59,130,246,0.08);
}

.vault-cards .ygo-card[data-rarity="epic"] {
  box-shadow: 0 1px 8px rgba(0,0,0,0.3), 0 0 16px rgba(168,85,247,0.05), 0 0 0 1px rgba(168,85,247,0.1);
}

.vault-cards .ygo-card[data-rarity="legendary"] {
  box-shadow: 0 2px 12px rgba(0,0,0,0.3), 0 0 20px rgba(212,175,55,0.06), 0 0 0 1px rgba(212,175,55,0.12);
}

.vault-cards .ygo-card[data-rarity="mythic"] {
  box-shadow: 0 2px 16px rgba(0,0,0,0.3), 0 0 24px rgba(255,220,180,0.06), 0 0 0 1px rgba(255,255,255,0.08);
  animation: vault-mythic-pulse 4s ease-in-out infinite;
}

@keyframes vault-mythic-pulse {
  0%, 100% { box-shadow: 0 2px 16px rgba(0,0,0,0.3), 0 0 24px rgba(255,220,180,0.06), 0 0 0 1px rgba(255,255,255,0.08); }
  50% { box-shadow: 0 2px 16px rgba(0,0,0,0.3), 0 0 32px rgba(255,220,180,0.1), 0 0 0 1px rgba(255,255,255,0.12); }
}

/* Hover in vault — warm glow */
.vault-cards .ygo-card:hover {
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    0 0 40px rgba(212, 175, 55, 0.06) !important;
}

/* ===== Vault Card — Owned Treatment ===== */

/* Play button semi-visible at rest (you OWN these) */
.vault-cards .ygo-card .ygo-card-play {
  opacity: 0.3;
  transition: opacity 0.15s ease;
}

.vault-cards .ygo-card:hover .ygo-card-play {
  opacity: 1;
}

/* Stats always visible in vault — you own it, show the data */
.vault-cards .ygo-card .ygo-card-stats {
  height: auto !important;
  opacity: 1 !important;
  padding: 6px 12px 0 !important;
  overflow: visible !important;
}

/* Nameplate gets more breathing room */
.vault-cards .ygo-card .ygo-card-nameplate {
  padding: 10px 12px 2px;
}

/* ===== Vault Card Action Row (below nameplate) ===== */
.vault-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px 8px;
}

.vault-card-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-tertiary, rgba(255,255,255,0.3));
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.vault-card-btn:hover {
  color: var(--text-secondary, rgba(255,255,255,0.55));
  background: rgba(255, 255, 255, 0.04);
}

.vault-card-btn svg {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.vault-card-btn:hover svg {
  opacity: 0.8;
}

.vault-card-btn--danger {
  margin-left: auto;
}

.vault-card-btn--danger:hover {
  color: rgba(239, 68, 68, 0.7);
  background: rgba(239, 68, 68, 0.06);
}

.vault-card-btn--danger:hover svg {
  opacity: 1;
}

/* Kill the old overlaid action bar in vault cards */
.vault-cards .ygo-card-actions {
  display: none !important;
}

/* No inner::after padding needed — action row handles spacing */
.vault-cards .ygo-card .ygo-card-inner::after {
  height: 0px;
}

/* ===== Now Playing — card comes alive ===== */
.vault-cards .ygo-card.is-playing {
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px rgba(0,0,0,0.4),
    0 0 40px rgba(212, 175, 55, 0.08),
    0 0 0 1px rgba(212, 175, 55, 0.2) !important;
}

/* Equalizer bars on playing card */
.vault-eq {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 0 0 2px;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ygo-card.is-playing .vault-eq {
  opacity: 1;
}

.vault-eq-bar {
  width: 3px;
  background: var(--gold, #d4af37);
  border-radius: 1px 1px 0 0;
  animation: vault-eq-bounce linear infinite;
  opacity: 0.7;
}

.vault-eq-bar:nth-child(1) { height: 4px; animation-duration: 0.45s; }
.vault-eq-bar:nth-child(2) { height: 8px; animation-duration: 0.55s; animation-delay: 0.1s; }
.vault-eq-bar:nth-child(3) { height: 6px; animation-duration: 0.4s; animation-delay: 0.2s; }
.vault-eq-bar:nth-child(4) { height: 10px; animation-duration: 0.5s; animation-delay: 0.05s; }

@keyframes vault-eq-bounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* ===== 3D Tilt on Hover ===== */
.vault-cards .ygo-card {
  perspective: 600px;
}

/* ===== Drop Zone ===== */
.vault-drop-zone {
  margin-top: 32px;
  border: 1px dashed rgba(212, 175, 55, 0.12);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.vault-drop-zone:hover {
  border-color: rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.02);
}

/* Drag active — treasure deposit glow */
.vault-drag-active .vault-drop-zone,
.vault-drop-highlight {
  border-color: rgba(212, 175, 55, 0.5) !important;
  background: rgba(212, 175, 55, 0.04) !important;
  box-shadow: 
    0 0 40px rgba(212, 175, 55, 0.06),
    inset 0 0 40px rgba(212, 175, 55, 0.02) !important;
}

/* Full-vault drag overlay */
.vault-drag-active::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(212, 175, 55, 0.02);
  pointer-events: none;
  z-index: 9998;
  animation: vault-drag-pulse 1.5s ease-in-out infinite;
}

@keyframes vault-drag-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.vault-drop-inner {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.vault-drop-inner .vault-drop-browse { pointer-events: all; }

.vault-drop-icon {
  color: rgba(212, 175, 55, 0.25);
  margin-bottom: 8px;
}

.vault-drop-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-tertiary, rgba(255,255,255,0.3));
  margin: 0 0 4px;
}

.vault-drop-sub {
  font-size: 11px;
  color: var(--text-disabled, rgba(255,255,255,0.15));
  margin: 0;
}

.vault-drop-browse {
  background: none;
  border: none;
  color: rgba(212, 175, 55, 0.6);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}

.vault-drop-browse:hover {
  color: rgba(212, 175, 55, 0.9);
}

/* ===== Local file badge ===== */
.vault-local-card::after {
  content: 'LOCAL';
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: rgba(212, 175, 55, 0.5);
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 5px;
  border-radius: 2px;
  z-index: 5;
}

/* ===== Empty State — Closed Treasure Chest ===== */
.vault-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 100px;
  text-align: center;
  animation: vault-fade-in 0.5s ease;
}

.vault-empty-chest {
  position: relative;
  width: 96px;
  height: 80px;
  margin-bottom: 32px;
}

.vault-empty-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, rgba(255,255,255,0.87));
  margin: 0 0 8px;
}

.vault-empty-sub {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-tertiary, rgba(255,255,255,0.3));
  margin: 0 0 32px;
  max-width: 320px;
  line-height: 1.6;
}

.vault-empty-actions {
  display: flex;
  gap: 12px;
}

.vault-cta-primary {
  padding: 10px 20px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  color: rgba(212, 175, 55, 0.85);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vault-cta-primary:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.08);
}

.vault-cta-secondary {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-secondary, rgba(255,255,255,0.55));
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vault-cta-secondary:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary, rgba(255,255,255,0.87));
}

/* ===== Locked State ===== */
.vault-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  text-align: center;
}

.vault-locked-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: rgba(212, 175, 55, 0.3);
}

.vault-locked h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.vault-locked p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0 0 24px;
}

.vault-unlock-btn {
  padding: 10px 24px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  color: rgba(212, 175, 55, 0.85);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vault-unlock-btn:hover {
  background: rgba(212, 175, 55, 0.2);
}

/* ===== Loading ===== */
.vault-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 0;
  gap: 16px;
}

.vault-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(212, 175, 55, 0.1);
  border-top-color: rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  animation: vault-spin 0.7s linear infinite;
}

@keyframes vault-spin {
  to { transform: rotate(360deg); }
}

/* ===== No Results ===== */
.vault-no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary, rgba(255,255,255,0.3));
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
}

/* ===== Discover More CTA ===== */
.vault-bottom-actions {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  animation: vault-fade-in 0.5s ease 0.4s both;
}

.vault-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: transparent;
  border: 1px dashed rgba(212, 175, 55, 0.15);
  border-radius: 20px;
  color: rgba(212, 175, 55, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.vault-add-btn:hover {
  border-color: rgba(212, 175, 55, 0.3);
  color: rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.03);
}

/* ===== Playlists ===== */
.vault-playlists-section {
  margin-top: 12px;
}

.vault-playlist-new-btn {
  background: none;
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: rgba(212, 175, 55, 0.6);
  padding: 4px 14px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}

.vault-playlist-new-btn:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.4);
  color: #d4af37;
}

/* Inline create input */
.vault-playlist-create-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.vault-playlist-create-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.87);
  padding: 8px 12px;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.vault-playlist-create-input:focus {
  border-color: rgba(212, 175, 55, 0.5);
}

.vault-playlist-create-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.vault-playlist-create-cancel {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.vault-playlist-shelf {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
}

.vault-playlist-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.vault-playlist-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(212, 175, 55, 0.12);
}

.vault-playlist-card.is-expanded {
  border-color: rgba(212, 175, 55, 0.15);
  background: rgba(212, 175, 55, 0.03);
}

.vault-playlist-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.vault-playlist-icon {
  font-size: 15px;
  opacity: 0.6;
}

.vault-playlist-name {
  flex: 1;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-weight: 500;
}

.vault-playlist-count {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  min-width: 16px;
  text-align: right;
}

.vault-playlist-delete {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.2s;
  line-height: 1;
  opacity: 0;
}

.vault-playlist-card:hover .vault-playlist-delete {
  opacity: 1;
  color: rgba(255, 255, 255, 0.2);
}

.vault-playlist-delete:hover {
  color: #f66 !important;
}

.vault-playlist-items {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 4px 0;
  animation: playlistExpand 0.2s ease;
}

@keyframes playlistExpand {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 500px; }
}

.vault-playlist-bar {
  display: flex;
  gap: 6px;
  padding: 8px 14px 4px;
}

.vault-playlist-bar .vault-action-btn {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
  color: rgba(212, 175, 55, 0.7);
  cursor: pointer;
  transition: all 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}

.vault-playlist-bar .vault-action-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
}

.vault-playlist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 4px;
  margin: 0 4px;
}

.vault-playlist-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.vault-playlist-row-art {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.vault-playlist-row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.vault-playlist-row-title {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}

.vault-playlist-row-artist {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vault-playlist-row-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  opacity: 0;
  transition: all 0.15s;
}

.vault-playlist-row:hover .vault-playlist-row-remove {
  opacity: 1;
  color: rgba(255, 255, 255, 0.25);
}

.vault-playlist-row-remove:hover {
  color: #f66 !important;
}

/* Playlist picker dropdown (for Add to Playlist) */
.vault-playlist-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: rgba(15, 15, 20, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  padding: 4px;
  z-index: 100;
  backdrop-filter: blur(12px);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
  animation: pickerSlideUp 0.15s ease;
}

@keyframes pickerSlideUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.vault-playlist-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  transition: background 0.1s;
}

.vault-playlist-picker-item:hover {
  background: rgba(212, 175, 55, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.vault-playlist-picker-new {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 2px;
  padding-top: 6px;
  color: rgba(212, 175, 55, 0.6);
}

.vault-playlist-picker-new:hover {
  color: #d4af37;
}

/* ===== Vault Skeleton Loading ===== */
.vault-skeleton .skeleton-art {
  background: linear-gradient(110deg, rgba(212,175,55,0.03) 8%, rgba(212,175,55,0.08) 18%, rgba(212,175,55,0.03) 33%) !important;
  background-size: 200% 100% !important;
  animation: vault-shimmer 1.5s infinite !important;
}
.vault-skeleton .skeleton-text {
  background: rgba(212,175,55,0.05) !important;
}
@keyframes vault-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Playlist Rename Input ===== */
.vault-playlist-rename-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  padding: 2px 8px;
  outline: none;
}
.vault-playlist-rename-input:focus {
  border-color: #d4af37;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.vault-playlist-name {
  cursor: pointer;
}
.vault-playlist-name:hover {
  color: #d4af37;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 3px;
}

/* ===== Load More (pagination) ===== */
.vault-load-more-wrap {
  text-align: center;
  padding: 24px 0;
}
.vault-load-more-btn {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  color: #d4af37;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  padding: 10px 28px;
  cursor: pointer;
  transition: all 0.2s;
}
.vault-load-more-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
}

/* ===== Pack Staging Tray ===== */
.pack-staging-tray {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 12, 8, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  z-index: 600;
  min-width: 280px;
  max-width: 420px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.08);
  animation: traySlideUp 0.3s ease;
}
@keyframes traySlideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.pack-tray-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.pack-tray-icon { font-size: 16px; }
.pack-tray-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #d4af37;
}
.pack-tray-count {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-left: auto;
}
.pack-tray-clear {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
}
.pack-tray-clear:hover { color: #f66; }
.pack-tray-items {
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.pack-tray-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pack-tray-item:last-child { border-bottom: none; }
.pack-tray-art {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
}
.pack-tray-name {
  flex: 1;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pack-tray-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.2);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
}
.pack-tray-remove:hover { color: #f66; }
.pack-tray-build {
  width: 100%;
  background: linear-gradient(135deg, #d4af37, #b8962e);
  border: none;
  border-radius: 6px;
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
}
.pack-tray-build:hover {
  background: linear-gradient(135deg, #e4bf47, #c8a63e);
  transform: translateY(-1px);
}

/* ===== Override stale vault styles ===== */
.vault-mode .vault-container,
.vault-mode .vault-header-old,
.vault-mode .vault-filters,
.vault-mode .vault-grid,
.vault-mode .vault-slot,
.vault-mode .vault-tabs {
  display: none !important;
}
