/* ==========================================================================
   Theme-E Winner & Leaderboard Stylesheet
   Matches Photo 2 (theme e.anotechsolutions.shop)
   Enhanced with JANTAWIN Luxury Styling
   Strictly isolated to Home page - Last Section
   ========================================================================== */

/* 1. Strict Fail-Safe: By default, NEVER display on any sub-page */
#theme-e-winner-root,
.theme-e-winner-section {
    display: none !important;
}

/* 2. STRICTLY display ONLY inside the Home page container when home is active */
body.home-page-active .dark-red-home > #theme-e-winner-root,
body.home-page-active .dark-red-home #theme-e-winner-root,
body.home-page-active .home-view #theme-e-winner-root {
    display: block !important;
    width: 100% !important;
    max-width: 500px !important;
    margin: 18px auto 95px auto !important; /* Generous bottom spacing so Rank 10 is completely visible above bottom tabbar */
    padding: 0 10px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 10 !important;
}

/* 3. Hard block on any sub-page even if classes somehow linger */
body.vip-page-active #theme-e-winner-root,
body.wheel-page-active #theme-e-winner-root,
body.lottery-page-active #theme-e-winner-root,
body.gift-page-active #theme-e-winner-root,
body.notif-page-active #theme-e-winner-root,
body.wallet-page-active #theme-e-winner-root,
body.withdraw-page-active #theme-e-winner-root,
.allgame-wrapper #theme-e-winner-root,
.betRecords-wrapper #theme-e-winner-root,
.ticket-wrapper #theme-e-winner-root,
.gift-wrapper #theme-e-winner-root,
.theme-e-wallet #theme-e-winner-root,
.promotion-wrapper #theme-e-winner-root,
.mine #theme-e-winner-root {
    display: none !important;
}

/* Card Container with Radial Blue Gradient & Gold Border */
.theme-e-winner-card {
    position: relative !important;
    border-radius: 16px !important;
    border: 1px solid #f3be48 !important;
    background: radial-gradient(circle at top, #3158b1 0%, #042066 35%, #030f31 70%, #03113d 100%) !important;
    overflow: hidden !important;
    padding: 12px 10px 12px 10px !important;
    box-shadow: 0 0 0 1px rgba(255, 196, 74, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.42) !important;
    box-sizing: border-box !important;
}

/* Top 3 Podium Stage */
.theme-e-winner-stage-wrap {
    position: relative !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

.theme-e-winner-stage-img {
    width: 100% !important;
    padding-top: 5px !important;
    position: relative !important;
    z-index: 2 !important;
    object-fit: contain !important;
    display: block !important;
    height: auto !important;
}

/* Rank 4-10 Leaderboard Table Box */
.theme-e-winner-list-box {
    margin-top: 8px !important;
    background: linear-gradient(180deg, rgba(12, 40, 120, 0.88) 0%, rgba(5, 19, 61, 0.96) 100%) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 215, 102, 0.22) !important;
    box-shadow: 0 0 0 1px rgba(255, 196, 74, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.35) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Individual Row */
.theme-e-winner-row {
    display: flex !important;
    align-items: center !important;
    padding: 8px 10px !important;
    border-bottom: 1px solid rgba(255, 215, 102, 0.12) !important;
    box-sizing: border-box !important;
    transition: background 0.15s ease !important;
}

.theme-e-winner-row:last-child {
    border-bottom: none !important;
}

/* Laurel Wreath Badge Container */
.theme-e-winner-rank-wrap {
    position: relative !important;
    width: 32px !important;
    height: 32px !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.theme-e-winner-rank-wreath {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    object-fit: contain !important;
    pointer-events: none !important;
}

.theme-e-winner-rank-num {
    position: relative !important;
    color: #ffd766 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45) !important;
    line-height: 1 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Circular Avatar */
.theme-e-winner-avatar {
    width: 36px !important;
    height: 36px !important;
    margin-right: 10px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 215, 102, 0.28) !important;
    box-shadow: 0 0 8px rgba(255, 215, 102, 0.08) !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

/* Masked Username */
.theme-e-winner-name {
    flex: 1 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Winning INR Amount */
.theme-e-winner-amount {
    color: #ffd766 !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    text-align: right !important;
    min-width: 105px !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
