/* Video Preview Styles - Estilo similar ao xvideos */
.video-preview-container {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-preview-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.video-img {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  min-height: 140px;
}

/* Garante que todos os elementos de thumbnail ocupem o espaço completo */
.video-img .video-thumbnail,
.video-img .video-thumbnail-fallback,
.video-img .video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.video-thumbnail {
  transition: transform 0.3s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.3s ease;
  opacity: 0;
}

.play-button-overlay i {
  color: white;
  font-size: 24px;
  margin-left: 3px;
}

.video-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  z-index: 3;
}

.video-preview-container:hover .play-button-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-preview-container:hover .video-thumbnail {
  transform: scale(1.05);
}

.video-preview-container:hover .video-preview {
  opacity: 1;
}

/* Efeito de brilho ao passar o mouse */
.video-img::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: 4;
  pointer-events: none;
}

.video-preview-container:hover .video-img::before {
  transform: translateX(100%);
}

/* Video Thumbnail Fallback */
.video-thumbnail-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  pointer-events: none; /* Evita interação direta com o vídeo */
  background: #000;
  display: block !important;
}

.video-thumbnail-fallback::-webkit-media-controls {
  display: none !important;
}

.video-thumbnail-fallback::-webkit-media-controls-panel {
  display: none !important;
}

.video-thumbnail-fallback::-webkit-media-controls-play-button {
  display: none !important;
}

.video-thumbnail-fallback::-webkit-media-controls-start-playback-button {
  display: none !important;
}

/* Força a visibilidade do vídeo de fallback */
.video-img .video-thumbnail-fallback {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  min-height: 140px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
}

.video-placeholder i {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.video-placeholder span {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hover effects for fallback elements */
.video-preview-container:hover .video-thumbnail-fallback {
  transform: scale(1.05);
}

.video-preview-container:hover .video-placeholder {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.video-preview-container:hover .video-placeholder i {
  transform: scale(1.2);
  opacity: 1;
}

/* Responsividade */
@media (max-width: 768px) {
  .play-button-overlay {
    width: 50px;
    height: 50px;
  }
  
  .play-button-overlay i {
    font-size: 20px;
  }
  
  .video-duration-badge {
    font-size: 10px;
    padding: 1px 4px;
  }
  
  .video-placeholder i {
    font-size: 36px;
  }
  
  .video-placeholder span {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .video-preview-container:hover {
    transform: none;
    box-shadow: none;
  }
  
  .play-button-overlay {
    width: 40px;
    height: 40px;
  }
  
  .play-button-overlay i {
    font-size: 16px;
  }
  
  .video-placeholder i {
    font-size: 32px;
  }
  
  .video-placeholder span {
    font-size: 11px;
  }
}