/* --- VPlayerViet Global Styles V1.3.0 --- */
.vpv-player-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-family: 'Montserrat', sans-serif;
}

/* Header Bar */
.vpv-header-bar {
    text-align: center;
    padding: 12px;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    border-radius: 8px 8px 0 0;
    line-height: 1.4;
}
.vpv-blink { animation: vpv-blink-anim 1.5s infinite; }
@keyframes vpv-blink-anim { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Video Frame */
.vpv-video-frame {
    position: relative;
    background: #000;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10;
}
.vpv-player-wrapper:not(:has(.vpv-header-bar)) .vpv-video-frame { border-radius: 8px; }

.vpv-video-inner {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}
.vpv-video-inner.vpv-fullscreen-mode {
    padding-bottom: 0;
    height: 100vh;
}

/* Interaction Mask (Secure Layer) */
.vpv-interaction-mask {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 20; /* Trên video, dưới controls */
    background: transparent;
    cursor: pointer;
}

/* Custom Logo */
.vpv-custom-logo {
    position: absolute; z-index: 35; /* Trên tất cả */
    display: block; opacity: 0.8; transition: opacity 0.3s;
    max-width: 15%;
}
.vpv-custom-logo:hover { opacity: 1; }
.vpv-custom-logo img { width: 100%; height: auto; display: block; }
.vpv-logo-top-left { top: 15px; left: 15px; }
.vpv-logo-top-right { top: 15px; right: 15px; }

/* Audio Mode (MP3) */
.vpv-audio-mode .vpv-video-inner { padding-bottom: 56.25%; }
.vpv-audio-poster {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
}

.vpv-youtube-embed, .vpv-vimeo-embed, .vpv-html5-embed {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* Big Play Button */
.vpv-big-play {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    border: 3px solid #fff;
    color: #fff;
    width: 80px; height: 80px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    z-index: 25; /* Trên Mask */
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    padding-left: 5px;
    pointer-events: auto;
}
.vpv-big-play:hover { background: #e74c3c; border-color: #e74c3c; transform: translate(-50%, -50%) scale(1.1); }

/* Custom Controls Bar */
.vpv-custom-controls {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 45px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0));
    display: flex; align-items: center;
    padding: 0 15px; box-sizing: border-box;
    z-index: 30; opacity: 0; transition: opacity 0.3s;
    pointer-events: auto;
}
.vpv-video-frame:hover .vpv-custom-controls { opacity: 1; }
.vpv-audio-mode .vpv-custom-controls { opacity: 1; background: rgba(0,0,0,0.6); }

.vpv-custom-controls button {
    background: none; border: none; color: #fff;
    cursor: pointer; font-size: 16px; margin-right: 12px; padding: 0;
    min-width: 20px; text-align: center;
}
.vpv-custom-controls button:hover { color: #e74c3c; }

/* Progress Bar */
.vpv-progress-bar {
    flex-grow: 1; height: 5px; background: rgba(255,255,255,0.3);
    border-radius: 3px; cursor: pointer; position: relative; margin: 0 15px;
    transition: height 0.1s;
}
.vpv-progress-bar:hover { height: 7px; }
.vpv-progress-filled { height: 100%; width: 0%; background: #e74c3c; border-radius: 3px; position: relative; }
.vpv-progress-filled::after {
    content: ''; position: absolute; right: -5px; top: -2.5px;
    width: 10px; height: 10px; background: #fff; border-radius: 50%;
    transform: scale(0); transition: transform 0.1s;
}
.vpv-progress-bar:hover .vpv-progress-filled::after { transform: scale(1); }

.vpv-time-display { color: #fff; font-size: 12px; margin-right: 10px; min-width: 80px; text-align: center; font-variant-numeric: tabular-nums; }

/* Volume Slider */
.vpv-volume-slider-container { width: 0; overflow: hidden; transition: width 0.2s; display: flex; align-items: center; margin-right: 10px; }
.vpv-custom-controls:hover .vpv-volume-slider-container { width: 80px; }
.vpv-volume-slider { width: 100%; height: 4px; cursor: pointer; border-radius: 2px; -webkit-appearance: none; background: rgba(255,255,255,0.3); }
.vpv-volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; }

/* Settings Menu */
.vpv-settings-container { position: relative; margin-right: 10px; }
.vpv-settings-menu {
    position: absolute; bottom: 30px; right: -20px;
    background: rgba(0,0,0,0.9); padding: 5px 0;
    border-radius: 4px; display: none; min-width: 80px;
}
.vpv-speed-opt {
    color: #fff; padding: 5px 15px; font-size: 12px; cursor: pointer; text-align: right;
}
.vpv-speed-opt:hover { background: #333; }
.vpv-settings-container:hover .vpv-settings-menu { display: block; }

/* End Screen Mask */
.vpv-end-screen-mask {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 40;
    display: none; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 20px;
}
.vpv-end-content h3 { color: #fff; margin-bottom: 20px; font-size: 20px; }
.vpv-cta-btn {
    display: inline-block; padding: 15px 30px; background: #e74c3c;
    color: #fff; text-decoration: none; font-weight: 800; font-size: 18px;
    border-radius: 5px; text-transform: uppercase; margin-bottom: 15px;
}
.vpv-replay-btn { color: #ccc; cursor: pointer; font-size: 14px; margin-top: 10px; }

/* Sticky Mode */
.vpv-sticky-active .vpv-video-frame {
    position: fixed; bottom: 20px; right: 20px;
    width: 320px; height: auto; z-index: 9999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border-radius: 8px; animation: vpv-slide-in 0.3s ease-out;
}
.vpv-sticky-active .vpv-video-inner { padding-bottom: 56.25%; }
.vpv-sticky-active .vpv-custom-controls, 
.vpv-sticky-active .vpv-big-play { display: none !important; }

.vpv-sticky-close {
    position: absolute; top: -15px; right: -15px; width: 30px; height: 30px;
    background: #333; color: #fff; border-radius: 50%; text-align: center;
    line-height: 30px; cursor: pointer; display: none; z-index: 50;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.vpv-sticky-active .vpv-sticky-close { display: block; }
.vpv-sticky-placeholder { display: none; width: 100%; }

/* Timed CTA */
.vpv-timed-cta { margin-top: 20px; animation: vpv-fade-up 0.5s ease-out; }
.vpv-cta-box { border: 2px dashed #e74c3c; background: #fffdf0; padding: 20px; text-align: center; border-radius: 8px; }
.vpv-cta-headline { margin: 0 0 5px 0; font-size: 22px; font-weight: 800; color: #333; }
.vpv-cta-sub { font-size: 15px; color: #666; margin-bottom: 15px; font-style: italic; }
.vpv-cta-main-btn {
    display: block; width: 100%; padding: 15px 0; color: #fff; text-decoration: none;
    font-weight: 700; font-size: 20px; border-radius: 5px; box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    text-transform: uppercase;
}
.vpv-cta-main-btn:active { transform: translateY(2px); box-shadow: none; }
.vpv-pulse { animation: vpv-pulse 2s infinite; }
@keyframes vpv-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes vpv-fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }