/* Returning visitors skip only the one-time X verification layer. */
html.skip-x-verification .x-verification-screen {
    display: none !important;
}

/* ============================================================
   X → Stake verification screen
   ============================================================ */
.x-verification-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    pointer-events: none;
    overflow-x: hidden;
    overflow-y: auto;
    transition: opacity 0.5s ease;
    background-color: #020806;
    background-image:
        linear-gradient(180deg, rgba(0, 8, 5, 0.08), rgba(0, 5, 3, 0.26)),
        url('fon/fonverif.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.x-verification-screen.active {
    opacity: 1;
    pointer-events: all;
}

.x-verification-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 40%, rgba(40, 255, 144, 0.055), transparent 38%),
        linear-gradient(180deg, transparent 65%, rgba(0, 5, 3, 0.3));
}

.x-verification-content {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(660px, calc(100vw - 36px));
    min-height: calc(100dvh - 36px);
    max-width: none;
    margin: 0 auto;
    padding: 14px 24px 18px;
    flex-direction: column;
    text-align: center;
}

.x-logo-container {
    position: relative;
    width: 82px;
    height: 82px;
    margin: 0 auto 3px;
}

.x-logo-container.loading {
    animation: xVerifierPulse 1.3s ease-in-out infinite !important;
}

@keyframes xVerifierPulse {
    0%, 100% { transform: scale(0.96); filter: brightness(0.86); }
    50% { transform: scale(1.04); filter: brightness(1.16); }
}

.x-logo {
    width: 82px;
    height: 82px;
    fill: #c7ffdc;
    filter: drop-shadow(0 0 24px rgba(70, 255, 151, 0.26));
    transition: fill 500ms ease, filter 500ms ease;
}

.x-logo.safe {
    fill: #72f7aa;
    filter:
        drop-shadow(0 0 18px rgba(87, 255, 158, 0.42))
        drop-shadow(0 0 42px rgba(37, 229, 123, 0.2));
}

.x-logo-check {
    position: absolute;
    right: -3px;
    bottom: 8px;
    display: grid;
    width: 23px;
    height: 23px;
    color: #04150c;
    border: 2px solid rgba(188, 255, 216, 0.92);
    border-radius: 50%;
    background: #66f5a3;
    box-shadow: 0 0 18px rgba(73, 245, 148, 0.55);
    opacity: 0;
    place-items: center;
    transform: scale(0.5);
    transition: opacity 350ms ease, transform 350ms ease;
}

.x-logo.safe + .x-logo-check {
    opacity: 1;
    transform: scale(1);
}

.x-logo-check svg,
.x-account-check svg,
.x-result-check svg {
    width: 70%;
    height: 70%;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.x-verification-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.25rem);
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -0.045em;
    text-shadow: 0 4px 26px rgba(0, 0, 0, 0.66);
}

.x-loading-text.x-verification-subtitle {
    max-height: none;
    margin: 7px 0 0;
    color: rgba(215, 227, 219, 0.62);
    font-size: 0.82rem;
    line-height: 1.4;
    opacity: 1;
    visibility: visible;
}

.x-safe-content {
    width: 100%;
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-rows: auto minmax(8px, 1fr) auto minmax(8px, 1fr) auto minmax(4px, 0.5fr) auto;
    align-items: center;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 650ms ease, transform 650ms ease;
}

