:root {
  --bg: #f1f5fb; --card: #fff; --text: #0f1b3d; --muted: #5b6b8c; --border: #dde5f2;
  --primary: #2563eb; --primary-dark: #1e3a8a; --navy: #0a1633; --cyan: #22d3ee; --gold: #f59e0b; --gold-light: #fde68a;
  --safe: #12a150; --warn: #e8a317; --danger: #d92d20;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; font-family: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
h1, h2, h3 { letter-spacing: -.01em; }
.card h3:first-child { margin-top: 0; }

/* ---------- Thanh trên cùng ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 24px; background: rgba(10, 22, 51, .94); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; white-space: nowrap; }
.nav { display: flex; gap: 6px; }
.nav button { padding: 9px 14px; border: 0; background: transparent; color: #cbd5e1; border-radius: 999px;
  cursor: pointer; font-size: 15px; font-weight: 600; font-family: inherit; white-space: nowrap; }
.nav button:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav button.active { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy); }

/* ---------- Hero: tấm khiên chắn các vấn nạn trên mạng ---------- */
.hero { background:
    radial-gradient(circle at 75% 45%, rgba(34, 211, 238, .25), transparent 45%),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(160deg, #0a1633 0%, #12245a 60%, #1e3a8a 100%);
  color: #fff; padding: 48px 24px 96px; overflow: hidden; }
.hero-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(253, 230, 138, .14); color: var(--gold-light);
  font-size: 13px; font-weight: 600; border: 1px solid rgba(253, 230, 138, .3); }
.hero h1 { font-size: 56px; line-height: 1.1; margin: 16px 0 12px; font-weight: 900; text-transform: uppercase;
  background: linear-gradient(90deg, #fff 35%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; line-height: 1.6; color: #cbd5e1; margin: 0 0 24px; max-width: 560px; }
.lead b { color: #fff; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-gold, .btn-ghost { padding: 13px 22px; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; transition: transform .15s; }
.btn-gold { border: 0; background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy); box-shadow: 0 8px 24px rgba(245, 158, 11, .35); }
.btn-ghost { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.06); color: #fff; }
.btn-gold:hover, .btn-ghost:hover { transform: translateY(-2px); }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 28px; color: #94a3b8; font-size: 14px; }
.facts b { display: block; font-size: 28px; color: #fff; }

.hero-shield { position: relative; height: 380px; display: grid; place-items: center; }
.shield-big { width: 210px; position: relative; z-index: 2; filter: drop-shadow(0 0 40px rgba(34, 211, 238, .55)); animation: float 5s ease-in-out infinite; }
.ripple { position: absolute; width: 250px; height: 250px; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .5); animation: ripple 3.2s ease-out infinite; }
.ripple.r2 { animation-delay: 1.6s; }
.threat { position: absolute; z-index: 1; padding: 6px 12px 6px 28px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap;
  background: rgba(127, 29, 29, .45); color: #fecaca; border: 1px solid rgba(248, 113, 113, .5); animation: bounce 3s ease-in-out infinite; }
.threat::before { content: "✕"; position: absolute; left: 10px; color: #f87171; }
.t1 { top: 6%; left: 8%; } .t2 { top: 3%; right: 10%; animation-delay: .4s; } .t3 { top: 36%; left: 0; animation-delay: .8s; }
.t4 { top: 36%; right: 0; animation-delay: 1.2s; } .t5 { bottom: 20%; left: 2%; animation-delay: 1.6s; }
.t6 { bottom: 20%; right: 2%; animation-delay: 2s; } .t7 { bottom: 2%; left: 50%; margin-left: -40px; animation-delay: 2.4s; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes ripple { from { transform: scale(.75); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes bounce { 50% { transform: translateY(-4px); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .shield-big, .ripple, .threat { animation: none; } }

/* ---------- 3 lớp bảo vệ ---------- */
.layers { max-width: 1080px; margin: -64px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; position: relative; z-index: 3; }
.layer { background: #fff; border-radius: 16px; padding: 18px 20px; border: 1px solid var(--border); cursor: pointer;
  box-shadow: 0 10px 30px rgba(15, 27, 61, .08); transition: transform .15s, box-shadow .15s; border-top: 4px solid var(--primary); }
.layer:nth-child(2) { border-top-color: var(--cyan); } .layer:nth-child(3) { border-top-color: var(--gold); }
.layer:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 27, 61, .14); }
.layer-no { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.layer h3 { margin: 4px 0 6px; font-size: 20px; }
.layer p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.layer-link { color: var(--primary); font-weight: 700; font-size: 14px; }

/* ---------- Chân trang ---------- */
.site-footer { background: var(--navy); color: #cbd5e1; padding: 32px 24px 24px; margin-top: 40px; text-align: center; }
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; text-align: left; }
.footer-brand { display: flex; align-items: center; gap: 12px; } .footer-brand b { color: #fff; font-size: 18px; } .footer-brand span { font-size: 13px; }
.hotlines { display: flex; gap: 12px; }
.hotlines div { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 8px 14px; }
.hotlines b { font-size: 28px; color: var(--gold-light); } .hotlines span { font-size: 12px; line-height: 1.35; }
.disclaimer { max-width: 760px; margin: 20px auto 6px; font-size: 13px; color: #94a3b8; }
main { max-width: 900px; margin: 32px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-bottom: 18px; box-shadow: 0 4px 16px rgba(15, 27, 61, .05); }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab { flex: 1; padding: 10px; border: 1px solid var(--border); background: #fff; border-radius: 10px; cursor: pointer; font-size: 15px; }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
textarea, input[type=url] { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; font-family: inherit; }
textarea { min-height: 140px; resize: vertical; }
button.primary { margin-top: 12px; padding: 12px 22px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font-size: 16px; cursor: pointer; }
button.primary:disabled { opacity: .6; cursor: wait; }
.examples { margin-top: 10px; font-size: 14px; color: var(--muted); }
.examples button { margin: 4px 4px 0 0; padding: 5px 10px; border: 1px solid var(--border); background: #fff; border-radius: 20px; cursor: pointer; font-size: 13px; }
.hidden { display: none; }
.score { display: flex; align-items: center; gap: 20px; }
.ring { --p: 0; --c: var(--safe); width: 104px; height: 104px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #e9edf5 0); display: grid; place-items: center; }
.ring span { width: 80px; height: 80px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 700; }
.verdict h2 { margin: 0 0 6px; }
.verdict p { margin: 0; color: var(--muted); }
.bar { margin: 10px 0; }
.bar .lbl { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.bar .track { height: 10px; background: #e9edf5; border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--primary); border-radius: 6px; }
.chip { display: inline-block; padding: 3px 10px; margin: 3px; border-radius: 20px; background: #fdecea; color: var(--danger); font-size: 13px; }
.para { padding: 10px 12px; border-left: 4px solid var(--safe); background: #fafbfd; margin: 8px 0; border-radius: 6px; font-size: 14px; }


.para small { color: var(--muted); display: block; margin-top: 4px; }
.error { color: var(--danger); }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.meter { display: flex; align-items: center; gap: 14px; }
.meter h2 { margin: 2px 0 0; font-size: 18px; }
.mlabel { color: var(--muted); font-size: 13px; }
.advice { background: #f6f8fc; border-radius: 10px; padding: 10px 12px; margin-top: 16px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.info ul { padding-left: 20px; } .info p, .info li { font-size: 14px; line-height: 1.5; }
.para.trung_binh { border-color: var(--warn); }
.para.cao { border-color: var(--danger); }
@media (max-width: 760px) {
  .meters { grid-template-columns: 1fr; }
  .tab { font-size: 13px; padding: 9px 4px; }
  .ring { width: 96px; height: 96px; } .ring span { width: 72px; height: 72px; font-size: 20px; }
}
.privacy { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.advice ul { margin: 6px 0 0; padding-left: 20px; } .advice li { margin: 3px 0; font-size: 14px; }
.advice p { margin: 0 0 8px; }
mark { background: #ffe08a; color: inherit; border-radius: 3px; padding: 0 2px; }
h3 small { font-weight: 400; color: var(--muted); font-size: 13px; }
.link-box { border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; border: 1px solid var(--border); overflow-wrap: anywhere; }
.link-box ul { margin: 6px 0 0; padding-left: 20px; }
.link-box.risk-thap { background: #ecfdf3; } .link-box.risk-trung_binh { background: #fff8e6; } .link-box.risk-cao { background: #fdecea; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between h3 { margin: 0; }
button.secondary { padding: 8px 14px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
th, td { border-bottom: 1px solid var(--border); padding: 8px 6px; text-align: left; vertical-align: top; }
th { background: #f6f8fc; }
tr.bad td { background: #fff5f4; }
td.input { max-width: 240px; overflow-wrap: anywhere; } td.note { max-width: 260px; color: var(--muted); }
.viol { margin-top: 4px; color: var(--danger); font-size: 12px; }
.tags { color: var(--cyan); font-size: 13px; }
.help-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.help-actions button.primary { margin-top: 0; }
.rt-message { border-radius: 10px; padding: 12px 14px; font-size: 15px; margin-bottom: 12px; }
.rt-message.thap { background: #ecfdf3; } .rt-message.trung_binh { background: #fff8e6; } .rt-message.cao { background: #fdecea; }
.sugg li { cursor: pointer; margin: 6px 0; padding: 6px 10px; background: #f6f8fc; border-radius: 8px; list-style: none; }
.sugg { padding-left: 0; } .sugg li:hover { background: #e8eefc; } .sugg li.copied::after { content: " ✓ đã chép"; color: var(--safe); font-size: 12px; }
.ok-box { background: #ecfdf3; border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.warn-box { background: #fff8e6; border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.quote { background: #f6f8fc; border-left: 4px solid var(--primary); padding: 10px 12px; border-radius: 6px; margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.quote.big { font-size: 17px; padding: 16px; }
.qz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.qz-options button { padding: 12px; border: 1px solid var(--border); background: #fff; border-radius: 10px; cursor: pointer; font-size: 15px; }
.qz-options button:disabled { cursor: default; opacity: .7; }
.qz-options button.right { background: #ecfdf3; border-color: var(--safe); opacity: 1; }
.qz-options button.wrong { background: #fdecea; border-color: var(--danger); opacity: 1; }
#qz-feedback { margin-top: 12px; }
form label.mlabel { display: block; margin: 12px 0 4px; }
select, input[type=text], input:not([type]), input[type=password] { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; font-family: inherit; background: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; margin: 12px 0 6px; font-size: 14px; }
#rp-contact { margin-top: 4px; }
.code { font-family: monospace; font-size: 22px; font-weight: 700; letter-spacing: 2px; background: #fff; padding: 2px 10px; border-radius: 6px; }
.inline-form { display: flex; gap: 8px; } .inline-form input { flex: 1; }
details { margin: 8px 0; } details summary { cursor: pointer; } details ol, details ul { margin: 6px 0; }
a.btn { display: inline-block; text-decoration: none; color: inherit; font-size: 14px; }
.filters { margin: 10px 0; } .chip-btn { padding: 6px 12px; border: 1px solid var(--border); background: #fff; border-radius: 20px; cursor: pointer; }
.chip-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.report { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.report.urgent { border-color: var(--danger); background: #fffafa; }
.report.st-da_xu_ly { opacity: .7; }
.report textarea { min-height: 60px; }
.report select { width: auto; }
.evidence { max-width: 220px; max-height: 220px; border-radius: 8px; border: 1px solid var(--border); display: block; margin: 6px 0; }
.login { max-width: 420px; margin: 0 auto; }
@media (max-width: 760px) {
  .qz-options, .grid2 { grid-template-columns: 1fr; }
}
a.secondary { padding: 8px 14px; border: 1px solid var(--border); background: #fff; border-radius: 8px; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; } .cta, .facts { justify-content: center; }
  .hero-shield { height: 330px; order: -1; } .shield-big { width: 170px; }
  .hero h1 { font-size: 40px; }
  .layers { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 12px; }
  .brand { justify-content: center; font-size: 16px; }
  .nav { overflow-x: auto; scrollbar-width: none; } .nav button { font-size: 13px; padding: 8px 10px; flex: 1; }
  html { scroll-padding-top: 110px; }
  .hero { padding: 16px 12px 84px; } .hero h1 { font-size: 32px; } .lead { font-size: 16px; }
  .hero-shield { height: 290px; } .shield-big { width: 130px; } .ripple { width: 170px; height: 170px; }
  .threat { font-size: 12px; padding: 4px 9px 4px 22px; } .threat::before { left: 8px; }
  .facts { gap: 18px; } .layers { padding: 0 16px; }
  .footer-inner { justify-content: center; text-align: center; } .hotlines { flex-wrap: wrap; justify-content: center; }
}
.topbar-note { color: #cbd5e1; font-size: 14px; }
button, input, select, textarea { font-family: inherit; }
@media (max-width: 760px) {
  .nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; overflow: visible; }
  .nav button { white-space: normal; font-size: 12px; padding: 7px 4px; line-height: 1.25; }
}

/* ---------- Bé Khiên ---------- */
.khien-say { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.khien-say > img { width: 76px; flex: none; filter: drop-shadow(0 6px 10px rgba(37, 99, 235, .25)); }
.bubble { position: relative; flex: 1; background: #eef4ff; border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.5; margin: 0; }
.bubble::before { content: ""; position: absolute; left: -9px; top: 50%; margin-top: -9px; border: 9px solid transparent; border-left: 0; border-right-color: #eef4ff; }
.bubble.rt-message { margin-bottom: 0; }
.bubble.rt-message.thap { background: #ecfdf3; } .bubble.rt-message.thap::before { border-right-color: #ecfdf3; }
.bubble.rt-message.trung_binh { background: #fff8e6; } .bubble.rt-message.trung_binh::before { border-right-color: #fff8e6; }
.bubble.rt-message.cao { background: #fdecea; } .bubble.rt-message.cao::before { border-right-color: #fdecea; }
img.mini { width: 28px; vertical-align: middle; margin-right: 4px; }
.mascot-side { float: right; width: 70px; margin-left: 10px; }

/* ---------- Ảnh chụp ---------- */
.dropzone { display: grid; place-items: center; min-height: 150px; border: 2px dashed #b6c6e6; border-radius: 14px; background: #f7faff;
  cursor: pointer; text-align: center; color: var(--muted); padding: 14px; margin-bottom: 10px; }
.dropzone:hover { border-color: var(--primary); }
#ocr-preview { max-height: 260px; max-width: 100%; border-radius: 10px; }
.progress { position: relative; height: 26px; background: #e9edf5; border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--primary)); transition: width .2s; }
.progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600; }

/* ---------- Góp ý AI đoán sai ---------- */
.fb-btn { float: right; margin-top: -18px; border: 0; background: none; color: var(--primary); cursor: pointer; font-size: 12px; }
.fb-form { margin-top: 10px; display: grid; gap: 6px; }
.fb-form .mlabel { margin: 0; }

/* ---------- Giúp bạn ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.step { background: #f6f8fc; border-radius: 12px; padding: 12px; position: relative; }
.step > b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 14px; }
.step h4 { margin: 8px 0 4px; font-size: 15px; } .step p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.layer-links { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }

/* ---------- Điện thoại: thanh menu dưới đáy như ứng dụng ---------- */
@media (max-width: 760px) {
  body { padding-bottom: 72px; }
  .topbar { position: sticky; flex-direction: row; justify-content: center; }
  html { scroll-padding-top: 70px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
    background: rgba(10, 22, 51, .97); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.1); }
  .nav button { font-size: 11px; padding: 6px 2px; border-radius: 10px; white-space: normal; line-height: 1.25; }
  .khien-say > img { width: 58px; }
  .steps { grid-template-columns: 1fr; }
  .tab { font-size: 12px; }
}
@media (max-width: 760px) {
  /* backdrop-filter tạo khung chứa cho phần tử fixed, làm thanh menu dưới đáy bị kẹt trên đầu */
  .topbar { backdrop-filter: none; background: var(--navy); }
}

/* ---------- 6 thủ đoạn lừa đảo, 4 Không – 2 Phải ---------- */
.tricks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.trick { background: #fff8f0; border: 1px solid #fde2c4; border-radius: 12px; padding: 12px; }
.trick span { font-size: 26px; } .trick h4 { margin: 4px 0; font-size: 14px; color: #b42318; }
.trick p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.rule-title { margin-top: 22px; }
.rules { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.rules > div { border-radius: 12px; padding: 12px 14px; } .rules h4 { margin: 0 0 6px; } .rules ul { margin: 0; padding-left: 18px; }
.rules li { font-size: 14px; margin: 4px 0; }
.rule-no { background: #fdecea; } .rule-no b { color: #b42318; }
.rule-yes { background: #ecfdf3; } .rule-yes b { color: #067647; }
.slogan { text-align: center; font-weight: 900; font-size: 20px; text-transform: uppercase; color: var(--navy); margin: 18px 0 6px; }
.slogan span { background: var(--danger); color: #fff; padding: 2px 10px; border-radius: 6px; }
@media (max-width: 760px) { .tricks, .rules { grid-template-columns: 1fr; } .slogan { font-size: 16px; } }
