@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Unbounded:wght@600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Premium Telegram fintech glass palette */
    --bg-0: #08090c;
    --bg-1: #0c0d12;
    --surface-0: rgba(16, 18, 24, 0.55);
    --surface-1: rgba(20, 22, 30, 0.60);
    --surface-2: rgba(26, 30, 38, 0.65);
    --stroke-weak: rgba(255, 255, 255, 0.08);
    --stroke-strong: rgba(255, 255, 255, 0.16);

    --text-primary: #edf2ff;
    --text-secondary: #b7c1d6;
    --text-muted: #7a8296;

    --accent-star: #f4c64d;
    --accent-cta-1: #2aabee;
    --accent-cta-2: #4d7cff;
    --accent-cta-3: #6ee7ff;

    --success-color: #2ecc71;
    --danger-color: #ff6b6b;
    --warning-color: #ffcc66;

    --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.40);
    --shadow-hover: 0 18px 44px rgba(0, 0, 0, 0.50);
    --glow-cta: 0 0 24px rgba(42, 171, 238, 0.35);

    --glass-highlight: rgba(255, 255, 255, 0.04);
    --glass-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    --glass-blur: 32px;

    --border-radius: 18px;
    --transition: 180ms ease;

    /* Compatibility tokens used by existing JS */
    --bg-color: var(--bg-0);
    --surface-color: var(--surface-1);
    --text-color: var(--text-primary);
    --border-color: var(--stroke-weak);
    --primary-color: var(--accent-cta-1);
    --shadow: var(--shadow-soft);
}

.ui-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.ui-icon--title {
    font-size: 19px;
    transform: translateY(-1px);
}

.ui-icon--menu {
    font-size: 28px;
}

.main-card-icon .ph,
.main-card-icon .ph-fill {
    color: #f0f4ff;
}

html {
    background: radial-gradient(ellipse 80% 50% at 20% 5%, rgba(20, 30, 60, 0.06), transparent 60%), radial-gradient(ellipse 70% 40% at 80% 95%, rgba(30, 20, 50, 0.04), transparent 55%), linear-gradient(180deg, #08090c 0%, #0a0b10 50%, #070810 100%) !important;
    color: var(--text-primary) !important;
    height: 100%;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: radial-gradient(ellipse 80% 50% at 20% 5%, rgba(20, 30, 60, 0.06), transparent 60%), radial-gradient(ellipse 70% 40% at 80% 95%, rgba(30, 20, 50, 0.04), transparent 55%), linear-gradient(180deg, #08090c 0%, #0a0b10 50%, #070810 100%) !important;
    color: var(--text-primary) !important;
    height: 100%;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

html.giveaways-sheet-open,
body.giveaways-sheet-open {
    overflow: hidden !important;
}

/* Ambient background animation (behind all screens) */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background-image:
        radial-gradient(55vmax 55vmax at 15% 10%, rgba(42, 171, 238, 0.32) 0%, transparent 60%),
        radial-gradient(50vmax 50vmax at 85% 85%, rgba(77, 124, 255, 0.26) 0%, transparent 60%);
    background-size: 280% 280%;
    background-position: 0% 0%;
    animation: ambientA 14s ease-in-out infinite alternate;
}

.ambient-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(45vmax 45vmax at 70% 20%, rgba(110, 231, 255, 0.22) 0%, transparent 60%);
    background-size: 220% 220%;
    background-position: 100% 0%;
    animation: ambientB 19s ease-in-out infinite alternate;
}

.ambient-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(40vmax 40vmax at 30% 75%, rgba(42, 171, 238, 0.18) 0%, transparent 60%);
    background-size: 200% 200%;
    background-position: 0% 100%;
    animation: ambientC 11s ease-in-out infinite alternate;
}

@keyframes ambientA {
    0%   { background-position: 0% 0%; }
    40%  { background-position: 85% 30%; }
    100% { background-position: 20% 100%; }
}
@keyframes ambientB {
    0%   { background-position: 100% 0%; }
    50%  { background-position: 10% 90%; }
    100% { background-position: 80% 50%; }
}
@keyframes ambientC {
    0%   { background-position: 0% 100%; }
    60%  { background-position: 95% 20%; }
    100% { background-position: 40% 60%; }
}

/* Scroll reveal */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.leaderboard-item.animate-in {
    animation: slideInLeft 0.4s ease both;
}
.order-item.animate-in,
.stat-card.animate-in,
.pricing-card.animate-in,
.plan-card.animate-in,
.profile-referral-balance-card.animate-in,
.info-card.animate-in {
    animation: slideInUp 0.4s ease both;
}

/* Универсальные поля ввода в темной теме */
input, textarea, select {
    background: var(--surface-1);
    color: var(--text-primary);
    border: 1px solid var(--stroke-weak);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, textarea:focus, select:focus {
    background: var(--surface-2);
    color: var(--text-primary);
    border-color: rgba(91, 108, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(91, 108, 255, 0.18);
}

#app {
    height: 100vh;
    padding: 0;
    position: relative;
    top: 0;
    overflow-x: hidden;
}

.screen {
    display: none;
    padding: 20px 16px 120px;
    animation: fadeIn 0.25s ease;
    max-width: 680px;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    margin: 0 auto;
    background: rgba(8, 9, 12, 0.74) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
}

.screen.active {
    display: block;
    /* Активный экран всегда сверху */
    z-index: 10;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPopIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: var(--shadow-soft);
    }
    50% {
        box-shadow: var(--shadow-hover);
    }
}

@keyframes floatSoft {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Загрузочный экран */
#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 16px;
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--stroke-weak);
    border-top-color: var(--accent-cta-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Скрываем загрузочный экран по умолчанию */
#loading {
    display: none !important;
}

#snow-layer { display: none !important; }
.snowflake { display: none !important; }
#snow-mini-toggle { display: none !important; }
#debug-panel { display: none !important; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Заголовки */
.header {
    margin-bottom: 24px;
    position: relative;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--accent-cta-1), var(--accent-cta-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.referral-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    margin-bottom: 16px;
}

.referral-info-header .back-btn {
    position: static;
    padding: 4px 6px;
}

.referral-info-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 13px;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.back-btn:active {
    opacity: 0.7;
    transform: translateX(-2px);
}

/* Главное меню */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

/* Новое главное меню */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    position: relative;
    height: 36px;
    padding: 2px 12px 3px;
}

.mini-toggle {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(120, 160, 255, 0.18);
    background: rgba(16, 20, 28, 0.6);
    color: var(--text-primary);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mini-toggle.active {
    border-color: rgba(42, 171, 238, 0.55);
    background: rgba(42, 171, 238, 0.18);
}

.mini-toggle:active {
    transform: scale(0.96);
}

.brand-block {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 2px 6px;
}

.brand-mark {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
}

.brand-text {
    display: flex;
    align-items: center;
}

.brand-title {
    font-family: 'Unbounded', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: rgba(237, 237, 237, 0.92);
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.brand-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 14px;
    display: block;
}

.logo-container {
    width: 52px;
    height: 50px;
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.logo {
    width: 68px;
    height: 68px;
    max-width: none;
    max-height: none;
    object-fit: contain;
    display: block;
}

.main-divider {
    height: 1px;
    background: var(--stroke-weak);
    margin: 6px 0 18px;
}

/* Рефералка: первый блок под шапкой, до сетки карточек */
.referral-top-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 16px;
    padding: 14px 14px 14px 16px;
    border: none;
    border-radius: 16px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    overflow: hidden;
    background: linear-gradient(125deg, rgba(99, 102, 241, 0.22), rgba(16, 185, 129, 0.12) 55%, rgba(255, 255, 255, 0.04));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 28px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.referral-top-banner__glow {
    position: absolute;
    inset: -40% -20% auto auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.45), transparent 70%);
    pointer-events: none;
    opacity: 0.7;
}

.referral-top-banner__icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #a5b4fc;
    font-size: 22px;
}

.referral-top-banner__text {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.referral-top-banner__title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.referral-top-banner__sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.35;
}

