/* ============ components.css — نوار‌بار، تگ، دراپ‌داون، کارت، بَج، ستاره ============ */

/* ---------- نوار‌بار (جست‌وجو + فیلتر) ---------- */
.navbar {
  position: sticky;
  top: 16px;
  z-index: var(--z-navbar);
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.navbar__top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* جست‌وجو با افکت شاین */
.search {
  position: relative;
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search:hover, .search:focus-within {
  border-color: rgba(255, 70, 70, 0.6);
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.25);
}
.search i { font-size: 17px; color: var(--muted-foreground, #d6d3d1); flex-shrink: 0; }
.search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--foreground, #f5f5f4);
  font-family: inherit;
  font-size: 0.95rem;
}
.search input::placeholder { color: var(--muted-foreground, #a8a29e); }
/* نوار نوری که هنگام هاور عبور می‌کند */
.search::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.18), rgba(255, 90, 90, 0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}
.search:hover::after { left: 130%; }

/* دراپ‌داون مرتب‌سازی */
.sort {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort__select {
  appearance: none;
  padding: 11px 38px 11px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  color: var(--foreground, #f5f5f4);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.sort__select:hover { border-color: rgba(255, 70, 70, 0.6); }
.sort__select option { background: #292524; color: #f5f5f4; }
.sort__icon {
  position: absolute;
  left: 12px;
  pointer-events: none;
  font-size: 13px;
  color: var(--muted-foreground, #d6d3d1);
}

/* تگ‌ها (چیپ) */
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted-foreground, #d6d3d1);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tag:hover {
  color: #fff;
  border-color: rgba(255, 70, 70, 0.6);
  background: rgba(185, 28, 28, 0.18);
}
.tag.is-active {
  color: #fff;
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(185, 28, 28, 0.4);
}

/* ---------- کارت سرود ---------- */
.card {
  position: relative;
  border-radius: 18px;
  padding: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(calc(var(--glass-blur) - 4px)) saturate(130%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) - 4px)) saturate(130%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transform-style: preserve-3d;
  transition: transform 0.18s ease, box-shadow 0.25s ease;
  cursor: default;
}
.card:hover { box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); }

.card__media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  transform: translateZ(30px);
}
.card__cover {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card__cover { transform: scale(1.06); }

/* بَج‌ها */
.badges { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1a1208;
  backdrop-filter: blur(4px);
}
.badge i { font-size: 11px; }
.badge--gold { background: linear-gradient(135deg, #fde68a, var(--badge-gold)); box-shadow: 0 0 14px var(--badge-gold-glow); }
.badge--new { background: linear-gradient(135deg, #f87171, var(--badge-new)); color: #fff; box-shadow: 0 0 14px var(--badge-new-glow); }

/* دکمه پلی روی کاور */
.card__play {
  position: absolute;
  left: 12px; bottom: 12px;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 6px 18px rgba(185, 28, 28, 0.5);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.card__play i { font-size: 17px; color: #fff; margin-right: 2px; }
.card:hover .card__play { opacity: 1; transform: translateY(0); }
.card__play:hover { box-shadow: var(--neon-glow), 0 6px 18px rgba(185, 28, 28, 0.5); }

/* بدنه کارت */
.card__body { padding: 12px 6px 6px; transform: translateZ(20px); }
.card__title {
  font-size: 0.98rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__artist {
  margin-top: 3px;
  font-size: 0.8rem;
  color: var(--muted-foreground, #d6d3d1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.card__meta {
  margin-top: 10px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ۵ ستاره */
.stars { display: inline-flex; gap: 2px; align-items: center; }
.stars i { font-size: 13px; }
.stars .star--on { color: var(--badge-gold); filter: drop-shadow(0 0 4px var(--badge-gold-glow)); }
.stars .star--off { color: rgba(245, 245, 244, 0.22); }

/* دکمه علاقه‌مندی */
.fav {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.fav i { font-size: 15px; color: var(--muted-foreground, #d6d3d1); transition: color 0.2s ease; }
.fav:hover { box-shadow: var(--neon-glow); }
.fav.is-active i { color: var(--neon-red); }

/* دکمه عمومی */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px;
  border-radius: 99px;
  font-weight: 600; font-size: 0.92rem;
  color: #fff;
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  border: 1px solid rgba(255, 90, 90, 0.4);
  box-shadow: 0 8px 22px rgba(185, 28, 28, 0.35);
  transition: box-shadow 0.25s ease, transform 0.15s ease;
}
.btn:hover { box-shadow: var(--neon-glow), 0 8px 22px rgba(185, 28, 28, 0.35); }
.btn:active { transform: translateY(1px); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 0;
  color: var(--muted-foreground, #a8a29e);
}
