/* ===== ОБЩИЕ СТИЛИ: переменные, базовый сброс, навбар, дроверы, попапы, уведомления, лоадер, корзина, табы и т.п. ===== */

#app{visibility:hidden;opacity:0}

.page-loader{visibility:visible!important}



.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #141414;
    display: block;
    transition: opacity 0.5s ease;
}



.page-loader.hidden {
    display: none;
}



.loader-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}



.loader-stars {
    position: absolute;
    width: 360px;
    height: 360px;
}



.loader-portals-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--tg-viewport-safe-area-inset-top, 0px) + 100px);
    width: 230px;
    height: 47px;
    display: block;
}



.loader-center700 {
    position: absolute;
    width: 700px;
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}



.loader-lottie-icon {
    position: absolute;
}



.loader-bottom {
    position: absolute;
    width: 269px;
    margin-bottom: calc(-1 * (var(--tg-viewport-safe-area-inset-bottom, 0px) + 180px));
    display: flex;
    flex-direction: column;
    align-items: center;
}



.loader-bottom img {
    width: 210px;
    height: 214px;
    display: block;
    margin: 0;
}



.loader-pill {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 9999px;
    background: #2865ff;
    filter: drop-shadow(0 9.763px 11.129px rgba(7, 7, 7, 0.44));
    box-shadow: inset 8.953px 8.953px 20.348px 0 rgba(107, 255, 253, 0.32);
}



.loader-pill span {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.24;
    letter-spacing: -2px;
    white-space: nowrap;
}



.loader-bottom p {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 40px;
}



.page-loader-progress-track {
    width: 140px;
    height: 4px;
    border-radius: 99em;
    background: #282727;
    overflow: hidden;
    margin-top: 16px;
}



.page-loader-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 99em;
    background: #ffffff;
    transition: width 0.3s ease;
}


/* Also hide when deposit view is active */
body:has(#view-deposit-ton:not(.hidden)) .top-header,
body:has(#view-deposit-stars:not(.hidden)) .top-header {
    display: none !important;
}



@font-face {
    font-family: 'SF Pro Text';
    src: url('../Stic/SFProText-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}



.seasons-star-lg {
    width: 28px;
    height: 28px;
}



.seasons-star-sm {
    width: 14px;
    height: 14px;
}



.seasons-star-inline {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
}



.task-icon-telegram {
    background: rgba(44, 185, 255, 0.15);
    color: #2cb9ff;
}



.task-icon-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}



.task-icon-pink {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}



.task-icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}



.task-icon-yellow {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}



.task-icon-green {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}



.drawer-header-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}



.drawer-subtitle-muted {
    color: #8e8e93;
    font-size: 14px;
    margin-top: 4px;
    margin-bottom: 0;
}



.drawer-elevated {
    z-index: 2005;
}



.popup-icon-alert {
    color: #ff453a;
    font-size: 48px;
}



:root {

    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    --bottom-nav-height: 70px;
    --bottom-nav-offset: 0px;
    --tg-safe-area-top: 0px;
    --tg-safe-area-bottom: 0px;
    --tg-content-safe-area-top: 0px;
    --tg-content-safe-area-bottom: 0px;
    --tg-viewport-stable-height: 100vh;

    --color-bg: #141414;
    --color-bg-secondary: #1c1c1e;
    --color-bg-tertiary: #2c2c2e;
    --color-text: #ffffff;
    --color-text-secondary: #8e8e93;
    --color-text-muted: #6b7280;
    --color-accent: #2382ff;
    --color-accent-light: #60a8ff;
    --color-success: #22c55e;
    --color-error: #ff453a;
    --color-warning: #f59e0b;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-overlay: rgba(0, 0, 0, 0.6);

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.35s ease;

    --bg-glass: #000;
    --c-light: #fff;
    --c-dark: #000;
    --c-content: #ffffff;
    --glass-reflex-dark: 2;
    --glass-reflex-light: 0.3;
    --saturation: 140%;
    --switcher-transition: 0.25s cubic-bezier(1, 0, 0.4, 1);
    --tabbar-height: 72px;
    --glass-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 1.8px 3px 0px -2px rgba(255, 255, 255, 0.27),
        inset -2px -2px 0px -2px rgba(255, 255, 255, 0.24),
        inset -3px -8px 1px -6px rgba(255, 255, 255, 0.18),
        inset -0.3px -1px 4px 0px rgba(0, 0, 0, 0.24),
        inset -1.5px 2.5px 0px -2px rgba(0, 0, 0, 0.4),
        inset 0px 3px 4px -2px rgba(0, 0, 0, 0.4),
        inset 2px -6.5px 1px -4px rgba(0, 0, 0, 0.2),
        0px 1px 5px 0px rgba(0, 0, 0, 0.2),
        0px 6px 16px 0px rgba(0, 0, 0, 0.16);
    --card-glass-shadow:
        inset 1.8px 3px 0px -2px rgba(255,255,255,0.06),
        inset 2px 2px 0px -2px rgba(255,255,255,0.09),
        inset -2px -2px 2px -2px rgba(255,255,255,0.09),
        inset -1.8px -3px 0px -2px rgba(255,255,255,0.06);
    --primary: #2382ff;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}



::-webkit-scrollbar {
    width: 0px;
    background: transparent;
    display: none;
}



html,
body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: #141414;
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: pan-y;
}



