feat: Implement login functionality with captcha verification and associated UI.

This commit is contained in:
Wartana
2026-03-10 15:54:17 +08:00
parent 03269c9430
commit 5714ef4877
3 changed files with 259 additions and 1 deletions

103
index.css
View File

@@ -311,4 +311,107 @@ footer {
color: var(--text-muted);
}
/* Login Overlay Styles */
.login-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
transition: opacity 0.5s ease;
}
.login-card {
background: var(--card-bg);
border: 1px solid rgba(255, 255, 255, 0.4);
border-radius: 24px;
padding: 32px;
width: 90%;
max-width: 400px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.login-header {
text-align: center;
margin-bottom: 24px;
}
.login-header p {
color: var(--text-muted);
font-size: 0.9rem;
}
.full-width {
width: 100%;
}
.captcha-container {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 8px;
background: rgba(255, 255, 255, 0.5);
padding: 8px;
border-radius: 12px;
border: 1px solid var(--border);
}
#captchaCanvas {
background: #fff;
border-radius: 8px;
flex-grow: 1;
}
.icon-btn {
background: #f3f4f6;
color: var(--text);
padding: 8px;
border-radius: 8px;
transition: background 0.2s;
}
.icon-btn:hover {
background: #e5e7eb;
}
.error-message {
background: rgba(239, 68, 68, 0.1);
color: var(--danger);
padding: 10px;
border-radius: 8px;
font-size: 0.85rem;
margin-bottom: 16px;
text-align: center;
border: 1px solid rgba(239, 68, 68, 0.2);
animation: shake 0.4s ease-in-out;
}
@keyframes shake {
0%,
100% {
transform: translateX(0);
}
25% {
transform: translateX(-5px);
}
50% {
transform: translateX(5px);
}
75% {
transform: translateX(-5px);
}
}
/* Base CSS End */