:root {
    --primary-color: #fe2c55;
    --secondary-color: #25f4ee;
    --dark: #121212;
    --light-dark: #1e1e1e;
    --text-color: #fff;
    --text-muted: #bbb;
    --bg-purple: #420264;
    --form-gradient: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
}

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

body {
    background-color: var(--dark);
    background-image: linear-gradient(135deg, rgba(74, 20, 140, 0.85), rgba(10, 25, 47, 0.95)), url('/static/social_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 24px;
    overflow-x: hidden;
}

.container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 500px;
    background-color: var(--light-dark);
    border-radius: 20px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.25);
    overflow: hidden;
    transition: all 0.6s ease-in-out;
}

.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;
    opacity: 1;
}

.container.active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

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

.container.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;
    }
}

form {
    background-color: var(--light-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
    text-align: center;
}

h1 {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 2.2rem;
    background: var(--form-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    font-size: 2rem;
}

p {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-muted);
}

span {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

input {
    background-color: rgba(255,255,255,0.08);
    border: 1px solid transparent;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s;
}

input:focus {
    border-color: var(--secondary-color);
    outline: none;
    background-color: rgba(255,255,255,0.12);
}

button {
    border-radius: 25px;
    border: none;
    background: var(--form-gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 40px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: 0.2s;
}

button:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    transform: scale(1.02);
}

.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.active .overlay-container {
    transform: translateX(-100%);
}

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

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

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

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

.container.active .overlay-left {
    transform: translateX(0);
}

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

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

.ghost {
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 30px;
}

.ghost:hover {
    background: #fff;
    color: var(--dark);
}

.social-container {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.social-container a {
    border: 1px solid #444;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    text-decoration: none;
    color: #fff;
    font-size: 1.2rem;
    transition: 0.3s;
    background-color: rgba(255,255,255,0.05);
}

.social-container a:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: scale(1.1);
}

.alert-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: none;
    width: min(90%, 420px);
}

.alert {
    background: var(--secondary-color);
    color: #000;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 88px 12px 24px;
        background-attachment: scroll;
    }

    .container {
        max-width: 430px;
        height: 620px;
        border-radius: 16px;
    }

    .form-container {
        top: 0;
        left: 0;
        width: 100%;
        height: calc(100% - 140px);
    }

    .sign-in-container {
        width: 100%;
        opacity: 1;
        z-index: 2;
        transform: translateX(0);
    }

    .sign-up-container {
        width: 100%;
        opacity: 0;
        z-index: 1;
        transform: translateX(100%);
    }

    .container.active .sign-in-container {
        opacity: 0;
        z-index: 1;
        transform: translateX(-100%);
    }

    .container.active .sign-up-container {
        opacity: 1;
        z-index: 5;
        transform: translateX(0);
        animation: none;
    }

    form {
        padding: 24px 22px;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 14px;
    }

    h2 {
        font-size: 1.7rem;
        margin-bottom: 14px;
    }

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

    input {
        padding: 12px 14px;
        margin: 7px 0;
    }

    button {
        padding: 11px 30px;
        font-size: 13px;
    }

    .overlay-container {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 140px;
        transform: none;
    }

    .container.active .overlay-container {
        transform: none;
    }

    .overlay {
        left: 0;
        width: 200%;
        height: 100%;
        transform: translateX(0);
    }

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

    .overlay-panel {
        width: 50%;
        height: 100%;
        padding: 18px 20px;
    }

    .overlay-left {
        left: 50%;
        transform: translateX(0);
    }

    .overlay-right {
        left: 0;
        right: auto;
        transform: translateX(0);
    }

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

    .overlay-panel h2 {
        font-size: 1.35rem;
        margin-bottom: 6px;
    }

    .overlay-panel p {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .ghost {
        padding: 9px 24px;
        font-size: 12px;
    }
}
