/* Button Base */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid #ff5722;
  background: transparent;
  color: #ff5722;
  font-size: 20px;
  cursor: pointer;
  display: none;
  z-index: 999;
  left: 10px;

  /* Smooth */
  transition: all 0.4s ease;
  overflow: hidden;
}

/* Icon */
#scrollTopBtn i {
  position: relative;
  z-index: 2;
}

/* Fill Animation Layer */
#scrollTopBtn::before {
  content: "";
  position: absolute;
  width: 0%;
  height: 100%;
  top: 0;
  left: 0;
  background: #ff5722;
  transition: width 0.4s ease;
  z-index: 1;
}

/* Hover Effect (Fill from left) */
#scrollTopBtn:hover::before {
  width: 100%;
}

/* Change icon color on hover */
#scrollTopBtn:hover {
  color: #fff;
}

/* Show button when scroll */
#scrollTopBtn.show {
  display: block;
  animation: fadeInUp 0.5s ease;
}

/* Smooth entry animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#scrollTopBtn {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,87,34,0.6); }
  70% { box-shadow: 0 0 0 15px rgba(255,87,34,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,87,34,0); }
}