/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@500;600;700&family=Rajdhani:wght@600;700&family=Russo+One&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Hind Siliguri', 'Rajdhani', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Colorful Gaming Palette */
    --color-yellow: #ffb700;
    --color-blue: #2563eb;
    --color-green: #10b981;
    --color-red: #ef4444;
    
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 85px;
    overflow-x: hidden;
}

/* App Wrapper */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: #ffffff;
    position: relative;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* ==========================================================================
   1. Top Header Navigation (উচ্চতা, চিকন বর্ডার ও গ্লাস স্ক্রোল ইফেক্ট)
   ========================================================================== */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 14px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    gap: 8px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}

/* পারফেক্ট বড় গোল লোগো */
.logo-badge {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--color-yellow);
    background: #000;
}

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

/* ==========================================================================
   ল্যাগ-ফ্রি কালার চেঞ্জিং ও ডান্সিং PANEL MAMA টেক্সট (GPU-Accelerated)
   ========================================================================== */
.brand-gaming-text {
    font-family: 'Russo One', sans-serif;
    font-size: 20px;
    font-style: italic;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    /* জিরো ল্যাগ হার্ডওয়্যার এক্সেলারেশন */
    transform: translateZ(0);
    will-change: transform;
    animation: brandDance 5.5s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

.brand-word-panel {
    color: #0f172a;
    letter-spacing: 1px;
}

/* স্মুথ কালার চেঞ্জিং MAMA পার্ট */
.brand-word-mama {
    background: linear-gradient(90deg, #ffb700, #2563eb, #10b981, #ff0055, #ffb700);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandColorShift 8s ease infinite;
}

/* মসৃণ কালার ট্রানজিশন কীফ্রেম */
@keyframes brandColorShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* মাঝে মাঝে প্লেফুল গেমিং ডান্স/জাম্প কীফ্রেম (নো ল্যাগ) */
@keyframes brandDance {
    0%, 75%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    80% {
        transform: translateY(-3px) rotate(-3deg) scale(1.05);
    }
    85% {
        transform: translateY(1.5px) rotate(2deg) scale(0.97);
    }
    90% {
        transform: translateY(-2px) rotate(-1deg) scale(1.02);
    }
    95% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Auth Buttons */
.auth-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-auth-login {
    background: #eff6ff;
    color: var(--color-blue);
    border: 1.5px solid #bfdbfe;
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-auth-reg {
    background: linear-gradient(135deg, var(--color-yellow) 0%, #f59e0b 100%);
    color: #451a03;
    border: 1px solid var(--color-yellow);
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-auth-login:active, .btn-auth-reg:active {
    transform: scale(0.92);
}

.wallet-badge {
    background: linear-gradient(135deg, var(--color-green) 0%, #059669 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.user-avatar-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-blue);
    cursor: pointer;
    flex-shrink: 0;
}

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

/* ==========================================================================
   2. Notice Bar (ব্লু গ্রাডিয়েন্ট, মাইক ও রাউন্ডেড ক্লোজ বাটন)
   ========================================================================== */
.notice-marquee-wrapper, .notice-wrapper {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e1b4b 100%);
    color: #ffffff;
    padding: 12px 14px;
    margin: 12px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-pill, .notice-badge {
    background: var(--color-yellow);
    color: #000000;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Russo One', sans-serif;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.marquee-container {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-text {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #fef08a;
    animation: scrollText 22s linear infinite;
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.notice-close-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.notice-close-btn:active {
    transform: scale(0.9);
}

/* ==========================================================================
   3. Category Tabs
   ========================================================================== */
.category-tabs {
    display: flex;
    gap: 8px;
    padding: 6px 14px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-btn {
    background: #ffffff;
    color: #475569;
    border: 1px solid var(--border-color);
    padding: 7px 18px;
    border-radius: 8px;
    font-family: 'Russo One', sans-serif;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cat-btn.active {
    background: var(--color-blue);
    color: #ffffff;
    border-color: var(--color-blue);
}

.cat-btn:active {
    transform: scale(0.94);
}

/* 4. Section Title */
.section-title {
    text-align: center;
    font-family: 'Russo One', sans-serif;
    font-size: 18px;
    letter-spacing: 0.5px;
    color: #1e293b;
    margin: 16px 0 12px;
}

/* ==========================================================================
   5. Product Grid & Cards
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 14px;
}

.product-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

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

.product-card img {
    width: 100%;
    height: 145px;
    object-fit: cover;
}

.product-card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.prod-badge {
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid var(--border-color);
    padding: 4px 6px;
    border-radius: 6px;
    font-family: 'Russo One', sans-serif;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prod-price {
    color: var(--color-green);
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
}

.btn-file-setup {
    background: linear-gradient(135deg, var(--color-blue) 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 8px;
    border-radius: 8px;
    font-family: 'Russo One', sans-serif;
    font-size: 11px;
    text-align: center;
    text-decoration: none;
    border: none;
    transition: transform 0.15s;
}

.btn-buy-now {
    background: linear-gradient(135deg, var(--color-yellow) 0%, #f59e0b 100%);
    color: #451a03;
    padding: 8px;
    border-radius: 8px;
    font-family: 'Russo One', sans-serif;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid var(--color-yellow);
    transition: transform 0.15s;
}

.btn-file-setup:active, .btn-buy-now:active {
    transform: scale(0.94);
}

/* ==========================================================================
   6. Floating Support Widget
   ========================================================================== */
.floating-help-widget, .floating-support-btn {
    position: fixed;
    bottom: 80px;
    right: 14px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.help-bubble-text {
    background: #ffffff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.help-telegram-btn, .floating-support-btn .sup-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s;
}

.help-telegram-btn:active {
    transform: scale(0.9);
}

/* ==========================================================================
   7. Bottom Navigation Bar
   ========================================================================== */
.bottom-nav, .bottom-nav-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-top: 1px solid var(--border-color) !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 8px 0 !important;
    z-index: 9999 !important;
}

.nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 3px !important;
    color: #94a3b8 !important;
    text-decoration: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nav-item i {
    font-size: 18px !important;
    transition: transform 0.25s, color 0.25s !important;
}

.nav-item.active {
    color: var(--color-blue) !important;
}

.nav-item.active i {
    color: var(--color-blue) !important;
    transform: translateY(-2px);
}

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

/* ==========================================================================
   8. Logo-Centered Modern Loading Dialog & Network Alert
   ========================================================================== */
.app-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.app-loader-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loader-logo-container {
    position: relative;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-spinner-ring {
    position: absolute;
    inset: 0;
    border: 3.5px solid #e2e8f0;
    border-top-color: var(--color-blue);
    border-right-color: var(--color-yellow);
    border-bottom-color: var(--color-green);
    border-left-color: var(--color-red);
    border-radius: 50%;
    animation: spinLoader 0.9s cubic-bezier(0.6, 0.1, 0.3, 0.9) infinite;
}

.loader-logo-inner {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-yellow);
    background: #000;
    animation: pulseLogo 1.4s ease-in-out infinite;
}

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

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

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

.loader-text {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.3px;
}

/* Offline Alert */
.offline-banner {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 440px;
    background: var(--color-red);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    z-index: 9999999;
    transition: top 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.offline-banner.show {
    top: 14px;
}