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

body {
    user-select: none;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0c7632 0%, #1e3034 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 15%, rgba(46, 8, 244, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(207, 19, 228, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.screen-1 {
    background-color: #ffffff;
    padding: 2em;
    display: flex;
    flex-direction: column;
    border-radius: 30px;
    box-shadow: 
        0 10px 20px rgba(46, 8, 244, 0.05),
        0 6px 6px rgba(46, 8, 244, 0.1),
        0 0 100px rgba(46, 8, 244, 0.1);
    max-width: 400px;
    width: 100%;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    width: 80px;
    height: 80px;
    margin: -1.5em auto 2em;
    display: block;
    position: relative;
    z-index: 2;
    padding: 15px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(46, 8, 244, 0.1);
    border: 2px solid rgba(46, 8, 244, 0.1);
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 8, 244, 0.15);
    border-color: rgba(46, 8, 244, 0.2);
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin: 1em 0;
}

.social-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(46, 8, 244, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0c7632;
    transition: all 0.3s ease;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(46, 8, 244, 0.1);
}

.social-button:hover {
    background: #0c7632;
    color: white;
    border-color: #0c7632;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 8, 244, 0.2);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5em 0;
    color: rgba(102, 102, 102, 0.8);
    font-size: 0.9em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(46, 8, 244, 0.1);
}

.divider span {
    padding: 0 10px;
}

.email, .password {
    background: #f8f9ff;
    box-shadow: 0 2px 10px rgba(46, 8, 244, 0.05);
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    border-radius: 20px;
    color: #333;
    margin-bottom: 1em;
    border: 1px solid rgba(46, 8, 244, 0.1);
    transition: all 0.3s ease;
}

.email:focus-within, 
.password:focus-within {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(46, 8, 244, 0.1);
    border-color: rgba(12, 118, 50, 0.3);
    transform: translateY(-1px);
}

.email label, .password label {
    font-size: 0.9em;
    color: #333;
    font-weight: 500;
}

.sec-2 {
    display: flex;
    align-items: center;
    gap: 0.5em;
    position: relative;
    width: 100%;
}

.sec-2 i:not(.show-hide) {
    color: rgba(46, 8, 244, 0.6);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sec-2 input {
    flex: 1;
    outline: none;
    border: none;
    font-size: 0.9em;
    color: #333;
    background: transparent;
    padding-right: 35px;
    width: 100%;
    min-width: 0;
}

.sec-2 input::placeholder {
    color: #999;
}

.show-hide {
    cursor: pointer;
    color: rgba(46, 8, 244, 0.6);
    transition: color 0.3s ease;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 5px;
    width: 30px;
    text-align: center;
    z-index: 2;
}

.show-hide:hover {
    color: #0c7632;
}

.login {
    padding: 1em;
    background: linear-gradient(135deg, #0c7632 0%, #1e3034 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin: 1em 0;
    box-shadow: 0 4px 12px rgba(46, 8, 244, 0.2);
}

.login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(12, 118, 50, 0.3);
}

.login:active {
    transform: translateY(0);
}

.footer {
    flex-direction: column;
    gap: 1em;
    text-align: center;
}

.footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: rgba(102, 102, 102, 0.8);
    margin-top: 1em;
}

.footer span {
    cursor: pointer;
    color: #0c7632;
    transition: all 0.3s ease;
}

.footer span:hover {
    color: #1e3034;
    text-decoration: underline;
}

.error-message {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border-radius: 10px;
}

/* Loading spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login.loading .spinner {
    display: inline-block;
}

.login.loading span {
    display: none;
}

/* Form switching animation */
#loginForm, #registrationForm {
    display: flex;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#loginForm[style*="none"], #registrationForm[style*="none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .screen-1 {
        padding: 1.5em;
        margin: 1em;
    }

    .logo {
        width: 70px;
        height: 70px;
        margin: -1em auto 1.5em;
        padding: 12px;
    }

    

    .social-login {
        gap: 0.8em;
    }

    .email, .password {
        padding: 0.8em;
    }

    .sec-2 {
        gap: 0.3em;
    }

    .sec-2 input {
        font-size: 16px;
        padding-right: 30px;
    }

    .show-hide {
        width: 24px;
        padding: 3px;
    }
}

@media (max-width: 320px) {
    .screen-1 {
        padding: 1.2em;
    }

    .logo {
        width: 60px;
        height: 60px;
        margin: -0.8em auto 1.2em;
        padding: 10px;
    }

    .sec-2 input {
        padding-right: 25px;
    }

    .show-hide {
        width: 20px;
        padding: 2px;
    }

    .social-button {
        width: 35px;
        height: 35px;
    }
}
