:root {
    --accent-blue: #0088cc;
    --accent-blue-hover: #1c93e1;
    --bg-dark: #000000;
    --card-bg-black: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: #8b9bb4;
    --card-border: rgba(255, 255, 255, 0.1);
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px;
    touch-action: pan-x pan-y;
    overflow-x: hidden;
    user-select: none;
    overscroll-behavior: none;
}

/* --- TON ICON & AMOUNT (Fragment Style) --- */
.tm-amount {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    letter-spacing: 0.3px;
    vertical-align: baseline;
}

.tm-amount-container {
    vertical-align: middle;
}

.icon-ton::after {
    content: "";
    display: inline-block;
    width: 1.6em;
    height: 1.6em;
    margin-left: 6px;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.1839 17.7069C13.6405 18.6507 13.3688 19.1226 13.0591 19.348C12.4278 19.8074 11.5723 19.8074 10.941 19.348C10.6312 19.1226 10.3595 18.6507 9.81613 17.7069L5.52066 10.2464C4.76864 8.94024 4.39263 8.28717 4.33762 7.75894C4.2255 6.68236 4.81894 5.65591 5.80788 5.21589C6.29309 5 7.04667 5 8.55383 5H15.4462C16.9534 5 17.7069 5 18.1922 5.21589C19.1811 5.65591 19.7745 6.68236 19.6624 7.75894C19.6074 8.28717 19.2314 8.94024 18.4794 10.2464L14.1839 17.7069ZM11.1 16.3412L6.56139 8.48002C6.31995 8.06185 6.19924 7.85276 6.18146 7.68365C6.14523 7.33896 6.33507 7.01015 6.65169 6.86919C6.80703 6.80002 7.04847 6.80002 7.53133 6.80002H7.53134L11.1 6.80002V16.3412ZM12.9 16.3412L17.4387 8.48002C17.6801 8.06185 17.8008 7.85276 17.8186 7.68365C17.8548 7.33896 17.665 7.01015 17.3484 6.86919C17.193 6.80002 16.9516 6.80002 16.4687 6.80002H12.9V16.3412Z' fill='%230098EA'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* Balance Number Box */
.balance-value-box {
    background: #2c2c2e;
    /* Dark rounded square */
    border-radius: 8px;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
    min-width: 1.5em;
}

.icon-ton.large::after {
    width: 1.1em;
    height: 1.1em;
    margin-left: 8px;
}

.icon-ton.header-icon::after {
    width: 1.1em;
    height: 1.1em;
}

.icon-after::after {
    margin-right: 0;
}

/* --- HEADER --- */
.header-column {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 19, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Blue Scrollbar for long names --- */
.blue-scroll-x {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    max-width: 90%;
    scrollbar-width: thin;
    scrollbar-color: #0098EA transparent;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.blue-scroll-x::-webkit-scrollbar {
    height: 3px;
}

.blue-scroll-x::-webkit-scrollbar-track {
    background: transparent;
}

.blue-scroll-x::-webkit-scrollbar-thumb {
    background: #0098EA;
    border-radius: 10px;
}

.search-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-wrapper {
    position: relative;
    flex: 1;
}

.search-wrapper input {
    background: #1c1c1e;
    border: none;
    border-radius: 12px;
    color: #fff;
    height: 48px;
    padding-left: 52px !important;
    /* Left-aligned text starts after icon */
    padding-right: 16px;
    font-size: 16px;
    width: 100%;
    outline: none;
    transition: background 0.2s;
    text-align: left;
    /* Explicitly left-aligned */
}

.search-wrapper input:focus {
    background: #2c2c2e;
}

.header-cart-btn {
    background: #1c1c1e;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.chips-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 16px 20px 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    margin: 0 -16px;
    width: 100vw;
}

.chip-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chip-btn.active {
    background: linear-gradient(135deg, #0088cc 0%, #005588 100%);
    border-color: #00aaff;
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.chip-btn.icon-only {
    padding: 0;
    width: 48px;
    height: 48px;
    justify-content: center;
    flex-shrink: 0;
}

/* --- GRID & CARDS --- */
.container {
    padding: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    justify-items: center;
}

.card {
    background: #111113;
    /* Deep solid background to avoid 'boxy' layers */
    border: 3px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    width: 100%;
    max-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(0, 152, 234, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 152, 234, 0.1);
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 152, 234, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s;
}

.card:hover .card-glow {
    opacity: 1;
}

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

.card-image-wrapper {
    background: #2c2c2e;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1;
    margin: 0;
    box-shadow: none;
}

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

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

/* PAYMENT MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    /* Changed from display:flex to none */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.active {
    display: flex;
    /* Activate flex when visible */
    opacity: 1;
}

/* LOADING SCREEN */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.premium-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader,
.error-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.card-days-badge,
.sweep-btn {
    display: none !important;
}

.card-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.card-title {
    padding: 16px 14px 12px;
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.5px;
    background: rgba(0, 0, 0, 0.25);
    /* Deeper gray/black contrast */
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Deprecated old blocks removed */

.period-badge-card {
    background: #151517;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--accent-blue);
    height: 44px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.card-price-btn:active,
.period-badge-card:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.card:hover {
    transform: none;
}

.pricing-value {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

/* Days Badge - BOTTOM LEFT corner */
.card-days-badge-bottom {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 800;
    z-index: 5;
    border-radius: 6px;
    letter-spacing: 0.2px;
}

/* Deprecated - top position */
.card-days-badge-top {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    z-index: 5;
    border-radius: 6px;
}

/* Deprecated - keeping for compatibility */
.card-days-badge-new {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    z-index: 5;
    text-align: left;
}

/* Language Switcher */
.lang-row {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding: 0 16px;
}

.lang-btn {
    flex: 1;
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Hide header buttons in modal as requested */
.modal-header-actions {
    display: none !important;
}

/* NEW: Dual Pricing Layout */
.card-pricing-row {
    display: flex;
    justify-content: space-between;
    gap: 2px;
    width: 100%;
}

.pricing-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

/* Pricing Badge - squared container */
.pricing-badge {
    background: rgba(28, 28, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    width: 100%;
}

.pricing-label {
    font-size: 12px;
    color: #8E8E93 !important;
    font-weight: 500;
    margin-bottom: 1px;
    display: block;
}

.pricing-value {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 2px;
    letter-spacing: -0.4px;
}

/* Consolidated symmetric rules below */

.pricing-glass {
    background: transparent;
    padding: 14px 0;
    margin: 0;
    /* Centered by removing side margins */
    display: flex;
    align-items: stretch;
    /* Ensure divider spans full height if needed */
    justify-content: center;
    width: 100%;
}

.pricing-col:first-child {
    flex: 0.8;
    /* Pushing the divider significantly more to the left */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pricing-col:last-child {
    flex: 1.2;
    /* Giving more space to the right side */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.pricing-label {
    text-transform: uppercase;
    font-size: 8px;
    letter-spacing: 0.8px;
    font-weight: 800;
    color: #8E8E93 !important;
    margin-bottom: 4px;
}

.pricing-value {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    letter-spacing: -0.2px;
}

.pricing-col:last-child .pricing-value {
    font-size: 15px;
    font-weight: 800;
    opacity: 1;
}



/* Deprecated - keeping for compatibility */
.card-pricing-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}

.pricing-label-small {
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.pricing-value-small {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* NEW: Number Badge */
.card-number-badge {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: #0088cc;
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}

.telegram-center-icon {
    width: 60px;
    height: 60px;
    opacity: 0.8;
}

/* --- BOTTOM NAV --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(28, 28, 30, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px 20px 0 0;
    padding-bottom: var(--safe-area-bottom);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Changed from flex-end to center to lift elements */
    z-index: 999;
    height: calc(125px + var(--safe-area-bottom));
    transition: height 0.3s ease;
}

.mrkt-footer {
    padding: 24px;
    display: flex;
    gap: 12px;
    background: rgba(28, 28, 30, 0.5);
    backdrop-filter: blur(10px);
}

.bottom-nav.profile-mode {
    height: calc(75px + var(--safe-area-bottom));
}

.bottom-nav.friends-mode {
    height: calc(80px + var(--safe-area-bottom));
}

.bottom-nav.profile-mode .nav-items-row {
    padding-bottom: 8px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    /* Reduced gap between icon and text */
    color: #8b9bb4;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    width: auto;
    flex: 1;
    transition: all 0.2s;
    opacity: 0.7;
}

.nav-items-row {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding-bottom: 5px;
}

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

.nav-item.active {
    color: var(--accent-blue);
    opacity: 1;
    transform: translateY(-2px);
}

/* --- PLACEHOLDERS FOR NEW TYPES --- */
.card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
}

.card-placeholder svg {
    width: 50%;
    height: 50%;
    opacity: 0.5;
}

.type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    z-index: 5;
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    display: block;
    opacity: 1;
    z-index: 2500;
}

.filter-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f0f12;
    border-radius: 28px 28px 0 0;
    z-index: 3000;
    padding: 0;
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
    transform: translateY(110%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-panel.active {
    transform: translateY(0);
}

.product-view-header {
    background: rgba(15, 21, 28, 0.98) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1001;
}

.notify-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    color: #8b9bb4;
    transition: all 0.3s ease;
}

.notify-btn.active {
    color: var(--accent-blue);
}

.mrkt-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mrkt-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.filter-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 60px;
    -webkit-overflow-scrolling: touch;
}

/* Premium Scrollbar */
.filter-content::-webkit-scrollbar {
    width: 4px;
}

.filter-content::-webkit-scrollbar-track {
    background: transparent;
}

.filter-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.filter-section-title {
    padding: 24px 24px 12px 24px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input-row {
    padding: 0 24px 20px 24px;
    display: flex;
    gap: 12px;
}

.filter-input-wrapper {
    flex: 1;
    background: #1c1c1e;
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-input-wrapper input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    width: 100%;
    outline: none;
}

.filter-accordion {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.filter-accordion.active {
    background: rgba(255, 255, 255, 0.02);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background: #09090b;
}

.accordion-content.active {
    max-height: 250px;
    padding-bottom: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}







/* MODALS */
.mrkt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mrkt-modal-title {
    font-size: 24px;
    font-weight: 900;
    margin: 0;
    font-family: 'Outfit', sans-serif;
}

.mrkt-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.mrkt-modal-close:hover {
    opacity: 1;
}

/* FRIENDS TAB */
.friends-balance-card {
    background: linear-gradient(135deg, #0098EA 0%, #0077CC 100%);
    padding: 24px;
    border-radius: 20px;
    text-align: center;
    margin: 16px;
    box-shadow: 0 8px 16px rgba(0, 136, 204, 0.3);
}

.withdraw-btn-white {
    margin-top: 20px;
    background: #fff;
    color: #0088cc;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    width: 100%;
    cursor: pointer;
}

/* TIMERS */
.catalog-timer-container {
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 16px;
    margin: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.timer-block {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 18px;
    font-family: 'Outfit', sans-serif;
}

.timer-sep {
    font-weight: 700;
    opacity: 0.5;
}

.card-mini-timer {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-item-letter {
    color: #8b9bb4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.filter-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.filter-item-name {
    color: white;
    font-weight: 600;
    font-size: 15px;
    white-space: normal;
    /* Allow wrapping if needed, but we try to fit */
    word-break: break-word;
}

.search-wrapper {
    position: relative;
    flex: 1;
    /* Expand to fill space */
    min-width: 0;
    /* Allow shrinking */
}

.header-unified-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    height: 38px;
    /* Slightly shorter */
    display: flex;
    align-items: center;
    padding: 0 4px 0 10px;
    /* Reduced padding */
    gap: 6px;
    /* Reduced gap */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

/* Header Wallet Button */
.header-wallet-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b9bb4;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.header-wallet-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.header-ab-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    /* Push to right */
}

.header-ab-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

/* Deprecated header balance removed */
.header-ab-balance {
    display: none;
}

.selection-dot {
    width: 10px;
    height: 10px;
    background: #0088cc;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 136, 204, 0.6);
    flex-shrink: 0;
}

.octo-footer {
    padding: 20px 24px 34px 24px;
    display: flex;
    gap: 12px;
    background: #0f0f12;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-gray,
.btn-yellow {
    border: none;
    border-radius: 16px;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-gray:active,
.btn-yellow:active {
    transform: scale(0.96);
}

.btn-gray {
    background: #232328;
    color: #fff;
    flex: 1;
}

.btn-yellow {
    background: var(--accent-blue);
    color: #fff;
    flex: 2;
}

/* CARDS */
.card {
    background: #151518;
    border: 3px solid rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.1s;
}

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

.loader,
.error-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* --- FULL SCREEN PRODUCT VIEW --- */
.product-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0e1218;
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow-y: auto !important;
    /* Allow scroll if content overflows */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 120px;
    /* Space for bottom nav or general breathing room */
}

.product-view.active {
    display: flex;
}

.product-view-header {
    position: sticky;
    top: 0;
    background: #0e1218;
    z-index: 10;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.product-main-media {
    width: calc(100% - 32px);
    aspect-ratio: 1;
    margin: 16px auto;
    padding: 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-main-media img {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.product-info-section {
    padding: 0 20px 20px 20px;
}

.product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.product-title-row h1 {
    font-size: 24px;
    font-weight: 800;
}

.product-collection-link {
    color: var(--accent-blue);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.badge-row {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.market-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.badge-rent {
    background: rgba(0, 136, 204, 0.15);
    color: #0088cc;
}

.badge-app {
    background: rgba(139, 155, 180, 0.1);
    color: #8b9bb4;
}

.pricing-card {
    background: #1c222b;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.pricing-label {
    font-size: 13px;
    color: #8b9bb4;
    font-weight: 600;
    margin-bottom: 8px;
}

.pricing-value {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.auto-relist-note {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #8b9bb4;
    line-height: 1.4;
}

.duration-stepper-row {
    background: #1c222b;
    border-radius: 16px;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 4px;
    margin-bottom: 20px;
}

.stepper-btn {
    width: 60px;
    height: 100%;
    background: transparent;
    border: none;
    color: #8b9bb4;
    font-size: 24px;
    cursor: pointer;
}

.stepper-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
}

.main-rent-btn {
    width: 100%;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 16px;
    height: 56px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
}

.fee-info-card {
    background: rgba(0, 136, 204, 0.05);
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    color: #8b9bb4;
    line-height: 1.5;
    margin-bottom: 30px;
}

.details-section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 15px;
}

.detail-label {
    color: #8b9bb4;
    font-weight: 600;
}

.detail-value {
    color: #fff;
    font-weight: 700;
}

.detail-value.link {
    color: var(--accent-blue);
}

.properties-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.tab-item {
    padding-bottom: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 2px solid var(--accent-blue);
}

.property-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 1px;
}

.property-item:first-child {
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.property-item:last-child {
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    border-bottom: none;
}

.prop-left {
    display: flex;
    flex-direction: column;
}

.prop-name {
    font-size: 13px;
    color: #8794a1;
    /* More muted gray like original */
    font-weight: 600;
}

.prop-right {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
}

.prop-value-text {
    font-size: 14px;
    color: var(--accent-blue);
    font-weight: 600;
}

.prop-percent-text {
    font-size: 12px;
    color: #8794a1;
}

.prop-floor-text {
    font-size: 13px;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Stepper refinement */
.rent-period-stepper button {
    cursor: pointer;
}

.rent-period-stepper button:active {
    opacity: 0.5;
}

.product-desc-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.desc-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 10px;
}

.desc-text {
    font-size: 14px;
    color: #8b9bb4;
    line-height: 1.6;
}

/* White TON icon override for Blue Button */
.main-rent-btn .icon-ton::after {
    filter: brightness(0) invert(1);
    -webkit-filter: brightness(0) invert(1);
}


/* Rounded Lottie animation corners */
#view-lottie {
    border-radius: 24px;
    overflow: hidden;
}


/* White TON icon override for Blue Button (Backup) */
.main-rent-btn .icon-ton::after,
.main-rent-btn svg path {
    fill: #FFFFFF !important;
    filter: brightness(0) invert(1);
    -webkit-filter: brightness(0) invert(1);
}

.filter-search-input {
    width: 100%;
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    margin-bottom: 5px;
}

/* Filter visual helpers restored */
.filter-img-standalone {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.filter-color-circle-legacy {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Header TonConnect Overrides */
.header-cart-btn {
    background: transparent !important;
    width: auto !important;
}

#ton-connect-btn {
    width: auto !important;
}

#ton-connect-btn button {
    background: #1c1c1e !important;
    border-radius: 20px !important;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    justify-content: center !important;
    min-height: 48px !important;
}

#ton-connect-btn svg {
    margin: 0 !important;
    width: 24px !important;
    height: 24px !important;
    transform: none !important;
}

#ton-connect-btn * {
    margin: 0;
}

/* Hide only the button content in TonConnect button for icon-only/invisible look */
#ton-connect-btn button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
}

#ton-connect-btn button>div {
    display: none !important;
    /* This hides the internal "Connect Wallet" text and icon */
}

/* Ensure the popover (menu) is actually visible if it's a sibling or handled by the library */
/* TonConnect usually appends modals to body, so this shouldn't affect them. 
   But if it's a dropdown, we need it to be visible. */
tc-root {
    z-index: 10001 !important;
}


/* New Blue Wallet Button */
.blue-wallet-display {
    background: #0088cc;
    color: #fff;
    border-radius: 16px;
    height: 54px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 18px;
    /* Slightly larger text */
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.2);
    transition: all 0.2s;
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.blue-wallet-display .icon-ton::after {
    width: 24px;
    /* Larger icon for wallet button */
    height: 24px;
    margin-left: 12px;
    filter: brightness(0) invert(1);
    /* Force white */
}

.blue-wallet-display:active {
    transform: scale(0.98);
}

#ton-connect-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 10;
}

#ton-connect-btn button {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    opacity: 1 !important;
    /* Keep opaque for children (popovers) */
}

#ton-connect-btn button div,
#ton-connect-btn button svg {
    /* Hide the actual button elements but allow children like modals to show */
    opacity: 0 !important;
}

#ton-connect-btn tc-root,
#ton-connect-btn tc-portal-root {
    opacity: 1 !important;
    visibility: visible !important;
}


#wallet-btn-container {
    position: relative;
    margin-bottom: 32px;
    width: 100%;
}

/* --- NEW PROFILE DESIGN --- */
.new-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 40px 0 0 0;
    /* Added top padding */
}

/* Square Sphere Balance Card - Container for Avatar, Balance and + */
.profile-balance-card {
    background: #1c1c1e;
    padding: 12px 14px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Space out items */
    gap: 10px;
    width: 100%;
    /* Stretch to container */
    max-width: 360px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Rented Card Animation */
@keyframes pulse-rented {
    0% {
        box-shadow: 0 0 5px rgba(0, 136, 204, 0.2), inset 0 0 5px rgba(0, 136, 204, 0.1);
        border-color: rgba(0, 136, 204, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(0, 136, 204, 0.4), inset 0 0 10px rgba(0, 136, 204, 0.2);
        border-color: rgba(0, 136, 204, 0.6);
    }

    100% {
        box-shadow: 0 0 5px rgba(0, 136, 204, 0.2), inset 0 0 5px rgba(0, 136, 204, 0.1);
        border-color: rgba(0, 136, 204, 0.3);
    }
}

.card.rented {
    border: 3px solid rgba(255, 255, 255, 0.03);
}

.card.rented:hover {
    animation: pulse-rented 3s infinite ease-in-out;
}

/* .card.rented::before removed via user request */

/* Blocky Countdown */
.countdown-container-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.countdown-label-v2 {
    color: #8b9bb4;
    font-size: 13px;
    font-weight: 600;
}

.countdown-blocks-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.countdown-block-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.countdown-box {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 34px;
    text-align: center;
    color: white;
    font-weight: 800;
    font-size: 14px;
}

.countdown-unit {
    color: #8b9bb4;
    font-size: 12px;
    font-weight: 600;
}

.countdown-sep {
    color: #3a3a3c;
    font-weight: 800;
}

/* Filter Visibility Logic */
body.hide-filters .chips-row {
    display: none !important;
}

body.hide-filters .header-column {
    padding-bottom: 20px;
    /* Увеличиваем высоту header без фильтров */
}

.profile-balance-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    /* Take central space */
}

.new-profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.new-profile-balance {
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

/* Enlarged icon inside card */
.icon-ton.large::before {
    width: 28px;
    height: 28px;
    margin-right: 4px;
}

/* Main Wallet Button (Blue) */
.blue-btn {
    background: #0088cc;
    border: none;
    border-radius: 14px;
    height: 56px;
    width: 100%;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    /* Extra bold */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.25);
}

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

.blue-btn .icon-ton {
    font-size: 26px;
    /* Larger icon */
    filter: brightness(0) invert(1);
    display: flex;
    align-items: center;
}

.btn-circle-add {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2c2c2e;
    /* Slightly lighter for contrast */
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-circle-add:active {
    transform: scale(0.9);
}

.profile-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 24px;
}

.action-btn {
    flex: 1;
    background: #1c1c1e;
    border-radius: 14px;
    /* Slightly smaller radius */
    height: 42px;
    /* Reduced from 56px */
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    transition: background 0.2s;
}

.action-btn svg {
    width: 20px;
    /* Smaller icons */
    height: 20px;
}

.action-btn:active {
    background: #2c2c2e;
}

.history-section {
    background: #1c1c1e;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    margin-bottom: 24px;
}

/* --- Profile Dashboard --- */
.profile-dashboard-card {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9) 0%, rgba(10, 10, 12, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 16px;
    /* Было 24px, уменьшаем */
    margin: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.profile-dashboard-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 136, 204, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.profile-main-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 2px;
    /* Adjusted as per user feedback */
}

.avatar-glow-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
}

.avatar-glow-wrapper::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #0088cc, #00ffcc);
    border-radius: 50%;
    z-index: 0;
    opacity: 0.3;
    filter: blur(8px);
}

.dashboard-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    object-fit: cover;
}

.profile-text-info h2 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
}

.profile-text-info p {
    font-size: 13px;
    color: #8b9bb4;
    font-weight: 500;
}

.dashboard-balance-section {
    text-align: center;
    margin-bottom: 24px;
}

.balance-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8b9bb4;
    margin-bottom: 8px;
    font-weight: 700;
}

.balance-main {
    font-size: 38px;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
}

.balance-main .icon-ton::before {
    width: 0.8em;
    height: 0.8em;
    filter: brightness(0) invert(1);
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.dash-action-btn {
    flex: 1;
    height: 48px;
    border-radius: 14px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.dash-action-btn.primary {
    background: #fff;
    color: #000;
}

.dash-action-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-action-btn:active {
    transform: scale(0.96);
}

.dash-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b9bb4;
    padding: 0 24px;
    margin-bottom: 12px;
    font-weight: 800;
}

.services-list {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin: 0 16px 32px;
    overflow: hidden;
}

.service-item {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.service-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.service-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.service-icon {
    width: 32px;
    height: 32px;
    background: rgba(0, 136, 204, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.service-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.service-arrow {
    color: #444;
    font-size: 20px;
}

/* Unified Header Badge (Profile Pill) */
.header-unified-badge {
    display: flex;
    align-items: center;
    background: #0088cc;
    /* Solid Brand Blue */
    border-radius: 100px;
    height: 42px;
    padding: 2px 2px 2px 16px;
    margin-left: auto;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.25);
}

.header-unified-badge:active {
    transform: scale(0.96);
    filter: brightness(0.9);
}

.header-pill-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 13.5px;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    margin-right: 12px;
    line-height: 1;
}

.header-pill-content .icon-ton {
    font-size: 20px;
    filter: brightness(0) invert(1);
    display: flex;
    align-items: center;
}

#header-wallet-address {
    max-width: 120px;
    overflow: hidden;
    white-space: nowrap;
}

.header-badge-avatar {
    width: 28px;
    /* Smaller avatar */
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Connect State Highlight (White icon) */
#header-connect-pill {
    color: #fff;
}

#header-connect-pill .icon-ton::before,
.header-unified-badge .icon-ton::before {
    filter: brightness(0) invert(1) !important;
}

/* --- UI FIXES & GLOW REMOVAL --- */
/* Main Wallet Button Icon Override */
.blue-btn .icon-ton {
    font-size: 32px !important;
    filter: brightness(0) invert(1) !important;
    display: flex;
    align-items: center;
    margin-right: 4px;
}

.blue-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
}

/* GLOW REMOVAL */
.card,
.card-glow,
.profile-dashboard-card,
.avatar-glow-wrapper,
.avatar-glow-wrapper::after,
.service-icon,
.drawer-item,
.dashboard-avatar,
.search-wrapper,
.header-unified-badge,
.card-price-btn,
.period-badge-card {
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
}

.profile-dashboard-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}



.bottom-sheet-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: rgba(28, 28, 30, 0.82);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px 32px 0 0;
    padding-bottom: var(--safe-area-bottom);
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 10001;
    overflow: hidden;
    max-height: 92vh;
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.6);
}

