/* =========================================================
   LIGHT MODE + THEME TOGGLE BUTTON
   Loaded last in index.html. Toggle script: /assets/js/theme-toggle.js
   Every light rule is scoped to html[data-theme="light"], so dark mode
   (the default blue theme) is untouched.
   Brand cards (wallet card, game cards, Green/Violet/Red buttons, timer)
   keep their colours on purpose; only page backgrounds and plain panels
   turn light.
   ========================================================= */

/* ---------- Toggle button (both modes) ---------- */
#theme-toggle {
    position: fixed;
    z-index: 1999; /* below Vant popups/overlays (2000+) */
    bottom: 2.2rem;
    /* bottom-left: the right edge has the floating wheel/chat widgets.
       Stays inside the centred 10rem app column on wide screens. */
    left: max(.32rem, calc(50% - 5rem + .32rem));
    width: .96rem;
    height: .96rem;
    padding: .2rem;
    border-radius: 50%;
    border: 1px solid rgba(124, 192, 255, .7);
    background: linear-gradient(180deg, #2F8BFF 0%, #0B57D9 100%);
    color: #FFFFFF;
    box-shadow: 0 .08rem .26667rem rgba(0, 0, 0, .35), 0 0 .16rem rgba(47, 139, 255, .45);
    cursor: pointer;
    opacity: .92;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease-out, opacity .15s;
}

#theme-toggle:active {
    transform: scale(.92);
}

#theme-toggle svg {
    display: block;
    width: 100%;
    height: 100%;
}

html[data-theme="light"] #theme-toggle {
    border-color: #D6E2F3;
    background: #FFFFFF;
    color: #0B57D9;
    box-shadow: 0 .08rem .26667rem rgba(16, 33, 58, .18);
}

@media (prefers-reduced-motion: reduce) {
    #theme-toggle { transition: none; }
}

/* ---------- Theme variables ---------- */
html[data-theme="light"] {
    --main-color: #168BFF !important;
    --text_color_black: #FFFFFF !important;

    --bg_color_L1: #F2F5FA !important;
    --bg_color_L2: #FFFFFF !important;
    --bg_color_L3: #E6ECF5 !important;

    --text_color_L1: #10213A !important;
    --text_color_L2: #4A5C78 !important;
    --text_color_L3: #8090A8 !important;
    --text_color_L4: #FFFFFF !important;

    --Dividing-line_color: #DDE3EC !important;
    --sheet_nva_color: #E9EEF6 !important;
    --sheet_detail_bg_color: #F7F9FC !important;

    --van-popup-background: #FFFFFF !important;
    --van-picker-mask-color: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)) !important;

    color-scheme: light;
}

/* ---------- Page ---------- */
html[data-theme="light"],
html[data-theme="light"] body {
    background: #E9EEF6 !important;
    color: #10213A !important;
}

html[data-theme="light"] #app {
    background: #F2F5FA !important;
}

/* ---------- Header ----------
   Stays brand blue in light mode: the logo (/assets/images/logo.png) and the
   header titles are white, so a white header would hide them. */
html[data-theme="light"] .navbar,
html[data-theme="light"] .navbar__content {
    background: linear-gradient(90deg, #0B4FC4 0%, #168BFF 100%) !important;
}

html[data-theme="light"] .navbar__content {
    border-bottom: 0 !important;
}

html[data-theme="light"] .navbar__content-center,
html[data-theme="light"] .navbar__content-center span,
html[data-theme="light"] .navbar__content-left svg,
html[data-theme="light"] .navbar__content-left .van-icon,
html[data-theme="light"] .navbar__content-right svg {
    color: #FFFFFF !important;
}

/* login / register page heading (white title text) */
html[data-theme="light"] .login__container-heading {
    background: linear-gradient(135deg, #168BFF 0%, #0B4FC4 100%) !important;
}

/* ---------- Banner + notice bar ---------- */
html[data-theme="light"] .swiper_box {
    background: transparent !important;
}

html[data-theme="light"] .swiper_box .my-swipe img {
    filter: drop-shadow(0 4px 10px rgba(16, 33, 58, .15)) !important;
}

html[data-theme="light"] .noticeBar__container,
html[data-theme="light"] .bluehome .noticeBar__container,
html[data-theme="light"] body #app .WinGo__C .noticeBar__container {
    background: #FFFFFF !important;
    border: 1px solid #D6E2F3 !important;
    box-shadow: 0 2px 8px rgba(16, 33, 58, .06) !important;
    color: #10213A !important;
}

html[data-theme="light"] .noticeBar__container * {
    color: #10213A !important;
}

html[data-theme="light"] body #app .WinGo__C .noticeBar__container button,
html[data-theme="light"] body #app .WinGo__C .noticeBar__container button * {
    color: #FFFFFF !important;
}

