.profile-content-flush {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.yd-profile-page {
    --yd-profile-surface: #ffffff;
    --yd-profile-surface-soft: #f5f7fb;
    --yd-profile-border: rgba(24, 31, 44, 0.12);
    --yd-profile-text: #182033;
    --yd-profile-muted: #748194;
    --yd-profile-accent: #ff3158;
    --yd-profile-accent-dark: #eb1643;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    position: relative;
}

.yd-profile-back {
    position: absolute;
    z-index: 8;
    top: 14px;
    right: calc(100% + 12px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 8px 13px;
    border: 1px solid var(--yd-profile-border);
    border-radius: 10px;
    background: var(--yd-profile-surface);
    color: var(--yd-profile-text);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.07);
}

.yd-profile-back:hover,
.yd-profile-back:focus {
    color: var(--yd-profile-accent);
    background: var(--yd-profile-surface);
    text-decoration: none;
}

.yd-profile-hero {
    position: relative;
    min-height: 510px;
    padding: 46px 40px 118px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    isolation: isolate;
}

.yd-profile-cover-image {
    position: absolute;
    z-index: 0;
    inset: 0;
    border-radius: 0;
    background-position: center center;
    background-size: cover;
    /*
     * Alpha mask only. It never paints a color over the cover photo.
     * Desktop/tablet: the left fade is wider while the centre keeps the
     * original image unchanged.
     */
    --yd-cover-side-alpha: linear-gradient(
        to right,
        transparent 0%,
        transparent 5%,
        rgba(255, 255, 255, 0.16) 12%,
        rgba(255, 255, 255, 0.58) 21%,
        rgba(255, 255, 255, 1) 29%,
        rgba(255, 255, 255, 1) 82%,
        rgba(255, 255, 255, 0.60) 87%,
        rgba(255, 255, 255, 0.20) 92%,
        transparent 97%,
        transparent 100%
    );
    --yd-cover-bottom-alpha: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 1) 74%,
        rgba(255, 255, 255, 0.60) 84%,
        rgba(255, 255, 255, 0.20) 92%,
        transparent 97%,
        transparent 100%
    );
    -webkit-mask-image: var(--yd-cover-side-alpha), var(--yd-cover-bottom-alpha);
    -webkit-mask-composite: source-in;
    mask-image: var(--yd-cover-side-alpha), var(--yd-cover-bottom-alpha);
    mask-composite: intersect;
    pointer-events: none;
}

.yd-profile-hero.yd-profile-default-cover {
    background-image:
        radial-gradient(circle at 78% 24%, rgba(255, 49, 88, 0.45), transparent 32%),
        radial-gradient(circle at 53% 68%, rgba(84, 53, 212, 0.38), transparent 38%),
        linear-gradient(125deg, #101116 0%, #242632 54%, #14151a 100%);
}

.yd-profile-hero-overlay {
    display: none;
}

/* Premium status sits inside the avatar at bottom-center for both visitors
   and the profile owner, using the same diamond partial as Browse. */
.yd-profile-avatar-premium {
    position: absolute;
    z-index: 7;
    /* Half of the 30px badge sits below the photo, centering it on the edge. */
    bottom: -15px;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #ffc83d;
    transform: translateX(-50%);
    pointer-events: none;
}

/* A soft dark glow keeps the gold diamond visible on very bright avatars. */
.yd-profile-avatar-premium::before {
    position: absolute;
    z-index: 0;
    inset: 1px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 7, 12, .82) 0%, rgba(5, 7, 12, .58) 48%, rgba(5, 7, 12, 0) 76%);
    filter: blur(1px);
    content: '';
}

.yd-profile-premium-diamond {
    position: relative;
    z-index: 1;
}

.yd-profile-premium-diamond,
.yd-profile-premium-diamond > *,
.yd-profile-premium-diamond i,
.yd-profile-premium-diamond svg {
    color: #ffc83d !important;
}

.yd-profile-premium-diamond,
.yd-profile-premium-diamond > * {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

.yd-profile-premium-diamond i,
.yd-profile-premium-diamond svg {
    width: 24px;
    height: 24px;
    font-size: 24px;
    line-height: 1 !important;
    filter: drop-shadow(0 0 4px rgba(255, 200, 61, .95))
            drop-shadow(0 0 11px rgba(255, 161, 22, .72));
    animation: yd-profile-premium-glow 2.2s ease-in-out infinite;
}

@keyframes yd-profile-premium-glow {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(255, 200, 61, .85))
                drop-shadow(0 0 8px rgba(255, 161, 22, .55));
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(255, 226, 121, 1))
                drop-shadow(0 0 14px rgba(255, 161, 22, .95));
    }
}

