@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
    --bg: #0b0d0c;
    --bg-color: #0b0d0c;
    --card-bg: rgba(255, 255, 255, 0.02);
    --surface: rgba(255, 255, 255, 0.02);
    --surface-2: rgba(255, 255, 255, 0.05);
    --kaban-neon: #2AE89D;
    --kaban-cyan: #00f2fe;
    --kaban-emerald: #349C71;
    --kaban-grey: #7D8180;
    --kaban-gradient: linear-gradient(135deg, #00f2fe 0%, #2AE89D 100%);
    --dual-gradient: linear-gradient(135deg, #00f2fe 0%, #2AE89D 100%);
    --kaban-glow: 0 0 20px rgba(0, 242, 254, 0.3), 0 0 30px rgba(0, 242, 254, 0.2);
    --primary: #00f2fe;
    --primary-dark: #00c4cc;
    --secondary: #2AE89D;
    --text: #ffffff;
    --text-sec: #7D8180;
    --gradient: linear-gradient(135deg, #00f2fe 0%, #2AE89D 100%);
    --gradient-2: linear-gradient(135deg, #00f2fe 0%, #2AE89D 100%);
    --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #2AE89D 100%);
    --danger: #ff4757;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-color);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 120px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* LOADER */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.loader-icon {
    font-size: 80px;
    animation: pulse 1.5s infinite;
    filter: drop-shadow(0 0 20px rgba(42, 232, 157, 0.4));
}

.loader-text {
    margin-top: 20px;
    color: var(--text-sec);
    font-size: 14px;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

/* HEADER */
.container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

#page-profile .container {
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0.08em;
}
.logo-kaban {
    color: var(--kaban-grey);
}
.logo-vpn {
    color: var(--kaban-neon);
    text-shadow: var(--kaban-glow);
}

.user-badge {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sec);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--kaban-neon);
}

/* KABAN CARD — Emerald rim light */
.kaban-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(42, 232, 157, 0.1);
    border-top: 1px solid var(--kaban-neon);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.02);
}

/* STATUS CARD — Emerald rim light */
.status-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(42, 232, 157, 0.1);
    border-top: 1px solid var(--kaban-neon);
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.02);
}

.status-card-glass {
    background: var(--card-bg);
    border: 1px solid rgba(42, 232, 157, 0.1);
    border-top: 1px solid var(--kaban-neon);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.02);
}

/* KABAN PRIMARY BUTTON — Emerald (Connect & Support) */
.kaban-btn-primary {
    width: 100%;
    padding: 18px 24px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: 16px;
    cursor: pointer;
    color: #fff;
    background: var(--dual-gradient);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.35), 0 0 30px rgba(0, 242, 254, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.kaban-btn-primary:hover,
.kaban-btn-primary:focus {
    box-shadow: 0 0 24px rgba(0, 242, 254, 0.4), 0 0 36px rgba(0, 242, 254, 0.25), inset 0 0 12px rgba(255, 255, 255, 0.25);
}

.kaban-btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.35), 0 0 30px rgba(0, 242, 254, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.2);
}

/* MAIN CONNECT BUTTON — Cyan-Green (action) */
.main-connect-btn {
    margin-top: 20px;
    background: var(--dual-gradient) !important;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.35), 0 0 30px rgba(0, 242, 254, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.main-connect-btn.pulse {
    animation: main-connect-pulse 2s ease-in-out infinite;
}

@keyframes main-connect-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(42, 232, 157, 0.3), 0 0 30px rgba(0, 242, 254, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 0 24px rgba(42, 232, 157, 0.4), 0 0 36px rgba(0, 242, 254, 0.3), inset 0 0 12px rgba(255, 255, 255, 0.25); }
}

.main-connect-btn-breathe {
    animation: breathing 2.5s ease-in-out infinite;
}