/* ---------- Section titles + home lists ---------- */
html[data-theme="light"] .hot_container .title,
html[data-theme="light"] .hot_container .title span,
html[data-theme="light"] .gamesList__container-title {
    color: #10213A !important;
}

html[data-theme="light"] .hot_container .platform .list .item,
html[data-theme="light"] .hot_container .popular .list .item,
html[data-theme="light"] .onlineGamesItem,
html[data-theme="light"] .gamesList__container-list__item {
    background: #FFFFFF !important;
    border: 1px solid #D6E2F3 !important;
    box-shadow: 0 3px 10px rgba(16, 33, 58, .08) !important;
}

html[data-theme="light"] .hot_container .platform .list .win-odds,
html[data-theme="light"] .hot_container .popular .list .win-odds {
    background: #EEF4FC !important;
    border-color: #D6E2F3 !important;
}

html[data-theme="light"] .hot_container .platform .list .win-odds span,
html[data-theme="light"] .hot_container .popular .list .win-odds span {
    color: #10213A !important;
}

html[data-theme="light"] .hot_container .platform .list .win-odds .win-p span,
html[data-theme="light"] .hot_container .popular .list .win-odds .win-p span {
    color: #FFFFFF !important;
}

/* winners / rank lists use white text on now-light rows */
html[data-theme="light"] .luckyWinners__container-wrapper__item-winAmount h1,
html[data-theme="light"] .luckyWinners__container-wrapper__item-winAmount span,
html[data-theme="light"] .luckyWinners__container-wrapper__item-winAmount {
    color: #10213A !important;
}

/* ---------- Bottom navigation ---------- */
html[data-theme="light"] .tabbar__container {
    background: #FFFFFF !important;
    border-top: 1px solid #DDE3EC !important;
    box-shadow: 0 -4px 16px rgba(16, 33, 58, .08) !important;
}

html[data-theme="light"] .tabbar__container-item {
    color: #6B7C96 !important;
}

html[data-theme="light"] .tabbar__container-item.active,
html[data-theme="light"] .tabbar__container-item.active svg,
html[data-theme="light"] .tabbar__container-item:nth-child(3) {
    color: #168BFF !important;
}

html[data-theme="light"] .tabbar__container-item:nth-child(3) svg {
    filter: drop-shadow(0 4px 6px rgba(16, 33, 58, .2)) drop-shadow(0 0 10px rgba(22, 139, 255, .35)) !important;
}

/* ---------- Popups, dialogs, cells ---------- */
html[data-theme="light"] .van-popup,
html[data-theme="light"] .van-dialog {
    background: #FFFFFF !important;
    color: #10213A !important;
}

html[data-theme="light"] .van-cell {
    background: #FFFFFF !important;
    color: #10213A !important;
}

/* ---------- Home header + member bar ---------- */
html[data-theme="light"] .bluehome .hb-member {
    background: #FFFFFF;
    border-color: #D6E2F3;
    box-shadow: 0 2px 8px rgba(16, 33, 58, .06);
}

html[data-theme="light"] .bluehome .hb-member__name,
html[data-theme="light"] .bluehome .hb-member--guest {
    color: #10213A;
}

html[data-theme="light"] .bluehome .hb-member__amt {
    color: #C98A00;
}

html[data-theme="light"] .bluehome .hb-member__avatar {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234A5C78'%3E%3Ccircle cx='12' cy='8' r='4.5'/%3E%3Cpath d='M3 21c0-4.5 4-7.5 9-7.5s9 3 9 7.5z'/%3E%3C/svg%3E");
}

/* =========================================================
   WIN GO GAME PAGE
   ========================================================= */
html[data-theme="light"] #app .WinGo__C {
    background: #F2F5FA;
}

html[data-theme="light"] #app .WinGo__C .GameList__C-item {
    background: #FFFFFF;
    border-color: #D6E2F3;
    box-shadow: 0 2px 8px rgba(16, 33, 58, .06);
}

html[data-theme="light"] #app .WinGo__C .GameList__C-item > div {
    color: #4A5C78;
}

html[data-theme="light"] #app .WinGo__C .GameList__C-item.active > div {
    color: #FFFFFF;
}

html[data-theme="light"] #app .WinGo__C .Betting__C-numC {
    background: #FFFFFF;
    border-color: #D6E2F3;
    box-shadow: 0 2px 8px rgba(16, 33, 58, .06);
}

html[data-theme="light"] #app .WinGo__C .Betting__C-numC > div::after {
    background: radial-gradient(ellipse at center, rgba(16, 33, 58, .18) 0%, rgba(16, 33, 58, 0) 70%);
}

html[data-theme="light"] #app .WinGo__C .Betting__C-multiple-l {
    color: #9A6400;
    border-color: #E0A92E;
    background: #FFF6DE;
}