.yd-profile-cover-controls {
    position: absolute;
    z-index: 3;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.yd-profile-cover-controls form,
.yd-cover-settings-actions form {
    margin: 0;
}

.yd-profile-cover-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(10, 10, 13, 0.72);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
}

.yd-profile-cover-btn:hover,
.yd-profile-cover-btn:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(24, 24, 29, 0.9);
    color: #ffffff;
}

.yd-profile-cover-remove {
    width: 40px;
    padding: 0;
    color: #ff8299;
}

.yd-profile-cover-btn input,
.yd-cover-file-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.js-cover-photo-form.is-uploading .yd-profile-cover-btn,
.js-cover-photo-form.is-uploading .yd-cover-file-label {
    cursor: wait;
    opacity: 0.65;
}

.js-cover-photo-form,
.js-profile-photo-form,
.yd-profile-gallery-upload-form {
    position: relative;
}

.yd-upload-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(10, 10, 13, .78);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .18);
}

.yd-upload-status::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #ff3158;
    border-radius: 50%;
    animation: yd-upload-spin .7s linear infinite;
}

.yd-profile-gallery-upload-form .yd-upload-status {
    flex: 0 0 auto;
    margin: 0;
}

@keyframes yd-upload-spin {
    to { transform: rotate(360deg); }
}

.yd-profile-identity {
    position: relative;
    z-index: 2;
    width: min(100%, 470px);
    color: #ffffff;
}

.yd-profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 18px;
}

.yd-profile-share-btn {
    position: absolute;
    z-index: 4;
    top: 46px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    background: rgba(10, 10, 13, .4);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
    backdrop-filter: blur(10px);
}

.yd-profile-share-btn:hover,
.yd-profile-share-btn:focus {
    background: rgba(10, 10, 13, .4);
    color: #fff !important;
    transform: translateY(-1px);
}

.yd-profile-avatar {
    display: block;
    width: 128px;
    height: 128px;
    border: 0;
    border-radius: 24px;
    object-fit: cover;
    background: #252530;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
}

.yd-profile-online-badge {
    position: absolute;
    z-index: 3;
    top: -6px;
    left: -6px;
}

.yd-profile-online-badge .online-status {
    display: block;
    position: static !important;
    width: 19px;
    height: 19px;
    margin: 3px;
    border: 3px solid #111216;
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}

.yd-profile-name {
    margin: 0;
    color: #ffffff;
    font-size: 1.50rem;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.yd-profile-name-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: -2px;
    width: 20px;
    height: 20px;
    margin-left: 3px;
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 50%;
    background: #2b7ae4;
    color: #fff;
    box-shadow: 0 3px 10px rgba(18, 91, 201, .48),
                0 2px 7px rgba(0, 0, 0, .38);
    box-sizing: border-box;
    overflow: hidden;
    line-height: 0;
    vertical-align: middle;
}

.yd-profile-name-verified::after {
    content: '';
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    display: block !important;
    width: 11px !important;
    height: 8px !important;
    margin: 0 !important;
    background: #fff;
    -webkit-clip-path: polygon(0 42%, 16% 25%, 40% 52%, 84% 0, 100% 17%, 40% 100%);
    clip-path: polygon(0 42%, 16% 25%, 40% 52%, 84% 0, 100% 17%, 40% 100%);
    transform: translate(-50%, -50%) !important;
}

.yd-profile-username {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 600;
}

.yd-profile-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 7px 11px;
    border: 1px solid #ff6388;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
}

.yd-profile-status i {
    color: #ff6388;
}

.yd-profile-description {
    max-width: 440px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.97rem;
    line-height: 1.55;
}

.yd-profile-description p:last-child {
    margin-bottom: 0;
}

.yd-profile-description-hidden {
    position: relative;
    overflow: hidden;
    min-height: 54px;
}

.yd-profile-description-hidden .yd-profile-description-content {
    filter: blur(2px);
    opacity: .70;
    user-select: none;
}

.yd-profile-description-hidden-label {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 10px;
    background: transparent;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.yd-profile-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    max-width: 100%;
    overflow: visible;
    padding: 0;
}

