:root {
  --focus-ring: rgba(59, 130, 246, 0.75);
  --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#mainContent,
#latestUploadsWrap,
#trending-today-wrap,
#top-downloads-wrap,
#officialTracksWrap,
#verifiedArtistsWrap {
  position: relative;
  z-index: 1;
}

.song-card,
.song-row,
.genre-btn,
.nav-btn,
#siteHeader,
#promotionBar,
#mobileNav,
#userDrop,
.modal-card,
.panel {
  box-shadow: var(--soft-shadow);
}

.site-final-polish-ready .nav-btn,
.site-final-polish-ready .genre-btn,
.site-final-polish-ready .song-card,
.site-final-polish-ready .song-row,
.site-final-polish-ready .hdr-icon-btn,
.site-final-polish-ready .ca-btn,
.site-final-polish-ready button {
  will-change: transform, box-shadow, background-color;
}

.site-final-polish-ready .song-card:hover,
.site-final-polish-ready .song-row:hover,
.site-final-polish-ready .nav-btn:hover,
.site-final-polish-ready .genre-btn:hover {
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.site-final-polish-ready .site-focus-strip a,
.site-final-polish-ready .genre-btn,
.site-final-polish-ready .nav-btn {
  border-radius: 999px;
}

.site-final-polish-ready #audioPlayer {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Consistent, restrained DJ Musta polish across the discovery experience. */
:root {
  --site-primary: #ff7a1a;
  --site-primary-strong: #f05b00;
  --focus-ring: rgba(255, 145, 64, 0.9);
}

body {
  line-height: 1.55;
  letter-spacing: 0.005em;
}

#promotionBar {
  background: #10151c !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: #aab4c2 !important;
}

#promotionBar a {
  border-radius: 999px !important;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

#promotionBar a:hover {
  transform: translateY(-1px);
  background: rgba(255, 107, 0, 0.14) !important;
}

#siteHeader {
  background: rgba(12, 16, 22, 0.94) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22) !important;
}

#siteHeader #hdrLogoText {
  letter-spacing: 0.015em !important;
}

#headerSearch {
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(255, 255, 255, 0.13) !important;
}

#headerSearch:focus-within {
  border-color: rgba(255, 145, 64, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.14) !important;
}

#headerSearch button,
#headerUploadBtn,
#premiumBtn {
  box-shadow: 0 5px 14px rgba(255, 107, 0, 0.18);
}

.hero-section {
  border-bottom-color: rgba(255, 107, 0, 0.2) !important;
  background: #0c1118;
}

.hero-section .hero-inner {
  max-width: 1280px !important;
  min-height: 230px;
  padding: 34px 24px !important;
}

.hero-section .hero-left {
  gap: 14px !important;
}

.hero-section .hero-name {
  letter-spacing: -0.035em !important;
  text-wrap: balance;
}

.hero-section .hero-sub {
  max-width: 640px;
  line-height: 1.6;
}

.hero-section .hero-actions > * {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.hero-section .hero-actions > *:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.hero-section .trust-stat {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(12, 16, 22, 0.58);
}

.hero-section .trust-stat strong {
  color: #fff;
}

.hero-section .trust-stat span {
  color: #aab4c2;
}

#discover-feed {
  width: min(1280px, calc(100% - 36px));
  margin-inline: auto;
}

#musicSections {
  width: 100%;
  max-width: 1280px !important;
  padding-inline: 18px !important;
}

#musicSections > div,
#trending-today-wrap,
#latestUploadsWrap,
#top-downloads-wrap,
#recentlyPlayedWrap,
#verifiedArtistsWrap,
#officialTracksWrap {
  margin-bottom: 30px !important;
}

.dm-shelf-title,
#trending-today-wrap > div:first-child > div:first-child {
  letter-spacing: -0.025em;
}

.dm-quickbar {
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

.dm-chip {
  min-height: 36px;
}

.dm-chip:focus-visible,
.dm-scroll-btn:focus-visible,
.dm-main-btn:focus-visible,
.dm-soft-btn:focus-visible,
.dm-genre:focus-visible {
  outline-color: #ff9a4d;
}

#moreMusicToggle {
  border-radius: 12px !important;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

#moreMusicToggle:hover {
  border-color: rgba(255, 145, 64, 0.45) !important;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  #discover-feed {
    width: calc(100% - 22px);
  }

  #musicSections {
    padding-inline: 0 !important;
  }

  .hero-section .hero-inner {
    min-height: 0;
    padding: 25px 14px !important;
  }

  .hero-section .hero-name {
    font-size: clamp(30px, 9vw, 42px) !important;
  }

  .hero-section .hero-sub {
    font-size: 12px !important;
    letter-spacing: 0 !important;
  }

  .hero-section .hero-actions {
    gap: 8px !important;
  }

  .hero-section .trust-strip {
    width: 100% !important;
    gap: 7px !important;
  }

  .hero-section .trust-stat {
    justify-content: center !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-section .hero-actions > *,
  #promotionBar a,
  #moreMusicToggle {
    transition: none !important;
  }
}

/* Keep the discovery UI legible and easy to use at every viewport size. */
#siteHeader {
  min-height: 60px;
  padding-inline: clamp(12px, 2.2vw, 28px) !important;
  gap: 12px !important;
}

#headerSearch {
  min-width: 180px;
  max-width: 680px;
  height: 42px !important;
}

#headerRight {
  gap: 8px !important;
}

#headerRight > button,
#authButtons button,
#headerUploadBtn,
#premiumBtn {
  min-height: 40px;
}

#musicSections {
  margin-top: 24px !important;
}

#latestUploadsWrap,
#trending-today-wrap,
#top-downloads-wrap,
#recentlyPlayedWrap,
#verifiedArtistsWrap,
#officialTracksWrap {
  padding: 2px 0;
}

.dm-shelf-title,
#trending-today-wrap > div:first-child > div:first-child {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.3;
}

.song-card .song-title {
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.song-card .artist-name {
  font-size: 12px !important;
  line-height: 1.4 !important;
}

.song-card .ca-btn {
  min-width: 36px !important;
  min-height: 36px !important;
}

@media (max-width: 767px) {
  #siteHeader {
    min-height: 58px !important;
    gap: 8px !important;
    padding-inline: 10px !important;
  }

  #headerSearch {
    min-width: 0;
    height: 40px !important;
  }

  #musicSections {
    margin-top: 14px !important;
  }

  #discover-feed {
    width: calc(100% - 24px);
  }

  .dm-quickbar {
    padding-block: 8px !important;
  }

  .dm-chip {
    min-height: 38px !important;
    padding-inline: 13px !important;
    font-size: 11px !important;
  }

  #songsGrid.music-grid > .song-card,
  #recentlyPlayedGrid > .song-card,
  #sponsoredGrid > .song-card,
  #verifiedArtistsGrid > .song-card,
  #officialTracksGrid > .song-card,
  #kadongo-grid > .song-card,
  #trending-today-grid > .song-card,
  #latest-uploads-grid > .song-card,
  #top-downloads-grid > .song-card,
  #relatedSongsGrid > .song-card {
    flex-basis: min(44vw, 210px) !important;
    width: min(44vw, 210px) !important;
  }

  .song-card .song-title {
    font-size: 13px !important;
  }

  .song-card .artist-name {
    font-size: 11px !important;
  }

  .song-card .ca-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 380px) {
  #hdrLogoText {
    display: none !important;
  }

  #headerSearch {
    padding-left: 10px !important;
  }
}
