/* ==========================================================
   হেডার (Header) এবং টুলবার (Toolbar) কাস্টম কালার সেটিংস
   এখান থেকে আপনার পছন্দমতো HEX বা RGB কালার কোড বসিয়ে নিন
========================================================== */
:root {
    --header-bg: linear-gradient(180deg, #2b3eb8 0%, #1d2c96 100%); /* উপরের হেডার ব্যাকগ্রাউন্ড */
    --header-border: #3c50d6;                                       /* উপরের হেডার বর্ডার */
    --header-icon-color: #ffffff;                                   /* হেডারের মেনু ও ইনবক্স আইকন কালার */

    --toolbar-bg: #4F43AB;                                          /* নিচের টুলবার (Bottom Bar) ব্যাকগ্রাউন্ড */
    --toolbar-text-color: #ffffff;                                  /* নিচের টুলবার লেখার কালার */
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Hind Siliguri', sans-serif;
}

img {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body {
    background-color: #2A2361;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 430px;
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 65px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    overflow-x: hidden;
}

/* Login & Register Auth Modals */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9600;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 16px;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 370px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    animation: modalScale 0.25s ease;
}

@keyframes modalScale {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.auth-modal-header {
    background: linear-gradient(180deg, #2b3eb8 0%, #1d2c96 100%);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.auth-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
}

.auth-modal-body {
    padding: 18px;
}

.auth-input-group {
    margin-bottom: 12px;
}

.auth-input-group label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.auth-input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14.5px;
    outline: none;
    transition: border-color 0.2s;
}

.auth-input-group input:focus {
    border-color: #ff6a00;
}

.auth-submit-btn {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    margin-top: 6px;
}

.btn-orange { background-color: #ff6a00; }
.btn-blue { background-color: #4f5bd5; }

.auth-switch-text {
    text-align: center;
    margin-top: 12px;
    font-size: 13.5px;
    color: #555;
}

.auth-switch-text span {
    color: #ff6a00;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.alert-banner {
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
}
.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-success { background: #dcfce7; color: #15803d; }

/* Welcome Image Popup Modal */
.welcome-popup-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 100%;
    background: rgba(0, 0, 0, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}

.welcome-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.welcome-popup-box {
    position: relative;
    width: 82%;
    max-width: 325px;
    transform: scale(0.92);
    transition: transform 0.25s ease;
}

.welcome-popup-overlay.active .welcome-popup-box {
    transform: scale(1);
}

.popup-close-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(35, 35, 35, 0.85);
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}

.popup-image-wrapper {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    background: #1a1a1a;
    position: relative;
    cursor: pointer;
}

.popup-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.popup-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 5;
}

.popup-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.popup-dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Custom Logo Loading Overlay (450ms Real Zoom In / Zoom Out, No Rotation) */
.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.page-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loader-circle {
    width: 155px;
    height: 155px;
    border-radius: 50%;
    background: rgba(20, 26, 48, 0.88);
    border: 3px solid #1528a8;
    box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.55), 0 0 14px rgba(29, 53, 212, 0.65), inset 0 0 12px rgba(21, 40, 168, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    position: relative;
    will-change: transform;
    animation: realZoomPulse 0.45s cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}

.loader-circle::before {
    display: none;
    content: none;
}

.loader-circle img {
    width: 100%;
    height: auto;
    max-height: 55px;
    object-fit: contain;
    z-index: 2;
    transform: none !important;
    animation: none !important;
    filter: drop-shadow(3px 4px 6px rgba(0, 0, 0, 0.65));
}

@keyframes realZoomPulse {
    0% {
        transform: scale(0.92);
        box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.45), 0 0 10px rgba(29, 53, 212, 0.5), inset 0 0 10px rgba(21, 40, 168, 0.35);
    }
    100% {
        transform: scale(1.06);
        box-shadow: 6px 8px 22px rgba(0, 0, 0, 0.65), 0 0 18px rgba(45, 78, 255, 0.8), inset 0 0 14px rgba(21, 40, 168, 0.55);
    }
}

/* Top Header */
.header {
    background: var(--header-bg);
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 58px;
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    overflow: visible;
}

.menu-btn {
    position: absolute;
    left: 16px;
    color: var(--header-icon-color);
    font-size: 23px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 2;
}

.header-inbox-btn {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--header-icon-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    z-index: 2;
}

.header-inbox-btn svg {
    width: 28px;
    height: 28px;
}

.header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 125px;
    overflow: visible;
}

.header .logo img,
.logo img {
    display: block;
    width: auto;
    max-width: 165px;
    height: 36px;
    object-fit: contain;
    opacity: 1;
    visibility: visible;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.jaya-text-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Arial Black', 'Hind Siliguri', sans-serif;
    font-weight: 900;
    font-size: 26px;
    line-height: 1.05;
    letter-spacing: 0.8px;
    font-style: italic;
    color: #ff9d00;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
}

.jaya-text-logo span {
    color: #ff3b00;
}

/* Side Drawer Menu */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
}
.sidebar-overlay.active {
    display: block;
}

