*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0b0e1a;
    --bg-2: #0d1226;
    --card: rgba(255, 255, 255, 0.055);
    --card-border: rgba(255, 255, 255, 0.09);
    --text: #f4f6fb;
    --muted: #98a2b8;
    --accent: #5b7cfa;
    --accent-2: #9b6bff;
    --grad: linear-gradient(135deg, #5b7cfa 0%, #9b6bff 100%);
    --ok: #2fd66e;
    --danger: #ff6b6b;
    --radius: 18px;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(1200px 700px at 50% -10%, rgba(91, 124, 250, 0.22), transparent 60%),
        radial-gradient(900px 600px at 90% 110%, rgba(124, 58, 237, 0.14), transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 18px calc(96px + env(safe-area-inset-bottom));
}

/* ============ Top bar ============ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top)) 4px 12px;
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
    background: rgba(11, 14, 26, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.back {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    visibility: hidden;
}

.back:active {
    transform: scale(0.94);
}

.title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.dots {
    margin-left: auto;
    display: flex;
    gap: 5px;
    align-items: center;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    transition: all 0.3s ease;
}

.dot.done {
    background: rgba(155, 107, 255, 0.45);
}

.dot.active {
    width: 20px;
    border-radius: 4px;
    background: var(--grad);
}

/* ============ Screens ============ */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeUp 0.35s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--muted);
    margin: 26px 0 10px;
}

.h {
    font-size: 25px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.4px;
}

/* ============ Hero ============ */
.hero {
    padding: 30px 0 4px;
}

.hero-badge {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 12px 32px rgba(124, 92, 250, 0.35);
    margin-bottom: 18px;
}

.hero h1 {
    font-size: 30px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.6px;
    margin-bottom: 10px;
}

.hero p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    max-width: 320px;
}

/* ============ Cards ============ */
.cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.card:active {
    transform: scale(0.98);
}

.card.selected {
    background: rgba(91, 124, 250, 0.10);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 10px 30px rgba(91, 124, 250, 0.22);
}

.card--big {
    min-height: 86px;
}

.card-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

.card-desc {
    font-size: 13px;
    color: var(--muted);
}

.check {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: transparent;
    transition: all 0.2s ease;
}

.selected .check {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
}

/* ============ Banks ============ */
.banks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bank {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.bank:active {
    transform: scale(0.98);
}

.bank.selected {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand), 0 10px 26px color-mix(in srgb, var(--brand) 25%, transparent);
}

.chip {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--brand);
    color: var(--brand-ink, #fff);
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 40%, transparent);
}

.chip--icon {
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.chip--icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bank-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.bank-name {
    font-size: 16px;
    font-weight: 700;
}

.bank-desc {
    font-size: 12.5px;
    color: var(--muted);
}

/* ============ Search ============ */
.search {
    position: relative;
    margin-bottom: 18px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    opacity: 0.7;
}

.search input {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    padding: 0 16px 0 42px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search input::placeholder {
    color: var(--muted);
}

.search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91, 124, 250, 0.18);
}

.search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

/* ============ Model groups ============ */
.groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.group-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    padding-left: 4px;
}

.row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    text-align: left;
}

.row:last-child {
    margin-bottom: 0;
}

.row:active {
    transform: scale(0.98);
}

.row.selected {
    border-color: var(--accent);
    background: rgba(91, 124, 250, 0.10);
    box-shadow: 0 0 0 1px var(--accent);
}

.hidden {
    display: none !important;
}

.search-empty {
    text-align: center;
    color: var(--muted);
    padding: 30px 0;
    font-size: 14px;
}

/* ============ Summary / steps ============ */
.summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--grad);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 12px 30px rgba(124, 92, 250, 0.3);
}

.summary-line {
    flex: 1;
}

.timeline {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    position: relative;
}

.step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 17px;
    top: 40px;
    bottom: -14px;
    width: 2px;
    background: linear-gradient(180deg, rgba(91, 124, 250, 0.5), rgba(155, 107, 255, 0.08));
    border-radius: 2px;
}

.step-num {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(91, 124, 250, 0.16);
    border: 1px solid rgba(91, 124, 250, 0.35);
    color: #aab8ff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.step-body {
    padding-top: 3px;
}