#app {
    width: 100%;
    min-height: 100vh;
    background: transparent;
    display: block;
    position: relative;
    padding-bottom: 0;
    visibility: hidden;
    opacity: 0;
}



.top-header {
    position: relative;
    width: 100%;
    z-index: 1000;
    padding: 12px 16px 16px;
    padding-top: calc(12px + var(--safe-area-top));
    padding-left: calc(16px + var(--safe-area-left));
    padding-right: calc(16px + var(--safe-area-right));
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    background: linear-gradient(to bottom, #141414 0%, rgba(20, 20, 20, 0.7) 50%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    gap: 10px;
}



body.mobile-fullscreen .top-header {
    padding-top: calc(16px + var(--tg-safe-area-top, 0px) + var(--tg-content-safe-area-top, 0px));
}



body.mobile-fullscreen {
    overflow-anchor: none;
}



body.mobile-fullscreen #app {
    min-height: var(--tg-viewport-stable-height, 100vh);
}



.balance-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #142637;
    border-radius: 99em;
    padding: 8px 12px;
    pointer-events: auto;
    transition: transform 0.15s ease;
    box-shadow:
        0px 1px 5px 0px rgba(0, 0, 0, 0.2),
        0px 6px 16px 0px rgba(0, 0, 0, 0.16),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}



.balance-card.stars-balance {
    background-color: #352b12;
}



.ton-icon {
    width: 18px;
    height: 18px;
    color: #1f6acc;
    flex-shrink: 0;
}



.star-icon {
    width: 18px;
    height: 18px;
    color: #fbbf24;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}



.star-icon .lottie-star-container {
    width: 18px;
    height: 18px;
}



.balance-amount {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}



.add-balance-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    color: #000000;
    flex-shrink: 0;
}



.add-balance-btn svg {
    width: 16px;
    height: 16px;
}



.add-balance-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}



.view-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: auto;
    display: block;
    background: transparent;
    padding: 0;
    padding-bottom: calc(var(--bottom-nav-height) + var(--bottom-nav-offset) + var(--safe-area-bottom));
    z-index: 2;
}



.view-container.hidden {
    display: none;
}



.section-placeholder {
    padding: 16px 24px;
    padding-top: 16px;
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}



.section-placeholder-animation {
    width: 120px;
    height: 120px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}



.section-placeholder-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}



.section-placeholder-subtitle {
    color: #9ca3af;
    font-size: 14px;
}



.bottom-bar {
    position: fixed;
    bottom: calc(var(--bottom-nav-offset) + var(--safe-area-bottom) + 6px);
    left: 10px;
    right: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}



.bottom-nav {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    height: var(--tabbar-height);
    padding: 4px;
    box-sizing: border-box;
    border: none;
    border-radius: 99em;
    background-color: rgba(0, 0, 0, 0.12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: var(--glass-shadow);
    transition:
        background-color var(--switcher-transition),
        box-shadow var(--switcher-transition);
}



.bottom-nav::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: calc((100% - 16px - 8px) / 3);
    height: calc(var(--tabbar-height) - 8px);
    border-radius: 99em;
    background-color: #0000004d;
    z-index: -1;
    box-shadow:
        inset 0 0 0 1px #ffffff08,
        inset 2px 1px 0 -1px #ffffff45,
        inset -1.5px -1px 0 -1px #ffffff3d,
        inset -2px -6px 1px -5px #ffffff2e,
        inset -1px 2px 3px -1px #0006,
        inset 0 -4px 1px -2px #0003,
        0 3px 6px #00000029;
    transition:
        background-color var(--switcher-transition),
        box-shadow var(--switcher-transition),
        translate var(--switcher-transition);
}



.bottom-nav[data-active="0"]::after {
    translate: 0 0;
    transform-origin: right;
    animation: _scaleToggle_1 0.44s ease;
}



.bottom-nav[data-active="1"]::after {
    translate: calc(100% + 8px) 0;
    transition:
        background-color var(--switcher-transition),
        box-shadow var(--switcher-transition),
        translate var(--switcher-transition);
    animation: _scaleToggle_2 0.44s ease;
}



.bottom-nav[data-previous="0"][data-active="1"]::after {
    transform-origin: left;
}



.bottom-nav[data-previous="2"][data-active="1"]::after {
    transform-origin: right;
}



.bottom-nav[data-active="2"]::after {
    translate: calc(200% + 16px) 0;
    transform-origin: left;
    transition:
        background-color var(--switcher-transition),
        box-shadow var(--switcher-transition),
        translate var(--switcher-transition);
    animation: _scaleToggle_3 0.44s ease;
}



.bottom-nav[data-active="3"]::after {
    display: none;
}



@keyframes _scaleToggle_1 {
    0% {
        scale: 1 1;
    }
    50% {
        scale: 1.05 1.1;
    }
    to {
        scale: 1 1;
    }
}



@keyframes _scaleToggle_2 {
    0% {
        scale: 1 1;
    }
    50% {
        scale: 1.1 1.1;
    }
    to {
        scale: 1 1;
    }
}



@keyframes _scaleToggle_3 {
    0% {
        scale: 1 1;
    }
    50% {
        scale: 1.05 1.1;
    }
    to {
        scale: 1 1;
    }
}



.nav-btn {
    --c: var(--c-content);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 99em;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    color: var(--c);
    transition: all 0.16s;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}



.nav-btn:hover {
    opacity: 0.7;
    cursor: pointer;
}



.nav-btn:hover .nav-icon {
    scale: 1.1;
}



.nav-btn.active {
    --c: var(--primary);
    opacity: 1;
    cursor: auto;
    color: var(--c);
}



.nav-btn.active:hover {
    opacity: 1;
    cursor: pointer;
}



.nav-btn.active:hover .nav-icon {
    scale: 1;
}



.nav-icon {
    font-size: 22px;
    color: currentColor;
    transition: scale 0.16s, color 0.16s;
    line-height: 1;
}



.nav-btn .cases-icon {
    color: rgba(255, 255, 255, 0.7);
}



.nav-btn.active .cases-icon {
    color: var(--primary);
}



.nav-btn .gifts-icon {
    color: rgba(255, 255, 255, 0.7);
}



.nav-btn.active .gifts-icon {
    color: var(--primary);
}



.nav-text {
    font-size: 10px;
    color: currentColor;
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.16s;
}



.nav-badge {
    position: absolute;
    top: 2px;
    right: 8px;
    background: linear-gradient(135deg, #ff453a, #ff6b5a);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(255, 69, 58, 0.4);
    border: 2px solid #131314;
    line-height: 1;
    z-index: 10;
}



.nav-badge.hidden {
    display: none;
}



.bundles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 16px;
    padding-left: calc(16px + var(--safe-area-left));
    padding-right: calc(16px + var(--safe-area-right));
    margin-top: 20px;
    padding-bottom: 20px;
}



.nft-preview-img {
    width: 108%;
    height: 108%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4));
    z-index: 1;
    transition: opacity 0.25s ease;
}



.lottie-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
    z-index: 1;
}



.ton-icon-small {
    width: 13px;
    height: 14px;
    color: currentColor;
    flex-shrink: 0;
}



.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
}



.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}



.drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1c1c1e;
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    padding: 16px 16px 36px 16px;
    padding-bottom: calc(36px + var(--safe-area-bottom));
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--card-glass-shadow);
}


@supports (corner-shape: squircle) {
    .drawer {
        corner-shape: squircle;
        border-top-left-radius: 60px;
        border-top-right-radius: 60px;
    }
}



.drawer.open {
    transform: translateY(0);
    box-shadow: var(--card-glass-shadow), 0 -8px 40px rgba(0, 0, 0, 0.5);
}



.drawer-handle {
    width: 36px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    margin-bottom: 24px;
}



.drawer-close-btn {
    display: none;
}



.drawer-deal-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px 4px 16px;
    margin-bottom: 8px;
    position: relative;
}



.drawer-deal-header.hidden {
    display: none;
}



.drawer-deal-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0;
}



.drawer-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}



.drawer-image-wrapper {
    width: 160px;
    height: 160px;
    margin-bottom: 16px;
    position: relative;
    display: flex;
    justify-content: center;
}



.drawer-image-bg {
    width: 160px;
    height: 160px;
    border-radius: 32px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    position: relative;
    overflow: hidden;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}



.drawer-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}



.drawer-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    width: 100%;
}



.drawer-subtitle {
    color: #9ca3af;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 32px;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}



.drawer-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}



.drawer-btn-secondary,
.drawer-btn-primary {
    flex: 1;
    border: none;
    border-radius: 99em;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease, background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
}



.drawer-btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: var(--glass-shadow);
}



.drawer-btn-secondary:active {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(0.98);
}



.drawer-btn-primary {
    background: var(--primary);
    color: #ffffff;
}



.drawer-btn-primary:active {
    background: #006add;
    transform: scale(0.98);
}



#sellDrawer.sell-compact .drawer-btn-secondary,
#sellDrawer.sell-compact .drawer-btn-primary {
    padding: 10px 12px;
    min-height: 42px;
    font-size: 15px;
    border-radius: 10px;
}



.btn-subtitle {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 2px;
}



.drawer-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}



.drawer-title-left {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}



.drawer-close-btn-inline {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 99em;
    width: 32px;
    box-shadow: var(--glass-shadow);
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e93;
    cursor: pointer;
}



.drawer-desc-left {
    color: #9ca3af;
    font-size: 14px;
    text-align: left;
    width: 100%;
    margin-bottom: 24px;
}



.confirm-stats {
    width: 100%;
    margin-bottom: 16px;
}



.confirm-stat-row {
    display: flex;
    justify-content: space-between;
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 8px;
}



.confirm-stat-val {
    color: #ffffff;
    font-weight: 500;
}



.confirm-status-text {
    color: #ff453a;
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
    width: 100%;
    display: none;
}



.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}



.popup-overlay.open {
    opacity: 1;
    visibility: visible;
}



.popup-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    background: linear-gradient(160deg, #222226 0%, #18181b 100%);
    border-radius: 24px;
    padding: 28px 22px 20px;
    width: 84%;
    max-width: 320px;
    z-index: 3001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.08);
}



.popup-card.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}



.popup-icon-wrapper {
    margin-bottom: 18px;
    margin-top: 4px;
}