@keyframes breathing {
    0%, 100% { box-shadow: 0 0 20px rgba(42, 232, 157, 0.3), 0 0 30px rgba(0, 242, 254, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 0 24px rgba(42, 232, 157, 0.4), 0 0 36px rgba(0, 242, 254, 0.3), inset 0 0 12px rgba(255, 255, 255, 0.25); }
}

/* Support button — same as Connect, centered block */
.support-btn-wrap {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}
.support-btn-wrap .support-btn {
    max-width: 100%;
    width: 100%;
}
.instructions-connect-btn {
    margin-top: 16px;
}

.more-options-heading {
    font-size: 11px;
    color: var(--text-sec);
    letter-spacing: 1px;
    text-align: center;
    margin: 18px 0 10px;
    opacity: 0.8;
}

.more-options-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.more-options-label {
    font-size: 12px;
    color: var(--text-sec);
    margin-right: 4px;
}

.btn-more {
    background: transparent;
    color: var(--text-sec);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn-more-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.95);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.btn-more:active,
.btn-more-glass:active {
    transform: scale(0.97);
    background: rgba(255,255,255,0.06);
}

.status-content {
    position: relative;
    z-index: 2;
    min-height: 180px;
}

.status-icon {
    font-size: 50px;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(42, 232, 157, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.status-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

#subscription-timer {
    margin: 15px 0;
}
#subscription-timer .timer {
    font-family: 'Inter', sans-serif;
    font-size: 40px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #00f2fe !important;
    letter-spacing: -1px;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.4), 0 0 25px rgba(0, 242, 254, 0.2);
}
#subscription-timer .timer-label {
    font-size: 14px;
    font-weight: 400;
    color: rgba(0, 242, 254, 0.7);
    margin-left: 2px;
    margin-right: 8px;
    text-shadow: none;
}
#subscription-timer .timer.timer-loading {
    color: rgba(0, 242, 254, 0.6) !important;
}
#subscription-timer .timer.timer-expired {
    color: #666;
    text-shadow: none;
}
#subscription-timer .timer.timer-pending {
    color: var(--kaban-grey);
    text-shadow: none;
}

.actions-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.btn-action {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    flex: 1;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.btn-action:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.08);
}

.btn-action.primary {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(42, 232, 157, 0.08);
    box-shadow: 0 0 20px rgba(42, 232, 157, 0.25);
}

.btn-action.primary:active {
    transform: scale(0.97);
    box-shadow: 0 0 25px rgba(42, 232, 157, 0.4);
}

/* PROGRESS BAR */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 28px 28px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.6);
    position: relative;
    transition: width 1s linear;
    border-radius: 0 0 28px 28px;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* PARTICLES */
#particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 12px var(--primary);
}

/* PAYMENT STATUS OVERLAY */
.payment-status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s;
    border-radius: 28px;
}

.payment-status-overlay.active {
    display: flex;
}

.status-circle-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin-bottom: 20px;
    border: 3px solid var(--primary);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.5);
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(0, 255, 157, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(0, 255, 157, 0.8);
    }
}

.status-msg {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

.btn-small {
    background: var(--kaban-gradient);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 0 20px rgba(42, 232, 157, 0.35);
}

.btn-small:active {
    transform: scale(0.97);
}

/* PLANS */
.section-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 18px;
    padding: 0 5px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plans-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.plan-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 22px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.plan-card:active::before {
    left: 100%;
}

.plan-card:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.06);
}

.plan-card.featured {
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(42, 232, 157, 0.06), rgba(52, 156, 113, 0.06));
    box-shadow: 0 0 20px rgba(42, 232, 157, 0.2);
}

.badge {
    background: var(--kaban-gradient);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 8px;
    margin-left: 10px;
    animation: pulse-badge 2s infinite;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 198, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 198, 255, 0);
    }
}

.plan-left h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.plan-left p {
    margin: 6px 0 0;
    color: var(--text-sec);
    font-size: 14px;
}

.price {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* INSTRUCTIONS — tabbed layout, step cards, glassmorphism */
.guide-container {
    padding-bottom: 120px;
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
}

.guide-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    scrollbar-width: none;
}

