/* Cineshort Player Styles */

.cineshort-player-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.cineshort-player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Ensure captions are visible above overlays */
.cineshort-player-container track {
    color: #fff;
}
.cineshort-player-container ::cue {
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 16px;
}

/* Custom Loader removed */

/* Player Controls Overlay */
.player-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.player-watermark {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 12;
    opacity: 0.85;
    pointer-events: none;
}

.player-watermark img {
    height: 28px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.cineshort-player-container.cs-hide-ui {
    cursor: none;
}

.cineshort-player-container.cs-hide-ui .player-controls-overlay,
.cineshort-player-container.cs-hide-ui .player-center-play-btn {
    opacity: 0 !important;
    pointer-events: none;
}

.cineshort-player-container:hover .player-controls-overlay,
.cineshort-player-container.playing .player-controls-overlay {
    opacity: 1;
}

/* Center Play/Pause Button - Large Hover Button */
.player-center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s ease;
    pointer-events: all;
}

.player-center-play-btn i {
    font-size: 120px;
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s ease, color 0.2s ease;
}

.player-center-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.player-center-play-btn:hover i {
    color: rgba(255, 255, 255, 1);
}

.player-center-play-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* Show center button on hover or when paused */
.cineshort-player-container:hover .player-center-play-btn,
.cineshort-player-container.paused .player-center-play-btn {
    opacity: 1;
}

/* Hide when playing (unless hovering) */
.cineshort-player-container.playing .player-center-play-btn {
    opacity: 0;
}

.cineshort-player-container.playing:hover .player-center-play-btn {
    opacity: 1;
}

/* Old center controls (removed) */
.player-center-controls {
    display: none;
}

.player-center-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #000;
    font-size: 32px;
}

.player-center-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.player-center-btn.play-pause {
    width: 80px;
    height: 80px;
    font-size: 40px;
}

.player-skip-text {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 12px;
    white-space: nowrap;
}

/* Progress Bar */
.player-progress-container {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 15px;
    position: relative;
}

.player-progress-bar {
    height: 100%;
    background: #FF004B;
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.player-progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #FF004B;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.player-progress-container:hover .player-progress-handle {
    width: 14px;
    height: 14px;
    right: -7px;
}

/* Bottom Controls */
.player-bottom-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.player-left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-control-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    font-size: 24px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-control-btn:hover {
    color: #FF004B;
    transform: scale(1.1);
}

.player-time-display {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-time-separator {
    color: rgba(255, 255, 255, 0.6);
}

/* Rate and Subtitles Buttons */
.player-rate-btn,
.player-subtitles-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-rate-btn:hover,
.player-subtitles-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Fullscreen Styles */
.cineshort-player-container:fullscreen {
    border-radius: 0;
}

.cineshort-player-container:fullscreen .player-controls-overlay {
    padding: 30px;
}

.cineshort-player-container:fullscreen .player-rate-btn,
.cineshort-player-container:fullscreen .player-subtitles-btn {
    display: none;
}

.cineshort-player-container:fullscreen .player-center-btn {
    width: 90px;
    height: 90px;
    font-size: 42px;
}

.cineshort-player-container:fullscreen .player-center-btn.play-pause {
    width: 100px;
    height: 100px;
    font-size: 50px;
}

/* Loading Spinner */
.player-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
}

/* Premium Modal Styles - Modern 9:16 Design */
#premiumRequiredModal .modal-dialog { 
    max-width: 380px; 
    width: 100%; 
    margin: 1.75rem auto;
    display: flex; 
    align-items: center;
}

.premium-modal { 
    background: #000; 
    border-radius: 20px; 
    overflow: hidden; 
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    aspect-ratio: 9/16;
    width: 100%;
    max-height: 85vh;
    position: relative;
}

.premium-close { 
    position: absolute; 
    top: 16px; 
    right: 16px; 
    z-index: 10;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.premium-close:hover { opacity: 1; }

.premium-video-wrap { 
    position: relative; 
    width: 100%; 
    height: 100%;
    overflow: hidden;
}

.premium-video { 
    width: 100%; 
    height: 100%; 
    display: block; 
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.premium-bottom-gradient { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    height: 60%; 
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 40%, transparent 100%); 
    z-index: 1; 
    pointer-events: none; 
}

.premium-cta { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    padding: 28px 24px 32px; 
    z-index: 2; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    align-items: center; 
    text-align: center; 
}

.premium-text .title { 
    color: #fff; 
    font-weight: 700; 
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.premium-text .desc { 
    color: rgba(255,255,255,0.85); 
    font-size: 14px;
    line-height: 1.5;
}

.premium-cta .btn-row { 
    display: flex; 
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.premium-cta .btn-row .btn {
    width: 100%;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 24px;
    border-radius: 9999px;
}

@media (max-width: 576px) {
    #premiumRequiredModal .modal-dialog { 
        max-width: calc(100% - 32px);
        margin: 1rem auto;
    }
    .premium-modal {
        max-height: 90vh;
        border-radius: 16px;
    }
    .premium-text .title { font-size: 20px; }
    .premium-text .desc { font-size: 13px; }
    .premium-cta { padding: 24px 20px 28px; gap: 16px; }
    .premium-cta .btn-row .btn { font-size: 14px; padding: 12px 20px; }
}

@media (min-width: 577px) and (max-width: 768px) {
    #premiumRequiredModal .modal-dialog { max-width: 360px; }
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sticky Premium CTA */
.sticky-premium-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

.sticky-premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff4d6d 0%, #ff004b 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(255, 0, 75, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.sticky-premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 0, 75, 0.45);
}

.sticky-premium-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .player-controls-overlay {
        padding: 15px;
    }
    
    .player-center-btn {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .player-center-btn.play-pause {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }
    
    .player-control-btn {
        font-size: 20px;
    }
    
    .player-time-display {
        font-size: 12px;
    }
    
    .player-rate-btn,
    .player-subtitles-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