.popup-icon-login {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2AABEE 0%, #1a8bc9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 6px 24px rgba(42,171,238,0.4), 0 0 0 4px rgba(42,171,238,0.12);
}



.popup-icon-login svg {
    fill: none;
    stroke: white;
}



.popup-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}



.popup-text {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 22px;
}



.popup-btn {
    background: rgba(255, 255, 255, 0.08);
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 8px;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}



.popup-btn:active {
    background: rgba(255, 255, 255, 0.13);
    transform: scale(0.98);
}



.popup-btn:last-of-type {
    margin-bottom: 0;
}



.popup-btn-login {
    background: linear-gradient(135deg, #2AABEE 0%, #1a8bc9 100%);
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 8px;
    font-family: inherit;
    transition: transform 0.15s, opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 18px rgba(42,171,238,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}


.popup-btn-login::before {
    content: none;
}


.popup-btn-login::after {
    content: none;
}


.popup-btn-login:active {
    opacity: 0.9;
    transform: scale(0.98);
}



/* ── Auth Bottom Sheet ── */

.popup-btn-primary {
    background: #2382ff;
    margin-bottom: 8px;
}



.popup-btn-primary:active {
    background: #1a6de0;
}



.offer-input-group {
    margin-bottom: 24px;
}



.offer-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99em;
    padding: 16px 20px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}



.offer-input:focus {
    border-color: #007aff;
}



.offer-input::placeholder {
    color: #636366;
}



.offer-expiration-group {
    margin-bottom: 24px;
}



.offer-expiration-label {
    color: #8e8e93;
    font-size: 14px;
    margin-bottom: 8px;
}



.offer-toggles {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px;
    border-radius: 99em;
    gap: 4px;
    box-shadow: var(--glass-shadow);
}



.offer-toggle {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}



.offer-toggle.active {
    background: #ffffff;
    color: #000000;
    font-weight: 500;
}



#collectionDrawer {
    padding-bottom: calc(16px + var(--safe-area-bottom));
    max-height: 85vh;
    overflow-y: auto;
}



#collectionDrawer .drawer-actions,
#bundleDrawer .drawer-actions {
    margin-top: 8px;
    position: sticky;
    bottom: 0;
    background: #1c1c1e;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    gap: 8px;
}



#collectionDrawer .drawer-btn-secondary,
#collectionDrawer .drawer-btn-primary,
#bundleDrawer .drawer-btn-secondary,
#bundleDrawer .drawer-btn-primary {
    padding: 10px 14px;
    font-size: 14px;
    min-height: auto;
}



.cart-notification {
    position: fixed;
    right: 16px;
    bottom: calc(80px + var(--safe-area-bottom));
    z-index: 2000;
    background: #ffffff;
    border-radius: 99em;
    padding: 6px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 160px;
    transform: translateX(150%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s ease;
    pointer-events: none;
}



.cart-notification.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}



.cart-notification-content {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}



.cart-notification-icon {
    width: 14px;
    height: 14px;
    color: #1a1a1a;
    flex-shrink: 0;
}



.cart-notification-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}



.cart-notification-price {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
    white-space: nowrap;
}



.cart-notification-count {
    font-size: 10px;
    color: #636366;
    line-height: 1.2;
    white-space: nowrap;
}



.cart-header {
    padding: 24px 16px 16px;
    padding-top: calc(24px + var(--safe-area-top));
}



.cart-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}



.cart-count {
    font-size: 20px;
    color: #8e8e93;
    margin-left: 8px;
}



.cart-items-list {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 16px;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
}



#cartDrawer {
    padding-bottom: calc(16px + var(--safe-area-bottom));
}



#cartDrawer .drawer-actions {
    margin-top: 12px;
}



#cartDrawer .drawer-btn-primary {
    padding: 16px;
    font-size: 17px;
}



.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #2c2c2e;
    cursor: pointer;
}



.cart-item:last-child {
    border-bottom: none;
}



.cart-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}



.cart-item-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}



.cart-item-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}



.cart-item-right {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 12px;
}



.cart-item-price {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
}



.cart-item-remove {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 99em;
    box-shadow: var(--glass-shadow);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}



.cart-item-remove svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}



.cart-item-remove:active {
    background: rgba(255, 255, 255, 0.18);
}



.cart-empty {
    text-align: center;
    padding: 48px 16px;
    color: #8e8e93;
    font-size: 16px;
}



.cart-summary {
    padding: 0 16px;
    margin-bottom: 24px;
}



.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
}



.cart-summary-row:last-child {
    border-bottom: none;
}



.cart-summary-label {
    font-size: 15px;
    color: #8e8e93;
    display: flex;
    align-items: center;
}



.cart-summary-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}



.star-icon-small {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}



.cart-pay-amount {
    font-size: 17px;
    font-weight: 600;
}



/* ===== CASES VIEW ===== */

.cases-view {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(180deg, rgba(35, 130, 255, 0.22) 0%, rgba(35, 130, 255, 0.10) 220px, #141414 480px);
}



/* ── HEADER ───────────────────────── */

.cases-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: calc(20px + var(--safe-area-top, 0px));
    padding-bottom: 18px;
    position: relative;
    z-index: 1;
}