.referral-top-banner__arrow {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 20px;
    transition: color 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
    .referral-top-banner:hover {
        border-color: rgba(165, 180, 252, 0.35);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 32px rgba(0, 0, 0, 0.4);
    }

    .referral-top-banner:hover .referral-top-banner__arrow {
        color: rgba(255, 255, 255, 0.75);
        transform: translateX(3px);
    }
}

.referral-top-banner:active {
    transform: scale(0.992);
}

/* Модалка «быстрая рефералка» */
.modal-card--referral-quick {
    position: relative;
    max-width: min(400px, calc(100vw - 32px));
    max-height: min(85vh, 640px);
    overflow-y: auto;
    text-align: left;
}

.referral-quick-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.referral-quick-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.referral-quick-body {
    margin-top: 4px;
}

.referral-quick-tips {
    margin: 0 0 16px;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.referral-quick-tips li {
    margin-bottom: 8px;
}

.referral-quick-tips li:last-child {
    margin-bottom: 0;
}

.referral-quick-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.referral-quick-link-wrap {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--stroke-weak);
    word-break: break-all;
}

.referral-quick-link-code {
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.4;
}

.referral-quick-feedback {
    min-height: 1.2em;
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--success-color, #4ade80);
}

.referral-quick-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.referral-quick-actions .btn-primary,
.referral-quick-actions .btn-secondary {
    flex: 1;
}

.referral-quick-full {
    margin-top: 12px;
    width: 100%;
}

.main-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Glassmorphism cards: give official Telegram feel */
.glass-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), var(--surface-0);
    border: 1px solid var(--stroke-weak);
    border-radius: var(--border-radius);
    box-shadow: inset 0 0.5px 0 0 rgba(255, 255, 255, 0.04), 0 6px 24px rgba(0, 0, 0, 0.30);
    -webkit-backdrop-filter: blur(32px) saturate(1.3);
    backdrop-filter: blur(32px) saturate(1.3);
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.01) 20%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.main-card {
    padding: 16px;
    text-align: left;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.main-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(106, 77, 255, 0.2), transparent 55%);
    opacity: 0;
    transition: opacity var(--transition);
}

@media (hover: hover) {
    .main-card:hover {
        box-shadow: var(--shadow-hover);
        border-color: var(--stroke-strong);
        transform: translateY(-2px);
    }

    .main-card:hover::after {
        opacity: 1;
    }
}

.main-card:active {
    transform: scale(0.985);
    border-color: rgba(91, 108, 255, 0.6);
}

.main-card-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.main-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #ffffff;
}

.main-card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.main-card:active {
    background: rgba(255, 255, 255, 0.03);
}

.menu-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--stroke-weak);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@media (hover: hover) {
    .menu-card:hover {
        transform: translateY(-2px);
        border-color: var(--stroke-strong);
        box-shadow: var(--shadow-hover);
    }
}

.menu-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.menu-card .icon {
    font-size: 36px;
    margin-bottom: 4px;
}

.menu-card .title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.menu-card .subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Каталог */
.catalog-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--stroke-weak);
}

.tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tab.active {
    color: var(--text-primary);
    border-bottom-color: rgba(91, 108, 255, 0.8);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Pricing cards for Stars */
.section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-header h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.section-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 16px 12px;
    min-height: 72px;
    border-radius: 16px;
    border: 1px solid var(--stroke-weak);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.pricing-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(244, 198, 77, 0.16);
    color: #f0d78a;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
    border: 1px solid rgba(244, 198, 77, 0.28);
}

.pricing-card__amount {
    font-size: 17px;
    font-weight: 700;
    color: var(--accent-star);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.pricing-card__meta {
    display: none;
}

/* Safety fallback: hide legacy package subtext if stale cached DOM appears */
.pricing-card__estimate,
.pricing-card__price,
.pricing-card__cta {
    display: none !important;
}

.pricing-card.popular .pricing-card__amount {
    padding-right: 58px;
}

.pricing-card.popular {
    border-color: rgba(244, 198, 77, 0.42);
    box-shadow: 0 0 20px rgba(244, 198, 77, 0.14);
}

.pricing-card.popular::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, transparent 8%, rgba(244, 198, 77, 0.55) 50%, transparent 92%);
    z-index: 2;
    pointer-events: none;
}

@media (hover: hover) {
    .pricing-card:hover {
        transform: translateY(-2px);
        border-color: var(--stroke-strong);
        box-shadow: var(--shadow-hover);
    }
}

.pricing-card:active {
    transform: scale(0.98);
}

.pricing-card:focus-visible {
    outline: 2px solid rgba(110, 200, 255, 0.55);
    outline-offset: 2px;
}

/* Своё количество */
.custom-buy {
    margin-bottom: 28px;
    padding: 22px 20px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.custom-buy h3 {
    font-size: 21px;
    margin-bottom: 12px;
    font-weight: 600;
}

.custom-buy__summary {
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(120, 160, 255, 0.18);
}

.custom-buy__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-buy__input-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.custom-buy input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 15px;
    margin-bottom: 0;
    background: rgba(12, 12, 14, 0.6);
    border: 1px solid rgba(120, 160, 255, 0.18);
    color: var(--text-primary);
}

.custom-buy__total {
    min-width: 72px;
    width: 80px;
    padding: 6px 8px;
    border-radius: 12px;
    background: rgba(12, 12, 14, 0.6);
    border: 1px dashed rgba(120, 160, 255, 0.22);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    text-align: right;
}

.custom-buy__total-label {
    font-size: 9px;
    color: var(--text-muted);
}

.custom-buy__total-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.custom-buy__total-currency {
    font-size: 9px;
    color: var(--text-muted);
}

.price-info {
    padding: 8px 12px;
    background: rgba(12, 12, 14, 0.6);
    border-radius: 12px;
    text-align: left;
    border: 1px dashed rgba(120, 160, 255, 0.2);
    margin-bottom: 0;
}

.price-info p {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.price-info__hint {
    color: var(--text-muted);
    font-size: 12px;
}

.custom-buy .btn-primary {
    margin-top: 6px;
}

.custom-buy__helper,
.custom-buy__hint {
    font-size: 11px;
    color: var(--text-muted);
}

.custom-buy__helper {
    margin-top: 4px;
}

.custom-buy__hint {
    margin-top: 4px;
    text-align: center;
}

.discount-info {
    color: var(--success-color) !important;
    font-weight: 600;
    font-size: 13px;
}

/* Premium планы */
.premium-plans {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plan-card {
    background: linear-gradient(180deg, rgba(28, 32, 40, 0.75), rgba(16, 18, 24, 0.75));
    border: 1px solid rgba(120, 160, 255, 0.18);
    border-radius: var(--border-radius);
    padding: 18px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), opacity var(--transition);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    position: relative;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.plan-card--primary {
    padding: 22px;
    border-color: rgba(110, 140, 255, 0.45);
    box-shadow: 0 0 18px rgba(110, 140, 255, 0.25);
}

.plan-card--secondary {
    opacity: 0.9;
    border-color: rgba(120, 160, 255, 0.2);
    box-shadow: 0 0 10px rgba(120, 160, 255, 0.12);
}

.plan-card--soft {
    opacity: 0.85;
    border-color: rgba(120, 160, 255, 0.18);
    box-shadow: 0 0 10px rgba(120, 160, 255, 0.08);
}

.plan-card__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(91, 108, 255, 0.22);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
}

@media (hover: hover) {
    .plan-card:hover {
        transform: translateY(-2px);
        border-color: var(--stroke-strong);
        box-shadow: var(--shadow-hover);
    }
}

.plan-card:active {
    transform: scale(0.985);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.plan-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.plan-card--primary .plan-header h3 {
    font-size: 22px;
}

.plan-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-cta-3);
}

.plan-card--primary .plan-price {
    font-size: 20px;
}

.plan-card--secondary .plan-price,
.plan-card--soft .plan-price {
    color: rgba(110, 215, 255, 0.65);
}

.plan-benefit {
    margin: 6px 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(237, 237, 237, 0.9);
}

.plan-card--secondary .plan-benefit,
.plan-card--soft .plan-benefit {
    font-weight: 500;
    color: var(--text-secondary);
}

.plan-features {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.plan-features p {
    margin: 4px 0;
}

/* Профиль */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 12px;
}

/* Единая «стеклянная» карточка профиля (тот же язык, что у «Пригласить друга») */
.profile-surface-card,
.ref-link-card,
.profile-header-card,
.profile-toggle-card,
.profile-referral-card,
.profile-stats-grid .stat-card {
    border-radius: 18px;
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--glass-shadow);
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.07),
        rgba(255, 255, 255, 0.02)
    );
}

.profile-header-card,
.ref-link-card,
.profile-toggle-card,
.profile-referral-card {
    padding: 16px;
}

.profile-stats-grid .stat-card {
    padding: 14px 8px 16px;
    box-sizing: border-box;
    overflow: visible;
}

.ref-link {
    font-size: 14px;
    color: var(--text-secondary);
}

.ref-link-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.ref-link-head-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(90, 140, 255, 0.1);
    border: 1px solid rgba(90, 140, 255, 0.28);
    color: #9ec5ff;
    font-size: 22px;
}

.ref-link-head-text {
    min-width: 0;
    flex: 1;
}

.ref-link-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.ref-link-lead {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.ref-link-details {
    margin-top: 14px;
    border-radius: 14px;
    border: 1px solid var(--stroke-weak);
    background: rgba(8, 10, 14, 0.45);
    overflow: hidden;
}

.ref-link-summary {
    list-style: none;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: background var(--transition);
}

.ref-link-summary::-webkit-details-marker {
    display: none;
}

.ref-link-summary::after {
    content: "";
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    opacity: 0.85;
}

.ref-link-details[open] .ref-link-summary::after {
    transform: rotate(225deg);
    margin-top: 2px;
}

@media (hover: hover) {
    .ref-link-summary:hover {
        background: rgba(255, 255, 255, 0.04);
    }
}

.ref-link-preview {
    font-size: 11px;
    font-family: ui-monospace, "Cascadia Mono", monospace;
    color: var(--text-muted);
    word-break: break-all;
    line-height: 1.5;
    padding: 12px 14px 14px;
    margin: 0;
    border: none;
    border-top: 1px solid var(--stroke-weak);
    border-radius: 0;
    background: rgba(5, 6, 10, 0.55);
}

.ref-link-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.ref-link-action-btn {
    width: 100%;
    min-width: 0;
    padding: 13px 10px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 13px;
}

.ref-link-action-btn .ui-icon {
    font-size: 18px;
    opacity: 0.95;
}

.ref-link-value {
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.4;
}

.ref-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ref-link-copy {
    padding: 6px 8px;
    font-size: 12px;
    flex-shrink: 0;
}

.ref-link-feedback {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
    min-height: 14px;
}

.ref-link-subtext {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.ref-link-share {
    margin-top: 10px;
}

.ref-link-share.btn-secondary {
    background: rgba(90, 140, 255, 0.12);
    border-color: rgba(90, 140, 255, 0.35);
}

.profile-referral-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-toggle-card--clickable {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.profile-toggle-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-toggle-subtext {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    border: 1px solid rgba(120, 160, 255, 0.2);
    position: relative;
    transition: background 180ms ease, border-color 180ms ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 180ms ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(42, 171, 238, 0.35);
    border-color: rgba(42, 171, 238, 0.6);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.snow-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 9;
    opacity: 0;
    transition: opacity 200ms ease;
}

.snow-layer.active {
    opacity: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    animation: snow-fall linear infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

@keyframes snow-fall {
    to {
        transform: translateY(110vh);
    }
}

.profile-referral-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.profile-referral-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 10px;
}

.profile-referral-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.profile-referral-grid .stat-item {
    min-height: 58px;
}

.profile-referral-grid .stat-item--compact {
    padding: 10px;
}

.profile-referral-grid .stat-item--wide {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
}

.profile-referral-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.profile-referral-actions {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-items: start;
}

.profile-referral-action-spacer {
    min-height: 1px;
}

.profile-referral-action {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-referral-balance-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--stroke-weak);
    background: rgba(8, 10, 14, 0.45);
}

.profile-referral-balance-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-referral-balance-value {
    font-weight: 600;
    color: var(--accent-cta-3);
    font-size: 16px;
}

.profile-referral-balance-hint {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: 0 0 2px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(8, 10, 14, 0.4);
    border: 1px solid var(--stroke-weak);
}

.profile-referral-balance-hint[hidden] {
    display: none !important;
}

.profile-referral-empty-state {
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px dashed var(--stroke-weak);
    background: rgba(8, 10, 14, 0.35);
    text-align: center;
}

.profile-referral-empty-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.profile-referral-empty-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.profile-referral-action-note {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.profile-referral-action-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-referral-action-destination {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.profile-referral-badge {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 600;
    color: #dff8f0;
    background: rgba(72, 190, 150, 0.18);
    border: 1px solid rgba(72, 190, 150, 0.5);
    padding: 4px 8px;
    border-radius: 999px;
}

.profile-referral-progress {
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-referral-progress-text {
    font-size: 11px;
    color: var(--text-secondary);
}


.profile-referral-progress-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.profile-referral-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgba(72, 190, 150, 0.9), rgba(72, 190, 150, 0.45));
    width: 0%;
    transition: width var(--transition);
}

.profile-referral-progress-value {
    font-size: 11px;
    color: var(--text-muted);
}

.profile-referral-history {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--stroke-weak);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-referral-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.profile-referral-history-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-referral-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-referral-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--stroke-weak);
    background: rgba(8, 10, 14, 0.35);
}

.profile-referral-history-total {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}


.profile-referral-history-date {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.profile-referral-history-empty {
    font-size: 12px;
    color: var(--text-muted);
}

.referral-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.page-content {
    padding: 16px;
    max-width: 480px;
    margin: 0 auto;
}

.info-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.info-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.info-card p {
    font-size: 13px;
    line-height: 1.5;
    color: #b0b5bd;
    margin: 0;
}

.primary-btn {
    margin-top: 24px;
    height: 48px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-cta-1), var(--accent-cta-2));
    color: white;
    box-shadow: var(--shadow-soft), var(--glow-cta);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.primary-btn:active {
    transform: scale(0.985);
    filter: brightness(0.98);
}

.profile-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border-radius: var(--border-radius);
    padding: 18px;
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.profile-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 0;
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, #ff8a8a, #ef476f);
    font-size: 20px;
    border: 1px solid var(--stroke-weak);
    flex-shrink: 0;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: none;
}

.profile-avatar-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
}

.badge-display {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-radius: 10px;
    margin-bottom: 0;
    align-self: flex-start;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: stretch;
}

.profile-stats-grid .stat-card {
    display: grid;
    grid-template-rows: min-content min-content 1fr;
    align-items: start;
    justify-items: center;
    text-align: center;
    row-gap: 8px;
    min-height: 0;
}

.profile-stats-grid .stat-label,
.profile-stats-grid .stat-value,
.profile-stats-grid .stat-subtext {
    margin: 0;
    width: 100%;
}

.profile-stats-grid .stat-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    min-height: 2.5em;
    line-height: 1.2;
    font-size: 12px;
}

.profile-stats-grid .stat-label .ui-icon,
.profile-stats-grid .stat-label .ph {
    font-size: 14px;
    color: rgba(190, 200, 220, 0.88);
    flex-shrink: 0;
}

.profile-stats-grid .stat-value {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.1em;
    font-size: 22px;
    font-weight: 700;
    color: #6aa9ff;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.profile-stats-grid .stat-subtext {
    display: block;
    height: auto;
    min-height: 0;
    align-self: stretch;
    font-size: 10px;
    line-height: 1.35;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0 2px 4px;
    word-break: break-word;
    hyphens: auto;
}

