/* KingdomFlix Video Player Styles */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B8941F;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000000;
    color: #ffffff;
    overflow: hidden;
}

/* Video Player Container */
#video-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000000;
    overflow: hidden;
}

/* Video Element */
#video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

/* Video Overlay */
#video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.5s ease-in-out;
}

#video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Play Button */
#play-button {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    border: none;
    padding: 1rem 3rem;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1.25rem;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

#play-button:hover {
    background: linear-gradient(135deg, #B8941F 0%, #D4AF37 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

#play-button:active {
    transform: scale(0.98);
}

/* Video Controls */
#video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    padding: 1rem;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#video-controls.visible {
    opacity: 1;
}

/* Progress Bar */
#progress-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    height: 0.5rem;
    cursor: pointer;
    position: relative;
    margin-bottom: 1rem;
}

#progress-bar {
    background: linear-gradient(90deg, #D4AF37 0%, #B8941F 100%);
    height: 100%;
    border-radius: 9999px;
    transition: width 0.1s ease;
    position: relative;
}

#progress-bar::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #D4AF37;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#progress-container:hover #progress-bar::after {
    opacity: 1;
}

/* Control Buttons */
#video-controls button {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

#video-controls button:hover {
    color: #D4AF37;
    background: rgba(255, 255, 255, 0.1);
}

/* Volume Slider */
#volume-slider {
    width: 5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    height: 0.5rem;
    cursor: pointer;
    position: relative;
}

#volume-bar {
    background: linear-gradient(90deg, #D4AF37 0%, #B8941F 100%);
    height: 100%;
    border-radius: 9999px;
    transition: width 0.1s ease;
}

/* Loading Spinner */
#loading-spinner {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

#loading-spinner.visible {
    display: flex;
}

/* Error Message */
#error-message {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

#error-message.visible {
    display: flex;
}

/* Navigation Buttons */
#back-btn, #info-btn {
    position: fixed;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#back-btn:hover, #info-btn:hover {
    color: #D4AF37;
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

#back-btn:active, #info-btn:active {
    transform: scale(0.95);
}

/* Specific back button styles */
#back-btn {
    position: fixed !important;
    top: 6rem !important;
    left: 1rem !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Movie Info Panel */
#movie-info {
    position: fixed;
    top: 0;
    right: 0;
    width: 20rem;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 40;
    overflow-y: auto;
}

#movie-info.visible {
    transform: translateX(0);
}

/* Fullscreen Styles */
#video-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

#video-container.fullscreen #navbar {
    display: none;
}

#video-container.fullscreen #back-btn,
#video-container.fullscreen #info-btn {
    display: block;
    z-index: 10000;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #video-controls {
        padding: 0.75rem;
    }
    
    #video-controls .flex {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    #video-controls .flex > div {
        width: 100%;
        justify-content: center;
    }
    
    #movie-info {
        width: 100%;
    }
    
    #play-button {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Custom Video Player Enhancements */
.video-controls-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.control-button:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.1);
}

/* Time Display */
.time-display {
    font-family: 'Inter', monospace;
    font-size: 0.875rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Quality Selector */
.quality-selector {
    position: relative;
    display: inline-block;
}

.quality-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 8rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.quality-menu.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quality-option {
    padding: 0.5rem 1rem;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.quality-option:hover {
    background: rgba(212, 175, 55, 0.2);
}

.quality-option.active {
    color: #D4AF37;
    font-weight: bold;
}

/* Subtitle Controls */
.subtitle-controls {
    position: relative;
    display: inline-block;
}

.subtitle-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 10rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.subtitle-menu.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.subtitle-option {
    padding: 0.5rem 1rem;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subtitle-option:hover {
    background: rgba(212, 175, 55, 0.2);
}

.subtitle-option.active {
    color: #D4AF37;
    font-weight: bold;
}

/* Keyboard Shortcuts Indicator */
.shortcuts-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 50;
}

.shortcuts-indicator.visible {
    opacity: 1;
}

/* Buffering Indicator */
.buffering-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #D4AF37;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 25;
}

.buffering-indicator.visible {
    opacity: 1;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    #video-controls {
        background: rgba(0, 0, 0, 1);
        border-top: 2px solid #ffffff;
    }
    
    #progress-bar {
        background: #ffffff;
    }
    
    #play-button {
        background: #ffffff;
        color: #000000;
        border: 2px solid #000000;
    }
}

/* Print Styles */
@media print {
    #video-container {
        display: none;
    }
} 