/* Video Page Specific Styles */

/* Points Banner */
.points-banner {
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

/* Video Container */
.video-container {
    position: relative;
}

.video-container .card {
    border: none;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.video-container .card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

/* Video Player Styles */
#videoPlayerContainer {
    position: relative;
    background: #000;
    border-radius: 0;
}

.video-js {
    width: 100%;
    height: 400px;
}

.video-js .vjs-big-play-button {
    background: rgba(255, 102, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    line-height: 80px;
    font-size: 2rem;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
}

.video-js .vjs-big-play-button:hover {
    background: rgba(255, 102, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-js .vjs-control-bar {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.video-js .vjs-play-progress {
    background: var(--primary-color);
}

.video-js .vjs-volume-level {
    background: var(--primary-color);
}

/* Video Controls */
.video-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#skipBtn {
    border-radius: 20px;
    font-size: 0.8rem;
    transition: var(--transition);
}

#skipBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#skipTimer {
    font-weight: bold;
    color: var(--danger-color);
}

/* Video Completed State */
#videoCompletedState {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-top: 3px solid var(--success-color);
}

.completion-animation {
    animation: completionBounce 0.8s ease-out;
}

@keyframes completionBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.points-animation {
    position: relative;
    height: 60px;
    margin: 1rem 0;
}

.points-earned {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    font-weight: bold;
    color: var(--warning-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pointsFloat 3s ease-out;
}

@keyframes pointsFloat {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(30px) scale(0.5);
    }
    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.2);
    }
    70% {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px) scale(1);
    }
    100% {
        opacity: 0.7;
        transform: translateX(-50%) translateY(-20px) scale(1);
    }
}

/* Video Queue */
.video-queue {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.video-queue-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.video-queue-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.video-queue-item.active {
    border-color: var(--success-color);
    background: rgba(40, 167, 69, 0.05);
}

.video-queue-item.completed {
    border-color: var(--warning-color);
    background: rgba(255, 140, 0, 0.05);
}

.video-thumbnail {
    width: 100%;
    height: 80px;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.video-thumbnail i {
    font-size: 2rem;
    color: #6c757d;
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.3) 50%, transparent 60%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.video-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark-color);
}

.video-duration {
    font-size: 0.7rem;
    color: #6c757d;
    margin: 0;
}

.video-status {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6c757d;
}

.video-status.completed {
    background: var(--success-color);
}

.video-status.active {
    background: var(--warning-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Progress Sidebar */
.progress-item {
    margin-bottom: 1.5rem;
}

.progress {
    height: 10px;
    border-radius: 5px;
    background: #e9ecef;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar {
    transition: width 1s ease;
    border-radius: 5px;
}

.stats-mini {
    background: rgba(66, 103, 178, 0.05);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.stats-mini .d-flex {
    padding: 0.25rem 0;
}

/* Ad Placeholders */
.ad-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    padding: 2rem 1rem;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ad-placeholder:hover {
    border-color: #adb5bd;
    background: #e9ecef;
}

.ad-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.ad-placeholder p {
    margin: 0;
    color: #6c757d;
    font-weight: 500;
}

/* Quick Tips */
.list-unstyled li {
    padding: 0.25rem 0;
    transition: var(--transition);
}

.list-unstyled li:hover {
    background: rgba(66, 103, 178, 0.05);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 4px;
}

/* Navigation Override for Videos Page */
.navbar {
    z-index: 1050 !important;
}

.navbar .dropdown-menu {
    z-index: 1060 !important;
    position: absolute !important;
}

/* Toast Notifications */
.toast-container {
    z-index: 9999;
}

.toast {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

.toast-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.toast-body {
    background: white;
    color: var(--dark-color);
}

/* Auth Required State */
#authRequiredState .card {
    border: none;
    box-shadow: var(--shadow-lg);
    animation: slideInUp 0.8s ease-out;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: var(--border-radius);
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-js {
        height: 250px;
    }
    
    .video-queue {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    .video-queue-item {
        padding: 0.75rem;
    }
    
    .video-thumbnail {
        height: 60px;
    }
    
    .points-banner .col-md-6:last-child {
        text-align: center;
        margin-top: 0.5rem;
    }
    
    .stats-mini {
        margin-top: 1rem;
    }
    
    .ad-placeholder {
        min-height: 150px;
        padding: 1.5rem 1rem;
    }
    
    .ad-placeholder i {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .video-js {
        height: 200px;
    }
    
    .video-queue {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .completion-animation h4 {
        font-size: 1.25rem;
    }
    
    .points-earned {
        font-size: 2rem;
    }
    
    .video-controls {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    #skipBtn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Video Player Custom Controls */
.vjs-custom-skin .vjs-big-play-button {
    background: rgba(66, 103, 178, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.vjs-custom-skin .vjs-big-play-button:hover {
    background: rgba(66, 103, 178, 1);
    border-color: white;
}

/* Video Overlay Messages */
.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    z-index: 1000;
}

.video-overlay h4 {
    margin: 0 0 0.5rem 0;
}

.video-overlay p {
    margin: 0;
    font-size: 0.9rem;
}

/* Progress Ring Animation */
.progress-ring {
    width: 60px;
    height: 60px;
    position: relative;
    display: inline-block;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
}

.progress-ring .background {
    stroke: rgba(255, 255, 255, 0.2);
}

.progress-ring .progress {
    stroke: var(--warning-color);
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    transition: stroke-dashoffset 0.5s ease;
}
