/* UI 6 Override: giữ nguyên bản ketquaxoso3.com ở cv-1; biến thể màu & mobile clean cho cv-2..cv-7 */

body.ui-6 #header .logo {
  display: inline-flex; align-items: center; padding: 0 12px; width: auto; min-width: 175px;
  font-size: 19px; font-weight: 900; color: #ffcc00 !important; text-decoration: none;
}
body.ui-6 .footer-bot { box-sizing: border-box !important; width: 100% !important; max-width: 100% !important; height: auto !important; min-height: 50px; padding: 12px 10px !important; line-height: 1.6; }
body.ui-6 .fcopyright { box-sizing: border-box !important; max-width: 100% !important; }
body.ui-6 #cssmenu ul li.has-sub > ul { z-index: 999; }
body.ui-6 #fnMB0 td[data-filter-digit] { cursor: pointer; }
body.ui-6 #fnMB0 td.is-active { background: #cb0506 !important; color: #fff !important; font-weight: 900; }

/* Cho trang con dùng bảng tiêu chuẩn (.box / .title-bor / .colgiai / .mega645) đồng bộ UI 6 */
body.ui-6 .box { border: 1.5px solid #636363; border-radius: 6px; background: #fff; margin-bottom: 10px; overflow: hidden; }
body.ui-6 .title-bor {
  background: linear-gradient(90deg, #cb0506 0%, #9b0405 68%, #111111 100%);
  color: #ffffff !important; padding: 7px 10px; font-size: 14px; font-weight: 800; margin: 0;
}
body.ui-6 .title-bor a { color: #ffffff !important; }
body.ui-6 .colgiai { width: 100%; border-collapse: collapse; font-size: 13.5px; }
body.ui-6 .colgiai th, body.ui-6 .colgiai td { border: 1px solid #d4d4d4; padding: 5px 6px; text-align: center; }
body.ui-6 .mega645 .data { margin: 8px auto; }
body.ui-6 .mega645 .data td i {
  display: inline-block; width: 32px; height: 32px; line-height: 32px; border-radius: 50%;
  background: #cb0506; color: #fff; font-style: normal; font-weight: 800; text-align: center;
}
body.ui-6 .mega645 .data2 { width: 100%; border-collapse: collapse; font-size: 13px; }
body.ui-6 .mega645 .data2 td { border: 1px solid #d4d4d4; padding: 5px 6px; text-align: center; }
body.ui-6 .mega645 ul.results { list-style: none; margin: 0; padding: 6px 10px; }
body.ui-6 .info-xskt h2 {
  background: linear-gradient(90deg, #cb0506 0%, #9b0405 70%, #111111 100%);
  color: #ffffff !important; padding: 7px 10px; margin: 0 0 10px; font-size: 14px; font-weight: 700;
}
body.ui-6:not(.cv-1) .info-xskt h2 {
  background: linear-gradient(90deg, var(--ui-primary) 0%, var(--ui-primary-dark) 75%, #111111 100%) !important;
}
@media screen and (min-width: 1004px) {
  body.ui-6 .ui6-mob-btn,
  body.ui-6 .ui6-home-txt { display: none; }
}

/* Responsive sạch dưới 1003px (tránh lỗi thanh cuộn ngang / menu chồng) */
@media screen and (max-width: 1003px) {
  body.ui-6 { overflow-x: hidden; }
  body.ui-6 #header,
  body.ui-6 div.cssmenu,
  body.ui-6 #content,
  body.ui-6 .box-ketqua,
  body.ui-6 .box-ketqua *,
  body.ui-6 .info-xskt { box-sizing: border-box !important; }
  body.ui-6 #header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 6px 10px !important; gap: 6px; width: 100% !important; height: auto !important; }
  body.ui-6 #header .logo { min-width: 0; padding: 0 4px; font-size: 18px !important; line-height: 30px !important; height: 30px !important; }
  body.ui-6 #header .ui6-mob-btn {
    background: rgba(255, 255, 255, 0.16); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px; padding: 4px 10px !important; font-size: 17px !important; line-height: 1.2; cursor: pointer;
  }
  body.ui-6 #header .left {
    display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important;
    scrollbar-width: none; -ms-overflow-style: none; align-items: center !important;
    gap: 6px !important; padding: 2px 0 4px !important; width: 100% !important;
  }
  body.ui-6 #header .left::-webkit-scrollbar { display: none; }
  body.ui-6 #header .left a {
    display: inline-flex !important; align-items: center; height: 26px !important; line-height: 26px !important;
    padding: 0 9px !important; border-radius: 4px !important; font-size: 12px !important; font-weight: 700 !important;
    white-space: nowrap !important; flex: none !important; margin: 0 !important;
  }
  body.ui-6 div.cssmenu { height: auto !important; min-height: 0 !important; width: 100% !important; background: transparent !important; border: none !important; }
  body.ui-6 #cssmenu { float: none !important; width: 100%; }
  body.ui-6 #cssmenu > ul.left { display: none; float: none !important; width: 100%; margin: 0; padding: 0; }
  body.ui-6 #cssmenu > ul.left[style*="block"] {
    display: flex !important; flex-direction: column; background: #ffffff !important;
    border-top: 2px solid var(--ui-primary, #cb0506); border-bottom: 2px solid var(--ui-primary, #cb0506);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  }
  body.ui-6 #cssmenu > ul.left > li {
    float: none !important; width: 100% !important; background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important; height: auto !important;
  }
  body.ui-6 #cssmenu > ul.left > li > a,
  body.ui-6 #cssmenu > ul.left > li > a.home,
  body.ui-6:not(.cv-1) #cssmenu > ul.left > li > a {
    display: block !important; width: 100% !important; height: auto !important; line-height: 1.35 !important;
    padding: 11px 16px !important; text-align: left !important; background: #ffffff !important; background-image: none !important;
    color: #1e293b !important; font-size: 14px !important; font-weight: 700 !important; box-sizing: border-box !important;
  }
  body.ui-6 #cssmenu > ul.left > li.active > a,
  body.ui-6:not(.cv-1) #cssmenu > ul.left > li.active > a {
    background: #fff7ed !important; color: var(--ui-primary, #cb0506) !important;
    border-left: 3px solid var(--ui-primary, #cb0506);
  }
  body.ui-6 div.cssmenu .right { display: none !important; }
  body.ui-6 #content { display: flex !important; flex-direction: column; width: 100% !important; max-width: 100% !important; padding: 6px !important; }
  body.ui-6 #center-content { order: 1; width: 100% !important; max-width: 100%; float: none !important; padding: 0 !important; }
  body.ui-6 #right-content { order: 2; width: 100% !important; max-width: 100%; float: none !important; margin-top: 10px; display: block !important; padding-left: 0 !important; }
  body.ui-6 #left-content { order: 3; width: 100% !important; max-width: 100%; float: none !important; margin-top: 10px; display: block !important; }
  body.ui-6 .box-ketqua h2 { height: auto !important; line-height: 1.35 !important; padding: 6px 74px 6px 8px !important; }
  body.ui-6 .box-table { max-width: 100%; overflow-x: auto; }
  body.ui-6 table.result { width: 100% !important; table-layout: fixed; font-size: 13px !important; }
  body.ui-6 table.result th,
  body.ui-6 table.result td { padding: 4px 3px !important; }
  body.ui-6 table.result td:nth-child(1) { width: 32px !important; }
  body.ui-6 table.result td:nth-child(2) { width: auto !important; }
  body.ui-6 table.result td:nth-child(3) { width: 26px !important; }
  body.ui-6 table.result td:nth-child(4) { width: 76px !important; font-size: 12px !important; word-break: break-word; }
  body.ui-6 table.result p,
  body.ui-6 table.result em,
  body.ui-6 .megaresult em { width: auto !important; max-width: 100% !important; height: auto !important; }
  body.ui-6 table.result p { font-size: 15px !important; line-height: 1.35 !important; }
  body.ui-6 table.result em { font-size: 20px !important; }
  body.ui-6 .megaresult em { font-size: 18px !important; word-spacing: 6px !important; }
  body.ui-6 table.tbl-xsmn { width: 100% !important; table-layout: fixed; font-size: 12px !important; }
  body.ui-6 table.tbl-xsmn th,
  body.ui-6 table.tbl-xsmn td { padding: 3px 2px !important; font-size: 12px !important; word-break: break-word; }
  body.ui-6 table.tbl-xsmn td:first-child { width: 34px !important; font-size: 12px !important; }
  body.ui-6 table.tbl-xsmn b { font-size: 15px !important; }
  body.ui-6 table.trunggiai,
  body.ui-6 table.fn-tlt { width: 100% !important; font-size: 12px !important; }
}

/* Biến thể màu & bố cục cv-2..cv-7 */
body.ui-6:not(.cv-1) { background: var(--ui-bg); color: var(--ui-text); font-family: var(--ui-font, Arial, sans-serif); }
@media screen and (min-width: 1004px) {
  body.ui-6:not(.cv-1) div.cssmenu { background: var(--ui-primary) !important; }
  body.ui-6:not(.cv-1) #cssmenu > ul > li > a { color: #ffffff !important; }
  body.ui-6:not(.cv-1) #cssmenu > ul > li.active > a,
  body.ui-6:not(.cv-1) #cssmenu > ul > li:hover > a { background: var(--ui-primary-dark) !important; color: #ffeb3b !important; }
}
body.ui-6:not(.cv-1) #left-content > a > strong,
body.ui-6:not(.cv-1) .box-ketqua h2,
body.ui-6:not(.cv-1) .tienich h2,
body.ui-6:not(.cv-1) .title-bor {
  background: linear-gradient(90deg, var(--ui-primary) 0%, var(--ui-primary-dark) 75%, #111111 100%) !important;
  color: #ffffff !important;
}
body.ui-6:not(.cv-1) .box-ketqua h2 a,
body.ui-6:not(.cv-1) .tienich h2 a { color: #ffffff !important; }
body.ui-6:not(.cv-1) .result em,
body.ui-6:not(.cv-1) .red { color: var(--ui-db) !important; }
body.ui-6:not(.cv-1) .mega645 .data td i { background: var(--ui-primary); }
@media screen and (min-width: 1004px) {
  body.ui-6.cv-3 #content { display: flex; width: 1004px; margin: 0 auto; }
  body.ui-6.cv-3 #right-content { order: 1; float: none; }
  body.ui-6.cv-3 #center-content { order: 2; float: none; }
  body.ui-6.cv-3 #left-content { order: 3; float: none; }
}
body.ui-6.cv-5 table.result tr:nth-child(even) td { background: var(--ui-stripe); }

/* Biến thể bổ sung (preset 47–55) */
body.ui-6.cv-8 .box { border-width: 2px; }
body.ui-6.cv-9 .kqmb tbody tr:nth-child(even) td { background: var(--ui-stripe); }
body.ui-6.cv-9 .menu-pc { justify-content: center; }
