/* =============================
   SCROLL TO TOP - PREMIUM UI
   ============================= */

#toTop {
  position: fixed;
  bottom: 32px;
  right: 32px;

  width: 52px;
  height: 52px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);

  background: rgba(20, 24, 32, 0.65);
  backdrop-filter: blur(10px);

  color: #fff;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.05);

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);

  transition: 
    opacity 0.35s ease,
    transform 0.35s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;

  z-index: 999;
}

/* SVG */
#toTop svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

/* Estado visible */
#toTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Hover elegante */
#toTop:hover {
  background: linear-gradient(
    135deg,
    var(--blue),
    var(--amber)
  );

  box-shadow:
    0 12px 35px rgba(0,0,0,0.35),
    0 0 12px rgba(0, 180, 255, 0.25);
}

/* micro animación del ícono */
#toTop:hover svg {
  transform: translateY(-2px);
}

/* Active (click) */
#toTop:active {
  transform: scale(0.96);
}

/* =============================
   RESPONSIVE
   ============================= */

/* Tablet */
@media (max-width: 768px) {
  #toTop {
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
  }

  #toTop svg {
    width: 20px;
    height: 20px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  #toTop {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  #toTop svg {
    width: 18px;
    height: 18px;
  }
}

/* Small devices */
@media (max-width: 320px) {
  #toTop {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }

  #toTop svg {
    width: 16px;
    height: 16px;
  }
}