:root {
  --bg: #0f0f10;
  --card: #161616;
  --text: #e9e9e9;
  --muted: #a0a0a0;
  --accent: #7c5cff;
  --border: #FFFFFF14;
  --radius: 16px;
  --pad: clamp(12px, 3vw, 24px);
  --maxw: 1200px;
  --thumb-radius: 14px;
  --danger: #e5484d;
  --overlay: linear-gradient(180deg, rgba(0, 0, 0, .0) 20%, rgba(0, 0, 0, .45) 100%);
}

.profile {
  color: var(--text);
}

.profile img {
  display: block;
  max-width: 100%;
  height: auto;
}

.profile a {
  color: inherit;
  text-decoration: none;
}

.profile__cover {
  background: #0b0b0c;
  position: relative;
  z-index: 1;
}

.profile__cover img {
  width: 100%;
  height: clamp(120px, 22vw, 240px);
  object-fit: cover;
  filter: brightness(.85);
}

.profile__cover dotlottie-player {
  width: 100%;
  height: clamp(120px, 22vw, 240px);
  display: block;
}

.profile__head {
  position: relative;
  z-index: 2;
  margin: -30px 50px 50px;
}

.head__row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.head__id {
  display: flex;
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #101010;
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

.avatar img,
.avatar dotlottie-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #101010;
  display: block;
}

.id__text {
  min-width: 0;
}

.id__name {
  font-size: clamp(18px, 2.4vw, 24px);
  margin: 0 0 2px;
  line-height: 1.15;
  font-weight: 700;
  word-break: break-word;
}

.id__username {
  color: var(--muted);
  font-size: clamp(12px, 1.6vw, 14px);
  word-break: break-word;
}

.head__actions {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.head__actions a {
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}

.head__actions a:hover {
  text-decoration: underline;
}

.head__actions .inline-form {
  display: inline;
}

.head__bio {
  margin: 15px 0 0;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.head__stats {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.head__stats li {
  display: inline-flex;
  align-items: baseline;
}

.head__stats strong {
  color: var(--text);
  font-size: 14px;
}

.head__stats span {
  margin-left: 15px;
}

.head__stats .stat-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.head__stats .stat-link strong + span {
  margin-left: 6px;
}

.head__stats-icons {
  display: none;
  justify-content: start;
  align-items: center;
  gap: 1px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  width: 100%;
}

.stat-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
  position: relative;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.stat-icon__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.profile__tabs {
  margin: 30px 0;
  display: flex;
  justify-content: center;
}

.profile__tabs ul {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--pad);
  display: flex;
  gap: 16px;
  overflow: auto;
  list-style: none;
  scrollbar-width: none;
}

.profile__tabs ul::-webkit-scrollbar {
  display: none;
}

.profile__tabs li {
  flex: 0 0 auto;
}

.profile__tabs li.is-active > a {
  color: var(--accent);
  font-weight: 600;
}

.profile__tabs-icons {
  display: none;
}

.profile__tabs-icons ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  margin: 10px;
  list-style: none;
}

.profile__tabs-icons li {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ccc;
  transition: color .2s ease, transform .2s ease;
}

.profile__tabs-icons li svg {
  width: 22px;
  height: 22px;
  display: block;
}

.profile__tabs-icons li:hover {
  color: #fff;
  transform: scale(1.12);
}

.profile__tabs-icons li.is-active {
  color: var(--accent);
  transform: scale(1.1);
}

.profile__section {
  margin: 0;
  padding: 0;
}

.profile__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding: 40px 20px;
  text-align: center;
}

.profile__empty-lottie {
  width: 140px;
  height: 140px;
  display: block;
  margin-bottom: 12px;
}

.profile__empty p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.profile__empty a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.profile__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--pad);
  display: grid;
  gap: 36px;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  justify-content: center;
  align-items: start;
}

.profile__grid:empty {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.profile__grid > .music-item {
  justify-self: center;
}

.music-item {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 2/3;
  border-radius: 28px;
  overflow: hidden;
  background: color-mix(in oklab, #fff 6%, transparent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}

.music-item:hover {
  transform: translateY(-2px);
}

.music-item__link {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.music-item__cover {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 28px;
  background: transparent;
  border: none;
  box-shadow: none;
  isolation: isolate;
  margin: 0;
  padding: 0;
}

.music-item__cover::before {
  content: none !important;
}

.music-item__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: scale-down;
  object-position: center;
  border: 0;
  border-radius: inherit;
  transform: none;
  transition: transform .22s ease, filter .22s ease;
  backface-visibility: hidden;
  will-change: transform;
}

.music-item__cover dotlottie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.music-item:hover .music-item__cover img {
  transform: scale(1.02);
  filter: saturate(1.03);
}

.music-item__hover-title {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
  z-index: 5;
}

.music-item:hover .music-item__hover-title,
.music-item:focus-within .music-item__hover-title {
  opacity: 1;
  transform: translateY(0);
}

.music-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 6px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.56) 100%);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 10;
}

.music-item__overlay--single {
  justify-content: center;
}

.music-item:hover .music-item__overlay,
.music-item:focus-within .music-item__overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.music-item__overlay_show-details {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  min-width: 72px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  line-height: 1;
  font-size: 14px;
  position: relative;
  z-index: 20;
}

