:root {
  --bg: #0b0f1a; --bg2: #101727; --card: #121a2c; --card2: #172138; --line: #25314d; --text: #f3f6fc; --mute: #93a3c0;
  --orange: #ff6a2b; --amber: #ffb800; --yellow: #ffe14a; --cyan: #19d3f0; --green: #2ee86f; --red: #ff5d6c;
  --on-accent: #1a0d00; --ray: rgba(255,120,40,.07); --shadow: 0 18px 40px rgba(0,0,0,.4); --input: #0c1424; --ph: #5b6d90;
  --r: 18px;
}
:root[data-theme="light"] {
  --bg: #fff8f2; --bg2: #fff1e6; --card: #ffffff; --card2: #fff7f0; --line: #f0d9c8; --text: #2a1a10; --mute: #7a6354;
  --cyan: #0a93ad; --green: #0f9d4a; --red: #d63a4a; --ray: rgba(255,106,43,.08);
  --shadow: 0 14px 34px rgba(160,80,30,.16); --input: #fffaf6; --ph: #b79b88;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  min-height: 100dvh; color: var(--text); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); position: relative; overflow-x: hidden;
}
body::before { /* tia sáng tỏa ra từ banner */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 760px; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% -8%, var(--ray) 0 8deg, transparent 8deg 18deg);
  -webkit-mask-image: linear-gradient(#000 20%, transparent); mask-image: linear-gradient(#000 20%, transparent);
}
.sprite { position: absolute; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- thanh trên cùng ---------- */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.nav-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 1; min-width: 0; }
.brand span { display: grid; line-height: 1.15; }
.brand b { font-size: 17px; font-weight: 800; letter-spacing: .1px; }
.brand small { color: var(--mute); font-size: 12.5px; }
.logo { border-radius: 50%; border: 2px solid rgba(255,106,43,.65); object-fit: cover; }
.menu { display: none; gap: 4px; }
.menu a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--mute); padding: 8px 14px; border-radius: 99px; transition: background .2s, color .2s; }
.menu a:hover { color: var(--text); background: var(--card2); }
  background: color-mix(in srgb, var(--green) 12%, transparent); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); padding: 6px 12px; border-radius: 99px; }
