/* ==========================================================================
   Theme-E Luxury Dark Navy Styling for WinGo, K3, 5D, and Car Race
   Matches Photo 2 (WinGo), Photo 4 (Car Race), and Photo 5 (5D)
   ========================================================================== */

/* 1. Global Page Background & Root Overrides */
body,
#app,
.app_container,
.winGo3,
.lottery-container,
.lottery-info {
    background-color: #001138 !important;
    background: #001138 !important;
    color: #ffffff;
}

/* 2. Top Arch Background Override */
/* In Photo 2, there is NO light cyan sky-blue arch! */
.lottery-info .bg,
.lottery-info[data-v-015dc728] .bg {
    background: linear-gradient(180deg, #001138 0%, #0c1a45 100%) !important;
    border-radius: 0 0 1.2rem 1.2rem !important;
}

/* 3. Top Header Bar */
.lottery-info header,
.lottery-info .head-main,
.head-main,
.van-nav-bar {
    background-color: #001b58 !important;
    background: #001b58 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.head-main .head-beck .bIcon,
.van-nav-bar .van-icon,
.van-nav-bar__arrow {
    color: #ffffff !important;
}

/* Header Deposit button */
.lottery-info .head-main .deposit-btn,
.lottery-info .deposit-btn {
    background: #18b660 !important;
    border-radius: 1rem !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* 4. Luxury Wallet Card matching Photo 2, 4, 5 */
.lottery-info .Wallet__C,
.Wallet__C {
    width: calc(100% - 0.69333rem) !important;
    margin: 0.2rem auto 0 !important;
    padding: 0 !important;
}

.lottery-info .Wallet__C-balance,
.Wallet__C-balance {
    background: linear-gradient(135deg, #0d2258 0%, #06153a 100%) !important;
    border: 1px solid rgba(255, 215, 0, 0.25) !important;
    border-radius: 0.32rem !important;
    box-shadow: 0 0.08rem 0.24rem rgba(0, 0, 0, 0.45) !important;
    padding: 0.35rem 0.4rem !important;
    box-sizing: border-box !important;
}

.Wallet__C-balance-l1 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.55rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    gap: 0.15rem !important;
}

.Wallet__C-balance-l1 .refresh,
.Wallet__C-balance-l1 svg {
    color: #90abc5 !important;
    width: 0.42rem !important;
    height: 0.42rem !important;
}

.Wallet__C-balance-l2 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.28rem !important;
    color: #90abc5 !important;
    margin-top: 0.12rem !important;
    gap: 0.1rem !important;
}

.Wallet__C-balance-l3 {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 0.32rem !important;
    gap: 0.3rem !important;
}

/* Withdraw Button: Red-Orange */
.Wallet__C-balance-l3 > div:first-child,
.Wallet__C-balance-l3 .withdraw-btn {
    flex: 1 !important;
    height: 0.85rem !important;
    line-height: 0.85rem !important;
    background: #f85959 !important;
    color: #ffffff !important;
    font-size: 0.34rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-radius: 0.425rem !important;
    box-shadow: 0 0.05rem 0.15rem rgba(248, 89, 89, 0.35) !important;
    cursor: pointer !important;
}

/* Deposit Button: Bright Green matching Photo 2, 4, 5 */
.Wallet__C-balance-l3 > div:last-child,
.Wallet__C-balance-l3 .recharge-btn {
    flex: 1 !important;
    height: 0.85rem !important;
    line-height: 0.85rem !important;
    background: #18b660 !important;
    color: #ffffff !important;
    font-size: 0.34rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-radius: 0.425rem !important;
    box-shadow: 0 0.05rem 0.15rem rgba(24, 182, 96, 0.35) !important;
    cursor: pointer !important;
}

/* 5. Theme-E Sound Marquee Bar matching Photo 2, 4, 5 */
.theme-e-game-notice {
    width: calc(100% - 0.69333rem);
    margin: 0.28rem auto;
    height: 0.8rem;
    background: #0d1e4c;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    padding: 0 0.24rem;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.theme-e-notice-icon {
    font-size: 0.38rem;
    margin-right: 0.15rem;
    flex-shrink: 0;
}

.theme-e-notice-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    font-size: 0.26rem;
    color: #d1dbed;
}

.theme-e-notice-text {
    display: inline-block;
    padding-left: 100%;
    animation: theme-e-marquee 20s linear infinite;
}

@keyframes theme-e-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.theme-e-notice-btn {
    flex-shrink: 0;
    margin-left: 0.15rem;
    height: 0.54rem;
    line-height: 0.54rem;
    padding: 0 0.3rem;
    background: linear-gradient(180deg, #fcd066 0%, #e09f25 100%);
    color: #0b1a47;
    font-size: 0.24rem;
    font-weight: 700;
    border-radius: 0.27rem;
    cursor: pointer;
    box-shadow: 0 0.04rem 0.08rem rgba(0, 0, 0, 0.3);
}

/* 6. Timer Cards Tabs matching Photo 2, 4, 5 */
.timer-cards,
.timer-cards[data-v-7341bb60],
.lottery-info .timer-cards,
.winGo3 .timer-cards {
    width: calc(100% - 0.69333rem) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    background: #0b1a47 !important;
    border-radius: 0.32rem !important;
    box-shadow: 0 0.08rem 0.2rem rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 0.08rem 0.06rem !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    gap: 0.04rem !important;
    overflow: hidden !important;
}

.timer-card,
.timer-card[data-v-7341bb60],
.lottery-info .timer-card,
.winGo3 .timer-card {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 25% !important;
    height: 2.15rem !important;
    background: transparent !important;
    border-radius: 0.2rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    border: 1px solid transparent !important;
    padding: 0.05rem 0.02rem !important;
    box-sizing: border-box !important;
}

/* Active Timer Tab: Royal blue with gold glow */
.timer-card.active,
.timer-card.active[data-v-7341bb60],
.lottery-info .timer-card.active,
.winGo3 .timer-card.active {
    background: linear-gradient(180deg, #1e3c88 0%, #0c1a45 100%) !important;
    border: 1px solid rgba(255, 215, 0, 0.45) !important;
    box-shadow: 0 0 0.15rem rgba(30, 60, 136, 0.8), inset 0 0 0.12rem rgba(255, 215, 0, 0.2) !important;
}

.timer-card .clock-icon,
.timer-card[data-v-7341bb60] .clock-icon {
    width: 0.95rem !important;
    height: 0.95rem !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.timer-card .clock-icon img,
.timer-card[data-v-7341bb60] .clock-icon img,
.timer-card .clock-icon .timeIcon,
.timer-card[data-v-7341bb60] .clock-icon .timeIcon {
    width: 0.85rem !important;
    height: 0.85rem !important;
    object-fit: contain !important;
}

.timer-card.active .clock-icon img,
.timer-card.active[data-v-7341bb60] .clock-icon img,
.timer-card.active .clock-icon .timeIcon,
.timer-card.active[data-v-7341bb60] .clock-icon .timeIcon {
    content: url(../assets/lottery/lottery_category_active.png) !important;
}

.timer-card .card-title,
.timer-card[data-v-7341bb60] .card-title,
.lottery-info .timer-card .card-title,
.winGo3 .timer-card .card-title {
    width: 100% !important;
    font-size: 0.22rem !important;
    font-weight: 500 !important;
    color: #8fa6cb !important;
    margin-top: 0.05rem !important;
    text-align: center !important;
    white-space: nowrap !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.timer-card.active .card-title,
.timer-card.active[data-v-7341bb60] .card-title,
.lottery-info .timer-card.active .card-title,
.winGo3 .timer-card.active .card-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 0 0.06rem rgba(255, 255, 255, 0.5) !important;
}

/* 7. Ticket Countdown Box matching Photo 2, 4, 5 */
.TimeLeft__C,
.TimeLeft__C[data-v-5f093580] {
    width: calc(100% - 0.69333rem) !important;
    min-height: 2.66667rem !important;
    height: auto !important;
    margin: 0.35rem auto 0 !important;
    padding: 0.3rem 0.35rem !important;
    background-image: none !important;
    background: linear-gradient(135deg, #091a4a 0%, #030b24 100%) !important;
    border: 1px dashed rgba(247, 201, 72, 0.65) !important;
    border-radius: 0.32rem !important;
    box-shadow: 0 0.08rem 0.25rem rgba(0, 0, 0, 0.55) !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Vertical Ticket Divider */
.TimeLeft__C::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 15% !important;
    bottom: 15% !important;
    width: 1px !important;
    border-left: 1px dashed rgba(247, 201, 72, 0.4) !important;
    pointer-events: none !important;
}

/* "How to play" Button with Gold Outline */
.TimeLeft__C-rule,
.TimeLeft__C-rule[data-v-5f093580] {
    border: 1px solid rgba(247, 201, 72, 0.7) !important;
    background: rgba(247, 201, 72, 0.08) !important;
    color: #f7c948 !important;
    border-radius: 0.8rem !important;
    font-size: 0.28rem !important;
    font-weight: 600 !important;
    padding: 0 0.2rem !important;
}

.TimeLeft__C-rule svg {
    color: #f7c948 !important;
}

.TimeLeft__C-name,
.TimeLeft__C-name[data-v-5f093580] {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.32rem !important;
}

/* Time Remaining Text in Gold */
.TimeLeft__C-text,
.TimeLeft__C-text[data-v-5f093580] {
    color: #f7c948 !important;
    font-size: 0.3rem !important;
    font-weight: 700 !important;
}

/* Digital Countdown Digit Boxes */
.TimeLeft__C-time > div,
.TimeLeft__C-time[data-v-5f093580] > div {
    background-color: #0b142f !important;
    color: #ffffff !important;
    border: 1px solid #1a2c63 !important;
    font-weight: 700 !important;
    font-size: 0.44rem !important;
    box-shadow: inset 0 0 0.06rem rgba(0, 0, 0, 0.8) !important;
    border-radius: 0.06rem !important;
}

/* Period Number in Gold */
.TimeLeft__C-id,
.TimeLeft__C-id[data-v-5f093580] {
    color: #f7c948 !important;
    font-weight: 700 !important;
    font-size: 0.34rem !important;
    text-shadow: 0 0 0.06rem rgba(247, 201, 72, 0.4) !important;
}

/* 8. Betting Section matching Luxury Theme-E */
.winGo3 .Betting__C,
.winGo3 .Betting__C[data-v-24ae940c] {
    background: #09163d !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0.32rem !important;
    box-shadow: 0 0.08rem 0.25rem rgba(0, 0, 0, 0.4) !important;
}

.winGo3 .Betting__C-numC,
.winGo3 .Betting__C-numC[data-v-24ae940c] {
    background: #060e26 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 0.24rem !important;
}

.winGo3 .history,
.winGo3 .history .nav,
.winGo3 .history[data-v-24ae940c] {
    background: #09163d !important;
    border-radius: 0.24rem !important;
}

.winGo3 .history .nav .active {
    color: #38bdf8 !important;
    border-bottom: 2px solid #38bdf8 !important;
}

/* ==========================================================================
   Car Race Page Specific Styling matching Photo 4
   ========================================================================== */
body.carrace-active,
body.carrace-active .app_container {
    background: #001138 !important;
    background-color: #001138 !important;
    min-height: 100vh !important;
}

body.carrace-active .app_container > *:not(#theme-e-carrace-view),
body.carrace-active #app > *:not(#theme-e-carrace-view):not(.app_container),
body.carrace-active .header .moto_bg,
body.carrace-active .motorcycle-image,
body.carrace-active .loading_moto,
body.carrace-active .motorcycle-view,
body.carrace-active .moto-view,
body.carrace-active [class*="moto"],
body.carrace-active [data-v-4ba2b0a2],
body.carrace-active [data-v-7a167af7] {
    display: none !important;
}

#theme-e-carrace-view {
    display: block !important;
    position: relative !important;
    z-index: 9999 !important;
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    background: #001138 !important;
    min-height: 100vh !important;
    padding-bottom: 2rem !important;
    box-sizing: border-box !important;
}

.carrace-track-box {
    width: calc(100% - 0.69333rem);
    margin: 0.35rem auto 0;
    background: #050b1a;
    border-radius: 0.28rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0.08rem 0.25rem rgba(0, 0, 0, 0.5);
    position: relative;
}

.carrace-track-header {
    height: 0.76rem;
    background: #081433;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.3rem;
    font-size: 0.28rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.carrace-track-header .title-badge {
    color: #ffffff;
    font-weight: 700;
}

.carrace-track-header .per-text {
    color: #8fa6cb;
    font-size: 0.24rem;
}

.carrace-track-stage {
    width: 100%;
    height: 4.6rem;
    position: relative;
    overflow: hidden;
    background: url(/images/carrace_racetrack_full.png) center center / 100% 100% no-repeat;
    border-radius: 0 0 0.28rem 0.28rem;
}

.carrace-skyline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1.5rem;
    background-image: url(/images/track3_1-Bt6lMc3y.png);
    background-size: cover;
    background-position: center bottom;
    z-index: 1;
}

.carrace-road {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.1rem;
    background: #1c202a;
    background-image: linear-gradient(180deg, #2b3140 0%, #151821 100%);
    z-index: 2;
    border-top: 2px solid #5a647d;
}

.carrace-lanes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.04rem 0;
    box-sizing: border-box;
}

.carrace-lane {
    flex: 1;
    width: 100%;
    position: relative;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.carrace-finish-line {
    position: absolute;
    right: 0.4rem;
    top: 0;
    bottom: 0;
    width: 0.16rem;
    background: repeating-linear-gradient(
        0deg,
        #ffffff,
        #ffffff 6px,
        #000000 6px,
        #000000 12px
    );
    z-index: 3;
}

/* 10 Animated Cars */
.carrace-car {
    position: absolute;
    left: 0.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.65rem;
    height: 0.24rem;
    background-image: url(/images/car-CBR_6lAV.png);
    background-size: 0.65rem 2.4rem;
    z-index: 4;
    transition: left 0.4s linear;
}

.carrace-car-1 { background-position: 0 0; }
.carrace-car-2 { background-position: 0 -0.24rem; }
.carrace-car-3 { background-position: 0 -0.48rem; }
.carrace-car-4 { background-position: 0 -0.72rem; }
.carrace-car-5 { background-position: 0 -0.96rem; }
.carrace-car-6 { background-position: 0 -1.2rem; }
.carrace-car-7 { background-position: 0 -1.44rem; }
.carrace-car-8 { background-position: 0 -1.68rem; }
.carrace-car-9 { background-position: 0 -1.92rem; }
.carrace-car-10 { background-position: 0 -2.16rem; }

/* Car Race Betting Container */
.carrace-betting-card {
    width: calc(100% - 0.69333rem);
    margin: 0.35rem auto 0;
    background: #09163d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.32rem;
    padding: 0.3rem 0.25rem;
    box-sizing: border-box;
}

.carrace-betting-title {
    font-size: 0.34rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.carrace-tab-pills {
    display: flex;
    gap: 0.2rem;
    margin-bottom: 0.3rem;
}

.carrace-tab-pill {
    flex: 1;
    height: 0.72rem;
    line-height: 0.72rem;
    text-align: center;
    background: #060e26;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8fa6cb;
    border-radius: 0.16rem;
    font-size: 0.28rem;
    font-weight: 600;
    cursor: pointer;
}

.carrace-tab-pill.active {
    background: linear-gradient(180deg, #2a77d6 0%, #0d2258 100%);
    color: #ffffff;
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 0.1rem rgba(42, 119, 214, 0.6);
}

.carrace-grid-cars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.16rem;
    margin-bottom: 0.3rem;
}

.carrace-grid-car-item {
    background: #060e26;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.18rem;
    padding: 0.15rem 0.1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carrace-grid-car-item.active {
    border-color: #ffd700;
    background: rgba(42, 119, 214, 0.35);
    box-shadow: 0 0 0.08rem rgba(255, 215, 0, 0.6);
}

.carrace-grid-car-item .car-num-badge {
    width: 0.54rem;
    height: 0.54rem;
    line-height: 0.54rem;
    border-radius: 50%;
    margin: 0 auto 0.08rem;
    font-weight: 700;
    font-size: 0.3rem;
    color: #ffffff;
}

.carrace-grid-car-item .car-odds {
    font-size: 0.22rem;
    color: #8fa6cb;
}

.carrace-bs-oe-row {
    display: flex;
    gap: 0.2rem;
    margin-bottom: 0.25rem;
}

.carrace-btn-option {
    flex: 1;
    height: 0.78rem;
    line-height: 0.78rem;
    text-align: center;
    border-radius: 0.18rem;
    font-size: 0.28rem;
    font-weight: 700;
    cursor: pointer;
    background: #060e26;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: flex;
    justify-content: center;
    gap: 0.15rem;
}

.carrace-btn-option.odd-btn { background: rgba(24, 182, 96, 0.25); border-color: #18b660; color: #4ade80; }
.carrace-btn-option.even-btn { background: rgba(248, 89, 89, 0.25); border-color: #f85959; color: #f87171; }
.carrace-btn-option.big-btn { background: rgba(234, 179, 8, 0.25); border-color: #eab308; color: #fde047; }
.carrace-btn-option.small-btn { background: rgba(56, 189, 248, 0.25); border-color: #38bdf8; color: #7dd3fc; }
