/* ═══════════════════════════════════════════════════════════ */
/* Feed / Discover — Spotify/Apple Music inspired              */
/* ═══════════════════════════════════════════════════════════ */

.feed-page { padding-bottom: 100px; }

/* Header */
.feed-header {
  position: relative;
  padding: 100px 24px 40px;
  overflow: hidden;
}
.feed-header-bg {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, rgba(232,168,73,.12) 0%, rgba(99,102,241,.06) 50%, transparent 100%);
  pointer-events: none;
}
.feed-header-content {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
}
.feed-header h1 {
  font-size: 2.2rem; font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.feed-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Feed Body */
.feed-body {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
}

.feed-loading {
  display: flex; justify-content: center; padding: 60px 0;
}

/* Hero Track */
.feed-hero-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
  margin-bottom: 40px;
  animation: feedSlideUp .5s var(--ease) both;
}
.feed-hero-track:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.fht-art {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-inset);
}
.fht-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.feed-hero-track:hover .fht-art img {
  transform: scale(1.03);
}
.fht-art-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
}
.fht-art-ph svg { width: 48px; height: 48px; }

.fht-play {
  position: absolute;
  bottom: 16px; right: 16px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(232,168,73,.35);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s, scale .15s;
}
.fht-play svg { width: 22px; height: 22px; }
.feed-hero-track:hover .fht-play {
  opacity: 1; transform: translateY(0);
}
.fht-play:hover { scale: 1.08; }
.fht-play:active { scale: 0.95; }

.fht-info {
  display: flex; flex-direction: column; justify-content: center;
  padding: 8px 0;
}
.fht-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.fht-badge svg { width: 14px; height: 14px; }
.fht-title {
  font-size: 1.6rem; font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fht-artist {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-bottom: 14px;
}
.fht-meta {
  display: flex; gap: 6px;
  font-size: .8rem;
  color: var(--text-tertiary);
}

/* Feed Section */
.feed-section {
  margin-bottom: 40px;
  animation: feedSlideUp .5s .15s var(--ease) both;
}
.feed-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: 18px;
}
.feed-section-title svg { width: 18px; height: 18px; color: var(--accent); }

/* Track Grid */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

/* Track Card */
.track-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed);
  animation: feedCardIn .4s var(--ease) both;
}
.track-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.tc-art {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-inset);
  overflow: hidden;
}
.tc-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.track-card:hover .tc-art img { transform: scale(1.05); }
.tc-art-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
}
.tc-art-placeholder svg { width: 32px; height: 32px; }

.tc-play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .25s;
  cursor: pointer;
}
.tc-play-overlay svg { width: 36px; height: 36px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.track-card:hover .tc-play-overlay { opacity: 1; }

.tc-info { padding: 12px 14px 14px; }
.tc-title {
  font-size: .88rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.tc-artist {
  font-size: .78rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.tc-meta {
  display: flex; gap: 4px;
  font-size: .72rem;
  color: var(--text-tertiary);
}

/* Feed Empty */
.feed-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.feed-empty-icon { margin-bottom: 16px; }
.feed-empty-icon svg { width: 56px; height: 56px; color: var(--text-tertiary); }
.feed-empty h3 { font-size: 1.2rem; margin-bottom: 8px; }

/* ── Mini Player ── */
.mini-player {
  position: fixed; bottom: -80px; left: 0; right: 0;
  height: 72px; z-index: 999;
  background: rgba(18,18,18,.95);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-top: 1px solid var(--border);
  transition: bottom .35s var(--ease);
}
.mini-player.visible { bottom: 0; }
body.has-mini-player { padding-bottom: 72px; }

.mp-progress {
  position: absolute; top: -2px; left: 0; right: 0; height: 2px;
  background: var(--bg-inset);
}
.mp-progress-fill {
  height: 100%; width: 0;
  background: var(--accent);
  transition: width .3s linear;
}

.mp-content {
  display: flex; align-items: center; gap: 14px;
  height: 100%;
  padding: 0 16px;
  max-width: 1200px; margin: 0 auto;
}

.mp-art {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-inset);
}
.mp-art img { width: 100%; height: 100%; object-fit: cover; }
.mp-art-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
}
.mp-art-ph svg { width: 20px; height: 20px; }

.mp-info { flex: 1; min-width: 0; }
.mp-title {
  font-size: .85rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-artist {
  font-size: .75rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mp-controls { display: flex; align-items: center; gap: 4px; }
.mp-btn {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
  border-radius: 50%;
  transition: background .15s, scale .1s;
}
.mp-btn:hover { background: var(--bg-hover); }
.mp-btn:active { scale: 0.9; }
.mp-btn svg { width: 18px; height: 18px; }
.mp-btn-play { width: 40px; height: 40px; }
.mp-btn-play svg { width: 22px; height: 22px; }

.mp-close {
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  border-radius: 50%;
  transition: color .15s;
}
.mp-close:hover { color: var(--text-primary); }
.mp-close svg { width: 16px; height: 16px; }

/* Animations */
@keyframes feedSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes feedCardIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .feed-hero-track {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .fht-info { padding: 0 4px 4px; }
  .fht-title { font-size: 1.2rem; }
  .fht-play { opacity: 1; transform: translateY(0); }
  .feed-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  .feed-header { padding: 80px 16px 24px; }
  .feed-body { padding: 0 16px; }
}

@media (max-width: 480px) {
  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .mp-content { gap: 10px; padding: 0 12px; }
}
