*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.videoContainer {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  margin-inline: auto;
  background-color: black;
  border-radius: 14px;
  transition: border-radius 0.3s ease-in-out;
}

.videoContainer::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  aspect-ratio: 8 / 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  opacity: 0;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  transition: opacity 0.3s ease-in-out, border-radius 0.3s ease-in-out;
}

.videoContainer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  aspect-ratio: 12 / 1;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
  opacity: 0;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  transition: opacity 0.3s ease-in-out, border-radius 0.3s ease-in-out;
}

.videoContainer:hover::before {
  opacity: 1;
  border-radius: 0;
}

.videoContainer:hover::after {
  opacity: 1;
  border-radius: 0;
}

.videoContainer:hover {
  border-radius: 0;
}

.videoContainer:hover video {
  border-radius: 0;
}

.videoContainer:hover .poster img {
  border-radius: 0;
}

.videoContainer:hover .actionContainer {
  border-radius: 0;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: border-radius 0.3s ease-in-out;
  cursor: pointer;
}

.poster {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.poster img {
  z-index: -1;

  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  opacity: 0;
  transition: border-radius 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.actionContainer {
  color: white;
  position: absolute;

  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  transition: border-radius 0.3s ease-in-out, opacity 0.3s ease-in-out;
  z-index: 100;
  opacity: 0;
  padding: 1rem;
}

.videoContainer:hover .actionContainer,
.videoContainer:focus-within .actionContainer {
  opacity: 1;
}

.btn {
  background-color: transparent;
  border: none;
  outline: none;
  width: 35px;
  height: 35px;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.btn svg {
  width: 25px;
  height: 25px;
}

.ping-animation svg {
  width: 35px;
  height: 35px;
}

.ping-animation {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}
