diff --git a/public/css/auth.css b/public/css/auth.css index 3f74e2a..ed680e8 100644 --- a/public/css/auth.css +++ b/public/css/auth.css @@ -337,4 +337,35 @@ #passwordRequirements li.valid::before { content: '✓ '; } +/* ─── Close Button ─── */ +.auth-card { + position: relative; +} + +.close-btn { + position: absolute; + top: 15px; + right: 15px; + width: 38px; + height: 38px; + border: none; + border-radius: 50%; + background: transparent; + color: var(--text-secondary); + font-size: 28px; + line-height: 38px; + text-align: center; + cursor: pointer; + transition: all 0.3s ease; +} + +.close-btn:hover { + background: rgba(255, 255, 255, 0.1); + color: var(--text-primary); + transform: rotate(90deg); +} + +.light-mode .close-btn:hover { + background: rgba(0, 0, 0, 0.08); +} diff --git a/public/js/auth.js b/public/js/auth.js index 2e6771f..9ae60a0 100644 --- a/public/js/auth.js +++ b/public/js/auth.js @@ -477,5 +477,14 @@ btnLoader.style.display = 'inline'; initUsernameCheck(); initGoogleAuth(); initCopyProfileBtn(); + // Close button + const closeBtn = document.getElementById("closeBtn"); + + if (closeBtn) { + closeBtn.addEventListener("click", () => { + window.location.href = "/index.html"; + }); + } + }); })(); diff --git a/public/login.html b/public/login.html index 03e00f6..68b1913 100644 --- a/public/login.html +++ b/public/login.html @@ -25,6 +25,12 @@