.bottom-sheet.active .bottom-sheet-content {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.bottom-sheet-dash {
    width: 34px;
    height: 5px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    margin: 4px auto 14px;
}

.bottom-sheet-list {
    padding: 0 16px 20px;
}

.drawer-item {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-item:active {
    background: #2c2c2e;
    transform: scale(0.98);
}

.drawer-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #8b9bb4;
}

.drawer-text {
    flex: 1;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.drawer-check {
    color: #0088cc;
    font-size: 20px;
    font-weight: 900;
    opacity: 0.9;
}

/* Card Visual Improvements */
.card-days-badge-bottom {
    display: block !important;
    position: absolute !important;
    bottom: 8px !important;
    left: 8px !important;
    width: auto !important;
    padding: 4px 8px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-align: left !important;
    border-radius: 6px !important;
    border-top: none !important;
    z-index: 5;
}

.card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-number-badge {
    position: relative;
    z-index: 3;
    background: #0088cc;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 900;
    margin: 0;
    /* Reset for flex centering */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.telegram-center-icon {
    width: 48px;
    height: 48px;
    opacity: 0.8;
}

/* Left Align Search Placeholder */
.search-bar::placeholder {
    text-align: left;
}

/* Horizontal Scroll for Titles */
.blue-scroll-x {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #0088cc transparent;
}

.blue-scroll-x::-webkit-scrollbar {
    height: 4px;
}

.blue-scroll-x::-webkit-scrollbar-track {
    background: transparent;
}

.blue-scroll-x::-webkit-scrollbar-thumb {
    background: #0088cc;
    border-radius: 10px;
}

/* Mode Toggle Button */
.mode-toggle-container {
    width: 94%;
    max-width: 440px;
    margin: 4px auto 8px;
    /* Reduced from 8px auto 12px for a tighter look */
}

.mode-toggle-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.mode-toggle-btn.rental {
    background: rgba(88, 101, 242, 0.3);
    border-color: rgba(88, 101, 242, 0.4);
    box-shadow: none;
}

/* Global Mode Loader */
.global-mode-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 21, 28, 0.8);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    animation: fadeIn 0.3s ease;
}

.loader-content {
    text-align: center;
}

.loader-content p {
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #8b9bb4;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- PREMIUM TIMER V5 --- */
.timer-blocks {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.timer-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
}

.countdown-market-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    margin: 0 0 16px 0 !important;
    box-sizing: border-box;
}

.timer-market-label {
    font-size: 11px;
    color: #8794a1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.timer-market-value {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    display: flex;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
}

.timer-box .t-num {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.timer-box .t-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    color: #8b9bb4;
    margin-top: 2px;
}

.timer-sep {
    color: #8b9bb4;
    font-weight: 900;
    font-size: 18px;
    opacity: 0.5;
}

.timer-date-end {
    color: #8b9bb4;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

/* --- BRANDED LOADER V5 --- */
#loading-screen {
    background: radial-gradient(circle at center, #1a222c 0%, #0f151c 100%) !important;
}

.premium-spinner {
    width: 60px;
    height: 60px;
    border-width: 4px;
    border-top-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 136, 204, 0.2);
}

#loading-screen .loader-logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #8b9bb4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-top: 24px;
    animation: pulseText 2s infinite ease-in-out;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- ADAPTIVITY FIXES (TV & Large Screens) --- */
@media (min-width: 1024px) {
    .container {
        max-width: 600px;
        margin: 0 auto;
    }

    .bottom-nav {
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 600px;
        border-radius: 20px 20px 0 0;
    }

    .header-column {
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 600px;
    }

    .product-view {
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 600px;
    }

}

/* Clickable Properties */
.clickable-prop {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-prop:active {
    background: rgba(255, 255, 255, 0.15) !important;
}

.clickable-prop .prop-right {
    position: relative;
    padding-right: 14px;
}

.clickable-prop .prop-right::after {
    content: '›';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #8b9bb4;
    font-weight: 400;
}


#profile-container {
    padding-bottom: 120px;
}

/* --- PREMIUM COUNTDOWN (V3) --- */
.countdown-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding: 24px;
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.8) 0%, rgba(20, 20, 25, 0.9) 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.countdown-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 136, 204, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.countdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.countdown-label-premium {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8b9bb4;
    font-weight: 800;
}