.step-body b {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.step-body p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.45;
}

.warn {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 22px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 177, 66, 0.08);
    border: 1px solid rgba(255, 177, 66, 0.25);
}

.warn span {
    font-size: 16px;
    line-height: 1.4;
}

.warn p {
    font-size: 13.5px;
    line-height: 1.45;
    color: #f4d9a8;
}

.blocked {
    text-align: center;
    padding: 40px 20px;
}

.blocked-icon {
    font-size: 44px;
    margin-bottom: 14px;
}

.blocked h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.blocked p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

/* ============ Video card ============ */
.video-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-top: 20px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.video-card:active {
    transform: scale(0.98);
}

.video-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 13px;
    background: var(--grad);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(124, 92, 250, 0.35);
}

.video-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.video-body b {
    font-size: 15px;
}

.video-body span {
    font-size: 13px;
    color: var(--muted);
}

.video-arrow {
    font-size: 22px;
    color: var(--muted);
}

/* ============ RuStore ============ */
.rs-note {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 20px 0 18px;
}

.rs-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    border-radius: 16px;
    background: var(--grad);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(124, 92, 250, 0.35);
    transition: transform 0.15s ease;
}

.rs-link:active {
    transform: scale(0.98);
}

/* ============ Video player ============ */
.player {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
}

.player.open {
    display: flex;
}

.player-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 14, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.player-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: 0 18px;
}

.player-close {
    position: absolute;
    top: -48px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    font-size: 15px;
    cursor: pointer;
    z-index: 2;
}

.player-box video {
    width: 100%;
    max-height: 72vh;
    border-radius: 16px;
    background: #000;
    object-fit: contain;
}

/* ============ Account ============ */
.account {
    padding-top: 14px;
}

.loader {
    text-align: center;
    padding: 70px 20px;
}

.spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 22px;
    border-radius: 50%;
    border: 3px solid rgba(155, 107, 255, 0.18);
    border-top-color: var(--accent-2);
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.loader p {
    color: var(--muted);
    font-size: 14px;
}

.cred {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cred-head {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-bottom: 6px;
}

.cred-check {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 12px 30px rgba(124, 92, 250, 0.35);
}

.cred-head h3 {
    font-size: 20px;
    margin-bottom: 3px;
}

.cred-head p {
    color: var(--muted);
    font-size: 13.5px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.3px;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--card-border);
}

.field-row code {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    word-break: break-all;
    line-height: 1.4;
}

.copy {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.copy:active {
    transform: scale(0.92);
    background: rgba(91, 124, 250, 0.25);
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-radius: 14px;
    background: rgba(47, 214, 110, 0.07);
    border: 1px solid rgba(47, 214, 110, 0.25);
    font-size: 14px;
}

.meta-row b {
    color: var(--ok);
}

.done-btn,
.ghost-btn {
    width: 100%;
    height: 52px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease;
}

.done-btn {
    border: none;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 12px 30px rgba(124, 92, 250, 0.35);
    margin-top: 6px;
}

.done-btn:active {
    transform: scale(0.98);
}

.empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 44px;
    margin-bottom: 14px;
}

.empty h3 {
    font-size: 19px;
    margin-bottom: 8px;
}

.empty p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.ghost-btn {
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    max-width: 260px;
}

.ghost-btn:active {
    transform: scale(0.98);
}

/* ============ CTA ============ */
.cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(11, 14, 26, 0), rgba(11, 14, 26, 0.92) 40%);
}

.cta-inner {
    max-width: 480px;
    margin: 0 auto;
}

.cta-btn {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: block;
    height: 54px;
    border: none;
    border-radius: 16px;
    background: var(--grad);
    color: #fff;
    font-size: 16.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(124, 92, 250, 0.35);
    transition: transform 0.15s ease, opacity 0.2s ease;
}

.cta-btn:disabled {
    opacity: 0.35;
    box-shadow: none;
    cursor: default;
}

.cta-btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* ============ Toast ============ */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(110px + env(safe-area-inset-bottom));
    transform: translate(-50%, 20px);
    background: rgba(20, 25, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 40;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
