/* Do'kon oqimi, profil, xarid va to'lov ekranlari (style.css dagi Lime HUD tokenlari bilan) */

[hidden] {
    display: none !important;
}

/* ============== PREMIUM EMOJI ==============
   O'lcham ota elementning font-size'idan olinadi; yuklanguncha oddiy emoji turadi */
.tg-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    line-height: 1;
    vertical-align: middle;
}

.tg-emoji svg,
.tg-emoji img,
.tg-emoji video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.product-icon .tg-emoji {
    width: 1.35em;
    height: 1.35em;
}

/* ============== SPLASH: ilova ochilayotganda logo ============== */
.splash {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Logo rasmining o'z foni bor — chetlari fonga singib ketishi uchun yumshoq niqob */
.splash img {
    width: min(120vw, 560px);
    -webkit-mask-image: radial-gradient(circle, #000 42%, transparent 70%);
    mask-image: radial-gradient(circle, #000 42%, transparent 70%);
    animation: splashPulse 1.6s ease-in-out infinite;
}

.splash.hide {
    opacity: 0;
    visibility: hidden;
}

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

/* ============== DO'KON: KATEGORIYA → PAKET ============== */
.kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--lime);
    margin-top: 6px;
}

.kicker::before {
    content: '';
    display: block;
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: var(--lime);
    margin-bottom: 8px;
}

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

.category-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 168px;
    padding: 16px;
    text-align: left;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background:
        radial-gradient(circle at 100% 0%, rgba(139, 124, 255, 0.18) 0%, transparent 55%),
        linear-gradient(180deg, var(--surface) 0%, var(--bg2) 100%);
    color: var(--text);
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
}

.category-tile:active {
    border-color: var(--lime);
    transform: scale(0.98);
}

.category-emoji {
    font-size: 34px;
    line-height: 1;
    margin-bottom: 10px;
}

.category-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    line-height: 1.15;
}

.category-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.35;
}

.category-from {
    margin-top: auto;
    padding-top: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--lime);
}

.back-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 0;
    cursor: pointer;
}

.product-card {
    color: var(--text);
    font-family: var(--font-body);
    width: 100%;
}

.mode-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 14px;
    border: 1px solid var(--violet);
    background: rgba(139, 124, 255, 0.12);
    font-size: 13px;
}

.mode-banner i {
    color: var(--violet);
}

.mode-banner-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
}

/* ============== PROFIL ============== */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    margin: 6px 0 14px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background:
        radial-gradient(circle at 0% 0%, rgba(198, 255, 61, 0.10) 0%, transparent 50%),
        var(--surface);
}

.avatar {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--lime);
    background: var(--bg2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 20px;
    color: var(--lime);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-hero-info {
    min-width: 0;
}

.profile-name {
    font-weight: 800;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-username {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

.profile-balance {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.profile-balance .stat-value {
    white-space: nowrap;
    font-size: 13px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 6px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg2);
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    cursor: pointer;
}

.quick-action span {
    font-size: 24px;
}

.quick-action:active {
    border-color: var(--lime);
}

.gift-friend-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 16px;
    border: none;
    border-radius: 16px;
    background: var(--lime);
    color: var(--bg);
    text-align: left;
    cursor: pointer;
}

.gift-friend-btn > i:first-child {
    font-size: 22px;
}

.gift-friend-btn b {
    display: block;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
}

.gift-friend-btn small {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.75;
}

.gift-friend-btn > i:last-child {
    margin-left: auto;
}

/* ============== XARID OYNASI ============== */
.buy-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.buy-head .product-icon {
    font-size: 42px;
    margin: 0;
}

.buy-head h2 {
    font-size: 16px;
    margin: 0 0 4px;
}

.buy-price {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 18px;
    color: var(--lime);
}

.field-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin: 16px 0 8px;
}

.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--border-color);
}

.segmented button {
    padding: 11px 8px;
    border: none;
    border-radius: 10px;
    background: none;
    color: var(--muted);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.segmented button.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--lime);
}

.pay-method-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--muted);
}

.pay-method-note i {
    color: var(--lime);
}

.pay-method-note b {
    color: var(--text);
}

.self-recipient {
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
}

.self-recipient i {
    color: var(--lime);
    margin-right: 4px;
}

#recipientInput,
#walletInput {
    width: 100%;
    margin-top: 10px;
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 15px;
}

#walletInput {
    margin-top: 0;
}

#buyBtn {
    width: 100%;
    margin-top: 22px;
}

/* ============== TO'LOV KO'RSATMASI ============== */
#payBody h2 {
    font-size: 18px;
    margin: 4px 0 6px;
}

.pay-recipient {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}

.pay-recipient b {
    color: var(--text);
    font-family: var(--font-mono);
}

