.elements {
    perspective: 500px;
    position: relative;
    top: 50%;
    width: 300px;
    transform: translateY(-20px);
    color: #333;
}

.elements__demo {
    width: 300px;
    height: 200px;
    background: #fff;
    border-radius: 6px;
    position: absolute;
    transform: translateY(-50%) rotateX(57deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.elements__demo--1 {
    animation: elements1 20s infinite;
}

.elements__slider {
    width: 200px;
    height: 8px;
    background: #f39c12;
    border-radius: 4px;
    position: relative;
    top: 10px;
    animation: elements1-slider 20s infinite;
}

.elements__slider-handle {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    border: 3px solid #f39c12;
    box-sizing: border-box;
    top: 50%;
    margin-top: -12px;
    left: 30%;
    animation: elements1-slider-handle 20s infinite;
}

.elements__demo--2 {
    animation: elements2 20s infinite;
    justify-content: start;
}

.elements__card-slider {
    white-space: nowrap;
    animation: elements2-slider 20s infinite;
}

.elements__card-slider-item {
    height: 100px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: top;
    margin-left: 20px;
}

.elements__card-slider-item:nth-child(1) {
    width: 50px;
    background: #96e8b5;
}

.elements__card-slider-item:nth-child(2) {
    width: 130px;
    background: #2ecc71;
}

.elements__card-slider-item:nth-child(3) {
    width: 67px;
    background: #7fe89a;
}

.elements__card-slider-item:nth-child(4) {
    width: 90px;
    background: #96e8b5;
}


.elements__demo--3 {
    animation: elements3 20s infinite;
    align-items: start;
}

.elements__paging {
    width: 200px;
    padding: 40px 0 0;
}

.elements__paging-items {
    height: 0;
    overflow: hidden;
    animation: elements3-paging-items 20s infinite;
}

.elements__paging-item {
    height: 50px;
    background: #ffea73;
    margin-bottom: 10px;
    border-radius: 4px;
}

.elements__paging-button {
    height: 40px;
    line-height: 40px;
    background: #f1f1f1;
    border-radius: 3px;
    border: 0;
    margin: 0;
    padding: 0 12px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    position: relative;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
    text-align: center;
    animation: elements3-paging-button 20s infinite;
}

.elements__demo--4 {
    animation: elements4 20s infinite;
}

.elements__cursor {
    width: 10px;
    height: 10px;
    background-color: #e74c3c;
    border-radius: 50%;
    position: absolute;
    margin-top: -5px;
    margin-left: -5px;
    animation: elements4-cursor 20s infinite;
}

.elements__ripple {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #e74c3c;
    margin-top: -30px;
    margin-left: -30px;
    opacity: 0;
}

.elements__ripple:nth-child(2) {
    top: 25%;
    left: 75%;
    animation: elements4-ripple 20s infinite;
}

.elements__ripple:nth-child(3) {
    top: 80%;
    left: 60%;
    animation: elements4-ripple 20s 0.9s infinite;
}

.elements__ripple:nth-child(4) {
    top: 40%;
    left: 20%;
    animation: elements4-ripple 20s 1.8s infinite;
}

.elements__demo--5 {
    animation: elements5 20s infinite;
}

.elements__toast-button {
    height: 40px;
    line-height: 40px;
    background: #f1f1f1;
    border-radius: 3px;
    border: 0;
    margin: 0;
    padding: 0 12px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    position: relative;
    outline: none;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
    text-align: center;
    animation: elements5-toast-button 20s infinite;
    width: 200px;
}

.elements__toast {
    background: #333;
    border-radius: 4px;
    padding: 16px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
    position: absolute;
    top: 0%;
    left: 50%;
    animation: elements5-toast 20s infinite;
}


@media only screen and (max-width : 480px) {
    .elements {
        transform: translate(-20px, -120px) scale(0.7);
    }
}

@keyframes elements1 {
    0% { top: 0; opacity: 1; z-index: 3 }
    17% { top: 0; opacity: 1; z-index: 3 }
    19% { top: -20px; opacity: 0; z-index: 0 }
    40% { top: 60px; opacity: 0; z-index: 0 }
    58% { top: 60px; opacity: 0; z-index: 0 }
    60% { top: 40px; opacity: 0.3; z-index: 1 }
    78% { top: 40px; opacity: 0.3; z-index: 1 }
    80% { top: 20px; opacity: 0.5; z-index: 2 }
    98% { top: 20px; opacity: 0.5; z-index: 2 }
    100% { top: 0; opacity: 1; z-index: 3  }
}

@keyframes elements1-slider {
    0% { opacity: 1 }
    19% { opacity: 1 }
    20% { opacity: 0 }
    97% { opacity: 0 }
    98% { opacity: 1 }
    100% { opacity: 1 }
}

@keyframes elements1-slider-handle {
    0% { transform: scale(1); left: 5%; }
    3% { transform: scale(1.35); left: 5%; }
    10% { transform: scale(1.35); left: 55%; }
    16% { transform: scale(1.35); left: 20%; }
    19% { transform: scale(1); left: 20%; }
    100% { transform: scale(1); left: 5%; }
}

@keyframes elements2 {
    0% { top: 20px; opacity: 0.5; z-index: 2 }
    18% { top: 20px; opacity: 0.5; z-index: 2 }
    20% { top: 0; opacity: 1; z-index: 3 }
    37% { top: 0; opacity: 1; z-index: 3 }
    39% { top: -20px; opacity: 0; z-index: 0 }
    60% { top: 60px; opacity: 0; z-index: 0 }
    78% { top: 60px; opacity: 0; z-index: 0; }
    80% { top: 40px; opacity: 0.3; z-index: 1 }
    98% { top: 40px; opacity: 0.3; z-index: 1 }
    100% { top: 20px; opacity: 0.5; z-index: 2 }
}

@keyframes elements2-slider {
    0% { opacity: 0 }
    17% { opacity: 1 }
    18% { opacity: 1 }
    20% { transform: translateX(0) }
    27% { transform: translateX(-40px) }
    31% { transform: translateX(-140px) }
    34% { transform: translateX(-140px) }
    39% { opacity: 1; transform: translateX(-100px) }
    40% { opacity: 1; transform: translateX(-100px) }
    100% { opacity: 0 }
}

@keyframes elements3 {
    0% { top: 40px; opacity: 0.3; z-index: 1  }
    18% { top: 40px; opacity: 0.3; z-index: 1  }
    20% { top: 20px; opacity: 0.5; z-index: 2  }
    38% { top: 20px; opacity: 0.5; z-index: 2 }
    40% { top: 0; opacity: 1; z-index: 3  }
    57% { top: 0; opacity: 1; z-index: 3 }
    59% { top: -20px; opacity: 0; z-index: 0 }
    80% { top: 60px; opacity: 0; z-index: 0 }
    98% { top: 60px; opacity: 0; z-index: 0  }
    100% { top: 40px; opacity: 0.3; z-index: 1  }
}

@keyframes elements3-paging-button {
    0% { opacity: 0 }
    38% { opacity: 0 }
    40% { opacity: 1 }
    42% { background: #f1f1f1 }
    43% { background: #e8e8e8 }
    43.5% { top: 1px; background: #e8e8e8 }
    44% { top: 0; background: #f1f1f1; opacity: 1 }
    45.5% { opacity: 0.7; }
    47% { opacity: 1 }
    48.5% { opacity: 0.7; }
    50% { opacity: 1 }
    61% { opacity: 1 }
    62% { opacity: 0 }
    100% { opacity: 0 }
}

@keyframes elements3-paging-items {
    0% { height: 0 }
    50% { height: 0 }
    57% { height: 240px }
    62% { height: 240px }
    100% { height: 0 }
}

@keyframes elements4 {
    0% { top: 60px; opacity: 0; z-index: 0  }
    18% { top: 60px; opacity: 0; z-index: 0 }
    20% { top: 40px; opacity: 0.3; z-index: 1 }
    38% { top: 40px; opacity: 0.3; z-index: 1 }
    40% { top: 20px; opacity: 0.5; z-index: 2 }
    58% { top: 20px; opacity: 0.5; z-index: 2 }
    60% { top: 0; opacity: 1; z-index: 3 }
    77% { top: 0; opacity: 1; z-index: 3 }
    79% { top: -20px; opacity: 0; z-index: 0 }
    100% { top: 60px; opacity: 0; z-index: 0 }
}

@keyframes elements4-cursor {
    0% { opacity: 0 }
    58% { opacity: 0 }
    60% { opacity: 1; top: 50%; left: 50%; }
    65% { top: 25%; left: 75%; }
    70% { top: 80%; left: 60%; }
    75% { top: 40%; left: 20%; }
    79% { opacity: 1 }
    80% { opacity: 0 }
    100% { opacity: 0 }
}

@keyframes elements4-ripple {
    0% { opacity: 0 }
    58% { opacity: 0 }
    65% { opacity: 0 }
    65.5% { opacity: 1; transform: scale(1) }
    68% { transform: scale(0); opacity: 1 }
    69% { transform: scale(0); opacity: 0 }
    100% { opacity: 0 }
}

@keyframes elements5 {
    0% { top: 60px; opacity: 0; z-index: 0; }
    38% { top: 60px; opacity: 0; z-index: 0; }
    40% { top: 40px; opacity: 0.3; z-index: 1; }
    58% { top: 40px; opacity: 0.3; z-index: 1; }
    60% { top: 20px; opacity: 0.5; z-index: 2; }
    78% { top: 20px; opacity: 0.5; z-index: 2;}
    80% { top: 0; opacity: 1; z-index: 3  }
    97% { top: 0; opacity: 1; z-index: 3  }
    99% { top: -20px; opacity: 0; z-index: 0 }
    100% { top: -20px; opacity: 0; z-index: 0 }
}

@keyframes elements5-toast-button {
    0% { opacity: 0 }
    78% { opacity: 0 }
    80% { opacity: 1 }
    82% { background: #f1f1f1 }
    83% { background: #e8e8e8 }
    83.5% { top: 1px; background: #e8e8e8 }
    84% { top: 0; background: #f1f1f1; opacity: 1 }
    85.5% { opacity: 0.7; }
    87% { opacity: 1 }
    88.5% { opacity: 0.7; }
    90% { opacity: 1 }
    99% { opacity: 1 }
    100% { opacity: 0 }
}

@keyframes elements5-toast {
    0% { transform: translate(-50%, -100%) }
    90% { transform: translate(-50%, -100%) }
    92% { transform: translate(-50%, 60%) }
    100% { transform: translate(-50%, 60%) }
}