.yd-profile-fact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(12, 13, 17, 0.58);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.85rem;
    line-height: 1.15;
    backdrop-filter: blur(10px);
    flex: 0 0 auto;
    white-space: nowrap;
}

.yd-profile-fact i {
    color: #ff6c89;
}

/* Compact the existing YouDate custom profile fields inside the hero. */
.yd-profile-extra-fields {
    display: contents;
}

.yd-profile-curated-fields {
    display: contents;
}

.yd-profile-curated-field {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(12, 13, 17, 0.58);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    line-height: 1.15;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.yd-profile-curated-label {
    color: rgba(255, 255, 255, 0.58);
    font-weight: 600;
}

.yd-profile-curated-value {
    color: #ffffff;
    font-weight: 700;
}

.yd-profile-extra-fields > .profile-info-block,
.yd-profile-extra-fields .profile-info-block {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.yd-profile-extra-fields .row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    width: auto;
    margin: 0 !important;
}

.yd-profile-extra-fields [class*="col-"] {
    flex: 0 1 auto;
    width: auto;
    max-width: none;
    min-height: 34px;
    margin: 0 !important;
    padding: 7px 11px !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(12, 13, 17, 0.58);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    backdrop-filter: blur(10px);
}

.yd-profile-extra-fields .text-bold,
.yd-profile-extra-fields .text-muted {
    display: inline;
    margin: 0 !important;
    color: inherit !important;
    font-size: inherit;
}

.yd-profile-extra-fields .text-bold::after {
    content: ": ";
}

.yd-profile-extra-fields .drop-blur {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: 10px;
    background: rgba(13, 14, 18, 0.78);
    backdrop-filter: blur(5px);
}

.yd-profile-actions {
    position: absolute;
    right: 24px;
    bottom: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 72px;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    background: rgba(15, 15, 18, 0.10);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
    z-index: 2;
}

.yd-profile-actions-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.yd-profile-chat-btn,
.yd-profile-action-btn,
.yd-profile-icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
    height: 44px !important;
    min-height: 44px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: 0;
    border-radius: 16px;
    color: #ffffff !important;
    font-weight: 700;
    line-height: 1 !important;
    vertical-align: middle;
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.yd-profile-chat-btn {
    min-width: 165px;
    margin-left: 10px;
    padding: 0 27px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--yd-profile-accent), var(--yd-profile-accent-dark));
    box-shadow: 0 8px 20px rgba(255, 49, 88, 0.24);
    color: #ffffff !important;
    line-height: 1 !important;
}

.yd-profile-actions .btn > i,
.yd-profile-actions .btn > span {
    line-height: 1 !important;
    vertical-align: middle;
}

.yd-profile-chat-btn:hover,
.yd-profile-chat-btn:focus {
    color: #ffffff !important;
    transform: translateY(-1px);
}

.yd-profile-action-btn {
    gap: 8px;
    padding: 0 16px;
    background: #17171c;
}

.yd-profile-icon-btn {
    width: 44px;
    padding: 0;
    background: #17171c;
    font-size: 1.12rem;
}

.yd-profile-action-btn:hover,
.yd-profile-action-btn:focus,
.yd-profile-icon-btn:hover,
.yd-profile-icon-btn:focus {
    color: #ffffff !important;
    background: #26262d;
    transform: translateY(-1px);
}

.yd-profile-icon-btn.btn-liked,
.yd-profile-icon-btn.btn-liked i {
    color: #ff4267;
}

.yd-profile-boost-btn {
    min-width: 155px;
    margin-right: 10px;
    border-radius: 22px;
    background: #2b7ae4 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(43, 122, 228, 0.27);
}

.yd-profile-boost-btn:hover,
.yd-profile-boost-btn:focus {
    background: #1969d5 !important;
    color: #ffffff !important;
}

.yd-profile-more-pjax {
    display: inline-flex;
}

.yd-profile-more .dropdown-menu {
    min-width: 170px;
    margin-top: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: #17171c;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

.yd-profile-more .dropdown-item {
    color: #e6e6ea;
}

.yd-profile-more .dropdown-item:hover,
.yd-profile-more .dropdown-item:focus {
    background: #24242b;
    color: #ffffff;
}

.yd-profile-guest-message {
    color: rgba(255, 255, 255, 0.78);
}

.yd-profile-content {
    margin-top: 26px;
}

.yd-profile-tabs {
    justify-content: center;
    gap: 22px;
    border-bottom: 1px solid var(--yd-profile-border);
}

.yd-profile-tabs .nav-link {
    position: relative;
    padding: 14px 4px 16px;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    color: var(--yd-profile-muted);
    font-weight: 600;
    cursor: pointer;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
}

.yd-profile-tabs .nav-link span {
    margin-left: 5px;
    color: #9aa4b5;
    font-size: 0.82em;
}

.yd-profile-tabs .nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
}

