:root {
    --bg: #070b14;
    --bg2: #0f172a;
    --card: #151f33;
    --card2: #1e293b;
    --accent: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.35);
    --accent2: #22c55e;
    --text: #f8fafc;
    --muted: #94a3b8;
    --danger: #ef4444;
    --radius: 14px;
    --nav-h: 68px;
    --gold-gradient: linear-gradient(135deg, #b45309 0%, #fbbf24 50%, #f59e0b 100%);
    --hero-gradient: linear-gradient(145deg, #1a2744 0%, #0f172a 55%, #0a1628 100%);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(245, 158, 11, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(34, 197, 94, 0.05), transparent);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: calc(var(--nav-h) + 16px);
}

.app-wrap {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
}

@media (min-width: 768px) {
    .app-wrap { max-width: 720px; }
}

.app-header {
    background: var(--hero-gradient);
    padding: 1.1rem 1rem 1.35rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.15);
    position: relative;
    overflow: hidden;
}

.app-header::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12), transparent 70%);
    border-radius: 50%;
}

.app-header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-header .sub {
    color: var(--muted);
    font-size: .82rem;
    margin-top: .3rem;
}

.balance-card {
    background: var(--gold-gradient);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin: -0.65rem 1rem 1rem;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    z-index: 2;
}

.balance-card .label { font-size: .72rem; opacity: .85; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.balance-card .amount { font-size: 1.85rem; font-weight: 900; color: #1e293b; text-shadow: 0 1px 0 rgba(255,255,255,.2); }

.content { padding: 0 1rem 1rem; }

.home-hero {
    background: var(--hero-gradient);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.home-hero-tag {
    display: inline-block;
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.65rem;
}

.home-hero h2 { margin: 0 0 0.35rem; font-size: 1.15rem; font-weight: 800; }
.home-hero p { margin: 0 0 1rem; font-size: .82rem; color: var(--muted); line-height: 1.45; }

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.quick-actions .btn-play-main {
    grid-column: span 2;
    background: var(--gold-gradient);
    color: #1e293b;
    font-size: 1rem;
    font-weight: 800;
    padding: 0.85rem;
    box-shadow: 0 6px 20px var(--accent-glow);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    animation: pulse-glow 2.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 6px 20px var(--accent-glow); }
    50% { box-shadow: 0 6px 28px rgba(245, 158, 11, 0.5); }
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.home-stat {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.55rem 0.4rem;
    text-align: center;
}

.home-stat .n { font-size: 1rem; font-weight: 800; color: var(--accent); }
.home-stat .l { font-size: .58rem; color: var(--muted); text-transform: uppercase; font-weight: 600; }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.section-head h3 {
    margin: 0;
    font-size: .88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-head a {
    font-size: .72rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.market-grid { display: flex; flex-direction: column; gap: 0.75rem; }

.market-card-wrap { width: 100%; }

.market-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.market-state-open .market-card {
    border-color: rgba(245, 158, 11, 0.28);
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.08);
}

.market-state-closed .market-card {
    opacity: 0.92;
    border-color: rgba(148, 163, 184, 0.15);
    background: rgba(15, 23, 42, 0.65);
}

.market-state-open .market-card-main {
    border-left: 3px solid #f59e0b;
}

.market-state-closed .market-card-main {
    border-left: 3px solid rgba(148, 163, 184, 0.35);
}

.market-card-main {
    display: block;
    padding: 0.9rem 1rem 0.65rem;
    text-decoration: none;
    color: inherit;
}

.market-card-main:hover { background: rgba(255, 255, 255, 0.02); }

.market-card-name { font-weight: 800; font-size: .95rem; margin-bottom: 0.25rem; }
.market-card-times { font-size: .68rem; color: var(--muted); margin-bottom: 0.35rem; }

.market-state-open .market-card-result {
    font-family: Consolas, monospace;
    font-size: .88rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.market-state-closed .market-card-result {
    font-family: Consolas, monospace;
    font-size: .86rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.market-card-body { min-width: 0; }

.market-status-line {
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.market-status-line.status-running { color: #fbbf24; }
.market-status-line.status-closed { color: var(--muted); }

.market-card-wrap.is-inactive .market-card { opacity: 0.6; }

.market-card-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

.market-state-open .market-card-bar {
    border-top-color: rgba(245, 158, 11, 0.12);
}

.market-timing-link {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: none;
    padding: 0.2rem 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.market-timing-link:hover { color: var(--accent); }

.play-chip {
    font-size: .72rem;
    font-weight: 800;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
}

.play-chip-gold {
    background: var(--gold-gradient);
    color: #1e293b;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.play-chip-muted {
    background: rgba(148, 163, 184, 0.18);
    color: var(--muted);
    display: inline-block;
}

.market-timing-popup { text-align: left; }
.market-timing-popup .mtp-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
}
.market-timing-popup .mtp-row:last-child { border-bottom: none; }
.market-timing-popup .mtp-row strong { color: #1e293b; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: .75rem;
    border: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.card h3 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 800; }

.btn {
    display: inline-block;
    padding: .65rem 1rem;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: .9rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    transition: filter 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--gold-gradient); color: #1e293b; box-shadow: 0 4px 14px var(--accent-glow); }
.btn-success { background: linear-gradient(135deg, #15803d, #22c55e); color: #ecfdf5; }
.btn-outline { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.15); color: var(--text); }
.btn-sm { padding: .45rem .85rem; font-size: .78rem; width: auto; }

.form-label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .35rem; font-weight: 600; }

.form-control, .form-select {
    width: 100%;
    padding: .7rem .85rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: #0a1020;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: .75rem;
}

.form-control:focus, .form-select:focus { outline: 2px solid var(--accent); border-color: transparent; }

.alert { padding: .75rem 1rem; border-radius: 10px; margin-bottom: .75rem; font-size: .875rem; font-weight: 600; }
.alert-success { background: rgba(34,197,94,.15); color: #86efac; border: 1px solid rgba(34,197,94,.25); }
.alert-danger { background: rgba(239,68,68,.15); color: #fca5a5; border: 1px solid rgba(239,68,68,.25); }
.alert-warning { background: rgba(245,158,11,.15); color: #fde68a; border: 1px solid rgba(245,158,11,.25); }

.market-item { display: flex; justify-content: space-between; align-items: center; padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.market-item:last-child { border-bottom: none; }
.market-name { font-weight: 700; }
.market-meta { font-size: .75rem; color: var(--muted); }
.market-result { font-family: monospace; color: var(--accent); font-size: .9rem; font-weight: 700; }

.badge { display: inline-block; padding: .2rem .5rem; border-radius: 999px; font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.badge-open { background: rgba(34,197,94,.2); color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.badge-closed { background: rgba(148,163,184,.15); color: #cbd5e1; }

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    height: var(--nav-h);
    background: rgba(21, 31, 51, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(245, 158, 11, 0.15);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) { .bottom-nav { max-width: 720px; } }

.bottom-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: center;
    flex: 1;
    padding: .5rem;
}

.bottom-nav a.active { color: var(--accent); }
.bottom-nav a span { display: block; font-size: 1.35rem; margin-bottom: .12rem; }
.bottom-nav a.active span { filter: drop-shadow(0 0 6px var(--accent-glow)); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.text-muted { color: var(--muted); font-size: .8rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mb-0 { margin-bottom: 0; }

table.rates { width: 100%; font-size: .85rem; border-collapse: collapse; }
table.rates td, table.rates th { padding: .5rem; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; }
table.rates th { color: var(--muted); font-weight: 600; }

.tx-item { padding: .65rem 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: .85rem; }
.tx-item:last-child { border-bottom: none; }
.tx-credit { color: #86efac; font-weight: 700; }
.tx-debit { color: #fca5a5; font-weight: 700; }

.bet-card { background: var(--card); border-radius: var(--radius); padding: 0.95rem 1rem; margin-bottom: 0.65rem; border: 1px solid rgba(255, 255, 255, 0.06); }
.bet-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.bet-status { font-size: .65rem; font-weight: 800; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 999px; }
.bet-status-won { background: rgba(34,197,94,.2); color: #86efac; }
.bet-status-lost { background: rgba(239,68,68,.2); color: #fca5a5; }
.bet-status-pending { background: rgba(245,158,11,.2); color: #fde68a; }
.bet-line { font-size: .82rem; padding: 0.3rem 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.bet-line code { color: var(--accent); font-weight: 800; font-size: .9rem; }
.bet-footer { font-size: .72rem; color: var(--muted); margin-top: 0.45rem; padding-top: 0.45rem; border-top: 1px dashed rgba(255,255,255,.08); }

.auth-page { padding: 2.5rem 1.25rem; max-width: 400px; margin: 0 auto; min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
.auth-brand { text-align: center; margin-bottom: 2rem; }
.auth-brand h1 { font-size: 1.75rem; font-weight: 900; background: var(--gold-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin: 0 0 0.35rem; }
.auth-brand p { color: var(--muted); font-size: .82rem; margin: 0; }
.auth-card { background: var(--card); border-radius: var(--radius); padding: 1.25rem; border: 1px solid rgba(245, 158, 11, 0.15); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35); }

.wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin-bottom: 1rem; }

.link-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    background: rgba(255,255,255,.03);
    border-radius: 10px;
    margin-bottom: 0.45rem;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(255,255,255,.06);
    font-size: .85rem;
    font-weight: 600;
}

.link-card:hover { border-color: rgba(245,158,11,.3); }
.link-card-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(245,158,11,.12); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }

.app-header-row { display: flex; justify-content: space-between; align-items: flex-start; }
.notify-bell {
    position: relative;
    z-index: 10;
    font-size: 1.35rem;
    text-decoration: none;
    padding: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}
.app-header-row > div:first-child { position: relative; z-index: 10; }
.notify-count { position: absolute; top: -2px; right: -4px; background: #ef4444; color: #fff; font-size: 0.6rem; font-weight: 800; padding: 2px 5px; border-radius: 999px; }
.notify-item { display: block; padding: 0.65rem 0; border-bottom: 1px solid rgba(255,255,255,.06); text-decoration: none; color: inherit; }
.notify-item.unread { background: rgba(245,158,11,.08); padding-left: 0.5rem; border-radius: 6px; }
.notify-dot { display: inline-block; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; margin-left: 4px; }
.upi-pay-card .upi-id-display { font-size: 1.15rem; color: var(--accent); display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.result-jodi-red { color: #f87171; font-weight: 800; }
.rules-list { margin: 0; padding-left: 1.1rem; font-size: 0.88rem; }
.patti-ank-block { margin-bottom: 0.5rem; font-size: 0.75rem; }
.patti-nums { color: var(--muted); word-break: break-word; }
.jodi-red-list { font-size: 0.8rem; color: #fca5a5; }
.faq-item { margin-bottom: 0.5rem; font-size: 0.88rem; }
.faq-item summary { cursor: pointer; font-weight: 700; }
.badge-pending { background: rgba(245,158,11,.25); color: #fde68a; }
.badge-approved { background: rgba(34,197,94,.2); color: #86efac; }
.badge-rejected, .badge-cancelled { background: rgba(239,68,68,.2); color: #fca5a5; }
.filter-card { padding: 0.75rem; margin-bottom: 0.75rem; }

/* Support channels */
.support-channels-note {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.85rem;
}

.support-channels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.support-channel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.5rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.support-channel-whatsapp { border-color: rgba(34, 197, 94, 0.35); color: #86efac; }
.support-channel-telegram { border-color: rgba(56, 189, 248, 0.35); color: #7dd3fc; }
.support-channel-phone { border-color: rgba(148, 163, 184, 0.35); }
.support-channel-email { border-color: rgba(251, 191, 36, 0.35); color: #fde68a; }

.support-channels-compact .support-channels-grid {
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    margin-top: 0.75rem;
}

.support-channels-compact .support-channel-btn {
    padding: 0.45rem 0.35rem;
    font-size: 0.68rem;
}

/* Floating support (logged-in) */
.player-support-fab {
    position: fixed;
    right: 0.85rem;
    bottom: 4.5rem;
    z-index: 90;
}

.player-support-fab-btn {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.45);
    background: var(--card);
    color: var(--accent);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.player-support-fab-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.45rem);
    min-width: 10.5rem;
    background: var(--card);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.player-support-fab-panel[hidden] { display: none !important; }

.player-support-fab-title {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0.35rem 0.35rem;
    letter-spacing: 0.04em;
}

.player-support-fab-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.player-support-fab-link:hover { background: rgba(245, 158, 11, 0.1); }

.player-support-fab-all {
    margin-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.5rem;
    color: var(--accent);
    font-size: 0.72rem;
}