.cases-bg-particles {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}



@keyframes caseParticleTwinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.75); }
    50%       { opacity: 0.55; transform: scale(1.15); }
}



.p-1 { width: 10px; height: 10px; top:  8%; left: 10%; animation-delay: 0s; }


.p-2 { width:  7px; height:  7px; top: 12%; right: 12%; animation-delay: 0.7s; }


.p-3 { width: 11px; height: 11px; top: 55%; right:  7%; animation-delay: 1.4s; }


.p-4 { width:  8px; height:  8px; top: 60%; left:  6%; animation-delay: 1.0s; }


.p-5 { width:  5px; height:  5px; top: 20%; left: 46%; animation-delay: 1.8s; }


.p-6 { width:  9px; height:  9px; top: 72%; right: 22%; animation-delay: 2.3s; }


.p-7 { width: 10px; height: 10px; top: 30%; left:  3%; animation-delay: 0.4s; }


.p-8 { width:  6px; height:  6px; top:  5%; right: 26%; animation-delay: 2.0s; }



/* Icon ring with pulse */
.cases-icon-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(35, 130, 255, 0.1);
    border: 1.5px solid rgba(35, 130, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    animation: casesIconPulse 3s ease-in-out infinite;
    box-shadow: 0 0 24px rgba(35, 130, 255, 0.2), inset 0 0 16px rgba(35, 130, 255, 0.05);
}



@keyframes casesIconPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(35, 130, 255, 0.2), inset 0 0 16px rgba(35, 130, 255, 0.05); }
    50%       { box-shadow: 0 0 36px rgba(35, 130, 255, 0.38), inset 0 0 20px rgba(35, 130, 255, 0.1); }
}



.cases-icon-container {
    color: #2382ff;
    display: flex;
    align-items: center;
    justify-content: center;
}



.cases-title {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 5px 0;
    text-align: center;
    letter-spacing: -0.3px;
}



.cases-subtitle {
    font-size: 13px;
    color: #8e8e93;
    text-align: center;
    line-height: 1.4;
    margin: 0;
}



/* ── STATS STRIP ───────────────────── */

.cases-stats-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 12px 0;
}



.cases-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}



.cases-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}



.cases-stat-label {
    font-size: 11px;
    font-weight: 400;
    color: #8e8e93;
    line-height: 1;
}



.cases-stat-sep {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}



/* ── CONTENT AREA ─────────────────── */

.cases-content-area {
    padding: 0 16px;
    flex: 1;
    padding-bottom: 8px;
}



/* ── SECTION LABELS & DIVIDERS ─────── */

.cases-section {
    margin-bottom: 20px;
}



.cases-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}



.cases-section-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}



.dot-green { background: #3de48f; box-shadow: 0 0 6px rgba(61, 228, 143, 0.6); }


.dot-blue  { background: #2382ff; box-shadow: 0 0 6px rgba(35, 130, 255, 0.6); }



.cases-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(35, 130, 255, 0.3) 0%, rgba(35, 130, 255, 0.03) 100%);
    margin-bottom: 14px;
}



/* ── CASES GRID ───────────────────── */

.cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}



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



.step-indicator {
    display: none !important;
}



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



.step-dot.active {
    background: #2d7bff;
    transform: scale(1.2);
}



.progress-bar {
    display: none !important;
    overflow: hidden;
}



.progress-fill {
    height: 100%;
    background: #2d7bff;
    transition: width 0.4s ease;
    width: 33.33%;
}



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



.show-code-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 16px;
    background: #8774e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 52px;
    margin-top: 12px;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}



.show-code-link.hidden {
    display: none !important;
}



.show-code-link i {
    font-size: 18px;
    color: #ffffff;
}



.show-code-link:active {
    background: #6d5bc7;
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
    opacity: 0.9;
}



.password-input-container {
    width: 100%;
    margin-bottom: 8px;
    position: relative;
}



.password-hint {
    display: none;
    color: #888;
    font-size: 0.9rem;
    margin: 0.5rem 0 1rem 0;
    text-align: center;
}



.password-input {
    width: 100%;
    padding: 14px 50px 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    caret-color: transparent;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
}



.password-input::placeholder {
    color: rgba(156, 163, 175, 0.5);
}



.password-input:focus {
    border: 1px solid #2307d1 !important;
    outline: none;
}



.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}



.password-toggle i {
    font-size: 20px;
}



.password-toggle.active {
    color: #2d7bff;
}



.password-toggle:active {
    opacity: 0.7;
}



.liquid-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 100%;
}



.loading-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin: 24px 0;
    width: 100%;
}



.loader-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 24px;
}



.liquid-fill {
    height: 100%;
    background: #2d7bff;
    animation: liquidFlow 2s ease-in-out infinite;
    will-change: width;
    backface-visibility: hidden;
    transform: translateZ(0);
}



@keyframes liquidFlow {
    0%, 100% {
        width: 0%;
    }
    50% {
        width: 100%;
    }
}



.success-content {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    animation: authFadeIn 0.4s ease;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding-top: calc(50vh - 100px);
}



.success-content.show {
    display: flex;
}



.success-animation-container {
    width: 160px;
    height: 160px;
    margin: 0 0 24px 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    box-sizing: border-box;
}