.yd-profile-tabs .nav-link.active {
    color: var(--yd-profile-text);
}

.yd-profile-tabs .nav-link.active::after {
    background: var(--yd-profile-accent);
}

.yd-profile-tab-content {
    min-height: 180px;
    padding-top: 26px;
}

.yd-profile-tab-content > .tab-pane {
    display: none;
}

.yd-profile-tab-content > .tab-pane.active {
    display: block;
}

.yd-profile-posts {
    min-height: 180px;
}

.yd-profile-media-gallery .profile-photos-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.yd-profile-media .profile-photo-item {
    padding: 12px;
    cursor: pointer;
}

.yd-profile-media .profile-photo-item .photo-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 100%;
    border-radius: 30px;
    background: var(--yd-profile-surface-soft);
    box-shadow: 0 8px 24px rgba(22, 28, 45, 0.1);
}

.yd-profile-media .profile-photo-item .photo-wrapper > img,
.yd-profile-media .profile-photo-item .photo-wrapper .profile-photo-label {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.yd-profile-media .profile-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.yd-profile-media .profile-photo-item:hover img {
    transform: scale(1.025);
}

.yd-profile-media .profile-photo-label {
    border-radius: 20px;
}

.yd-profile-media .profile-photo-locked {
    cursor: default;
    outline: 0;
}

.yd-profile-media .profile-photo-locked:focus .photo-wrapper {
    box-shadow: 0 0 0 3px rgba(43, 122, 228, 0.55), 0 8px 24px rgba(22, 28, 45, 0.1);
}

.yd-profile-media .profile-photo-locked .profile-photo-label {
    background: rgba(10, 11, 15, 0.48);
    color: #ffffff;
    font-size: 1.35rem;
}


.yd-profile-media .profile-photo-lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    padding: 0;
    background: rgba(10, 11, 15, 0.48);
    color: #fff;
    text-align: center;
}

.yd-profile-media .profile-photo-lock-overlay .unlock-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    flex: 0 0 auto;
    margin: 50px auto 0;
}

.yd-profile-media .profile-photo-lock-actions {
    position: absolute;
    top: 94px;
    left: 50%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    transform: translateX(-50%);
}

.yd-profile-media .profile-photo-lock-actions .btn {
    min-width: 112px;
    line-height: 1.15;
    white-space: normal;
}

.yd-profile-media .profile-photo-lock-actions .btn span {
    font-size: .75rem;
}

.yd-private-photo-request {
    max-width: 420px;
    margin: 18px auto 4px;
}

#blueimp-gallery {
    z-index: 10050;
}

.yd-cover-settings-preview {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    border-radius: 16px;
    background-color: #17181c;
    background-position: center;
    background-size: cover;
    box-shadow: 0 15px 34px rgba(13, 18, 28, 0.18);
}

.yd-cover-settings-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 5, 7, 0.88) 0%, rgba(5, 5, 7, 0.34) 55%, rgba(5, 5, 7, 0.12) 100%),
        linear-gradient(0deg, rgba(5, 5, 7, 0.65) 0%, transparent 62%);
}

.yd-cover-settings-avatar {
    position: absolute;
    z-index: 1;
    bottom: 22px;
    left: 22px;
    display: flex;
    align-items: center;
    gap: 13px;
    color: #ffffff;
}

.yd-cover-settings-avatar .avatar {
    width: 76px;
    height: 76px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.yd-cover-settings-avatar strong,
.yd-cover-settings-avatar span {
    display: block;
}

.yd-cover-settings-avatar strong {
    font-size: 1.1rem;
}

.yd-cover-settings-avatar span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.88rem;
}

