:root {
    --navy:      #0f172a;
    --navy-2:    #1e293b;
    --navy-3:    #334155;
    --gold:      #f59e0b;
    --gold-h:    #d97706;
    --gold-soft: rgba(245,158,11,.12);
    --live:      #22c55e;
    --live-soft: rgba(34,197,94,.12);
    --bg:        #f1f5f9;
    --card-bg:   #ffffff;
    --card-bd:   rgba(0,0,0,.06);
    --text:      #0f172a;
    --text-muted:#64748b;
    --nav-bg:    #0f172a;
    --nav-text:  #cbd5e1;
    --nav-h:     94px;
}
html.dark {
    --bg:        #0b1120;
    --card-bg:   #1e293b;
    --card-bd:   rgba(255,255,255,.07);
    --text:      #f1f5f9;
    --text-muted:#94a3b8;
    --nav-bg:    #070d1a;
    --nav-text:  #94a3b8;
}

html { scroll-behavior:smooth; }
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
body { font-family:'Nunito','Segoe UI',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; display:flex; flex-direction:column; transition:background .3s,color .3s; }
main { flex:1; }
a { text-decoration:none; color:inherit; }
img { max-width:100%; }
[x-cloak] { display:none !important; }

.ticker-wrap { background:#070d1a; border-bottom:1px solid rgba(245,158,11,.2); overflow:hidden; padding:5px 0; }
.ticker-inner { display:inline-flex; white-space:nowrap; animation:scrollTick 45s linear infinite; }
.ticker-inner span { font-size:.72rem; font-weight:700; color:#94a3b8; padding:0 10px; }
.ticker-badge { color:var(--gold); background:rgba(245,158,11,.12); padding:1px 7px; border-radius:4px; font-size:.65rem; margin-right:4px; }
.ticker-num { color:#fff; font-weight:900; }
@keyframes scrollTick { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

.site-navbar { display:block; background:var(--nav-bg); position:sticky; top:0; z-index:100; box-shadow:0 4px 20px rgba(0,0,0,.3); padding:0; }
.navbar-top { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; padding:9px 20px; height:56px; border-bottom:1px solid rgba(255,255,255,.05); }
.nav-top-left { display:flex; align-items:center; }
.nav-top-right { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.nav-logo-wrap { display:flex; align-items:center; justify-content:center; }
.nav-logo { height:40px; max-width:300px; width:auto; object-fit:contain; display:block; }
.nav-logo-ph { height:38px; padding:0 16px; background:rgba(245,158,11,.08); border:1.5px dashed rgba(245,158,11,.35); border-radius:9px; display:flex; align-items:center; gap:8px; font-size:.9rem; font-weight:900; color:#fff; }
.nav-logo-ph i { color:var(--gold); font-size:.85rem; }
.nav-logo-ph em { color:var(--gold); font-style:normal; }
.navbar-bottom { display:flex; align-items:center; justify-content:center; height:38px; padding:0 20px; transition:height .3s ease,opacity .3s ease; }
.nav-links { display:flex; align-items:center; gap:2px; list-style:none; }
.nav-links a { color:var(--nav-text); font-size:.78rem; font-weight:700; padding:5px 12px; border-radius:6px; transition:background .15s,color .15s; white-space:nowrap; display:flex; align-items:center; gap:5px; }
.nav-links a:hover { background:rgba(255,255,255,.07); color:#fff; }
.nav-links a.active { color:var(--gold); }
.nav-mobile-btn { display:none; width:34px; height:34px; border-radius:7px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); cursor:pointer; align-items:center; justify-content:center; color:#cbd5e1; font-size:.9rem; transition:background .15s; }
.nav-mobile-btn:hover { background:rgba(255,255,255,.13); color:#fff; }

.lang-wrap { position:relative; }
.lang-btn { display:flex; align-items:center; gap:6px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); color:#cbd5e1; font-size:.73rem; font-weight:700; padding:5px 10px; border-radius:7px; cursor:pointer; font-family:'Nunito',sans-serif; transition:background .15s; white-space:nowrap; }
.lang-btn:hover { background:rgba(255,255,255,.13); color:#fff; }
.lang-menu { position:absolute; top:calc(100% + 6px); right:0; background:var(--navy-2); border:1px solid rgba(255,255,255,.1); border-radius:10px; overflow:hidden; box-shadow:0 8px 24px rgba(0,0,0,.35); min-width:130px; z-index:300; }
.lang-menu button { display:flex; align-items:center; gap:8px; width:100%; padding:8px 14px; background:none; border:none; cursor:pointer; color:#cbd5e1; font-size:.78rem; font-weight:600; font-family:'Nunito',sans-serif; transition:background .1s; }
.lang-menu button:hover { background:rgba(255,255,255,.08); color:#fff; }
.lang-menu button.lm-active { color:var(--gold); }
.dark-toggle { width:34px; height:34px; border-radius:7px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); cursor:pointer; display:flex; align-items:center; justify-content:center; color:#cbd5e1; font-size:.85rem; transition:background .15s; }
.dark-toggle:hover { background:rgba(255,255,255,.13); color:#fff; }

.container { max-width:1160px; margin:0 auto; padding:0 20px; }

.banner-section { background:transparent; padding:28px 0 6px; }
.swiper { width:100%; padding:10px 0 40px !important; }
.swiper-slide { width:60%; max-width:580px; border-radius:16px; overflow:hidden; cursor:grab; height:190px; position:relative; }
.swiper-slide img { width:100%; height:100%; object-fit:cover; display:block; }
.slide-bg { width:100%; height:100%; position:relative; display:flex; align-items:center; justify-content:center; flex-direction:column; text-align:center; padding:24px; overflow:hidden; }
.slide-bg::before { content:''; position:absolute; inset:0; background:radial-gradient(ellipse at center,rgba(245,158,11,.09) 0%,transparent 70%); }
.s-blue   { background:linear-gradient(135deg,#0f172a 0%,#1a3a6b 55%,#0d2447 100%); }
.s-purple { background:linear-gradient(135deg,#1a0a2e 0%,#2d1b69 55%,#0f1b42 100%); }
.s-green  { background:linear-gradient(135deg,#0f2a1a 0%,#1a4a2e 55%,#0a1f12 100%); }
.slide-tag { font-size:.6rem; font-weight:900; letter-spacing:1.5px; text-transform:uppercase; background:rgba(245,158,11,.18); border:1px solid rgba(245,158,11,.35); color:var(--gold); border-radius:20px; padding:3px 11px; margin-bottom:9px; position:relative; }
.slide-title { font-size:1.3rem; font-weight:900; color:#fff; line-height:1.2; position:relative; text-shadow:0 2px 12px rgba(0,0,0,.5); }
.slide-title em { color:var(--gold); font-style:normal; }
.slide-sub { font-size:.75rem; color:#94a3b8; margin-top:6px; position:relative; }
.slide-deco { position:absolute; font-size:5.5rem; opacity:.05; right:-8px; bottom:-12px; color:#fff; }
.swiper-pagination-bullet { background:rgba(255,255,255,.4) !important; }
.swiper-pagination-bullet-active { background:var(--gold) !important; }

.ad-banner-section { padding:8px 0 0; }
.ad-banner-wrap { max-width:580px; margin:0 auto; padding:0 20px; }
.ad-banner-img { width:100%; height:auto; display:block; border-radius:12px; }
.ad-banner-ph { border-radius:12px; overflow:hidden; border:1.5px dashed rgba(245,158,11,.28); background:linear-gradient(90deg,rgba(245,158,11,.04),rgba(245,158,11,.07),rgba(245,158,11,.04)); height:90px; display:flex; align-items:center; justify-content:center; gap:14px; cursor:pointer; transition:background .2s; }
.ad-banner-ph:hover { background:linear-gradient(90deg,rgba(245,158,11,.07),rgba(245,158,11,.12),rgba(245,158,11,.07)); }
.ad-banner-icon { font-size:1.8rem; color:rgba(245,158,11,.35); }
.ad-banner-label { display:flex; flex-direction:column; gap:2px; }
.ad-banner-label span { font-size:.8rem; font-weight:700; color:var(--text-muted); }
.ad-banner-label small { font-size:.65rem; color:var(--gold); opacity:.8; }

.table-card { background:var(--card-bg); border:1px solid var(--card-bd); border-radius:16px; overflow:hidden; margin-bottom:32px; }
.table-card-header { padding:14px 18px; border-bottom:1px solid var(--card-bd); display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.table-card-title { font-size:.88rem; font-weight:800; color:var(--text); }
table { width:100%; border-collapse:collapse; font-size:.78rem; }
thead th { background:var(--bg); padding:9px 12px; text-align:left; font-weight:700; font-size:.62rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; border-bottom:1px solid var(--card-bd); }
tbody td { padding:11px 12px; border-bottom:1px solid var(--card-bd); vertical-align:middle; color:var(--text); }
tbody tr:last-child td { border-bottom:none; }
tbody tr:hover td { background:rgba(245,158,11,.04); }
.td-market { font-weight:700; }
.td-draw { display:inline-flex; align-items:center; padding:2px 7px; background:rgba(37,99,235,.12); color:#60a5fa; border-radius:20px; font-size:.68rem; font-weight:700; font-family:monospace; }
.td-code { font-family:monospace; font-weight:800; color:var(--gold); font-size:.82rem; }

.section-title { font-size:.68rem; font-weight:800; letter-spacing:1.5px; text-transform:uppercase; color:var(--gold); margin-bottom:14px; display:flex; align-items:center; gap:8px; }
.section-title::after { content:''; flex:1; height:1px; background:linear-gradient(90deg,rgba(245,158,11,.3),transparent); }

.featured-result { background:var(--card-bg); border:1px solid var(--card-bd); border-radius:16px; overflow:hidden; margin-bottom:24px; display:flex; align-items:stretch; transition:box-shadow .2s; }
.featured-result:hover { box-shadow:0 10px 30px rgba(0,0,0,.12); }
.featured-bar { width:4px; flex-shrink:0; background:linear-gradient(180deg,var(--gold),var(--gold-h)); }
.featured-inner { flex:1; padding:16px 20px; display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.featured-meta { display:flex; align-items:center; gap:14px; flex:1; min-width:160px; }
.market-logo-md { width:52px; height:52px; border-radius:10px; flex-shrink:0; background:linear-gradient(135deg,var(--navy-2),var(--navy-3)); display:flex; align-items:center; justify-content:center; font-size:.65rem; font-weight:800; color:var(--gold); text-transform:uppercase; overflow:hidden; }
.market-logo-md img { width:100%; height:100%; object-fit:contain; }
.featured-meta-info { display:flex; flex-direction:column; gap:3px; }
.featured-latest-badge { font-size:.58rem; font-weight:800; letter-spacing:1px; text-transform:uppercase; color:var(--gold); }
.featured-market-name { font-size:1rem; font-weight:900; color:var(--text); }
.featured-meta-date { font-size:.7rem; color:var(--text-muted); }
.featured-prizes { display:flex; flex-direction:column; align-items:center; gap:6px; }
.featured-balls { display:flex; gap:7px; }
.featured-ball { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.95rem; font-weight:900; font-variant-numeric:tabular-nums; background:linear-gradient(135deg,#fbbf24,#f59e0b); color:#431a00; border:2px solid #d97706; box-shadow:0 3px 10px rgba(245,158,11,.4); }
.featured-right { display:flex; flex-direction:column; align-items:flex-end; gap:8px; flex-shrink:0; }

.next-draw-bar { background:linear-gradient(90deg,var(--navy-2),#1a2f52); border:1px solid rgba(245,158,11,.25); border-radius:14px; padding:16px 20px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:32px; }
.next-draw-label { font-size:.65rem; font-weight:800; letter-spacing:1px; text-transform:uppercase; color:var(--gold); margin-bottom:4px; }
.next-draw-name { font-size:1rem; font-weight:800; color:#fff; }
.next-draw-time { font-size:.78rem; color:#94a3b8; margin-top:2px; }
.countdown-boxes { display:flex; gap:8px; }
.cnt-box { background:rgba(0,0,0,.75); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); border:1px solid rgba(245,158,11,.2); border-radius:10px; width:54px; text-align:center; padding:8px 4px; }
.cnt-num { font-size:1.4rem; font-weight:900; color:var(--gold); line-height:1; font-variant-numeric:tabular-nums; }
.cnt-lbl { font-size:.58rem; color:#64748b; text-transform:uppercase; letter-spacing:.5px; margin-top:2px; }

.live-badge { display:inline-flex; align-items:center; gap:5px; background:var(--live-soft); border:1px solid rgba(34,197,94,.3); border-radius:20px; padding:3px 10px; font-size:.62rem; font-weight:800; color:var(--live); text-transform:uppercase; letter-spacing:.5px; }
.live-dot { width:6px; height:6px; border-radius:50%; background:var(--live); animation:pulse 1.5s infinite; }
.pending-badge { font-size:.62rem; color:var(--text-muted); background:var(--bg); padding:2px 8px; border-radius:20px; font-weight:700; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.4)} }

.cards-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; margin-bottom:32px; }
.result-card { background:var(--card-bg); border:1px solid var(--card-bd); border-radius:16px; overflow:hidden; transition:transform .2s,box-shadow .2s; }
.result-card:hover { transform:translateY(-3px); box-shadow:0 12px 32px rgba(0,0,0,.15); }
.result-card:hover .card-gold-bar { opacity:1; }
.card-gold-bar { height:3px; background:linear-gradient(90deg,var(--gold),var(--gold-h)); opacity:0; transition:opacity .2s; }
.card-top { padding:12px 14px 10px; border-bottom:1px solid var(--card-bd); display:flex; align-items:center; justify-content:space-between; }
.card-market-name { font-size:.8rem; font-weight:800; color:var(--text); text-transform:uppercase; letter-spacing:.3px; }
.card-timer { font-size:.68rem; color:var(--text-muted); font-variant-numeric:tabular-nums; margin-top:2px; }
.card-body-inner { padding:12px 14px 14px; text-align:center; }
.market-logo { width:60px; height:36px; background:linear-gradient(135deg,var(--navy-2),var(--navy-3)); border-radius:8px; display:flex; align-items:center; justify-content:center; margin:0 auto 8px; font-size:.6rem; font-weight:800; color:var(--gold); text-transform:uppercase; overflow:hidden; }
.market-logo img { width:100%; height:100%; object-fit:contain; }
.card-date { font-size:.68rem; color:var(--text-muted); margin-bottom:8px; }
.prize-label { font-size:.58rem; font-weight:800; letter-spacing:1px; text-transform:uppercase; color:var(--gold); margin-bottom:5px; }
.balls { display:flex; justify-content:center; gap:5px; margin-bottom:6px; }
.ball { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:900; font-variant-numeric:tabular-nums; border:2px solid var(--card-bd); }
.ball-gold { background:linear-gradient(135deg,#fbbf24,#f59e0b); color:#431a00; border-color:#d97706; box-shadow:0 2px 8px rgba(245,158,11,.35); }
.ball-plain { background:var(--bg); color:var(--text); }
.ball-sm { width:22px; height:22px; font-size:.68rem; }
.show-more-btn { font-size:.68rem; font-weight:700; color:var(--gold); background:var(--gold-soft); border:1px solid rgba(245,158,11,.25); border-radius:20px; padding:4px 12px; cursor:pointer; transition:background .15s; display:inline-block; margin-top:4px; font-family:'Nunito',sans-serif; }
.show-more-btn:hover { background:rgba(245,158,11,.2); }
.no-result { color:var(--text-muted); font-size:.75rem; padding:6px 0 4px; }
.balls-empty { display:flex; justify-content:center; gap:5px; }
.ball-empty { width:28px; height:28px; border-radius:50%; background:var(--bg); border:2px dashed var(--card-bd); display:flex; align-items:center; justify-content:center; color:var(--text-muted); font-size:.75rem; }

footer { background:var(--navy); color:#64748b; padding:28px 24px; border-top:1px solid rgba(255,255,255,.05); }
.site-footer { background:var(--navy); color:#64748b; padding:28px 24px; border-top:1px solid rgba(255,255,255,.05); }
.footer-inner { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; }
.footer-logo { height:36px; width:auto; object-fit:contain; }
.footer-brand-name { font-size:1rem; font-weight:900; color:#fff; }
.footer-desc { font-size:.75rem; color:#64748b; margin-top:4px; }
.footer-copy { font-size:.72rem; }

.pagination-wrap { padding:14px 18px 6px; display:flex; gap:6px; flex-wrap:wrap; justify-content:center; align-items:center; }
.pg-btn { width:34px; height:34px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:700; text-decoration:none; border:1px solid var(--card-bd); background:var(--bg); color:var(--text-muted); transition:background .15s,color .15s,border-color .15s; cursor:pointer; }
.pg-btn:hover { background:rgba(245,158,11,.1); border-color:rgba(245,158,11,.3); color:var(--gold); }
.pg-active { background:var(--gold) !important; color:#431a00 !important; border-color:var(--gold) !important; box-shadow:0 2px 8px rgba(245,158,11,.35); }
.pg-disabled { opacity:.35; pointer-events:none; }
.pg-dots { font-size:.75rem; color:var(--text-muted); padding:0 2px; display:flex; align-items:center; }

.page-body { padding:24px 0 8px; }
.page-content { background:var(--card-bg); border:1px solid var(--card-bd); border-radius:16px; padding:24px; margin-bottom:24px; }
.page-content h1,.page-content h2,.page-content h3 { color:var(--text); margin-bottom:12px; }
.page-content p { color:var(--text-muted); font-size:.88rem; line-height:1.7; margin-bottom:10px; }

.mini-result-bar { position:fixed; top:var(--nav-h); left:0; right:0; z-index:90; background:rgba(7,13,26,.97); backdrop-filter:blur(8px); border-bottom:1px solid rgba(245,158,11,.2); padding:6px 16px; display:flex; align-items:center; gap:14px; overflow-x:auto; transform:translateY(-100%); opacity:0; transition:transform .3s,opacity .3s; scrollbar-width:none; }
.mini-result-bar::-webkit-scrollbar { display:none; }
.mini-result-bar.visible { transform:translateY(0); opacity:1; }
.mini-bar-label { font-size:.58rem; font-weight:800; letter-spacing:1px; text-transform:uppercase; color:var(--gold); flex-shrink:0; white-space:nowrap; }
.mini-item { display:flex; align-items:center; gap:7px; white-space:nowrap; font-size:.7rem; }
.mini-item-name { color:#94a3b8; font-weight:700; }
.mini-balls { display:flex; gap:3px; }
.mini-ball { width:19px; height:19px; border-radius:50%; background:linear-gradient(135deg,#fbbf24,#f59e0b); color:#431a00; font-size:.58rem; font-weight:900; display:flex; align-items:center; justify-content:center; }
.mini-sep { color:#334155; }

@media (max-width:768px) {
    :root { --nav-h:56px; }
    .container { width:90%; padding:0; margin:0 auto; }
    .page-body { padding:20px 0 16px; }
    .nav-mobile-btn { display:flex; }
    .navbar-bottom { height:0; overflow:hidden; opacity:0; pointer-events:none; flex-direction:column; justify-content:flex-start; align-items:stretch; }
    .navbar-bottom.is-open { height:auto; opacity:1; pointer-events:auto; padding:6px 0 10px; }
    .nav-links { flex-direction:column; width:100%; gap:0; }
    .nav-links a { padding:10px 20px; width:100%; justify-content:flex-start; border-radius:0; border-bottom:1px solid rgba(255,255,255,.05); }
    .nav-links li:last-child a { border-bottom:none; }
    .navbar-top { height:56px; padding:9px 14px; }
    .nav-logo { height:32px; }
    .banner-section { padding:18px 0 4px; }
    .swiper-slide { width:85%; height:150px; }
    .slide-title { font-size:1.05rem; }
    .section-title { font-size:.62rem; margin-bottom:12px; }
    .featured-result { border-radius:12px; margin-bottom:18px; }
    .featured-inner { padding:14px 16px; gap:12px; }
    .featured-meta { gap:10px; min-width:auto; }
    .featured-market-name { font-size:.88rem; }
    .featured-meta-date { font-size:.65rem; }
    .featured-right { display:none; }
    .featured-ball { width:28px; height:28px; font-size:.78rem; }
    .featured-prizes { gap:4px; }
    .next-draw-bar { flex-direction:column; align-items:flex-start; padding:14px 16px; gap:12px; border-radius:12px; margin-bottom:24px; }
    .next-draw-name { font-size:.9rem; }
    .countdown-boxes { gap:6px; }
    .cnt-box { width:48px; padding:6px 3px; border-radius:8px; }
    .cnt-num { font-size:1.2rem; }
    .cards-grid { grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:24px; }
    .result-card { border-radius:12px; }
    .card-top { padding:10px 12px 8px; }
    .card-market-name { font-size:.72rem; }
    .card-timer { font-size:.6rem; }
    .card-body-inner { padding:10px 12px 12px; }
    .card-date { font-size:.62rem; }
    .ball { width:26px; height:26px; font-size:.75rem; }
    .ball-sm { width:20px; height:20px; font-size:.62rem; }
    .ball-empty { width:26px; height:26px; }
    .show-more-btn { font-size:.62rem; padding:3px 10px; }
    .ad-banner-section { padding:4px 0 0; }
    .ad-banner-wrap { padding:0 16px; }
    .ad-banner-ph { height:72px; }
    .ad-banner-img { border-radius:8px; }
    .table-card { border-radius:12px; margin-bottom:24px; }
    .table-card-header { padding:12px 14px; }
    table { font-size:.68rem; }
    thead th { padding:7px 8px; font-size:.56rem; }
    tbody td { padding:8px; }
    footer { padding:20px 16px; }
    .footer-inner { flex-direction:column; text-align:center; }
}
@media (max-width:400px) {
    .cards-grid { grid-template-columns:1fr; }
    .cnt-num { font-size:1.1rem; }
    .cnt-box { width:44px; }
    .featured-ball { width:26px; height:26px; font-size:.72rem; }
    .ball { width:24px; height:24px; font-size:.7rem; }
}
