/* MelodinAI artist platform — discover, search, public pages, player */

body.logged-out .user-menu-wrap,
body.logged-out #btnUpgrade,
body.logged-out .sidebar-credits,
body.logged-out .sidebar-storage,
body.logged-out #btnNotifications,
body.logged-out .mobile-header-credits,
body.logged-out #btnMobileNotifications,
body.logged-out .nav-item--auth,
body.logged-out .sidebar-bg-job {
  display: none !important;
}

body:not(.logged-out) .sidebar-guest-auth,
body:not(.logged-out) .mobile-guest-auth {
  display: none !important;
}

.nav-item--legacy {
  display: none !important;
}

.btn-create-mini,
.sidebar-footer .btn-create-mini {
  display: none !important;
}

.sidebar-logo {
  cursor: pointer;
}

.sidebar-guest-auth {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.35rem 0.35rem 0.85rem;
}

.btn-guest-signin,
.btn-guest-join {
  width: 100%;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-guest-signin {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-guest-join {
  background: linear-gradient(90deg, #ff4b8b, #ff9f5a);
  color: #12080c;
  border: none;
}

.mobile-guest-auth {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.mobile-guest-auth .btn-guest-signin,
.mobile-guest-auth .btn-guest-join {
  width: auto;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.artist-view {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 6.5rem;
}

.discover-hero {
  margin: 0 0 2rem;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1.15fr);
  gap: 1.5rem;
  align-items: stretch;
  margin: 0 0 2.4rem;
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.home-hero-copy h1 {
  margin: 0 0 0.75rem;
  font-family: Syne, Inter, sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.btn-home-ghost {
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  font-weight: 650;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

body.logged-out .home-cta-user,
body:not(.logged-out) .home-cta-guest {
  display: none !important;
}

.home-featured-slot,
.home-featured {
  min-height: 280px;
  border-radius: 18px;
  overflow: hidden;
}

.home-featured {
  position: relative;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  background: linear-gradient(135deg, #2a1220, #12141c);
}

.home-featured-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.home-featured-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 0.9rem;
  width: 100%;
  padding: 1.15rem 1.2rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.home-featured-photo {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
}

.home-featured-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-featured h2 {
  margin: 0 0 0.2rem;
  font-size: 1.45rem;
  font-weight: 800;
}

.home-featured-meta {
  margin: 0;
  color: var(--muted, #c4c4d4);
  font-size: 0.88rem;
}

.home-featured-play {
  margin-left: auto;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #12080c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-featured--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);
  cursor: default;
}

.home-featured--empty p {
  margin: 0;
  color: var(--muted, #c4c4d4);
}

.home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
}

.home-section-head h2 {
  margin: 0;
}

.home-see-all {
  border: 0;
  background: none;
  color: #ff9f5a;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
  font-size: 0.88rem;
}

.home-track-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.home-track {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.55rem;
  color: inherit;
  cursor: pointer;
}

.home-track:hover {
  background: rgba(255, 255, 255, 0.07);
}

.home-track-cover {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-track-ph {
  font-weight: 800;
}

.home-track-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.home-track-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-track-artist {
  font-size: 0.8rem;
  color: var(--muted, #a0a0b4);
}

.home-role-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.home-role-tile {
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.home-role-tile:hover {
  border-color: rgba(255, 75, 139, 0.45);
  background: rgba(255, 75, 139, 0.08);
}

.home-role-tile-name {
  display: block;
  font-weight: 750;
  font-size: 1rem;
}

.home-role-tile-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted, #a0a0b4);
}

.search-page-lead {
  margin: 0 0 1rem;
  color: var(--muted, #c4c4d4);
}

@media (max-width: 800px) {
  .home-hero {
    grid-template-columns: 1fr;
  }
}

.discover-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff9f5a;
}

.discover-hero h1,
.search-page h1,
.upload-page h1 {
  margin: 0 0 0.75rem;
  font-family: Syne, Inter, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.discover-lead,
.upload-lead {
  margin: 0 0 1.1rem;
  color: var(--muted, #c4c4d4);
  max-width: 36rem;
  line-height: 1.5;
}

.discover-search,
.search-page-form {
  display: flex;
  gap: 0.6rem;
  max-width: 40rem;
}

.discover-search input,
.search-page-form input,
.upload-field input,
.upload-field textarea {
  flex: 1;
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.75rem 1.1rem;
  font-size: 1rem;
}

.upload-field textarea {
  border-radius: 1rem;
  min-height: 5rem;
  resize: vertical;
}

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
}

.role-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.role-chip.is-on,
.role-chip:hover {
  border-color: #ff4b8b;
  background: rgba(255, 75, 139, 0.12);
}

.artist-section {
  margin: 0 0 2.25rem;
}

.artist-section h2 {
  margin: 0 0 0.9rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.artist-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 1rem;
}

.artist-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0.65rem;
  border-radius: 12px;
}

.artist-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.artist-card-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #ff4b8b, #5b4bff);
  display: grid;
  place-items: center;
  font-family: Syne, Inter, sans-serif;
  font-weight: 800;
  font-size: 2rem;
  overflow: hidden;
}

.artist-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-card-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.artist-card-meta {
  color: var(--muted, #a0a0b4);
  font-size: 0.78rem;
}

.artist-empty {
  color: var(--muted, #a0a0b4);
  padding: 1.5rem 0;
}

.public-artist-actions {
  margin-top: 0.85rem;
}

#viewProfile.profile-suno-wrap {
  display: none !important;
}

.public-artist-header {
  position: relative;
  margin: -1.25rem -1.25rem 1.5rem;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72)),
    linear-gradient(135deg, #2a1220, #12141c);
  overflow: hidden;
}

.public-artist-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.public-artist-identity {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1.25rem;
  align-items: flex-end;
  width: 100%;
}

.public-artist-photo {
  width: 168px;
  height: 168px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  background: linear-gradient(135deg, #ff4b8b, #5b4bff);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 3.2rem;
  font-family: Syne, Inter, sans-serif;
  font-weight: 800;
  overflow: hidden;
}

.public-artist-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-artist-copy h1 {
  margin: 0 0 0.2rem;
  font-family: Syne, Inter, sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
}

.public-artist-handle {
  margin: 0 0 0.45rem;
  color: rgba(255, 255, 255, 0.7);
}

.public-artist-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.6rem;
}

.public-artist-bio {
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
  margin: 0;
}

.release-table {
  width: 100%;
  border-collapse: collapse;
}

.release-row {
  display: grid;
  grid-template-columns: 2.2rem 3.2rem 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}

.release-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.release-num {
  color: var(--muted, #888);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.release-cover {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 4px;
  object-fit: cover;
  background: #222;
}

.release-title {
  font-weight: 650;
}

.release-dur,
.release-date {
  color: var(--muted, #a0a0b4);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.upload-page,
.search-page {
  max-width: 40rem;
}

.upload-field {
  margin: 0 0 1rem;
}

.upload-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
}

.upload-rights {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 1rem 0 1.25rem;
  color: var(--muted, #c4c4d4);
  font-size: 0.9rem;
  line-height: 1.4;
}

.btn-artist-primary {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #ff4b8b, #ff9f5a);
  color: #12080c;
}

.btn-artist-primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.upload-error {
  color: #ff7b8a;
  margin: 0 0 0.75rem;
}

.onboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.onboard-overlay.hidden {
  display: none !important;
}

.onboard-card {
  width: min(32rem, 100%);
  background: #16161e;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem 1.35rem 1.25rem;
}

.onboard-card h2 {
  margin: 0 0 0.4rem;
  font-family: Syne, Inter, sans-serif;
}

.onboard-card p {
  margin: 0 0 1rem;
  color: var(--muted, #c4c4d4);
}

.artist-player {
  position: fixed;
  left: var(--sidebar-w, 240px);
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: #18181f;
  border-top: 1px solid var(--border);
}

.artist-player.hidden {
  display: none !important;
}

.artist-player-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.artist-player-cover {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: #2a2a34;
}

.artist-player-titles {
  min-width: 0;
}

.artist-player-title,
.artist-player-artist {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-player-title {
  font-weight: 650;
}

.artist-player-artist {
  font-size: 0.8rem;
  color: var(--muted, #a0a0b4);
}

.artist-player-play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.artist-player-seek {
  width: 100%;
}

.artist-player-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--muted, #a0a0b4);
  min-width: 5.5rem;
  text-align: right;
}

.profile-role-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.75rem;
}

html.sidebar-collapsed .artist-player {
  left: 72px;
}

@media (max-width: 768px) {
  .artist-player {
    left: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "meta play"
      "seek seek";
  }
  .artist-player-meta { grid-area: meta; }
  .artist-player-play { grid-area: play; }
  .artist-player-seek { grid-area: seek; }
  .artist-player-time { display: none; }
  .public-artist-identity {
    flex-direction: column;
    align-items: flex-start;
  }
  .public-artist-photo {
    width: 120px;
    height: 120px;
  }
}

.account-privacy-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.account-privacy-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.privacy-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.privacy-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.privacy-switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--border);
  position: relative;
  transition: background 0.15s ease;
}

.privacy-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.privacy-switch input:checked + .privacy-switch-ui {
  background: #ff4b8b;
  border-color: #ff4b8b;
}

.privacy-switch input:checked + .privacy-switch-ui::after {
  transform: translateX(18px);
}

.privacy-switch input:disabled + .privacy-switch-ui {
  opacity: 0.45;
}

.privacy-switch input:focus-visible + .privacy-switch-ui {
  outline: 2px solid #ff4b8b;
  outline-offset: 2px;
}

.profile-edit-privacy {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.85rem;
  font-size: 0.9rem;
}

.profile-edit-admin-note {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--muted, #a0a0b4);
}