.yd-cover-settings-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.yd-cover-file-label {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* YouDate dark and auto-dark theme compatibility. */
body.theme-dark .yd-profile-page,
body.dark .yd-profile-page,
.dark-mode .yd-profile-page {
    --yd-profile-surface: #252530;
    --yd-profile-surface-soft: #1e1e27;
    --yd-profile-border: rgba(255, 255, 255, 0.08);
    --yd-profile-text: #f7f8fb;
    --yd-profile-muted: #9da9bb;
}

@media (prefers-color-scheme: dark) {
    body.theme-auto .yd-profile-page {
        --yd-profile-surface: #252530;
        --yd-profile-surface-soft: #1e1e27;
        --yd-profile-border: rgba(255, 255, 255, 0.08);
        --yd-profile-text: #f7f8fb;
        --yd-profile-muted: #9da9bb;
    }
}

@media (max-width: 767.98px) {
    .yd-profile-page {
        width: 100%;
        max-width: none;
        min-width: 0;
        overflow-x: hidden;
    }

    .yd-profile-hero {
        position: relative;
        z-index: 10;
    }

    .yd-profile-actions {
        z-index: 20;
    }

    .yd-profile-more,
    .yd-profile-more .dropdown-menu {
        position: relative;
        z-index: 30;
    }

    .yd-profile-more .dropdown-menu {
        z-index: 2000;
    }

    .profile-content-flush > .container {
        width: 100%;
        max-width: none;
        padding-right: 0;
        padding-left: 0;
    }

    .yd-profile-page {
        width: 100%;
        max-width: none;
    }

    .yd-profile-hero {
        min-height: 0;
        padding: 28px 20px 20px;
        border-radius: 0;
    }

    .yd-profile-hero-overlay {
        position: absolute;
        z-index: 1;
        inset: 0;
        display: block;
        pointer-events: none;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 18%,
            rgba(0, 0, 0, .24) 34%,
            rgba(0, 0, 0, .68) 55%,
            rgba(0, 0, 0, .86) 73%,
            rgba(0, 0, 0, .38) 90%,
            rgba(0, 0, 0, 0) 100%
        );
    }

    .yd-profile-cover-image {
        background-position: center center;
        /* No left/right transparency on mobile. */
        --yd-cover-side-alpha: linear-gradient(
            to right,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 1) 100%
        );
        /* Mobile keeps both sides untouched and fades the bottom across
         * roughly half of the cover into the transparent page background. */
        --yd-cover-bottom-alpha: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 1) 50%,
            rgba(255, 255, 255, 0.68) 67%,
            rgba(255, 255, 255, 0.28) 84%,
            transparent 100%,
            transparent 100%
        );
    }

    .yd-profile-back {
        display: none;
        top: 12px;
        right: auto;
        left: 12px;
        width: 40px;
        height: 40px;
        padding: 0;
        border-color: rgba(255, 255, 255, 0.16);
        background: rgba(10, 10, 13, 0.7);
        color: #ffffff;
        backdrop-filter: blur(10px);
    }

    .yd-profile-back span {
        display: none;
    }

    .yd-profile-back i {
        margin: 0 !important;
    }

    .yd-profile-identity {
        padding-top: 0;
    }

    .yd-profile-share-btn {
        top: 12px;
        right: 12px;
        background: rgba(7, 9, 14, .5) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .55),
                    0 0 0 1px rgba(0, 0, 0, .28) !important;
        color: #fff !important;
        opacity: 1 !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .yd-profile-share-btn:hover,
    .yd-profile-share-btn:focus,
    .yd-profile-share-btn:active {
        background: rgba(4, 6, 10, .5) !important;
        color: #fff !important;
    }

    .yd-profile-share-btn i,
    .yd-profile-share-btn svg {
        color: #fff !important;
        stroke: currentColor;
        opacity: 1 !important;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7));
    }

    .yd-profile-cover-controls {
        top: 12px;
        right: 12px;
    }

    .yd-profile-avatar-premium {
        /* Keep the smaller mobile badge centered across the photo edge. */
        bottom: -14px;
        width: 28px;
        height: 28px;
    }

    .yd-profile-premium-diamond i,
    .yd-profile-premium-diamond svg {
        width: 22px;
        height: 22px;
        font-size: 22px;
    }

    .yd-profile-cover-btn span:not(.sr-only) {
        display: none;
    }

    .yd-profile-cover-btn {
        width: 40px;
        padding: 0;
    }

    .yd-profile-avatar {
        width: 104px;
        height: 104px;
        border-radius: 20px;
    }

    .yd-profile-name {
        font-size: 1.50rem;
    }

    .yd-profile-actions {
        position: relative;
        right: auto;
        bottom: auto;
        left: auto;
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr) 44px 64px 44px;
        grid-template-areas: "chat spacer like gift more";
        align-items: center;
        column-gap: 6px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 64px;
        margin-top: 24px;
        padding: 10px 12px;
        border-radius: 18px;
        box-sizing: border-box;
        overflow: visible;
    }

    .yd-profile-actions-right {
        display: contents;
    }

    .yd-profile-chat-btn {
        grid-area: chat;
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        margin: 0;
        padding-right: 8px;
        padding-left: 8px;
        height: 40px !important;
        min-height: 40px !important;
        border-radius: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .yd-profile-guest-message {
        grid-area: chat;
        min-width: 0;
        width: auto;
        margin: 0;
        overflow: hidden;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .yd-profile-actions-right > .btn-like-toggle {
        grid-area: like;
    }

    .yd-profile-actions-right > .yd-profile-action-btn:not(.yd-profile-boost-btn) {
        grid-area: gift;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 64px;
        min-width: 64px;
        max-width: 64px;
        height: 40px;
        flex: none;
        margin: 0;
        padding: 0 6px;
        white-space: nowrap;
        overflow: hidden;
    }

    .yd-profile-actions-right > .yd-profile-action-btn:not(.yd-profile-boost-btn) span {
        display: inline;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .yd-profile-actions-right > .yd-profile-more-pjax {
        grid-area: more;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        height: 40px;
        margin: 0;
    }

    .yd-profile-more,
    .yd-profile-more > .yd-profile-icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        height: 40px;
        margin: 0;
        padding: 0;
    }

    .yd-profile-actions-right > .yd-profile-boost-btn {
        grid-column: 3 / 6;
        justify-self: end;
        width: 132px;
        min-width: 132px;
        max-width: 132px;
        margin: 0;
    }

    .yd-profile-actions:has(> .yd-profile-guest-message) {
        grid-template-columns: minmax(0, 1fr) 100px 90px;
        grid-template-areas: "message signup signin";
    }

    .yd-profile-actions:has(> .yd-profile-guest-message) > .yd-profile-guest-message {
        grid-area: message;
    }

    .yd-profile-actions:has(> .yd-profile-guest-message) .yd-profile-actions-right > .yd-profile-chat-btn {
        grid-area: signup;
        width: 100px;
        min-width: 100px;
        max-width: 100px;
        margin: 0;
    }

    .yd-profile-actions:has(> .yd-profile-guest-message) .yd-profile-actions-right > .yd-profile-action-btn:last-child {
        grid-area: signin;
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        margin: 0;
    }

    .yd-profile-actions-right .yd-profile-icon-btn {
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        height: 40px;
        margin: 0;
        padding: 0;
    }

    .yd-profile-actions-right .yd-profile-action-btn:not(.yd-profile-boost-btn) {
        width: 64px;
        min-width: 64px;
        max-width: 64px;
        flex: 0 0 64px;
        padding: 0 6px;
    }

    .yd-profile-boost-btn {
        flex: 0 0 132px;
        width: 132px;
        min-width: 132px;
        max-width: 132px;
        margin: 0;
        height: 40px !important;
        min-height: 40px !important;
        padding-right: 15px;
        padding-left: 15px;
        border-radius: 20px;
    }

    .yd-profile-tab-content {
        padding-top: 16px;
    }

    .yd-profile-content {
        padding-right: 12px;
        padding-left: 12px;
    }

    .yd-profile-media .profile-photo-item {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 7px;
    }

    .yd-profile-media .profile-photo-item .photo-wrapper,
    .yd-profile-media .profile-photo-label {
        border-radius: 30px;
    }

    .yd-cover-settings-preview {
        min-height: 220px;
    }

    .yd-cover-settings-avatar {
        right: 16px;
        bottom: 16px;
        left: 16px;
    }
}

@media (min-width: 768px) {
    .yd-profile-media-gallery {
        width: 100%;
        max-width: 980px;
        margin-right: auto;
        margin-left: auto;
    }

    .yd-profile-media .profile-photo-item {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 1299.98px) {
    .yd-profile-back {
        top: 14px;
        right: auto;
        left: 14px;
        width: 42px;
        height: 42px;
        padding: 0;
        border-color: rgba(255, 255, 255, 0.16);
        background: rgba(10, 10, 13, 0.7);
        color: #ffffff;
        backdrop-filter: blur(10px);
    }

    .yd-profile-back span {
        display: none;
    }

    .yd-profile-back i {
        margin: 0 !important;
    }
}

@media (max-width: 399.98px) {
    .yd-profile-actions {
        align-items: stretch;
    }

    .yd-profile-actions-right {
        width: 100%;
        justify-content: space-between;
    }
}

.yd-profile-boost-btn.is-boosted,
.yd-profile-boost-btn.is-boosted:disabled {
    background: #276dcc !important;
    color: #ffffff !important;
    cursor: not-allowed;
    opacity: .9;
}

/* Owner Gifts tab and paid media unlock history */
.yd-profile-owner-gifts {
    padding: 28px 0 12px;
}

.yd-profile-gifts-title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
}

.yd-profile-gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}

