/* XSMTHN – bố cục chuẩn site xổ số: menu đỏ, cột chính + sidebar phải */
:root {
	--red: #c8102e;
	--red-dark: #a10c24;
	--red-text: #d0021b;
	--cream: #fff6dc;
	--cream-2: #fdf0c4;
	--line: #d9d9d9;
	--zebra: #f5f5f5;
	--ink: #222;
	--muted: #777;
	--link: #0b4ea2;
	--gold: #f5b400;
	--w: 1090px;
	--side: 336px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 14px/1.5 Arial, Helvetica, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--w); margin: 0 auto; padding: 0 10px; }
.muted { color: var(--muted); }
.red { color: var(--red-text); }

/* ---------- Header ---------- */
.top { border-bottom: 1px solid #eee; }
.top .container { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { display: flex; align-items: center; }
.logo img { display: block; height: 40px; width: auto; }
.top-date { font-size: 13px; color: var(--muted); text-align: right; }
.top-date b { color: var(--ink); }

.nav { background: var(--red); }
.nav ul { list-style: none; margin: 0 auto; padding: 0 10px; max-width: var(--w); display: flex; overflow-x: auto; scrollbar-width: none; }
.nav ul::-webkit-scrollbar { display: none; }
.nav a { display: block; color: #fff; font-weight: 700; font-size: 13.5px; text-transform: uppercase; padding: 11px 11px; white-space: nowrap; }
.nav a:hover { background: var(--red-dark); text-decoration: none; }
.nav a.on { background: var(--gold); color: #3a2a00; }
.nav .home { font-size: 16px; padding: 9px 12px; }

.subnav { background: #fff; border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; margin: 0 auto; padding: 0 10px; max-width: var(--w); display: flex; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: block; padding: 8px 10px; color: var(--red-text); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.subnav a.on { color: var(--ink); border-bottom: 2px solid var(--red); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 10px; padding-top: 10px; padding-bottom: 20px; align-items: start; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.crumbs a { color: var(--muted); }
.live { background: var(--cream); border: 1px solid #f1e3b3; padding: 7px 10px; font-style: italic; font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.live .dot { width: 12px; height: 12px; border-radius: 50%; background: #e11; flex: none; animation: blink 1.2s infinite; }
.live b { color: var(--red-text); }
@keyframes blink { 50% { opacity: .35; } }
h1.page-title { font-size: 17px; color: var(--red-text); text-align: center; margin: 4px 0 8px; font-weight: 700; }

.tabs { display: flex; border: 1px solid var(--line); border-bottom: 0; background: #f2f2f2; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: 1 0 auto; text-align: center; padding: 8px 10px; color: var(--ink); border-right: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.tabs a:last-child { border-right: 0; }
.tabs a.on { background: var(--red); color: #fff; font-weight: 700; }
.tabs a:hover { text-decoration: none; background: #e9e9e9; }
.tabs a.on:hover { background: var(--red); }

/* ---------- Result box ---------- */
.box { border: 1px solid var(--red); margin-bottom: 14px; background: #fff; }
.box-title { background: var(--red); color: #fff; text-align: center; font-size: 17px; font-weight: 700; margin: 0; padding: 8px 10px; }
.box-title a { color: #fff; }
.box-path { background: var(--cream); text-align: center; padding: 7px 10px; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--line); }
.box-path a { color: var(--red-text); }
.box-path span { color: var(--ink); margin: 0 4px; }

.kq { width: 100%; border-collapse: collapse; table-layout: fixed; }
.kq th, .kq td { border: 1px solid var(--line); text-align: center; padding: 3px 2px; }
.kq tr > :first-child { border-left: 0; }
.kq tr > :last-child { border-right: 0; }
.kq thead th { background: #f7f7f7; padding: 6px 2px; font-size: 14px; }
.kq thead th a { color: var(--link); font-weight: 700; }
.kq thead th:first-child { width: 70px; }
.kq tbody th { width: 70px; font-weight: 400; font-size: 15px; color: #333; }
.kq tbody tr:nth-child(even) > * { background: var(--zebra); }
.kq .n { display: block; font: 700 26px/1.25 Arial, sans-serif; color: #333; letter-spacing: .5px; }
.kq .r-g8 .n, .kq .r-db .n { color: var(--red-text); font-size: 32px; }
.kq .n.spin { color: #aaa; }
.kq .n .hl { background: var(--gold); color: #000; border-radius: 3px; padding: 0 1px; }

.kq-ctrl { display: flex; align-items: center; justify-content: space-between; padding: 5px 6px; border-top: 1px solid var(--line); font-size: 14px; }
.kq-ctrl label { margin-right: 10px; cursor: pointer; font-weight: 700; }
.kq-ctrl input { accent-color: var(--red); vertical-align: -2px; }
.digits { display: grid; grid-template-columns: repeat(10, 1fr); border-top: 1px solid var(--line); }
.digits button { border: 0; border-right: 1px solid var(--line); background: #f7f7f7; padding: 5px 0; font: 700 13px Arial; cursor: pointer; color: #333; }
.digits button:last-child { border-right: 0; }
.digits button.on { background: var(--gold); }

.loto { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 14px; font-size: 14px; }
.loto th, .loto td { border: 1px solid var(--line); text-align: center; padding: 4px 2px; }
.loto thead th { background: var(--cream-2); color: var(--link); }
.loto thead th:first-child { color: var(--ink); width: 70px; }
.loto tbody th { color: var(--red-text); font-weight: 700; }
.loto tbody tr:nth-child(even) > * { background: #fafafa; }
.loto td { font-weight: 700; color: #333; letter-spacing: .3px; }

/* ---------- Hộp nội dung chung ---------- */
.panel { border: 1px solid var(--line); margin-bottom: 14px; background: #fff; }
.panel-title { background: var(--red); color: #fff; font-weight: 700; font-size: 15px; padding: 8px 10px; margin: 0; text-align: center; }
.panel-sub { background: var(--cream); padding: 6px 10px; font-weight: 700; border-bottom: 1px solid var(--line); margin: 0; font-size: 14px; }
.panel-body { padding: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
.tbl thead th { background: #f2f2f2; }
.tbl tbody tr:nth-child(even) td { background: #fafafa; }
.tbl .big { font-weight: 700; font-size: 18px; color: var(--red-text); }
.tbl td.l, .tbl th.l { text-align: left; }
.scroll-x { overflow-x: auto; }

.numgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.numgrid div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; padding: 6px 2px; }
.numgrid b { display: block; font-size: 19px; color: var(--red-text); }
.numgrid small { color: var(--muted); font-size: 12px; }

.grid100 { display: grid; grid-template-columns: repeat(10, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.grid100 div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; padding: 4px 0; font-size: 13px; }
.grid100 b { display: block; font-size: 15px; }
.grid100 .g-hot { background: #ffe1e1; }
.grid100 .g-hot b { color: var(--red-text); }

.bar { display: inline-block; height: 9px; background: var(--red); vertical-align: middle; border-radius: 2px; }

.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-row label { font-weight: 700; }
select, input[type=text], input[type=date] { font: 14px Arial; padding: 6px 8px; border: 1px solid #bbb; border-radius: 3px; background: #fff; }
.btn { background: var(--red); color: #fff; border: 0; font: 700 14px Arial; padding: 8px 16px; border-radius: 3px; cursor: pointer; }
.btn:hover { background: var(--red-dark); }
.btn:disabled { opacity: .6; }
.btn.gray { background: #666; }

/* ---------- Bài viết SEO / dự đoán ---------- */
.content { border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 14px; font-size: 15px; line-height: 1.65; }
.content h2 { font-size: 18px; color: var(--red-text); margin: 18px 0 8px; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 16px; margin: 14px 0 6px; }
.content p { margin: 0 0 10px; }
.content ul, .content ol { margin: 0 0 10px; padding-left: 22px; }
.content table { margin: 6px 0 12px; }
.post-meta { font-size: 13px; color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 10px; }
.post-meta b { color: var(--ink); }
.post-title { font-size: 22px; line-height: 1.35; margin: 0 0 6px; color: var(--ink); }
.picks { list-style: none; padding: 0 !important; }
.picks li { padding: 5px 0; border-bottom: 1px dotted var(--line); }
.picks li::before { content: "⭐ "; }
.picks b { color: var(--red-text); font-size: 16px; }
.warn { background: #fff4f4; border: 1px solid #f3c2c2; padding: 8px 10px; font-size: 14px; margin: 10px 0; }

.faq h3 { margin: 12px 0 4px; font-size: 15px; }
.faq p { margin: 0 0 8px; }

/* ---------- Sidebar ---------- */
.sb-box { border: 1px solid #e3e3e3; border-radius: 4px; margin-bottom: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.sb-title { background: var(--red); color: #fff; font-weight: 700; text-transform: uppercase; font-size: 14px; padding: 9px 10px; display: flex; align-items: center; gap: 8px; margin: 0; }
.sb-title::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #ffe27a, var(--gold) 60%, #c98f00); box-shadow: 0 0 0 2px rgba(255,255,255,.35); flex: none; }
.sb-list { list-style: none; margin: 0; padding: 8px 10px 8px 28px; columns: 2; column-gap: 10px; }
.sb-list.one { columns: 1; }
.sb-list li { position: relative; padding: 3px 0; break-inside: avoid; }
.sb-list li::before { content: "•"; color: var(--red); position: absolute; left: -12px; }
.sb-list a { color: #333; }
.sb-list a:hover { color: var(--red-text); }
.sb-list .today { color: var(--red-text); font-weight: 700; }
.sb-list .today::after { content: " ●"; font-size: 10px; color: #e11; animation: blink 1.2s infinite; }
.sb-body { padding: 10px; }
.sb-body .form-row { margin-bottom: 8px; }
.sb-body label { display: block; font-size: 13px; margin-bottom: 3px; font-weight: 700; }
.sb-body select, .sb-body input { width: 100%; }
.dv-result { margin-top: 8px; padding: 8px; background: var(--cream); font-size: 13.5px; display: none; }
.dv-result.show { display: block; }

/* ---------- Footer ---------- */
footer { background: #2b2b2b; color: #bbb; font-size: 13px; margin-top: 10px; }
footer .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 18px 10px; }
footer b { color: #fff; display: block; margin-bottom: 6px; text-transform: uppercase; font-size: 13px; }
footer a { color: #ccc; display: block; padding: 2px 0; }
footer .legal { border-top: 1px solid #444; padding: 12px 10px 16px; line-height: 1.6; }
footer .age { display: inline-block; background: var(--red); color: #fff; font-weight: 700; padding: 0 5px; border-radius: 3px; margin-right: 6px; }
footer a.age { color: #fff; text-decoration: none; }
footer .legal-end { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
footer .social { display: flex; gap: 8px; }
footer .social a { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; color: #fff; transition: opacity .15s; }
footer .social a:hover { opacity: .85; text-decoration: none; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.layout > * { min-width: 0; }
	.top-date { display: none; }
}
@media (max-width: 600px) {
	.container { padding: 0 6px; }
	.kq tbody th, .kq thead th:first-child, .loto thead th:first-child { width: 36px; font-size: 13px; }
	.kq .n { font-size: 20px; }
	.kq .r-g8 .n, .kq .r-db .n { font-size: 24px; }
	.box-title { font-size: 15px; }
	.box-path { font-size: 13.5px; }
	h1.page-title { font-size: 15px; }
	.logo img { height: 32px; }
	footer .cols { grid-template-columns: 1fr 1fr; }
	.grid100 div { font-size: 11px; }
	.grid100 b { font-size: 13px; }
}

/* ---------- Bổ sung cho theme WordPress ---------- */
.prev-days { margin: -4px 0 14px; font-size: 14px; line-height: 1.8; }
.ai-picks { background: #fffbea; border: 1px solid #f0dfa0; padding: 8px 12px; margin: 10px 0 16px; }
.ai-picks p { margin: 0 0 4px; }
.ai-picks .picks { margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin: -4px 0 14px; font-weight: 700; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 0; }
.post-list .muted { white-space: nowrap; font-size: 13px; }
.pagination { margin: 0 0 14px; }
.pagination .nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 5px 10px; border: 1px solid var(--line); color: var(--ink); }
.pagination .current { background: var(--red); color: #fff; border-color: var(--red); }
.screen-reader-text { position: absolute; left: -9999px; }
footer ul, footer li { list-style: none; margin: 0; padding: 0; }
.nav .menu { display: contents; }
.content img { max-width: 100%; height: auto; }
.content code, .warn code { background: #f2f2f2; padding: 1px 4px; border-radius: 3px; font-size: 13px; }
.sidebar { min-width: 0; }

/* ---------- API: trực tiếp, điểm nhấn, kiểm chứng, tính tiền ---------- */
.ok { color: #1c8a3a; font-weight: 700; }
.miss { color: #999; }
.small { font-size: 13px; }
.big { font-size: 18px; }
.insights ul { margin: 0 0 8px; padding-left: 20px; }
.insights li { margin: 3px 0; line-height: 1.55; }
.insights h3 { margin: 10px 0 4px; font-size: 15px; }
.insights h3 a { color: var(--red-text); }
.ins-day { background: var(--cream); padding: 8px 10px 8px 26px !important; border-radius: 3px; }
.note-box { background: #effaf1; border: 1px solid #bfe3c7; padding: 8px 10px; margin: 8px 0; font-size: 14px; }
.toc-inline { font-size: 14px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }
.calc-form { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 8px; align-items: end; }
.calc-form label { font-weight: 700; font-size: 13px; }
.calc-form select, .calc-form input { width: 100%; margin-top: 3px; }
.calc-out { margin-top: 10px; }
.live-box .box-title::before { content: "● "; color: #ffd84a; animation: blink 1.2s infinite; }
@media (max-width: 600px) { .calc-form { grid-template-columns: 1fr 1fr; } .calc-form .btn { grid-column: 1 / -1; } }

/* ---------- Phong độ soi cầu ---------- */
.up { color: #1c8a3a; font-weight: 700; font-size: 12px; }
.down { color: var(--red-text); font-weight: 700; font-size: 12px; }
.form-tbl td { vertical-align: middle; }
.form-tbl td.l small { font-size: 11.5px; }
.form-tbl tr.ctl td { background: #f3f6ff !important; font-style: italic; }
.story { margin: 0; padding-left: 20px; }
.story li { margin: 4px 0; line-height: 1.55; }
