

@property --story-grad-top {
    syntax: '<color>';
    inherits: true;
    initial-value: #121417;
}
@property --story-grad-bottom {
    syntax: '<color>';
    inherits: true;
    initial-value: #121417;
}

.vpn-stories {
    display: flex;
    align-items: stretch;
    gap: 14px;

    padding: 12px 4px 18px;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.vpn-stories::-webkit-scrollbar { display: none; }

.vpn-stories-tile {
    flex: 0 0 auto;
    position: relative;
    width: 96px;
    height: 88px;
    border: 0;
    padding: 9px 10px 10px;
    border-radius: 16px;
    color: #fff;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;

    --vpn-stories-tile-ring: #363a41;
    --vpn-stories-tile-gap:  var(--ui-color-bg, #121417);
    user-select: none;
    scroll-snap-align: start;

    background-color: #1f2630;
    background-image: var(--tile-image, none), var(--tile-bg, none);
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    box-shadow:

        0 0 0 2px var(--vpn-stories-tile-gap),

        0 0 0 4px var(--vpn-stories-tile-ring),

        0 8px 16px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition:
        transform 180ms var(--ui-ease-standard, cubic-bezier(0.25, 0.8, 0.25, 1)),
        box-shadow 180ms var(--ui-ease-standard, cubic-bezier(0.25, 0.8, 0.25, 1));
}

.vpn-stories-tile:active {
    transform: scale(0.96);
    box-shadow:
        0 0 0 2px var(--vpn-stories-tile-gap),
        0 0 0 4px var(--vpn-stories-tile-ring),
        0 6px 14px rgba(0, 0, 0, 0.22);
}

.vpn-stories-tile:focus-visible {
    outline: 2px solid var(--ui-color-accent, #3282d7);
    outline-offset: 3px;
}

.vpn-stories-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.32) 100%),
        radial-gradient(85% 60% at 100% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 60%),
        radial-gradient(75% 60% at 0% 100%, rgba(0, 0, 0, 0.30) 0%, transparent 70%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 1;
}

.vpn-stories-tile__icon {
    position: absolute;
    right: -14px;
    bottom: -16px;
    width: 78px;
    height: 78px;
    color: rgba(255, 255, 255, 0.22);
    pointer-events: none;
    z-index: 0;
    transform: rotate(-12deg);
    transition: transform 220ms var(--ui-ease-standard, cubic-bezier(0.25, 0.8, 0.25, 1));
}

.vpn-stories-tile__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.vpn-stories-tile:hover .vpn-stories-tile__icon {
    transform: rotate(-8deg) scale(1.05);
}
.vpn-stories-tile:active .vpn-stories-tile__icon {
    transform: rotate(-14deg) scale(0.98);
}

.vpn-stories-tile__title {
    position: relative;
    z-index: 2;
    font-size: 11.5px;
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vpn-stories-tile__steps-hint {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.32);
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.3px;
    pointer-events: none;
}

.vpn-stories-viewer {
    position: fixed;
    inset: 0;
    z-index: var(--ui-z-toast, 10020);
    display: flex;
    flex-direction: column;
    color: #fff;
    background-image: linear-gradient(
        180deg,
        var(--story-grad-top, var(--app-main-bg-color, #121417)) 0%,
        var(--story-grad-bottom, var(--app-main-bg-color, #121417)) 100%
    );
    background-color: var(--story-grad-bottom, var(--app-main-bg-color, #121417));
    opacity: 0;
    pointer-events: none;

    visibility: hidden;
    transition:
        opacity 380ms cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 380ms,
        --story-grad-top 380ms cubic-bezier(0.4, 0, 0.2, 1),
        --story-grad-bottom 380ms cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.vpn-stories-viewer.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition:
        opacity 380ms cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0s,
        --story-grad-top 380ms cubic-bezier(0.4, 0, 0.2, 1),
        --story-grad-bottom 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

.vpn-stories-viewer__topbar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    padding:
        calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + 12px)
        16px
        4px;
}

.vpn-stories-viewer__guide-label {
    position: relative;
    z-index: 3;
    text-align: left;
    padding: 2px 16px 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    letter-spacing: 0;
    text-transform: none;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.vpn-stories-viewer__guide-label__step {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    font-weight: 600;
}

.vpn-stories-progress {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 4px;
}

.vpn-stories-progress__seg {
    flex: 1 1 0;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
    position: relative;
}

.vpn-stories-progress__seg > i {
    display: block;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 999px;
    transition: width 50ms linear;
}

.vpn-stories-progress__seg.is-passed > i { width: 100%; }

.vpn-stories-viewer__close {
    flex: 0 0 auto;
    width: 34px; height: 34px;
    border: 0;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: transform 180ms cubic-bezier(0.25, 0.8, 0.25, 1),
                opacity 180ms cubic-bezier(0.25, 0.8, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
}
.vpn-stories-viewer__close:hover { opacity: 0.85; }
.vpn-stories-viewer__close:active { transform: scale(0.92); opacity: 0.7; }
.vpn-stories-viewer__close:focus-visible { outline: none; }
.vpn-stories-viewer__close svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vpn-stories-viewer__stage {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vpn-stories-viewer__step {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    padding: 4px 0 var(--tg-safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 200ms var(--ui-ease-standard, cubic-bezier(0.25, 0.8, 0.25, 1)),
        transform 220ms var(--ui-ease-standard, cubic-bezier(0.25, 0.8, 0.25, 1));

    pointer-events: none;
}

.vpn-stories-viewer__step.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

.vpn-stories-viewer__step.is-entering {
    opacity: 0;
    transform: translateY(-8px);
}

.vpn-stories-viewer__mockup {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0 12px;

    overflow: visible;
    pointer-events: none;
}

.vpn-stories-viewer__mockup .vpn-key-card,
.vpn-stories-viewer__mockup .vpnst-mock-keycard {
    text-align: left;
}

.vpn-stories-viewer__copy {
    width: 100%;
    box-sizing: border-box;
    padding: 0 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.vpn-stories-viewer__title {
    font-size: 21px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
    max-width: 520px;
}

.vpn-stories-viewer__body {
    font-size: 14.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.86);
    margin: 0 auto 16px;
    max-width: 520px;
}

.vpn-stories-viewer__body b { color: #fff; font-weight: 600; }

.vpn-stories-viewer__copy .button-blue-primary {
    pointer-events: auto;
    margin-top: 4px;
    width: 100%;
    background: #fff !important;
    color: #121417 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.vpn-stories-viewer__copy .button-blue-primary:hover,
.vpn-stories-viewer__copy .button-blue-primary:active,
.vpn-stories-viewer__copy .button-blue-primary:focus {
    background: #f0f0f0 !important;
    color: #121417 !important;
}

.vpn-stories-viewer__taps {
    position: absolute;
    inset: 60px 0 80px 0;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    z-index: 1;
}

.vpn-stories-viewer__tap { cursor: pointer; }

.vpnst-mock {
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    color: #fff;
    --mock-pulse: 240, 240, 240;
}

@keyframes vpnst-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(var(--mock-pulse), 0.65); }
    65%  { box-shadow: 0 0 0 16px rgba(var(--mock-pulse), 0); }
    100% { box-shadow: 0 0 0 0   rgba(var(--mock-pulse), 0); }
}

.is-pulse {
    animation: vpnst-pulse 1.6s ease-out infinite;
    position: relative;
}

.vpnst-mock__hint {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
    animation: vpnst-bob 1.4s ease-in-out infinite;
}
@keyframes vpnst-bob {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(0, 4px); }
}

.vpnst-mock-realkey {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;

}

.vpnst-mock-realkey .vpn-key-card {
    margin: 0;

    box-shadow:
        0 16px 36px rgba(0, 0, 0, 0.36),
        0 0 0 1px rgba(255, 255, 255, 0.04);
}

.vpnst-mock-keycard {
    position: relative;
    border-radius: 20px;
    padding: 14px 18px 16px;
    background: linear-gradient(180deg, #1d2025 0%, rgb(60 213 236 / 34%));
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.38);
    overflow: hidden;
}

.vpnst-mock-keycard__protocol {
    position: absolute;
    top: 14px; right: 16px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.vpnst-mock-keycard__status {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(61, 153, 102, 0.22);
    color: #5fbe88;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

.vpnst-mock-keycard__name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.vpnst-mock-keycard__id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 14px;
}

.vpnst-mock-keycard__time {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vpnst-mock-keycard__actions {
    display: flex;
    gap: 8px;
}

.vpnst-mock-keycard__action {
    flex: 1 1 0;
    border: 0;
    border-radius: 22px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.92);
    color: #121417;
    cursor: pointer;
}

.vpnst-mock-keycard__action--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.vpnst-mock-apps-real {
    width: 100%;
    text-align: left;
    color: #fff;
}

.vpnst-mock-apps-real__heading {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #fff;
    padding: 0;
}

.vpnst-mock-apps-real .toggle-switch {
    margin-bottom: 12px;
    min-height: 38px;
}
.vpnst-mock-apps-real .toggle-switch__btn {
    min-height: 30px;
    font-size: 12.5px;
    transition: background 220ms ease, color 220ms ease;
}
.vpnst-mock-apps-real .toggle-switch__btn--active {
    background: var(--ui-color-border-strong, #3F444C);
}

.vpnst-mock-apps-real .vpn_app_icons {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 0;
}
.vpnst-mock-apps-real .vpn-app-icon {
    min-height: 70px;
    padding: 6px 4px;
}
.vpnst-mock-apps-real .vpn-app-icon__image {
    width: 36px;
    height: 36px;
}
.vpnst-mock-apps-real .vpn-app-icon__name {
    font-size: 9.5px;
    margin-top: 3px;
}

.vpnst-mock-apps-real .vpn-app-badge {
    top: 2px;
    right: 2px;
    padding: 1.5px 5px;
    font-size: 7.5px;
    letter-spacing: 0.2px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.vpnst-mock-apps-legend {
    margin-top: 12px;
    display: grid;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.86);
    text-align: left;
}
.vpnst-mock-apps-legend__row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vpnst-mock-apps-legend__row .ui-app-badge {
    flex: 0 0 auto;
}

.vpnst-mock-flow {
    position: relative;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 5 / 4;
    margin: 0 auto;
    border-radius: 22px;
    background: linear-gradient(180deg, #1a1d23 0%, #0e1014 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    isolation: isolate;
}

.vpnst-mock-flow__apps {
    position: absolute;
    inset: 12px 12px auto 12px;

}
.vpnst-mock-flow__apps .toggle-switch {
    margin-bottom: 8px;
    min-height: 30px;
}
.vpnst-mock-flow__apps .toggle-switch__btn {
    min-height: 26px;
    font-size: 10.5px;
    transition: background 220ms ease, color 220ms ease;
}
.vpnst-mock-flow__apps .toggle-switch__btn--active {
    background: var(--ui-color-border-strong, #3F444C);
}
.vpnst-mock-flow__apps .vpn_app_icons {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 0;
}
.vpnst-mock-flow__apps .vpn-app-icon {
    min-height: 56px;
    padding: 4px 2px;
}
.vpnst-mock-flow__apps .vpn-app-icon__image {
    width: 28px; height: 28px;
}
.vpnst-mock-flow__apps .vpn-app-icon__name {
    font-size: 8.5px;
    margin-top: 2px;
}

.vpnst-mock-flow__apps .vpn-app-icon:first-child {
    animation: vpnst-flow-tap 9s linear infinite;
    transform-origin: center;
}
@keyframes vpnst-flow-tap {
    0%, 14%   { transform: scale(1); }
    16%       { transform: scale(0.86); }
    20%, 100% { transform: scale(1); }
}

.vpnst-mock-flow__sheet {
    position: absolute;
    left: 6px; right: 6px;
    bottom: 6px;
    background: linear-gradient(180deg, #232830, #181b21);
    border-radius: 18px 18px 14px 14px;
    padding: 10px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.5);
    transform: translateY(108%);
    will-change: transform;
    animation: vpnst-flow-sheet-in-install 9s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.vpnst-mock-flow--addkey .vpnst-mock-flow__sheet {
    animation-name: vpnst-flow-sheet-in-addkey;
}

@keyframes vpnst-flow-sheet-in-install {
    0%, 18%   { transform: translateY(108%); }
    22%, 41%  { transform: translateY(0); }
    45%, 100% { transform: translateY(108%); }
}

@keyframes vpnst-flow-sheet-in-addkey {
    0%, 18%   { transform: translateY(108%); }
    22%, 49%  { transform: translateY(0); }
    53%, 100% { transform: translateY(108%); }
}

.vpnst-mock-flow__sheet-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 9px;
}
.vpnst-mock-flow__sheet-icon {
    width: 32px; height: 32px;
    border-radius: 5px;
    object-fit: cover;
    flex: 0 0 auto;
}
.vpnst-mock-flow__sheet-text { text-align: left; min-width: 0; }
.vpnst-mock-flow__sheet-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}
.vpnst-mock-flow__sheet-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1px;
}

.vpnst-mock-flow__sheet-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.vpnst-mock-flow__sheet-btn {
    height: 30px;
    border: 0;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    line-height: 1;
}
.vpnst-mock-flow__sheet-btn--blue {
    background: var(--ui-color-accent, #3282d7);
    color: #fff;
}
.vpnst-mock-flow__sheet-btn--gray {
    background: var(--ui-color-surface-3, #6c757d);
    color: #fff;
}

.vpnst-mock-flow--install .vpnst-mock-flow__sheet-btn--blue,
.vpnst-mock-flow--addkey .vpnst-mock-flow__sheet-btn--gray {
    animation: vpnst-flow-btn-pulse 9s ease-out infinite;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
}
.vpnst-mock-flow--addkey .vpnst-mock-flow__sheet-btn--gray {
    animation-name: vpnst-flow-btn-pulse-addkey;
}
@keyframes vpnst-flow-btn-pulse {
    0%, 24%   { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0);    transform: scale(1); }
    30%       { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0.55); transform: scale(1); }
    38%       { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);   transform: scale(1); }

    40%       { transform: scale(0.93); }
    43%, 100% { transform: scale(1); }
}
@keyframes vpnst-flow-btn-pulse-addkey {
    0%, 30%   { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0);    transform: scale(1); }
    36%       { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0.55); transform: scale(1); }
    44%       { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);   transform: scale(1); }

    47%       { transform: scale(0.93); }
    50%, 100% { transform: scale(1); }
}

.vpnst-mock-flow__installing {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 30px 24px;
    background: linear-gradient(180deg, #131922 0%, #0a0f17 100%);
    border-radius: inherit;
    opacity: 0;
    transform: scale(0.94);
    will-change: opacity, transform;
    animation: vpnst-flow-installing-show 9s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes vpnst-flow-installing-show {
    0%, 44%   { opacity: 0; transform: scale(0.94); }
    48%, 100% { opacity: 1; transform: scale(1); }
}
.vpnst-mock-flow__installing-icon {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 12px 28px rgba(50, 130, 215, 0.45);
    background: #0a0f17;
}
.vpnst-mock-flow__installing-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vpnst-mock-flow__installing-bar {
    width: 65%;
    max-width: 220px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}
.vpnst-mock-flow__installing-bar > i {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1E5BB8 0%, #3A81EC 50%, #5A9BF0 100%);
    box-shadow: 0 0 10px rgba(58, 129, 236, 0.6);
    will-change: width;
    animation: vpnst-flow-installing-fill 9s cubic-bezier(0.32, 0.72, 0.16, 1) infinite;
}
@keyframes vpnst-flow-installing-fill {
    0%, 48%   { width: 0%; }
    90%, 100% { width: 100%; }
}

.vpnst-mock-flow__installing-success {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 14%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    animation: vpnst-flow-installing-success 9s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
}
.vpnst-mock-flow__installing-success-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #5fbe88;
}
.vpnst-mock-flow__installing-success-text {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #6bdc9e;
}
@keyframes vpnst-flow-installing-success {
    0%, 89.5% { opacity: 0; transform: translateY(10px); }
    92%, 100% { opacity: 1; transform: translateY(0); }
}

.vpnst-mock-flow__happ {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #131922, #0a0f17);
    border-radius: inherit;
    padding: 14px 12px 12px;
    opacity: 0;
    transform: scale(0.96);
    will-change: opacity, transform;
    animation: vpnst-flow-happ-show 9s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes vpnst-flow-happ-show {
    0%, 50%   { opacity: 0; transform: scale(0.96); }
    54%, 100% { opacity: 1; transform: scale(1); }
}
.vpnst-mock-flow__happ-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.vpnst-mock-flow__happ-logo {
    width: 24px; height: 24px;
    border-radius: 4px;
    object-fit: cover;
}
.vpnst-mock-flow__happ-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.vpnst-mock-flow__happ-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    margin-left: auto;
}
.vpnst-mock-flow__happ-list {
    display: grid;
    gap: 6px;
}
.vpnst-mock-flow__happ-loc {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 11px;
    color: #fff;

    opacity: 0;
    transform: translateY(8px);
    will-change: opacity, transform;
    animation: vpnst-flow-happ-loc-in 9s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    animation-delay: calc(var(--li, 0) * 0.36s);
}
.vpnst-mock-flow__happ-loc--active {
    background: rgba(50, 130, 215, 0.16);
    border-color: rgba(50, 130, 215, 0.4);
}
@keyframes vpnst-flow-happ-loc-in {
    0%, 56%   { opacity: 0; transform: translateY(8px); }
    60%, 100% { opacity: 1; transform: translateY(0); }
}
.vpnst-mock-flow__happ-loc-flag { font-size: 14px; line-height: 1; }
.vpnst-mock-flow__happ-loc-name { flex: 1 1 auto; text-align: left; }

.vpnst-mock-flow__happ-loc-check {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ui-color-success, #3d9966);
    flex-shrink: 0;
}
.vpnst-mock-flow__happ-loc-check svg {
    width: 100%;
    height: 100%;
    display: block;
}

.vpnst-mock-managetoggle {
    width: 100%;
}
.vpnst-mock-managetoggle .toggle-switch {
    margin: 0;

    overflow: visible;

    min-height: 48px;
}
.vpnst-mock-managetoggle .toggle-switch__bg {
    overflow: visible;
}
.vpnst-mock-managetoggle .toggle-switch__btn {
    min-height: 38px;
    font-size: 13px;
    transition: background 220ms ease, color 220ms ease;
}

.vpnst-mock-managetoggle .toggle-switch__btn--active {
    background: transparent;
}

.vpnst-mt-indicator {
    width: calc((100% - 10px) / 2);
    transition: none;
}
.vpnst-mt-indicator--left {
    left: 5px;
    right: auto;
}
.vpnst-mt-indicator--right {
    left: auto;
    right: 5px;
}
.vpnst-mock-managetoggle__caption {
    margin-top: 10px;
    font-size: 12px;
    text-align: left;
    color: rgba(255, 255, 255, 0.6);
}

.vpnst-mock-tariffchange {
    width: 100%;
    text-align: left;
}

.vpnst-tc-card {
    background: #16181C;
    border-radius: 20px;
    padding: 14px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vpnst-tc-card .clients-slider-container {
    background: transparent;
    padding: 0;
    border-radius: 0;
}
.vpnst-tc-card .clients-slider-header { margin-bottom: 4px; }
.vpnst-tc-card .clients-slider-label { font-size: 12.5px; }
.vpnst-tc-card .clients-slider-value { font-size: 22px; }

.vpnst-tc-fill {
    width: 50%;
    will-change: width;
    animation: vpnst-tc-fill 7s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes vpnst-tc-fill {
    0%, 5%    { width: 50%; }
    9%, 15%   { width: 90%; }
    19%, 25%  { width: 25%; }
    29%, 100% { width: 75%; }
}

.vpnst-tc-thumb {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 0%, #e8e8e8 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(58, 129, 236, 0.2);
    transform: translate(-50%, -50%);
    z-index: 3;
    will-change: left, transform;
    animation: vpnst-tc-thumb 7s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes vpnst-tc-thumb {
    0%, 5%    { left: 50%; transform: translate(-50%, -50%) scale(1); }
    7%        { transform: translate(-50%, -50%) scale(1.12); }
    9%, 15%   { left: 90%; transform: translate(-50%, -50%) scale(1); }
    17%       { transform: translate(-50%, -50%) scale(1.12); }
    19%, 25%  { left: 25%; transform: translate(-50%, -50%) scale(1); }
    27%       { transform: translate(-50%, -50%) scale(1.16); }
    29%, 100% { left: 75%; transform: translate(-50%, -50%) scale(1); }
}

.vpnst-tc-stack {
    position: relative;
    display: inline-block;
    min-width: 1.8em;
    height: 1em;
    line-height: 1;
    vertical-align: baseline;
}
.vpnst-tc-stack .vpnst-tc-val {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    white-space: nowrap;
}

.vpnst-tc-val--a  { animation: vpnst-tc-fade-a  7s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-tc-val--b  { animation: vpnst-tc-fade-b  7s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-tc-val--c  { animation: vpnst-tc-fade-c  7s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-tc-val--bc { animation: vpnst-tc-fade-bc 7s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes vpnst-tc-fade-a {

    0%, 5%    { opacity: 1; }
    9%, 15%   { opacity: 0; }
    19%, 25%  { opacity: 1; }
    29%, 100% { opacity: 0; }
}
@keyframes vpnst-tc-fade-b {

    0%, 5%    { opacity: 0; }
    9%, 15%   { opacity: 1; }
    19%, 25%  { opacity: 0; }
    29%, 55%  { opacity: 1; }
    59%, 100% { opacity: 0; }
}
@keyframes vpnst-tc-fade-c {

    0%, 55%   { opacity: 0; }
    59%, 100% { opacity: 1; }
}
@keyframes vpnst-tc-fade-bc {

    0%, 5%    { opacity: 0; }
    9%, 15%   { opacity: 1; }
    19%, 25%  { opacity: 0; }
    29%, 100% { opacity: 1; }
}

.vpnst-tc-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 -16px;
}

.vpnst-tc-card .addon-item {
    background: transparent;
    border: none;
    padding: 4px 0;
    border-top: none;
}
.vpnst-tc-card .addon-info { padding: 0; }
.vpnst-tc-card .addon-name { font-size: 12.5px; }
.vpnst-tc-card .addon-desc { font-size: 10.5px; }
.vpnst-tc-card .addon-price { font-size: 12.5px; }

.vpnst-tc-toggle-track {
    will-change: background;
    animation: vpnst-tc-toggle-track 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.vpnst-tc-toggle-thumb {
    will-change: left, background;
    animation: vpnst-tc-toggle-thumb 7s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}
@keyframes vpnst-tc-toggle-track {
    0%, 50%   { background: #2A2D32; }
    55%, 100% { background: #4BB543; }
}
@keyframes vpnst-tc-toggle-thumb {
    0%, 50%   { left: 2px;  background: #666; }
    55%, 100% { left: 20px; background: #fff; }
}

.vpnst-tc-card .vpn-time-recalc-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vpnst-tc-card .vpn-time-recalc-col { flex: 0 1 auto; }
.vpnst-tc-card .vpn-time-recalc-label { font-size: 10.5px; }
.vpnst-tc-card .vpn-time-recalc-value { font-size: 14.5px; font-weight: 700; }
.vpnst-tc-card .vpn-time-recalc-arrow {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    line-height: 1;
}

.vpnst-tc-card .vnmk-button {
    margin: 0;
    width: 100%;
}
.vpnst-tc-button {
    animation: vpnst-tc-btn-pulse 7s ease-out infinite;
    box-shadow: 0 0 0 0 rgba(50, 130, 215, 0);
}

@keyframes vpnst-tc-btn-pulse {
    0%, 78%   { box-shadow: 0 0 0 0 rgba(50, 130, 215, 0);    transform: scale(1); }
    83%       { box-shadow: 0 0 0 0 rgba(50, 130, 215, 0.55); transform: scale(1); }
    90%       { box-shadow: 0 0 0 14px rgba(50, 130, 215, 0); transform: scale(1); }
    94%, 97%  { transform: scale(0.96); }
    100%      { transform: scale(1); }
}

.vpnst-mock-renew {
    width: 100%;
    text-align: left;
}

.vpnst-rn-card {
    background: #16181C;
    border-radius: 20px;
    padding: 14px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vpnst-rn-card .toggle-switch {
    margin: 0;
    min-height: 38px;
}
.vpnst-rn-card .toggle-switch__btn {
    min-height: 30px;

    font-size: 11px;
    font-weight: 600;
    padding: 0 4px;

    transition: none;
}

.vpnst-rn-indicator {
    width: calc((100% - 10px) / 4);
    left: 5px;
    transition: none !important;
    will-change: transform;

    animation: vpnst-rn-indicator 9s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes vpnst-rn-indicator {
    0%, 18%   { transform: translateX(0); }
    22%, 41%  { transform: translateX(100%); }
    45%, 64%  { transform: translateX(200%); }
    68%, 100% { transform: translateX(300%); }
}

.vpnst-rn-btn--a { animation: vpnst-rn-color-a 9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-rn-btn--b { animation: vpnst-rn-color-b 9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-rn-btn--c { animation: vpnst-rn-color-c 9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-rn-btn--d { animation: vpnst-rn-color-d 9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes vpnst-rn-color-a {
    0%, 18%   { color: #DCDDE0; }
    22%, 100% { color: #84858A; }
}
@keyframes vpnst-rn-color-b {
    0%, 18%   { color: #84858A; }
    22%, 41%  { color: #DCDDE0; }
    45%, 100% { color: #84858A; }
}
@keyframes vpnst-rn-color-c {
    0%, 41%   { color: #84858A; }
    45%, 64%  { color: #DCDDE0; }
    68%, 100% { color: #84858A; }
}
@keyframes vpnst-rn-color-d {
    0%, 64%   { color: #84858A; }
    68%, 100% { color: #DCDDE0; }
}

.vpnst-rn-val--a  { animation: vpnst-rn-fade-a  9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-rn-val--b  { animation: vpnst-rn-fade-b  9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-rn-val--c  { animation: vpnst-rn-fade-c  9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-rn-val--d  { animation: vpnst-rn-fade-d  9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.vpnst-rn-val--cd { animation: vpnst-rn-fade-cd 9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes vpnst-rn-fade-a {
    0%, 18%   { opacity: 1; }
    22%, 100% { opacity: 0; }
}
@keyframes vpnst-rn-fade-b {
    0%, 18%   { opacity: 0; }
    22%, 41%  { opacity: 1; }
    45%, 100% { opacity: 0; }
}
@keyframes vpnst-rn-fade-c {
    0%, 41%   { opacity: 0; }
    45%, 64%  { opacity: 1; }
    68%, 100% { opacity: 0; }
}
@keyframes vpnst-rn-fade-d {
    0%, 64%   { opacity: 0; }
    68%, 100% { opacity: 1; }
}
@keyframes vpnst-rn-fade-cd {
    0%, 41%   { opacity: 0; }
    45%, 100% { opacity: 1; }
}

.vpnst-rn-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vpnst-rn-card .purchase-bar {
    background: transparent;
    padding: 0;
    margin: 0;
}
.vpnst-rn-card .purchase-bar__info { margin: 0; }

.vpnst-rn-card .purchase-bar__amount { font-size: 26px; line-height: 1; }

.vpnst-rn-cur {
    font-size: 18px;
    font-weight: 600;
    font-style: normal;
    margin-left: 2px;
    vertical-align: baseline;
}
.vpnst-rn-card .purchase-bar__old .vpnst-rn-cur {
    font-size: 14px;
    margin-left: 1px;
}

.vpnst-rn-card .purchase-bar__old {
    font-size: 14px;
    color: #9aa0a6;
    margin-left: 6px;
    text-decoration: line-through;
    opacity: 0;
    animation: vpnst-rn-old-show 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes vpnst-rn-old-show {
    0%, 41%   { opacity: 0; }
    45%, 100% { opacity: 1; }
}
.vpnst-rn-card .purchase-bar__amount .vpnst-tc-stack { min-width: 3.4em; }
.vpnst-rn-card .purchase-bar__old    .vpnst-tc-stack { min-width: 2.8em; }

.vpnst-rn-card .purchase-bar__details {
    font-size: 11px;
    color: #84858A;
    gap: 4px;
}
.vpnst-rn-card .purchase-bar__details .vpnst-tc-stack { min-width: 4em; }

.vpnst-rn-discount {
    align-self: flex-start;
    background: rgba(75, 181, 67, 0.15);
    color: #4BB543;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(-4px) scale(0.92);
    will-change: opacity, transform;
    animation: vpnst-rn-discount-show 9s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}
@keyframes vpnst-rn-discount-show {
    0%, 41%   { opacity: 0; transform: translateY(-4px) scale(0.92); }
    45%, 100% { opacity: 1; transform: translateY(0)    scale(1); }
}
.vpnst-rn-discount .vpnst-tc-stack { min-width: 7em; }

.vpnst-rn-card .vnmk-button { margin: 0; width: 100%; }
.vpnst-rn-button {
    animation: vpnst-rn-btn-pulse 9s ease-out infinite;
    box-shadow: 0 0 0 0 rgba(50, 130, 215, 0);
}

@keyframes vpnst-rn-btn-pulse {
    0%, 80%   { box-shadow: 0 0 0 0 rgba(50, 130, 215, 0);    transform: scale(1); }
    86%       { box-shadow: 0 0 0 0 rgba(50, 130, 215, 0.55); transform: scale(1); }
    93%       { box-shadow: 0 0 0 14px rgba(50, 130, 215, 0); transform: scale(1); }
    96%, 99%  { transform: scale(0.96); }
    100%      { transform: scale(1); }
}

.vpnst-mock-renewsuccess {
    width: 100%;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 18px 16px 16px;
    text-align: center;
}
.vpnst-mock-renewsuccess__icon {
    width: 64px; height: 64px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 14px 26px rgba(16, 185, 129, 0.35);
}
.vpnst-mock-renewsuccess__icon svg {
    width: 28px; height: 28px;
    fill: none; stroke: currentColor;
    stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.vpnst-mock-renewsuccess__title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 4px 0 2px;
}
.vpnst-mock-renewsuccess__sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 10px;
}
.vpnst-mock-renewsuccess__balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    font-weight: 600;
}
.vpnst-mock-renewsuccess__balance b { color: #fff; }

body.vpn-stories-open { overflow: hidden; }
body.vpn-stories-open .bottom-menu {
    pointer-events: none;
    opacity: 0;
    transform: translateY(120%);
}

@media (prefers-reduced-motion: reduce) {
    .vpn-stories-viewer,
    .vpnst-mock__hint,
    .is-pulse,
    .vpnst-mock-flow__apps .vpn-app-icon:first-child,
    .vpnst-mock-flow__sheet,
    .vpnst-mock-flow__sheet-btn--blue,
    .vpnst-mock-flow__sheet-btn--gray,
    .vpnst-mock-flow__installing,
    .vpnst-mock-flow__installing-success,
    .vpnst-mock-flow__installing-bar > i,
    .vpnst-mock-flow__happ,
    .vpnst-mock-flow__happ-loc,
    .vpnst-tc-fill,
    .vpnst-tc-thumb,
    .vpnst-tc-val--a,
    .vpnst-tc-val--b,
    .vpnst-tc-val--c,
    .vpnst-tc-val--bc,
    .vpnst-tc-toggle-track,
    .vpnst-tc-toggle-thumb,
    .vpnst-tc-button,
    .vpnst-rn-indicator,
    .vpnst-rn-btn--a,
    .vpnst-rn-btn--b,
    .vpnst-rn-btn--c,
    .vpnst-rn-btn--d,
    .vpnst-rn-val--a,
    .vpnst-rn-val--b,
    .vpnst-rn-val--c,
    .vpnst-rn-val--d,
    .vpnst-rn-val--cd,
    .vpnst-rn-card .purchase-bar__old,
    .vpnst-rn-discount,
    .vpnst-rn-button {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 360px) {
    .vpn-stories-tile { width: 88px; height: 84px; }
    .vpn-stories-viewer__title { font-size: 20px; }
    .vpn-stories-viewer__body { font-size: 14px; }
}

@media (min-width: 600px) {
    .vpn-stories-viewer__topbar,
    .vpn-stories-viewer__guide-label,
    .vpn-stories-viewer__stage {
        width: 100%;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    .vpn-stories-viewer__stage { flex: 1 1 auto; }
    .vpn-stories-viewer__taps {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: 600px;
    }

    .vpn-stories-viewer__copy {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}