html[data-theme="light"] #app .WinGo__C .Betting__C-multiple-r {
    color: #4A5C78;
    border-color: #D6E2F3;
    background: #FFFFFF;
}

html[data-theme="light"] #app .WinGo__C .Betting__C-multiple-r.active {
    color: #FFFFFF;
    border-color: #8CC8FF;
    background: linear-gradient(180deg, #3D95FF 0%, #1659E0 100%);
}

/* game history / my history tables below the betting panel */
html[data-theme="light"] #app .WinGo__C .GameRecord__C,
html[data-theme="light"] #app .WinGo__C .MyGameRecord__C {
    background: #FFFFFF;
}

/* =========================================================
   WIN GO CHART TAB (.wg-dash)
   ========================================================= */
html[data-theme="light"] .wg-dash {
    --wg-muted: #6B7C96;
    color: #10213A;
}

html[data-theme="light"] .wg-dash .wg-card {
    background: #FFFFFF;
    border-color: #D6E2F3;
    box-shadow: 0 2px 8px rgba(16, 33, 58, .06);
}

html[data-theme="light"] .wg-dash .wg-seg span,
html[data-theme="light"] .wg-dash .wg-tools span {
    background: #F2F5FA;
    border-color: #D6E2F3;
}

html[data-theme="light"] .wg-dash .wg-seg span.on,
html[data-theme="light"] .wg-dash .wg-tools span.on {
    color: #FFFFFF;
}

html[data-theme="light"] .wg-dash .wg-tools .wg-mode,
html[data-theme="light"] .wg-dash .wg-dl b,
html[data-theme="light"] .wg-dash .wg-miss em {
    color: #10213A;
}

html[data-theme="light"] .wg-dash .wg-grid { stroke: rgba(16, 33, 58, .1); }
html[data-theme="light"] .wg-dash .wg-lbs { stroke: rgba(16, 33, 58, .3); }
html[data-theme="light"] .wg-dash .wg-dt2 { fill: #10213A; }
html[data-theme="light"] .wg-dash .wg-l1 { stroke: #D99A00; }

html[data-theme="light"] .wg-dash .wg-row {
    border-top-color: #EEF2F7;
}

/* =========================================================
   ACCOUNT PAGE (#/main)
   Profile header + total balance cards keep their blue look.
   ========================================================= */
html[data-theme="light"] #app div:has(> .userinfo-content) {
    background:
        radial-gradient(ellipse 120% 35% at 50% 0%, rgba(40, 110, 255, .14) 0%, rgba(40, 110, 255, 0) 70%),
        #F2F5FA;
}

html[data-theme="light"] #app .financialServices__container-box > div,
html[data-theme="light"] #app .financialServices__container-footer > div,
html[data-theme="light"] #app .settingPanel__container,
html[data-theme="light"] #app .serviceCenter__container {
    border: 1px solid #D6E2F3;
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(16, 33, 58, .07);
}

html[data-theme="light"] #app .financialServices__container-box > div::after {
    border-color: #8090A8;
}

html[data-theme="light"] #app .financialServices__container-box-para h3,
html[data-theme="light"] #app .settingPanel__container-items__title span,
html[data-theme="light"] #app .serviceCenter__container h1 {
    color: #10213A;
}

html[data-theme="light"] #app .financialServices__container-box > div span,
html[data-theme="light"] #app .settingPanel__container-items__title span::after,
html[data-theme="light"] #app .settingPanel__container-items-right span {
    color: #6B7C96;
}

html[data-theme="light"] #app .settingPanel__container-items-right .van-icon {
    color: #8090A8 !important;
}

html[data-theme="light"] #app .settingPanel__container-items__item.ar-1px-b::after {
    border-color: #E6ECF5 !important;
    background-color: #E6ECF5 !important;
}

html[data-theme="light"] #app .settingPanel__container-items__item svg {
    color: #168BFF;
    background-color: #E8F2FF;
    box-shadow: inset 0 0 0 1px #D6E2F3;
}

html[data-theme="light"] #app .serviceCenter__container-items__item {
    border-color: #D6E2F3;
    background: #F2F5FA;
    color: #10213A;
}

/* =========================================================
   DEPOSIT PAGE (#/wallet/Recharge)
   Balance card and the yellow Deposit button keep their look.
   ========================================================= */
html[data-theme="light"] .Recharge__box {
    --dp-card: #FFFFFF;
    --dp-tile: #F4F7FC;
    --dp-border: #D6E2F3;
    --dp-muted: #6B7C96;
    background:
        radial-gradient(120% 40% at 50% 0%, rgba(30, 110, 255, .1) 0%, rgba(30, 110, 255, 0) 70%),
        #F2F5FA;
}

html[data-theme="light"] .Recharge__box .navbar__content-right .title {
    color: #10213A;
    border-color: #D6E2F3;
    background: #FFFFFF;
}

