/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  max-width: 420px;
  width: 100%;
  padding: 24px;
  border-radius: var(--radius-xl);
}

/* Track tile */
.track-tile {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--surface);
  border: 1px solid var(--border);
}
.track-tile:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.track-tile.active {
  background: rgba(var(--accent-start-rgb), 0.12);
  border-color: rgba(var(--accent-start-rgb), 0.4);
  box-shadow: 0 0 24px rgba(var(--accent-start-rgb), 0.15);
}
.track-tile .artwork {
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}
.track-tile .artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.track-tile:hover .artwork img {
  transform: scale(1.05);
}
.track-tile .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.track-tile:hover .play-overlay,
.track-tile.active .play-overlay {
  opacity: 1;
}
.track-tile .play-overlay .play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}
.track-tile .info {
  padding: 12px;
}
.track-tile .info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.track-tile .info p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.track-tile .delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 2;
}
.track-tile:hover .delete-btn {
  opacity: 1;
}
.track-tile .delete-btn:hover {
  background: #ef4444;
  color: white;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  opacity: 0.25;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 14px;
  max-width: 280px;
  margin: 0 auto;
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Search bar */
.search-bar {
  position: relative;
}
.search-bar i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}
.search-bar input {
  padding-left: 38px;
  padding-right: 14px;
  height: 40px;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-dot.playing {
  background: var(--status-playing);
  box-shadow: 0 0 8px var(--status-playing);
  animation: pulse 2s infinite;
}
.status-dot.paused {
  background: var(--status-paused);
}
.status-dot.loading {
  background: var(--status-loading);
  animation: pulse 1.2s infinite;
}
.status-dot.error {
  background: var(--status-error);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Artwork */
.artwork-rounded {
  border-radius: var(--radius-md);
  overflow: hidden;
}
.artwork-shadow {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