.profile-stats-grid .stat-subtext.profile-stat-hint {
    font-size: 9.5px;
    line-height: 1.32;
    letter-spacing: -0.01em;
}

.profile-stat-hint:empty {
    min-height: 0;
}

.stat-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: #9aa0a6;
    line-height: 1.3;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    margin-top: 6px;
    font-size: 24px;
    font-weight: 700;
    color: #6aa9ff;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    min-height: 30px;
}

.stat-subtext {
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
    min-height: 14px;
}

.stat-subtext--ghost {
    visibility: hidden;
}


.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #9aa0a6;
    margin: 20px 0 12px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 12px;
}

.section-title-row .section-title {
    margin: 0;
}

.leaderboard-section {
    margin-top: 16px;
}

.leaderboard-tabs {
    display: flex;
    gap: 0;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--stroke-weak);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    --leaderboard-active-index: 0;
}

.leaderboard-tabs::before {
    content: '';
    position: absolute;
    inset: 4px;
    width: calc((100% - 8px) / 3);
    background: linear-gradient(135deg, rgba(77, 124, 255, 0.35), rgba(110, 215, 255, 0.2));
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(120, 160, 255, 0.3);
    transform: translateX(calc(var(--leaderboard-active-index) * 100%));
    transition: transform 220ms ease;
    z-index: 0;
}

.leaderboard-tab {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.leaderboard-tab.active {
    color: var(--text-primary);
}

.leaderboard-list {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--stroke-weak);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
}

.leaderboard-item.top-1,
.leaderboard-item.top-2,
.leaderboard-item.top-3 {
    border-left: 3px solid transparent;
    padding-left: 12px;
}

.leaderboard-item.top-1 {
    background: linear-gradient(100deg, rgba(244, 198, 77, 0.08), rgba(244, 198, 77, 0.02) 60%, transparent);
    border-color: rgba(244, 198, 77, 0.10);
    border-left-color: rgba(244, 198, 77, 0.70);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}

.leaderboard-item.top-2 {
    background: linear-gradient(100deg, rgba(180, 200, 240, 0.06), rgba(180, 200, 240, 0.015) 60%, transparent);
    border-color: rgba(180, 200, 240, 0.08);
    border-left-color: rgba(180, 200, 240, 0.60);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.leaderboard-item.top-3 {
    background: linear-gradient(100deg, rgba(210, 160, 100, 0.06), rgba(210, 160, 100, 0.015) 60%, transparent);
    border-color: rgba(210, 160, 100, 0.08);
    border-left-color: rgba(210, 160, 100, 0.55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.leaderboard-rank {
    font-weight: 600;
    color: var(--accent-star);
    margin-right: 8px;
    min-width: 24px;
    text-align: center;
}

.leaderboard-item.top-1 .leaderboard-rank { color: #f4c64d; font-weight: 800; font-size: 15px; }
.leaderboard-item.top-2 .leaderboard-rank { color: #b8ccec; font-weight: 800; font-size: 15px; }
.leaderboard-item.top-3 .leaderboard-rank { color: #d0a060; font-weight: 800; font-size: 15px; }

.leaderboard-name {
    flex: 1;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-stars {
    font-weight: 600;
    color: var(--accent-cta-3);
    font-size: 13px;
}

.leaderboard-empty {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    padding: 12px;
    border: 1px dashed var(--stroke-weak);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--stroke-weak);
    border-radius: 14px;
    background: rgba(8, 10, 14, 0.45);
}

.stat-value {
    font-weight: 600;
    color: var(--accent-cta-3);
    font-size: 15px;
}

.bonus-card {
    background: linear-gradient(
        145deg,
        rgba(90, 140, 255, 0.2),
        rgba(90, 140, 255, 0.06)
    );
    border: 1px solid rgba(90, 140, 255, 0.28);
    border-radius: 14px;
    text-align: center;
    font-weight: 600;
}

.bonus-card .stat-label {
    color: var(--text-secondary);
}

/* CTA: градиент + лёгкий glow для премиального ощущения */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-cta-1), var(--accent-cta-2));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    box-shadow: var(--shadow-soft), var(--glow-cta);
}

.btn-primary:active {
    transform: scale(0.985);
    filter: brightness(0.98);
    box-shadow: var(--shadow-soft);
}

.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
    filter: none;
}

.link-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 8px 4px;
    cursor: pointer;
    align-self: flex-start;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(120, 160, 255, 0.4);
    transition: var(--transition);
}

.link-btn:active {
    opacity: 0.7;
}

.link-btn::after {
    content: ' →';
    color: var(--accent-cta-3);
}

@media (hover: hover) {
    .btn-primary:hover {
        filter: brightness(1.05);
        box-shadow: var(--shadow-hover), var(--glow-cta);
    }
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    color: var(--text-primary);
    border: 1px solid var(--stroke-weak);
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--glass-shadow);
}

.btn-withdraw {
    background: rgba(72, 190, 150, 0.18);
    border-color: rgba(72, 190, 150, 0.5);
    color: #dff8f0;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.btn-withdraw:active {
    background: rgba(72, 190, 150, 0.24);
}

.btn-withdraw:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--stroke-weak);
    color: var(--text-secondary);
}

.link-btn--compact {
    padding: 6px 0;
    font-size: 12px;
}

.bonus-tip-btn {
    align-self: center;
    text-decoration: none;
}


.btn-secondary:active {
    background: var(--surface-2);
    transform: scale(0.985);
}

@media (hover: hover) {
    .btn-secondary:hover {
        border-color: var(--stroke-strong);
        box-shadow: var(--shadow-soft);
    }
    
    .btn-withdraw:hover {
        filter: brightness(1.05);
        box-shadow: var(--shadow-soft);
    }
}

