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

body {
    background: linear-gradient(135deg, #e8dfff 0%, #f3efff 100%);
    color: #645e74;
    font-family: "Poppins", sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    --color-primary: #8864f0;
    --color-border: #d0d0d6;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 22px;
    padding: 20px;
    width: clamp(300px, 85vw, 500px);
    box-shadow: 0 20px 40px rgba(136, 100, 240, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.hero, form {
    flex: 1 1 50%;
}

.hero {
    background: linear-gradient(135deg, #8864f0 0%, #6b46c1 100%);
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
    font-family: "Space Grotesk", sans-serif;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: inherit;
    background: linear-gradient(
        rgba(95, 69, 168, 0%),
        rgba(95, 69, 168, 0.7)
    );
    padding: 40px 66px;
    height: 100%;
    min-height: 170px;
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 22px;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero h3 {
    margin-top: 12px;
    font-size: 18px;
    color: #c7c2dc;
    display: none;
    font-weight: 400;
}

form {
    padding: 30px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

form > h2 {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 4px;
}

form > h3 {
    color: #9c99a4;
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 8px;
}

button, input {
    height: 44px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: transparent;
    width: 100%;
    outline-color: var(--color-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(136, 100, 240, 0.2);
}

input {
    padding: 0 16px;
    font-size: 14px;
}

input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(136, 100, 240, 0.1);
}

input::placeholder {
    color: #9c99a4;
}

.socials {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.extra-text {
    display: none;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f2f3f6;
    cursor: pointer;
    font-size: 14px;
    color: #645e74;
    border: 1px solid #e5e7eb;
}

.social-btn:hover {
    background: #e5e7eb;
}

.social-icon {
    width: 18px;
    height: 18px;
}

form > button[type="submit"] {
    color: #ffffff;
    background: var(--color-primary);
    font-size: 17px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    margin-top: 8px;
}

form > button[type="submit"]:hover {
    background: #7c3aed;
}

.or {
    position: relative;
    text-align: center;
    height: 24px;
    margin: 8px 0;
}

.or::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 0;
    width: 100%;
    translate: 0 -50%;
    height: 1px;
    background: var(--color-border);
    opacity: 0.6;
}

.or::after {
    content: "Or";
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: 1;
    background: #ffffff;
    font-size: 12px;
    padding: 0 12px;
    color: #9c99a4;
}

/* Loading animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (width >= 485px) {
    .card {
        width: clamp(300px, 99vw, 740px);
    }

    form {
        padding-left: 48px;
        padding-right: 48px;
    }

    .hero-inner {
        padding-right: clamp(10px, 20vw, 60px);
    }

    .socials {
        flex-direction: column;
    }

    .extra-text {
        display: inline;
    }
}

@media (width >= 640px) {
    .card {
        flex-direction: row;
        padding: 8px 0 8px 8px;
    }

    form :is(h2, h3) {
        text-align: left;
    }

    .hero-inner {
        justify-content: center;
        align-items: flex-start;
        padding: 0 36px;
    }

    .hero h3 {
        display: block;
    }

    form {
        padding: 30px;
    }
}