.cvp-wrapper {
    position: relative;
    width: 100%;
}

.cvp-video-container {
    position: relative;
    width: 100%;
    background-color: #000;
    overflow: hidden;
}

.cvp-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cvp-controls {
    position: absolute;
    bottom: 10%;
    left: 50%;
    right: 0;
    background: linear-gradient(to top, rgb(0 0 0 / 53%), rgb(0 0 0 / 37%), transparent);
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    margin: 0 auto;
    width: 60%;
    transform: translateX(-50%);
    border-radius: 12px;
    -webkit-backdrop-filter: blur(40px);
    backdrop-filter: blur(40px);
}

.cvp-wrapper:hover .cvp-controls,
.cvp-controls:focus-within {
    opacity: 1;
}

.cvp-controls-top {
    margin-bottom: 15px;
}

.cvp-controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cvp-controls-left,
.cvp-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cvp-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cvp-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.cvp-btn svg {
    fill: currentColor;
}

.cvp-time-display {
    color: #fff;
    font-size: 14px;
    margin-bottom: 8px;
    font-family: monospace;
}

.cvp-time-separator {
    margin: 0 5px;
}

.cvp-progress-container {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.cvp-progress-bar {
    height: 5px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.cvp-progress-filled {
    height: 100%;
    background-color: #3498db;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.cvp-progress-filled::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cvp-progress-container:hover .cvp-progress-filled::after {
    opacity: 1;
}

.cvp-progress-container:hover .cvp-progress-bar {
    height: 7px;
}

@media (max-width: 767px) {
    /* nascondo rewind e forward button da mobile perchè non sempre si cliccano correttamente da mob */
    .cvp-rewind-btn, .cvp-forward-btn {
        display: none;
    }

    .cvp-video-container {
        overflow: visible;
    }

    .cvp-controls {
        padding: 15px;
        opacity: 1;
        bottom: -112px;
        z-index: unset;
    }

    .cvp-controls-bottom {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cvp-btn {
        padding: 6px;
    }

    .cvp-btn svg {
        width: 20px;
        height: 20px;
    }

    .cvp-time-display {
        font-size: 12px;
    }

    .cvp-pip-btn {
        display: none;
    }

    .cvp-controls {
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .cvp-controls {
        padding: 10px;
    }

    .cvp-controls-left,
    .cvp-controls-right {
        gap: 5px;
    }
}

.cvp-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cvp-spin 1s linear infinite;
}

@keyframes cvp-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.cvp-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.cvp-play-overlay:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.cvp-play-overlay svg {
    width: 40px;
    height: 40px;
    fill: #fff;
    margin-left: 5px;
}