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

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

body {
    background: #f3f4f6; /* Added a subtle background color since the gradient was commented out */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    padding: 20px;
}

h1 {
    font-weight: 700;
    margin: 0;
    font-size: 28px;
}

h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
    font-size: 32px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

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

span {
    font-size: 13px;
    color: #666;
}

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

a:hover {
    color: #764ba2;
}

button {
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    padding: 14px 50px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-top: 10px;
}

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

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

button:focus {
    outline: none;
}

button.transparent-btn {
    background: transparent;
    border: 2px solid #FFFFFF;
    box-shadow: none;
}

button.transparent-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

input {
    background-color: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 8px 0;
    width: 100%;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

.auth-wrapper {
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    width: 850px;
    max-width: 100%;
    min-height: 600px; /* Increased slightly to fit more fields */
}

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

.login-form-box {
    left: 0;
    width: 50%;
    z-index: 2;
}

.auth-wrapper.panel-active .login-form-box {
    transform: translateX(100%);
}

.register-form-box {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.auth-wrapper.panel-active .register-form-box {
    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;
    }
}

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

.auth-wrapper.panel-active .slide-panel-wrapper {
    transform: translateX(-100%);
}

.slide-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-wrapper.panel-active .slide-panel {
    transform: translateX(50%);
}

.panel-content {
    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%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.panel-content-left {
    transform: translateX(-20%);
}

.auth-wrapper.panel-active .panel-content-left {
    transform: translateX(0);
}

.panel-content-right {
    right: 0;
    transform: translateX(0);
}

.auth-wrapper.panel-active .panel-content-right {
    transform: translateX(20%);
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 8px;
    height: 40px;
    width: 40px;
    transition: all 0.3s ease;
    color: #667eea;
}

.social-links a:hover {
    border-color: #667eea;
    background: #667eea;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.mobile-switch {
    display: none;
}

/* Custom Alert Messages */
.alert-msg {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: left;
}
.alert-error {
    background-color: #fee2e2;
    color: #ef4444;
    border: 1px solid #f87171;
}
.alert-success {
    background-color: #dcfce7;
    color: #22c55e;
    border: 1px solid #4ade80;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .auth-wrapper {
        min-height: auto;
        width: 100%;
        max-width: 100%;
        border-radius: 15px;
    }

    .auth-form-box {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .login-form-box,
    .register-form-box {
        position: static !important;
        width: 100% !important;
        left: 0 !important;
        transform: none !important;
        opacity: 1 !important;
        z-index: 1 !important;
    }

    .register-form-box {
        display: none;
    }

    .auth-wrapper.panel-active .login-form-box {
        display: none;
    }

    .auth-wrapper.panel-active .register-form-box {
        display: block;
    }

    .slide-panel-wrapper {
        display: none !important;
    }

    form {
        padding: 30px 25px;
        position: static;
        height: auto;
    }

    h2 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    input {
        padding: 12px 15px;
        font-size: 14px;
    }

    button {
        padding: 12px 40px;
        font-size: 12px;
    }

    .social-links a {
        height: 40px;
        width: 40px;
        margin: 0 5px;
    }

    .mobile-switch {
        display: block;
        margin-top: 20px;
        color: #667eea;
        font-size: 14px;
    }

    .mobile-switch p {
        margin: 10px 0;
        font-size: 14px;
    }

    .mobile-switch button {
        background: transparent;
        color: #667eea;
        border: 2px solid #667eea;
        padding: 10px 30px;
        margin-top: 10px;
        box-shadow: none;
    }

    .mobile-switch button:hover {
        background: #667eea;
        color: #fff;
    }
}
