/* TSF Video Player - Estilo Netflix */

.tsf-video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 2rem auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.tsf-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    background: #000;
}

.tsf-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Deshabilitar menú contextual */
.tsf-video-player::-webkit-media-controls {
    display: none !important;
}

.tsf-video-player::-webkit-media-controls-enclosure {
    display: none !important;
}

/* Indicadores de salto (10 seg) */
.tsf-skip-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 9;
}

.tsf-skip-indicator.active {
    opacity: 1;
    animation: tsf-skip-pulse 0.6s ease;
}

.tsf-skip-back {
    left: 20%;
}

.tsf-skip-forward {
    right: 20%;
}

.tsf-skip-indicator svg {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

@keyframes tsf-skip-pulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
}

/* Tooltip de tiempo en barra de progreso */
.tsf-progress-tooltip {
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 8px;
    transition: opacity 0.2s ease;
}

.tsf-progress-bar:hover .tsf-progress-tooltip {
    opacity: 1;
}

/* Buffer bar */
.tsf-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    width: 0%;
}

/* Loading */
.tsf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 5;
}

.tsf-loading.hidden {
    display: none;
}

.tsf-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: tsf-spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Controles personalizados */
.tsf-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) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    padding: 0 0 1rem 0;
}

.tsf-video-container:hover .tsf-controls,
.tsf-video-container.tsf-show-controls .tsf-controls {
    opacity: 1;
}

/* Barra de progreso */
.tsf-progress-bar {
    position: relative;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    margin-bottom: 0.75rem;
    transition: height 0.2s ease;
}

.tsf-progress-bar:hover {
    height: 8px;
}

.tsf-progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #e50914;
    width: 0%;
    transition: width 0.1s linear;
}

.tsf-progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tsf-progress-bar:hover .tsf-progress-handle {
    transform: translate(-50%, -50%) scale(1);
}

/* Controles inferiores */
.tsf-controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
}

.tsf-controls-left,
.tsf-controls-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tsf-controls-right {
    margin-left: auto;
}

/* Botones */
.tsf-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    outline: none;
}

.tsf-btn:hover {
    transform: scale(1.1);
}

.tsf-btn:active {
    transform: scale(0.95);
}

.tsf-btn svg {
    width: 24px;
    height: 24px;
}

.tsf-play-pause svg {
    width: 28px;
    height: 28px;
}

/* Control de volumen */
.tsf-volume-slider {
    position: relative;
    display: flex;
    align-items: center;
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.tsf-controls-left:hover .tsf-volume-slider {
    width: 80px;
}

.tsf-volume-range {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
    border-radius: 2px;
}

.tsf-volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tsf-volume-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.tsf-volume-range::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tsf-volume-range::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Tiempo */
.tsf-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    user-select: none;
}

.tsf-separator {
    opacity: 0.7;
}

/* Título del video */
.tsf-title-display {
    font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: none;
}

/* Overlay de play grande */
.tsf-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 8;
    pointer-events: none;
}

.tsf-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.tsf-play-big {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #fff;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    pointer-events: all;
}

.tsf-play-big:hover {
    transform: scale(1.1);
    background: rgba(229, 9, 20, 0.9);
    border-color: #e50914;
}

.tsf-play-big svg {
    width: 40px;
    height: 40px;
    color: #fff;
    margin-left: 4px;
}

/* Pantalla completa */
.tsf-video-container:fullscreen {
    border-radius: 0;
}

.tsf-video-container:-webkit-full-screen {
    border-radius: 0;
}

.tsf-video-container:-moz-full-screen {
    border-radius: 0;
}

.tsf-video-container:-ms-fullscreen {
    border-radius: 0;
}

/* Prevenir selección de texto */
.tsf-video-container * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Responsive */
@media (max-width: 768px) {
    .tsf-controls-bottom {
        padding: 0 1rem;
        gap: 0.5rem;
    }
    
    .tsf-title-display {
        display: none;
    }
    
    .tsf-volume-slider {
        display: none;
    }
    
    .tsf-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .tsf-play-pause svg {
        width: 24px;
        height: 24px;
    }
    
    .tsf-time {
        font-size: 12px;
    }
}

/* Animaciones de fade */
@keyframes tsf-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tsf-video-container {
    animation: tsf-fade-in 0.5s ease;
}