.success-text {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
    opacity: 0.9;
    animation: authFadeIn 0.5s ease 0.2s backwards;
}



.success-icon-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(45, 55, 72, 0.7);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 2px 3px 0px -1px rgba(255, 255, 255, 0.2),
        inset -2px -2px 0px -1px rgba(255, 255, 255, 0.12),
        0 8px 32px rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    animation: successPulse 2s ease-in-out infinite;
}



.success-icon-wrapper::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: rgba(45, 123, 255, 0.15);
    box-shadow: 
        inset 0 0 0 1px rgba(45, 123, 255, 0.2),
        0 0 20px rgba(45, 123, 255, 0.3);
    opacity: 0;
    animation: successRipple 2s ease-in-out infinite;
    z-index: -1;
}



@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(45, 123, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(45, 123, 255, 0);
    }
}



@keyframes successRipple {
    0% {
        opacity: 1;
        transform: scale(0.8);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}



.success-icon {
    font-size: 56px;
    color: #2d7bff;
    background: linear-gradient(135deg, #2d7bff, #5b9dff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: successSparkle 2s ease-in-out infinite;
}



@keyframes successSparkle {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}



.success-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
}



.notifications-container {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    align-items: center;
}



.notification {
    background: rgba(45, 45, 48, 0.85);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 1.5px 2px 0px -1px rgba(255, 255, 255, 0.2),
        inset -1.5px -1.5px 0px -1px rgba(255, 255, 255, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    align-items: center;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: notificationSlideInTop 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}



.notification.success {
    background: rgba(40, 55, 45, 0.85);
    box-shadow: 
        inset 0 0 0 1px rgba(46, 213, 115, 0.15),
        inset 1.5px 2px 0px -1px rgba(255, 255, 255, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.5);
}



.notification.error {
    background: rgba(60, 40, 42, 0.85);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 71, 87, 0.15),
        inset 1.5px 2px 0px -1px rgba(255, 255, 255, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.5);
}



.notification-content {
    flex: 1;
    min-width: 0;
}



.notification-message {
    font-size: 15px;
    line-height: 1.4;
    color: #ffffff;
    word-wrap: break-word;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-align: center;
}



.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}



.notification-progress-bar {
    height: 100%;
    background: currentColor;
    width: 100%;
    transform-origin: left;
    animation: notificationProgress linear;
}



.notification.success .notification-progress-bar {
    background: #2ed573;
}



.notification.error .notification-progress-bar {
    background: #ff4757;
}



@keyframes notificationSlideInTop {
    from {
        transform: translateY(-100%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}



@keyframes notificationSlideOutTop {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-100%) scale(0.95);
        opacity: 0;
    }
}



@keyframes notificationProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}



.notification.slide-out {
    animation: notificationSlideOutTop 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}



.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}



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



.purchase-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    padding-left: calc(16px + var(--safe-area-left));
    padding-right: calc(16px + var(--safe-area-right));
    margin-top: 8px;
    padding-bottom: 20px;
}



.purchase-history-item {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
}



.purchase-history-item:active {
    transform: scale(0.98);
    background: #222222;
}



.purchase-history-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    position: relative;
}



.purchase-history-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}



.purchase-history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}



.purchase-history-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



.purchase-history-id {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.2;
}



.purchase-history-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}



.purchase-history-date {
    font-size: 11px;
    color: #6b7280;
}



.purchase-history-price {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}



.purchase-history-price-value {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #2382ff;
    border-radius: 8px;
    padding: 6px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}



.purchase-history-price-value .ton-icon-small {
    width: 14px;
    height: 14px;
    color: currentColor;
    flex-shrink: 0;
}



/* ═══════════════════ NEW PAGE LOADER ═══════════════════ */
.page-loader {
    position: fixed;
    inset: 0;
    background: #0e0e12;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
}



.page-loader.hidden {
    display: none;
    opacity: 0;
    visibility: hidden;
}



/* Основная сцена */
.loader-scene {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Фоновый градиентный глоу */
.loader-bg-glow {
    position: absolute;
    inset: -60px;
    background: radial-gradient(ellipse at center,
        rgba(99, 60, 220, 0.25) 0%,
        rgba(59, 130, 246, 0.12) 40%,
        transparent 70%);
    animation: glow-pulse 2.4s ease-in-out infinite;
    pointer-events: none;
}



@keyframes glow-pulse {
    0%, 100% { transform: scale(1);   opacity: 0.7; }
    50%       { transform: scale(1.2); opacity: 1;   }
}



/* Внешнее вращающееся кольцо */
.loader-ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: ring-spin 2s linear infinite;
}


.loader-ring-reverse {
    animation: ring-spin-rev 3s linear infinite;
}



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


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



.loader-ring-track {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 2;
}


.loader-ring-arc {
    fill: none;
    stroke: url(#ring-grad);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 120 207;
    stroke-dashoffset: 0;
}


.loader-ring-arc2 {
    fill: none;
    stroke: rgba(167, 139, 250, 0.35);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 60 164;
}



/* SVG gradient для кольца (объявляется в loader-ring-svg через defs) */
.loader-ring-svg defs { display: block; }



/* Центральная иконка */
.loader-icon-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: icon-breathe 2.4s ease-in-out infinite;
}


