For all $n\geq1$, let $$a_n=\sum_{k=1}^{n-1}\frac{\sin\left(\frac{(2k-1)\pi}{2n}\right)}{\cos^2\left(\frac{(k-1)\pi}{2n}\right)\cos^2\left(\frac{k\pi}{2n}\right)}.$$ Determine $$\lim_{n\to\infty}\frac{a_n}{n^3}.$$ The original answer is in the format $\frac{m}{\pi^{n}}$. Please provide the value of m + n.

Let's think step by step and output the final answer within \boxed{}.
user