:root {
    --gateway-primary: #5b5ce2;
    --gateway-primary-dark: #34349b;
    --gateway-secondary: #7c3aed;
    --gateway-accent: #f59e0b;
    --gateway-ink: #172033;
    --gateway-muted: #667085;
    --gateway-border: #e7e8f2;
    --gateway-surface: #ffffff;
    --gateway-bg: #f6f7fc;
}

.app-gateway-page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 76vh;
    background:
        linear-gradient(180deg, #fafaff 0%, #f5f6fb 100%);
    color: var(--gateway-ink);
}

.app-gateway-ambient {
    position: absolute;
    z-index: -1;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(12px);
    opacity: 0.44;
}

.app-gateway-ambient-one {
    top: -260px;
    left: -220px;
    background: radial-gradient(
        circle,
        rgba(91, 92, 226, 0.34),
        transparent 68%
    );
}

.app-gateway-ambient-two {
    right: -260px;
    bottom: -280px;
    background: radial-gradient(
        circle,
        rgba(124, 58, 237, 0.24),
        transparent 68%
    );
}

.app-gateway-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: var(--gateway-muted);
    font-size: 0.8rem;
}

.app-gateway-breadcrumb a {
    color: var(--gateway-primary);
    font-weight: 720;
}

.app-gateway-card {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
    overflow: hidden;
    border: 1px solid var(--gateway-border);
    border-radius: 30px;
    background: var(--gateway-surface);
    box-shadow: 0 26px 70px rgba(36, 40, 90, 0.12);
}

.app-gateway-copy {
    position: relative;
    padding: clamp(2rem, 5vw, 4.25rem);
}

.app-gateway-copy::after {
    content: "";
    position: absolute;
    top: -130px;
    right: -110px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(91, 92, 226, 0.1),
        transparent 68%
    );
    pointer-events: none;
}

.app-gateway-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.35rem;
    padding: 0.48rem 0.76rem;
    border: 1px solid #dedfff;
    border-radius: 999px;
    background: #f3f3ff;
    color: var(--gateway-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.app-gateway-kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gateway-accent);
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.14);
}

.app-gateway-app-identity {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.app-gateway-logo {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 1px solid var(--gateway-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(31, 41, 55, 0.09);
}

.app-gateway-logo img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.app-gateway-app-identity > div:last-child {
    display: grid;
}

.app-gateway-app-identity span {
    color: var(--gateway-muted);
    font-size: 0.72rem;
}

.app-gateway-app-identity strong {
    color: var(--gateway-ink);
    font-size: 1rem;
    font-weight: 800;
}

.app-gateway-copy h1 {
    max-width: 690px;
    margin: 0 0 1rem;
    color: var(--gateway-ink);
    font-size: clamp(2.2rem, 5vw, 4.25rem);
    font-weight: 880;
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.app-gateway-lead {
    max-width: 660px;
    margin: 0 0 1.65rem;
    color: var(--gateway-muted);
    font-size: 0.98rem;
    line-height: 1.75;
}

.app-gateway-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.app-gateway-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 50px;
    padding: 0.78rem 1.1rem;
    border-radius: 14px;
    font-size: 0.86rem;
    font-weight: 800;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease;
}

.app-gateway-button:hover {
    transform: translateY(-3px);
}

.app-gateway-button-primary {
    background: linear-gradient(
        135deg,
        var(--gateway-primary),
        var(--gateway-secondary)
    );
    color: #fff;
    box-shadow: 0 14px 28px rgba(91, 92, 226, 0.26);
}

.app-gateway-button-primary:hover {
    color: #fff;
    box-shadow: 0 18px 34px rgba(91, 92, 226, 0.32);
}

.app-gateway-button-secondary {
    border: 1px solid #dcdffc;
    background: #f4f4ff;
    color: var(--gateway-primary-dark);
}

.app-gateway-button-secondary:hover {
    color: var(--gateway-primary-dark);
    background: #ededff;
}

.app-gateway-button-icon {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.8rem;
}

.app-gateway-button-secondary .app-gateway-button-icon {
    background: #fff;
}

.app-gateway-button-loading {
    display: none;
}

.app-gateway-button.is-loading .app-gateway-button-default {
    display: none;
}

.app-gateway-button.is-loading .app-gateway-button-loading {
    display: inline;
}

.app-gateway-status {
    min-height: 1.4em;
    margin: 0.9rem 0 0;
    color: #7b8190;
    font-size: 0.76rem;
}

.app-gateway-fallback {
    margin-top: 0.85rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #fde2aa;
    border-radius: 13px;
    background: #fff8e8;
    color: #7a5517;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-gateway-fallback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.app-gateway-fallback strong,
.app-gateway-fallback span {
    display: block;
}

.app-gateway-fallback strong {
    margin-bottom: 0.18rem;
    font-size: 0.82rem;
}

.app-gateway-fallback span {
    font-size: 0.75rem;
    line-height: 1.5;
}

.app-gateway-back-link {
    display: inline-flex;
    margin-top: 1.45rem;
    color: var(--gateway-muted);
    font-size: 0.78rem;
    font-weight: 680;
}

.app-gateway-update-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(150px, 0.78fr) minmax(0, 1.22fr);
    align-items: center;
    gap: 1.6rem;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 3.35rem);
    background:
        radial-gradient(
            circle at 92% 10%,
            rgba(251, 191, 36, 0.27),
            transparent 24%
        ),
        linear-gradient(140deg, #282663 0%, #4f46e5 52%, #7c3aed 100%);
    color: #fff;
}

.app-gateway-update-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        );
    background-size: 32px 32px;
    pointer-events: none;
}