.countdown-grid {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    z-index: 2;
}

.countdown-digit-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    width: 64px;
    padding: 12px 0 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.countdown-digit-box:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 136, 204, 0.3);
}

.countdown-val {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
}

.countdown-unit {
    font-size: 10px;
    color: #8b9bb4;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.countdown-sep {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
    margin-top: 10px;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.expiry-badge {
    margin-top: 4px;
    font-size: 12px;
    color: #0088cc;
    font-weight: 700;
    background: rgba(0, 136, 204, 0.15);
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid rgba(0, 136, 204, 0.2);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Rented Status Indicators in View */
.status-pill {
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-pill.rented {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.status-pill.active {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-pill.pending {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

/* New Media Status Overlay */
.media-status-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 20;
    pointer-events: none;
}

.status-overlay-badge {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 6px 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-overlay-badge.rented {
    background: rgba(0, 0, 0, 0.6);
}

@keyframes notify-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 149, 0, 0));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(255, 149, 0, 0.6));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 149, 0, 0));
    }
}

#notify-btn.active {
    color: #FF9500 !important;
    animation: notify-pulse 2s infinite ease-in-out;
}

/* Octo App Style Countdown V3 */
/* Container acts as a row */
.countdown-octo-container {
    display: flex;
    align-items: center;
    background: transparent;
    font-family: 'Outfit', sans-serif;
    gap: 12px;
}

