Files
demo-mayagen/login-page/style.css
emmanuel.rizky 28b4d09993 Add login page with email/phone toggle and form validation
- Created login page with email/number toggle functionality
- Added input validation and phone number formatting
- Implemented background animation and responsive design
- Set up webhook integration for form submissions
2025-07-12 09:49:12 +07:00

280 lines
8.3 KiB
CSS

/* Reset CSS */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
overflow: hidden;
}
/* Floating Dots Background Animation with Waveform - Final Version */
.background-animation {
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: 300px;
transform: translateY(-50%);
z-index: 0;
overflow: hidden;
}
.background-animation i {
position: absolute;
background: rgba(255, 255, 255, 0.6);
border-radius: 50%;
animation: float linear infinite;
opacity: 0;
right: -100px;
top: var(--y-offset);
--wave-amplitude: 50px;
}
/* Waveform animation keyframes */
@keyframes float {
0% {
transform: translate(0, 0);
opacity: 0;
}
10% {
opacity: 0.8;
}
25% {
transform: translate(-25vw, calc(var(--wave-amplitude) * -1));
}
50% {
transform: translate(-50vw, var(--wave-amplitude));
}
75% {
transform: translate(-75vw, calc(var(--wave-amplitude) * -1));
}
90% {
opacity: 0.8;
}
100% {
transform: translate(calc(-100vw - 100px), var(--wave-amplitude));
opacity: 0;
}
}
/* Final dots properties - larger size (10px-18px) and centered */
.background-animation i:nth-child(1) { width: 10px; height: 10px; --y-offset: 75px; --wave-amplitude: 40px; animation-duration: 18s; animation-delay: 0s; }
.background-animation i:nth-child(2) { width: 12px; height: 12px; --y-offset: 125px; --wave-amplitude: 60px; animation-duration: 22s; animation-delay: 3s; }
.background-animation i:nth-child(3) { width: 8px; height: 8px; --y-offset: 175px; --wave-amplitude: 30px; animation-duration: 20s; animation-delay: 6s; }
.background-animation i:nth-child(4) { width: 14px; height: 14px; --y-offset: 75px; --wave-amplitude: 50px; animation-duration: 25s; animation-delay: 1s; }
.background-animation i:nth-child(5) { width: 16px; height: 16px; --y-offset: 125px; --wave-amplitude: 70px; animation-duration: 15s; animation-delay: 8s; }
.background-animation i:nth-child(6) { width: 10px; height: 10px; --y-offset: 175px; --wave-amplitude: 20px; animation-duration: 19s; animation-delay: 4s; }
.background-animation i:nth-child(7) { width: 12px; height: 12px; --y-offset: 75px; --wave-amplitude: 80px; animation-duration: 21s; animation-delay: 7s; }
.background-animation i:nth-child(8) { width: 8px; height: 8px; --y-offset: 125px; --wave-amplitude: 35px; animation-duration: 24s; animation-delay: 2s; }
.background-animation i:nth-child(9) { width: 14px; height: 14px; --y-offset: 175px; --wave-amplitude: 55px; animation-duration: 16s; animation-delay: 9s; }
.background-animation i:nth-child(10) { width: 16px; height: 16px; --y-offset: 75px; --wave-amplitude: 25px; animation-duration: 23s; animation-delay: 5s; }
.background-animation i:nth-child(11) { width: 10px; height: 10px; --y-offset: 125px; --wave-amplitude: 65px; animation-duration: 18s; animation-delay: 3s; }
.background-animation i:nth-child(12) { width: 12px; height: 12px; --y-offset: 175px; --wave-amplitude: 45px; animation-duration: 22s; animation-delay: 6s; }
.background-animation i:nth-child(13) { width: 8px; height: 8px; --y-offset: 75px; --wave-amplitude: 75px; animation-duration: 26s; animation-delay: 1s; }
.background-animation i:nth-child(14) { width: 14px; height: 14px; --y-offset: 125px; --wave-amplitude: 30px; animation-duration: 20s; animation-delay: 8s; }
.background-animation i:nth-child(15) { width: 16px; height: 16px; --y-offset: 175px; --wave-amplitude: 60px; animation-duration: 17s; animation-delay: 4s; }
.background-animation i:nth-child(16) { width: 10px; height: 10px; --y-offset: 75px; --wave-amplitude: 40px; animation-duration: 19s; animation-delay: 7s; }
.background-animation i:nth-child(17) { width: 12px; height: 12px; --y-offset: 125px; --wave-amplitude: 70px; animation-duration: 24s; animation-delay: 2s; }
.background-animation i:nth-child(18) { width: 8px; height: 8px; --y-offset: 175px; --wave-amplitude: 50px; animation-duration: 21s; animation-delay: 5s; }
.background-animation i:nth-child(19) { width: 14px; height: 14px; --y-offset: 75px; --wave-amplitude: 35px; animation-duration: 16s; animation-delay: 9s; }
.background-animation i:nth-child(20) { width: 16px; height: 16px; --y-offset: 125px; --wave-amplitude: 55px; animation-duration: 23s; animation-delay: 3s; }
/* Login container styling */
.login-container {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(10px);
border-radius: 20px;
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
0 0 0 2px rgba(255, 255, 255, 0.1) inset,
0 10px 20px rgba(0, 0, 0, 0.1) inset;
padding: 40px;
width: 90%;
max-width: 450px;
transform: perspective(1000px) rotateY(5deg);
transition: transform 0.5s ease;
position: relative;
z-index: 1;
overflow: hidden;
}
.login-container:hover {
transform: perspective(1000px) rotateY(0deg);
}
.logo-placeholder {
height: 80px;
margin-bottom: 30px;
display: flex;
justify-content: center;
align-items: center;
color: #6a11cb;
font-size: 24px;
font-weight: bold;
border: 2px dashed #6a11cb;
border-radius: 10px;
}
/* Form toggle buttons */
.form-toggle {
display: flex;
margin-bottom: 20px;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.toggle-btn {
flex: 1;
padding: 12px 0;
border: none;
background: #f0f0f0;
cursor: pointer;
font-weight: 600;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.toggle-btn.active {
background: #6a11cb;
color: white;
}
.toggle-btn:not(.active):hover {
background: #e0e0e0;
}
/* Input group styling */
.input-group {
margin-bottom: 25px;
}
.input-group input {
width: 100%;
padding: 15px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 10px;
background: rgba(255, 255, 255, 0.8);
transition: all 0.3s ease;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) inset;
height: 50px;
box-sizing: border-box;
}
.input-group input:focus,
.phone-input-wrapper:focus-within {
border-color: #6a11cb;
box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.2);
transform: translateY(-2px);
outline: none;
}
/* Phone input styling */
.phone-input-wrapper {
display: flex;
align-items: center;
border: 1px solid #ddd;
border-radius: 10px;
background: rgba(255, 255, 255, 0.8);
margin-bottom: 15px;
transition: all 0.3s ease;
height: 50px;
box-sizing: border-box;
position: relative;
}
.phone-prefix-display {
padding: 15px;
color: #888;
font-weight: bold;
border-right: 1px solid #ddd;
background-color: #f8f9fa;
height: 100%;
display: flex;
align-items: center;
border-radius: 10px 0 0 10px;
}
.phone-input {
border: none !important;
margin-bottom: 0 !important;
box-shadow: none !important;
flex-grow: 1;
background: transparent !important;
height: 100%;
padding: 0 15px;
border-radius: 0 10px 10px 0;
}
.phone-input:focus {
box-shadow: none !important;
transform: none !important;
outline: none;
}
/* Login button styling */
.login-btn {
width: 100%;
padding: 15px;
background: linear-gradient(to right, #6a11cb, #2575fc);
color: white;
border: none;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 5px 15px rgba(37, 117, 252, 0.4);
position: relative;
overflow: hidden;
}
.login-btn:hover {
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(37, 117, 252, 0.6);
}
.login-btn:active {
transform: translateY(0);
}
/* Links styling */
.links {
display: flex;
justify-content: space-between;
margin-top: 20px;
}
.links a {
color: #6a11cb;
text-decoration: none;
font-size: 14px;
transition: color 0.3s ease;
}
.links a:hover {
color: #2575fc;
text-decoration: underline;
}
/* Responsive design */
@media (max-width: 480px) {
.login-container {
padding: 25px;
width: 95%;
}
.form-toggle {
flex-direction: column;
}
}