.app-gateway-phone,
.app-gateway-update-copy {
    position: relative;
    z-index: 2;
}

.app-gateway-phone {
    width: 100%;
    max-width: 190px;
    margin: 0 auto;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    background: rgba(13, 14, 40, 0.76);
    box-shadow: 0 28px 50px rgba(8, 8, 32, 0.32);
    transform: rotate(-4deg);
    animation: gatewayPhoneFloat 5s ease-in-out infinite;
}

@keyframes gatewayPhoneFloat {
    0%,
    100% {
        transform: rotate(-4deg) translateY(0);
    }
    50% {
        transform: rotate(-2deg) translateY(-10px);
    }
}

.app-gateway-phone-notch {
    position: absolute;
    z-index: 3;
    top: 11px;
    left: 50%;
    width: 48%;
    height: 13px;
    border-radius: 0 0 12px 12px;
    background: #11122e;
    transform: translateX(-50%);
}

.app-gateway-phone-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 320px;
    padding: 42px 18px 24px;
    border-radius: 23px;
    background:
        radial-gradient(
            circle at 72% 12%,
            rgba(251, 191, 36, 0.24),
            transparent 24%
        ),
        linear-gradient(180deg, #f8f8ff, #e9e8ff);
    color: #312e81;
    text-align: center;
}

.app-gateway-screen-label {
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.app-gateway-screen-logo {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 1rem;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 15px 28px rgba(49, 46, 129, 0.16);
}

.app-gateway-screen-logo img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.app-gateway-phone-screen strong {
    color: #29275f;
    font-size: 0.86rem;
}

.app-gateway-phone-screen > span:not(.app-gateway-screen-label) {
    margin-top: 0.25rem;
    color: #7774a9;
    font-size: 0.68rem;
}

.app-gateway-progress {
    width: 100%;
    height: 7px;
    margin-top: 1.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: #d8d6f5;
}

.app-gateway-progress span {
    display: block;
    width: 74%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--gateway-primary),
        var(--gateway-secondary)
    );
    animation: gatewayProgress 2.4s ease-in-out infinite alternate;
}

@keyframes gatewayProgress {
    from {
        width: 35%;
    }
    to {
        width: 86%;
    }
}

.app-gateway-update-badge {
    display: inline-flex;
    margin-bottom: 0.9rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fef3c7;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.app-gateway-update-copy h2 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.35rem);
    font-weight: 840;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.app-gateway-update-copy ul {
    display: grid;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-gateway-update-copy li {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    line-height: 1.5;
}

.app-gateway-update-copy li > span {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.13);
    color: #fcd34d;
    font-weight: 900;
}

.app-gateway-security-note {
    display: flex;
    gap: 0.55rem;
    margin-top: 1.25rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    background: rgba(12, 13, 45, 0.2);
    color: rgba(255, 255, 255, 0.67);
    font-size: 0.69rem;
    line-height: 1.45;
}

.app-gateway-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.app-gateway-steps article {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 0.8rem;
    padding: 1.05rem;
    border: 1px solid var(--gateway-border);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 30px rgba(31, 41, 55, 0.05);
    backdrop-filter: blur(8px);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.app-gateway-steps article:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(31, 41, 55, 0.09);
}

.app-gateway-steps article > span {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 14px;
    background: #efefff;
    color: var(--gateway-primary);
    font-size: 0.75rem;
    font-weight: 850;
}

.app-gateway-steps strong,
.app-gateway-steps p {
    display: block;
}

.app-gateway-steps strong {
    margin-bottom: 0.22rem;
    color: var(--gateway-ink);
    font-size: 0.86rem;
}

.app-gateway-steps p {
    margin: 0;
    color: var(--gateway-muted);
    font-size: 0.74rem;
    line-height: 1.5;
}

.app-gateway-tnc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.35rem;
    color: var(--gateway-muted);
    font-size: 0.78rem;
}

.app-gateway-tnc a {
    color: var(--gateway-primary);
    font-weight: 780;
}

@media (max-width: 991.98px) {
    .app-gateway-card {
        grid-template-columns: 1fr;
    }

    .app-gateway-update-panel {
        grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1.45fr);
    }
}

@media (max-width: 767.98px) {
    .app-gateway-card {
        border-radius: 22px;
    }

    .app-gateway-copy {
        padding: 1.6rem 1.25rem 1.8rem;
    }

    .app-gateway-copy h1 {
        font-size: 2.35rem;
    }

    .app-gateway-actions {
        display: grid;
    }

    .app-gateway-button {
        width: 100%;
    }

    .app-gateway-update-panel {
        grid-template-columns: 1fr;
        padding: 2rem 1.25rem;
    }

    .app-gateway-phone {
        max-width: 165px;
    }

    .app-gateway-phone-screen {
        min-height: 275px;
    }

    .app-gateway-steps {
        grid-template-columns: 1fr;
    }

    .app-gateway-tnc {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