.countdown-octo-label {
    color: #8b9bb4;
    font-size: 15px;
    font-weight: 500;
    margin-right: 4px;
}

/* The dark pills for values */
.countdown-octo-pill {
    background: #1c1c1e;
    /* Dark specific bg color */
    border-radius: 8px;
    padding: 6px 10px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    min-width: 32px;
    text-align: center;
    display: inline-block;
}

/* Separators */
.countdown-octo-sep {
    color: #8b9bb4;
    font-weight: 700;
    font-size: 15px;
}

/* Date at the end */
.countdown-octo-date {
    color: #8b9bb4;
    font-size: 14px;
    font-weight: 500;
    margin-left: 8px;
}

/* 24h Warning Box */
.listing-warning-box {
    background: rgba(255, 149, 0, 0.08);
    border: 1px solid rgba(255, 149, 0, 0.4);
    border-left: 4px solid #FF9500;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.listing-warning-title {
    color: #FF9500;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.listing-warning-text {
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.listing-warning-link {
    color: #0088cc;
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
}


/* --- COMPACT TIMER - APP STYLE (Gray-Black) --- */
.octo-timer-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: 'Outfit', 'Inter', sans-serif;
    margin-top: 8px;
    margin-bottom: 8px;
    background: rgba(15, 18, 22, 0.85);
    /* Darker, more glass-like */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 5px 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.card-top-timer {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: auto !important;
    right: auto !important;
}

.mt-pill-new {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    /* Pill shape requested but image shows slight round rect */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* --- DETAILED COUNTDOWN (Product View) --- */
.view-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Outfit', sans-serif;
}

.cd-segment {
    background: #2c2c2e;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    min-width: 36px;
    text-align: center;
}

.cd-days {
    min-width: auto;
    padding: 6px 12px;
}

.cd-sep {
    font-size: 16px;
    font-weight: 800;
    color: #8b9bb4;
    margin-top: -2px;
}

.cd-date {
    font-size: 13px;
    color: #8b9bb4;
    font-weight: 500;
    margin-left: 8px;
}

.card-top-timer .mt-label {
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.card-top-timer .mt-pill {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
}

.mt-wide {
    padding: 3px 8px;
}

.mt-sep {
    color: #6b7280;
    font-weight: 600;
    font-size: 13px;
    margin: 0 1px;
}

.mt-date {
    color: #9ca3af;
    font-size: 11px;
    margin-left: 6px;
    font-weight: 500;
    white-space: nowrap;
}

/* Responsive: для узких экранов */
@media (max-width: 480px) {
    .octo-timer-row {
        padding: 4px 10px;
        gap: 3px;
    }

    .mt-label {
        font-size: 10px;
        margin-right: 3px;
    }

    .mt-pill {
        font-size: 11px;
        padding: 2px 5px;
        min-width: 20px;
    }

    .mt-wide {
        padding: 2px 6px;
    }

    .mt-sep {
        font-size: 11px;
        margin: 0;
    }

    .mt-date {
        font-size: 9px;
        margin-left: 3px;
    }
}

/* FIX: Bottom nav should always be visible */
/* body.profile-active .bottom-nav {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
} */

/* NEW: Make nav compact in profile */
#profile-container:not([style*="display: none"])~.bottom-nav,
#friends-container:not([style*="display: none"])~.bottom-nav {
    height: calc(75px + var(--safe-area-bottom)) !important;
}

#profile-container:not([style*="display: none"])~.bottom-nav .mode-toggle-container,
#friends-container:not([style*="display: none"])~.bottom-nav .mode-toggle-container {
    display: none !important;
}