.yd-profile-gift-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    text-align: center;
}

.yd-profile-gift-image {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto 10px;
    object-fit: contain;
}

.yd-profile-gift-value {
    color: #ff5d86;
    font-size: .8rem;
    font-weight: 700;
}

.yd-profile-gift-sender {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    font-size: .85rem;
    font-weight: 600;
}

.yd-profile-gift-sender img,
.yd-profile-unlock-row img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.yd-profile-gift-message {
    margin-top: 8px;
    color: var(--yd-profile-muted);
    font-size: .8rem;
    overflow-wrap: anywhere;
}

.yd-profile-gift-card time,
.yd-profile-unlock-row time {
    display: block;
    margin-top: 8px;
    color: var(--yd-profile-muted);
    font-size: .72rem;
}

.yd-profile-unlocks-list {
    display: grid;
    gap: 10px;
}

.yd-profile-unlock-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,.035);
}

.yd-profile-unlock-row strong {
    margin-left: auto;
    color: #ff5d86;
    white-space: nowrap;
}

.yd-profile-unlock-row time {
    margin: 0 0 0 8px;
    white-space: nowrap;
}

.yd-profile-gifts-empty {
    padding: 48px 16px;
    color: var(--yd-profile-muted);
    text-align: center;
}

.yd-profile-owner-gifts-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.yd-profile-owner-gifts-tab {
    padding: 9px 15px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.035);
    color: inherit;
    cursor: pointer;
    font-size: .85rem;
}

