/* XGPlayer custom styles */
.xgplayer {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Ensure the video container occupies the entire area */
.xgplayer video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    background-color: #000000 !important;
}

/* Hide all default control elements */
.xgplayer .xgplayer-controls,
.xgplayer .xgplayer-play,
.xgplayer .xgplayer-start,
.xgplayer .xgplayer-center,
.xgplayer .xgplayer-play-icon,
.xgplayer .xgplayer-icon-play,
.xgplayer .xgplayer-icon,
.xgplayer .xgplayer-time,
.xgplayer .xgplayer-playbackrate,
.xgplayer .xgplayer-volume,
.xgplayer .xgplayer-fullscreen,
.xgplayer .xgplayer-setting,
.xgplayer .xgplayer-download,
.xgplayer .xgplayer-pip,
.xgplayer .xgplayer-progress,
.xgplayer .xgplayer-progress-bar,
.xgplayer .xgplayer-progress-outer,
.xgplayer .xgplayer-progress-inner,
.xgplayer .xgplayer-mask,
.xgplayer .xg-mask,
.xgplayer .xgplayer-layer,
.xgplayer .xgplayer-interact,
.xgplayer .xg-trigger,
.xgplayer .xg-trigger.trigger,
.xgplayer .xgplayer-overlay,
.xgplayer .xgplayer-modal,
.xgplayer .xgplayer-popup,
.xgplayer .xgplayer-loading,
.xgplayer .xgplayer-loading-icon,
.xgplayer .xgplayer-loading-text {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide replay interface */
.xgplayer .xgplayer-replay,
.xgplayer .xgplayer-replay-icon,
.xgplayer .xgplayer-replay-txt,
.xgplayer .xgplayer-replay-text,
.xgplayer .xgplayer-replay-button,
.xgplayer .xgplayer-replay-overlay,
.xgplayer .xgplayer-replay-mask,
.xgplayer .xgplayer-replay-layer,
.xgplayer .xgplayer-replay-modal,
.xgplayer .xgplayer-replay-popup,
.xgplayer .xgplayer-replay-trigger,
.xgplayer .xgplayer-replay-center,
.xgplayer .xgplayer-replay-wrapper,
.xgplayer .xgplayer-replay-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide playback completion status */
.xgplayer.xgplayer-ended .xgplayer-replay,
.xgplayer.xgplayer-ended .xgplayer-replay-icon,
.xgplayer.xgplayer-ended .xgplayer-replay-txt,
.xgplayer.xgplayer-ended .xgplayer-replay-text,
.xgplayer.xgplayer-ended .xgplayer-replay-button,
.xgplayer.xgplayer-ended .xgplayer-replay-overlay,
.xgplayer.xgplayer-ended .xgplayer-replay-mask,
.xgplayer.xgplayer-ended .xgplayer-replay-layer,
.xgplayer.xgplayer-ended .xgplayer-replay-modal,
.xgplayer.xgplayer-ended .xgplayer-replay-popup,
.xgplayer.xgplayer-ended .xgplayer-replay-trigger,
.xgplayer.xgplayer-ended .xgplayer-replay-center,
.xgplayer.xgplayer-ended .xgplayer-replay-wrapper,
.xgplayer.xgplayer-ended .xgplayer-replay-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide player error prompts */
.xgplayer .xgplayer-error,
.xgplayer .xgplayer-error-text {
    display: none !important;
}

/* Ensure the player background is transparent */
.xgplayer {
    background-color: transparent !important;
}

/* Disable the player's default interactions */
.xgplayer {
    pointer-events: none;
}

.xgplayer video {
    pointer-events: none;
}

/* Custom loading status */
.xgplayer-loading-custom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

/* Custom error status */
.xgplayer-error-custom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 16px;
    text-align: center;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Ensure the player works correctly during container switching */
.xgplayer.switching {
    transition: none !important;
}

.xgplayer.switching video {
    transition: none !important;
}

/* Mobile optimization */
@media (max-width: 480px) {
    .xgplayer {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .xgplayer video {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Ensure the player works correctly in all browsers */
.xgplayer video::-webkit-media-controls {
    display: none !important;
}

.xgplayer video::-webkit-media-controls-panel {
    display: none !important;
}

.xgplayer video::-webkit-media-controls-play-button {
    display: none !important;
}

.xgplayer video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.xgplayer video::-webkit-media-controls-timeline {
    display: none !important;
}

.xgplayer video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.xgplayer video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.xgplayer video::-webkit-media-controls-mute-button {
    display: none !important;
}

.xgplayer video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.xgplayer video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* Force hide all replay-related elements */
.xgplayer *[class*="replay"],
.xgplayer *[class*="Replay"],
.xgplayer *[class*="REPLAY"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ensure no mask is displayed when playback is complete */
.xgplayer.xgplayer-ended {
    background-color: transparent !important;
}

.xgplayer.xgplayer-ended::after,
.xgplayer.xgplayer-ended::before {
    display: none !important;
    content: none !important;
}

/* Disable default behavior when playback is complete */
.xgplayer.xgplayer-ended {
    pointer-events: none;
}

.xgplayer.xgplayer-ended video {
    pointer-events: none;
} 