html[data-theme="light"] .Recharge__box .navbar__content-right .title::before {
    filter: invert(1) brightness(.3);
}

html[data-theme="light"] .Recharge__box .pm-head__title,
html[data-theme="light"] .Recharge__box .Recharge__container-tabcard__items[data-v-4f3d8608],
html[data-theme="light"] .Recharge__box .Recharge__content-quickInfo__title .title[data-v-9e03166f],
html[data-theme="light"] .Recharge__box .Recharge__content-paymoney__title[data-v-9e03166f],
html[data-theme="light"] .Recharge__box .Recharge__content-quickInfo__item .other > div[data-v-9e03166f]:first-child,
html[data-theme="light"] .Recharge__box .Recharge__content-quickInfo__item .usdt_icon > div > div[data-v-9e03166f]:first-child,
html[data-theme="light"] .Recharge__box .Recharge__content-paymoney__money-list__item[data-v-9e03166f],
html[data-theme="light"] .Recharge__box .pa-bonus__text b {
    color: #10213A;
}

html[data-theme="light"] .Recharge__box .boxStyle[data-v-9e03166f] {
    box-shadow: 0 2px 10px rgba(16, 33, 58, .07);
}

html[data-theme="light"] .Recharge__box .Recharge__container-tabcard__items.active[data-v-4f3d8608] {
    background:
        radial-gradient(120% 85% at 50% 0%, rgba(255, 205, 70, .35) 0%, rgba(255, 205, 70, .08) 55%, rgba(255, 205, 70, 0) 80%),
        #FFFBEF !important;
    color: #10213A;
    box-shadow: 0 0 .26667rem rgba(255, 200, 60, .45), inset 0 0 0 1px rgba(255, 210, 74, .5);
}

html[data-theme="light"] .Recharge__box .Recharge__container-tabcard__items.active .pm-sub,
html[data-theme="light"] .Recharge__box .Recharge__content-quickInfo .item_active div[data-v-9e03166f] {
    color: #9A6400;
}

html[data-theme="light"] .Recharge__box .Recharge__content-quickInfo .item_active .other > div[data-v-9e03166f]:first-child,
html[data-theme="light"] .Recharge__box .Recharge__content-quickInfo .item_active .usdt_icon > div > div[data-v-9e03166f]:first-child {
    color: #10213A;
}

html[data-theme="light"] .Recharge__box .Recharge__content-quickInfo .item_active[data-v-9e03166f],
html[data-theme="light"] .Recharge__box .rechargeTypes_list.ch-collapsed .item_active[data-v-9e03166f] {
    background:
        linear-gradient(100deg, rgba(255, 210, 74, .22) 0%, rgba(255, 210, 74, .04) 70%),
        #FFFFFF !important;
}

html[data-theme="light"] .Recharge__box .Recharge__content-paymoney__money-list__item.active[data-v-9e03166f],
html[data-theme="light"] .Recharge__box .Recharge__content-paymoney__money-list__item.arActive[data-v-9e03166f] {
    color: #FFFFFF;
}

html[data-theme="light"] .Recharge__box .Recharge__content-paymoney__money-input[data-v-9e03166f],
html[data-theme="light"] .Recharge__box .qr-modal__input {
    background: #FFFFFF;
}

html[data-theme="light"] .Recharge__box .Recharge__content-paymoney__money-input .amount-input[data-v-9e03166f] input,
html[data-theme="light"] .Recharge__box .Recharge__content-paymoney__money-input .amount-input input,
html[data-theme="light"] .Recharge__box .qr-modal__input {
    color: #10213A;
}

html[data-theme="light"] .Recharge__box .pa-bonus {
    background:
        linear-gradient(100deg, rgba(255, 210, 74, .18) 0%, rgba(255, 210, 74, 0) 60%),
        #FFFFFF;
}

html[data-theme="light"] .Recharge__box .pa-bonus__btn {
    color: #9A6400;
    border-color: #E0A92E;
}

html[data-theme="light"] .Recharge__box .qr-modal {
    background: rgba(16, 33, 58, .45);
}

html[data-theme="light"] .Recharge__box .qr-modal__box {
    color: #10213A;
    background:
        radial-gradient(120% 40% at 50% 0%, rgba(40, 120, 255, .12) 0%, rgba(40, 120, 255, 0) 70%),
        #FFFFFF;
    box-shadow: 0 .32rem .8rem rgba(16, 33, 58, .25), 0 0 .26667rem rgba(255, 200, 60, .2);
}

html[data-theme="light"] .Recharge__box .qr-modal__close {
    color: #4A5C78;
    background: #F2F5FA;
}

html[data-theme="light"] .Recharge__box .qr-modal__amount {
    color: #C98A00;
}