/* Форма покупки */
.purchase-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.purchase-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.purchase-card,
.purchase-card * {
    box-sizing: border-box;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-with-action {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.input-with-action input {
    flex: 1;
    width: 100%;
    min-width: 0;
}

.form-group label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.form-group input {
    padding: 12px;
    border-radius: 12px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--surface-1);
    border: 1px solid var(--stroke-weak);
    color: var(--text-primary);
    width: 100%;
}

.recipient-input {
    align-items: stretch;
    gap: 10px;
}

.recipient-field {
    position: relative;
    flex: 1;
}

.recipient-field input {
    background: rgba(12, 12, 14, 0.6);
    border: 1px solid rgba(120, 160, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.recipient-display {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 0 36px 0 12px;
    pointer-events: none;
}

.recipient-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.recipient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.recipient-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipient-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--stroke-weak);
    background: rgba(12, 12, 14, 0.7);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.recipient-field.recipient-selected input {
    color: transparent;
    text-shadow: none;
}

.recipient-field.recipient-selected .recipient-display,
.recipient-field.recipient-selected .recipient-clear {
    display: flex;
}

.recipient-error {
    margin-top: 6px;
    font-size: 11px;
    color: var(--danger-color);
    display: none;
}

.form-group input[readonly] {
    background: rgba(12, 12, 14, 0.6);
    border-color: var(--stroke-weak);
    color: var(--text-secondary);
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

.form-group input[readonly]:focus {
    border-color: var(--stroke-weak);
    box-shadow: none;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(91, 108, 255, 0.6);
}

.form-group small {
    color: var(--text-secondary);
    font-size: 12px;
}

.form-group--primary {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(120, 160, 255, 0.25);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.form-group--primary label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-inline {
    height: 42px;
    padding: 0 16px;
    background: rgba(90, 140, 255, 0.18);
    color: #dfe9ff;
    border: 1px solid rgba(90, 140, 255, 0.35);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-inline:hover {
    filter: brightness(1.05);
}

.btn-inline:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-soft);
}

@media (hover: hover) {
    .btn-inline:hover {
        filter: brightness(1.05);
    }
}

.purchase-note {
    text-align: center;
}

.price-display {
    padding: 16px;
    background: rgba(12, 12, 14, 0.6);
    border-radius: 14px;
    font-size: 21px;
    font-weight: 600;
    color: rgba(110, 215, 255, 0.82);
    text-align: center;
    border: 1px solid var(--stroke-weak);
    width: 100%;
}

.plan-display {
    padding: 16px;
    background: rgba(12, 12, 14, 0.6);
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--stroke-weak);
    width: 100%;
}

.discount-badge {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(46, 204, 113, 0.2);
    color: white;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* История заказов */
.orders-filter {
    display: flex;
    align-items: center;
    margin: 4px 0 12px;
    justify-content: center;
}

.segment-control {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 4px;
    height: 32px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--stroke-weak);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    --segment-active-index: 0;
    width: min(320px, 100%);
}

.segment-control::before {
    content: '';
    position: absolute;
    inset: 4px;
    width: calc((100% - 8px) / 2);
    background: linear-gradient(135deg, rgba(77, 124, 255, 0.35), rgba(110, 215, 255, 0.2));
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(120, 160, 255, 0.3);
    transform: translateX(calc(var(--segment-active-index) * 100%));
    transition: transform 220ms ease;
    z-index: 0;
}

.segment-btn {
    height: 28px;
    padding: 0 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    flex: 1;
}

.segment-btn.active {
    color: var(--text-primary);
}

.segment-btn:active {
    transform: translateY(1px);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-item {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--glass-shadow);
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.order-item-id {
    font-weight: 500;
    font-size: 11px;
    color: var(--text-muted);
}

/* Pill badges for order status */
.order-item-status {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid transparent;
}

.order-item-status.completed,
.order-item-status.done {
    background: rgba(46, 204, 113, 0.18);
    color: #9ee7ba;
    border-color: rgba(46, 204, 113, 0.3);
}

.order-item-status.pending,
.order-item-status.waiting {
    background: rgba(255, 204, 102, 0.18);
    color: #ffdb9a;
    border-color: rgba(255, 204, 102, 0.3);
}

.order-item-status.paid,
.order-item-status.in_progress {
    background: rgba(91, 108, 255, 0.2);
    color: #b6c0ff;
    border-color: rgba(91, 108, 255, 0.35);
}

.order-item-status.expired,
.order-item-status.failed {
    background: rgba(255, 107, 107, 0.2);
    color: #ffb1b1;
    border-color: rgba(255, 107, 107, 0.35);
}

.order-item-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.order-item-meta span {
    color: var(--text-primary);
    font-weight: 600;
}

.order-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.order-main .order-type {
    color: var(--text-primary);
}

.order-main .order-qty {
    color: var(--text-secondary);
    font-weight: 500;
}

.order-main .order-price {
    color: var(--accent-cta-3);
}

.order-sub {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.order-sub span {
    color: var(--text-secondary);
}

.order-date-group {
    margin: 14px 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-anim {
    animation: statusPulse 1.4s ease-in-out infinite;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-size: 16px;
}

/* Рефералы */
.referral-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.referral-card {
    background: var(--surface-1);
    border-radius: var(--border-radius);
    padding: 18px;
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--shadow-soft);
}

.referral-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 600;
}

.referral-link {
    padding: 12px;
    background: rgba(12, 12, 14, 0.6);
    border: 1px dashed var(--stroke-strong);
    border-radius: 12px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.referral-stats {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border-radius: var(--border-radius);
    padding: 18px;
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.referral-mentor-card {
    background: var(--surface-1);
    border-radius: var(--border-radius);
    padding: 18px;
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--shadow-soft);
}

.referral-mentor-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.referral-mentor-line {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--text-primary);
}

.referral-bind-hint {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.referral-bind-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.referral-bind-input {
    flex: 1 1 160px;
    min-width: 140px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--stroke-strong);
    background: rgba(12, 12, 14, 0.55);
    color: var(--text-primary);
    font-size: 15px;
}

.referral-bind-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.referral-bind-feedback {
    margin: 10px 0 0;
    font-size: 13px;
    min-height: 1.2em;
    color: var(--text-secondary);
}

.referral-bind-feedback.is-error {
    color: var(--danger-color);
}

.referral-bind-feedback.is-success {
    color: var(--success-color);
}

/* Оплата */
.payment-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.payment-progress {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 0.02em;
}

.payment-intro {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-intro-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.payment-steps {
    margin: 0;
    padding-left: 18px;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
}

.payment-steps li {
    margin-bottom: 6px;
}

.payment-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-step-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(160, 195, 255, 0.85);
}

.payment-step-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.payment-step-hint-strong {
    color: var(--text-primary);
    font-weight: 600;
}

.payment-step-warning {
    font-size: 12px;
    color: var(--text-secondary);
}

.payment-timer {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-timer-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-timer-subtext,
.payment-timer-note {
    font-size: 12px;
    color: var(--text-secondary);
}

.payment-timer.warning .payment-timer-text,
.payment-timer.warning .payment-timer-subtext {
    color: #f2b36c;
}

.payment-expired-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.payment-expired-alert {
    border: 1px solid rgba(242, 179, 108, 0.35);
    background: linear-gradient(160deg, rgba(242, 179, 108, 0.06), rgba(255, 255, 255, 0.02));
}

.payment-expired-title {
    font-size: 14px;
    font-weight: 600;
    color: #f2b36c;
    margin-bottom: 8px;
}

.payment-expired-list-title {
    margin-top: 10px;
    color: var(--text-primary);
}

.payment-expired-list {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.payment-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border-radius: var(--border-radius);
    padding: 18px;
    border: 1px solid var(--stroke-weak);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.payment-summary {
    padding: 20px;
}

.payment-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.payment-main-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.payment-main-amount {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    flex-wrap: wrap;
    row-gap: 8px;
}

.payment-amount-large {
    justify-content: center;
    text-align: center;
}

.payment-main-amount .copy-btn--payment {
    font-size: 12px;
    padding: 8px 14px;
}

.payment-copy-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.payment-copy-feedback {
    font-size: 12px;
    color: var(--success-color);
    min-height: 16px;
}

.payment-meta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--stroke-weak);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.payment-status-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.payment-meta-row span {
    color: var(--text-primary);
    font-weight: 600;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--stroke-weak);
}

.payment-row:last-child {
    border-bottom: none;
}

.payment-row-copy {
    align-items: center;
}

.payment-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    background: rgba(12, 12, 14, 0.6);
    border: 1px solid var(--stroke-weak);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 12px;
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.copy-btn--payment {
    border: 1px solid rgba(120, 170, 255, 0.32);
    background: linear-gradient(135deg, rgba(20, 28, 44, 0.85), rgba(24, 34, 54, 0.65));
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
    font-weight: 600;
    letter-spacing: 0.01em;
    min-height: 34px;
    border-radius: 12px;
    padding: 8px 16px;
}

.copy-btn:active {
    transform: scale(0.96);
    border-color: rgba(91, 108, 255, 0.6);
}

@media (hover: hover) {
    .copy-btn--payment:hover {
        border-color: rgba(120, 170, 255, 0.5);
        background: linear-gradient(135deg, rgba(30, 44, 70, 0.9), rgba(32, 48, 78, 0.72));
    }
}

.payment-instructions {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid var(--stroke-weak);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.payment-card-center {
    text-align: center;
    padding: 18px;
}

.payment-card-title {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.payment-card-number {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 18px;
    font-weight: 600;
    flex-wrap: wrap;
    row-gap: 8px;
}

.payment-card-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.payment-card-warning {
    margin-top: 6px;
    font-size: 11px;
    color: var(--warning-color);
}

.payment-instructions code {
    font-family: monospace;
    color: var(--accent-color);
}

.payment-instructions blockquote {
    margin: 10px 0;
    padding: 10px 12px;
    background: rgba(12, 12, 14, 0.6);
    border-left: 3px solid rgba(91, 108, 255, 0.7);
    border-radius: 6px;
}

.payment-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-compact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.payment-short-text {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.processing-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(110, 215, 255, 0.7);
    box-shadow: 0 0 12px rgba(110, 215, 255, 0.5);
    margin: 0 auto 10px;
    animation: pulse 1.4s ease-in-out infinite;
}

.processing-note {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.complete-hero {
    text-align: center;
    padding: 8px 0 4px;
}

.complete-hero-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.complete-hero-title {
    font-size: 18px;
    font-weight: 700;
    color: #9ee7ba;
}

.complete-hero-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.complete-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.complete-action-btn {
    background: transparent;
    border: 1px solid rgba(120, 160, 255, 0.22);
    color: var(--text-secondary);
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.complete-action-btn:active {
    transform: scale(0.98);
    color: var(--text-primary);
    border-color: rgba(120, 160, 255, 0.4);
}

/* Нижняя навигация */
.bottom-nav {
    position: fixed;
    bottom: 10px;
    left: 12px;
    right: 12px;
    height: 64px;
    padding: 6px 8px calc(env(safe-area-inset-bottom) + 2px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(8, 9, 12, 0.62);
    -webkit-backdrop-filter: blur(44px) saturate(1.4);
    backdrop-filter: blur(44px) saturate(1.4);
    border: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
    z-index: 9999;
}

.bottom-nav::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 6px;
    height: 2px;
    width: var(--bottom-nav-indicator-width, 36px);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(42, 171, 238, 0.25), rgba(42, 171, 238, 0.85), rgba(42, 171, 238, 0.25));
    box-shadow: 0 0 8px rgba(42, 171, 238, 0.5);
    transform: translateX(var(--bottom-nav-indicator-x, 0px));
    transition: transform 220ms ease;
    pointer-events: none;
    opacity: 0;
}

.bottom-nav.has-indicator::after {
    opacity: 1;
}

.bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(110, 215, 255, 0.18), transparent);
    pointer-events: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 16, 0.68);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-overlay.active {
    display: flex;
    animation: modalFadeIn 140ms ease both;
}

.modal-card {
    width: min(420px, 100%);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--stroke-weak);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
}

.modal-overlay.active .modal-card {
    animation: modalPopIn 180ms ease both;
}

.modal-summary {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 12, 18, 0.45);
    border-radius: 14px;
    padding: 12px 12px;
    margin-bottom: 14px;
}

.modal-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 2px;
}

.modal-summary-row + .modal-summary-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-summary-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.modal-summary-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
}

