/* ---- HOME MUSIC COVER GRID ---- */
.home-cover-grid-wrap {
  position: absolute;
  inset: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  background: linear-gradient(160deg, #071a12 0%, #0d2b20 60%, #0a1f18 100%);
  padding-bottom: calc(var(--nav-h-locked, var(--nav-h, 65px)) + 1.5rem);
  overscroll-behavior-y: contain;
}
.home-cover-grid-wrap::-webkit-scrollbar { display: none; }

/* Vertical scroll progress indicator */
.home-scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 3px;
  background: rgba(255,255,255,0.07);
  z-index: 20;
  border-radius: 0 0 3px 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.home-scroll-progress-bar {
  width: 100%;
  background: linear-gradient(180deg, #FFE0A3 0%, #1DB954 100%);
  border-radius: 3px;
  transition: height 0.1s linear;
  min-height: 0;
}
.home-cover-grid-wrap.at-top .home-scroll-progress { opacity: 0; }

.home-cover-grid-header {
  position: sticky;
  top: 0;
  z-index: 25;
  padding: 1.9rem 1.1rem 0.7rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  /* solid background so covers scroll UNDER the search bar */
  background: #071a12;
}
/* soft fade so covers dissolve as they go under the search bar */
.home-cover-grid-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 18px;
  background: linear-gradient(180deg, #071a12 0%, rgba(7,26,18,0) 100%);
  pointer-events: none;
}
.home-cover-grid-header-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.home-cover-grid-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.home-cover-grid-title span {
  color: #FFE0A3;
}
.home-cover-grid-sub {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.35);
  margin-top: 0.15rem;
}
.home-cover-grid-count {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
}

/* ---- Home page music search bar ---- */
.home-music-searchbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,224,163,0.22);
  border-radius: 2rem;
  padding: 0 1rem;
  height: 44px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 0;
}
.home-music-searchbar:active {
  background: rgba(255,224,163,0.1);
  border-color: rgba(255,224,163,0.5);
}
.home-music-searchbar-icon {
  color: #FFE0A3;
  font-size: 0.82rem;
  flex-shrink: 0;
  opacity: 0.85;
}
.home-music-searchbar-text {
  flex: 1;
  min-width: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255,255,255,0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-music-searchbar-kbd {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.home-music-searchbar-tag {
  background: rgba(255,224,163,0.12);
  border: 1px solid rgba(255,224,163,0.2);
  border-radius: 0.35rem;
  padding: 0.18rem 0.45rem;
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255,224,163,0.6);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

/* Featured / Hero card — largest, full width strip */
.home-cover-featured {
  margin: 0 1.1rem 1rem 1.1rem;
  border-radius: 1.2rem;
  overflow: hidden;
  position: relative;
  height: 280px;
  background: linear-gradient(135deg, #1B5E4F, #0F3D34);
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.home-cover-featured img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.home-cover-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
}
.home-cover-featured-badge {
  position: absolute;
  top: 0.7rem; left: 0.8rem;
  background: #FFE0A3;
  color: #0a1923;
  font-size: 0.5rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.home-cover-featured-info {
  position: absolute;
  bottom: 0.8rem; left: 0.9rem; right: 0.9rem;
}
.home-cover-featured-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-cover-featured-artist {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}
.home-cover-featured-artist > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 0;
}
.home-cover-featured-artist .home-recent-card-verified {
  flex-shrink: 0;
}
.home-cover-featured:active { transform: scale(0.985); transition: transform 0.12s; }

/* Section heading */
.home-cover-section-label {
  padding: 1.3rem 1.1rem 0.55rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Grid of artist cards — horizontal scrolling row */
.home-cover-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding: 0 1.1rem 1.2rem 1.1rem;
  overflow-x: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 1.1rem;
}
.home-cover-grid::-webkit-scrollbar { display: none; }

/* Horizontal scroll fade-out edges */
.home-cover-grid-row-wrap {
  position: relative;
}
.home-cover-grid-row-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 1.2rem;
  width: 2.5rem;
  background: linear-gradient(to right, transparent, rgba(7,26,18,0.85));
  pointer-events: none;
  z-index: 2;
  border-radius: 0 1rem 1rem 0;
}

/* Recently Added — vertical infinite-scroll list */
.home-recent-section {
  margin-top: 0.5rem;
  padding-bottom: 1rem;
}
.home-recent-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.2rem 1.1rem 0.4rem 1.1rem;
  width: 100%;
  box-sizing: border-box;
}
.home-recent-card {
  width: 100%;
  min-width: 0;
  border-radius: 0.85rem;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: transform 0.14s, background 0.14s;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  box-sizing: border-box;
}
.home-recent-card:active { transform: scale(0.98); background: rgba(255,255,255,0.09); }
.home-recent-card-art {
  width: 48px; height: 48px;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, #1B5E4F 0%, #0F3D34 100%);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.home-recent-card-art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity 0.2s ease;
}
.home-recent-card-art img.loaded { opacity: 1; }
.home-recent-card-art i { font-size: 1.1rem; color: rgba(255,224,163,0.55); }
.home-recent-card-info { flex: 1; min-width: 0; overflow: hidden; }
.home-recent-card-title {
  font-size: 0.75rem; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.home-recent-card-artist {
  font-size: 0.62rem; color: rgba(255,255,255,0.45); margin-top: 0.18rem;
  display: flex; align-items: center; gap: 0.2rem;
  min-width: 0;
}
.home-recent-card-artist > span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
  flex: 1 1 0;
}
.home-recent-card-artist .home-recent-card-verified,
.home-recent-card-artist .tsc-paid-tick {
  flex-shrink: 0;
}
.home-recent-card-verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 0.85rem; height: 0.85rem; flex-shrink: 0;
  background: linear-gradient(135deg, #00c94a 0%, #008f30 100%);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.35), 0 1px 4px rgba(0,201,74,0.5);
}
.home-recent-card-verified i { font-size: 0.38rem; color: #fff; line-height: 1; }
.home-recent-card-time {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.55rem; font-weight: 500;
  color: rgba(255,224,163,0.55);
  margin-top: 0.22rem;
  white-space: nowrap;
}
.home-recent-card-time i { font-size: 0.5rem; }
.home-recent-card-play {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,224,163,0.13);
  border: none; color: #FFE0A3;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; cursor: pointer; flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.home-recent-card-play:active { background: rgba(255,224,163,0.28); transform: scale(0.9); }
/* Sentinel element for IntersectionObserver infinite scroll */
.home-recent-sentinel {
  width: 100%; height: 2px; margin-top: 0.3rem;
}
/* Loading spinner shown while more cards are being appended */
.home-recent-loading {
  display: flex; justify-content: center; align-items: center;
  padding: 0.8rem 0; gap: 0.4rem;
  color: rgba(255,255,255,0.3); font-size: 0.62rem;
}
.home-recent-loading i { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Scroll hint arrow for horizontal rows */
.home-row-scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0 1.1rem 0.5rem 1.1rem;
  opacity: 0.35;
  font-size: 0.58rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  pointer-events: none;
}
.home-row-scroll-hint i { font-size: 0.7rem; animation: hintSlide 1.6s ease-in-out infinite; }
@keyframes hintSlide {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(5px); opacity: 1; }
}
.home-cover-card {
  flex: 0 0 42vw;
  max-width: 180px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: transform 0.14s, background 0.14s;
  position: relative;
}
.home-cover-card:active {
  transform: scale(0.95);
  background: rgba(255,255,255,0.09);
}
.home-cover-card-art {
  width: 100%;
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #1B5E4F 0%, #0F3D34 100%);
  position: relative;
  overflow: hidden;
}
.home-cover-card-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.home-cover-card-art img.loaded {
  opacity: 1;
}
/* Shimmer placeholder while cover loads */
@keyframes hcca-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.home-cover-card-art.loading {
  background: linear-gradient(90deg, #1B5E4F 25%, #234d42 50%, #1B5E4F 75%);
  background-size: 200% 100%;
  animation: hcca-shimmer 1.4s infinite;
}
.home-cover-card-art .hcca-icon {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: rgba(255,224,163,0.55);
}
.home-cover-card-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%; height: 100%;
}
.home-cover-card-mosaic img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.home-cover-card-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}
.home-cover-card-track-count {
  position: absolute;
  top: 0.45rem; right: 0.5rem;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.85);
  font-size: 0.5rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 1rem;
}
.home-cover-card-info {
  padding: 0.55rem 0.65rem 0.6rem 0.65rem;
}
.home-cover-card-artist {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-cover-card-username {
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 224, 163, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
  letter-spacing: 0.1px;
}
.home-cover-card-meta {
  font-size: 0.57rem;
  color: rgba(255,255,255,0.4);
  margin-top: 0.15rem;
}

/* Empty state for home cover grid */
.home-cover-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem 4rem 2rem;
  text-align: center;
}
.home-cover-empty-icon {
  font-size: 3rem;
  color: rgba(255,224,163,0.25);
  margin-bottom: 1rem;
}
.home-cover-empty-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.35rem;
}
.home-cover-empty-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.2);
  line-height: 1.55;
}