.bottom-nav {
    transition: transform 0.3s ease, opacity 0.3s ease, height 0.3s ease;
}

/* FINAL UI POLISH */
.ton-icon-inline {
    width: 25px;
    height: 25px;
    vertical-align: middle;
    margin-left: 1px;
    display: inline-block;
}

.product-action-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    height: 52px;
    margin-top: 24px;
}

.rent-period-stepper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 130px;
    overflow: hidden;
    height: 52px;
}

.rent-period-stepper button {
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    border: none;
    background: none;
    color: #8b9bb4;
    font-size: 22px;
    cursor: pointer;
}

.rent-duration-input {
    flex: 1;
    /* As requested: flex: 2 */
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    /* As requested: font-weight: 700 */
    text-align: right !important;
    /* As requested: text-align: right */
    width: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100%;
}

.main-rent-btn {
    flex: 1;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #0098EA 0%, #0077CC 100%);
    color: white;
    font-weight: 800;
    font-size: 14px;
    display: inline-flex;
    /* Use inline-flex for better text/span alignment */
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 52px;
    white-space: nowrap;
    /* Prevent internal wrapping */
    padding: 0 16px;
}

.tm-amount-container img {
    margin-bottom: 0 !important;
}

.main-rent-btn .icon-ton {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* --- BOTTOM SHEET COMPONENTS --- */
.bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: flex-end !important;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bottom-sheet.active {
    display: flex;
    visibility: visible;
    opacity: 1;
}

.bottom-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.4s ease;
    cursor: pointer;
}