.guide-tabs::-webkit-scrollbar {
    display: none;
}

.guide-tab {
    flex: 0 0 auto;
    min-width: 0;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #b3b3b3;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
}

.guide-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.guide-tab.active {
    color: #fff;
    background: var(--kaban-gradient);
    box-shadow: 0 0 20px rgba(42, 232, 157, 0.4);
}

.guide-tab.pay-tab.active {
    background: var(--kaban-gradient);
    box-shadow: 0 0 20px rgba(42, 232, 157, 0.4);
}

.guide-panel {
    display: none;
    animation: guideFadeIn 0.3s ease;
}

.guide-panel.active {
    display: block;
}

@keyframes guideFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
}

.step-num {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 28px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.08);
    line-height: 1;
}

.step-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.35;
    padding-right: 40px;
}

.step-desc {
    font-size: 14px;
    color: #b3b3b3;
    margin: 0;
    line-height: 1.5;
}

.guide-container .inst-download-btn,
.guide-container .btn-primary.inst-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 14px 20px;
    margin-bottom: 16px;
    background: var(--kaban-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(42, 232, 157, 0.4);
    transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.guide-container .inst-download-btn:active {
    transform: scale(0.97);
    box-shadow: 0 0 20px rgba(42, 232, 157, 0.4);
}

.guide-container .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 14px 20px;
    margin-bottom: 16px;
    background: transparent;
    color: var(--kaban-neon);
    font-weight: 600;
    font-size: 15px;
    border: 2px solid rgba(42, 232, 157, 0.6);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
}

.guide-container .btn-secondary:hover {
    border-color: var(--kaban-neon);
    background: rgba(42, 232, 157, 0.08);
}

.guide-container .btn-secondary:active {
    transform: scale(0.98);
}

.guide-container .btn-icon {
    flex-shrink: 0;
}

.guide-container .btn-touch {
    min-height: 44px;
}

/* Pay tab: method selector (premium toggle / cards) */
.pay-method-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.pay-method-card {
    flex: 1;
    min-height: 48px;
    padding: 14px 12px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
}

.pay-method-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.pay-method-card.active {
    border-color: var(--primary);
    background: rgba(42, 232, 157, 0.12);
    color: var(--primary);
    box-shadow: 0 0 18px rgba(42, 232, 157, 0.25);
}

.pay-steps .step-card {
    margin-bottom: 12px;
}

/* MODALS — выше навбара: свой слой поверх всего (iOS/Android Telegram) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    isolation: isolate;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: #0a0b10;
    width: 100%;
    border-radius: 30px 30px 0 0;
    padding: 35px 25px;
    padding-bottom: calc(35px + 80px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10000;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--kaban-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

/* QR CODE */
#qrContainer {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    display: inline-block;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#qrCode img {
    display: block;
    margin: 0 auto;
}

