:root {
    --hga-bg: #0f172a;
    --hga-card: #111827;
    --hga-border: #1f2937;
    --hga-text: #FFFFFF;
    --hga-muted: #9ca3af;
    --hga-accent: #10b981;
    --hga-accent-strong: #0ea371;
    --hga-error: #f87171;
    --hga-radius: 14px;
    --hga-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --hga-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hga-route,
.hga-form,
.hga-verify-result {
    font-family: var(--hga-font);
}

.hga-route {
    position: relative;
    background-color: #030A0C;
    overflow: hidden;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px 48px;
    isolation: isolate;
    background-image: var(--hga-hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hga-route::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(3, 10, 12, 0) -26.34%, #030A0C 100%),
        var(--hga-hero-image, linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(15, 23, 42, 0.96)));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hga-route::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 99, 104, 0.32), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(50, 133, 138, 0.24), transparent 46%);
    opacity: 0.9;
    filter: blur(60px);
    z-index: 0;
}

.hga-route + .site-footer {
    margin-top: 0;
}

.hga-route__inner {
    width: min(480px, 100%);
    position: relative;
    z-index: 1;
}

.hga-form,
.hga-verify-result {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(15, 23, 42, 0.96));
    border: 1px solid var(--hga-border);
    border-radius: var(--hga-radius);
    box-shadow: var(--hga-shadow);
    padding: 28px;
    color: var(--hga-text);
    position: relative;
    z-index: 1;
}

.hga-form h2 {
    margin: 0 0 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hga-form p {
    color: var(--hga-muted);
}

.hga-field {
    margin-bottom: 14px;
}

.hga-field--password {
    position: relative;
}

.hga-field label {
    display: block;
    margin-bottom: 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0;
    color: var(--hga-text)
}

.hga-field input[type="text"],
.hga-field input[type="email"],
.hga-field input[type="password"] {
    width: 100%;
    max-width: 421px;
    height: 59px;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #32858A;
    background: #00636826;
    color: var(--hga-text);
}

.hga-input-wrap {
    position: relative;
    max-width: 421px;
    width: 100%;
}

.hga-input-wrap input {
    max-width: none;
    padding-right: 56px;
}

.hga-form button.hga-password-toggle {
    position: absolute;
    right: 12px;
    top: 0;
    height: 59px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    border: 0;
    background: transparent !important;
    padding: 0;
    color: #FFFFFF;
    cursor: pointer;
    z-index: 2;
    border-radius: 0;
    box-shadow: none;
    transition: none;
}

.hga-form button.hga-password-toggle:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}

.hga-password-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
}

.hga-password-toggle .hga-eye-off {
    display: none;
}

.hga-password-toggle.is-visible .hga-eye-on {
    display: none;
}

.hga-password-toggle.is-visible .hga-eye-off {
    display: block;
}

.hga-password-toggle:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
}

.hga-field--error input {
    border-color: #FF5A5A;
    box-shadow: 0 0 0 1px #FF5A5A inset;
}

.hga-field__error {
    margin: 8px 0 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0;
    color: #FF5A5A;
}

.hga-form--auth .hga-field__error {
    color: #FF5A5A;
}

.hga-field input:focus {
    outline: 2px solid rgba(16, 185, 129, 0.25);
    border-color: var(--hga-accent);
}

.hga-field--inline label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.hga-notice {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 0;
    line-height: 1.5;
}

.hga-notice--error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fecdd3;
}

.hga-notice--success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #d1fae5;
}

.hga-form button {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: var(--hga-text);
    color: #030A0C;
    font-weight: 500;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease;
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.25);
}

.hga-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.3);
}

.hga-links {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hga-links a,
.hga-verify-result a {
    color: var(--hga-accent);
    font-weight: 600;
    text-decoration: none;
}

.hga-links a:hover,
.hga-verify-result a:hover {
    color: var(--hga-accent-strong);
}

.hga-form--auth .hga-links {
    width: 100%;
    max-width: 421px;
    margin: 0 auto;
    justify-content: center;
    text-align: center;
    gap: 0;
}

.hga-form--auth .hga-links a {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0;
    text-align: center;
    color: #FFFFFF;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.hga-form--login .hga-links {
    justify-content: space-between;
}

@media (max-width: 640px) {
    .hga-route {
        padding-top: 80px;
        padding-bottom: 56px;
    }

    .hga-form,
    .hga-verify-result {
        padding: 24px;
    }

    .hga-links {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Login form custom styling */

.hga-form--auth {
    background: #00636826;
    border: 1px solid #32858A;
    border-radius: 16px;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hga-form--login,
.hga-form--register {
    margin-top: 30px;
}

.hga-form--auth button {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    text-align: center;
    width: 100%;
    max-width: 421px;
    height: 48px;
    padding: 16px 48px;
    border-radius: 64px;
    gap: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hga-form__heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hga-form__welcome {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    color: var(--hga-text);
}

.hga-form__title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 24px;
    letter-spacing: -0.025em;
    color: var(--hga-text);
}

.hga-form--login h2 {
    margin-bottom: 0;
}

.hga-form--forgot .hga-form__heading {
    gap: 0;
}

.hga-form--forgot h2 {
    margin-bottom: 0;
}
