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

:root {
    --primary-color: #6d5b9b;
    --primary-hover: #4b4168;
    --primary-light: #9c89ce;
    --bg-body: #fcfbfd;
    --text-dark: #333333;
    --text-muted: #777777;
    --border-color: #d4cdeb;
    --input-bg: #fcfbfd;
    --accent-soft: #f0ecfa;
}

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

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-body);
    overflow: hidden;
    position: relative;
}

/* Background decorations - Animated Bubbles/Curves */
body::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(128, 101, 196, 0.4) 0%, rgba(113, 83, 187, 0.1) 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(40px);
    z-index: 0;
    animation: morph-body 12s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(83, 48, 199, 0.6) 0%, rgba(156, 137, 206, 0.1) 100%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    filter: blur(50px);
    z-index: 0;
    animation: morph-body 15s ease-in-out infinite alternate;
}

@keyframes morph-body {

    0%,
    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    34% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }

    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    }
}

.container {
    display: flex;
    width: 1050px;
    height: 600px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(109, 91, 155, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Bubbles inside the box */
.container::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(156, 137, 206, 0.15) 0%, transparent 80%);
    border-radius: 50%;
    z-index: 0;
}

.container::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 205, 235, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

/* LEFT SIDE (TEXT) */
.left-side {
    flex: 1;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 50px 60px;
}

.welcome-text.text-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    z-index: 2;
    /* ensure text is above the curves */
}

.welcome-text h1 {
    font-size: 38px;
    font-weight: 800;
    color: var(--primary-hover);
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.welcome-text p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 350px;
    font-weight: 500;
}

/* Large central floating curve */
.left-side::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, rgba(156, 137, 206, 0.4) 0%, rgba(109, 91, 155, 0.1) 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(25px);
    z-index: -1;
    animation: morph-body 10s ease-in-out infinite alternate;
}

/* Secondary bottom curve */
.left-side::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(212, 205, 235, 0.6) 0%, rgba(156, 137, 206, 0.1) 100%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    filter: blur(30px);
    z-index: -1;
    animation: morph-body 14s ease-in-out infinite alternate-reverse;
}

/* RIGHT SIDE (FORM CARD) */
.right-side {
    flex: 1;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 50px 30px 10px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(109, 91, 155, 0.1);
    border: 1px solid rgba(212, 205, 235, 0.4);
    text-align: center;
    position: relative;
    z-index: 3;
}

.avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 15px rgba(109, 91, 155, 0.2);
}

.subtitle {
    margin-bottom: 25px;
    color: var(--primary-hover);
    font-weight: 700;
    font-size: 20px;
}

/* Input Fields */
.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group .icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-light);
    font-size: 15px;
}

.input-group input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border-radius: 30px;
    border: 1.5px solid var(--accent-soft);
    background: var(--accent-soft);
    outline: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    transition: 0.3s;
}

.input-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
}

.input-group input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(109, 91, 155, 0.1);
}

.input-group input:focus+.icon,
.input-group input:not(:placeholder-shown)+.icon {
    color: var(--primary-color);
}

/* Button */
.btn-primary {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(109, 91, 155, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(109, 91, 155, 0.35);
}

/* Footer Form */
.form-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    gap: 5px;
}

.form-footer.options {
    justify-content: space-between;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.remember {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
}

.remember input {
    accent-color: var(--primary-color);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.register-link {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        width: 90%;
        height: auto;
        min-height: 600px;
    }

    .left-side {
        padding: 40px 30px;
        text-align: center;
    }

    .top-brand {
        justify-content: center;
        margin-bottom: 30px;
    }

    .welcome-text p {
        margin: 0 auto;
    }

    .footer-left {
        flex-direction: column;
        gap: 15px;
        margin-top: 30px;
    }

    .right-side {
        padding: 0 30px 40px;
    }
}