@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body{
    background-color: #c9d6ff;
    background: linear-gradient(to right, #e2e2e2, #c9d6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
}

.container{
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 520px;
}

.container p{
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.container span{
    font-size: 12px;
}

.container a{
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 10px 0; 
}

.container a.forgot-pass {
    transition: color 0.3s ease;
}
.container a.forgot-pass:hover {
    color: #512da8;
    text-decoration: underline;
}

/* --- NORMAL BUTTONS --- */
.container button {
    background-color: #512da8;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.container button:hover {
    background-color: #5e35b1; 
    transform: translateY(-3px) scale(1.02); 
    box-shadow: 0 8px 15px rgba(81, 45, 168, 0.4); 
}

.container button:active {
    transform: translateY(1px) scale(0.98); 
    box-shadow: 0 3px 8px rgba(81, 45, 168, 0.3); 
}

/* --- TOGGLE BUTTONS (WITH PULSE GLOW) --- */
.container button.hidden {
    background-color: transparent;
    border-color: #fff;
    box-shadow: none; 
    animation: pulseGlow 2s infinite; 
}

.container button.hidden:hover {
    background-color: rgba(255,255,255,0.1);
    animation: none; 
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.container form{
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
}

/* --- INPUTS & ICONS --- */
.input-wrapper {
    position: relative;
    width: 100%;
    margin: 8px 0;
}

.input-wrapper input {
    background-color: #eee;
    border: none;
    padding: 10px 15px 10px 40px; 
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
    transition: 0.3s ease;
}

.input-wrapper input:focus::placeholder { color: transparent; }

.input-wrapper .left-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none; 
    transition: 0.3s ease;
}

.input-wrapper:focus-within .left-icon { color: #512da8; }
.input-wrapper.password-wrapper input { padding-right: 40px; }

.input-wrapper .right-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    font-size: 14px;
    transition: 0.3s ease;
}

.input-wrapper .right-icon:hover { color: #512da8; }

.container form p.password-hint {
    font-size: 11px;
    color: #777;
    width: 100%;
    text-align: center;
    margin: 2px 0 10px 0;
}

.animated-text {
    margin: 10px 0 15px;
    font-weight: 500;
    transition: opacity 0.5s ease-in-out;
    min-height: 15px; 
    text-align: center;
}

/* --- RECAPTCHA --- */
.recaptcha-container {
    margin: 12px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0.92); 
    transform-origin: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 
}

/* --- SOCIAL ICONS --- */
.social-icons { margin: 5px 0 15px; display: flex; gap: 8px; }
.social-icons a {
    border: 1px solid #ccc; border-radius: 50%; display: inline-flex;
    justify-content: center; align-items: center; width: 35px; height: 35px;
    color: #333; font-size: 14px; transition: all 0.3s ease; 
}
.social-icons a:hover { transform: translateY(-3px) scale(1.1); border-color: #eee; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); }
.social-icons a.google-icon:hover { color: #db4437; border-color: #db4437; }
.social-icons a.facebook-icon:hover { color: #4267B2; border-color: #4267B2; }
.social-icons a.github-icon:hover { color: #171515; border-color: #171515; }
.social-icons a.linkedin-icon:hover { color: #0077b5; border-color: #0077b5; }


/* ========================================= */
/* DESKTOP SLIDE & BLUE SECTION ANIMATION */
/* ========================================= */
.form-container{ position: absolute; top: 0; height: 100%; transition: all 0.6s ease-in-out; }
.sign-in{ left: 0; width: 50%; z-index: 2; }
.container.active .sign-in{ transform: translateX(100%); }
.sign-up{ left: 0; width: 50%; opacity: 0; z-index: 1; }
.container.active .sign-up{ transform: translateX(100%); opacity: 1; z-index: 5; animation: move 0.6s; }
@keyframes move{ 0%, 49.99%{ opacity: 0; z-index: 1; } 50%, 100%{ opacity: 1; z-index: 5; } }

.toggle-container{
    position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
    overflow: hidden; transition: all 0.6s ease-in-out; border-radius: 150px 0 0 100px; z-index: 1000;
}
.container.active .toggle-container{ transform: translateX(-100%); border-radius: 0 150px 100px 0; }

.toggle{
    /* ANIMATED MOVING GRADIENT */
    background: linear-gradient(-45deg, #5c6bc0, #512da8, #3949ab, #7e57c2);
    background-size: 400% 400%;
    animation: gradientBG 8s ease infinite;
    color: #fff; position: relative; left: -100%; height: 100%; width: 200%;
    transform: translateX(0); transition: all 0.6s ease-in-out;
}
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.container.active .toggle{ transform: translateX(50%); }

.toggle-panel{
    position: absolute; width: 50%; height: 100%; display: flex; align-items: center;
    justify-content: center; flex-direction: column; padding: 0 30px; text-align: center;
    top: 0; transform: translateX(0); transition: all 0.6s ease-in-out;
    z-index: 1; /* To stay above particles */
}
.toggle-left{ transform: translateX(-200%); }
.container.active .toggle-left{ transform: translateX(0); }
.toggle-right{ right: 0; transform: translateX(0); }
.container.active .toggle-right{ transform: translateX(200%); }


/* ========================================= */
/* PARTICLES (FLOATING BUBBLES) ANIMATION */
/* ========================================= */
.particles {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden; margin: 0; padding: 0; z-index: 0;
}
.particles li {
    position: absolute; display: block; list-style: none; width: 20px; height: 20px;
    background: rgba(255, 255, 255, 0.15); animation: floatUp 20s linear infinite;
    bottom: -150px; border-radius: 50%;
}
.particles li:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.particles li:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.particles li:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.particles li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.particles li:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.particles li:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }
.particles li:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.particles li:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }
.particles li:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; }
.particles li:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s; }

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; }
}


/* ========================================= */
/* 📱 MOBILE RESPONSIVE (VERTICAL FIX) */
/* ========================================= */
@media (max-width: 768px) {
    .container { min-height: 680px; width: 95%; }
    .container form { padding: 0 20px; }
    .form-container { width: 100%; height: 57.5%; left: 0; top: 0; }
    .sign-in { transform: translateX(0) !important; }
    .sign-in form { padding-top: 15px; }
    .toggle-container { top: 58%; }
    .container.active .sign-in { transform: translateY(-100%) !important; opacity: 0; }
    .sign-up { top: 40%; transform: translateY(100%) !important; transition: all 0.6s ease-in-out; }
    .container.active .sign-up { transform: translateY(0) !important; opacity: 1; z-index: 5; animation: none !important; }
    .toggle-container { width: 100%; height: 40%; left: 0; top: 60%; border-radius: 80px 80px 0 0; transform: translateX(0) !important; }
    .container.active .toggle-container { top: 0; border-radius: 0 0 80px 80px; transform: translateX(0) !important; }
    .toggle { width: 100%; height: 200%; left: 0; top: -100%; transform: translateX(0) translateY(0) !important; }
    .container.active .toggle { transform: translateX(0) translateY(50%) !important; }
    .toggle-panel { width: 100%; height: 50%; padding: 0 15px; transform: translateX(0) !important; }
    .toggle-left { top: 0; left: 0; transform: translateY(-200%) !important; }
    .container.active .toggle-left { transform: translateY(0) !important; }
    .toggle-right { right: 0; bottom: 0; top: auto; transform: translateY(0) !important; }
    .container.active .toggle-right { transform: translateY(200%) !important; }
    .recaptcha-container { transform: scale(0.85); margin: 5px 0; }
    .container h1 { font-size: 22px; }
    .social-icons { margin: 5px 0 10px; }
}

/* --- OTP SYSTEM STYLING --- */
.otp-inputs-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.otp-box {
    width: 45px;
    height: 45px;
    background-color: #eee;
    border: 2px solid transparent;
    border-radius: 10px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
}

.otp-box:focus {
    border-color: #512da8;
    background-color: #fff;
    box-shadow: 0 0 8px rgba(81, 45, 168, 0.2);
}

.otp-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    gap: 8px;
}

.otp-actions a {
    font-size: 13px;
    color: #512da8 !important;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.otp-actions a:hover {
    text-decoration: underline;
}

.otp-actions a.disabled {
    color: #999 !important;
    pointer-events: none;
    text-decoration: none;
}