/* artists.css - Trang Danh Sách Ca Sĩ - Cobalt Prime Design */

/* ============================================================
   PAGE HERO BANNER
   ============================================================ */

.artists-hero {
  background: linear-gradient(135deg, #0b0f19 0%, #0f172a 50%, #1a0a1e 100%);
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

.artists-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(255, 70, 100, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 60%, rgba(22, 136, 212, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.artists-hero-inner {
  position: relative;
  z-index: 1;
}

.artists-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 70, 100, 0.12);
  border: 1px solid rgba(255, 70, 100, 0.3);
  color: #ff8099;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.artists-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.artists-hero-title span {
  background: linear-gradient(135deg, var(--primary), #ff8aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.artists-hero-subtitle {
  color: rgba(255, 255, 255, 0.55);
  font-size: 1rem;
  max-width: 500px;
}

/* Stats row */
.artists-hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.artists-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.artists-hero-stat-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.artists-hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   FILTER & SEARCH BAR
   ============================================================ */

.artists-filter-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  position: sticky;
  top: 60px;
  /* below fixed header */
  z-index: 90;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.artists-filter-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Search input */
.artists-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.artists-search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

#artists-search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  color: var(--text-heading);
  background: var(--bg-main);
  transition: var(--transition-fast);
  outline: none;
  font-family: var(--font-sans);
}

#artists-search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 70, 100, 0.08);
}

#artists-search-input::placeholder {
  color: var(--text-muted);
}

/* Role filter tabs */
.artists-role-tabs {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.artists-role-tab {
  padding: 8px 16px;
  height: 44px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.artists-role-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 70, 100, 0.04);
}

.artists-role-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 70, 100, 0.25);
}

/* Sort select */
.artists-sort-select {
  height: 44px;
  padding: 0 36px 0 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  color: var(--text-heading);
  background: var(--bg-main);
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
  font-family: var(--font-sans);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2364748b' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  flex-shrink: 0;
}

.artists-sort-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 70, 100, 0.08);
}

/* ============================================================
   ALPHABET FILTER
   ============================================================ */

.alphabet-filter-section {
  padding: 16px 0;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
}

.alphabet-filter-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.alpha-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 8px;
  flex-shrink: 0;
}

.alpha-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #ffffff;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
}

.alpha-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 70, 100, 0.04);
}

.alpha-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 70, 100, 0.3);
}

.alpha-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.alpha-btn-all {
  padding: 0 12px;
  width: auto;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.artists-content-section {
  padding: 36px 0 60px;
  background: var(--bg-main);
  min-height: 60vh;
}

/* Results meta bar */
.artists-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
  flex-wrap: wrap;
}

.artists-results-text {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.artists-results-text strong {
  color: var(--text-heading);
  font-weight: 700;
}

.artists-view-toggle {
  display: flex;
  gap: 4px;
}

.view-toggle-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xs);
  background: #ffffff;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.view-toggle-btn.active,
.view-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 70, 100, 0.05);
}

/* ============================================================
   ARTIST GRID CARDS
   ============================================================ */

#artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

#artists-grid.list-view {
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Card */
.artist-page-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease,
    border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.artist-page-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  border-color: rgba(255, 70, 100, 0.25);
}

/* Avatar area */
.artist-page-avatar-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.artist-page-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.artist-page-card:hover .artist-page-avatar-wrap img {
  transform: scale(1.06);
}

/* Overlay on hover */
.artist-page-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.7) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.artist-page-card:hover .artist-page-overlay {
  opacity: 1;
}

.artist-page-overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 50px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.artist-page-overlay-btn:hover {
  background: var(--primary-dark);
}

/* Role badge on avatar */
.artist-page-role-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.artist-page-role-badge.singer {
  background: rgba(255, 70, 100, 0.85);
  color: #ffffff;
}

.artist-page-role-badge.rapper {
  background: rgba(30, 30, 50, 0.85);
  color: #ffffff;
}

.artist-page-role-badge.producer {
  background: rgba(22, 136, 212, 0.85);
  color: #ffffff;
}

.artist-page-role-badge.group {
  background: rgba(139, 92, 246, 0.85);
  color: #ffffff;
}

/* Card info area */
.artist-page-info {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.artist-page-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.artist-page-genre {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.artist-page-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.artist-page-count i {
  font-size: 0.85rem;
}

.artist-page-plays {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ============================================================
   LIST VIEW MODE
   ============================================================ */

#artists-grid.list-view .artist-page-card {
  flex-direction: row;
  align-items: center;
  border-radius: var(--radius-sm);
}

#artists-grid.list-view .artist-page-avatar-wrap {
  width: 72px;
  height: 72px;
  aspect-ratio: unset;
  flex-shrink: 0;
  border-radius: 0;
}

#artists-grid.list-view .artist-page-overlay {
  display: none;
}

#artists-grid.list-view .artist-page-role-badge {
  position: static;
  display: inline-block;
  margin-top: 2px;
}

#artists-grid.list-view .artist-page-info {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

#artists-grid.list-view .artist-page-name {
  font-size: 0.9rem;
  min-width: 160px;
}

#artists-grid.list-view .artist-page-genre {
  flex: 1;
  min-width: 100px;
}

#artists-grid.list-view .artist-page-footer {
  margin-top: 0;
  flex-shrink: 0;
  gap: 16px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.artists-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
  grid-column: 1 / -1;
}

.artists-empty-state i {
  font-size: 4rem;
  opacity: 0.2;
}

.artists-empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-heading);
  margin: 0;
}

.artists-empty-state p {
  font-size: 0.9rem;
  margin: 0;
  max-width: 340px;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.artists-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

#artists-grid.loading {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.page-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xs);
  background: #ffffff;
  color: var(--text-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  font-family: var(--font-display);
  text-decoration: none;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 70, 100, 0.04);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 70, 100, 0.3);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-btn.page-ellipsis {
  border-color: transparent;
  background: transparent;
  cursor: default;
  color: var(--text-muted);
}

.pagination-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 8px;
  white-space: nowrap;
}

/* ============================================================
   FEATURED / SPOTLIGHTED ARTISTS ROW
   ============================================================ */

.featured-artists-strip {
  padding: 28px 0;
  background: linear-gradient(135deg, #0b0f19, #1a1033);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: none;
  /* shown only when filter = "all" */
}

.featured-artists-strip.visible {
  display: block;
}

.featured-strip-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.featured-artists-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.featured-artists-row::-webkit-scrollbar {
  display: none;
}

.featured-artist-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.featured-artist-pill:hover {
  background: rgba(255, 70, 100, 0.1);
  border-color: rgba(255, 70, 100, 0.3);
}

.featured-artist-pill img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.featured-artist-pill-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.featured-artist-pill-count {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991.98px) {
  .artists-hero {
    padding: 80px 0 44px;
  }

  .artists-hero-stats {
    gap: 20px;
  }

  #artists-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 767.98px) {
  .artists-filter-inner {
    gap: 10px;
  }

  .artists-role-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .artists-role-tab {
    flex-shrink: 0;
  }

  .artists-sort-select {
    width: 100%;
  }

  #artists-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  #artists-grid.list-view .artist-page-avatar-wrap {
    width: 60px;
    height: 60px;
  }

  #artists-grid.list-view .artist-page-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  #artists-grid.list-view .artist-page-footer {
    margin-top: 4px;
    width: 100%;
  }

  .alpha-btn {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  #artists-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .artists-pagination {
    gap: 4px;
  }

  .page-btn {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
}