.pay-steps {
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pay-steps li {
    counter-increment: step;
    position: relative;
    padding-left: 38px;
}

.pay-steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 15px;
    color: var(--violet);
}

.step-title {
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 8px;
}

.step-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.45;
}

.step-note b {
    font-family: var(--font-mono);
    color: var(--text);
}

.pay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 6px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border-color);
}

.pay-row.highlight {
    border-color: var(--lime);
}

.pay-row-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.pay-row-value {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    word-break: break-all;
}

.pay-row.highlight .pay-row-value {
    color: var(--lime);
    font-size: 20px;
}

.copy-btn {
    flex: 0 0 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: var(--bg);
    color: var(--lime);
    cursor: pointer;
}

.pay-steps .btn-large {
    width: 100%;
    text-decoration: none;
}

.pay-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(139, 124, 255, 0.12);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.pay-status i {
    color: var(--violet);
}

.pay-status.paid {
    background: rgba(198, 255, 61, 0.12);
}

.pay-status.paid i {
    color: var(--lime);
}

.order-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}

/* ============== BOSISH EFFEKTI VA MENYU ANIMATSIYASI ==============
   Mobil brauzerning kulrang to'rtburchak "tap highlight"i va fokus chizig'i o'chiriladi;
   klaviatura bilan boshqarishda fokus lime halqa bilan ko'rinadi */
* {
    -webkit-tap-highlight-color: transparent;
}

button:focus,
a:focus {
    outline: none;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

/* Faol tugma silliq kengayadi, yozuv ochiladi (display o'rniga max-width — animatsiya qilinadi) */
.bottom-nav {
    justify-content: space-between;
}

.nav-item,
.nav-item.active {
    flex: 0 1 auto;
    gap: 0;
    padding: 0 15px;
    transition:
        flex-grow 0.4s cubic-bezier(0.34, 1.3, 0.64, 1),
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.15s ease;
}

.nav-item.active {
    flex-grow: 1;
}

.nav-item span,
.nav-item.active span {
    display: inline-block;
    max-width: 0;
    margin-left: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.4s ease, opacity 0.25s ease;
}

.nav-item.active span {
    max-width: 140px;
    margin-left: 8px;
    opacity: 1;
    transition-delay: 0s, 0s, 0.08s;
}

.nav-item i {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Bosilganda yengil "siqilish" — kulrang fon o'rniga */
.nav-item:active,
.nav-item:not(.active):active {
    background-color: transparent;
    transform: scale(0.92);
}

.nav-item.active:active {
    background-color: var(--lime);
}

/* Boshqa tugmalarda ham bir xil yengil bosish effekti */
.category-tile:active,
.product-card:active,
.quick-action:active,
.gift-friend-btn:active,
.btn:active,
.copy-btn:active {
    transform: scale(0.97);
}

.category-tile,
.product-card,
.quick-action,
.gift-friend-btn,
.btn,
.copy-btn {
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
    .nav-item,
    .nav-item span,
    .nav-item i {
        transition: none;
    }
}

/* ============== BUYURTMALAR RO'YXATI (bosiladigan) ============== */
button.order-item {
    display: block;
    width: 100%;
    text-align: left;
    color: var(--text);
    font-family: var(--font-body);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease;
}

button.order-item:active {
    transform: scale(0.98);
    border-color: var(--lime);
}

.order-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 700;
    color: var(--lime);
}

.order-hint .fa-chevron-right {
    margin-left: auto;
    color: var(--muted);
}

#orderPayBtn {
    width: 100%;
    margin-top: 14px;
}

/* ============== QABUL QILUVCHI KARTOCHKASI ============== */
.recipient-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--border-color);
    animation: recipientIn 0.25s ease;
}

.recipient-card.ok {
    border-color: var(--lime);
}

.recipient-card.error {
    border-color: var(--warn);
}

.recipient-card > i {
    margin-left: auto;
    font-size: 18px;
    color: var(--muted);
}

.recipient-card.ok > i {
    color: var(--lime);
}

.recipient-avatar {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 14px;
    color: var(--lime);
}

.recipient-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipient-card.error .recipient-avatar {
    color: var(--warn);
}

.recipient-avatar.skeleton {
    background: linear-gradient(90deg, var(--surface) 0%, #1b2547 50%, var(--surface) 100%);
    background-size: 200% 100%;
    animation: skeleton 1.1s linear infinite;
}

.recipient-name {
    font-weight: 800;
    font-size: 14px;
    line-height: 1.3;
}

.recipient-card.error .recipient-name {
    color: var(--warn);
    font-weight: 700;
    font-size: 13px;
}

.recipient-username {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

#buyBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

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

@keyframes skeleton {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}