.music-item__overlay_show-details:hover {
  transform: translateY(-3px);
  background: rgba(0, 0, 0, 0.36);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.music-item__overlay_show-details svg {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.overlay__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  justify-content: center;
  line-height: 1;
  font-size: 14px;
  box-sizing: border-box;
  position: relative;
  z-index: 20;
}

.overlay__btn:hover {
  transform: translateY(-3px) scale(1.02);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.overlay__btn--icon {
  padding: 8px;
  width: 44px;
  height: 44px;
  gap: 0;
  background: color-mix(in oklab, var(--danger) 28%, rgba(0, 0, 0, 0.46) 72%);
  border: 1px solid color-mix(in oklab, var(--danger) 72%, #fff 0%);
  color: #fff;
}

.overlay__btn--icon.eye-btn {
  background: #1E1E1E;
  border: 1px solid #222;
  color: #fff;
}

.overlay__btn--icon:hover {
  transform: translateY(-3px) scale(1.03);
  background: color-mix(in oklab, var(--danger) 40%, rgba(0, 0, 0, 0.32) 60%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.overlay__btn svg,
.overlay__btn--icon svg,
.music-item__overlay_show-details svg {
  display: inline-block;
  vertical-align: middle;
}

.overlay__btn svg {
  width: 18px;
  height: 18px;
}

.pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 16px 0;
  margin-top: 20px;
    background: #1E1E1E;
    border: 1px solid #1E1E1E;
    color: #fff;
    margin-left: 16px;
    transition: background .12s, border .12s, color .12s;
    padding: 8px 12px;
  }

  .overlay__btn--icon.eye-btn:hover {
    background: #232323;
    border: 1px solid #232323;
    color: #fff;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.pager__item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pager__item.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.head__actions .inline-form .follow-btn {
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.follow-btn {
  background-color: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.follow-btn .label {
  display: none;
}

.follow-btn[data-followed="false"] .label--sub {
  display: inline;
}

.follow-btn[data-followed="true"] .label--abo {
  display: inline;
}

.follow-btn:hover .label {
  display: none;
}

.follow-btn[data-followed="true"]:hover .label--unsub {
  display: inline;
  color: var(--danger);
}

.follow-btn[data-followed="false"]:hover .label--abo {
  display: inline;
}

.follow-btn.is-loading .label {
  display: none;
}

.follow-btn.is-loading::after {
  content: '…';
  display: inline-block;
}

@media (hover: none) {
  .music-item__overlay {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .music-item__hover-title {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1199px) {
  .profile__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

@media (max-width: 949px) {
  .profile__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 12px var(--pad);
  }

  .head__stats {
    display: none;
  }

  .head__stats-icons {
    display: flex;
  }

  .profile__tabs {
    display: none;
  }

  .profile__tabs-icons {
    display: block;
    width: 100%;
    margin-bottom: 20px;
  }

  .profile__head {
    margin: -24px 16px 30px;
  }

  .head__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .head__id {
    width: 100%;
  }

  .avatar {
    width: 72px;
    height: 72px;
    border-width: 2px;
  }

  .id__name {
    font-size: clamp(16px, 3.6vw, 20px);
    margin: 0;
  }

  .id__username {
    font-size: 13px;
  }

  .head__actions {
    width: 100%;
    justify-content: flex-end;
    gap: 12px;
  }

  .head__actions a,
  .head__actions button {
    font-size: 14px;
    padding: 8px 12px;
  }

  .head__bio {
    font-size: 13px;
    margin-top: 8px;
  }

  .head__stats {
    margin-top: 10px;
    gap: 12px;
    font-size: 13px;
  }

  .music-item__overlay_show-details span {
    display: none;
  }
}

@media (max-width: 719px) {
  .profile__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
    margin: 0 auto 80px;
  }

  .profile__head {
    margin: -24px 12px 20px;
  }

  .head__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .head__id {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .avatar {
    width: 64px;
    height: 64px;
    border-width: 2px;
    flex-shrink: 0;
  }

  .id__name {
    font-size: clamp(14px, 3.6vw, 18px);
    margin: 0;
  }

  .id__username {
    font-size: 12px;
  }

  .head__actions {
    width: 100%;
    justify-content: flex-end;
    gap: 10px;
  }

  .head__actions a,
  .head__actions button {
    font-size: 13px;
    padding: 6px 10px;
  }

  .head__bio {
    font-size: 13px;
    margin-top: 8px;
  }

  .head__stats {
    margin-top: 8px;
    gap: 10px;
    font-size: 12px;
  }

  .music-item__overlay_show-details {
    padding: 8px 14px;
    min-width: 60px;
    font-size: 13px;
  }

  .music-item__overlay_show-details svg {
    width: 16px;
    height: 16px;
  }

  .overlay__btn--icon {
    width: 40px;
    height: 40px;
    padding: 6px;
  }

  .overlay__btn--icon svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 479px) {
  :root {
    --pad: 8px;
  }

  .profile__head {
    margin: -20px 8px 16px;
  }

  .avatar {
    width: 56px;
    height: 56px;
  }

  .head__id {
    gap: 8px;
  }

  .head__actions {
    gap: 8px;
  }

  .head__actions a,
  .head__actions button {
    font-size: 12px;
    padding: 6px 8px;
  }

  .head__stats {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .head__stats li {
    width: 100%;
  }

  .profile__empty {
    padding: 30px 15px;
  }

  .profile__empty-lottie {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 359px) {
  .profile__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 6px;
  }

  .head__row {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .head__id {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .avatar {
    width: 52px;
    height: 52px;
  }

  .head__actions {
    justify-content: center;
    width: 100%;
  }

  .head__stats {
    justify-content: center;
    align-items: center;
  }
}

.music-item,
.profile__head,
.profile__tabs,
.profile__grid {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}