/* =========================================================
   SANJAI TRADING LMS - VIDEO PLAYER & SECURITY STYLES
   Features: Dynamic Watermarking, Disable Native Downloads,
   Security Warning Overlays & Custom Controls.
   ========================================================= */

.player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.player-container {
    width: 92%;
    max-width: 1200px;
    background: #0F172A;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 3fr 1fr;
    max-height: 90vh;
}

.video-wrapper {
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

video.custom-video {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
    outline: none;
}

/* Remove default download button controls in Chrome/Safari browsers */
video::-internal-media-controls-download-button {
    display: none !important;
}
video::-webkit-media-controls-enclosure {
    overflow: hidden !important;
}
video::-webkit-media-controls-panel {
    width: calc(100% + 30px) !important;
}

/* Watermark Canvas / Overlay */
.video-watermark {
    position: absolute;
    top: 20%;
    left: 20%;
    z-index: 10;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.9rem;
    font-weight: 700;
    pointer-events: none; /* Allows user to click playback underneath */
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    animation: bounceWatermark 18s infinite linear;
}

@keyframes bounceWatermark {
    0%   { top: 10%; left: 10%; opacity: 0.4; }
    25%  { top: 75%; left: 60%; opacity: 0.25; }
    50%  { top: 40%; left: 80%; opacity: 0.45; }
    75%  { top: 80%; left: 20%; opacity: 0.3; }
    100% { top: 10%; left: 10%; opacity: 0.4; }
}

.player-sidebar {
    background: #1E293B;
    padding: 1.5rem;
    color: #FFF;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.player-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #F8FAFC;
}

.player-sidebar p {
    font-size: 0.85rem;
    color: #94A3B8;
    margin-bottom: 1.5rem;
}

.playlist-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: #38BDF8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.playlist-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.playlist-item {
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.playlist-item:hover, .playlist-item.active {
    background: var(--secondary);
    color: #FFF;
}

/* Security Protection Alert Banner */
.security-alert-box {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background: #DC2626;
    color: #FFF;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    max-width: 90%;
    text-align: center;
    animation: alertPulse 0.4s ease-in-out;
}

@keyframes alertPulse {
    0% { transform: translate(-50%, -20px); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

@media (max-width: 992px) {
    .player-container {
        grid-template-columns: 1fr;
        max-height: 95vh;
        overflow-y: auto;
    }
    .player-sidebar {
        max-height: 250px;
    }
}
