/* Video Player Dialog Styles */
.video-player-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.video-player-dialog.active {
    opacity: 1;
    visibility: visible;
}

.video-player-container {
    position: absolute;
    width: 960px;
    height: 540px;
    max-width: 100vw;
    max-height: 100vh;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 320px;
    min-height: 240px;
}

.video-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    cursor: move;
    user-select: none;
}

.video-player-title {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    margin-right: 20px;
}

.video-player-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.video-player-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-player-close svg {
    width: 20px;
    height: 20px;
}

.video-player-wrapper {
    width: 100%;
    height: 100%;
    background: #000;
}

/* DPlayer customization */
.video-player-wrapper .dplayer {
    width: 100%;
    height: 100%;
}

/* Loading state */
.video-player-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.video-player-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Resize handles for all corners and edges */
.video-player-resize-handle {
    position: absolute;
    z-index: 100;
    background: transparent;
}

.video-player-resize-handle.nw {
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
}

.video-player-resize-handle.ne {
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nesw-resize;
}

.video-player-resize-handle.sw {
    bottom: 0;
    left: 0;
    width: 20px;
    height: 20px;
    cursor: nesw-resize;
}

.video-player-resize-handle.se {
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
}

.video-player-resize-handle.n {
    top: 0;
    left: 20px;
    right: 20px;
    height: 10px;
    cursor: ns-resize;
}

.video-player-resize-handle.s {
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 10px;
    cursor: ns-resize;
}

.video-player-resize-handle.w {
    top: 20px;
    left: 0;
    bottom: 20px;
    width: 10px;
    cursor: ew-resize;
}

.video-player-resize-handle.e {
    top: 20px;
    right: 0;
    bottom: 20px;
    width: 10px;
    cursor: ew-resize;
}

/* Responsive */
@media (max-width: 768px) {
    .video-player-container {
        width: 95%;
    }

    .video-player-header {
        padding: 10px 15px;
    }

    .video-player-title {
        font-size: 14px;
    }
}
