/* =========================================================
   CITRA LOGIN
   Premium / Futuristic / Clean
   Mobile First
========================================================= */

:root {
    --citra-purple: #9b4dff;
    --citra-purple-light: #c98cff;
    --citra-purple-deep: #641fc4;

    --bg-main: #050507;
    --bg-card: rgba(16, 15, 22, 0.96);
    --bg-soft: rgba(255, 255, 255, 0.035);

    --text-main: #f4f1f8;
    --text-soft: #aaa5b4;
    --text-muted: #77717f;

    --border: rgba(170, 100, 255, 0.20);
    --border-soft: rgba(255, 255, 255, 0.07);
}


/* =========================================================
   RESET
========================================================= */

html,
body {
    width: 100%;
    min-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

html {
    background: #050507;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    background: #050507;
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
a,
input,
textarea,
select {
    font-family: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   PAGE
========================================================= */

.login {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    overflow: hidden;

    padding: 18px 14px;

    background:
        radial-gradient(
            circle at 50% 15%,
            rgba(135, 42, 255, 0.13),
            transparent 30%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(92, 24, 180, 0.08),
            transparent 35%
        ),
        #050507;
}


/* =========================================================
   AMBIENT GLOW
========================================================= */

.login::before {
    content: "";

    position: absolute;

    width: 520px;
    height: 520px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background:
        radial-gradient(
            circle,
            rgba(150, 65, 255, 0.075) 0%,
            rgba(150, 65, 255, 0.025) 38%,
            transparent 70%
        );

    pointer-events: none;
}


/* =========================================================
   TOP LIGHT
========================================================= */

.login::after {
    content: "";

    position: absolute;

    width: 280px;
    height: 1px;

    left: 50%;
    top: 0;

    transform: translateX(-50%);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(174, 91, 255, 0.35),
            transparent
        );

    filter: blur(1px);

    pointer-events: none;
}


/* =========================================================
   CARD
========================================================= */

.login-card {
    width: min(100%, 390px);

    box-sizing: border-box;

    position: relative;
    z-index: 2;

    padding: 38px 24px 29px;

    border-radius: 25px;

    background:
        linear-gradient(
            145deg,
            rgba(24, 22, 31, 0.98),
            rgba(12, 11, 16, 0.98)
        );

    border: 1px solid var(--border);

    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.60),
        0 0 35px rgba(145, 65, 255, 0.12),
        0 0 90px rgba(105, 35, 190, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);

    text-align: center;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    animation: loginCardIn 0.65s ease both;
}


/* =========================================================
   TOP DECORATIVE LINE
========================================================= */

.login-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 50%;

    width: 100px;
    height: 2px;

    transform: translateX(-50%);

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--citra-purple-light),
            transparent
        );

    border-radius: 99px;

    box-shadow:
        0 0 14px rgba(174, 91, 255, 0.45);
}


/* =========================================================
   LOGO
========================================================= */

.login-logo {
    width: 155px;
    max-width: 65%;

    display: block;

    margin: 1px auto 22px;

    object-fit: contain;

    filter:
        drop-shadow(0 0 12px rgba(155, 77, 255, 0.22))
        drop-shadow(0 7px 18px rgba(0, 0, 0, 0.45));

    user-select: none;

    animation: logoFloat 4s ease-in-out infinite;
}


/* =========================================================
   WELCOME
========================================================= */

.login-subtitle {
    margin: 0 auto 26px;

    color: #f5f2f8;

    font-size: 15px;
    line-height: 1.65;

    font-weight: 700;
    letter-spacing: -0.01em;
}


/* =========================================================
   GENDER
========================================================= */

.gender {
    width: 100%;
    margin-bottom: 18px;
}

.gender-title {
    margin: 0 0 10px;

    color: #8f8998;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.04em;
}


/* =========================================================
   GENDER SWITCH
========================================================= */

.gender-switch {
    width: 100%;

    box-sizing: border-box;

    display: flex;
    align-items: center;

    padding: 4px;

    position: relative;

    border-radius: 17px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.045),
            rgba(255, 255, 255, 0.018)
        );

    border: 1px solid var(--border-soft);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}


/* =========================================================
   GENDER OPTION
========================================================= */

