.yg-media-viewer {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 22px;
    color: #fff;
    background: rgba(7, 19, 34, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.yg-media-viewer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.yg-media-viewer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
}

.yg-media-viewer__counter {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 600;
}

.yg-media-viewer__actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.yg-media-viewer__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.yg-media-viewer__button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.32);
}

.yg-media-viewer__button i {
    font-size: 21px;
    line-height: 1;
}

.yg-media-viewer__stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
}

.yg-media-viewer__image {
    max-width: min(1120px, 92vw);
    max-height: calc(100vh - 170px);
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.yg-media-viewer__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.yg-media-viewer__prev { left: clamp(0px, 3vw, 34px); }
.yg-media-viewer__next { right: clamp(0px, 3vw, 34px); }

.yg-media-viewer__nav:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.yg-media-viewer__caption {
    min-height: 28px;
    padding-top: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    font-weight: 500;
}

body.yg-media-viewer-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .yg-media-viewer {
        padding: 14px;
    }

    .yg-media-viewer__image {
        max-width: 94vw;
        max-height: calc(100vh - 150px);
        border-radius: 10px;
    }

    .yg-media-viewer__nav {
        top: auto;
        bottom: 18px;
        transform: none;
    }
}