.loader-icon-svg {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 0 16px rgba(99,60,220,0.7)) drop-shadow(0 0 32px rgba(59,130,246,0.4));
}



@keyframes icon-breathe {
    0%, 100% { transform: scale(1)    rotate(0deg);   }
    33%       { transform: scale(1.07) rotate(4deg);   }
    66%       { transform: scale(1.04) rotate(-3deg);  }
}



/* Частицы-искры (6 штук по кругу) */
.loader-particles {
    position: absolute;
    inset: 0;
    animation: ring-spin 4s linear infinite;
}


.lp {
    position: absolute;
    border-radius: 50%;
    background: #a78bfa;
    animation: lp-flicker 1.6s ease-in-out infinite;
}


.lp1 { width:5px; height:5px; top:2px;  left:50%; margin-left:-2px; animation-delay:0s;    }


.lp2 { width:4px; height:4px; top:18px; right:8px;                   animation-delay:0.27s; background:#60a5fa; }


.lp3 { width:3px; height:3px; bottom:10px; right:4px;                animation-delay:0.54s; background:#818cf8; }


.lp4 { width:5px; height:5px; bottom:0;  left:50%; margin-left:-2px; animation-delay:0.8s;  }


.lp5 { width:4px; height:4px; bottom:18px; left:8px;                 animation-delay:1.07s; background:#60a5fa; }


.lp6 { width:3px; height:3px; top:10px; left:4px;                    animation-delay:1.33s; background:#c4b5fd; }



@keyframes lp-flicker {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50%       { opacity: 1;   transform: scale(1.4); }
}



/* Текст + анимированные точки */
.loader-label {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.04em;
    animation: label-fade 0.6s ease both;
}


@keyframes label-fade { from { opacity:0; transform: translateX(-50%) translateY(6px); } }



.loader-dots-anim span {
    display: inline-block;
    animation: dot-bounce 1.2s ease-in-out infinite;
}


.loader-dots-anim span:nth-child(2) { animation-delay: 0.2s; }


.loader-dots-anim span:nth-child(3) { animation-delay: 0.4s; }


@keyframes dot-bounce {
    0%, 80%, 100% { opacity: 0.3; transform: translateY(0);    }
    40%            { opacity: 1;   transform: translateY(-3px); }
}



.snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}



.welcome-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2100;
}



.welcome-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}



.welcome-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50vh;
    max-height: 50vh;
    min-height: 50vh;
    background: #1c1c1e;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 2101;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}



.welcome-drawer.open {
    transform: translateY(0);
}



.welcome-drawer-banner {
    width: 100%;
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}



.welcome-drawer-handle {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    z-index: 5;
}



.welcome-drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}



.welcome-drawer-close:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.6);
}



.welcome-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0a0f;
    overflow: hidden;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}



.welcome-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}



.welcome-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}



.welcome-banner-icon-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
}



.welcome-banner-icon-wrapper .welcome-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
}



.welcome-banner-icon-wrapper .ring {
    position: absolute;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ringPulse 3s ease-out infinite;
}



.welcome-banner-icon-wrapper .ring.r1 {
    width: 120px;
    height: 120px;
    animation-delay: 0s;
}



.welcome-banner-icon-wrapper .ring.r2 {
    width: 180px;
    height: 180px;
    animation-delay: 0.5s;
}



.welcome-banner-icon-wrapper .ring.r3 {
    width: 240px;
    height: 240px;
    animation-delay: 1s;
}



@keyframes ringPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}



.welcome-banner-icon {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}



.welcome-lottie-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}



.welcome-lottie-container svg {
    width: 100% !important;
    height: 100% !important;
}



@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}



.welcome-banner-icon i {
    font-size: 36px;
    color: #ffffff;
}



.welcome-banner-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}



.welcome-drawer-content {
    padding: 20px 20px;
    padding-bottom: calc(20px + var(--safe-area-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}



.welcome-content-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #2d7bff 0%, #5b9dff 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px rgba(45, 123, 255, 0.3);
    -webkit-tap-highlight-color: transparent;
}



.welcome-content-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 16px rgba(45, 123, 255, 0.25);
}



.welcome-content-btn i {
    font-size: 18px;
}



/* Локальный «снег» из звёзд (snow.js) */
.market-snow-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}



.market-snow-star {
    position: absolute;
    top: -5%;
    color: rgba(251, 191, 36, 0.85);
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
    animation-name: marketSnowFall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}



.market-snow-star::before {
    content: '✦';
}



@keyframes marketSnowFall {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    100% {
        transform: translate3d(20px, 120vh, 0) rotate(200deg);
    }
}



@keyframes promoShake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}



@keyframes promoErrorIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}



@keyframes cdBtnShimmer {
    0%   { left: -100%; }
    60%  { left: 150%; }
    100% { left: 150%; }
}



@keyframes cdWinGlowPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50%       { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}



@keyframes cdLabelShimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}



@keyframes cdWinBounce {
    0%   { transform: scale(0.2) rotate(-10deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg);     opacity: 1; }
}



/* ── UI/UX Improvements ────────────────────────────────────── */


/* Skeleton loading cards */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}



.skeleton-card {
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}



.skeleton-card .skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 18px;
    background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}



