/* Ban v7: hien thi vua van moi man hinh dien thoai Android + iOS */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img { max-width: 100%; }

body {
  background: #eef6fb;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0 0 24px;
  color: #12303f;
  text-align: center;
}

.thanhTren {
  background: #075985;
  color: #ffffff;
  padding: calc(12px + env(safe-area-inset-top)) 10px 12px;
  position: sticky;
  top: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  z-index: 10;
}
.tenApp { font-size: clamp(17px, 5vw, 22px); font-weight: bold; letter-spacing: 0.5px; }
.tenCongTy { font-size: clamp(11px, 3.2vw, 13px); opacity: 0.85; margin-top: 3px; }

.khoi {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 14px;
  margin: 14px auto;
  width: calc(100% - 20px);
  max-width: 640px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  text-align: left;
}
.khoi h2 { color: #075985; font-size: clamp(18px, 4.8vw, 21px); margin: 0 0 10px; }
.khoi h3 { color: #0b6fa4; font-size: clamp(15px, 4.2vw, 17px); margin: 16px 0 8px; }

.gioHienTai { font-size: 14px; color: #555; margin: 0 0 10px; }

.theChuyen {
  background: #075985;
  color: #ffffff;
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
  text-align: center;
}
.theChuyen .huong { font-size: clamp(14px, 4vw, 16px); opacity: 0.9; }
.theChuyen .gioLon { font-size: clamp(34px, 11vw, 46px); font-weight: bold; margin: 4px 0; font-variant-numeric: tabular-nums; }
.theChuyen .conLai { font-size: clamp(13px, 3.8vw, 15px); color: #ffe9a8; }

table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 6px; border-bottom: 1px solid #e2eef5; text-align: left; }
th { color: #075985; }
td:first-child { white-space: nowrap; width: 34%; }
tr.sapChay td { background: #fff3c4; font-weight: bold; }
.nhanNho {
  background: #e8590c; color: #fff; font-size: 11px;
  padding: 2px 7px; border-radius: 8px; white-space: nowrap;
  display: inline-block;
}

.theThongBao {
  border-left: 5px solid #e8590c;
  background: #fff8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
}
.theThongBao.khan { border-left-color: #d6336c; background: #fff0f4; }
.theThongBao .tieuDe { font-weight: bold; margin-bottom: 4px; }
.theThongBao .ngay { font-size: 12px; color: #777; }

.theGia {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px;
  padding: 8px 2px; border-bottom: 1px solid #e2eef5; font-size: 15px;
}
.theGia span:first-child { flex: 1 1 auto; min-width: 0; }
.theGia .gia { font-weight: bold; color: #075985; flex: 0 0 auto; white-space: nowrap; font-variant-numeric: tabular-nums; }

.ghiChuNho { font-size: 13px; color: #666; line-height: 1.5; }
.chanTrang { text-align: center; }
a.nutFB {
  display: inline-block; background: #1877f2; color: #fff;
  padding: 9px 16px; border-radius: 8px; text-decoration: none; margin: 4px 2px;
}

/* Man hinh hep (iPhone SE, Android nho ~320-380px): thu nho chu, nhan cam duoc xuong dong */
@media (max-width: 380px) {
  .khoi { padding: 14px 10px; width: calc(100% - 14px); }
  table { font-size: 14px; }
  th, td { padding: 6px 4px; }
  .nhanNho { white-space: normal; line-height: 1.35; font-size: 10.5px; }
  .theGia { font-size: 14px; }
}

/* Man hinh lon (tablet, desktop): chu to hon mot chut cho day dan */
@media (min-width: 768px) {
  .khoi { padding: 20px 22px; }
  table { font-size: 16px; }
  .theGia { font-size: 16px; }
}

/* Hang widget nho tren cung: thoi tiet trai - lich sap chay phai */
.hangWidget {
  display: flex; gap: 10px;
  width: calc(100% - 20px); max-width: 640px;
  margin: 14px auto 0;
}
.widgetTrai, .widgetPhai {
  flex: 1 1 0; min-width: 0;
  background: #ffffff; border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  text-align: left;
}
.wTieuDe { font-weight: bold; color: #075985; font-size: 14px; margin-bottom: 6px; }
.wDong {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 6px; padding: 3px 0; font-size: 13px;
}
.wDong strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.wDong em { font-style: normal; font-size: 11px; color: #888; white-space: nowrap; }
.ttDong1 { display: flex; align-items: center; gap: 8px; }
.ttIconM { font-size: 30px; line-height: 1; }
.ttNhietM { font-size: 26px; font-weight: bold; font-variant-numeric: tabular-nums; }
.ttMoTaM { font-size: 12.5px; color: #555; margin-top: 4px; line-height: 1.45; }
.ttNoiM { font-size: 11.5px; color: #888; margin-top: 2px; }
.nutViTriMini {
  background: none; border: none; color: #0b6fa4; font-size: 12.5px;
  padding: 6px 0 0; cursor: pointer; text-decoration: underline;
}
@media (max-width: 380px) {
  .hangWidget { width: calc(100% - 14px); }
  .wDong strong { font-size: 16px; }
  .wDong { font-size: 12px; }
}

/* The thoi tiet chia 2 vung: thoi tiet trai - luot xem phai */
.widgetTrai { display: flex; gap: 12px; }
.ttTrai { flex: 1 1 auto; min-width: 0; }
.ttPhai { flex: 0 0 auto; border-left: 1px solid #e2eef5; padding-left: 14px; }
.dongXem { margin: 2px 0 7px; }
.dongXem span { display: block; font-size: 11.5px; color: #888; }
.dongXem strong { font-size: 19px; color: #075985; font-variant-numeric: tabular-nums; }
@media (max-width: 380px) {
  .ttPhai { padding-left: 9px; }
  .dongXem strong { font-size: 17px; }
}

/* Thuy trieu Hon Dau */
.trieuDau { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 2px; }
.trieuNgay { text-align: center; }
.trieuNgay strong { display: block; font-size: 16px; color: #075985; }
.trieuNgay span { font-size: 12.5px; color: #666; }
.nutTrieu { background: #e0f2fe; border: 1px solid #bae6fd; color: #075985; border-radius: 8px; padding: 7px 12px; font-size: 14px; }
.nutTrieu[disabled] { opacity: .35; }
.trieuCucTri { text-align: center; font-size: 14px; margin: 8px 0; color: #334155; }
.trieuHang { display: flex; align-items: center; gap: 8px; padding: 2.5px 0; font-size: 13.5px; }
.trieuHang .trieuGio { flex: 0 0 30px; text-align: right; color: #0369a1; font-weight: 600; }
.trieuThanh { flex: 1 1 auto; background: #e8f3fa; border-radius: 4px; height: 15px; overflow: hidden; }
.trieuMuc { height: 100%; background: repeating-linear-gradient(45deg, #0284c7 0 8px, #38bdf8 8px 16px); border-radius: 4px; }
.trieuHang .trieuSo { flex: 0 0 40px; font-variant-numeric: tabular-nums; color: #0c4a6e; }
.trieuHang.gioNay { background: #fef9c3; border-radius: 6px; }

/* Khoi cai dat ung dung (PWA) */
.nutCaiApp { background:#0b5fa5; color:#fff; border:none; border-radius:10px; padding:12px 22px; font-size:16px; font-weight:700; cursor:pointer; margin-top:6px; }
.nutCaiApp:active { opacity:.85; }

/* Bo chon tram thuy trieu */
.chonTram { font-size:16px; padding:7px 10px; border-radius:8px; border:1px solid #b9c9d6; background:#fff; max-width:100%; }
.trieuChonWrap { margin:2px 0 10px; }

/* Nut ve dau trang */
#nutVeDau { position:fixed; right:14px; bottom:16px; z-index:60; width:46px; height:46px; border-radius:50%; border:none; background:#0b5fa5; color:#fff; font-size:20px; box-shadow:0 3px 10px rgba(0,0,0,.3); cursor:pointer; display:none; }
#nutVeDau:active { opacity:.85; }

.dmcaDong { text-align:center; margin-top:10px; }

/* O tim kiem trong trang (kieu Google) */
.timKiemKhoi { padding:12px 14px; }
.timKiemHop { position:relative; display:flex; align-items:center; gap:8px; background:#fff; border:1.5px solid #c7d5e0; border-radius:24px; padding:9px 14px; }
.timKiemHop:focus-within { border-color:#0b5fa5; box-shadow:0 2px 10px rgba(11,95,165,.15); }
.timKiemKinh { font-size:17px; }
#oTimKiem { flex:1; border:none; outline:none; font-size:16px; background:transparent; min-width:0; }
.goiYTimKiem { position:absolute; left:0; right:0; top:calc(100% + 6px); background:#fff; border:1px solid #d5e0ea; border-radius:12px; box-shadow:0 8px 24px rgba(0,0,0,.15); overflow:hidden; z-index:50; }
.goiYTimKiem button { display:block; width:100%; text-align:left; background:none; border:none; padding:11px 14px; font-size:15px; cursor:pointer; color:#1c2733; }
.goiYTimKiem button:hover, .goiYTimKiem button:active { background:#eef4fa; }
.goiYTimKiem .khongCo { padding:11px 14px; color:#5b6b7c; font-size:14px; }
@keyframes nhapNhayMuc { 0%,100% { box-shadow:0 0 0 0 rgba(11,95,165,0); } 50% { box-shadow:0 0 0 4px rgba(11,95,165,.45); } }
.mucNoiBat { animation:nhapNhayMuc 1s ease-in-out 3; }

/* Menu luoi + the xep gon (accordion) */
.menuLuoi { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.menuLuoi button, .menuLuoi a { display:flex; flex-direction:column; align-items:center; gap:4px; padding:13px 4px 11px; background:#eef4fa; border:1px solid #d5e0ea; border-radius:12px; font-size:27px; cursor:pointer; text-decoration:none; }
.menuLuoi button:active, .menuLuoi a:active { background:#dcebf7; }
.menuLuoi button span, .menuLuoi a span { font-size:13.5px; color:#14425f; font-weight:600; text-align:center; }
.khoi > h2.dauGon { cursor:pointer; position:relative; padding-right:32px; }
.khoi > h2.dauGon::after { content:"▾"; position:absolute; right:8px; top:50%; transform:translateY(-50%); color:#0b5fa5; font-size:21px; transition:transform .25s; }
.khoi.dongGon > h2.dauGon::after { transform:translateY(-50%) rotate(-90deg); }
.khoi.dongGon > *:not(h2) { display:none !important; }

/* Slideshow anh dau trang (anh that tai ben Dong Bai do ben pha chup): chuoi anh troi qua lai 5 giay/lan */
.anhDauTrang{position:relative;width:100%;aspect-ratio:2/1;max-height:430px;background:#0a1622;overflow:hidden}
.duongTruot{display:flex;width:100%;height:100%;transition:transform 1.8s ease-in-out}
.slideDauTrang{position:relative;flex:0 0 100%;height:100%;background-position:center center;background-size:cover;background-repeat:no-repeat}
.anhDauTrangChu{position:absolute;left:0;right:0;bottom:0;padding:26px 14px 12px;color:#fff;font-size:15px;font-weight:600;text-shadow:0 1px 4px rgba(0,0,0,.8);background:linear-gradient(transparent,rgba(0,0,0,.55))}
.chamDauTrang{position:absolute;right:10px;bottom:10px;display:flex;gap:6px;z-index:2}
.chamDauTrang .cham{width:10px;height:10px;border-radius:50%;border:1px solid rgba(255,255,255,.9);background:rgba(255,255,255,.35);padding:0;cursor:pointer}
.chamDauTrang .chamDangXem{background:#fff}

/* Bo chon ngon ngu (dich qua Google Translate) */
.doiNgonNgu{display:flex;align-items:center;gap:8px;justify-content:center;padding:8px 10px;background:#eaf4fb;border-bottom:1px solid #cfe3f2;font-size:15px;flex-wrap:wrap}
.doiNgonNgu .nnNhan{font-weight:700;color:#0b5fa5}
.nnSelect{font-size:15px;padding:7px 8px;border-radius:8px;border:1px solid #9cc3e5;background:#fff;color:#123;max-width:240px}

/* Man hinh chao khi mo web/app: khau hieu tren logo, website duoi logo */
.manChao{position:fixed;inset:0;z-index:9999;background:linear-gradient(180deg,#0a6ebd 0%,#075985 60%,#064a6e 100%);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px 20px;opacity:1;transition:opacity .45s ease}
.manChaoAn{opacity:0;pointer-events:none}
.manChaoKhauHieu{color:#ffd83d;font-size:clamp(24px,7vw,40px);font-weight:800;letter-spacing:.5px;line-height:1.25;text-shadow:0 2px 8px rgba(0,0,0,.35)}
.manChaoPhu{color:#eaf6ff;font-size:clamp(14px,4vw,19px);font-weight:600;margin-top:10px}
.manChaoLogo{width:min(52vw,240px);height:auto;margin:26px 0 20px;border-radius:24px;box-shadow:0 10px 30px rgba(0,0,0,.35)}
.manChaoWeb{color:#fff;font-size:clamp(19px,5.5vw,28px);font-weight:800;letter-spacing:.4px}
.manChaoMuc{color:#bfe3f7;font-size:clamp(13px,3.8vw,17px);margin-top:8px}
