/* ============================================================
   LUXURY PREMIUM THEME — Telegram Marketplace
   Glassmorphism · Gold accents · Smooth motion (mobile-first)
   ============================================================ */

:root {
    --gold:        #d4af37;
    --gold-light:  #f5d676;
    --gold-dark:   #b8941f;
    --ink:         #0b0e14;
    --ink-soft:    #11151f;
    --ink-card:    #161b27;
    --glass-bg:    rgba(255, 255, 255, 0.05);
    --glass-brd:   rgba(255, 255, 255, 0.09);
    --gold-glow:   rgba(212, 175, 55, 0.35);
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 50% -10%, #20203a 0%, transparent 60%),
        radial-gradient(circle at top, #1a1a2e 0%, #0b0e14 60%, #0a0a0f 100%);
    background-attachment: fixed;
    color: #e8eaf0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Slim custom scrollbar (visible but elegant) */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--gold-dark), var(--gold));
    border-radius: 999px;
}

/* ---------------- GOLD TEXT & ACCENTS ---------------- */
.text-gold { color: var(--gold); }

.text-gold-gradient {
    background: linear-gradient(120deg, var(--gold-light), var(--gold) 45%, var(--gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Glowing divider */
.gold-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
    border: none;
    margin: 1rem 0;
}

/* ---------------- GLASS CARDS ---------------- */
.glass {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--glass-brd);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.25s cubic-bezier(.2,.8,.2,1),
                border-color 0.25s ease,
                box-shadow 0.25s ease;
    overflow: hidden;
}

/* Subtle top highlight line on every glass card */
.glass::before {
    content: "";
    position: absolute;
    top: 0; left: 10%;
    width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

.glass:hover, .glass:active {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow:
        0 14px 44px rgba(0, 0, 0, 0.5),
        0 0 26px rgba(212, 175, 55, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Premium "elevated" variant with an ambient gold aura */
.glass-aura { position: relative; }
.glass-aura::after {
    content: "";
    position: absolute;
    inset: -40% auto auto -40%;
    width: 80%; height: 80%;
    background: radial-gradient(circle, var(--gold-glow), transparent 70%);
    filter: blur(40px);
    opacity: 0.6;
    pointer-events: none;
    animation: aura-float 6s ease-in-out infinite;
}
@keyframes aura-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.45; }
    50%      { transform: translate(20%, 15%) scale(1.15); opacity: 0.7; }
}

/* ---------------- GOLD BUTTON (with shine sweep) ---------------- */
.btn-gold {
    position: relative;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    color: var(--ink);
    font-weight: 700;
    letter-spacing: 0.2px;
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    overflow: hidden;
    cursor: pointer;
}
.btn-gold::after {
    content: "";
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.btn-gold:hover::after { left: 140%; }
.btn-gold:hover  { box-shadow: 0 8px 26px rgba(212, 175, 55, 0.5); filter: brightness(1.05); }
.btn-gold:active { transform: scale(0.96); }

/* Ghost / secondary button */
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-brd);
    color: #e8eaf0;
    border-radius: 14px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-ghost:hover  { background: rgba(255, 255, 255, 0.09); border-color: rgba(212,175,55,0.4); }
.btn-ghost:active { transform: scale(0.96); }

/* ---------------- BADGES / PILLS ---------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.25);
}
.badge-success { background: rgba(34,197,94,0.12); color: #4ade80; border-color: rgba(34,197,94,0.3); }
.badge-danger  { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.3); }

/* ---------------- LISTING / ORDER CARD ---------------- */
.card-premium {
    background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid var(--glass-brd);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.25s cubic-bezier(.2,.8,.2,1), border-color 0.25s ease, box-shadow 0.25s ease;
}
.card-premium:hover, .card-premium:active {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 24px rgba(212,175,55,0.15);
}

/* ---------------- NAVIGATION GLASS BAR ---------------- */
.nav-glass {
    background: rgba(11, 14, 20, 0.72);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.nav-item-active {
    position: relative;
}
.nav-item-active::before {
    content: "";
    position: absolute;
    top: 2px; left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
    box-shadow: 0 0 10px var(--gold-glow);
}

/* ---------------- INPUTS ---------------- */
.input-lux {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-brd);
    border-radius: 14px;
    color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input-lux:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.18);
}

/* ---------------- LOADING SHIMMER ---------------- */
.shimmer {
    background: linear-gradient(90deg, #161b27 25%, #232a3a 50%, #161b27 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 14px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Gold ring spinner */
.spinner-gold {
    width: 40px; height: 40px;
    border: 3px solid rgba(212,175,55,0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- ENTRY ANIMATIONS (GSAP fallback) ---------------- */
.fade-up { opacity: 0; transform: translateY(16px); }

.animate-in {
    animation: fadeInUp 0.45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Soft pulsing glow for highlight elements (e.g. balance) */
.glow-pulse {
    animation: glowPulse 2.4s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 8px rgba(212,175,55,0.25); }
    50%      { text-shadow: 0 0 18px rgba(212,175,55,0.55); }
}

/* ---------------- UTILITIES ---------------- */
.rounded-3xl { border-radius: 24px; }
.no-select { user-select: none; -webkit-user-select: none; }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }

/* ============================================================
   ✨ NEW ADDITIONS BELOW (your original code untouched above)
   ============================================================ */

/* Prevent scroll when modal open */
body.no-scroll {
    overflow: hidden;
    touch-action: none;
}

/* Stagger animation delays for list items */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }

/* Fade in animation (no movement) */
.fade-in {
    animation: fadeIn 0.4s ease both;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scale pop animation */
.scale-in {
    animation: scaleIn 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

/* Slide from right (for drawers) */
.slide-in-right {
    animation: slideInRight 0.3s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Slide from bottom (for modals) */
.slide-in-bottom {
    animation: slideInBottom 0.3s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes slideInBottom {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

/* Small spinner for inline loading */
.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(212,175,55,0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

/* Backdrop overlay for modals */
.backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

/* Clickable element feedback */
.clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.clickable:active {
    opacity: 0.7;
}

/* Hide scrollbar but keep scroll */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Text utilities */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    box-shadow: 0 8px 24px rgba(212,175,55,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(.2,.8,.2,1), box-shadow 0.2s ease;
    z-index: 999;
}
.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(212,175,55,0.6);
}
.fab:active {
    transform: scale(0.95);
}

/* Toast notification */
.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-brd);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    animation: slideInBottom 0.3s cubic-bezier(.2,.8,.2,1);
}
.toast-success { border-left: 3px solid #4ade80; }
.toast-error { border-left: 3px solid #f87171; }
.toast-info { border-left: 3px solid var(--gold); }

/* Accessibility - Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .glass:hover {
        transform: none;
    }
    .card-premium:hover {
        transform: scale(1.005);
    }
}