.assetPopupOverlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 22, 45, 0.58);
    backdrop-filter: blur(5px);
    box-sizing: border-box;
}

.assetPopupOverlay.visible {
    display: flex;
}

.assetPopup {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(800px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
    background: #ffffff;
    border-radius: 26px;
    box-shadow: 0 30px 90px rgba(5, 20, 45, 0.30);
    color: #102043;
    font-family: 'Inter', Arial, sans-serif;
}

.assetPopupMedia {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 1;
    flex-shrink: 0;
    overflow: hidden;
    background: #edf2fa;
}

.assetPopupMedia.noBanner {
    aspect-ratio: 8 / 3;
}

.assetPopupMedia img,
.assetPopupMedia canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.assetPopupMedia img {
    object-fit: cover;
    object-position: center;
}

.assetPopupMedia canvas {
    display: none;
}

.assetPopupMedia.edgeStretch img {
    display: none;
}

.assetPopupMedia.edgeStretch canvas {
    display: block;
}

.assetPopupMedia > img,
.assetPopupMedia > canvas {
    opacity: 0;
}

.assetPopupMedia.imageReady > img,
.assetPopupMedia.imageReady > canvas {
    opacity: 1;
}

.assetPopupMedia > img,
.assetPopupMedia > canvas,
.assetPopupBannerInfo,
.assetPopupPro,
.assetPopupScroll {
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.assetPopup.assetSwitching .assetPopupMedia > img,
.assetPopup.assetSwitching .assetPopupMedia > canvas,
.assetPopup.assetSwitching .assetPopupBannerInfo,
.assetPopup.assetSwitching .assetPopupPro,
.assetPopup.assetSwitching .assetPopupScroll {
    opacity: 0;
}

.assetPopup.assetSwitching .assetPopupScroll {
    transform: translateY(5px);
}

.assetPopupTitleLine {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
}

.assetPopupTitleLine .assetPopupTitle {
    width: auto !important;
    max-width: 100%;
    flex: 0 1 auto;
    min-width: 0;
}

.assetPopupType {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

.assetPopupType.plugin {
    background: #eee8ff;
    color: #7950e8;
}

.assetPopupType.page {
    background: #e4f7e7;
    color: #36a945;
}

.assetPopupType.iconpack {
    background: #e5f2ff;
    color: #308bdc;
}

.assetPopupBannerInfo {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #263752;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.assetPopupBannerInfo.visible {
    display: inline-flex;
}

.assetPopupPro {
    position: absolute;
    right: 18px;
    bottom: 16px;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff4ce;
    color: #7a5600;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

.assetPopupPro.visible {
    display: inline-flex;
}

.assetPopupClose {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #102043;
    cursor: pointer;
}

.assetPopupClose:hover {
    background: #ffffff;
}

.assetPopupClose svg {
    display: block;
    width: 20px;
    height: 20px;
}

.assetPopupScroll {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.assetPopupContent {
    padding: 24px 36px 34px;
}

.assetPopupHeader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 30px;
}

.assetPopupIdentity {
    min-width: 0;
    text-align: left !important;
}

.assetPopupTitle {
    margin: 0;
    text-align: left !important;
    color: #0b1735;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 38px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.012em;
}

.assetPopupAuthor {
    display: none;
    margin-top: 7px;
    color: #748099;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.assetPopupAuthor.visible {
    display: block;
}

.assetPopupAuthor a {
    color: #168fd0;
    text-decoration: none;
    font-weight: 700;
}

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

.assetPopupDownloads {
    min-width: 105px;
    padding-top: 3px;
    text-align: right;
}

.assetPopupDownloadsLabel {
    display: block;
    color: #919caf;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
}

.assetPopupDownloadsValue {
    display: block;
    margin-top: 6px;
    color: #263752;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
}

.assetPopupPlatforms {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 20px;
}

.assetPopupPlatforms.visible {
    display: flex;
}

.assetPopupPlatformsLabel {
    flex-shrink: 0;
    color: #8c96a8;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
}

.assetPopupPlatformItems {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.assetPopupPlatform {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #33445e;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.assetPopupPlatform img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.assetPopupDependencies {
    display: none;
    margin-top: 14px;
    color: #7c879a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
}

.assetPopupDependencies.visible {
    display: block;
}

.assetPopupDependencies strong {
    color: #59667d;
    font-weight: 700;
}

.assetPopupDescription {
    margin-top: 24px;
    color: #43506a;
    font-size: 15px;
    line-height: 1.65;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.assetPopupDescription p:first-child {
    margin-top: 0;
}

.assetPopupDescription p:last-child {
    margin-bottom: 0;
}

.assetPopupDescription ul {
    padding-left: 22px;
}

.assetPopupDescription ol {
    padding-left: 22px;
}

.assetPopupDescription a {
    color: #168fd0;
}

.assetPopupRelated {
    display: none;
    margin-top: 30px;
}

.assetPopupRelated.visible {
    display: block;
}

.assetPopupRelatedTitle {
    margin: 0 0 12px 0;
    color: #263752;
    font-size: 15px;
    line-height: 1;
    font-weight: 700;
}

.assetPopupRelatedItems {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.assetPopupRelatedItem {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.48 / 1;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce3eb;
    border-radius: 15px;
    background: #dfe6ef;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    isolation: isolate;
    transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.assetPopupRelatedItem::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(5, 13, 27, 0.04) 18%, rgba(5, 13, 27, 0.16) 45%, rgba(5, 13, 27, 0.88) 100%);
    pointer-events: none;
}

.assetPopupRelatedItem:hover {
    border-color: #b8c5d3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 32, 67, 0.14);
}

.assetPopupRelatedImage {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #dfe6ef;
}

.assetPopupRelatedImage img,
.assetPopupRelatedImage canvas {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.18s ease;
}

.assetPopupRelatedImage img {
    object-fit: cover;
    object-position: center;
}

.assetPopupRelatedImage canvas {
    object-fit: fill;
}

.assetPopupRelatedItem:hover .assetPopupRelatedImage img,
.assetPopupRelatedItem:hover .assetPopupRelatedImage canvas {
    transform: scale(1.025);
}

.assetPopupRelatedText {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 14px;
    pointer-events: none;
}

.assetPopupRelatedType {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 23px;
    margin: 0 0 7px 0;
    padding: 0 9px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(5, 13, 27, 0.16);
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
}

.assetPopupRelatedType.plugin {
    background: #eee8ff;
    color: #7950e8;
}

.assetPopupRelatedType.page {
    background: #e4f7e7;
    color: #36a945;
}

.assetPopupRelatedType.iconpack {
    background: #e5f2ff;
    color: #308bdc;
}

.assetPopupRelatedName {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
    white-space: nowrap;
}


.assetPopupVideos {
    display: none;
    margin-top: 30px;
}

.assetPopupVideos.visible {
    display: block;
}

.assetPopupVideosTitle {
    margin: 0 0 12px 0;
    color: #263752;
    font-size: 15px;
    line-height: 1;
    font-weight: 700;
}

.assetPopupVideoItems {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.assetPopupVideoItem {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce3eb;
    border-radius: 15px;
    background: #162235;
    color: #ffffff !important;
    text-decoration: none !important;
    cursor: pointer;
    box-sizing: border-box;
    isolation: isolate;
    transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.assetPopupVideoItem::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(5, 13, 27, 0.02) 35%, rgba(5, 13, 27, 0.82) 100%);
    pointer-events: none;
}

.assetPopupVideoItem:hover {
    border-color: #b8c5d3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 32, 67, 0.14);
}

.assetPopupVideoThumbnail {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.18s ease;
}

.assetPopupVideoItem:hover .assetPopupVideoThumbnail {
    transform: scale(1.025);
}

.assetPopupVideoPlay {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: #102043;
    transform: translate(-50%, -50%);
    box-shadow: 0 5px 18px rgba(5, 13, 27, 0.22);
    pointer-events: none;
}

.assetPopupVideoPlay svg {
    display: block;
    width: 22px;
    height: 22px;
    margin-left: 2px;
}

.assetPopupVideoLanguage {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #33445e;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(5, 13, 27, 0.12);
    pointer-events: none;
}

.assetPopupVideoLanguage.visible {
    display: inline-flex;
}

.assetPopupVideoTitle {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 13px;
    z-index: 2;
    overflow: hidden;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 700;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
    white-space: nowrap;
    pointer-events: none;
}

.assetPopupActions {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 28px;
}

.assetPopupPrimary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 3 1 0;
    min-width: 0;
    min-height: 54px;
    padding: 0 24px;
    border-radius: 13px;
    background: #168fd0;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 15px;
    line-height: 1;
    font-weight: 700;
    box-sizing: border-box;
    transition: background-color 0.12s ease;
}

.assetPopupPrimary:hover {
    background: #087fbd;
}

.assetPopupPrimary.hidden {
    display: none;
}

.assetPopupSupport {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 54px;
    padding: 0 20px;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    background: #ffffff;
    color: #19375f !important;
    text-decoration: none !important;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    box-sizing: border-box;
}

.assetPopupSupport.visible {
    display: flex;
}

.assetPopupSupport:hover {
    background: #f5f7fa;
    border-color: #aebccc;
}

.assetPopupError {
    display: none;
    padding: 38px 36px;
    color: #7c879a;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.assetPopupError.visible {
    display: block;
}

body.assetPopupOpen {
    overflow: hidden;
}

@media (max-width: 700px) {
    .assetPopupOverlay {
        padding: 10px;
    }

    .assetPopup {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 22px;
    }

    .assetPopupContent {
        padding: 22px 22px 28px;
    }

    .assetPopupTitle {
        font-size: 32px;
    }

    .assetPopupBannerInfo {
        left: 14px;
        bottom: 13px;
    }

    .assetPopupPro {
        right: 14px;
        bottom: 13px;
    }

    .assetPopupClose {
        top: 13px;
        right: 14px;
    }
}

@media (max-width: 520px) {
    .assetPopupHeader {
        gap: 16px;
    }

    .assetPopupTitle {
        font-size: 28px;
    }

    .assetPopupDownloads {
        min-width: 82px;
    }

    .assetPopupDownloadsValue {
        font-size: 20px;
    }

    .assetPopupPlatforms {
        gap: 10px 14px;
    }

    .assetPopupRelatedItems {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assetPopupVideoItems {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .assetPopupTitleLine {
        flex-wrap: wrap;
        width: 100%;
    }

    .assetPopupRelatedItems {
        grid-template-columns: 1fr;
    }

    .assetPopupRelatedItem {
        aspect-ratio: 1.75 / 1;
    }

    .assetPopupRelatedText {
        padding: 13px;
    }

    .assetPopupRelatedName {
        font-size: 16px;
    }

    .assetPopupOverlay {
        align-items: center;
        padding: 10px;
    }

    .assetPopup {
        width: calc(100vw - 20px);
        height: auto;
        max-height: calc(100dvh - 20px);
        border-radius: 18px;
    }

    .assetPopupContent {
        padding: 20px 18px 28px;
    }

    .assetPopupHeader {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .assetPopupTitle {
        font-size: 25px;
    }

    .assetPopupDownloadsLabel {
        font-size: 11px;
    }

    .assetPopupDownloadsValue {
        font-size: 18px;
    }

    .assetPopupActions {
        flex-direction: column;
    }

    .assetPopupPrimary,
    .assetPopupSupport {
        flex: none;
        width: 100%;
    }
}