/* Cursor personalizado sobre el video */
.tsf-video-wrapper:hover {
    cursor: pointer;
}

/* Menú de configuración (preparado para futuras opciones) */
.tsf-settings-menu {
    position: absolute;
    bottom: 60px;
    right: 1.5rem;
    background: rgba(20, 20, 20, 0.98);
    border-radius: 8px;
    padding: 0;
    min-width: 220px;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    z-index: 15;
}

.tsf-settings-menu.active {
    display: block;
    animation: tsf-fade-in 0.2s ease;
}

.tsf-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: #fff;
}

.tsf-settings-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.tsf-settings-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tsf-settings-content {
    padding: 0.5rem 0;
}

.tsf-setting-item {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 14px;
}

.tsf-setting-item select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.tsf-setting-item select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.tsf-setting-item select option {
    background: #1a1a1a;
    color: #fff;
}

/* Slider de brillo */
.tsf-brightness-slider {
    position: absolute;
    bottom: 60px;
    right: 5rem;
    background: rgba(20, 20, 20, 0.98);
    border-radius: 8px;
    padding: 1rem;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    z-index: 15;
}

.tsf-brightness-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.tsf-brightness-header svg {
    width: 20px;
    height: 20px;
}

.tsf-brightness-range {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.tsf-brightness-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tsf-brightness-range::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.tsf-brightness-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tsf-brightness-range::-moz-range-thumb:hover {
    transform: scale(1.3);
}

.tsf-brightness-value {
    text-align: center;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

/* Efecto de filtro de brillo en el video */
.tsf-video-player.tsf-brightness-filter {
    filter: brightness(var(--tsf-brightness, 1));
}

.tsf-settings-option {
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tsf-settings-option:hover {
    background: rgba(255, 255, 255, 0.1);
}
/* Controles centrales estilo Netflix */
.tsf-center-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 9;
    pointer-events: none;
}

.tsf-center-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tsf-center-zone:hover {
    background: rgba(0, 0, 0, 0.15);
}

.tsf-center-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    pointer-events: none;
}

.tsf-center-zone:active .tsf-center-icon {
    opacity: 1;
    transform: scale(1);
    animation: tsf-center-pulse 0.4s ease;
}

.tsf-center-icon svg {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

.tsf-center-icon span {
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

@keyframes tsf-center-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Controles superiores */
.tsf-top-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 11;
}

.tsf-video-container:hover .tsf-top-controls,
.tsf-video-container.tsf-show-controls .tsf-top-controls {
    opacity: 1;
}

.tsf-video-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    max-width: 60%;
}

.tsf-top-right {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Control de volumen vertical */
.tsf-volume-control {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tsf-volume-slider-vertical {
    position: absolute;
    top: 100%;
    margin-top: 0.5rem;
    background: rgba(20, 20, 20, 0.95);
    padding: 1rem 0.75rem;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.tsf-volume-control:hover .tsf-volume-slider-vertical {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.tsf-volume-range {
    -webkit-appearance: slider-vertical;
    width: 4px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 2px;
    cursor: pointer;
}

.tsf-volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tsf-volume-range::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.tsf-volume-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* Control de brillo vertical */
.tsf-brightness-control {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tsf-brightness-slider-vertical {
    position: absolute;
    top: 100%;
    margin-top: 0.5rem;
    background: rgba(20, 20, 20, 0.95);
    padding: 1rem 0.75rem;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tsf-brightness-control:hover .tsf-brightness-slider-vertical {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.tsf-brightness-range {
    -webkit-appearance: slider-vertical;
    width: 4px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 2px;
    cursor: pointer;
}

.tsf-brightness-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tsf-brightness-range::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.tsf-brightness-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.tsf-brightness-value {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 40px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .tsf-center-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .tsf-center-icon span {
        font-size: 12px;
    }
    
    .tsf-video-title {
        font-size: 14px;
        max-width: 50%;
    }
    
    .tsf-top-controls {
        padding: 1rem;
    }
    
    .tsf-volume-range,
    .tsf-brightness-range {
        height: 80px;
    }
}
/* Remover estilos no necesarios */
.tsf-skip-indicator,
.tsf-play-overlay,
.tsf-play-big,
.tsf-volume-slider,
.tsf-title-display,
.tsf-skip-back-btn,
.tsf-skip-forward-btn {
    display: none !important;
}