.bottom-sheet-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: #111418;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px 28px 0 0;
    padding-bottom: calc(15px + var(--safe-area-bottom));
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 10001;
    overflow: hidden;
    max-height: 90vh;
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.9);
}

.bottom-sheet.active .bottom-sheet-content {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.bottom-sheet-dash {
    width: 34px;
    height: 5px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    margin: 4px auto 14px;
}

.bottom-sheet-body {
    padding: 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(85vh - 70px);
}

/* --- FRIENDS TAB REFINEMENTS --- */
.bottom-nav.friends-mode {
    height: calc(82px + var(--safe-area-bottom));
}

.commission-notice {
    position: relative;
    z-index: 10;
}

.how-much-link {
    cursor: pointer;
    transition: all 0.25s ease;
}

.how-much-link:active {
    transform: scale(0.96);
    opacity: 0.75;
}

/* --- PREMIUM COUNTDOWN (MARKET STYLE) --- */
.countdown-market-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    color: #8b9bb4;
    font-size: 14px;
    margin: 8px 0;
}

.countdown-market-pill {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 10px;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    min-width: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.countdown-market-sep {
    color: #3a3a3c;
    font-weight: 900;
    font-size: 18px;
    margin: 0 -2px;
}

.countdown-market-date {
    color: #9ca3af;
    font-size: 13px;
    margin-left: 8px;
    white-space: nowrap;
}

.countdown-market-container {
    padding: 0 !important;
}

/* --- Round 8: Gray Pricing Style Timer Box --- */
.market-timer-box-premium {
    width: 100% !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.08);
    /* Matches pricing card background */
    padding: 24px;
    border-radius: 24px;
    gap: 12px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.mt-premium-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 4px;
}

