/* OTT Player - Main Styles */

/* Player Container */
.player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    user-select: none;
    cursor: default;
}

/* Video Element */
.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

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

.loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Overlay */
.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 150;
}

.error-content {
    text-align: center;
    color: #fff;
}

.error-icon {
    font-size: 48px;
    color: #e50914;
    margin-bottom: 16px;
}

.error-message {
    font-size: 16px;
    margin-bottom: 20px;
    color: #ccc;
}

.error-retry {
    background: #e50914;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.error-retry:hover {
    background: #f40612;
}

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

/* Top Overlay */
.top-overlay {
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 40px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.top-left,
.top-right {
    flex: 0 0 auto;
}

.top-center {
    flex: 1;
    text-align: center;
    color: #fff;
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.video-subtitle {
    font-size: 13px;
    color: #aaa;
}

/* Bottom Controls */
.bottom-controls {
    bottom: 0;
    padding-top: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

/* Center Play Button */
.center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 40;
}

.center-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.center-play-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.center-play-btn i {
    margin-left: 4px;
}

/* Skip Intro */
.skip-intro-container {
    position: absolute;
    bottom: 100px;
    right: 24px;
    z-index: 45;
}

.skip-intro-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skip-intro-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Icon Buttons */
.icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Time Display */
.time-display {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.time-separator {
    color: #666;
}

/* Gesture Indicator */
.gesture-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 200;
    animation: fadeInOut 1.5s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    85% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

.gesture-icon {
    font-size: 28px;
    color: #fff;
}

.gesture-value {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

/* Thumbnail Preview */
.thumbnail-preview {
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 6px 10px;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .top-overlay {
        padding: 12px 16px;
    }

    .bottom-controls {
        padding: 12px 16px;
    }

    .video-title {
        font-size: 15px;
    }

    .center-play-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    .skip-intro-container {
        bottom: 80px;
        right: 16px;
    }

    .skip-intro-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}