/* Shared theme defaults */
:root {
    --theme-primary: #03A9F4;
    --theme-accent: #EF4444;
    --theme-page-background: #F8FAFC;
    --theme-surface: #FFFFFF;
    --theme-text: #1F2937;
    --theme-muted-text: #6B7280;
    --theme-border: #E5E7EB;
    --theme-font-family: 'Poppins', sans-serif;
    --theme-radius: 12px;
    --theme-button-radius: 8px;
    --theme-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

body.customer-theme.app-loading {
    overflow: hidden;
}

body.customer-theme #app-content {
    opacity: 1;
    visibility: visible;
    transition: opacity 260ms ease, visibility 260ms ease;
}

body.customer-theme.app-loading #app-content {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.customer-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: #ffffff;
    opacity: 1;
    visibility: visible;
    transition: opacity 280ms ease, visibility 280ms ease;
}

.app-ready .customer-loading-screen {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.customer-loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #e8f4f9;
    border-top-color: var(--theme-primary);
    border-right-color: var(--theme-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(3, 169, 244, 0.05);
    animation: customer-loading-spin 760ms linear infinite;
}

.loading-banner-skeleton,
.game-image-shell {
    background:
        linear-gradient(90deg, #e8f3f8 25%, #f7fcff 50%, #e8f3f8 75%);
    background-size: 200% 100%;
    animation: customer-loading-shimmer 1.25s ease-in-out infinite;
}

.game-image-shell {
    min-height: 8rem;
}

.game-card-image {
    opacity: 0;
    transition: opacity 220ms ease;
}

.game-card-image.is-loaded {
    opacity: 1;
}

.game-image-shell.is-loaded {
    background: #f8fafc;
    animation: none;
}

@keyframes customer-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes customer-loading-shimmer {
    to {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .customer-loading-spinner,
    .loading-banner-skeleton,
    .game-image-shell {
        animation: none;
    }
}

/* User-configurable customer theme */
body.customer-theme {
    background-color: var(--theme-page-background) !important;
    color: var(--theme-text);
    font-family: var(--theme-font-family);
}

body.customer-theme #home-sec,
body.customer-theme #account-sec,
body.customer-theme #tutorial-sec,
body.customer-theme .font-en,
body.customer-theme .font-bn,
body.customer-theme .lang-auto {
    font-family: var(--theme-font-family);
}

body.customer-theme .bg-white,
body.customer-theme .nav-gradient {
    background-color: var(--theme-surface) !important;
}

body.customer-theme .bg-slate-50,
body.customer-theme [class~="bg-[#f8fafc]"] {
    background-color: var(--theme-page-background) !important;
}

body.customer-theme .text-gray-800,
body.customer-theme .text-gray-700,
body.customer-theme .text-gray-600 {
    color: var(--theme-text) !important;
}

body.customer-theme .text-gray-500,
body.customer-theme .text-gray-400 {
    color: var(--theme-muted-text) !important;
}

body.customer-theme .border-gray-100,
body.customer-theme .border-gray-200,
body.customer-theme .border-gray-300 {
    border-color: var(--theme-border) !important;
}

body.customer-theme .text-sky-600,
body.customer-theme .text-blue-600,
body.customer-theme .active-tab {
    color: var(--theme-primary) !important;
}

body.customer-theme .bg-sky-600,
body.customer-theme [class~="bg-[#4a148c]"] {
    background-color: var(--theme-primary) !important;
}

body.customer-theme .bg-red-600 {
    background-color: var(--theme-accent) !important;
}

body.customer-theme .product-card,
body.customer-theme .pay-option-card {
    border-radius: var(--theme-radius);
    box-shadow: var(--theme-shadow);
}

body.customer-theme .product-card {
    background-color: var(--theme-surface);
    border-color: var(--theme-border);
}

body.customer-theme .product-card.selected {
    border-color: var(--theme-primary);
    background-color: color-mix(in srgb, var(--theme-primary) 8%, var(--theme-surface));
}

body.customer-theme .product-card.selected .product-bullet {
    background-color: var(--theme-primary);
}

body.customer-theme button,
body.customer-theme .pay-option-card {
    border-radius: var(--theme-button-radius);
}

.profile-page {
    background: linear-gradient(180deg, #eef4ff 0%, #f7faff 46%, #ffffff 100%) !important;
    color: #10204a;
}

.profile-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 0.9rem;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #dbe5f4;
}

.profile-page-kicker {
    margin: 0 0 0.15rem;
    color: #ef1b25;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.profile-page-head h2 {
    margin: 0;
    color: #0b194d;
    font-size: 1.2rem;
    font-weight: 800;
}

.profile-home-button {
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #ef1b25;
    border-radius: 0.65rem;
    box-shadow: 0 6px 14px rgba(239, 27, 37, 0.2);
}

.profile-hero {
    margin: 0.9rem 1rem 0.8rem;
    padding: 1.25rem 1rem 1.15rem;
    background: #ffffff;
    border: 1px solid #d9e5f5;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(20, 45, 95, 0.07);
}

.profile-hero > div:first-child > div:first-child {
    background: linear-gradient(135deg, #ef1b25, #0b194d) !important;
}

.profile-hero h2 {
    color: #0b194d !important;
    font-size: 1rem;
}

.profile-hero > div:last-child {
    color: #475569 !important;
    font-size: 0.72rem;
}

.profile-quick-actions {
    display: grid;
    gap: 0.65rem;
    margin: 0 1rem 1.15rem;
}

.profile-quick-actions button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem;
    text-align: left;
    background: #ffffff;
    border: 1px solid #d9e5f5;
    border-radius: 0.8rem;
    box-shadow: 0 4px 12px rgba(20, 45, 95, 0.05);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.profile-quick-actions button:hover {
    border-color: #a9c3ea;
    box-shadow: 0 7px 16px rgba(20, 45, 95, 0.09);
    transform: translateY(-1px);
}

.profile-action-icon {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    font-size: 0.9rem;
}

.profile-action-icon-red {
    color: #ef1b25;
    background: #fff0f1;
}

.profile-action-icon-blue {
    color: #1d67c1;
    background: #eaf3ff;
}

.profile-quick-actions strong,
.profile-quick-actions small {
    display: block;
}

.profile-quick-actions strong {
    color: #13204d;
    font-size: 0.75rem;
}

.profile-quick-actions small {
    margin-top: 0.12rem;
    color: #7a879c;
    font-size: 0.62rem;
}

.profile-action-arrow {
    margin-left: auto;
    color: #9aa8bd;
    font-size: 0.68rem;
}

.profile-stats-grid > div {
    border-color: #c9dbf4 !important;
    border-radius: 0.8rem !important;
    box-shadow: 0 5px 14px rgba(20, 45, 95, 0.05);
}

.profile-stats-grid h3 {
    color: #1d67c1 !important;
}

.profile-stats-grid p {
    color: #25314a !important;
}

.profile-account-card > div,
.profile-user-card > div {
    overflow: hidden;
    border: 1px solid #d9e5f5 !important;
    border-radius: 0.9rem;
    box-shadow: 0 6px 16px rgba(20, 45, 95, 0.05);
}

.profile-account-card > div > div:first-child,
.profile-user-card > div > div:first-child {
    color: #0b194d !important;
    background: #ffffff;
}

.profile-account-card > div > div:last-child,
.profile-user-card > div > div:last-child {
    border-color: #e5edf8 !important;
}

.profile-user-card button {
    border: 1px solid #ffd6d8;
    border-radius: 0.75rem;
}

.header-account-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex: 0 0 auto;
}

.header-balance-pill {
    display: inline-flex;
    min-width: 4rem;
    height: 2.1rem;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    padding: 0.35rem 0.65rem;
    color: #ffffff;
    background: #159bd5;
    border: 1px solid #0e85bb;
    border-radius: 999px;
    box-shadow: 0 4px 9px rgba(14, 133, 187, 0.2);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.header-balance-pill i {
    font-size: 0.62rem;
    opacity: 0.9;
}

.history-page {
    min-height: calc(100vh - 5rem);
    background: #f4f7fb;
}

.history-page-head {
    padding: 1.15rem 1rem 0.85rem;
    background: #ffffff;
    border-bottom: 1px solid #dbe5f4;
}

.history-page-kicker {
    margin: 0 0 0.15rem;
    color: #ef1b25;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.history-page-head h2 {
    margin: 0;
    color: #0b194d;
    font-size: 1.25rem;
    font-weight: 800;
}

.history-page-subtitle {
    margin: 0.22rem 0 0.9rem;
    color: #7a879c;
    font-size: 0.7rem;
}

.history-tabs {
    display: flex;
    width: 100%;
    max-width: 18rem;
    margin-inline: auto;
    gap: 0.35rem;
    padding: 0.25rem;
    background: #edf3fc;
    border: 1px solid #d9e5f5;
    border-radius: 0.8rem;
}

.history-tab {
    display: inline-flex;
    min-width: 0;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.58rem 0.7rem;
    color: #70809a;
    background: transparent;
    border: 0;
    border-radius: 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.history-tab i {
    font-size: 0.7rem;
}

.history-tab.is-active {
    color: #ffffff;
    background: #ef1b25;
    box-shadow: 0 5px 12px rgba(239, 27, 37, 0.2);
}

.history-panel {
    padding: 0.9rem 1rem 1.5rem;
}

.history-panel .bg-white {
    border-color: #d9e5f5;
    box-shadow: 0 5px 14px rgba(20, 45, 95, 0.05);
}

.header-profile-button {
    display: inline-flex;
    width: 2.1rem;
    height: 2.1rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #ffffff;
    background: #0e9b90;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(14, 155, 144, 0.2);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    font-weight: 700;
}

.header-profile-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Styles originally used by index.html */
/* Global Font: Poppins for everywhere except Home */
        body { 
            font-family: 'Poppins', sans-serif; 
            background-color: #f8fafc; 
        }

        /* Home Panel Specific Font: Bree Serif */
        #home-sec {
            font-family: 'Bree Serif', serif;
        }
        
        /* Account Section Font: Bree Serif for English */
        #account-sec {
            font-family: 'Bree Serif', serif;
        }
        
        /* Tutorial Section Font: Bree Serif for English */
        #tutorial-sec {
            font-family: 'Bree Serif', serif;
        }
        
        .nav-gradient { background: white; color: #1e293b; }
        .active-tab { color: #03a9f4 !important; }
        .hidden { display: none !important; }

.admin-image-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    min-height: 5rem;
    border: 1px solid var(--dark-border, #2d2d2d);
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.18);
}

.admin-image-preview span {
    color: #9ca3af;
    font-size: 0.75rem;
}

.admin-image-preview img {
    display: block;
    width: 7rem;
    height: 4rem;
    object-fit: contain;
    border: 1px solid rgba(249, 115, 22, 0.45);
    border-radius: 0.5rem;
    background: #090909;
}

        .brand-site-name {
            color: #1e293b;
            font-family: 'Orbitron', sans-serif;
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
            font-size: 1.1rem;
            font-style: italic;
            font-weight: 800;
            letter-spacing: -0.06em;
            line-height: 1.1;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        .brand-site-prefix {
            font-size: 1.12em;
            font-weight: 900;
            letter-spacing: -0.08em;
        }

        .header-logo-frame {
            display: flex;
            width: 2.5rem;
            height: 2.5rem;
            flex: 0 0 2.5rem;
            align-items: center;
            overflow: hidden;
            border-radius: 9999px;
            background: #ffffff;
        }

        .header-brand-logo {
            display: block;
            width: auto;
            height: 2.5rem;
            max-width: none;
            object-fit: contain;
            object-position: left center;
        }
        
        /* Language-specific fonts */
        .font-en { font-family: 'Poppins', sans-serif; }
        .font-bn { font-family: 'Noto Serif Bengali', serif; }
        
        /* Auto-detect language */
        .lang-auto { 
            font-family: 'Poppins', sans-serif;
        }
        
        /* Home section er vitor jodi lang-auto class thake, sheta Bree Serif hobe */
        #home-sec .lang-auto {
            font-family: 'Bree Serif', serif;
        }

        .lang-auto:lang(bn), .lang-auto:lang(bn-BD) { 
            font-family: 'Noto Serif Bengali', serif;
        }
        
        .notice-bar {
            display: flex;
            align-items: center;
            min-height: 42px;
            overflow: hidden;
            color: #ffffff;
            background: var(--theme-primary);
            border: 1px solid rgba(255, 255, 255, 0.28);
            border-radius: 10px;
            box-shadow: 0 3px 10px rgba(2, 132, 199, 0.18);
        }

        .notice-label {
            display: flex;
            align-items: center;
            align-self: stretch;
            flex: 0 0 auto;
            gap: 7px;
            padding: 0 13px;
            background: color-mix(in srgb, var(--theme-primary) 72%, #075985);
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.08em;
        }

        .notice-label-dot {
            width: 7px;
            height: 7px;
            flex: 0 0 auto;
            border-radius: 999px;
            background: #ffffff;
            box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
        }

        .notice-track {
            min-width: 0;
            flex: 1 1 auto;
            overflow: hidden;
            display: flex;
            align-items: center;
            height: 42px;
        }

        .notice-scroll {
            display: block;
            width: 100%;
            min-width: 0;
            max-width: 100%;
            overflow: hidden;
            padding: 0;
            white-space: nowrap;
            font-size: 12px;
            line-height: 1;
        }

        .notice-scroll > span {
            display: inline-block;
            width: max-content;
            max-width: none;
            height: 42px;
            padding: 0 10px;
            white-space: nowrap !important;
            line-height: 42px;
            animation: notice-marquee var(--notice-duration, 18s) linear infinite;
            will-change: transform;
        }

        .notice-track:hover .notice-scroll,
        .notice-track:focus-within .notice-scroll {
            /* Keep the whole track stable while pausing the moving text. */
        }

        .notice-track:hover .notice-scroll > span,
        .notice-track:focus-within .notice-scroll > span {
            animation-play-state: paused;
        }

        @media (prefers-reduced-motion: reduce) {
            .notice-scroll > span {
                animation: none;
                width: 100%;
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
            }
        }

        .notice-close {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            flex: 0 0 auto;
            margin-right: 5px;
            color: #ffffff;
            background: rgba(2, 87, 120, 0.28);
            border: 1px solid rgba(255, 255, 255, 0.45);
            border-radius: 999px;
            font-size: 11px;
            transition: background-color 0.2s, transform 0.2s;
        }

        .notice-close:hover {
            background: rgba(2, 87, 120, 0.48);
            transform: scale(1.06);
        }

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

        @keyframes notice-marquee {
            0% { transform: translateX(100%); }
            100% { transform: translateX(-100%); }
        }
        
        .method-card { transition: all 0.2s; border: 2px solid transparent; }
        .method-card:active { transform: scale(0.95); }
        
        @keyframes fadeInUp { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
        .animate-fade-in { animation: fadeInUp 0.4s ease-out forwards; }

        /* PRODUCT CARD STYLES UPDATED FOR NEW UI */
        .product-card {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            padding: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .product-card:hover { border-color: #81d4fa; }
        .product-card.selected {
            border: 1.5px solid #03a9f4;
            background-color: #f0f9ff;
        }
        .product-bullet {
            height: 12px; width: 12px; background-color: #e5e7eb; border-radius: 50%; margin-right: 8px;
        }
        .product-card.selected .product-bullet { background-color: #03a9f4; }
        
        #fab-container.is-open #fab-toggler {
            background-color: #dc2626; /* red-600 */
        }
        #fab-container.is-open #fab-icon-open {
            transform: rotate(-180deg) scale(0);
            opacity: 0;
        }
        #fab-container.is-open #fab-icon-close {
            transform: scale(1) rotate(0);
            opacity: 1;
        }
        #fab-container.is-open #fab-options {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .line-clamp-2 {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .aspect-video {
            aspect-ratio: 16 / 9;
        }

        /* --- NEW ADD MONEY STYLES --- */
        .step-transition {
            animation: slideInRight 0.3s ease-out forwards;
        }
        @keyframes slideInRight {
            from { transform: translateX(10%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        
        /* Remove arrows from number input */
        input[type=number]::-webkit-inner-spin-button, 
        input[type=number]::-webkit-outer-spin-button { 
            -webkit-appearance: none; 
            margin: 0; 
        }
        
        /* Method Specific Colors for Dynamic UI */
        .theme-bkash { background-color: #e2136e !important; border-color: #e2136e !important; }
        .theme-nagad { background-color: #f7941d !important; border-color: #f7941d !important; }
        .theme-rocket { background-color: #8c3494 !important; border-color: #8c3494 !important; }
        .theme-upay { background-color: #1261b5 !important; border-color: #1261b5 !important; }
        
        .text-theme-bkash { color: #e2136e !important; }
        .text-theme-nagad { color: #f7941d !important; }
        .text-theme-rocket { color: #8c3494 !important; }
        .text-theme-upay { color: #1261b5 !important; }

        /* PAYMENT OPTION CARD STYLES */
        .pay-option-card {
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            overflow: hidden;
            background: white;
            cursor: pointer;
            position: relative;
            transition: all 0.2s;
        }
        .pay-option-card.selected {
            border: 2px solid #ef4444; /* Red border for selected like image */
        }
        .pay-option-card.selected::before {
            content: '\f00c';
            font-family: 'Font Awesome 5 Free';
            font-weight: 900;
            position: absolute;
            top: 0;
            left: 0;
            background: #ef4444;
            color: white;
            font-size: 10px;
            padding: 2px 6px;
            border-bottom-right-radius: 6px;
            z-index: 10;
        }

/* Styles originally used by admin.html */
body { background-color: #09090B; color: #ffffff; font-family: 'Poppins', sans-serif; }
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: #18181A; }
        ::-webkit-scrollbar-thumb { background: #F49E0B; border-radius: 4px; }
        
        .flat-input { 
            background-color: #09090B; 
            border: 1px solid #27272A; 
            color: #ffffff; 
            padding: 12px 16px; 
            width: 100%; 
            outline: none; 
            transition: border-color 0.2s;
            border-radius: 8px;
        }
        .flat-input:focus { border-color: #F49E0B; }
        
        .flat-btn { 
            background-color: #F49E0B; 
            color: #ffffff; 
            padding: 12px 24px; 
            border: none; 
            cursor: pointer; 
            font-weight: 600; 
            transition: background-color 0.2s;
            border-radius: 8px;
        }
        .flat-btn:hover { background-color: #FFB640; }
        .flat-btn-danger { background-color: #DC2626; }
        .flat-btn-danger:hover { background-color: #EF4444; }
        .flat-btn-outline { background-color: transparent; border: 1px solid #F49E0B; color: #F49E0B; }
        .flat-btn-outline:hover { background-color: #F49E0B; color: #ffffff; }

        .flat-table-container {
            background-color: #18181A;
            border-radius: 12px;
            overflow-x: auto;
        }
        .flat-table { width: 100%; border-collapse: collapse; min-width: 700px; }
        .flat-table th, .flat-table td { 
            border-bottom: 1px solid #27272A; 
            padding: 16px; 
            text-align: left; 
        }
        .flat-table th { background-color: #1f1f21; color: #F49E0B; font-weight: 600; text-transform: uppercase; font-size: 0.875rem; letter-spacing: 0.05em; }
        .flat-table tr:hover td { background-color: #1a1a1c; }
        .flat-table td { font-size: 0.95rem; }

        .nav-link { 
            border-radius: 8px; 
            margin: 4px 12px;
            color: #A1A1AA;
            transition: all 0.2s ease-in-out;
        }
        .nav-link.active { 
            background-color: #F49E0B; 
            color: #ffffff;
            box-shadow: 0 4px 6px -1px rgba(244, 158, 11, 0.2), 0 2px 4px -1px rgba(244, 158, 11, 0.1);
        }
        .nav-link:hover:not(.active) {
            background-color: #27272A;
            color: #F49E0B;
        }

        .card {
            background-color: #18181A;
            border-radius: 12px;
            padding: 24px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        .admin-loading-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: #09090b;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 24px;
            backdrop-filter: blur(6px);
        }
        .admin-loading-card {
            width: min(100%, 320px);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            padding: 30px 24px 26px;
            border: 1px solid rgba(244, 158, 11, 0.28);
            border-radius: 18px;
            background: linear-gradient(145deg, #1f1f21, #141416);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
            text-align: center;
        }
        .admin-loading-mark {
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 14px;
            color: #f49e0b;
            background: rgba(244, 158, 11, 0.12);
            font-size: 22px;
        }
        .admin-loading-card p {
            margin: 0;
            color: #ffffff;
            font-size: 15px;
            font-weight: 700;
        }
        .admin-loading-card span {
            color: #a1a1aa;
            font-size: 12px;
        }
        .spinner {
            border: 4px solid rgba(244, 158, 11, 0.1);
            border-left-color: #F49E0B;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

/* Responsive controls and text protection */
*, *::before, *::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

button,
input,
select,
textarea {
    max-width: 100%;
    font-family: inherit;
}

button,
.flat-btn,
.flat-btn-outline {
    min-width: 0;
    min-height: 44px;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: normal;
}

.flat-btn,
.flat-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: normal;
}

.flat-btn > span,
.flat-btn-outline > span,
button > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.flat-input,
select,
textarea,
input {
    min-width: 0;
    max-width: 100%;
}

select.flat-input {
    white-space: normal;
    text-overflow: ellipsis;
}

.card,
.product-card,
.pay-option-card {
    min-width: 0;
    max-width: 100%;
}

.customer-theme .flex,
.customer-theme .grid,
.customer-theme a,
.customer-theme button,
.customer-theme p,
.customer-theme h1,
.customer-theme h2,
.customer-theme h3,
.customer-theme h4 {
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.customer-theme .flex > * {
    min-width: 0;
}

.product-card > *,
.pay-option-card > * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.product-card {
    gap: 0.5rem;
}

.product-card > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.product-card > :last-child {
    flex: 0 1 auto;
    white-space: nowrap;
}

.pay-option-card {
    width: 100%;
}

#home-sec {
    min-width: 0;
    padding-bottom: 6rem;
}

#topup-sec {
    padding-bottom: 6rem;
}

#home-whatsapp,
#home-telegram,
#home-app-dl {
    overflow-wrap: normal;
    word-break: normal;
}

#services-list,
#services-list > div,
#products-grid,
#game-rules-text {
    min-width: 0;
    max-width: 100%;
}

#home-sec [id^="contact-"] > div {
    flex-wrap: wrap;
    row-gap: 0.35rem;
}

#home-sec [id^="contact-"] > div > span:last-child {
    margin-left: auto;
    text-align: right;
}

.customer-theme #fab-container {
    max-width: calc(100vw - 1rem);
}

.flat-table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}

.flat-table {
    min-width: 700px;
}

.flat-table th,
.flat-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.flat-table th {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

#main-content .flat-table td {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

#main-content .flat-table td .break-all,
#main-content .flat-table td .break-words {
    overflow-wrap: normal;
    word-break: normal;
}

.flat-table td select,
.flat-table td .flat-btn,
.flat-table td .flat-btn-outline {
    white-space: nowrap;
}

#payment-theme-card .payment-instructions p {
    overflow-wrap: normal;
    word-break: normal;
}

#payment-theme-card #pay-admin-number {
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
}

.copy-payment-number {
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.flat-table .flat-btn,
.flat-table .flat-btn-outline {
    min-height: 40px;
    padding: 10px 14px;
}

#fab-help-text {
    max-width: min(180px, calc(100vw - 96px));
    overflow-wrap: anywhere;
    text-align: center;
}

#main-content,
#main-content > div,
#main-content .view-section,
#main-content .card {
    min-width: 0;
    max-width: 100%;
}

#main-content > header > :first-child,
#main-content > header > :first-child > :last-child {
    min-width: 0;
}

#main-content > header h2,
#main-content > header p {
    overflow-wrap: anywhere;
}

#main-content .flex > .flat-input,
#main-content .flex > input,
#main-content .flex > select,
#main-content .flex > textarea {
    min-width: 0;
}

.flat-btn.w-max,
.flat-btn-outline.w-max {
    width: max-content;
    max-width: 100%;
}

@media (max-width: 640px) {
    body.customer-theme {
        font-size: 13px;
    }

    body:not(.customer-theme) {
        font-size: 13px;
    }

    .card {
        padding: 16px;
    }

    .flat-btn,
    .flat-btn-outline {
        padding: 10px 14px;
        font-size: clamp(0.6875rem, 2.7vw, 0.8125rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .notice-scroll > span {
        padding-inline: 8px;
    }

    .customer-theme #app-content {
        width: 100%;
        max-width: 100%;
    }

    .customer-theme main {
        width: 100%;
        min-width: 0;
    }

    .customer-theme .product-card {
        padding: 9px 8px;
    }

    #home-whatsapp,
    #home-telegram,
    #home-app-dl {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        height: auto;
        min-height: 68px;
        padding: 8px 4px;
    }

    #home-whatsapp > span,
    #home-telegram > span,
    #home-app-dl > span {
        max-width: 100%;
        text-align: center;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    #fab-help-text {
        display: none;
    }

    #fab-container {
        right: 0.75rem;
        bottom: 5.25rem;
    }

    #fab-toggler {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1rem;
    }

    .customer-theme .pay-option-card {
        min-height: 92px;
    }

    .customer-theme h1 {
        font-size: 1.35rem;
    }

    .customer-theme h2 {
        font-size: 1.2rem;
    }

    .customer-theme h3 {
        font-size: 1rem;
    }

    .customer-theme button,
    .customer-theme .nav-item span,
    .customer-theme #home-whatsapp > span,
    .customer-theme #home-telegram > span,
    .customer-theme #home-app-dl > span {
        font-size: clamp(0.625rem, 2.7vw, 0.8125rem);
        line-height: 1.2;
    }

    .customer-theme .nav-item {
        min-width: 0;
        white-space: nowrap;
    }

    .customer-theme .nav-item span {
        max-width: 4.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .customer-theme .pay-option-card,
    .customer-theme .product-card {
        font-size: clamp(0.6875rem, 2.8vw, 0.8125rem);
    }

    .customer-theme .pay-option-card span,
    .customer-theme .product-card span {
        line-height: 1.2;
    }

    .customer-theme #account-sec #acc-email,
    .customer-theme #account-sec #acc-phone,
    .customer-theme #game-rules-text {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .customer-theme label,
    .customer-theme input,
    .customer-theme select,
    .customer-theme textarea {
        font-size: 0.8125rem;
    }

    .customer-theme .nav-gradient {
        font-size: 0.7rem;
    }

    body:not(.customer-theme) .card h3 {
        font-size: 1rem;
    }

    body:not(.customer-theme) .card h2,
    body:not(.customer-theme) #main-content h2 {
        font-size: 1.15rem;
    }

    body:not(.customer-theme) .flat-input,
    body:not(.customer-theme) select,
    body:not(.customer-theme) textarea {
        font-size: 0.8125rem;
    }

    body:not(.customer-theme) .flat-table th,
    body:not(.customer-theme) .flat-table td {
        font-size: 0.75rem;
    }

    body:not(.customer-theme) .flat-table {
        min-width: 760px;
    }

    body:not(.customer-theme) .flat-table th {
        font-size: 0.6875rem;
        letter-spacing: 0.02em;
    }

    body:not(.customer-theme) .nav-link,
    body:not(.customer-theme) .flat-btn,
    body:not(.customer-theme) .flat-btn-outline {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body:not(.customer-theme) .nav-link {
        font-size: clamp(0.6875rem, 2.8vw, 0.8125rem);
    }

    body:not(.customer-theme) .flat-table td {
        font-size: clamp(0.6875rem, 2.5vw, 0.75rem);
    }

    #payment-theme-card .payment-instructions {
        padding: 0.875rem;
        font-size: 0.78rem;
        line-height: 1.4;
    }

    #payment-theme-card #pay-admin-number {
        font-size: 1.15rem;
        letter-spacing: 0.04em;
    }

    #payment-theme-card .copy-payment-number {
        padding-inline: 0.45rem;
        font-size: 0.625rem;
        gap: 0.25rem;
    }

    #main-content > div {
        padding: 12px;
    }

    #main-content .card {
        padding: 14px;
    }

    #main-content .flat-table-container {
        margin-inline: -2px;
        width: calc(100% + 4px);
    }

    .flat-table th,
    .flat-table td {
        padding: 12px 10px;
    }

    #main-content > header {
        flex-wrap: wrap;
        gap: 12px;
    }

    #main-content > header > :last-child {
        margin-left: auto;
    }

    .notice-label {
        padding-inline: 10px;
    }

    .notice-scroll {
        padding-inline: 8px;
    }
}
