/* =========================================================================
   PLAYERZONEBD — DESIGN SYSTEM
   Look & feel: night-arena esports HUD. Deep ink backgrounds for "stage"
   moments (splash, auth, wallet, podium), warm amber for action/brand,
   cool teal for money-in / wins, condensed "Rajdhani" for scoreboard-style
   numbers & headings, Lato/Hind Siliguri for reading text.
   ========================================================================= */

/* =========================================================================
   PLAYERZONEBD — DESIGN SYSTEM (Light + Dark themes)
   Toggle via [data-theme="light"] / [data-theme="dark"] on <html>.
   Look & feel: night-arena esports HUD. Deep ink "stage" panels (hero,
   wallet vault, podium) stay dramatic in both themes; everyday surfaces
   (cards, forms, lists) fully adapt between light and dark.
   Amber = brand/action. Teal = money-in / wins. Rajdhani = HUD numerals.
   ========================================================================= */

:root {
    /* --- brand (theme-independent) --- */
    --primary: #FFB300;
    --primary-dark: #E6960A;
    --primary-light: #FFF2D6;
    --on-primary: #17140A;

    --secondary: #00C2A8;
    --secondary-dark: #00A088;

    --success: #2BB673;
    --danger: #E5484D;
    --danger-light: #FDEBEC;
    --live: #FF3B4E;

    --ink: #12141C;
    --ink-soft: #1B1F2A;
    --white: #ffffff;

    --wallet-gradient: linear-gradient(135deg, #1B1035 0%, #3B1F78 55%, #6A3FD8 100%);

    --bkash-color: #E2136E;
    --rocket-color: #8C3494;
    --nagad-color: #F7941D;
    --bkash-dark: #b00e56;
    --rocket-dark: #6a2670;
    --nagad-dark: #c97612;

    --auth-bg-dark: #0B0D14;
    --auth-card-bg: #ffffff;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --ease: cubic-bezier(.22,1,.36,1);
    --fast: .18s;
    --med: .32s;

    /* --- LIGHT THEME (default) --- */
    --bg-color: #F3F4F8;
    --surface: #FFFFFF;
    --surface-alt: #F1F2F7;
    --text-dark: #171923;
    --text-muted: #6B7280;
    --text-faint: #9AA1B1;
    --border-soft: #EBEDF3;
    --skeleton-a: #eceef3;
    --skeleton-b: #f7f8fb;
    --shadow-sm: 0 2px 10px rgba(18,20,28,.06);
    --shadow-md: 0 8px 24px rgba(18,20,28,.10);
    --shadow-lg: 0 18px 45px rgba(18,20,28,.16);
}

html[data-theme="dark"] {
    --bg-color: #0A0C13;
    --surface: #171A26;
    --surface-alt: #1E2231;
    --text-dark: #F1F2F7;
    --text-muted: #A6ACBD;
    --text-faint: #6E7488;
    --border-soft: rgba(255,255,255,.08);
    --skeleton-a: #1c2030;
    --skeleton-b: #242942;
    --shadow-sm: 0 2px 10px rgba(0,0,0,.35);
    --shadow-md: 0 10px 26px rgba(0,0,0,.45);
    --shadow-lg: 0 22px 50px rgba(0,0,0,.55);
    --ink: #1E2140;
    --tint-good-bg: rgba(43,182,115,.14);
    --tint-good-text: #6FE3A8;
    --tint-warn-bg: rgba(255,179,0,.14);
    --tint-warn-text: #FFCB61;
    --tint-bad-bg: rgba(229,72,77,.16);
    --tint-bad-text: #FF8489;
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
    --tint-good-bg: #E7F7EF;
    --tint-good-text: #256B48;
    --tint-warn-bg: #FFF6E5;
    --tint-warn-text: #8A5A00;
    --tint-bad-bg: var(--danger-light);
    --tint-bad-text: #B3261E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lato', 'Hind Siliguri', sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

input, textarea, select {
    user-select: text;
}

.hud, .wg-balance, .mc-stat-value, .rd-podium-prize, .wb-amount, .ws-amount,
.auth-title-large, .wallet-section-title, .category-title, .md-count-badge,
.join-badge, .refer-code-box, h1.num, .rd-main-title {
    font-family: 'Rajdhani', 'Hind Siliguri', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    padding-bottom: 90px;
    overflow-x: hidden;
    min-height: 100vh;
    animation: pageFade .35s var(--ease);
    transition: background-color var(--med) var(--ease), color var(--med) var(--ease);
}

@keyframes pageFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

body.sub-page { }
body.no-tabbar { padding-bottom: 0; }

a { color: inherit; }

/* --- SITE-WIDE FOOTER TEXT --- */
.site-footer-text {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #9aa0ac;
    letter-spacing: .2px;
    padding: 10px 15px 6px;
}

/* =========================================================================
   SPLASH SCREEN
   ========================================================================= */
#app-splash {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,179,0,.10), transparent 55%),
        linear-gradient(180deg, #0c0e16 0%, #05060a 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: opacity 0.1s ease-out;
    overflow: hidden;
}

.splash-logo-box {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin-bottom: 20px;
    border: 2px solid rgba(255,179,0,.25);
    box-shadow: 0 0 35px rgba(255,179,0,.25);
    z-index: 2;
    animation: splashPop .6s var(--ease);
}

.splash-logo-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }

@keyframes splashPop {
    from { transform: scale(.6); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.splash-app-name { font-size: 24px; font-weight: 700; letter-spacing: 1px; margin-bottom: 5px; text-align: center; z-index: 2; }
.splash-version { font-size: 14px; color: #888; margin-bottom: 100px; z-index: 2; }

.splash-bottom-area { position: absolute; bottom: 50px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; z-index: 2; }
.splash-welcome { font-size: 14px; font-weight: 300; letter-spacing: 1px; margin-bottom: 10px; opacity: 0.8; }
.splash-line { width: 150px; height: 3px; background: var(--primary); border-radius: 2px; margin-bottom: 15px; animation: lineExpand 1.1s ease-in-out infinite alternate; }
.splash-dots-container { display: flex; gap: 5px; }
.splash-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; animation: dotBounce 1s infinite ease-in-out both; }
.splash-dot:nth-child(1) { animation-delay: -0.32s; }
.splash-dot:nth-child(2) { animation-delay: -0.16s; }

.particle { position: absolute; width: 4px; height: 4px; background: rgba(255,179,0,.55); border-radius: 50%; animation: floatUp linear infinite; bottom: -10px; z-index: 1; }

@keyframes floatUp { 0% { transform: translateY(0) scale(1); opacity: 0; } 20% { opacity: .8; } 100% { transform: translateY(-100vh) scale(.5); opacity: 0; } }
@keyframes lineExpand { 0% { width: 50px; opacity: .5; } 100% { width: 150px; opacity: 1; } }
@keyframes dotBounce { 0%, 80%, 100% { transform: scale(0); opacity: .3; } 40% { transform: scale(1); opacity: 1; } }

/* =========================================================================
   GLOBAL LOADER
   ========================================================================= */
#global-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11,13,20,.55); backdrop-filter: blur(2px); z-index: 9999; display: none; justify-content: center; align-items: center; }
#global-loader.active { display: flex; }
.spinner { width: 46px; height: 46px; border: 4px solid rgba(255,179,0,.25); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* skeleton shimmer for images while loading */
img { background-color: var(--skeleton-a); }
img.lazy-loading { animation: shimmer 1.3s ease-in-out infinite; background: linear-gradient(100deg, var(--skeleton-a) 30%, var(--skeleton-b) 50%, var(--skeleton-a) 70%); background-size: 200% 100%; }
img.lazy-loaded { animation: imgReveal .4s var(--ease); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes imgReveal { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }

/* =========================================================================
   AUTH PAGES (login.php / signup.php)
   ========================================================================= */
#login-container, #register-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(circle at top left, #2b1a00, #111),
        linear-gradient(135deg, #000, #14151a, #000);
    overflow: hidden;
    position: relative;
    padding: 20px;
}

#login-container::before, #register-container::before {
    content: ''; position: absolute; width: 350px; height: 350px; background: var(--primary);
    border-radius: 50%; filter: blur(140px); opacity: .18; top: -120px; left: -120px;
    animation: floatGlow 8s infinite alternate;
}
#login-container::after, #register-container::after {
    content: ''; position: absolute; width: 300px; height: 300px; background: var(--secondary);
    border-radius: 50%; filter: blur(140px); opacity: .13; bottom: -120px; right: -120px;
    animation: floatGlow2 10s infinite alternate;
}

.login-card, .register-card {
    width: 100%; max-width: 430px;
    background: rgba(18,18,22,.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,179,0,.22);
    border-radius: 28px;
    padding: 40px 28px;
    box-shadow: 0 0 30px rgba(255,179,0,.12), 0 25px 60px rgba(0,0,0,.85);
    position: relative;
    overflow: hidden;
    animation: cardShow .55s var(--ease);
    max-height: 92vh;
    overflow-y: auto;
}

.login-card::before, .register-card::before {
    content: ''; position: absolute; width: 100%; height: 3px; left: 0; top: 0;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.game-logo { width: 90px; height: 90px; margin: auto; margin-bottom: 20px; border-radius: 50%; border: 3px solid var(--primary); overflow: hidden; box-shadow: 0 0 25px rgba(255,179,0,.45); }
.game-logo img { width: 100%; height: 100%; object-fit: cover; }

.auth-title-large { color: #fff; font-size: 32px; font-weight: 700; text-align: center; letter-spacing: .5px; }
.auth-title-large span { color: var(--primary); }
.auth-subtitle { color: #aaa; text-align: center; margin-top: 10px; margin-bottom: 32px; font-size: 14px; }

.auth-input-group { position: relative; margin-bottom: 16px; }
.auth-input-field {
    width: 100%; height: 56px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
    border-radius: 14px; padding: 0 20px; color: #fff; font-size: 15px; outline: none; transition: var(--fast);
}
.auth-input-field::placeholder { color: #888; }
.auth-input-field:focus { border-color: var(--primary); background: rgba(255,179,0,.07); box-shadow: 0 0 0 4px rgba(255,179,0,.10); transform: translateY(-1px); }
.auth-input-field[type="number"]::-webkit-outer-spin-button, .auth-input-field[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.auth-input-field[type="number"] { -moz-appearance: textfield; }

.auth-password-eye { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: #999; cursor: pointer; }
.auth-checkbox-row { display: flex; gap: 10px; align-items: flex-start; color: #aaa; font-size: 13px; margin-bottom: 24px; }
.auth-checkbox-row input { accent-color: var(--primary); margin-top: 2px; flex-shrink: 0; }

.auth-black-btn {
    width: 100%; height: 56px; border: none; border-radius: 14px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    color: var(--on-primary); font-size: 17px; font-weight: 700; cursor: pointer;
    transition: var(--fast); box-shadow: 0 10px 28px rgba(255,179,0,.28); letter-spacing: .3px;
    position: relative; overflow: hidden;
}
.auth-black-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(255,179,0,.4); }
.auth-black-btn:active { transform: translateY(-1px) scale(.98); }

.auth-forget-link { text-align: center; color: #bbb; margin-top: 20px; cursor: pointer; transition: var(--fast); }
.auth-forget-link:hover { color: var(--primary); }
.auth-footer-link { text-align: center; color: #999; margin-top: 22px; }
.auth-footer-link span { color: var(--primary); font-weight: 700; cursor: pointer; }

@keyframes cardShow { from { opacity: 0; transform: translateY(36px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes floatGlow { from { transform: translate(-40px,-20px); } to { transform: translate(40px,40px); } }
@keyframes floatGlow2 { from { transform: translate(40px,20px); } to { transform: translate(-40px,-40px); } }

/* --- AUTH SOCIAL LINKS --- */
.auth-social-links { display: flex; justify-content: center; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12); }
.auth-social-btn { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; font-size: 18px; text-decoration: none; transition: transform var(--fast), box-shadow var(--fast); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.auth-social-btn:hover { transform: scale(1.12) translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.auth-social-btn.whatsapp { background: #25D366; }
.auth-social-btn.facebook { background: #1877F2; }
.auth-social-btn.youtube { background: #FF0000; }
.auth-social-btn.tiktok { background: #000000; }
.auth-social-btn.instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }

/* =========================================================================
   LAYOUT
   ========================================================================= */
.page-wrap { background: var(--bg-color); min-height: 100vh; }

/* =========================================================================
   HOME PAGE — hero banner + categories
   ========================================================================= */
.home-content-wrapper { padding: 16px; }

.hero-banner { border-radius: 0; overflow: hidden; background: var(--ink); margin-bottom: 0; position: relative; }

.slider-container { width: 100%; max-width: var(--banner-max-w, 500px); height: var(--banner-h, 500px); margin: 0 auto; position: relative; overflow: hidden; background: var(--ink-soft); }
.slider-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; transition: transform .5s var(--ease); }
.slide { min-width: 100%; height: 100%; flex-shrink: 0; cursor: pointer; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.slider-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0; background: var(--ink); position: relative; z-index: 10; }
.dot { width: 7px; height: 7px; background: rgba(255,255,255,.25); border-radius: 50%; transition: all var(--med); }
.dot.active { background: var(--primary); width: 20px; border-radius: 10px; }

.marquee-container { background: var(--ink-soft); padding: 9px 5px; font-weight: 700; font-size: 15px; width: 100%; overflow: hidden; position: relative; white-space: nowrap; display: flex; align-items: center; border-top: 1px solid rgba(255,255,255,.06); }
#dynamic-notice { color: var(--primary); font-weight: 700; display: inline-block; padding-left: 100%; animation: marqueeScroll 22s linear infinite; }
@keyframes marqueeScroll { 0% { transform: translate(0,0); } 100% { transform: translate(-100%,0); } }

.category-title { font-weight: 700; font-size: 20px; margin: 18px 0 16px; letter-spacing: .3px; text-align: left; color: var(--text-dark); }

.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0 3px; }

.cat-card-new {
    background: var(--surface); border-radius: var(--radius-md); overflow: hidden; cursor: pointer;
    display: flex; flex-direction: column; box-shadow: var(--shadow-sm); border: 1px solid var(--border-soft);
    transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
    opacity: 0; transform: translateY(10px); animation: cardIn .45s var(--ease) forwards;
}
.category-grid .cat-card-new:nth-child(1) { animation-delay: .02s; }
.category-grid .cat-card-new:nth-child(2) { animation-delay: .08s; }
.category-grid .cat-card-new:nth-child(3) { animation-delay: .14s; }
.category-grid .cat-card-new:nth-child(4) { animation-delay: .2s; }
.category-grid .cat-card-new:nth-child(5) { animation-delay: .26s; }
.category-grid .cat-card-new:nth-child(6) { animation-delay: .32s; }
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }

.cat-card-new:active { transform: scale(.97); }

.cat-card-img { width: 100%; height: 148px; object-fit: cover; background: var(--ink-soft); }
.cat-card-info { padding: 12px; background: var(--surface); flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cat-card-title { font-weight: 800; font-size: 15px; color: var(--text-dark); margin-bottom: 3px; line-height: 1.2; }
.cat-card-count { font-size: 11.5px; color: var(--secondary-dark); font-weight: 700; display: flex; align-items: center; gap: 5px; }
.cat-card-count::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--secondary); box-shadow: 0 0 0 3px rgba(0,194,168,.18); }

/* =========================================================================
   PROFILE HEADER
   ========================================================================= */
.profile-header-bg { background: linear-gradient(135deg, var(--ink) 0%, #2b1f4a 100%); padding: 42px 20px 32px; text-align: center; color: white; margin-bottom: 20px; border-radius: 0 0 26px 26px; position: relative; overflow: hidden; }
.profile-header-bg::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% -10%, rgba(255,179,0,.25), transparent 55%); }
.profile-avatar-box { position: relative; z-index: 1; }
.profile-avatar-box img { width: 82px; height: 82px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); box-shadow: 0 0 0 4px rgba(255,179,0,.18); }
.profile-header-bg h3, .profile-header-bg p, .profile-header-bg > div { position: relative; z-index: 1; }

/* =========================================================================
   EDIT PROFILE
   ========================================================================= */
.ep-container { padding: 20px; }
.ep-avatar-section { text-align: center; margin-bottom: 25px; }
.ep-avatar-ring { width: 100px; height: 100px; border-radius: 50%; border: 4px solid var(--primary); padding: 5px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 5px rgba(255,179,0,.12); }
.ep-avatar-icon { font-size: 50px; color: var(--primary); }
.ep-username { font-size: 20px; font-weight: 800; color: var(--text-dark); }
.ep-email { font-size: 13px; color: var(--text-muted); }

.ep-card { background: var(--surface); border-radius: var(--radius-md); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-soft); }
.ep-card-title { font-size: 16px; font-weight: 800; color: var(--text-dark); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.ep-card-title i { color: var(--primary); }

.ep-input-group { position: relative; margin-bottom: 14px; }
.ep-input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 17px; }
.ep-input { width: 100%; padding: 13px 14px 13px 45px; border: 1.5px solid var(--border-soft); border-radius: 12px; font-size: 14px; outline: none; transition: var(--fast); color: var(--text-dark); }
.ep-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255,179,0,.12); }
.ep-btn { width: 100%; padding: 15px; background: var(--ink); color: white; font-weight: 800; border: none; border-radius: 12px; cursor: pointer; transition: var(--fast); }
.ep-btn:hover { background: #22263a; transform: translateY(-1px); }
.ep-btn:active { transform: translateY(0) scale(.98); }

/* =========================================================================
   MATCH CARD  (ticket-stub styling — the site's signature card)
   ========================================================================= */
.match-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    cursor: pointer;
    transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
    opacity: 0; transform: translateY(12px);
    animation: cardIn .5s var(--ease) forwards;
}
.match-card:nth-child(1) { animation-delay: .02s; }
.match-card:nth-child(2) { animation-delay: .08s; }
.match-card:nth-child(3) { animation-delay: .14s; }
.match-card:nth-child(4) { animation-delay: .2s; }
.match-card:nth-child(5) { animation-delay: .26s; }
.match-card:nth-child(n+6) { animation-delay: .3s; }
.match-card:hover { box-shadow: var(--shadow-md); }
.match-card:active { transform: scale(.99); }

.mc-header { display: flex; padding: 12px; gap: 12px; align-items: flex-start; }
.mc-thumb { width: 108px; height: 108px; border-radius: 12px; object-fit: cover; }
.mc-header-info { flex: 1; min-width: 0; }
.mc-title-row { font-size: 16px; font-weight: 800; color: var(--text-dark); margin-bottom: 3px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-date-row { font-size: 13px; color: var(--danger); font-weight: 700; }
.mc-date-row.muted { color: var(--text-muted); }

.mc-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 6px 12px 14px; gap: 10px 0; border-top: 1px dashed var(--border-soft); margin-top: 4px; position: relative; }
.mc-stats-grid::before, .mc-stats-grid::after {
    content: ''; position: absolute; top: -6px; width: 12px; height: 12px; background: var(--bg-color); border-radius: 50%;
}
.mc-stats-grid::before { left: -6px; }
.mc-stats-grid::after { right: -6px; }
.mc-stat-box { display: flex; flex-direction: column; align-items: center; }
.mc-stat-label { font-size: 10px; color: var(--text-faint); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.mc-stat-value { font-size: 17px; font-weight: 700; color: var(--text-dark); margin-top: 1px; }

.mc-join-row { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 12px 14px; }
.mc-progress-wrapper { flex: 1; margin-right: 15px; }
.mc-prog-bar { height: 7px; background: var(--border-soft); border-radius: 4px; overflow: hidden; margin-bottom: 5px; }
.mc-prog-fill { height: 100%; background: linear-gradient(90deg, var(--secondary), var(--secondary-dark)); border-radius: 4px; width: 0; transition: width 1s var(--ease); position: relative; overflow: hidden; }
.mc-prog-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); animation: progShine 2.2s ease-in-out infinite; }
@keyframes progShine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.mc-spots-info { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); font-weight: 700; }

.btn-join-main {
    border: none; color: var(--on-primary); background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 6px 26px; border-radius: 10px; font-size: 14px; font-weight: 800; cursor: pointer; height: 34px;
    display: flex; align-items: center; justify-content: center; transition: var(--fast); box-shadow: 0 6px 14px rgba(255,179,0,.3);
}
.btn-join-main:hover { transform: translateY(-2px); box-shadow: 0 10px 18px rgba(255,179,0,.4); }
.btn-join-main:active { transform: translateY(0) scale(.96); }
.btn-join-main.disabled { background: var(--surface-alt); color: var(--text-faint); box-shadow: none; pointer-events: none; }

.mc-details-row { display: flex; justify-content: space-between; padding: 0 12px 14px; gap: 10px; align-items: center; }
.btn-details { border: 1.5px solid var(--text-dark); color: var(--text-dark); background: transparent; padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; cursor: pointer; flex: 1; justify-content: center; transition: var(--fast); }
.btn-details:hover { background: var(--text-dark); color: var(--surface); }

.mc-footer-timer { background: var(--ink); color: white; text-align: center; padding: 9px; font-size: 13px; font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 8px; letter-spacing: .2px; }
.mc-footer-timer .fa-circle { color: var(--live); animation: livePulse 1.1s infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(1.4); } }

/* --- MATCH TABS --- */
.match-tabs-container { display: flex; justify-content: space-between; background: var(--surface); padding: 8px; box-shadow: var(--shadow-sm); position: sticky; top: 55px; z-index: 90; gap: 6px; border-radius: 0 0 14px 14px; }
.m-tab { flex: 1; text-align: center; padding: 10px 0; font-weight: 700; font-size: 13px; color: var(--text-muted); cursor: pointer; border-radius: 10px; transition: var(--fast); }
.m-tab.active { color: var(--on-primary); font-weight: 800; background: var(--primary); }

/* =========================================================================
   MATCH DETAILS / JOIN
   ========================================================================= */
.md-info-card {
    background:
        radial-gradient(circle at 15% -20%, rgba(255,179,0,.20), transparent 45%),
        radial-gradient(circle at 100% 10%, rgba(0,194,168,.12), transparent 40%),
        var(--ink);
    color: #fff; padding: 22px 20px; text-align: center; border-radius: 0 0 20px 20px;
}
.md-title { font-size: 19px; font-weight: 800; margin-bottom: 5px; }
.md-time { font-size: 13px; color: rgba(255,255,255,.65); margin-bottom: 10px; }

.md-table-container { padding: 16px; background: var(--surface); margin: 12px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.md-table-header { display: flex; justify-content: space-between; align-items: center; font-weight: 800; padding-bottom: 10px; border-bottom: 2px solid var(--primary); margin-bottom: 10px; color: var(--text-dark); }
.md-count-badge { background: var(--primary-light); color: var(--primary-dark); font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 20px; }

.md-players-list { display: flex; flex-direction: column; gap: 8px; }
.md-player-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: var(--surface-alt); border: 1px solid var(--border-soft); border-radius: 12px; opacity: 0; transform: translateY(8px); animation: mdRowIn .35s ease forwards; transition: background .15s, border-color .15s; }
.md-player-row.is-me { background: var(--primary-light); border-color: #ffdf9e; }
@keyframes mdRowIn { to { opacity: 1; transform: translateY(0); } }
.md-player-slot { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.md-player-avatar { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; border: 1.5px solid #fff; box-shadow: 0 0 0 1.5px var(--primary-light); background: #e0e2ec; position: relative; }
.md-player-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.md-player-avatar-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.md-player-info { flex: 1; min-width: 0; }
.md-player-name { font-size: 13px; font-weight: 800; color: var(--text-dark); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-me-badge { background: var(--success); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: .3px; flex: 0 0 auto; }
.md-player-meta { display: flex; align-items: center; gap: 10px; font-size: 10.5px; color: var(--text-muted); font-weight: 600; margin-top: 1px; flex-wrap: wrap; }
.md-player-meta i { margin-right: 3px; color: var(--primary-dark); }
.md-player-ign { color: var(--text-faint); }

.md-locked-list { text-align: center; padding: 30px 15px; color: #999; animation: mdRowIn .35s ease forwards; }
.md-locked-list i { font-size: 26px; margin-bottom: 10px; display: block; color: var(--text-faint); }
.md-locked-list p { font-size: 13px; font-weight: 600; max-width: 260px; margin: 0 auto; }

/* =========================================================================
   JOIN PAGE
   ========================================================================= */
.join-card { background: var(--surface); margin: 15px; border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-md); }
.join-input-field { width: 100%; height: 54px; background: var(--bg-color); border: 1.5px solid var(--border-soft); border-radius: 12px; padding: 0 16px; color: #111; font-size: 15px; font-weight: 600; outline: none; transition: var(--fast); }
.join-input-field::placeholder { color: #999; }
.join-input-field:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px rgba(255,179,0,.12); }
.join-match-title { font-size: 18px; font-weight: 800; color: var(--text-dark); margin-bottom: 5px; }
.join-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 15px; }
.join-info-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--text-dark); }
.join-warning { border: 1.5px dashed var(--primary); color: var(--primary-dark); font-size: 13px; font-weight: 700; text-align: center; padding: 10px; border-radius: 10px; margin: 15px 0; background: var(--primary-light); }
.join-badge-container { text-align: center; margin-bottom: 20px; }
.join-badge { background: var(--ink); color: var(--primary); padding: 6px 22px; border-radius: 20px; font-weight: 800; font-size: 14px; display: inline-block; letter-spacing: .3px; }
.join-inputs { margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }

.join-btn-full { position: fixed; bottom: 85px; left: 5%; width: 90%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary); padding: 16px; border-radius: 16px; border: none; font-size: 17px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 24px rgba(255,179,0,.4); z-index: 100; transition: var(--fast); }
.join-btn-full:hover { transform: translateY(-2px); }
.join-btn-full:active { transform: translateY(0) scale(.97); }

/* =========================================================================
   RESULT DETAILS
   ========================================================================= */
.rd-card { background: var(--surface); margin: 15px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.rd-title-box { padding: 18px; text-align: center; border-bottom: 1px solid var(--border-soft); }
.rd-main-title { font-weight: 800; font-size: 18px; margin-bottom: 4px; }
.rd-sub-title { font-size: 12px; color: var(--text-muted); }

.rd-stats-row { display: flex; justify-content: space-around; padding: 16px 0; text-align: center; }
.rd-stat-item div:first-child { font-size: 11px; color: var(--text-faint); font-weight: 700; margin-bottom: 5px; text-transform: uppercase; }
.rd-stat-item div:last-child { font-size: 16px; font-weight: 800; color: var(--text-dark); }

.rd-header-blue { background: var(--ink); color: white; text-align: center; font-weight: 800; font-size: 14px; padding: 10px; letter-spacing: .3px; }

.rd-table-head { display: flex; background: var(--surface-alt); color: var(--text-muted); padding: 9px 12px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; }
.rd-row { display: flex; padding: 11px 12px; background: var(--surface); border-bottom: 1px solid var(--border-soft); font-size: 13px; align-items: center; color: var(--text-dark); }
.rd-row:nth-child(odd) { background: var(--surface-alt); }

.col-hash { width: 10%; text-align: center; font-weight: 800; color: var(--text-faint); }
.col-name { width: 50%; font-weight: 700; color: var(--text-dark); }
.col-kill { width: 20%; text-align: center; }
.col-win { width: 20%; text-align: right; font-weight: 800; color: var(--secondary-dark); }

/* --- RESULT PODIUM --- */
.rd-podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 28px 15px 12px; background: linear-gradient(180deg, var(--ink), #05060a); position: relative; overflow: hidden; }
.rd-podium::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(255,179,0,.16), transparent 60%); }
.rd-podium-item { flex: 1; max-width: 110px; text-align: center; color: #fff; position: relative; z-index: 1; opacity: 0; transform: translateY(14px); animation: mdRowIn .5s var(--ease) forwards; }
.rd-podium-item.second { animation-delay: .05s; }
.rd-podium-item.first { animation-delay: .15s; }
.rd-podium-item.third { animation-delay: .25s; }
.rd-podium-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--white); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; margin: 0 auto 8px; border: 3px solid rgba(255,255,255,.5); }
.rd-podium-item.first .rd-podium-avatar { width: 72px; height: 72px; font-size: 26px; border-color: var(--primary); box-shadow: 0 0 24px rgba(255,179,0,.4); }
.rd-podium-name { font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-podium-prize { font-size: 14px; font-weight: 800; color: var(--primary); margin-top: 2px; }
.rd-podium-bar { margin-top: 10px; border-radius: 10px 10px 0 0; background: rgba(255,255,255,.12); display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; font-weight: 800; }
.rd-podium-item.first .rd-podium-bar { height: 70px; background: linear-gradient(180deg, var(--primary), var(--primary-dark)); color: var(--on-primary); }
.rd-podium-item.second .rd-podium-bar { height: 50px; background: linear-gradient(180deg, #CFD8DC, #90A4AE); color: #000; }
.rd-podium-item.third .rd-podium-bar { height: 36px; background: linear-gradient(180deg, #D7A16B, #A9714B); color: #000; }

/* =========================================================================
   WALLET
   ========================================================================= */
.wallet-redesign-container {
    background:
        radial-gradient(circle at 20% 0%, rgba(255,179,0,.14), transparent 40%),
        radial-gradient(circle at 100% 15%, rgba(106,63,216,.28), transparent 45%),
        var(--ink);
    background-attachment: fixed;
    min-height: 100vh; color: white; padding-bottom: 50px;
}

.wallet-gradient-card {
    background: var(--wallet-gradient); margin: 15px; border-radius: var(--radius-lg); padding: 22px; position: relative;
    color: white; box-shadow: 0 15px 35px rgba(59,31,120,.4); border: 1px solid rgba(255,255,255,.1); overflow: hidden;
}
.wallet-gradient-card::after { content: ''; position: absolute; top: -40%; left: -20%; width: 60%; height: 180%; background: linear-gradient(115deg, transparent, rgba(255,255,255,.12), transparent); animation: walletSheen 4.5s ease-in-out infinite; }
@keyframes walletSheen { 0% { transform: translateX(-120%) rotate(8deg); } 60%,100% { transform: translateX(220%) rotate(8deg); } }
.wg-header { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; margin-bottom: 30px; position: relative; z-index: 1; }
.wg-header i { color: var(--primary); font-size: 19px; }
.wg-wallet-text { color: var(--primary); margin-left: 5px; font-weight: 800; letter-spacing: .5px; }
.wg-label { font-size: 13px; opacity: .85; font-weight: 500; color: #E7DBFF; position: relative; z-index: 1; }
.wg-balance { font-size: 40px; font-weight: 700; margin-top: 4px; letter-spacing: .5px; display: flex; align-items: center; gap: 5px; position: relative; z-index: 1; }
.wg-footer { position: absolute; bottom: 15px; right: 20px; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; opacity: .6; z-index: 1; }

.wallet-stats-white-card { background: var(--surface); margin: 0 15px; border-radius: var(--radius-lg); padding: 20px 10px; display: flex; justify-content: space-around; color: var(--text-dark); box-shadow: var(--shadow-md); }
.ws-item { text-align: center; flex: 1; }
.ws-item:first-child { border-right: 1px solid var(--border-soft); }
.ws-icon { font-size: 22px; margin-bottom: 8px; }
.ws-label { font-size: 11.5px; font-weight: 800; color: var(--text-muted); letter-spacing: .3px; margin-bottom: 4px; }
.ws-amount { font-size: 22px; font-weight: 700; color: var(--text-dark); }

.wallet-action-row { display: flex; gap: 14px; padding: 20px 15px; }
.wa-btn { flex: 1; padding: 15px; border-radius: 14px; border: none; color: white; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; box-shadow: var(--shadow-md); transition: var(--fast); }
.wa-btn:hover { transform: translateY(-2px); }
.wa-btn:active { transform: translateY(0) scale(.97); }
.wa-btn.add { background: linear-gradient(135deg, #6A3FD8, #4B2AAE); }
.wa-btn.withdraw { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); }

.wallet-section-title { padding: 6px 20px 0; font-size: 17px; font-weight: 700; color: white; margin-bottom: 14px; }
.quick-action-card { background: var(--surface); margin: 0 15px 18px; border-radius: var(--radius-md); padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; color: var(--text-dark); transition: var(--fast); box-shadow: var(--shadow-sm); }
.quick-action-card:active { transform: scale(.98); }
.qa-info { display: flex; align-items: center; gap: 14px; }
.qa-icon { width: 42px; height: 42px; background: var(--primary-light); color: var(--primary-dark); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.qa-text div:first-child { font-weight: 800; font-size: 14.5px; }
.qa-text div:last-child { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.learn-list { padding: 0 15px 30px; display: flex; flex-direction: column; gap: 12px; }
.learn-item { background: var(--surface); border-radius: var(--radius-md); padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; color: var(--text-dark); cursor: pointer; transition: var(--fast); box-shadow: var(--shadow-sm); }
.learn-item:active { transform: scale(.98); }
.li-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-right: 12px; color: var(--primary-dark); flex-shrink: 0; }

/* =========================================================================
   MONEY FLOW — Add Money / Withdraw / Forms (shared card + form kit)
   ========================================================================= */
.pay-hero { background: linear-gradient(135deg, var(--ink), #241a3d); border-radius: var(--radius-md); padding: 20px; margin-bottom: 18px; text-align: center; color: white; }
.pay-hero-title { color: var(--primary); font-weight: 800; font-size: 16px; }
.pay-hero-sub { color: #b9b9c9; font-size: 13px; margin-top: 5px; }

.pay-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.pay-tab-btn { flex: 1; padding: 12px; background: var(--surface-alt); border: none; border-radius: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer; font-size: 14px; transition: var(--fast); }
.pay-tab-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary); box-shadow: 0 6px 14px rgba(255,179,0,.3); }

.pay-methods-card { background: var(--surface); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.pay-methods-card .pm-row { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px dashed var(--border-soft); }
.pay-methods-card .pm-row:last-child { border-bottom: none; padding-bottom: 0; }
.pm-instruction { font-size: 11px; color: var(--text-faint); }

.pay-card { background: var(--surface); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }
.form-label { font-weight: 800; font-size: 13.5px; color: var(--text-dark); display: block; margin-bottom: 9px; }
.form-select, .form-input {
    width: 100%; padding: 13px 14px; border: 1.5px solid var(--border-soft); border-radius: 12px; font-size: 15px;
    outline: none; margin-bottom: 16px; box-sizing: border-box; color: var(--text-dark); transition: var(--fast); background: var(--surface);
}
.form-select:focus, .form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255,179,0,.12); }
.form-input.amount { font-size: 21px; font-weight: 800; }

.quick-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.quick-amount-btn { background: var(--surface); border: 1.5px solid var(--border-soft); border-radius: 12px; padding: 12px; font-weight: 800; font-size: 15px; color: var(--text-dark); cursor: pointer; transition: var(--fast); }
.quick-amount-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.quick-amount-btn:active { transform: scale(.95); }

.btn-block {
    width: 100%; padding: 16px; border: none; border-radius: 14px; font-size: 17px; font-weight: 800;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--fast);
    box-shadow: var(--shadow-md);
}
.btn-block:active { transform: scale(.98); }
.btn-block.gold { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary); }
.btn-block.teal { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: #fff; }
.btn-block.ink { background: var(--ink); color: #fff; }
.btn-block:hover { transform: translateY(-2px); }

.info-note { margin-top: 16px; padding: 14px; border-radius: 12px; font-size: 13px; line-height: 1.6; display: flex; gap: 8px; }
.info-note.good { background: var(--tint-good-bg); color: var(--tint-good-text); }
.info-note.warn { background: var(--tint-warn-bg); color: var(--tint-warn-text); }

.min-notice { background: var(--tint-warn-bg); color: var(--tint-warn-text); padding: 12px 14px; font-size: 12.5px; border-radius: 12px; display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 20px; }

.alert-box { padding: 11px 15px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; text-align: center; font-weight: 600; }
.alert-box.error { background: var(--tint-bad-bg); color: var(--tint-bad-text); }
.alert-box.error a { color: var(--tint-bad-text); }
.alert-box.success { background: var(--tint-good-bg); color: var(--tint-good-text); }

/* =========================================================================
   TRANSACTION HISTORY / NOTIFICATIONS
   ========================================================================= */
.list-page-pad { padding: 15px; }
.txn-card {
    background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: 12px; padding: 15px 16px;
    display: flex; justify-content: space-between; align-items: center; border-left: 4px solid var(--border-soft);
    opacity: 0; transform: translateY(8px); animation: cardIn .4s var(--ease) forwards;
}
.txn-card.in { border-left-color: var(--secondary); }
.txn-card.out { border-left-color: var(--danger); }
.txn-card:nth-child(1), .notif-card:nth-child(1) { animation-delay: .02s; }
.txn-card:nth-child(2), .notif-card:nth-child(2) { animation-delay: .07s; }
.txn-card:nth-child(3), .notif-card:nth-child(3) { animation-delay: .12s; }
.txn-card:nth-child(n+4), .notif-card:nth-child(n+4) { animation-delay: .16s; }
.txn-title { font-weight: 800; font-size: 14px; color: var(--text-dark); }
.txn-date { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.txn-method { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.txn-amount { font-size: 15.5px; font-weight: 800; text-align: right; }
.txn-amount.in { color: var(--secondary-dark); }
.txn-amount.out { color: var(--danger); }
.txn-status { font-size: 10.5px; font-weight: 800; text-transform: uppercase; text-align: right; margin-top: 3px; letter-spacing: .3px; }

.notif-card { background: var(--surface); border-radius: var(--radius-md); padding: 15px 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(8px); animation: cardIn .4s var(--ease) forwards; }
.notif-title { font-weight: 800; font-size: 14px; color: var(--text-dark); margin-bottom: 5px; display: flex; align-items: center; gap: 7px; }
.notif-title i { color: var(--primary-dark); }
.notif-image { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin: 8px 0; cursor: pointer; transition: var(--fast); }
.notif-image:active { transform: scale(.98); }
.notif-msg { font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.notif-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
.notif-time { font-size: 11px; color: var(--text-faint); }
.notif-link-btn { font-size: 11.5px; font-weight: 800; color: var(--primary-dark); display: flex; align-items: center; gap: 5px; text-decoration: none; flex-shrink: 0; }

.empty-msg { text-align: center; padding: 40px 20px; color: var(--text-faint); font-weight: 600; }

/* =========================================================================
   POPUPS / MODALS
   ========================================================================= */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11,13,20,.65); backdrop-filter: blur(2px); z-index: 3000; display: none; align-items: center; justify-content: center; }
.modal.active { display: flex; animation: pageFade .2s ease; }
.modal-box { background: var(--surface); color: var(--text-dark); width: 90%; max-width: 350px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-lg); animation: cardShow .3s var(--ease); }
.startup-btn { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary); font-weight: 800; font-size: 16px; width: 100%; padding: 13px; border: none; border-radius: 30px; cursor: pointer; }

/* =========================================================================
   REFER PAGE
   ========================================================================= */
.refer-page-container { display: flex; flex-direction: column; min-height: 100vh; background: var(--surface); }
.refer-header {
    background:
        radial-gradient(circle at 15% -10%, rgba(255,179,0,.18), transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(0,194,168,.10), transparent 40%),
        linear-gradient(160deg, var(--ink), #221a38);
    padding: 44px 20px 24px; text-align: center; border-bottom-left-radius: 26px; border-bottom-right-radius: 26px;
}
.refer-avatar-circle { width: 110px; height: 110px; background: var(--primary-light); border-radius: 50%; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; border: 4px solid rgba(255,255,255,.15); overflow: hidden; }
.refer-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.refer-title { color: var(--primary); font-weight: 700; font-size: 21px; margin-bottom: 10px; letter-spacing: .3px; }
.refer-desc { color: rgba(255,255,255,.85); font-size: 14px; line-height: 1.6; }
.refer-body { padding: 30px 20px; text-align: center; flex: 1; background: var(--surface); }
.refer-label { font-size: 15px; font-weight: 700; color: var(--text-muted); margin-bottom: 15px; letter-spacing: .4px; }
.refer-code-box { background: var(--primary-light); border: 2px dashed var(--primary); padding: 16px; font-size: 22px; font-weight: 700; color: var(--text-dark); display: inline-block; margin-bottom: 28px; letter-spacing: 1px; min-width: 250px; border-radius: 14px; cursor: pointer; transition: var(--fast); }
.refer-code-box:active { transform: scale(.97); }
.refer-illustration { width: 100%; max-width: 400px; margin: 0 auto 28px; display: block; border-radius: var(--radius-md); }
.refer-btn-fixed { background: linear-gradient(135deg, #6A3FD8, #4B2AAE); color: white; font-size: 17px; font-weight: 800; padding: 15px; width: 90%; border: none; border-radius: 14px; cursor: pointer; margin-bottom: 20px; box-shadow: 0 10px 24px rgba(75,42,174,.35); transition: var(--fast); }
.refer-btn-fixed:hover { transform: translateY(-2px); }
.refer-btn-fixed:active { transform: translateY(0) scale(.97); }

/* =========================================================================
   NAV & UTILS
   ========================================================================= */
.back-nav { padding: 15px 60px 15px 15px; color: var(--text-dark); font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--border-soft); font-size: 16px; width: 100%; position: sticky; top: 0; z-index: 100; transition: var(--fast); box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-nav:active { background: var(--bg-color); }
.back-nav.dark-mode { background: var(--ink); color: white; border-bottom: 1px solid rgba(255,255,255,.08); }
.hidden { display: none !important; }
.primary-btn { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary); padding: 13px; width: 100%; border: none; border-radius: 12px; font-weight: 800; cursor: pointer; transition: var(--fast); }
.primary-btn:hover { transform: translateY(-1px); }
.btn-copy { background: var(--surface-alt); border: none; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--text-dark); cursor: pointer; transition: var(--fast); }
.btn-copy:active { transform: scale(.94); }

/* =========================================================================
   TAB BAR
   ========================================================================= */
.tab-bar { position: fixed; bottom: 0; left: 0; width: 100%; height: 65px; background: var(--surface); display: flex; justify-content: space-around; align-items: center; box-shadow: 0 -4px 20px rgba(18,20,28,.07); z-index: 1000; border-top: 1px solid var(--border-soft); }
.tab-item { display: flex; flex-direction: column; align-items: center; width: 20%; color: var(--text-dark); opacity: 1; cursor: pointer; text-decoration: none; }
.tab-icon-box { display: flex; justify-content: center; align-items: center; margin-bottom: 2px; transition: all var(--med) var(--ease); width: 42px; height: 30px; border-radius: 15px; }
.tab-item img { width: 22px; height: 22px; opacity: .75; filter: none; transition: var(--fast); }
.tab-item span { font-size: 10px; margin-top: 2px; font-weight: 700; color: var(--text-faint); transition: var(--fast); }
.tab-item.active img { opacity: 1; }
.tab-item.active span { font-weight: 800; color: var(--text-dark); }
.tab-item.active .tab-icon-box { background-color: var(--primary-light); width: 54px; }

.menu-list { background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--border-soft); overflow: hidden; box-shadow: var(--shadow-sm); }
.menu-item { padding: 15px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--border-soft); cursor: pointer; color: var(--text-dark); font-weight: 700; text-decoration: none; transition: var(--fast); }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg-color); }
.menu-item img { width: 20px; }

.fab-telegram { position: fixed; bottom: 80px; right: 20px; width: 50px; height: 50px; border-radius: 50%; box-shadow: var(--shadow-md); z-index: 999; cursor: pointer; background: var(--primary-light); padding: 5px; transition: var(--fast); }
.fab-telegram:active { transform: scale(.92); }
.fab-telegram img { width: 100%; height: 100%; }

/* =========================================================================
   RIPPLE (added dynamically by app-common.js on tappable elements)
   ========================================================================= */
.rz-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.45); animation: rzRipple .55s ease-out; pointer-events: none; }
@keyframes rzRipple { to { transform: scale(2.6); opacity: 0; } }
.btn-join-main, .btn-details, .auth-black-btn, .join-btn-full, .wa-btn, .refer-btn-fixed, .btn-block, .startup-btn, .ep-btn, .primary-btn { position: relative; overflow: hidden; }

/* count-up pulse for balance figures */
.count-pulse { animation: countPulse .4s var(--ease); }
@keyframes countPulse { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* =========================================================================
   ACCESSIBILITY & MOTION
   ========================================================================= */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .tab-item:focus-visible, .menu-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   RESPONSIVE (small phones / larger tablets)
   ========================================================================= */
@media (max-width: 360px) {
    .mc-thumb { width: 88px; height: 88px; }
    .wg-balance { font-size: 34px; }
}

@media (min-width: 720px) {
    .page-wrap, .wallet-redesign-container, .refer-page-container { max-width: 640px; margin: 0 auto; box-shadow: 0 0 60px rgba(0,0,0,.06); }
    .tab-bar, .fab-telegram { left: 50%; transform: translateX(-50%); max-width: 640px; width: 100%; }
    .fab-telegram { transform: none; left: auto; right: calc(50% - 320px + 20px); }
    .join-btn-full { left: calc(50% - 320px + 5%); width: calc(640px * .9); max-width: 576px; }
}

/* =========================================================================
   THEME-COLOR TRANSITIONS (smooth cross-fade when the toggle is used)
   ========================================================================= */
.match-card, .cat-card-new, .cat-card-info, .ep-card, .pay-card, .pay-methods-card,
.form-select, .form-input, .txn-card, .notif-card, .menu-list, .menu-item,
.tab-bar, .quick-action-card, .learn-item, .wallet-stats-white-card,
.md-table-container, .rd-card, .rd-row, .join-card, .join-input-field,
.back-nav, .modal-box, .pay-tab-btn, .quick-amount-btn, .md-player-row,
.mc-prog-bar, .rd-table-head {
    transition: background-color var(--med) var(--ease), color var(--med) var(--ease), border-color var(--med) var(--ease), box-shadow var(--med) var(--ease);
}

/* =========================================================================
   THEME TOGGLE — floating pill switch, always reachable
   ========================================================================= */
.theme-fab {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1200;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-dark);
    font-size: 17px;
    transition: transform var(--fast) var(--ease), background-color var(--med), border-color var(--med), box-shadow var(--fast);
}
.theme-fab:active { transform: scale(.88); }
.theme-fab i { transition: transform .45s var(--ease), opacity .25s ease; }
.theme-fab .fa-sun { position: absolute; }
.theme-fab .fa-moon { position: absolute; }
html[data-theme="dark"] .theme-fab .fa-sun,
html[data-theme="light"] .theme-fab .fa-moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
html[data-theme="dark"] .theme-fab .fa-moon,
html[data-theme="light"] .theme-fab .fa-sun { opacity: 1; transform: rotate(0) scale(1); }

@media (min-width: 720px) {
    .theme-fab { right: calc(50% - 320px + 14px); }
}

/* =========================================================================
   AMBIENT "ARENA" ATMOSPHERE — cheap, GPU-friendly glow + scanline texture
   for the always-dark stage panels (profile header, wallet vault, room
   info card, refer header). No blur filters on repeating list items, so
   scrolling stays smooth on low-end phones.
   ========================================================================= */
.marquee-container {
    position: relative;
    background-image:
        radial-gradient(circle at 15% -10%, rgba(255,179,0,.16), transparent 45%),
        radial-gradient(circle at 100% 0%, rgba(0,194,168,.10), transparent 40%),
        repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0px, rgba(255,255,255,.025) 1px, transparent 1px, transparent 5px);
}
.mc-footer-timer.is-live { background: var(--live); box-shadow: inset 0 0 0 1px rgba(255,59,78,.5), 0 0 18px rgba(255,59,78,.3); }
.mc-footer-timer.is-done { background: var(--text-faint); }

/* small colored eyebrow rule for section headings (structural, not decorative) */
.category-title, .wallet-section-title {
    position: relative;
    padding-left: 14px;
}
.category-title::before, .wallet-section-title::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 5px; height: 62%;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.appearance-row { padding: 15px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--border-soft); }
.appearance-row > span:first-of-type { flex: 1; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; gap: 15px; }
.appearance-switch { display: flex; background: var(--surface-alt); border-radius: 20px; padding: 3px; gap: 2px; }
.appearance-switch button { border: none; background: transparent; padding: 6px 12px; border-radius: 16px; font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 5px; transition: var(--fast); }
.appearance-switch button.active { background: var(--primary); color: var(--on-primary); box-shadow: 0 3px 8px rgba(255,179,0,.35); }
