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

:root {
    --auth-bg-start: #667eea;
    --auth-bg-end: #764ba2;
    --auth-surface: rgba(255, 255, 255, 0.16);
    --auth-surface-strong: rgba(255, 255, 255, 0.96);
    --auth-border: rgba(255, 255, 255, 0.2);
    --auth-copy: rgba(255, 255, 255, 0.82);
    --auth-copy-muted: rgba(255, 255, 255, 0.68);
    --auth-shadow: 0 28px 70px rgba(31, 38, 135, 0.36);
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 30%),
        linear-gradient(135deg, var(--auth-bg-start) 0%, var(--auth-bg-end) 100%);
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-orbs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-orb {
    position: absolute;
    border-radius: 999px;
    opacity: 0.22;
    filter: blur(1px);
}

.auth-orb--one {
    top: -6rem;
    left: -5rem;
    width: 16rem;
    height: 16rem;
    background: #c4b5fd;
    animation: auth-float 6s ease-in-out infinite;
}

.auth-orb--two {
    right: -10rem;
    bottom: -10rem;
    width: 24rem;
    height: 24rem;
    background: #a5b4fc;
    animation: auth-float 5s ease-in-out infinite 0.9s;
}

.auth-orb--three {
    top: 30%;
    right: -2rem;
    width: 20rem;
    height: 20rem;
    background: #f9a8d4;
    animation: auth-float 7s ease-in-out infinite 1.4s;
}

.auth-orb--four {
    bottom: 18%;
    left: 8%;
    width: 18rem;
    height: 18rem;
    background: #93c5fd;
    animation: auth-float 6s ease-in-out infinite 0.4s;
}

.auth-card {
    position: relative;
    width: min(100%, 34rem);
    padding: 2.75rem 2.35rem;
    border: 1px solid var(--auth-border);
    border-radius: 2rem;
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
    text-align: center;
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    animation: auth-reveal 0.75s cubic-bezier(0.18, 0.89, 0.32, 1.2) forwards 0.08s;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: calc(2rem - 1px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    pointer-events: none;
}

.auth-card > * {
    position: relative;
    z-index: 1;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-brand-mark {
    display: flex;
    width: 6.4rem;
    height: 6.4rem;
    margin: 1.5rem auto 1.35rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 16px 40px rgba(67, 56, 202, 0.24);
}

.auth-brand-mark img {
    width: 3.45rem;
    height: 3.45rem;
}

.auth-title {
    margin: 0;
    font-size: clamp(2.35rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.05;
}

.auth-copy {
    margin: 0.85rem auto 0;
    max-width: 26rem;
    color: var(--auth-copy);
    font-size: 1.03rem;
    line-height: 1.7;
}

.auth-message {
    margin: 1.5rem auto 0;
    max-width: 28rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.09);
    color: var(--auth-copy);
    font-size: 0.95rem;
    line-height: 1.6;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1.3rem;
    color: var(--auth-copy-muted);
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.auth-divider span {
    white-space: nowrap;
}

.auth-provider-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.auth-provider {
    display: flex;
    width: 4.3rem;
    height: 4.3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 22px rgba(46, 27, 88, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.auth-provider:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 18px 30px rgba(46, 27, 88, 0.28);
}

.auth-provider:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.26), 0 18px 30px rgba(46, 27, 88, 0.28);
}

.auth-provider svg {
    width: 1.7rem;
    height: 1.7rem;
}

.auth-provider--google {
    border-color: rgba(255, 255, 255, 0.95);
    background: var(--auth-surface-strong);
}

.auth-provider--discord {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    color: #fff;
}

.auth-provider--twitch {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, #9146ff 0%, #6f2cff 100%);
    color: #fff;
}

.auth-footer {
    margin-top: 2rem;
    color: var(--auth-copy);
    font-size: 1rem;
}

.auth-footer a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.auth-footer a:hover {
    text-decoration-thickness: 3px;
}

.auth-subtle {
    margin-top: 1rem;
    color: var(--auth-copy-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

@keyframes auth-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }
}

@keyframes auth-reveal {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .auth-shell {
        padding: 1rem;
    }

    .auth-card {
        padding: 2.2rem 1.35rem;
        border-radius: 1.75rem;
    }

    .auth-card::before {
        border-radius: calc(1.75rem - 1px);
    }

    .auth-brand-mark {
        width: 5.5rem;
        height: 5.5rem;
        margin-top: 1.25rem;
    }

    .auth-brand-mark img {
        width: 3rem;
        height: 3rem;
    }

    .auth-copy {
        font-size: 0.96rem;
    }

    .auth-provider {
        width: 3.8rem;
        height: 3.8rem;
    }

    .auth-provider svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    .auth-divider {
        gap: 0.7rem;
        font-size: 0.78rem;
    }
}
