/* ====== LOADING OVERLAY ====== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(5,5,5,.88);
  backdrop-filter: blur(16px);
  z-index: 500;
  display: none;
  align-items: center; justify-content: center;
  padding: var(--space-5);
}
.loading-overlay.open { display: flex; }
.loading-box {
  max-width: 520px;
  width: 100%;
  padding: var(--space-10) var(--space-8);
  background: var(--bg-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.7), var(--shadow-gold);
}
.loading-box__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}
.loading-box__title-big {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: var(--space-8);
  background: linear-gradient(100deg, #fff 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.loading-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 48px;
  margin-bottom: var(--space-8);
}
.loading-wave span {
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border-radius: 2px;
  animation: wavePulse 1.2s ease-in-out infinite;
}
.loading-wave span:nth-child(2) { animation-delay: .1s; }
.loading-wave span:nth-child(3) { animation-delay: .2s; }
.loading-wave span:nth-child(4) { animation-delay: .3s; }
.loading-wave span:nth-child(5) { animation-delay: .4s; }
.loading-wave span:nth-child(6) { animation-delay: .5s; }
.loading-wave span:nth-child(7) { animation-delay: .6s; }
@keyframes wavePulse {
  0%, 100% { transform: scaleY(.3); opacity: .4; }
  50% { transform: scaleY(1); opacity: 1; }
}
.loading-stages {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
  margin-bottom: var(--space-6);
}
.loading-stages li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-muted);
  padding: var(--space-2) 0;
  transition: color var(--t-fast) var(--ease);
}
.loading-stages li.active { color: var(--gold-light); }
.loading-stages li.done { color: var(--text-secondary); }
.loading-stages li .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex: none;
  transition: all var(--t-fast) var(--ease);
}
.loading-stages li.active .dot {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse 1.2s ease-in-out infinite;
}
.loading-stages li.done .dot { background: var(--gold-dark); }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}
.loading-box__hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--space-3);
}

/* ====== RESULT CARD ====== */
.result-card {
  background: var(--bg-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-top: var(--space-6);
  box-shadow: 0 0 30px rgba(214,178,92,.12);
  animation: resultIn .5s var(--ease);
}
@keyframes resultIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.result-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5);
}
.result-card__head-left { display: flex; align-items: center; gap: var(--space-3); }
.result-card__badge {
  padding: var(--space-1) var(--space-3);
  background: var(--gold-glow);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.result-card__head h3 { font-size: 16px; font-weight: 700; }

.track-result {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-4);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.track-result__cover {
  width: 160px; height: 160px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.track-result__cover img { width: 100%; height: 100%; object-fit: cover; }
.track-result__cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.track-result__cover--placeholder svg {
  width: 48px; height: 48px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.2;
}
.track-result__info { min-width: 0; }
.track-result__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-result__artist {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}
.track-result__audio { width: 100%; margin-top: var(--space-3); }
.track-result__audio audio { width: 100%; height: 36px; }
.track-result__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.track-result__actions .btn {
  white-space: nowrap;
  font-size: 13px;
  padding: var(--space-2) var(--space-4);
}

@media (max-width: 900px) {
  .track-result { grid-template-columns: 1fr; }
  .track-result__cover { width: 100%; height: auto; aspect-ratio: 1; max-width: 280px; margin: 0 auto; }
  .track-result__actions { flex-direction: row; flex-wrap: wrap; }
  .track-result__actions .btn { flex: 1; }
}