.mt-premium-label {
    color: #8794a1;
    /* Same as pricing labels */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    padding-right: 8px;
    /* Extra safe space */
}

.mt-premium-date {
    color: #8794a1;
    font-size: 11px;
    font-weight: 600;
}

.mt-premium-val {
    color: #fff;
    font-weight: 900;
    font-size: 24px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.toast-notification {
    background: #1c1c1e;
    color: #fff;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-notification.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Filter & Market Footer Buttons Alignment (Round 9) --- */
.mrkt-footer {
    display: flex !important;
    gap: 12px !important;
    padding: 16px 20px !important;
    background: #0f151c !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 100 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.mrkt-footer button {
    flex: 1 !important;
    height: 52px !important;
    border-radius: 14px !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 8px !important;
    margin: 0 !important;
}

#notify-btn {
    transition: all 0.3s ease;
    background: transparent !important;
}

#notify-btn.active {
    color: var(--accent-blue) !important;
    animation: notify-pulse-blue 2s infinite ease-in-out;
}

#notify-btn.active svg {
    filter: drop-shadow(0 0 8px rgba(0, 136, 204, 0.4));
}

@keyframes notify-pulse-blue {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px rgba(0, 136, 204, 0.6));
    }

    100% {
        transform: scale(1);
    }
}

