.ramka-5 {
    position: relative;
    z-index: 0;
    width: 500px;
    height: 500x;
    border-radius: 10px;
    overflow: hidden;
    margin: 30px auto;
    display: flex;
    align-items: center;
    justify-content: center;  
    font-size: 24px;
    font-family: 'Roboto Condensed', sans-serif;     
}
.ramka-5::before {
    content: '';
    position: absolute;
    z-index: -2;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background-color: #DC143C;
    background-repeat: no-repeat;
    background-size: 50% 50%, 50% 50%;
    background-position: 0 0, 100% 0, 100% 100%, 0 100%;
    background-image: linear-gradient(#DC143C, #DC143C), linear-gradient(#337AB7, #337AB7), linear-gradient(#DC143C, #DC143C), linear-gradient(#337AB7, #337AB7);
    animation: anim-ramka-5 4s linear infinite;
}
.ramka-5::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 6px;
    top: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    background: white;
    border-radius: 5px;
}
@keyframes anim-ramka-5 {
    100% {
        transform: rotate(1turn);
    }
}