#mediaView{
    background-color: #000000f5;
    position: fixed;
    z-index: 9999;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    transition: opacity linear .3s;
}
#mediaView.show{
    opacity: 1;
}

#download-mediaView,
#close-mediaView{
    opacity: .5;
    z-index: 2;
    color: #fff;
    position: absolute;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}
#download-mediaView{
    left: 15px;
}
#close-mediaView{
    right: 15px;
}
#download-mediaView:hover,
#close-mediaView:hover{
    opacity: 1;
}

.mediaView-content {
    height: calc(var(--vh, 1vh) * 100);
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.swiper-container-wrapper {
    flex: 1;
    height: calc(calc(var(--vh, 1vh) * 100) - 90px);
    overflow: hidden;
}

#swiper-mediaView {
    height: 100%;
    width: 100%;
}
#mediaView .swiper-wrapper {
    height: 100%;
}
#mediaView .swiper-slide{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: auto;
}
#swiper-mediaView .swiper-slide img{
    width: auto;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    padding: 10px;
}

#prev-mediaView,
#next-mediaView{
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    width: 30px;
    height: 100px;
    opacity: .5;
    color: #fff;
    cursor: pointer;
    z-index: 2;
}
#prev-mediaView:hover,
#next-mediaView:hover{
    opacity: 1;
}
#next-mediaView{
    right: 15px;
}
#prev-mediaView {
    left: 15px;
}

.zoom-controls {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 2;
}
.zoom-controls i {
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.zoom-controls i:hover {
    opacity: 1;
}
.swiper-zoom-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.swiper-slide-zoomed .swiper-zoom-container {
    cursor: move;
}

.mediaView-thumbs {
    height: 60px;
    min-height: 60px;
    padding: 0 5px env(safe-area-inset-bottom) 5px;
    margin: 5px auto;
    flex-shrink: 0;
}
.mediaView-thumbs .swiper-slide {
    width: 80px;
    height: 80px;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s;
}
.mediaView-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid white;
}
.mediaView-thumbs .swiper-slide img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
}

/* Стили для видео-контейнеров */
#mediaView .video-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
#mediaView iframe,
#mediaView video {
    max-width: 700px;
    max-height: 90%;
    width: 100%;
    height: auto;
    object-fit: contain;
}
#mediaView iframe {
    border: none;
    aspect-ratio: 16/9;
}
#mediaView video {
    background: #000;
}
.media-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    z-index: 1;
}
.thumb-video {
    position: relative;
    width: 100%;
    height: 100%;
}
.thumb-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumb-video i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px){
    #prev-mediaView,
    #next-mediaView{
        display: none;
    }
    #mediaView iframe {
        width: 100vw;
        height: 56.25vw;
    }
    .media-title {
        font-size: 12px;
        padding: 8px;
    }
}
