@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#vid-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, background-color 0.35s ease, visibility 0.35s;
}

#vid-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    background-color: rgba(0, 0, 0, 0.88);
}

#vid-box {
    position: relative;
    width: min(880px, 95vw);
}

#vid-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#vid-close:hover {
    opacity: 1;
}

#vid-frame {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

#vid-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    outline: none;
}

#vid-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#vid-spin-circle {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}