/* --- HELP SHEET PREMIUM STYLES --- */
.help-sheet-warning {
    background: rgba(255, 149, 0, 0.1);
    border-left: 4px solid #FF9500;
    padding: 16px;
    border-radius: 4px 16px 16px 4px;
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
}

.help-sheet-warning b {
    color: #FF9500;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- PREMIUM FILTER LIST LAYOUT --- */
.accordion-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

[id*="-list-container"] {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0 !important;
}

.filter-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.filter-list-row:last-child {
    border-bottom: none;
}

.filter-list-row:active {
    background: rgba(255, 255, 255, 0.05);
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    color: #8b9bb4;
    text-transform: uppercase;
    flex-shrink: 0;
}

.filter-label {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.filter-checkbox {
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-list-row.selected .filter-checkbox {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.filter-list-row.selected .filter-checkbox::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%) rotate(45deg);
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
}

.filter-list-row.selected .filter-icon-box {
    border-color: var(--accent-blue);
    color: #fff;
    background: rgba(0, 136, 204, 0.1);
}

/* TON CONNECT OVERRIDE */
tc-root {
    z-index: 99999999 !important;
    position: fixed !important;
}

tc-root>div {
    z-index: 99999999 !important;
}

#product-view {
    z-index: 10000;
}

.symbol-invert {
    filter: brightness(0) invert(1) contrast(100%);
}

/* --- TC MODAL REDESIGN (Premium) --- */
.tc-redesign-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tc-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.tc-step-number {
    width: 32px;
    height: 32px;
    background: rgba(0, 136, 204, 0.1);
    border: 1px solid rgba(0, 136, 204, 0.3);
    color: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.tc-step-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.tc-step-text b {
    color: #fff;
    font-weight: 700;
}

.tc-input-wrapper {
    position: relative;
    margin-top: 8px;
}

.tc-input-premium {
    width: 100% !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 18px !important;
    color: #fff !important;
    padding: 0 20px 0 52px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.tc-input-premium:focus {
    border-color: var(--accent-blue) !important;
    background: rgba(0, 136, 204, 0.08) !important;
    box-shadow: 0 0 20px rgba(0, 136, 204, 0.2);
}

.tc-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-blue);
    width: 20px;
    height: 20px;
    opacity: 0.9;
}

.tc-btn-premium {
    height: 58px;
    background: linear-gradient(135deg, #0088cc 0%, #005588 100%) !important;
    border: none !important;
    border-radius: 18px !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

.tc-btn-premium:active {
    transform: scale(0.97);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.2);
}

.tc-polling-premium {
    text-align: center;
    padding: 40px 20px;
}

.tc-polling-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 20px 0 10px;
}

.tc-polling-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- TC TUTORIAL STYLES --- */
.tutorial-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: fadeInUp 0.4s ease-out;
}

.tutorial-image-wrapper {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: zoom-in;
    transition: transform 0.3s ease;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-image-wrapper:active {
    transform: scale(0.98);
}

.tutorial-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tutorial-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: center;
    min-height: 48px;
}

.tutorial-desc b {
    color: #fff;
    font-weight: 700;
}

/* Progress Button */
.btn-progress {
    position: relative;
    overflow: hidden;
    height: 58px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 18px !important;
    color: rgba(255, 255, 255, 0.3) !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    width: 100%;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.btn-progress .progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #0088cc;
    opacity: 0.3;
    z-index: 0;
    transition: width 0.1s linear;
    /* Short transition to bridge intervals */
}

.btn-progress.active {
    background: linear-gradient(135deg, #0088cc 0%, #005588 100%) !important;
    color: #fff !important;
    cursor: pointer;
    border: none !important;
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.3);
}

.btn-progress.active .progress-fill {
    width: 100% !important;
    opacity: 0;
}

.btn-progress span {
    position: relative;
    z-index: 1;
}

/* Lightbox */
.tc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.tc-lightbox.active {
    display: flex;
    opacity: 1;
}

.tc-lightbox img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.1s ease-out;
    /* Faster for drag/zoom */
    touch-action: none;
    /* Disable default browser touch actions */
    user-select: none;
    -webkit-user-drag: none;
}

.tc-lightbox.active img {
    transform: scale(1);
}

.tc-lightbox-close {
    position: absolute;
    top: env(safe-area-inset-top, 20px);
    right: 20px;
    color: #fff;
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
}