.btn--loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.btn--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 14px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: rgba(255, 255, 255, 0.95);
    animation: spin 0.9s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .ambient-bg {
        animation: none !important;
    }
    .screen,
    .modal-overlay.active,
    .modal-overlay.active .modal-card {
        animation: none !important;
    }
    * {
        scroll-behavior: auto !important;
        transition-duration: 0ms !important;
    }
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.modal-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.modal-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--stroke-weak);
    background: rgba(12, 12, 14, 0.6);
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 14px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions .btn-secondary,
.modal-actions .btn-primary {
    flex: 1;
}

.modal-actions--stack {
    flex-direction: column;
}

.modal-actions--stack .btn-secondary,
.modal-actions--stack .btn-primary {
    flex: none;
    width: 100%;
}

.toast-container {
    position: fixed;
    left: 50%;
    bottom: 88px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10000;
    pointer-events: none;
    padding: 0 16px;
    width: min(520px, 100%);
}

.subscription-gate {
    position: fixed;
    inset: 0;
    z-index: 120000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(5, 8, 14, 0.84);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.subscription-gate.active {
    display: flex;
}

.subscription-gate-card {
    width: min(440px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(165deg, rgba(22, 26, 35, 0.95), rgba(12, 14, 20, 0.95));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
    padding: 18px;
}

.subscription-gate-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subscription-gate-text {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 10px;
}

.subscription-gate-steps {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 12.5px;
    margin-bottom: 12px;
}

.subscription-gate-actions {
    display: grid;
    gap: 8px;
}

.toast {
    background: rgba(12, 16, 22, 0.92);
    border: 1px solid rgba(120, 160, 255, 0.18);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 140ms ease, transform 140ms ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    font-size: 16px;
    line-height: 1;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
    white-space: pre-wrap;
}

.skeleton-block,
.skeleton-line {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    color: transparent !important;
    border-radius: 10px;
}

.skeleton-circle {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.skeleton-block::after,
.skeleton-line::after,
.skeleton-circle::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    animation: skeleton-shimmer 1.2s infinite;
}

.skeleton-line {
    height: 12px;
    width: 100%;
}

.skeleton-xs { width: 24px; height: 12px; }
.skeleton-sm { width: 72px; height: 12px; }
.skeleton-md { width: 140px; height: 12px; }

.leaderboard-item.skeleton-row {
    justify-content: space-between;
}

@keyframes skeleton-shimmer {
    100% { transform: translateX(100%); }
}

.bottom-nav-item {
    flex: 1;
    background: transparent;
    border: none;
    color: #8a97ad;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 8.5px;
    cursor: pointer;
    position: relative;
    transition: color 160ms ease, transform 160ms ease, opacity 160ms ease;
    opacity: 0.9;
}

.bottom-nav-item.active {
    color: var(--accent-cta-1);
    opacity: 1;
}

.bottom-nav-icon {
    font-size: 18px;
    transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: translateY(-1px) scale(1.02);
    filter: drop-shadow(0 4px 10px rgba(42, 171, 238, 0.2));
}

.bottom-nav-label {
    transform: translateY(1px);
    letter-spacing: 0.2px;
}


.bottom-nav-item.nav-just-activated {
    animation: nav-pop 160ms ease;
}

@keyframes nav-pop {
    0% { transform: scale(0.96); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.payment-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.payment-check-btn {
    width: auto;
    padding: 8px 12px;
    font-size: 12px;
}

/* Адаптивность */
@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header h1 {
        font-size: 24px;
    }
    
    .header h2 {
        font-size: 20px;
    }
}

/* Giveaways UI */
.giveaways-header h2 {
    font-size: 20px;
}

.giveaways-hero {
    margin-bottom: 16px;
    padding: 16px;
}

.giveaways-hero-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #edf2ff;
}

.giveaways-hero-subtitle {
    font-size: 13px;
    color: #b7c1d6;
}

.giveaways-hero-note {
    margin-top: 10px;
    font-size: 12px;
    color: #7a8296;
}

.giveaways-win-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 16px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(245, 201, 122, 0.1);
    border: 1px solid rgba(245, 201, 122, 0.35);
    color: #f4c64d;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.giveaways-win-banner__text {
    font-size: 12px;
    font-weight: 600;
    color: #f4c64d;
}

.giveaways-win-banner__close {
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #f4c64d;
    border-radius: 10px;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.giveaways-win-banner__total {
    opacity: 0.85;
}

.giveaways-list {
    display: grid;
    gap: 12px;
}

.giveaways-entry {
    position: relative;
    box-shadow: 0 12px 26px rgba(143, 211, 255, 0.18);
    border: 1px solid rgba(143, 211, 255, 0.32);
    transform: translateY(-1px);
    grid-column: 1 / -1;
}

.giveaways-entry:hover {
    box-shadow: 0 16px 32px rgba(143, 211, 255, 0.28);
}

.giveaway-card {
    position: relative;
    overflow: hidden;
    padding: 14px;
}

.giveaway-prize-main {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: #f4c64d;
    margin-bottom: 2px;
    text-shadow: 0 0 16px rgba(244, 198, 77, 0.08);
}

.giveaway-prize-main.prize-monthly {
    color: #b8a4ff;
    text-shadow: 0 0 16px rgba(184, 164, 255, 0.08);
}

.giveaway-prize-main.prize-weekly {
    color: #70bfff;
    text-shadow: 0 0 16px rgba(100, 190, 255, 0.08);
}

.giveaway-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.giveaway-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 4px;
}

.giveaway-prize {
    font-size: 13px;
    color: #f4c64d;
    margin-bottom: 6px;
}

.giveaway-condition {
    font-size: 12.5px;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.giveaway-meta {
    font-size: 11px;
    color: #7a8296;
}

.giveaway-progress {
    margin: 8px 0;
}

.giveaway-progress-label {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.giveaway-progress-value {
    margin-top: 6px;
    font-size: 12px;
    color: #edf2ff;
}

.giveaway-progress-bar {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.giveaway-progress-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2aabee, #5b7cff);
}

.giveaway-progress-bar span[style*="width:100"] {
    box-shadow: 0 0 12px rgba(77, 124, 255, 0.6);
    animation: progressComplete 900ms ease-out 1;
}

@keyframes progressComplete {
    0% { box-shadow: 0 0 0 rgba(77, 124, 255, 0.0); }
    60% { box-shadow: 0 0 18px rgba(77, 124, 255, 0.75); }
    100% { box-shadow: 0 0 12px rgba(77, 124, 255, 0.6); }
}

/* ═══ Type-specific card styles ═══ */
.giveaway-card.giveaway-card--daily::after,
.giveaway-card.giveaway-card--weekly::after,
.giveaway-card.giveaway-card--monthly::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    z-index: 3;
    pointer-events: none;
}
.giveaway-card.giveaway-card--daily::after {
    background: linear-gradient(90deg, transparent 0%, rgba(244, 198, 77, 0.50) 15%, rgba(244, 198, 77, 0.90) 50%, rgba(244, 198, 77, 0.50) 85%, transparent 100%);
}
.giveaway-card.giveaway-card--weekly::after {
    background: linear-gradient(90deg, transparent 0%, rgba(100, 190, 255, 0.45) 15%, rgba(100, 190, 255, 0.85) 50%, rgba(100, 190, 255, 0.45) 85%, transparent 100%);
}
.giveaway-card.giveaway-card--monthly::after {
    background: linear-gradient(90deg, transparent 0%, rgba(160, 140, 255, 0.45) 15%, rgba(160, 140, 255, 0.85) 50%, rgba(160, 140, 255, 0.45) 85%, transparent 100%);
}
.giveaway-card--daily { border-color: rgba(244, 198, 77, 0.10) !important; }
.giveaway-card--weekly { border-color: rgba(100, 190, 255, 0.10) !important; }
.giveaway-card--monthly { border-color: rgba(160, 140, 255, 0.10) !important; }

/* Type-specific progress bar colors */
.giveaway-card--daily .giveaway-progress-bar span { background: linear-gradient(90deg, #e8c468, #d4a030); }
.giveaway-card--monthly .giveaway-progress-bar span { background: linear-gradient(90deg, #9888fa, #b888ff); }

/* Type badge */
.giveaway-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.giveaway-type-badge--daily { background: rgba(244,198,77,0.05); color: #e8c468; border: 1px solid rgba(244,198,77,0.10); }
.giveaway-type-badge--weekly { background: rgba(100,190,255,0.04); color: #70bfff; border: 1px solid rgba(100,190,255,0.10); }
.giveaway-type-badge--monthly { background: rgba(160,140,255,0.04); color: #b8a4ff; border: 1px solid rgba(160,140,255,0.10); }

.giveaway-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 4px 0;
}

.giveaway-lock-note {
    font-size: 11px;
    color: #b7c1d6;
    margin-bottom: 10px;
}

.giveaway-loading {
    font-size: 12px;
    color: #7a8296;
    text-align: center;
    padding: 16px 0;
}

.giveaway-winners-title {
    font-size: 11px;
    color: #b7c1d6;
    margin-bottom: 6px;
}

.giveaway-winners-link {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.giveaway-winners-link:active {
    color: #ffffff;
    transform: scale(0.99);
    border-color: rgba(120, 170, 255, 0.45);
    background: linear-gradient(160deg, rgba(70, 100, 180, 0.22), rgba(30, 45, 90, 0.18));
}

.giveaway-winners-link .chevron {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.85;
}

.giveaway-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.025);
    margin: 6px 0 2px;
}

.giveaway-winners {
    display: grid;
    gap: 4px;
}

.giveaway-winner-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 13px;
    color: var(--text-primary);
}

.giveaway-winner-icon {
    font-size: 16px;
    color: #8eb2ff;
    flex: 0 0 auto;
}

.giveaway-winner-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.giveaway-winner-prize {
    margin-left: auto;
    color: #f3cc67;
    font-weight: 600;
    white-space: nowrap;
}

.giveaway-meta-icon {
    font-size: 15px;
    transform: translateY(1px);
    opacity: 0.95;
    color: #f3cc67;
}

.giveaway-winners-empty {
    font-size: 11px;
    color: #7a8296;
    margin-bottom: 12px;
}

.giveaways-winners-sheet {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    overscroll-behavior: contain;
}

.giveaways-winners-sheet.is-open {
    display: block;
}

.giveaways-winners-sheet__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.giveaways-winners-sheet__panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 28px);
    max-width: 400px;
    max-height: 70vh;
    padding: 0;
    border-radius: 18px;
    background: rgba(12, 14, 20, 0.94);
    -webkit-backdrop-filter: blur(40px) saturate(1.4);
    backdrop-filter: blur(40px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 24px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    animation: sheetIn 0.2s ease-out;
}

.giveaways-winners-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.giveaways-winners-sheet__title {
    font-size: 16px;
    font-weight: 600;
    color: #edf2ff;
}

.giveaways-winners-sheet__subtitle {
    font-size: 11.5px;
    color: var(--text-muted);
    padding: 0 16px;
    margin: 0 0 4px;
    flex-shrink: 0;
}

.giveaways-winners-sheet__close {
    border: 0;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-radius: 10px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.giveaways-winners-sheet__close:active {
    background: rgba(255, 255, 255, 0.08);
}

.giveaways-winners-sheet__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 14px 18px;
    flex: 1;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

#giveaways.giveaways-sheet-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

@keyframes sheetIn {
    0% { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.giveaway-status {
    font-size: 11.5px;
    font-weight: 600;
    margin: 4px 0 8px;
}

.giveaway-status.status-locked {
    color: #7a8296;
}

.giveaway-status.status-eligible {
    color: #e8c468;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(232,196,104,0.04);
    border: 1px solid rgba(232,196,104,0.08);
    display: inline-block;
}

.giveaway-status.status-joined {
    color: #6ee7a8;
}

.join-btn {
    width: 100%;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(42, 171, 238, 0.05);
    border: 1px solid rgba(42, 171, 238, 0.12);
    transition: transform 0.12s ease;
}

.join-btn:active {
    transform: scale(0.98);
}

.join-btn.join-cta {
    background: linear-gradient(135deg, #e8c060, #d4a030);
    border-color: rgba(232,192,96,0.30);
    color: #1a1400;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 14px;
    box-shadow: 0 4px 14px rgba(232,196,104,0.06);
}

.join-btn.join-cta:active {
    transform: scale(0.98);
}

.join-btn.join-cta.join-btn-animate {
    animation: joinPulse 420ms ease-out;
}

@keyframes joinPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(245, 201, 122, 0.0); }
    45% { transform: scale(1.03); box-shadow: 0 0 28px rgba(245, 201, 122, 0.45); }
    100% { transform: scale(1); box-shadow: 0 0 30px rgba(245, 201, 122, 0.35); }
}

.join-btn.joined {
    background: rgba(110,231,168,0.04);
    border-color: rgba(110,231,168,0.10);
    color: #c0f0d8;
    cursor: default;
}

.join-btn.soft {
    background: rgba(255,255,255,0.01);
    border-color: rgba(255,255,255,0.04);
    color: var(--text-muted);
    opacity: 0.6;
    cursor: not-allowed;
}

.giveaway-action {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    padding: 2px 0;
}

.giveaway-action.status-joined-text {
    color: #6ee7a8;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(110,231,168,0.02);
    border: 1px solid rgba(110,231,168,0.05);
}

.giveaway-action.status-joined-text.status-joined-animate {
    animation: joinedReveal 520ms ease-out;
}

@keyframes joinedReveal {
    0% { opacity: 0; transform: translateY(6px); filter: blur(1px); }
    60% { opacity: 1; transform: translateY(0); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0); }
}

.giveaway-action.action-link {
    color: #70bfff;
    cursor: pointer;
}

.giveaway-action.action-link:active {
    opacity: 0.7;
}

/* Анимации */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.98);
        opacity: 0.75;
    }
}

/* Плавные анимации карточек и блоков */
.pricing-card,
.plan-card,
.profile-surface-card,
.ref-link-card,
.profile-header-card,
.profile-referral-card,
.profile-toggle-card,
.info-card,
.stat-card,
.leaderboard-item,
.bonus-card,
.purchase-card,
.referral-card,
.payment-card,
.giveaway-card,
.giveaways-hero,
.modal-card,
.profile-card,
.profile-referral-history-item {
    animation: cardReveal 280ms ease both;
    will-change: transform, box-shadow;
}

@media (hover: hover) {
    .leaderboard-item:hover,
    .bonus-card:hover,
    .purchase-card:hover,
    .referral-card:hover,
    .payment-card:hover,
    .giveaway-card:hover,
    .ref-link-card:hover,
    .profile-header-card:hover,
    .profile-referral-card:hover,
    .profile-stats-grid .stat-card:hover {
        transform: translateY(-2px);
        border-color: var(--stroke-strong);
        box-shadow: var(--shadow-soft);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ═══════════════════════════════════════
   SVG ICONS
   ═══════════════════════════════════════ */
.icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
}
.icon-svg svg { width: 100%; height: 100%; }
.icon-svg--sm { width: 15px; height: 15px; }
.main-card-icon .icon-svg { width: 32px; height: 32px; }
.main-card-icon .icon-svg svg { stroke-width: 1.8; }
.main-card:nth-child(1) .icon-svg { color: #f4c64d; }
.main-card:nth-child(2) .icon-svg { color: #6cc8ff; }
.main-card[data-giveaways-card="1"] .icon-svg { color: #6ee7a8; }
[data-gift-card="1"] .icon-svg { color: #ff7eb3; }
[data-giveaways-card="1"] {
    border-color: rgba(110, 231, 168, 0.22);
    background:
        linear-gradient(155deg, rgba(110, 231, 168, 0.08), rgba(110, 231, 168, 0.02) 38%, rgba(255, 255, 255, 0.015)),
        var(--surface-0);
}
[data-giveaways-card="1"]::after {
    opacity: 1;
    background: radial-gradient(circle at top right, rgba(110, 231, 168, 0.22), transparent 58%);
}
[data-gift-card="1"] {
    grid-column: 1 / -1;
    margin-top: 6px;
    border-color: rgba(255, 126, 179, 0.24);
    background:
        linear-gradient(155deg, rgba(255, 126, 179, 0.10), rgba(255, 126, 179, 0.03) 38%, rgba(255, 255, 255, 0.015)),
        var(--surface-0);
}
[data-gift-card="1"]::after {
    opacity: 1;
    background: radial-gradient(circle at top right, rgba(255, 126, 179, 0.26), transparent 60%);
}

/* ===============================
   Gift wizard styles (prod)
   =============================== */
#gift-wizard .header h2 {
    font-size: 30px;
    line-height: 1.15;
}

.gift-wizard-body {
    padding: 6px 16px 96px;
}

.gift-card {
    padding: 18px 16px;
    border-radius: 16px;
    margin-bottom: 14px;
}

.gift-card__label {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary, #ededed);
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.gift-item {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    min-height: 108px;
    transition: all 0.15s ease;
    color: var(--text-primary, #ededed);
    overflow: hidden;
}

.gift-item:active { transform: scale(0.98); }

.gift-item__media {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 64px;
}

.gift-item__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gift-item__title {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gift-item__price {
    font-size: 11px;
    color: #f4c64d;
    font-weight: 700;
}

.gift-item--active {
    border-color: rgba(42, 171, 238, 0.28);
    background: rgba(42, 171, 238, 0.12);
    box-shadow: 0 0 12px rgba(42, 171, 238, 0.12);
}

.gift-item--unavailable {
    opacity: 0.55;
    cursor: not-allowed;
}

.gift-png-warning {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #ffd89a;
    border: 1px solid rgba(255, 204, 102, 0.24);
    background: rgba(255, 204, 102, 0.08);
}

.gift-next-btn {
    width: 100%;
}

/* Referral copy button — bright */
.ref-link-copy--enhanced {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 8px 14px !important;
    font-size: 12.5px !important;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, #2aabee, #4d7cff) !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.15s ease;
}
.ref-link-copy--enhanced:active { transform: scale(0.95); opacity: 0.85; }
.ref-link-copy--enhanced .icon-svg { color: #fff; }
.ref-link-share { display: inline-flex !important; align-items: center; gap: 5px; }
.ref-link-share .icon-svg { color: inherit; }

/* Payment amount alert */
.payment-amount-alert {
    display: flex; align-items: flex-start; gap: 10px;
    margin-top: 10px; padding: 10px 12px; border-radius: 12px;
    background: rgba(248, 80, 80, 0.03);
    border: 1px solid rgba(248, 100, 100, 0.10);
}
.payment-amount-alert__icon { font-size: 16px; flex-shrink: 0; line-height: 1.4; }
.payment-amount-alert__text { font-size: 12px; line-height: 1.5; color: #c8a0a0; }
.payment-amount-alert__text strong { color: #f08080; font-weight: 700; }
.payment-step--amount { border-color: rgba(232, 168, 64, 0.12) !important; }

/* Payment timer bar */
.payment-timer-bar {
    height: 3px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.03); overflow: hidden; margin-top: 6px;
}
.payment-timer-bar span {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #2aabee, #5b7cff);
    transition: width 1s linear;
}
.payment-timer.warning .payment-timer-bar span {
    background: linear-gradient(90deg, #e8a040, #f06060);
}

/* Order complete giveaway CTA */
.complete-giveaway-cta {
    margin-top: 12px; padding: 14px; border-radius: 16px;
    background: rgba(232,196,104,0.02); border: 1px solid rgba(232,196,104,0.06);
    display: flex; flex-direction: column; gap: 6px;
    animation: fadeUp 0.35s ease-out;
}
.complete-giveaway-cta__title { font-size: 13px; font-weight: 700; color: #e8c468; }
.complete-giveaway-cta__text { font-size: 12px; color: var(--text-secondary); line-height: 1.45; }
.complete-giveaway-cta__btn {
    margin-top: 4px; width: 100%; padding: 10px; border-radius: 12px;
    border: 1px solid rgba(232,196,104,0.12); background: rgba(232,196,104,0.02);
    color: #e8c468; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.complete-giveaway-cta__btn:active { transform: scale(0.97); transition: transform 0.12s; }


/* ═══════════════════════════════════════
   LANGUAGE SWITCHER — RU / UZ
   ═══════════════════════════════════════ */
.language-switcher {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 10px);
    right: 12px;
    z-index: 120001;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 4px;
    border-radius: 12px;
    background: rgba(8, 11, 16, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    max-width: calc(100vw - 24px);
}

body.lang-switcher .main-header {
    padding-right: 100px;
    box-sizing: border-box;
}

.language-switcher .lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    padding: 4px 6px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary, #b7c1d6);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.language-switcher .lang-btn.active {
    background: linear-gradient(135deg, rgba(42, 171, 238, 0.32), rgba(77, 124, 255, 0.28));
    border-color: rgba(110, 215, 255, 0.45);
    color: #edf2ff;
}

.language-switcher .lang-btn:active {
    transform: scale(0.97);
}

.language-switcher .lang-flag {
    font-size: 13px;
    line-height: 1;
}

.lang-flag-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 12px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.language-switcher .lang-btn__txt {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-left: 2px;
    min-width: 1.25em;
    color: inherit;
    pointer-events: none;
}

.language-switcher .lang-btn:focus-visible {
    outline: 2px solid rgba(110, 215, 255, 0.85);
    outline-offset: 2px;
}