/* PAYMENT UI */
.copy-field {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    font-family: 'Courier New', monospace;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.copy-field:active {
    background: rgba(42, 232, 157, 0.08);
    border-color: var(--primary);
}

.btn-primary {
    width: 100%;
    padding: 20px;
    border-radius: 16px;
    border: none;
    font-size: 16px;
    font-weight: 800;
    background: var(--kaban-gradient);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 8px 25px rgba(42, 232, 157, 0.3), 0 0 15px rgba(42, 232, 157, 0.25);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 8px 25px rgba(42, 232, 157, 0.35), 0 0 15px rgba(42, 232, 157, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    filter: grayscale(1);
    cursor: not-allowed;
}

/* NAV — deep black + Emerald top border */
.nav {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px;
    border-radius: 24px;
    display: flex;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 2px solid var(--kaban-emerald);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.nav-item {
    padding: 14px 22px;
    border-radius: 20px;
    color: var(--kaban-grey);
    font-size: 22px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.nav-item:active {
    transform: scale(0.97);
}

.nav-item.active {
    background: rgba(42, 232, 157, 0.12);
    color: var(--kaban-neon);
    border: 1px solid rgba(42, 232, 157, 0.2);
    box-shadow: 0 0 20px rgba(42, 232, 157, 0.25);
    transform: scale(1.02);
}

.nav-item.exit {
    color: var(--danger);
}

.nav-item.exit.active {
    background: var(--danger);
    color: #fff;
}

/* Maintenance / API down overlay */
.maintenance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.maintenance-content {
    text-align: center;
    max-width: 340px;
    background: var(--card-bg);
    border: 1px solid rgba(42, 232, 157, 0.2);
    border-radius: 20px;
    padding: 28px;
}
.maintenance-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--kaban-neon);
    margin-bottom: 12px;
}
.maintenance-desc {
    font-size: 14px;
    color: var(--text-sec);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* WELCOME TRIAL OVERLAY — новый пользователь, 7 дней премиум */
.welcome-trial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #0f1412 0%, #0a0b10 70%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.welcome-trial-overlay.welcome-trial-animate .welcome-trial-content {
    animation: welcome-flare 1.2s ease-out;
}
@keyframes welcome-flare {
    0% { opacity: 0; transform: scale(0.95); filter: drop-shadow(0 0 0 rgba(42, 232, 157, 0)); }
    60% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 30px rgba(42, 232, 157, 0.25)); }
    100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 15px rgba(42, 232, 157, 0.15)); }
}
.welcome-trial-content {
    text-align: center;
    max-width: 380px;
}
.welcome-trial-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.25;
}
.welcome-trial-desc {
    font-size: 15px;
    color: var(--text-sec);
    margin-bottom: 28px;
    line-height: 1.5;
}
.welcome-trial-desc b {
    color: var(--kaban-neon);
}
/* Trial button — Gold/Yellow gradient to stand out as gift */
.btn-trial-activate {
    display: inline-block;
    width: 100%;
    max-width: 320px;
    padding: 22px 28px;
    font-size: 19px;
    font-weight: 800;
    color: #1a1a0a;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 35%, #ff8c00 70%, #ffa500 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 0 28px rgba(255, 215, 0, 0.5), 0 0 50px rgba(255, 140, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.4);
    animation: trial-glow 2.5s ease-in-out infinite;
    transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.btn-trial-activate:hover {
    transform: scale(1.03);
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 140, 0, 0.3);
}
.btn-trial-activate:active {
    transform: scale(0.97);
}
.btn-trial-activate:disabled {
    opacity: 0.85;
    cursor: not-allowed;
    transform: none;
}
@keyframes trial-glow {
    0%, 100% { box-shadow: 0 0 28px rgba(255, 215, 0, 0.5), 0 0 50px rgba(255, 140, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.4); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.65), 0 0 70px rgba(255, 140, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.5); }
}

/* Gold Trial — gift button with green glow (Emerald accent) */
.btn-trial-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    box-shadow: 0 0 30px rgba(42, 232, 157, 0.5) !important;
    border: none !important;
    color: #1a1a0a !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    animation: gold-breathe 3.5s ease-in-out infinite;
}
@keyframes gold-breathe {
    0%, 100% { box-shadow: 0 0 25px rgba(42, 232, 157, 0.4); }
    50% { box-shadow: 0 0 40px rgba(42, 232, 157, 0.65); }
}

