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

.profile img {
    display: block;
    max-width: var(--full-width);
    height: auto;
}

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

.profile__cover {
    position: relative;
    z-index: 1;
}

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

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

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

.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: var(--middle-border);
    overflow: hidden;
    border: 3px solid #101010;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

.avatar img,
.avatar dotlottie-player {
    width: var(--full-width);
    height: var(--full-height);
    object-fit: cover;
    display: block;
}

.id__text {
    min-width: 0;
}

.id__name {
    font-size: var(--font-size-title);
    margin: 0 0 2px;
    line-height: 1.15;
    font-weight: var(--font-weight);
    flex-wrap: nowrap;
}

.id__username {
    color: var(--text-grey);
    font-size: var(--font-size-text);
    word-break: break-word;
}

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

.head__actions a {
    font-weight: var(--font-weight);
    white-space: nowrap;
}

.head__actions a:hover {
    opacity: var(--opacity-btn-hover);
}

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

.head__bio {
    margin: 15px 0 0;
    font-size: var(--font-size-text);
    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(--text-grey);
    font-size: var(--font-size-text);
}

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

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

.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;
}

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

.stat-icon svg {
    width: var(--size-icons-l);
    height: var(--size-icons-l);
    display: block;
}

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

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

.profile__tabs ul {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 10px var(--pad);
    display: flex;
    gap: 30px;
    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:hover {
    opacity: var(--opacity-btn-hover);
}

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

.profile__tabs-icons li {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-white);
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

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

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

.profile__empty-lottie {
    width: var(--size-svg-dottie);
    height: var(--size-svg-dottie);
    display: block;
    margin-bottom: 12px;
}

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

.profile__empty a {
    color: var(--text-white);
    font-weight: var(--font-weight);
}

.profile__empty a:hover {
    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: var(--full-width);
    max-width: 220px;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
    cursor: pointer;
    gap: 10px;
}

.music-item__link {
    display: block;
    width: var(--full-width);
    height: var(--full-height);
    line-height: 0;
}

.music-item__cover {
    position: relative;
    display: block;
    height: var(--full-width);
    height: var(--full-height);
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: var(--border-radius);
    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: var(--full-width);
    height: var(--full-height);
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: var(--border-radius);
    transform: none;
    transition:
        transform 0.22s ease,
        filter 0.22s ease;
    backface-visibility: hidden;
    will-change: transform;
}

.music-item__cover dotlottie-player {
    position: absolute;
    color: var(--text-white);
    font-size: var(--font-size-text);
    font-family: var(--font-family-app);
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    margin-top: 0;
    line-height: 1.1;
    word-break: break-word;
    white-space: normal;
    overflow: visible;
    max-width: var(--full-width);
    padding: 0 6px;
}

.music-item img.is-selected {
    border: 3px solid var(--danger-error);
}

.music-item__hover-title {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    padding: 10px;
    background: var(--bgc-input-div);
    color: var(--text-white);
    font-weight: var(--font-weight);
    font-size: var(--font-size-text);
    border-radius: var(--border-radius);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity 0.18s ease,
        transform 0.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: var(--opacity-btn-hover);
    transform: translateY(8px);
    pointer-events: none;
    transition:
        opacity 0.22s ease,
        transform 0.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: var(--opacity-btn-hover);
    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: var(--full-border);
    border: 1px solid var(--bgc-input-div);
    background: var(--bgc-input-div);
    color: var(--text-white);
    font-weight: var(--font-weight);
    cursor: pointer;
    pointer-events: auto;
    text-decoration: none;
    transition:
        transform 0.12s ease,
        background 0.12s ease,
        box-shadow 0.12s ease;
    line-height: 1;
    font-size: var(--font-size-text);
    position: relative;
    z-index: 20;
}

.music-item__overlay_show-details:hover {
    transform: translateY(-3px);
    background: var(--side-border);
    box-shadow: 0 10px 28px var(--side-border);
}

.music-item__overlay_show-details svg {
    display: inline-block;
    width: var(--size-icons-xs);
    height: var(--size-icons-xs);
    vertical-align: middle;
}

.overlay__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: var(--full-border);
    background: var(--side-border);
    color: var(--text-white);
    font-weight: var(--font-weight);
    cursor: pointer;
    border: 1px solid var(--side-border);
    transition:
        transform 0.12s ease,
        background 0.12s ease,
        box-shadow 0.12s ease;
    justify-content: center;
    line-height: 1;
    font-size: var(--font-size-text);
    box-sizing: border-box;
    position: relative;
    z-index: 20;
}

.overlay__btn:hover {
    transform: translateY(-3px) scale(1.02);
    background: var(--side-border);
}

.overlay__btn--icon {
    padding: 8px;
    width: var(--size-icons-l);
    height: var(--size-icons-l);
    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-error) 72%, var(--text-white) 0%);
    color: var(--text-white);
}

.overlay__btn--icon.eye-btn {
    background: var(--side-border);
    border: 1px solid var(--side-border);
    color: var(--text-white);
}

.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%);
}

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

.overlay__btn svg {
    width: var(--size-icons-xs);
    height: var(--size-icons-xs);
}

.pager {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 8px 12px;
    margin-top: 20px;
    background: var(--side-border);
    border: 1px solid var(--side-border);
    color: var(--text-white);
    margin-left: 16px;
    transition:
        background 0.12s,
        border 0.12s,
        color 0.12s;
}

