/* ketqua365 - trang chu + trang KQ (classic 2025: vuong goc, navy #0f4c81, khong bong/gradient). */

/* ---------- Trang chu: dau trang + do so ---------- */
.hm-hero{padding:8px 10px}
.hm-hero-top{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:8px}
.hm-day{font-size:12px;font-weight:bold;color:#0f4c81;text-transform:uppercase}
.hm-h1{margin:2px 0 0;font-size:22px;color:#c00}
.hm-datenav{display:flex;align-items:center;gap:3px}
.hm-dbtn{display:inline-block;width:32px;height:32px;line-height:30px;text-align:center;border:1px solid #ccc;background:#fff;font-size:18px;color:#0f4c81}
.hm-dbtn:hover{background:#eef3f8;text-decoration:none}
.hm-date{height:32px;padding:3px 6px;border:1px solid #ccc;background:#fff}
.hm-today{height:32px;line-height:18px}
.hm-lookup{margin-top:8px}
.hm-lookup label{font-weight:bold;font-size:13px}
.hm-lookup-in{position:relative;margin-top:3px}
.hm-lookup-in input{width:100%;height:40px;padding:6px 36px 6px 10px;border:1px solid #ccc;font-size:18px;font-weight:bold;letter-spacing:2px}
.hm-lookup-in input::placeholder{font-size:13px;font-weight:normal;letter-spacing:0}
.hm-lookup-in input:focus{outline:0;border-color:#0f4c81}
#kq-lookup-clear{position:absolute;right:4px;top:5px;width:30px;height:30px;border:0;background:transparent;font-size:20px;color:#777;cursor:pointer}
.hm-lk{margin-top:6px;padding:6px 8px;font-size:13px;border:1px solid #ddd;background:#fafafa}
.hm-lk-ok{border-color:#ebbb2e;background:#fffbe6}
.hm-lk-h{font-weight:bold;margin-bottom:4px}
.hm-lk-list{display:flex;flex-wrap:wrap;gap:4px}
.hm-lk-list button{border:1px solid #ebbb2e;background:#fff;padding:2px 6px;font-size:12px;cursor:pointer}
.hm-lk-list button:hover{border-color:#0f4c81}
.hm-demo{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px 8px;background:#fff8dc;border:1px solid #ebbb2e;font-size:13px}
.hm-demo span{flex:1;min-width:180px}
.hm-demo.hidden{display:none !important}

/* ---------- Tab mien ---------- */
.hm-tabbar{position:sticky;top:0;z-index:30;background:#f3f3f3;padding:4px 0}
.hm-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:0;border:1px solid #0f4c81;background:#fff}
.kq-tab{position:relative;border:0;border-left:1px solid #0f4c81;background:#fff;color:#0f4c81;padding:5px 2px;cursor:pointer;text-align:center;line-height:1.2}
.kq-tab:first-child{border-left:0}
.kq-tab:hover{background:#eef3f8}
.kq-tab.on{background:#0f4c81;color:#fff}
.hm-tab-name{display:block;font-weight:bold;font-size:14px;white-space:nowrap}
.kq-tab-sub{display:block;font-size:11px;opacity:.85}
.kq-tab-hits{position:absolute;top:-6px;right:-1px;min-width:18px;height:18px;padding:0 4px;background:#ffd24d;color:#111;font-size:11px;font-weight:bold;line-height:18px}
.hm-dot{display:inline-block;width:7px;height:7px;background:#e00;margin-right:3px;vertical-align:1px;animation:hm-blink 1s steps(2) infinite}
@keyframes hm-blink{50%{opacity:.2}}
.hm-ctrl{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 10px;margin-top:4px;font-size:13px}
.hm-opts{display:flex;align-items:center;gap:3px}
.hm-opts.hidden{display:none !important}
.hm-digits{margin-left:auto}
.hm-opts-lbl{color:#666;margin-right:3px}
.hm-digits label{cursor:pointer;margin:0 4px;white-space:nowrap}
.hm-digits input{vertical-align:-2px;margin:0 3px 0 0}
.kq-sound-opt,.kq-stats-btn,.south-tab{border:1px solid #ccc;background:#fff;color:#333;padding:3px 9px;cursor:pointer;font-size:13px}
.kq-sound-opt.on,.kq-stats-btn.on,.south-tab.on{background:#0f4c81;border-color:#0f4c81;color:#fff}
.kq-sound-opt.off{color:#bbb;cursor:not-allowed}

/* ---------- Panel ---------- */
.kq-panel>*+*,.hm-slot>*+*{margin-top:8px}
.hm-empty{padding:24px 10px;text-align:center;color:#777}
.hm-loto{margin-top:8px}
.hm-loto>*+*{margin-top:8px}
.hm-stats-btns{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin-bottom:6px}
.hm-waiting .box-body{padding:16px 10px}
.hm-balls{display:flex;justify-content:center;gap:6px;margin-bottom:10px}
.hm-ball{width:36px;height:36px;line-height:34px;border:1px solid #ccc;background:#f5f5f5;font-weight:bold;font-size:17px;color:#999;animation:hm-blink 1.2s steps(2) infinite}
.hm-vl{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.hm-vl-balls{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;list-style:none;margin:6px 0;padding:0}
.hm-vball{display:inline-block;width:38px;height:38px;line-height:38px;border-radius:50%;background:#0f4c81;color:#fff;text-align:center;font-weight:bold;font-size:17px}
.hm-vball-sp{background:#f2af03;color:#222}
.hm-jp{text-align:center;margin-top:8px}
.hm-jp-lbl{font-size:12px;color:#777;text-transform:uppercase}
.hm-jp-val{font-size:24px;font-weight:bold;color:#c00}
.hm-jp-val small{font-size:13px;color:#777}
.hm-jp-win{font-size:12px;color:#777}
.hm-tools-grid{display:grid;grid-template-columns:repeat(6,1fr);background:#fff;border:1px solid #ccc;border-top:0}
.hm-tools-grid a{display:block;text-align:center;padding:9px 2px;font-weight:bold;font-size:13px;border-left:1px solid #e5e5e5}
.hm-tools-grid a:first-child{border-left:0}
.hm-tools-grid a:hover{background:#eef3f8;text-decoration:none}

/* ---------- Trang KQ (mien / tinh / 3 mien / Vietlott) ---------- */
.rs-notice{padding:6px 8px;font-size:13px}
.rs-badge{display:inline-block;background:#0f4c81;color:#fff;font-weight:bold;font-size:12px;padding:1px 6px;margin-right:4px}
.rs-empty{padding:24px 10px;text-align:center;color:#777}
.rs-cell{padding:2px}
.rs-grid{display:grid;gap:2px;text-align:center}
.rs-c1{grid-template-columns:1fr}.rs-c2{grid-template-columns:repeat(2,1fr)}.rs-c3{grid-template-columns:repeat(3,1fr)}.rs-c4{grid-template-columns:repeat(4,1fr)}
.rs-blank{color:#ccc;font-weight:bold}
.rs-display a{margin:0 6px;white-space:nowrap}
.rs-display a.on{font-weight:bold;color:#c00}
.rs-scroll{overflow-x:auto}
.rs-south td{white-space:nowrap}
.kq-multi.rs-south .lbl{width:76px;font-size:13px;background:#fff;white-space:normal}
.rs-loto-all{display:grid;grid-template-columns:repeat(9,1fr);text-align:center}
.rs-loto-all span{display:block;padding:4px 1px;border-right:1px solid #ccc;border-bottom:1px solid #ccc;font-weight:bold;font-size:16px}
.rs-loto-all span:nth-child(9n){border-right:0}
.rs-help{margin-bottom:0;font-size:13px}
.rs-tabs{padding:0}
.rs-tabbar{display:flex;flex-wrap:wrap;gap:3px;padding:6px;border-bottom:1px solid #ccc;background:#fafafa}
.south-panel{padding:8px}
.south-panel>*+*{margin-top:8px}
.rs-loto-title{text-align:center;font-weight:bold;color:#0f4c81}
.rs-region-h{padding:6px 10px;text-align:center}
.rs-region-h h2{margin:0;color:#c00;font-size:18px}
.rs-other-nums{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;padding:10px}
.rs-other-nums .kq-n{color:#c00}
.rs-vl-h1{text-align:center;color:#c00;font-size:22px;margin:4px 0}
.rs-small{font-size:12px}
.rs-vl-jp{text-align:center;font-size:24px;font-weight:bold;color:#c00;margin:8px 0}
.rs-vl-h2{font-size:16px;margin:10px 0 6px}
.rs-vl-tbl td,.rs-vl-tbl th{text-align:center}
.rs-vl-stats h3{font-size:15px;margin:10px 0 5px;color:#0f4c81}
.rs-vl-stats h3:first-child{margin-top:0}
.rs-vl-recent{padding:2px 0}
.rs-vl-recent b{display:inline-block;min-width:24px;text-align:center}
.rs-vl-cnt{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px}
.rs-vl-cnt li{border:1px solid #ddd;background:#f6f9fc;padding:2px 7px;font-size:13px}
.rs-vl-cnt b{color:#0f4c81}

@media (max-width:767px){
  .hm-h1{font-size:19px}
  .hm-hero-top{align-items:flex-start}
  .hm-vl{grid-template-columns:1fr}
  .hm-tools-grid{grid-template-columns:repeat(3,1fr)}
  .hm-tools-grid a:nth-child(4){border-left:0}
  .hm-tools-grid a:nth-child(n+4){border-top:1px solid #e5e5e5}
  .hm-tab-name{font-size:13px}
  .hm-digits{margin-left:0}
}