.sidebar {
    position: fixed;
    top: 0;
    left: calc(50% - 215px);
    width: 265px;
    height: 100vh;
    background: #ffffff;
    z-index: 250;
    transform: translateX(-110%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.35);
}

@media (max-width: 430px) {
    .sidebar { left: 0; }
}

.sidebar.active {
    transform: translateX(0);
    visibility: visible;
}

.sidebar-top-header {
    background-color: #2f2f2f;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    flex-shrink: 0;
}

.sidebar-top-header img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.sidebar-menu-list {
    list-style: none;
    padding: 6px 0 18px 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 13px 20px;
    gap: 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    user-select: none;
}

.sidebar-item:hover,
.sidebar-item.active {
    background-color: #e6e6e6;
}

.sidebar-item-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.icon-orange-tint {
    filter: brightness(0) saturate(100%) invert(48%) sepia(93%) saturate(2200%) hue-rotate(360deg) brightness(101%) contrast(104%);
}

.sidebar-bd-flag {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #006a4e;
    position: relative;
    flex-shrink: 0;
}
.sidebar-bd-flag::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #f42a41;
    border-radius: 50%;
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
}

.sidebar-item-text {
    font-size: 17px;
    font-weight: 600;
    color: #ff6a00;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 7px;
}

.menu-new-badge {
    background-color: #16a34a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 1.5px 7.5px;
    border-radius: 10px;
    line-height: 1.3;
    text-transform: lowercase;
}

/* Banner Carousel Section */
.banner-section {
    background-color: #131e7a;
    padding: 12px 0 10px 0;
    position: relative;
    overflow: hidden;
}

.carousel-viewport {
    width: 100%;
    padding: 0 42px;
    overflow: visible;
}

.carousel-track {
    display: flex;
    gap: 10px;
    will-change: transform;
}

.banner-slide {
    flex: 0 0 100%;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    background: #0d155a;
    cursor: pointer;
}

.banner-slide img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    display: block;
}

.dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.dot {
    width: 18px;
    height: 3.5px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.dot.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 80%;
    background: #ff6a00;
    border-radius: 2px;
}

/* Marquee Notice Bar */
.notice-bar {
    background-color: #21309c;
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 7px 12px;
    font-size: 15px;
    font-weight: 500;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.notice-bar i {
    color: #a3b4ff;
    margin-right: 10px;
    font-size: 17px;
}

/* Category Navigation Tabs */
.category-tabs {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e6e7eb;
}

.tab-item {
    flex: 1;
    padding: 12px 2px;
    text-align: center;
    cursor: pointer;
    color: #ff6a00;
    background-color: #ffffff;
    border-right: 1px solid #f2f2f2;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
}

.tab-item:last-child { border-right: none; }

.tab-item .tab-svg {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.tab-item span {
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
}

.tab-item.active {
    background-color: #ff6a00;
    color: #ffffff;
}

.tab-item.active .tab-svg {
    filter: brightness(0) invert(1);
    transform: scale(1.06);
}

/* Games Grid */
.games-section {
    padding: 15px 12px 18px 12px;
    background: linear-gradient(180deg, #f0f1f4 0%, #f5f6f8 100%);
    border-bottom: 1px solid #eaecf0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 10px;
    align-items: start;
}

.game-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-card:active { transform: scale(0.95); }

.game-card .game-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.game-card .badge-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 28px;
    height: auto;
    z-index: 5;
    pointer-events: none;
}

/* Referral Program */
.referral-section {
    background-color: #ffffff;
    padding: 12px 12px 16px 12px;
    position: relative;
}

.section-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    padding-left: 4px;
}

.referral-banner {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    cursor: pointer;
}

.referral-banner img {
    width: 100%;
    display: block;
}

/* Footer Section */
.site-footer-section {
    background-color: #d6d7d9;
    padding: 18px 14px 25px 14px;
    color: #2b2b2b;
    border-top: 1px solid #c5c6c8;
}

.footer-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
    margin-bottom: 16px;
}