.overlay__btn--icon.eye-btn:hover {
    background: var(--bgc-input-div);
    border: 1px solid var(--bgc-input-div);
    color: var(--text-white);
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.pager__item:hover {
    background: var(--side-border);
}

.pager__item.is-active {
    background: var(--text-tunedr);
    color: var(--text-white);
    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: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    font-weight: var(--font-weight);
    letter-spacing: 0.2px;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.follow-btn .label--sub,
.follow-btn .label--abo,
.follow-btn .label--unsub {
    display: none;
}

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

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

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

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

.follow-btn.is-loading .label--sub,
.follow-btn.is-loading .label--abo,
.follow-btn.is-loading .label--unsub {
    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: var(--opacity-btn-hover);
        transform: translateY(0);
    }
}

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

@media (max-width: 1060px) {
    .head__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .head__actions {
        display: flex;
        justify-content: center;
        align-items: center;
        width: var(--full-width);
        margin: 40px;
    }
}

.head__actions-svg {
    display: none;
}

@media (max-width: 768px) {
    .head__actions-svg {
        display: flex;
        width: var(--full-width);
        justify-content: space-around;
        margin: 20px 0px;
    }

    .head__actions {
        display: none;
    }
}

.profile__tabs-svg {
    display: none;
}

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

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

    .head__id {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: var(--full-width);
        margin-bottom: 20px;
    }

    .head__bio {
        width: var(--full-width);
        text-align: start;
        margin: 20px 0px;
    }

    .head__actions-svg {
        display: flex;
        width: var(--full-width);
        justify-content: space-around;
    }

    .head__actions-svg svg {
        width: var(--size-icons-xs);
        height: var(--size-icons-xs);
    }

    .avatar {
        width: var(--size-avatar-user);
        height: var(--size-avatar-user);
    }

    .head__stats {
        justify-content: center;
        align-items: start;
        flex-direction: column;
    }

    .profile__tabs {
        display: none;
    }

    .profile__tabs-svg {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 40px;
    }

    .profile__tabs-svg li {
        list-style: none;
    }

    .profile__tabs-svg ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: 10px;
        width: var(--full-width);
    }

    .profile__tabs-svg li svg {
        width: var(--size-icons-xs);
        height: var(--size-icons-xs);
    }

    .profile__tabs-svg li.is-active > a svg {
        color: var(--text-tunedr);
        stroke: var(--text-tunedr);
        fill: var(--text-tunedr);
    }
}

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

.edit-mode .music-item {
    filter: brightness(var(--opacity-btn-hover));
    cursor: pointer;
    position: relative;
}

.edit-mode .music-item.is-selected {
    border: 2px solid var(--danger-error);
    filter: brightness(var(--opacity-btn-hover));
    position: relative;
    z-index: 2;
}

.edit-mode .music-item.is-selected::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: var(--size-icons-xs);
    height: var(--size-icons-xs);
    border-radius: var(--border-radius);
    z-index: 30;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
}

.profile__manage-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bgc-app);
    border-top: 1px solid var(--side-border);
    font-size: var(--font-size-text);
    color: var(--text-white);
}

.profile__manage-bar .btn-cancel {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: var(--font-size-text);
    font-weight: var(--font-weight);
    background: transparent;
    border: 1px solid var(--side-border);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-family-app);
    transition: background 0.15s;
}

.profile__manage-bar .btn-cancel:hover {
    background: var(--bgc-input-div);
}

.profile__manage-bar .btn-delete {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: var(--font-size-text);
    font-weight: var(--font-weight);
    border: 1px solid var(--danger-error);
    background: none;
    color: var(--danger-error);
    cursor: pointer;
    font-family: var(--font-family-app);
    transition: background 0.15s;
}

.profile__manage-bar .btn-delete:disabled {
    opacity: var(--opacity-btn-hover);
    cursor: default;
}

.profile__manage-bar .btn-delete:not(:disabled):hover {
    background: rgba(var(--danger-error-rgb), 0.28);
}

@media (max-width: 768px) {
    .profile__manage-bar .btn-delete {
        border: none;
    }
}

.profile__manage-bar .btn-termine {
    background: var(--text-tunedr);
    color: var(--text-white);
    border: 1px solid var(--text-tunedr);
    font-weight: var(--font-weight);
    transition:
        background 0.15s,
        color 0.15s;
}

.profile__manage-bar .btn-termine:hover {
    background: var(--text-tunedr);
    color: var(--text-white);
}

.profile__manage-selectall {
    display: inline-flex;
    align-items: center;
    font-size: var(--font-size-text);
    color: var(--text-white);
    margin-right: 18px;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.profile__manage-selectall input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: var(--size-checkbox);
    height: var(--size-checkbox);
    border-radius: var(--border-radius);
    border: 2px solid var(--side-border);
    cursor: pointer;
    background: transparent;
    transition:
        border-color 0.15s,
        background 0.15s;
    position: relative;
    flex-shrink: 0;
    margin: 0 6px 0 0;
}

.profile__manage-selectall input[type="checkbox"]:checked {
    background: var(--ink, var(--text-white));
    border-color: var(--ink, var(--text-white));
}

.profile__manage-selectall input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3 3.5L11 1' stroke='%23111' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        center / 11px no-repeat;
}
