/* ─────────────────────────────────────────────────────────────────────────
   styles.css — Custom animations & components for Vocal Splitter
   Complements Tailwind CDN; only things Tailwind can't handle inline.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Alpine cloak (prevent FOUC) ─────────────────────────────────────── */
[x-cloak] {
  display: none !important;
}

/* ── Card base ───────────────────────────────────────────────────────── */
.card {
  background: #12121a;
  border: 1px solid #1e1e2e;
  border-radius: 1.25rem; /* 20px */
}

/* ── Waveform SVG sizing ─────────────────────────────────────────────── */
.waveform-svg {
  width: 220px;
  height: 60px;
}

/* ── Drop-zone pulsing border when dragging ──────────────────────────── */
@keyframes borderPulse {
  0%, 100% { border-color: rgba(124, 58, 237, 0.5); }
  50%       { border-color: rgba(167, 139, 250, 0.9); }
}

.drop-zone-active {
  animation: borderPulse 1.2s ease-in-out infinite;
}

/* ── Spinner ─────────────────────────────────────────────────────────── */
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(124, 58, 237, 0.15);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

/* ── Progress track + bar ────────────────────────────────────────────── */
.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
  transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  min-width: 0;
}

/* Animated shimmer on the progress bar */
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 100%
  );
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: inherit;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* ── Download button press feedback ─────────────────────────────────── */
.download-btn:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* ── Subtle card hover lift ──────────────────────────────────────────── */
.card {
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.08),
              0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ── Ad zones ────────────────────────────────────────────────────────── */
.ad-zone {
  position: relative;
  overflow: hidden;
}

.ad-label {
  display: block;
  font-size: 0.625rem;
  color: rgba(148, 163, 184, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
  text-align: center;
}

.ad-placeholder {
  background: rgba(255, 255, 255, 0.018);
  border: 1px dashed rgba(255, 255, 255, 0.07);
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.18);
  font-size: 0.7rem;
  font-family: monospace;
  letter-spacing: 0.05em;
}

.ad-zone--leaderboard .ad-placeholder {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 0 auto;
}

.ad-zone--rectangle .ad-placeholder {
  width: 300px;
  height: 250px;
  margin: 0 auto;
}

/* ── Download countdown ──────────────────────────────────────────────── */
@keyframes countdownPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.countdown-value {
  animation: countdownPulse 1s ease-in-out infinite;
}

.download-btn-locked {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}
