.profile-preview-card {
    position: fixed;
    z-index: 999998;
    width: min(330px, calc(100vw - 24px));
    overflow: hidden;
    color: #e4e4e7;
    background: rgba(10, 11, 13, 0.98);
    border: 1px solid #303136;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.018) inset;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    filter: blur(3px);
    transform: translateY(9px) scale(0.965);
    transform-origin: top center;
    transition:
        opacity 190ms ease-in,
        transform 220ms cubic-bezier(0.4, 0, 1, 1),
        filter 180ms ease-in,
        visibility 0s linear 220ms;
    will-change: opacity, transform, filter;
}

.profile-preview-card.is-above {
    transform-origin: bottom center;
}

.profile-preview-card.is-above:not(.is-visible) {
    transform: translateY(-9px) scale(0.965);
}

.profile-preview-card.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    filter: blur(0);
    transform: translateY(0) scale(1);
    transition:
        opacity 260ms ease-out,
        transform 320ms cubic-bezier(0.16, 1.12, 0.3, 1),
        filter 220ms ease-out,
        visibility 0s;
}

.profile-preview-card__content {
    position: relative;
    display: none;
}

.profile-preview-card.is-ready .profile-preview-card__content {
    display: block;
    animation: profile-preview-content-in 230ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.profile-preview-card.is-ready .profile-preview-card__loading {
    display: none;
}

.profile-preview-card__cover {
    position: relative;
    height: 74px;
    overflow: hidden;
    background:
        radial-gradient(circle at 76% 15%, rgba(16, 185, 129, 0.22), transparent 44%),
        linear-gradient(125deg, #131518, #0d1816 58%, #0b0c0e);
}

.profile-preview-card__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 25%, rgba(10, 11, 13, 0.82));
}

.profile-preview-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.profile-preview-card__cover img:not([src]) {
    display: none;
}

.profile-preview-card__cover-glow {
    position: absolute;
    top: 0;
    left: var(--profile-preview-accent-left, 18px);
    z-index: 3;
    width: var(--profile-preview-accent-width, 54px);
    height: 2px;
    background: #34d399;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.7);
}

.profile-preview-card.is-above .profile-preview-card__cover-glow {
    top: auto;
    bottom: 0;
}

.profile-preview-card__body {
    padding: 0 16px 14px;
}

.profile-preview-card__identity {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 11px;
    min-width: 0;
    margin-top: -27px;
}

.profile-preview-card__avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}

.profile-preview-card__avatar {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: cover;
    border: 3px solid #0a0b0d;
    border-radius: 12px;
    background: #18181b;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.38);
}

.profile-preview-card__online-dot {
    position: absolute;
    right: -2px;
    bottom: 2px;
    display: none;
    width: 11px;
    height: 11px;
    border: 2px solid #0a0b0d;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.profile-preview-card__online-dot.is-online {
    display: block;
}

.profile-preview-card__identity-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding-bottom: 3px;
}

.profile-preview-card__name {
    overflow: hidden;
    color: #f4f4f5;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-preview-card__name:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.profile-preview-card__group {
    margin-top: 3px;
    color: #71717a;
    font-size: 0.69rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.profile-preview-card__title,
.profile-preview-card__bio {
    margin: 10px 0 0 69px;
}

.profile-preview-card__title {
    color: #d4d4d8;
    font-size: 0.78rem;
    font-weight: 600;
}

.profile-preview-card__bio {
    display: -webkit-box;
    overflow: hidden;
    color: #8b8b93;
    font-size: 0.75rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.profile-preview-card__title:empty,
.profile-preview-card__bio:empty {
    display: none;
}

.profile-preview-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid #24262a;
    border-radius: 9px;
    background: rgba(24, 24, 27, 0.56);
}

.profile-preview-card__stats > span {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-width: 0;
    padding: 8px 5px 7px;
}

.profile-preview-card__stats > span + span {
    border-left: 1px solid #24262a;
}

.profile-preview-card__stats strong {
    max-width: 100%;
    overflow: hidden;
    color: #e4e4e7;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-preview-card__stats small {
    margin-top: 3px;
    color: #696970;
    font-size: 0.59rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-preview-card__action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 9px 11px;
    color: #6ee7b7;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(52, 211, 153, 0.32);
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.08);
    transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.profile-preview-card__action:hover {
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, 0.6);
    background: rgba(16, 185, 129, 0.15);
}

.profile-preview-card__action .material-icons {
    font-size: 16px;
}

.profile-preview-card__loading {
    position: relative;
    min-height: 205px;
    padding: 92px 16px 16px;
}

.profile-preview-card__skeleton {
    border-radius: 6px;
    background: linear-gradient(90deg, #18191c 20%, #24262a 48%, #18191c 76%);
    background-size: 220% 100%;
    animation: profile-preview-shimmer 1.15s linear infinite;
}

.profile-preview-card__skeleton--cover {
    position: absolute;
    inset: 0 0 auto;
    height: 74px;
    border-radius: 0;
}

.profile-preview-card__skeleton--avatar {
    position: absolute;
    top: 48px;
    left: 16px;
    width: 58px;
    height: 58px;
    border: 3px solid #0a0b0d;
    border-radius: 12px;
}

.profile-preview-card__skeleton--name {
    width: 46%;
    height: 13px;
    margin-left: 69px;
}

.profile-preview-card__skeleton--line {
    width: 72%;
    height: 9px;
    margin: 12px 0 0 69px;
}

@keyframes profile-preview-shimmer {
    to { background-position: -220% 0; }
}

@keyframes profile-preview-content-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-preview-card,
    .profile-preview-card__skeleton {
        transition: none;
        animation: none;
    }

    .profile-preview-card.is-ready .profile-preview-card__content {
        animation: none;
    }
}
