.btn-3d {
  display: inline-block;
  padding: 7px 15px;
  border: none;
  text-decoration: none;
  perspective: 1000px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  cursor: pointer;
  border-radius: 30px;
  transform-style: preserve-3d;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-3d::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 0.3s;
  z-index: -1;
}

.btn-3d:hover {
  transform: translateY(-3px) rotateX(20deg) scale(1.1);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn-3d:hover::before {
  transform: scaleY(1);
}

.btn-3d:active {
  transform: translateY(0) translateZ(-5px);
}

.btn-3d:active::before {
  transform: scaleY(0);
}
