.video-player {
    background: #000;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    cursor: none;
}

.video-player.show-controls {
    cursor: default;
}

.video-player video {
    width: 100%;
    height: 100%;
}

.video-player .wrapper {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(46px);
    transition: opacity, transform, 0.2s ease-in-out;
    z-index: 3;
}

.video-player.show-controls .wrapper {
    opacity: 1;
    transform: translateY(-12px);
}

/* Name */
.video-player .video-name {
    position: absolute;
    opacity: 0;
    padding: 20px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 100%;
    color: #fff;
    background: linear-gradient(rgba(0, 0, 0, 0.6) 25%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.2) 75%, transparent 100%);
    transition: opacity 0.2s ease-in-out;
}

.video-player.show-controls .video-name {
    opacity: 1;
}

/* Controls */
.video-player .wrapper .controls {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(50px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 4px;
    gap: 4px;
    border-radius: 4px;
    width: 50%;
}

/* Button */
.video-player .wrapper .controls button {
    padding: 10px;
    border: none;
    background: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.video-player .wrapper .controls button:hover {
    background: rgba(255, 255, 255, 0.075);
}

.video-player .wrapper .controls button svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

/* Time */
.video-player .wrapper .controls span {
    margin: 0 8px;
}

/* Progress */
.video-player .wrapper .controls .progress {
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    outline: none;
    border-radius: 8px;
    width: 100%;
}

.video-player .wrapper .controls .progress::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--videoPlayerColor);
    border: 6px solid rgba(50, 50, 50);
    border-radius: 50%;
    cursor: default;
    transition: border ease-in-out 0.1s;
}

.video-player .wrapper .controls .progress::-webkit-slider-thumb:hover {
    border-width: 4px;
}

/* Loader */
.video-player .video-player-loader {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.video-player .video-player-loader:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.5);
}

.video-player .video-player-loader .video-player-spinner {
    z-index: 2;
    width: 100px;
    aspect-ratio: 1;
    background:
        radial-gradient(farthest-side, var(--videoPlayerColor) 92%, transparent) top,
        radial-gradient(farthest-side, #eee 92%, transparent) left,
        radial-gradient(farthest-side, #eee 92%, transparent) right,
        radial-gradient(farthest-side, #eee 92%, transparent) bottom;
    background-size: 16px 16px;
    background-repeat: no-repeat;
    animation: videoPlayerSpin cubic-bezier(1, 0.95, 0.95, 1) 1s infinite;
}

@keyframes videoPlayerSpin {
    0% {
        transform: rotate(0turn);
    }

    50% {
        width: calc(100px * 0.45);
        transform: rotate(0.5turn);
    }

    100% {
        transform: rotate(1turn);
    }
}

@media (max-width: 900px) {
    .video-player .wrapper .controls {
        width: 100%;
    }

    .video-player.show-controls .wrapper {
        transform: translateY(0);
    }
}