/* ---- Improved empty state ---- */
.home-cover-empty-icon-wrap {
  position: relative;
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.2rem auto;
}
.home-cover-empty-pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(0,179,65,0.12);
  animation: hce-pulse 2.2s ease-in-out infinite;
}
@keyframes hce-pulse {
  0%,100% { transform: scale(1);   opacity: 0.7; }
  50%      { transform: scale(1.18); opacity: 0.3; }
}
.home-cover-empty-icon-i {
  font-size: 2.2rem;
  color: rgba(0,229,90,0.5);
  position: relative; z-index: 1;
}
.home-cover-empty-cta {
  margin-top: 1.4rem;
  background: linear-gradient(135deg,#00b341,#007a2c);
  color: #fff;
  border: none;
  border-radius: 2rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(0,179,65,0.35);
}

/* ---- Home skeleton shimmer ---- */
@keyframes hcs-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.hcs-featured-skel {
  width: 100%; height: 280px;
  border-radius: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg,#1a3a2a 25%,#224a36 50%,#1a3a2a 75%);
  background-size: 800px 100%;
  animation: hcs-shimmer 1.4s infinite linear;
}
.hcs-row {
  display: flex; gap: 0.6rem;
}
.hcs-card-skel {
  flex: 1; height: 110px;
  border-radius: 0.75rem;
  background: linear-gradient(90deg,#1a3a2a 25%,#224a36 50%,#1a3a2a 75%);
  background-size: 800px 100%;
  animation: hcs-shimmer 1.4s infinite linear;
}


/* ===== Artists as a 2-column grid (large cover removed) ===== */
#homeCoverFeatured { display: none !important; }
.hcs-featured-skel { display: none !important; }
.home-row-scroll-hint { display: none !important; }
.home-cover-grid-row-wrap::after { display: none !important; }
.home-cover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  overflow: visible;
  scroll-snap-type: none;
  padding: 0 1.1rem 1.2rem 1.1rem;
}
.home-cover-grid .home-cover-card {
  flex: none;
  max-width: none;
  width: 100%;
  scroll-snap-align: none;
}

/* Home title is now plain white "Rupianii" */
.home-cover-grid-title { color: #fff !important; }