.yd-profile-owner-gifts-tab span {
    margin-left: 4px;
    opacity: .7;
}

.yd-profile-owner-gifts-tab.is-active {
    border-color: #ff5d86;
    background: rgba(255,93,134,.14);
    color: #ff5d86;
}

.yd-profile-owner-gifts-panel {
    display: none;
}

.yd-profile-owner-gifts-panel.is-active {
    display: block;
}

.yd-profile-unlock-card .yd-profile-gift-image {
    width: 88px;
    height: 88px;
}

.yd-profile-avatar-upload {
    position: absolute;
    inset: 0;
    z-index: 4;
}

.yd-profile-avatar-upload-button {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 50%;
    background: rgba(10,10,13,.78);
    color: #fff;
    cursor: pointer;
}

.yd-profile-avatar-upload-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.yd-profile-media .profile-photo-owner-actions {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 5;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity .2s ease;
}

.yd-profile-media .profile-photo-item:hover .profile-photo-owner-actions,
.yd-profile-media .profile-photo-owner-actions:focus-within {
    opacity: 1;
}

.yd-profile-media .profile-photo-owner-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    padding: 0;
}

@media (max-width: 767.98px) {
    .yd-profile-media .profile-photo-owner-actions {
        opacity: 1;
    }
}

.yd-profile-avatar-upload {
    pointer-events: none;
}

.yd-profile-avatar-upload-button {
    top: calc(100% + 10px);
    right: 50%;
    bottom: auto;
    transform: translateX(50%);
    pointer-events: auto;
}

.yd-profile-avatar-wrap:has(.yd-profile-avatar-upload) {
    margin-bottom: 42px;
}

/* On the owner's Premium profile, leave room between the edge-centered
   diamond and the separate profile-photo upload control below the avatar. */
.yd-profile-avatar-wrap:has(.yd-profile-avatar-premium) .yd-profile-avatar-upload-button {
    top: calc(100% + 22px);
}

.yd-profile-avatar-wrap:has(.yd-profile-avatar-premium):has(.yd-profile-avatar-upload) {
    margin-bottom: 54px;
}

.yd-profile-gallery-upload-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
}

.yd-profile-gallery-upload-button {
    position: relative;
    overflow: hidden;
}

.yd-profile-gallery-upload-button input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

