:root {
    --grid-frames-size: 175px; /*    Размер блоков в сетке    */
}

#framesModal .modal-content::-webkit-scrollbar,
.frames-overlay-scrollable-content::-webkit-scrollbar {
    width: 10px;
}

#framesModal .modal-content::-webkit-scrollbar-track,
.frames-overlay-scrollable-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0;
}

#framesModal .modal-content::-webkit-scrollbar-thumb,
.frames-overlay-scrollable-content::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 2px;
}

#framesModal .modal-content::-webkit-scrollbar-thumb:hover,
.frames-overlay-scrollable-content::-webkit-scrollbar-thumb:hover {
    background-color: #207ab7;
}

.block-frames {
    background: linear-gradient(1deg, #4242429e 30%, #424242 100%);
    border-radius: 10px;
    padding: 30px;
    user-select: none;
    margin-top: 10px;
    margin-bottom: 20px;
}

.block-frames .block_head {
    margin-bottom: 30px;
    font-weight: bold;
    font-size: 20px;
    color: #a8aac7;
    text-align: center;
}

.block-frames .frames-btn {
    position: relative;
    width: 100%;
    background: linear-gradient(90deg, #06BFFF 0%, #2D73FF 100%);
    border-radius: 2px;
    border: none;
    height: auto;
    -webkit-backface-visibility: unset;
    outline: none;
    padding: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    font-family: inherit;
    -webkit-transform: unset;
    text-align: center;
    cursor: pointer;
    transition: bottom 1s ease-out 0.5s;
}

.block-frames .frames-btn:hover {
    background: linear-gradient(90deg, #06BFFF 30%, #2D73FF 100%);
}

.block-frames .frames-btn.dell {
    margin-top: 6px;
    background: linear-gradient(to bottom right, #812727, #320719);
}

.block-frames .frames-btn.dell:hover {
    background: linear-gradient(to bottom right, #932525, #40071f);
}

.block-frames .frames-btn.buy {
    margin-top: 6px;
    background: linear-gradient(to bottom right, rgb(60 149 111), rgb(7 151 89));
}

.block-frames .frames-btn.buy:hover {
    background: linear-gradient(to bottom right, rgb(54 185 129), rgb(6 189 110));
}

#framesModal .modal-dialog {
    max-width: 80vw;
    max-height: 80vh;
    width: auto;
    height: auto;
}

#framesModal .modal-title {
    color: #7289da;
    font-size: 22px;
    text-align: center;
}

#framesModal .modal-content {
    max-height: 80vh;
    overflow-y: auto;
    background: radial-gradient(63.94% 1024px at 50% 200px, #244372 0%, #161A1F 100%);
    overflow-x: hidden;
}

#framesPreviews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--grid-frames-size), 1fr));
    gap: 20px;
    padding: 0;
}

.frames-item {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    padding: 10px;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .14), 0 2px 1px -1px rgba(0, 0, 0, .12), 0 1px 3px 0 rgba(0, 0, 0, .2);
    display: flex;
    flex-direction: column;
    z-index: 1;
    background: radial-gradient(63.94% 1024px at 50% 200px, #244372 0%, #161A1F 100%);
    cursor: pointer;
    -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(60%);
    backdrop-filter: blur(20px) saturate(180%) brightness(60%);
    justify-content: space-evenly;
    perspective-origin: inherit;
    transition-duration: .4s;
    transition-timing-function: cubic-bezier(0, 0.73, 0.48, 1);
    transition-property: transform;
    transform-origin: 50% 50%;
}

.frames-preview {
    width: 100%;
    position: relative;
}

.frames-item:hover {
    filter: brightness(1.1) contrast(0.95) saturate(1);
    transform: scale(1.3);
    z-index: 2;
    box-shadow: 3px 8px 8px 3px rgba(0, 0, 0, .596);
}

.frames-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.frames-info {
    padding: 10px 10px 0 10px;
    text-align: center;
}

.frames-name {
    font-weight: bold;
    color: #c5cbd8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: center;
}

#framesModal .modal-header .close {
    position: sticky;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: linear-gradient(0deg, #3D4450, #3D4450), #3b9dee;
    border-radius: 2px;
    color: #efeaea;
    padding: 10px 10px;
    font-weight: 100;
    letter-spacing: 1.5px;
    height: auto !important;
    width: auto !important;
}

.frames-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.frames-overlay.open {
    opacity: 1;
}

.frames-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 5px;
    min-width: 25%;
    max-width: 90%;
    border-radius: 20px;
    max-height: none;
    height: auto;
    overflow: visible;
    padding: 20px 25px;
    background: url(../assets/diamonds_tile.png) no-repeat, radial-gradient(100% 1000px at 20% 0px, #182333 5%, #171c22 100%);
    background-size: 100%;
    background-position: center top;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.frames-overlay-content video {
    width: 100%
}

.frames-overlay-scrollable-content {
    width: 100%;
    max-height: calc(80vh - 40px - 30px);
    overflow-y: auto;
    overflow-x: hidden;
}

.frames-overlay-content .frames-name {
    font-weight: bold;
    color: #c5cbd8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: center;
    margin-bottom: 15px;
}

.frames-overlay-image-preview {
    position: relative;
    width: 200px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: visible;
    margin: 25px auto 40px auto;
}

.frames-overlay-image-preview .frames-userAvatar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.frames-overlay-image-preview .full-frame-preview {
    position: absolute;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    top: -20px;
    left: -20px;
    z-index: 2;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.frames-overlay .btn-group {
    margin-top: 20px;
    width: 100%;
    gap: 10px;
}

#notification-container {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2001;
}

.notification {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    margin-bottom: 10px;
}

.notification.show {
    opacity: 1;
}

.notification.success {
    background-color: rgba(144, 238, 144, 0.9);
    color: #228B22;
}

.notification.error {
    background-color: rgba(240, 128, 128, 0.9);
    color: #B22222;
}

.frames-overlay .btn-group .frames-btn.back {
    width: 30%;
    background: linear-gradient(0deg, #3D4450, #3D4450), #3b9dee;
    color: #efeaea;
}

.frames-overlay .btn-group .frames-btn.back:hover {
    background: linear-gradient(0deg, #424956, #454f60), #3b9dee;
}

.frame_profile #frames_file img {
    width: 90px;
    height: 90px;
    left: -4px;
    top: -8px;
    position: absolute;
}

.frame_profile {
    position: relative;
}

@media(max-width:992px) {
    #framesModal .modal-dialog {
        max-width: 100%;
    }
    .frames-overlay .btn-group .frames-btn.back {
        width: auto;
    }
}