/* PAGES */
.page {
    display: none;
    padding-bottom: 20px;
    animation: fadeIn 0.4s;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SPINNER */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 255, 157, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Instructions: БЫСТРЫЙ СТАРТ + ОПЛАТА + Manual toggle */
.instructions-quick {
    margin-bottom: 20px;
}
.instructions-quick-heading {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: 0.5px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.instructions-quick-lead {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 20px;
    line-height: 1.35;
}
.instructions-quick-card {
    margin-bottom: 16px;
}
.instructions-quick-btn {
    margin-bottom: 12px;
    min-height: 48px;
    font-weight: 800;
    letter-spacing: 0.3px;
}
.instructions-connect-btn {
    margin-top: 20px;
}
/* OS selector + dynamic 2-step instructions */
.os-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.os-btn {
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
}
.os-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}
.os-btn.active {
    background: var(--kaban-gradient);
    border: 2px solid var(--kaban-neon);
    color: #fff;
    box-shadow: 0 0 20px rgba(42, 232, 157, 0.6), 0 0 0 1px rgba(42, 232, 157, 0.3);
    font-weight: 700;
}
.instruction-block {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
}
.step-text {
    display: none;
}
.step-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}
.step-row-2 {
    margin-top: 16px;
    margin-bottom: 0;
}
.step-number {
    flex-shrink: 0;
    background: var(--kaban-neon);
    color: #000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    margin-right: 12px;
}
.step-line {
    font-size: 15px;
    color: var(--text);
    line-height: 1.45;
}
.step-line strong {
    color: var(--kaban-neon);
}
.step-download-btn {
    margin-top: 8px;
    min-height: 44px;
}
/* Store Grid — fallback / other uses */
.store-grid {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.store-card {
    flex: 1;
    min-width: 90px;
    max-width: 120px;
    padding: 14px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
}
.store-card:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.98);
}
.instructions-pay-block {
    margin-top: 20px;
}
.instructions-pay-block .step-title {
    font-size: 16px;
}
.instructions-manual-toggle {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: var(--text-sec);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
}
.instructions-manual-toggle:active {
    background: rgba(255, 255, 255, 0.1);
}
.instructions-manual-wrap.hidden {
    display: none !important;
}

/* PROFILE — prominent card */
.profile-card {
    text-align: left;
    padding: 24px;
    min-height: auto;
}
.profile-label {
    color: var(--text-sec);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 14px;
    margin-bottom: 4px;
}
.profile-label:first-child { margin-top: 0; }
.profile-value {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.profile-name { font-size: 18px; font-weight: 600; }
.profile-ref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 14px 16px;
    border-radius: 12px;
    margin: 16px 0 12px;
}
.profile-ref-count {
    font-size: 26px;
    color: var(--primary);
    margin: 0;
}

/* NOTIFICATIONS HUB */
.notifications-hub {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(42, 232, 157, 0.1);
}
.notifications-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--kaban-neon);
    margin-bottom: 14px;
}
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.notification-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(42, 232, 157, 0.1);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: opacity 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.notification-card.unread {
    border-left: 3px solid var(--kaban-neon);
    position: relative;
}
.notification-card.unread::before {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--kaban-neon);
    box-shadow: 0 0 10px rgba(42, 232, 157, 0.8);
}
.notification-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--kaban-neon);
    margin-bottom: 4px;
}
.notification-icon {
    font-size: 22px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(42, 232, 157, 0.4));
}
.notification-body {
    flex: 1;
    min-width: 0;
}
.notification-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}
.notification-date {
    font-size: 12px;
    color: var(--kaban-grey);
}
.notifications-empty {
    font-size: 14px;
    color: var(--kaban-grey);
    text-align: center;
    padding: 24px 16px;
}
.notifications-clear-btn {
    margin-top: 12px;
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--kaban-grey);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: color 0.2s cubic-bezier(0.25, 0.1, 0.25, 1), border-color 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.notifications-clear-btn:hover,
.notifications-clear-btn:active {
    color: var(--kaban-neon);
    border-color: rgba(42, 232, 157, 0.3);
}
.notifications-clear-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Manual section: smaller primary Copy button */
.btn-copy-manual {
    padding: 12px 18px !important;
    font-size: 14px !important;
    min-height: 44px !important;
    margin-bottom: 12px;
}

/* RESPONSIVE */
@media (max-width: 400px) {
    .hero-features {
        gap: 8px;
    }
    
    .feature-item {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .benefits-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}