.skeleton-card .skeleton-text {
    height: 14px;
    border-radius: 7px;
    margin-top: 10px;
    width: 70%;
    background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    animation-delay: 0.1s;
}



.skeleton-card .skeleton-price {
    height: 32px;
    border-radius: 10px;
    margin-top: 8px;
    width: 100%;
    background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}



/* Ripple effect for buttons */
.ripple-effect {
    position: relative;
    overflow: hidden;
}



.ripple-effect .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0);
    animation: rippleExpand 0.5s ease-out forwards;
    pointer-events: none;
}



@keyframes rippleExpand {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}




/* Nav badge bounce */
@keyframes badgeBounce {
    0% { transform: translate(-50%, -25%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -25%) scale(1.2); }
    100% { transform: translate(-50%, -25%) scale(1); opacity: 1; }
}



.nav-badge.bounce {
    animation: badgeBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}



/* Cart count update pulse */
@keyframes countPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}



.balance-card.pulse {
    animation: countPulse 0.3s ease;
}



@keyframes cartRingPulse {
    0% { opacity: 0.55; transform: scale(0.4); }
    100% { opacity: 0; transform: scale(1.7); }
}



/* ── Универсальный спиннер загрузки изображений ────────────── */
@keyframes imgSpin {
    to { transform: rotate(360deg); }
}



.img-loading-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}



.img-loading-spinner {
    box-sizing: border-box;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.18);
    border-top-color: rgba(255, 255, 255, 0.75);
    animation: imgSpin 0.7s linear infinite;
    transform-origin: center center;
    flex-shrink: 0;
}






/* ── Nav icon active glow ─────────────────────────────────── */
.nav-btn.active .nav-icon {
    filter: drop-shadow(0 0 6px rgba(35, 130, 255, 0.4));
    transition: filter 0.25s ease, scale 0.16s, color 0.16s;
}



/* ── Balance card tap feedback ────────────────────────────── */
.balance-card:active {
    transform: scale(0.95);
}


/* ── Scroll-hide navbar ── */
.bottom-bar {
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}


.bottom-bar.nav-hidden {
    transform: translateY(calc(100% + 20px));
}



/* Scroll-to-top button */
/* ══ Scroll-top button ══ */
.scroll-top-btn {
    position: fixed;
    bottom: calc(var(--safe-area-bottom, 0px) + 6px);
    left: 10px;
    width: 56px;
    height: 56px;
    border-radius: 99em;
    background-color: rgba(0, 0, 0, 0.12);
    border: 1.5px solid rgba(255,255,255,0.12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: var(--glass-shadow);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}


.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}


.scroll-top-btn svg {
    width: 22px;
    height: 22px;
}



/* ══ Cart notification ══ */
.cart-notification {
    padding: 10px 16px;
    max-width: 200px;
    gap: 10px;
    transition: transform 0.3s cubic-bezier(0.19,1,0.22,1), opacity 0.3s ease, bottom 0.35s cubic-bezier(0.32,0.72,0,1) !important;
}


.cart-notification-icon {
    width: 20px;
    height: 20px;
}


.cart-notification-price {
    font-size: 15px;
    font-weight: 700;
}


.cart-notification-count {
    font-size: 12px;
}


/* When nav is hidden — drop cart to same bottom as scroll-top btn */
.nav-hidden-state .cart-notification {
    bottom: calc(var(--safe-area-bottom, 0px) + 6px) !important;
}


.tab-indicator {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    border-radius: 99em;
    background-color: rgba(0,0,0,0.35);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        inset 1px 1px 0 0 rgba(255,255,255,0.15),
        inset -1px -1px 0 0 rgba(255,255,255,0.1),
        0 2px 4px rgba(0,0,0,0.15);
    pointer-events: none;
    transition: left 0.28s cubic-bezier(0.34,1.2,0.64,1), width 0.28s cubic-bezier(0.34,1.2,0.64,1);
    z-index: 0;
    will-change: left, width;
}






/* ── Cases — синий фон через body ── */
body.view-cases-active {
    background: #0d1a2e !important;
}


body.view-cases-active #app {
    background: transparent;
}


.cases-view {
    background: transparent !important;
    min-height: 100vh;
}



/* ── Cases nav icon size ── */
.nav-btn .fa-box {
    font-size: 25px;
}



/* ── Add Gift Drawer ── */
#addGiftDrawer {
    padding: 0 16px calc(32px + var(--safe-area-bottom, 0px));
    max-height: calc(100vh - 40px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #1c1c1e;
    border-radius: 20px 20px 0 0;
}



/* ── Make handle visible and sticky on add gift drawer ── */
#addGiftDrawer .drawer-handle {
    display: block;
    margin: 0;
    flex-shrink: 0;
}


#addGiftDrawer .drawer-handle-wrap {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 10px 0;
    display: flex;
    justify-content: center;
}



/* ── Add gift drawer: squircle top corners + glass outline like product card ── */
#addGiftDrawer {
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    box-shadow: var(--card-glass-shadow);
}


@supports (corner-shape: squircle) {
    #addGiftDrawer {
        corner-shape: squircle;
        border-top-left-radius: 60px;
        border-top-right-radius: 60px;
    }
}



/* ── Pull handle closer to the squircle top edge ── */
.drawer-handle {
    margin-top: -4px;
}
