* { 
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #f8f8f8 0%, #f8f8f8 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

h1 { 
    font-weight: 700; 
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #333;
    letter-spacing: -0.5px;
}

h2 {
    font-weight: 600;
}

p { 
    font-size: 15px; 
    line-height: 24px; 
    letter-spacing: 0.3px; 
    margin: 20px 0 30px;
    font-weight: 300;
}

span {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.container {
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 50px rgba(102, 126, 234, 0.15);
    position: relative;
    overflow: hidden;
    width: 850px;
    max-width: 100%;
    min-height: 600px;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container { left: 0; width: 50%; z-index: 2; }
.sign-up-container { left: 0; width: 50%; opacity: 0; z-index: 1; }


.container.right-panel-active .sign-in-container { transform: translateX(100%); }
.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100% { opacity: 1; z-index: 5; }
}


.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container { transform: translateX(-100%); }

.overlay {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay { transform: translateX(50%); }

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transition: transform 0.6s ease-in-out;
}

.overlay-panel h1 {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.overlay-panel p {
    font-size: 16px;
    font-weight: 300;
    line-height: 26px;
}

.overlay-left { transform: translateX(-20%); }
.container.right-panel-active .overlay-left { transform: translateX(0); }

.overlay-right { right: 0; transform: translateX(0); }
.container.right-panel-active .overlay-right { transform: translateX(20%); }

/* form style */
form {
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px 50px;
    height: 100%;
    text-align: center;
}

.social-container {
    margin: 15px 0;
}

.social-container a {
    border: 1px solid #ddd;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 6px;
    height: 38px;
    width: 38px;
    transition: all 0.3s ease;
    font-size: 16px;
    text-decoration: none;
}

.social-container a.facebook {
    color: #1877F2;
    border-color: #1877F2;
}

.social-container a.facebook:hover {
    background: #1877F2;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
}

.social-container a.google {
    color: #DB4437;
    border-color: #DB4437;
}

.social-container a.google:hover {
    background: #DB4437;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(219, 68, 55, 0.4);
}

.social-container a.linkedin {
    color: #0A66C2;
    border-color: #0A66C2;
}

.social-container a.linkedin:hover {
    background: #0A66C2;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(10, 102, 194, 0.4);
}

form a {
    color: #667eea;
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

form a:hover {
    color: #764ba2;
    
}

input {
    background-color: #f7f7f7;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 6px 0;
    width: 100%;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
    margin: 6px 0;
}

.password-input-wrapper input {
    margin: 0;
    padding-right: 45px;
}

.eye-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.eye-icon:hover {
    color: #0f172a;
}

input:focus {
    outline: none;
    border-color: #0f172a;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input::placeholder {
    color: #999;
    font-weight: 400;
}

button {
    border-radius: 25px;
    border: 2px solid #1e293b;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    padding: 12px 45px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button.ghost {
    background: transparent;
    border-color: #FFFFFF;
    box-shadow: none;
}

button.ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.terms-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0 8px 0;
    width: 100%;
    text-align: left;
}

.terms-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0 0;
    cursor: pointer;
    accent-color: #667eea;
}

.terms-container label {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    cursor: pointer;
    font-weight: 400;
}

.terms-link {
    color: #667eea !important;
    text-decoration: none;
    font-weight: 500;
    margin: 0 !important;
    display: inline;
}

.terms-link:hover {
    color: #764ba2 !important;
    text-decoration: underline;
}

/* mobile button */
.mobile-toggle{
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 200;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(20, 25, 48, 0.4);
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(12, 15, 29, 0.5);
}

.mobile-toggle i {
    transition: transform 0.3s ease;
}

.mobile-toggle:active {
    transform: translateY(0);
}


@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .container {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .overlay-container {
        display: none;
    }

    .form-container {
        width: 100% !important;
        left: 0 !important;
        position: relative;
    }

    .sign-in-container {
        opacity: 1;
        z-index: 2;
    }

    .sign-up-container {
        opacity: 0;
        z-index: 1;
        position: absolute;
        top: 0;
    }

    .container.mobile-sign-up .sign-in-container {
        opacity: 0;
        z-index: 1;
        transform: translateX(0);
    }

    .container.mobile-sign-up .sign-up-container {
        opacity: 1;
        z-index: 2;
        transform: translateX(0);
    }

    .container.right-panel-active .sign-in-container,
    .container.right-panel-active .sign-up-container {
        transform: translateX(0);
    }

    form {
        padding: 80px 30px 30px 30px;
        justify-content: flex-start;
    }

    h1 {
        font-size: 26px;
        margin: 0 0 12px 0;
    }

    .social-container {
        margin: 12px 0;
    }

    span {
        font-size: 11px;
    }

    input {
        padding: 11px 14px;
        margin: 5px 0;
        font-size: 13px;
    }

    .password-input-wrapper {
        margin: 5px 0;
    }

    .password-input-wrapper input {
        padding-right: 40px;
    }

    .eye-icon {
        width: 20px;
        height: 20px;
        right: 12px;
    }

    button {
        padding: 12px 40px;
        font-size: 11px;
        margin-top: 10px;
    }

    .terms-container {
        margin: 8px 0 6px 0;
        gap: 6px;
    }

    .terms-container input[type="checkbox"] {
        width: 16px;
        height: 16px;
        min-width: 16px;
    }

    .terms-container label {
        font-size: 11px;
        line-height: 1.3;
    }

    form a {
        font-size: 13px;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    form {
        padding: 70px 25px 25px 25px;
    }

    h1 {
        font-size: 24px;
    }

    .social-container a {
        height: 35px;
        width: 35px;
        margin: 0 5px;
        font-size: 14px;
    }

    .mobile-toggle {
        top: 15px;
        right: 15px;
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* Forgot Password Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 35px;
    border-radius: 15px;
    
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
}

.modal-content p {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

#forgotPasswordForm input[type="email"] {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

#forgotPasswordForm input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
}

#forgotPasswordForm button {
    width: 80%;
    padding: 14px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #ffffff !important;
    border: 2px solid #1e293b !important;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
    opacity: 1 !important;
    text-transform: uppercase;
    letter-spacing: normal;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.3);
}

#forgotPasswordForm button *,
#forgotPasswordForm button .button-text {
    color: #ffffff !important;
}

#forgotPasswordForm button:disabled {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #ffffff !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

#forgotPasswordForm button:hover:not(.loading) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.5) !important;
}

#forgotPasswordForm button:active {
    transform: translateY(0);
}

#forgotPasswordForm button[type="submit"] {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #ffffff !important;
}

.reset-message {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.reset-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.reset-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Spinner Styles */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-left: 8px;
}

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

#forgotPasswordForm button.loading {
    pointer-events: none;
    opacity: 0.7;
}

#forgotPasswordForm button .button-text {
    display: inline-block;
    color: #ffffff !important;
}