@keyframes blink { 50% { opacity: .25; transform: scale(.8); } }
.theme { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.theme:hover { border-color: var(--orange); }

/* ---------- khung chính ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 18px 16px 48px; display: grid; gap: 22px; }
.banner { position: relative; overflow: hidden; border-radius: 26px; padding: 22px 20px; display: grid; gap: 18px; color: #fff;
  background: linear-gradient(135deg, #ff4d1a 0%, #ff7a1f 55%, #ffa51f 100%); box-shadow: 0 22px 50px rgba(255,90,20,.32); }
.banner::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28), transparent 70%); pointer-events: none; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .3px; background: rgba(0,0,0,.22); padding: 5px 12px; border-radius: 99px; }
.banner h1 { font-size: 28px; line-height: 1.15; font-weight: 900; letter-spacing: -.4px; margin: 12px 0 8px; text-shadow: 0 2px 10px rgba(120,30,0,.3); }
.banner h1 em { font-style: normal; color: #fff3a8; }
.banner p { font-size: 15.5px; max-width: 520px; color: rgba(255,255,255,.93); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn-room, .btn-zalo { text-decoration: none; font-weight: 800; font-size: 15px; padding: 10px 18px; border-radius: 99px; }
.btn-room { background: #fff; color: #c2410c; box-shadow: 0 8px 18px rgba(120,30,0,.25); }
.btn-zalo { background: rgba(0,0,0,.25); color: #fff; border: 1px solid rgba(255,255,255,.4); }

.grid { display: grid; gap: 22px; align-items: start; }
.col-main, .col-side { display: grid; gap: 18px; min-width: 0; }

/* ---------- thẻ gửi link ---------- */
.card { background: linear-gradient(180deg, color-mix(in srgb, var(--text) 4%, transparent), transparent), var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--input); border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.tab { border: 0; background: transparent; color: var(--mute); font: inherit; font-weight: 700; font-size: 15px; padding: 10px; border-radius: 99px; cursor: pointer; transition: all .2s; }
.tab.on { color: var(--on-accent); background: linear-gradient(135deg, var(--yellow), var(--orange)); box-shadow: 0 6px 16px rgba(255,106,43,.35); }
.pane { display: grid; gap: 14px; }
.drop { position: relative; display: grid; gap: 12px; padding: 14px; border-radius: 20px; border: 2px solid var(--amber); background: var(--card2); box-shadow: 0 0 0 4px rgba(255,184,0,.1), 0 0 30px rgba(255,150,0,.12); }
.hot { position: absolute; top: -12px; right: 14px; background: linear-gradient(135deg, #ff4d1a, #ff8a00); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .6px; padding: 3px 10px; border-radius: 99px; transform: rotate(4deg); box-shadow: 0 4px 10px rgba(255,80,0,.4); }
.paste, .send, .room, .again { min-height: 56px; border: 0; border-radius: var(--r); font: inherit; font-weight: 800; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; transition: transform .12s, filter .2s, opacity .2s; }
.paste { min-height: 64px; font-size: 19px; color: var(--on-accent); background: linear-gradient(135deg, var(--yellow), var(--orange)); box-shadow: 0 10px 28px rgba(255,106,43,.4), inset 0 -3px 0 rgba(0,0,0,.18); }
.paste .ic { font-size: 22px; }
.send { color: #031018; background: linear-gradient(135deg, #5af3ff, var(--cyan)); box-shadow: 0 8px 22px rgba(25,211,240,.28); }
.send:disabled { opacity: .62; box-shadow: none; cursor: not-allowed; }
.paste:active, .send:not(:disabled):active, .room:active, .again:active { transform: scale(.98); }
.paste:focus-visible, .send:focus-visible, textarea:focus-visible, input:focus-visible, .room:focus-visible, .again:focus-visible, .tab:focus-visible, .theme:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.field { display: grid; gap: 6px; }
.lbl { font-size: 13px; color: var(--mute); font-weight: 600; }
textarea, input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--input); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; resize: none; min-height: 48px; }
textarea::placeholder, input::placeholder { color: var(--ph); }
textarea:focus, input:focus { border-color: var(--cyan); outline: none; }
.fine { font-size: 12.5px; color: var(--mute); display: flex; gap: 6px; align-items: center; justify-content: center; }

.preview { display: flex; gap: 12px; align-items: center; background: color-mix(in srgb, var(--green) 10%, transparent); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); border-radius: 16px; padding: 12px; animation: pop .25s ease; }
.preview.loading { background: color-mix(in srgb, var(--text) 5%, transparent); border-color: var(--line); }
.preview.loading .pinfo b { color: transparent; background: linear-gradient(90deg, var(--card2), var(--line), var(--card2)); background-size: 200% 100%; border-radius: 6px; animation: shine 1.1s linear infinite; min-width: 150px; min-height: 18px; display: block; }
@keyframes shine { to { background-position: -200% 0; } }
.thumb { flex: none; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: var(--card2); }
.pinfo { display: grid; gap: 2px; min-width: 0; }
.pinfo b { font-size: 16px; overflow-wrap: anywhere; }
.pinfo span { font-size: 13px; color: var(--green); font-weight: 600; }
.error { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); border: 1px solid color-mix(in srgb, var(--red) 42%, transparent); border-radius: 14px; padding: 12px 14px; font-size: 15px; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }

/* ---------- lịch sử của tôi ---------- */
.hist { list-style: none; display: grid; gap: 8px; }
.hist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.hist .hn { font-weight: 700; overflow-wrap: anywhere; }
.hist small { color: var(--mute); grid-column: 1; }
.hist .st { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.badge { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 99px; white-space: nowrap; color: var(--on-accent); background: var(--amber); }
.badge.ok { background: var(--green); color: #04210f; }
.badge.no { background: var(--line); color: var(--mute); }
.empty { color: var(--mute); font-size: 14.5px; text-align: center; padding: 10px 0; }

/* ---------- theo dõi tiến trình ---------- */
.again { color: var(--text); background: transparent; border: 1.5px solid var(--line); font-size: 16px; min-height: 48px; }

/* ---------- vừa được gửi ---------- */
.rhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rhead h2 { font-size: 18px; font-weight: 800; }
.rhead small { color: var(--mute); font-size: 12.5px; }
:root[data-theme="dark"] .recent li b { color: var(--yellow); }

/* ---------- nội dung dưới ---------- */
.block { display: grid; gap: 14px; }
.block h2 { font-size: 22px; font-weight: 900; letter-spacing: -.2px; }
.how3 { list-style: none; display: grid; gap: 12px; }
.how3 li { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 6px; box-shadow: var(--shadow); }
.how3 .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: var(--on-accent); background: linear-gradient(135deg, var(--yellow), var(--orange)); }
.how3 p, .faq p, .tip p { color: var(--mute); font-size: 15px; }
.how3 b, .faq summary { font-weight: 800; }
.tip, .faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.faq { display: grid; gap: 10px; }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 22px; color: var(--orange); line-height: 1; transition: transform .2s; }
details[open] > summary::after { transform: rotate(45deg); }
details[open] > summary { margin-bottom: 8px; }
code { font-size: 13px; background: var(--card2); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
.trust { list-style: none; display: grid; gap: 12px; }
.trust li { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.trust .ic { font-size: 26px; color: var(--orange); margin-top: 2px; }
.trust b { display: block; }
.trust span { color: var(--mute); font-size: 14.5px; }

/* ---------- chân trang ---------- */
.foot { border-top: 1px solid var(--line); background: var(--bg2); padding: 26px 16px calc(26px + env(safe-area-inset-bottom)); }
.foot-in { max-width: 1120px; margin: 0 auto; display: grid; gap: 12px; color: var(--mute); font-size: 13.5px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { text-decoration: none; font-weight: 600; color: var(--text); }
.foot-links a:hover { color: var(--orange); }
.fab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 15; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #fff; text-decoration: none; background: #0a6cff; box-shadow: 0 10px 24px rgba(10,108,255,.45); }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); max-width: 448px; margin: 0 auto; background: var(--card2); border: 1px solid var(--cyan); border-radius: 16px; padding: 14px 16px; font-weight: 600; box-shadow: 0 14px 36px rgba(0,0,0,.5); animation: pop .25s ease; z-index: 30; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (min-width: 640px) {
  .menu { display: flex; }
  .banner { padding: 30px 32px; grid-template-columns: 1.4fr 1fr; align-items: center; }
  .banner h1 { font-size: 36px; }
  .how3 { grid-template-columns: repeat(3, 1fr); }
  .trust { grid-template-columns: repeat(3, 1fr); }
  .trust li { flex-direction: column; gap: 8px; }
}
@media (min-width: 960px) {
  .wrap { padding-top: 26px; gap: 30px; }
  .grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; }
  .col-side { position: sticky; top: 86px; }
  .banner h1 { font-size: 42px; }
}

/* ---------- kết quả sau khi dán link ---------- */
.result { gap: 14px; }
.okrow { display: flex; align-items: center; gap: 12px; }
.okrow b { display: block; font-size: 18px; }
.okrow small { color: var(--mute); font-size: 13px; }
.okic { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--green); position: relative; }
.okic::after { content: ""; position: absolute; left: 13px; top: 7px; width: 9px; height: 17px; border: solid #04210f; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.pname { font-weight: 800; font-size: 17px; overflow-wrap: anywhere; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.big { min-height: 60px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 16px; text-decoration: none; font-weight: 900; font-size: 19px; color: #fff; background: linear-gradient(135deg, #ff7a45, #ee4d2d); box-shadow: 0 10px 26px rgba(238,77,45,.42); transition: transform .12s; }
.big:active { transform: scale(.98); }
.sec { min-height: 48px; border-radius: var(--r); border: 1.5px solid var(--line); background: transparent; color: var(--text); font: inherit; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.sec:hover, .again:hover { border-color: var(--orange); }
.note { font-size: 14px; color: var(--mute); background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.result h3 { font-size: 16px; margin-bottom: 8px; }
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

details.opt { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
details.opt summary { font-size: 14px; font-weight: 600; color: var(--mute); }
details.opt[open] .field { margin-top: 4px; }

/* ---------- mã giảm giá ---------- */

/* điện thoại: gọn để ô dán nằm ngay màn hình đầu */
@media (max-width: 639px) {
  .wrap { padding-top: 12px; gap: 16px; }
  .banner { padding: 16px; gap: 10px; border-radius: 22px; }
  .banner h1 { font-size: 24px; margin: 8px 0 4px; }
  .banner p { font-size: 14px; }
  .cta { margin-top: 10px; }
}



/* ---------- v3: mã giảm giá là trung tâm ---------- */
.live-link { display: none; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: #ff4d5e; text-decoration: none; background: color-mix(in srgb, #ff4d5e 12%, transparent); border: 1px solid color-mix(in srgb, #ff4d5e 40%, transparent); padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
.live-link:not([hidden]) { display: inline-flex; }
.live-link i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b4a; animation: blink 1.2s infinite; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip2 { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.22); border-radius: 99px; padding: 6px 14px; }
.chip2 b { font-variant-numeric: tabular-nums; }
.banner { grid-template-columns: 1fr !important; }
.banner h1 { max-width: 640px; }
.result .note { margin: 0; }
a.sec { text-decoration: none; }
.pname { margin: 0; }

.vboard { gap: 12px; scroll-margin-top: 80px; }
.rhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rhead h2 { font-size: 20px; font-weight: 900; }
.rhead small { color: var(--mute); font-size: 12.5px; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.f { flex: none; border: 1.5px solid var(--line); background: var(--card2); color: var(--mute); font: inherit; font-weight: 700; font-size: 14px; padding: 7px 16px; border-radius: 99px; cursor: pointer; }
.f.on { color: var(--on-accent); border-color: transparent; background: linear-gradient(135deg, var(--yellow), var(--orange)); }
.vlist { list-style: none; display: grid; gap: 12px; }
.vc { display: grid; grid-template-columns: 78px 1fr auto; align-items: stretch; background: var(--card2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; position: relative; }
.vc::before, .vc::after { content: ""; position: absolute; left: 70px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); z-index: 1; }
.vc::before { top: -9px; } .vc::after { bottom: -9px; }
.vbadge { display: grid; align-content: center; justify-items: center; gap: 2px; padding: 10px 6px; color: #fff; text-align: center; background: linear-gradient(160deg, #ff5a2b, #ff9a1f); }
.vbadge b { font-size: 22px; font-weight: 900; line-height: 1.05; letter-spacing: -.3px; }
.vbadge small { font-size: 10.5px; font-weight: 800; letter-spacing: .8px; opacity: .92; }
.vbadge.freeship { background: linear-gradient(160deg, #10b981, #0ea5a4); }
.vbadge.cashback { background: linear-gradient(160deg, #f59e0b, #d97706); }
.vbadge.other { background: linear-gradient(160deg, #6366f1, #8b5cf6); }
.vl { display: grid; gap: 4px; padding: 12px 12px 12px 18px; min-width: 0; align-content: center; }
.vcode { font: 800 16px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .5px; color: var(--orange); overflow-wrap: anywhere; }
.vt { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.vm { color: var(--mute); font-size: 12.5px; line-height: 1.35; }
.vbar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 2px; }
.vbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.vuse { display: flex; justify-content: space-between; font-size: 12px; color: var(--mute); font-weight: 600; }
.vact { display: grid; align-items: center; padding: 0 12px 0 4px; }
.vcopy { border: 0; border-radius: 12px; min-height: 42px; padding: 0 14px; font: inherit; font-weight: 800; font-size: 14px; color: var(--on-accent); background: linear-gradient(135deg, var(--yellow), var(--orange)); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.vcopy:active { transform: scale(.96); }
.vcopy.done { background: var(--green); color: #04210f; }
.vc.sold { opacity: .55; filter: grayscale(.8); }
.vc.sold .vcode { color: var(--mute); text-decoration: line-through; }
.stamp { font-size: 12px; font-weight: 900; color: var(--red); border: 2px solid var(--red); border-radius: 8px; padding: 3px 8px; transform: rotate(-8deg); white-space: nowrap; }
.w0 { width: 0; } .w10 { width: 10%; } .w20 { width: 20%; } .w30 { width: 30%; } .w40 { width: 40%; } .w50 { width: 50%; }
.w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; } .w100 { width: 100%; }
.vempty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 26px 14px; border: 1.5px dashed var(--line); border-radius: 18px; color: var(--mute); }
.vempty b { color: var(--text); font-size: 17px; }
.vempty p { font-size: 14px; max-width: 360px; }
.eic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; color: var(--on-accent); background: linear-gradient(135deg, var(--yellow), var(--orange)); }

@media (min-width: 960px) {
  .grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) !important; }
  .grid:not(.hasv) { grid-template-columns: minmax(0, 680px) !important; justify-content: center; }
  .col-side { position: static !important; }
}
@media (max-width: 959px) { .grid.hasv .col-side { order: -1; } }
@media (max-width: 639px) {
  .vc { grid-template-columns: 62px 1fr auto; } .vc::before, .vc::after { left: 54px; } .vbadge b { font-size: 18px; } .vbadge small { font-size: 9.5px; letter-spacing: .4px; }
  .vl { padding: 11px 8px 11px 12px; } .vcode { font-size: 13.5px; white-space: nowrap; overflow-wrap: normal; }
  .vact { padding-right: 10px; } .vcopy { padding: 0 11px; min-height: 40px; font-size: 13px; }
}