.footer-block-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 8px;
}

.footer-logos-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.footer-logos-row img {
    height: 28px;
    width: auto;
    object-fit: contain;
    cursor: pointer;
}

.footer-logos-row img.logo-wide { height: 30px; }
.footer-logos-row img.logo-gc { height: 32px; margin-top: 4px; }

.social-logos-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
}

.social-logos-row img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
}

.footer-divider {
    border: 0;
    height: 1px;
    background: #bdbec0;
    margin: 16px 0;
}

.seo-article h1 { font-size: 20px; font-weight: 700; color: #1f1f1f; margin-bottom: 8px; }
.seo-article h2 { font-size: 17.5px; font-weight: 700; color: #1f1f1f; margin-top: 16px; margin-bottom: 6px; }
.seo-article h3 { font-size: 15px; font-weight: 700; color: #1f1f1f; margin-top: 12px; margin-bottom: 4px; }
.seo-article p { font-size: 12.8px; line-height: 1.55; color: #333333; margin-bottom: 10px; }
.seo-article a { color: #1f1f1f; text-decoration: underline; font-weight: 600; }

.footer-bottom-brand { margin-top: 18px; padding-top: 6px; }
.footer-bottom-brand img { height: 34px; margin-bottom: 8px; display: block; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.footer-links a { font-size: 12.5px; color: #1a3a9c; text-decoration: underline; font-weight: 500; cursor: pointer; }
.copyright-text { font-size: 12px; color: #555555; }

/* Floating Logos */
.floating-gif-logo {
    position: fixed;
    bottom: 138px;
    left: calc(50% - 208px);
    width: 80px;
    height: 80px;
    object-fit: contain;
    cursor: pointer;
    z-index: 99;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
}

.chat-fab {
    position: fixed;
    bottom: 68px;
    right: calc(50% - 200px);
    width: 48px;
    height: 48px;
    background-color: #f37021;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 99;
    border: 2px solid rgba(255,255,255,0.4);
}

@media (max-width: 430px) {
    .floating-gif-logo { left: 6px; }
    .chat-fab { right: 15px; }
}

/* Bottom Sticky Action Bar (Toolbar) */
.bottom-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 430px;
    height: 58px;
    background: var(--toolbar-bg);
    display: flex;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.18);
}

.lang-switch {
    flex: 1;
    background-color: #d9dadb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 0 6px;
}

.bd-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #006a4e;
    position: relative;
    flex-shrink: 0;
}
.bd-flag::after {
    content: '';
    position: absolute;
    width: 11px;
    height: 11px;
    background-color: #f42a41;
    border-radius: 50%;
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
}

.lang-text {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    line-height: 1.2;
    color: #222;
    font-weight: 600;
}

.btn-login {
    flex: 1.1;
    background-color: #4f5bd5;
    color: #ffffff;
    border: none;
    font-size: 16.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-register {
    flex: 1.1;
    background-color: #ff6a00;
    color: #ffffff;
    border: none;
    font-size: 16.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Logged In Bottom Navigation Bar */
.logged-in-nav {
    width: 100%;
    height: 100%;
    background: var(--toolbar-bg);
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.nav-tab-item {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--toolbar-text-color);
    text-decoration: none;
    cursor: pointer;
    gap: 3px;
    transition: background-color 0.15s ease;
    user-select: none;
}

.nav-tab-item:active {
    background-color: rgba(255, 255, 255, 0.12);
}

.nav-svg-slot {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-svg-slot svg,
.nav-svg-slot img {
    width: 23px;
    height: 23px;
}

.nav-tab-item span {
    font-size: 13px;
    font-weight: 600;
    color: var(--toolbar-text-color);
    line-height: 1.1;
    letter-spacing: 0.2px;
}