.gender-option {
    flex: 1;

    min-width: 0;
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 7px 10px;

    border: 1px solid transparent;
    border-radius: 13px;

    background: transparent;

    color: #8f8998;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}


/* =========================================================
   AVATAR
========================================================= */

.gender-option img {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    border-radius: 50%;

    object-fit: cover;

    border: 1px solid rgba(164, 82, 255, 0.28);

    box-shadow:
        0 0 0 3px rgba(155, 77, 255, 0.035),
        0 4px 12px rgba(0, 0, 0, 0.45);

    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}


/* =========================================================
   HOVER
========================================================= */

.gender-option:hover {
    color: #d7d0df;

    background: rgba(155, 77, 255, 0.055);

    border-color: rgba(155, 77, 255, 0.10);
}

.gender-option:hover img {
    transform: scale(1.06);

    border-color: rgba(177, 101, 255, 0.48);
}


/* =========================================================
   SELECTED
========================================================= */

.gender-option.active,
.gender-option.selected,
.gender-option[aria-selected="true"] {
    color: #f4edff;

    background:
        linear-gradient(
            135deg,
            rgba(155, 77, 255, 0.18),
            rgba(107, 36, 190, 0.10)
        );

    border-color: rgba(169, 91, 255, 0.30);

    box-shadow:
        0 5px 18px rgba(112, 42, 195, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.gender-option.active img,
.gender-option.selected img,
.gender-option[aria-selected="true"] img {
    border-color: rgba(190, 119, 255, 0.70);

    box-shadow:
        0 0 0 3px rgba(155, 77, 255, 0.09),
        0 0 14px rgba(155, 77, 255, 0.22);
}


/* =========================================================
   ERROR
========================================================= */

.gender-error {
    min-height: 16px;

    box-sizing: border-box;

    margin: 6px 2px 0;

    color: #ff6f91;

    font-size: 11px;

    line-height: 1.45;

    text-align: left;
}


/* =========================================================
   GOOGLE BUTTON
========================================================= */

.google-btn {
    width: 100%;

    min-height: 58px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 0 18px;

    border: 0;
    border-radius: 16px;

    background: #ffffff;

    color: #17151a;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.30),
        0 0 0 1px rgba(255, 255, 255, 0.08);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.google-btn img {
    width: 21px;
    height: 21px;

    flex: 0 0 21px;

    object-fit: contain;
}

.google-btn:hover {
    background: #ffffff;

    transform: translateY(-2px);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.40),
        0 0 25px rgba(255, 255, 255, 0.07);
}

.google-btn:active {
    transform: translateY(0);

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.30);
}

.google-btn:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}


/* =========================================================
   TERMS
========================================================= */

.login-footer {
    display: block;

    margin: 10px 7px 0;

    color: #77717e;

    font-size: 10px;
    line-height: 1.65;
}

.login-footer a {
    color: var(--citra-purple-light);

    text-decoration: none;

    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: #dfc1ff;
    text-decoration: underline;
}


/* =========================================================
   VERSION
========================================================= */

.login-version {
    margin-top: 25px;

    color: #55515b;

    font-size: 9px;
    font-weight: 600;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


/* =========================================================
   ANIMATION
========================================================= */

@keyframes loginCardIn {

    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 480px) {

    .login {
        align-items: stretch;
        justify-content: center;

        padding: 10px 10px;
    }

    .login-card {
        width: 100%;
        max-width: none;

        align-self: center;

        padding: 34px 18px 27px;

        border-radius: 22px;
    }

    .login-logo {
        width: 145px;
        max-width: 58%;

        margin-bottom: 19px;
    }

    .login-subtitle {
        margin-bottom: 26px;

        font-size: 14px;
        line-height: 1.65;
    }

    .gender {
        margin-bottom: 17px;
    }

    .gender-option {
        min-height: 52px;

        gap: 8px;

        padding-left: 7px;
        padding-right: 7px;

        font-size: 12px;
    }

    .gender-option img {
        width: 32px;
        height: 32px;

        flex-basis: 32px;
    }

    .google-btn {
        min-height: 56px;

        border-radius: 15px;

        font-size: 14px;
    }

    .login-footer {
        margin-left: 4px;
        margin-right: 4px;
    }

    .login-version {
        margin-top: 23px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 360px) {

    .login {
        padding: 7px;
    }

    .login-card {
        padding: 30px 15px 23px;

        border-radius: 20px;
    }

    .login-logo {
        width: 130px;

        margin-bottom: 17px;
    }

    .login-subtitle {
        margin-bottom: 23px;

        font-size: 13px;
    }

    .gender-title {
        margin-bottom: 9px;

        font-size: 11px;
    }

    .gender-option {
        min-height: 50px;

        gap: 6px;

        font-size: 11px;
    }

    .gender-option img {
        width: 30px;
        height: 30px;

        flex-basis: 30px;
    }

    .google-btn {
        min-height: 54px;

        font-size: 13px;
    }

    .login-footer {
        font-size: 9px;
    }

    .login-version {
        margin-top: 21px;
    }
}


/* =========================================================
   LANDSCAPE MOBILE
========================================================= */

@media (max-height: 600px) and (max-width: 600px) {

    .login {
        align-items: flex-start;

        padding-top: 8px;
        padding-bottom: 8px;

        overflow-y: auto;
    }

    .login-card {
        margin-top: 0;
        margin-bottom: 0;

        padding-top: 25px;
        padding-bottom: 21px;
    }

    .login-logo {
        width: 125px;

        margin-bottom: 13px;
    }

    .login-subtitle {
        margin-bottom: 17px;
    }

    .gender {
        margin-bottom: 13px;
    }

    .gender-option {
        min-height: 46px;
    }

    .gender-option img {
        width: 29px;
        height: 29px;

        flex-basis: 29px;
    }

    .google-btn {
        min-height: 50px;
    }

    .login-version {
        margin-top: 17px;
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.google-btn:focus-visible,
.gender-option:focus-visible,
.login-footer a:focus-visible {
    outline: 2px solid rgba(190, 119, 255, 0.75);

    outline-offset: 3px;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .login-card,
    .login-logo {
        animation: none;
    }

    .gender-option,
    .gender-option img,
    .google-btn,
    .login-footer a {
        transition: none;
    }
}