.x-safe-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.x-verification-badges {
    display: grid;
    width: min(100%, 570px);
    margin: 14px auto 0;
    grid-row: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.x-badge,
.x-badge.verified,
.x-badge.safe {
    display: inline-flex;
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #9ffac4;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    border: 1px solid rgba(83, 235, 148, 0.34);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(53, 164, 103, 0.13), rgba(16, 54, 34, 0.1)),
        rgba(3, 15, 9, 0.48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 18px rgba(50, 221, 126, 0.08);
    opacity: 1 !important;
    animation: none !important;
    backdrop-filter: blur(10px);
}

.x-badge svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.x-verification-card {
    display: flex;
    width: min(100%, 590px);
    min-height: 225px;
    margin: 0 auto;
    padding: 23px 24px 20px;
    flex-direction: column;
    grid-row: 3;
    justify-content: space-between;
    align-self: center;
    border: 1px solid rgba(139, 247, 186, 0.3);
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(61, 219, 130, 0.1), transparent 48%),
        linear-gradient(150deg, rgba(9, 26, 18, 0.9), rgba(3, 13, 8, 0.82));
    box-shadow:
        0 24px 65px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 38px rgba(40, 221, 121, 0.07);
    backdrop-filter: blur(16px) saturate(120%);
}

.x-account-flow {
    display: grid;
    grid-template-columns: 1fr 112px 1fr;
    align-items: center;
}

.x-account {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-direction: column;
}

.x-account-logo {
    position: relative;
    display: grid;
    width: 70px;
    height: 70px;
    margin-bottom: 8px;
    border: 1px solid rgba(160, 255, 202, 0.25);
    border-radius: 15px;
    background:
        radial-gradient(circle at 50% 20%, rgba(86, 255, 159, 0.12), transparent 66%),
        rgba(3, 13, 9, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 0 24px rgba(65, 237, 139, 0.08);
    place-items: center;
}

.x-account-logo-x > svg {
    width: 39px;
    height: 39px;
    fill: #fff;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.18));
}

.x-account-logo-backpack img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.x-account-check {
    position: absolute;
    right: -7px;
    bottom: -6px;
    display: grid;
    width: 23px;
    height: 23px;
    color: #05140c;
    border: 2px solid #0b2015;
    border-radius: 50%;
    background: #67f3a2;
    box-shadow: 0 0 14px rgba(80, 245, 150, 0.38);
    place-items: center;
}

.x-account strong {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.77rem;
    line-height: 1.2;
}

.x-account small {
    margin-top: 3px;
    color: rgba(201, 219, 208, 0.5);
    font-size: 0.61rem;
    line-height: 1.2;
}

.x-account-connector {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.x-account-connector span {
    width: 100%;
    border-top: 2px dashed rgba(91, 239, 153, 0.46);
    filter: drop-shadow(0 0 5px rgba(74, 239, 143, 0.26));
}

.x-account-connector svg {
    position: absolute;
    right: -1px;
    width: 22px;
    height: 22px;
    padding: 3px;
    fill: none;
    stroke: #8dffc0;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    border-radius: 50%;
    background: #0a2115;
}

.x-verification-result {
    display: flex;
    min-height: 56px;
    margin-top: 20px;
    padding: 10px 14px;
    align-items: center;
    gap: 11px;
    text-align: left;
    border: 1px solid rgba(77, 229, 139, 0.28);
    border-radius: 13px;
    background:
        linear-gradient(100deg, rgba(51, 191, 111, 0.18), rgba(26, 99, 60, 0.13)),
        rgba(7, 29, 18, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.x-result-check {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    color: #06160d;
    border-radius: 50%;
    background: #65f2a0;
    box-shadow: 0 0 16px rgba(71, 237, 142, 0.28);
    place-items: center;
}

.x-verification-result > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.x-verification-result strong {
    color: #9ffac3;
    font-size: 0.71rem;
    line-height: 1.25;
}

.x-verification-result small {
    margin-top: 2px;
    color: rgba(210, 226, 216, 0.62);
    font-size: 0.59rem;
    line-height: 1.3;
}

.x-progress-bar {
    width: min(100%, 560px);
    height: 7px;
    margin: 0 auto 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 999px;
    background: rgba(204, 230, 215, 0.13);
}

.x-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #75ffb2, #46e58b);
    box-shadow: 0 0 16px rgba(83, 243, 152, 0.55);
    transition: width 3.2s linear;
}

.x-redirect-text {
    display: flex;
    margin: 0;
    align-items: center;
    flex-direction: column;
    color: rgba(214, 227, 219, 0.56);
    font-size: 0.62rem;
    line-height: 1.45;
}

.x-redirect-text strong {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.76rem;
}

.x-redirect-status {
    width: min(100%, 560px);
    margin: 0 auto;
    grid-row: 5;
}

.x-verification-footer {
    display: grid;
    width: min(100%, 600px);
    margin: 0 auto;
    grid-row: 7;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.x-verification-footer span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(205, 221, 212, 0.52);
    font-size: 0.56rem;
    white-space: nowrap;
}

.x-verification-footer span + span {
    border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.x-verification-footer svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: none;
    stroke: rgba(210, 231, 219, 0.78);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 700px) {
    .x-verification-screen {
        --x-mobile-heading-shift: clamp(68px, 12svh, 112px);
        padding: 12px;
        align-items: stretch;
        background-image:
            linear-gradient(180deg, rgba(0, 8, 5, 0.05), rgba(0, 5, 3, 0.2)),
            url('fon/fonverifmobile.webp');
        background-position: center;
    }

    .x-verification-content {
        width: min(100%, 440px);
        min-height: calc(100dvh - 24px);
        margin: 0 auto;
        padding: 14px 7px 16px;
    }

    .x-verification-heading,
    .x-verification-badges {
        transform: translateY(var(--x-mobile-heading-shift));
    }

    .x-logo-container { width: 68px; height: 68px; margin-bottom: 2px; }
    .x-logo { width: 68px !important; height: 68px !important; }
    .x-logo-check { right: -2px; bottom: 6px; width: 20px; height: 20px; }
    .x-verification-title { font-size: clamp(1.55rem, 8vw, 1.9rem); }
    .x-loading-text.x-verification-subtitle { margin-top: 5px; font-size: 0.7rem; }

    .x-verification-badges { margin: 12px auto 11px; gap: 5px; }
    .x-badge, .x-badge.verified, .x-badge.safe {
        min-height: 31px; padding: 6px 4px; gap: 4px;
        font-size: clamp(0.5rem, 2.2vw, 0.59rem);
    }
    .x-badge svg { width: 13px; height: 13px; flex-basis: 13px; }

    .x-verification-card {
        min-height: 220px; padding: 19px 14px 17px;
        margin-bottom: 0; border-radius: 18px;
    }
    .x-account-flow { grid-template-columns: 1fr 52px 1fr; }
    .x-account-logo { width: 58px; height: 58px; margin-bottom: 7px; border-radius: 13px; }
    .x-account-logo-x > svg { width: 32px; height: 32px; }
    .x-account-logo-backpack img { width: 46px; height: 46px; }
    .x-account-check { right: -6px; bottom: -5px; width: 20px; height: 20px; }
    .x-account strong { font-size: 0.7rem; }
    .x-account small { font-size: 0.55rem; }
    .x-account-connector svg { width: 19px; height: 19px; }

    .x-verification-result { min-height: 53px; margin-top: 18px; padding: 9px 10px; gap: 9px; }
    .x-result-check { width: 28px; height: 28px; flex-basis: 28px; }
    .x-verification-result strong { font-size: 0.65rem; }
    .x-verification-result small { font-size: 0.53rem; }

    .x-progress-bar { height: 6px; margin-top: 0; margin-bottom: 7px; }
    .x-verification-footer { margin-top: 0; gap: 4px; }
    .x-verification-footer span { gap: 4px; font-size: clamp(0.43rem, 1.8vw, 0.51rem); white-space: normal; }
    .x-verification-footer svg { width: 12px; height: 12px; flex-basis: 12px; }
}

@media (max-height: 690px) {
    .x-verification-content { margin-top: 0; padding-top: 5px; padding-bottom: 5px; }
    .x-logo-container { width: 64px; height: 64px; }
    .x-logo { width: 64px !important; height: 64px !important; }
    .x-verification-title { font-size: 1.65rem; }
    .x-verification-badges { margin-top: 9px; margin-bottom: 9px; }
    .x-verification-card { min-height: 182px; padding-top: 12px; padding-bottom: 11px; }
    .x-account-logo { width: 56px; height: 56px; }
    .x-account-logo-backpack img { width: 46px; height: 46px; }
    .x-verification-result { margin-top: 12px; }
}

/* ============================================================
   Stake Fullscreen Preloader
   ============================================================ */
#preloader.preloader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 15000 !important;
    background: #1a2c38 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    pointer-events: all !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: opacity 0.35s ease !important;
}

#preloader.preloader.hide-preloader,
#preloader.preloader[style*="display: none"] {
    display: none !important;
    pointer-events: none !important;
}

#preloader .preloader-img {
    width: 100% !important;
    max-width: 200px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}
