:root {
    --login-font-sans: var(--font-body);
    --login-font-display: var(--font-display);
}

html,
body {
    background: #07101d;
    color: #c9d1d9;
    font-family: var(--login-font-sans);
}

body.login-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(0, 96, 170, 0.22), transparent 38%),
        linear-gradient(180deg, #07101d 0%, #0d1117 52%, #10141a 100%);
}

body.login-page,
body.login-page button,
body.login-page a,
body.login-page input,
body.login-page textarea,
body.login-page select,
body.login-page .font-headline,
body.login-page .font-body,
body.login-page .font-label,
body.login-page .font-\[\'Inter\'\] {
    font-family: var(--login-font-sans);
}

body.login-page h1,
body.login-page h2,
body.login-page h3,
.login-title {
    font-family: var(--login-font-display);
}

.login-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.login-shell::before {
    background-image:
        linear-gradient(rgba(162, 201, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(162, 201, 255, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    inset: 0;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 72%);
    pointer-events: none;
    position: absolute;
}

.login-home-link {
    align-items: center;
    border: 1px solid rgba(139, 148, 158, 0.24);
    border-radius: 12px;
    color: #f0f6fc;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 10px;
    left: clamp(16px, 4vw, 40px);
    min-height: 44px;
    padding: 0 14px;
    position: absolute;
    text-decoration: none;
    top: 22px;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
    z-index: 1;
}

.login-home-link .material-symbols-outlined {
    color: #58a6ff;
    font-size: 21px;
}

.login-home-link:hover,
.login-home-link:focus-visible {
    background: rgba(88, 166, 255, 0.12);
    border-color: rgba(88, 166, 255, 0.38);
    color: #ffffff;
    outline: none;
    transform: translateY(-1px);
}

.login-content {
    align-items: center;
    display: flex;
    flex: 1;
    justify-content: center;
    padding: 32px 16px 48px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(22, 27, 34, 0.92);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(48, 54, 61, 0.35), 0 28px 70px rgba(1, 4, 9, 0.42);
    max-width: 380px;
    padding: 32px 24px;
    width: 100%;
    backdrop-filter: blur(18px);
}

@media (min-width: 640px) {
    .login-card {
        padding: 40px 32px;
    }
}

.login-brand {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    text-align: center;
}

.login-logo {
    align-items: center;
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid rgba(88, 166, 255, 0.25);
    border-radius: 12px;
    color: #58a6ff;
    display: flex;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.login-logo-icon {
    font-size: 30px;
    font-variation-settings: "FILL" 1;
    line-height: 1;
}

.login-title {
    color: #f0f6fc;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
}

.login-subtitle {
    color: #8b949e;
    font-size: 13px;
    line-height: 1.45;
    margin: -4px 0 0;
}

.login-error {
    background: #2d1a1f;
    border: 1px solid #f85149;
    border-radius: 8px;
    color: #f85149;
    display: flex;
    font-size: 12px;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 12px;
}

.oauth-button {
    background: #21262d;
    border: 1px solid #30363d !important;
    color: #c9d1d9;
    font-family: var(--login-font-sans);
    font-weight: 500;
    min-height: 52px;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.oauth-button:hover {
    background: #30363d;
    border-color: #8b949e !important;
    transform: translateY(-1px);
}

.oauth-button:active {
    transform: translateY(0);
}

.oauth-icon--discord {
    transform: translateX(1px);
}

.login-footer footer {
    background: transparent;
    border-top: 1px solid #30363d;
    color: #8b949e;
    padding: 20px 16px;
    position: relative;
    z-index: 1;
}

.login-footer footer > div {
    padding: 0;
}

.login-footer footer span,
.login-footer footer a {
    color: #8b949e;
}

.login-footer footer a:hover {
    color: #58a6ff;
}

.login-footer footer div > div {
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: center;
}

@media (max-width: 640px) {
    .login-content {
        align-items: flex-start;
        padding: 96px 14px 48px;
    }

    .login-home-link {
        left: 14px;
        top: 18px;
    }

    .login-card {
        padding: 28px 20px;
    }

    .oauth-button {
        width: 100%;
    }

    .login-footer footer div {
        text-align: center;
    }

    .login-footer footer div > div {
        align-items: center;
        flex-direction: column;
        gap: 10px;
    }

    .login-footer footer a {
        display: inline-flex;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        padding: 6px 12px;
    }
}