.yd-profile-gallery-private-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--yd-profile-muted);
    font-size: .85rem;
}

#blueimp-gallery .zoom-in,
#blueimp-gallery .zoom-out,
#blueimp-gallery .zoom-reset {
    position: relative;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 34px;
    margin: 0 3px;
    border-radius: 8px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    text-decoration: none;
}

#blueimp-gallery .zoom-reset {
    width: 52px;
    font-size: .75rem;
}

#blueimp-gallery .zoom-in:hover,
#blueimp-gallery .zoom-out:hover,
#blueimp-gallery .zoom-reset:hover {
    background: rgba(255,255,255,.2);
    color: #fff;
}

#blueimp-gallery .yd-gallery-zoom-controls {
    position: absolute;
    z-index: 10060;
    top: 58px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 5px;
}

#blueimp-gallery .yd-gallery-zoom-controls button {
    border: 0;
    cursor: pointer;
}

#blueimp-gallery .yd-gallery-zoom-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 34px;
    border-radius: 7px;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 1.1rem;
}

#blueimp-gallery .yd-gallery-zoom-controls .yd-gallery-zoom-reset {
    width: 52px;
    font-size: .75rem;
}

#blueimp-gallery .yd-gallery-zoom-controls button:hover {
    background: rgba(255, 255, 255, .2);
}

/* Media gallery corner radius. Apply it to every visual layer so the image,
   locked overlay, and label all follow the same rounded shape. */
.yd-profile-media .profile-photo-item .photo-wrapper,
.yd-profile-media .profile-photo-item .photo-wrapper > img,
.yd-profile-media .profile-photo-item .photo-wrapper > .profile-photo-label,
.yd-profile-media .profile-photo-item .photo-wrapper .profile-photo-lock-overlay {
    border-radius: 36px !important;
    overflow: hidden;
}

/* Guest registration popup opened from profile actions */
.yd-profile-signup-modal .modal-content {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    background: #171720;
    color: #f7f8fb;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.yd-profile-signup-modal .modal-header,
.yd-profile-signup-modal .modal-footer {
    border-color: rgba(255, 255, 255, .08);
}

.yd-profile-signup-modal .modal-title {
    font-weight: 700;
}

.yd-profile-signup-close {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    text-shadow: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

/* Bootstrap/global modal helpers sometimes inject their own .close button. */
.yd-profile-signup-modal .modal-header > .close {
    display: none !important;
}

.yd-profile-signup-modal .form-control,
.yd-profile-signup-modal select {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.yd-profile-signup-modal select option {
    color: #182033;
}

.yd-profile-signup-modal select.form-control {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, .06) !important;
}

.yd-profile-signup-close:hover,
.yd-profile-signup-close:focus {
    color: #fff;
    opacity: .8;
    outline: 0;
}

.yd-profile-gift-image-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    color: #ff5d86;
    font-size: 2rem;
}

/* Keep the complete Send Gift dialog inside the mobile visual viewport and
   above the existing fixed bottom navigation. The navigation itself is not
   restyled or moved. Its current --bottom-nav-h variable is only read here. */
@media (max-width: 991.98px) {
    #send-gift.modal {
        z-index: 10050 !important;
        overflow: hidden !important;
        padding: 10px 12px calc(var(--bottom-nav-h, 64px) + env(safe-area-inset-bottom, 0px) + 10px) !important;
    }

    #send-gift .modal-dialog,
    #send-gift .modal-dialog.modal-dialog-centered {
        display: flex;
        align-items: stretch;
        width: 100%;
        max-width: 560px;
        min-height: 0 !important;
        height: auto;
        max-height: calc(100vh - var(--bottom-nav-h, 64px) - env(safe-area-inset-bottom, 0px) - 20px);
        max-height: calc(100dvh - var(--bottom-nav-h, 64px) - env(safe-area-inset-bottom, 0px) - 20px);
        margin: 0 auto !important;
    }

    #send-gift .modal-content {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
        max-height: inherit;
        overflow: hidden;
    }

    #send-gift .modal-content > form {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        max-height: inherit;
        overflow: hidden;
    }

    #send-gift .modal-header,
    #send-gift .modal-footer {
        flex: 0 0 auto;
    }

    #send-gift .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #send-gift .modal-footer {
        position: relative;
        z-index: 3;
        background: inherit;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yd-profile-premium-diamond i,
    .yd-profile-premium-diamond svg {
        animation: none !important;
    }
}