/* ==========================================================
   BUM789 – trang đăng ký. Style theo Landing (E:\Bum789\Landing):
   cùng font, màu, nền hero, pill, khung panel và nút CTA.
   ========================================================== */

@font-face {
  font-family: "UTM Avo";
  src: url("../fonts/utm-avo.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "UTM Avo";
  src: url("../fonts/utm-avobold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000712;
  --white: #fff;
  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .62);
  --gold-bar: #fbd494;
  --blue: #2f8cff;
  --blue-line: rgba(71, 136, 201, .6);
  --field-bg: rgba(2, 10, 30, .78);
  --error: #ff8a8a;
  --info: #9cc8ff;
  --container: 1208px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg) url("../img/hero-bg.jpg") center top / 1920px 1160px no-repeat;
  color: var(--white);
  font-family: "UTM Avo", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 700; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- gold gradient text (giống Landing) ---------- */
.gold-1, .gold-2, .gold-3 {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f4dca7;
}
.gold-2 { background-image: linear-gradient(180deg, #fffff8 0%, #fefaba 47%, #ebbf70 74%, #f8cc7e 100%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.gold-3 { background-image: linear-gradient(180deg, #f8e7ae 0%, #e8be49 60%, #ebaa39 100%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .28)); }

/* ---------- pill CSKH / Nhóm ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 122px;
  height: 38px;
  padding: 0 22px;
  border-radius: 19px;
  border: 2px solid var(--blue);
  background: linear-gradient(180deg, rgba(10, 32, 74, .75), rgba(3, 12, 34, .75));
  box-shadow: 0 0 10px rgba(47, 140, 255, .55), inset 0 0 8px rgba(47, 140, 255, .45);
  font-size: 14.4px;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 0 16px rgba(47, 140, 255, .9), inset 0 0 8px rgba(47, 140, 255, .6); }
.pill img { flex: none; }

/* ==========================================================
   KHUNG TRANG
   ========================================================== */
.page { padding: 21px 0 48px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 52px;
}
.logo img { width: 239px; }

.tagline {
  margin-top: -6px;
  text-align: center;
  font-size: 14px;
  line-height: 21px;
}

.reg-layout {
  display: grid;
  grid-template-columns: 1fr 430px;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
}

/* ---------- cột trái: ảnh + 3 điểm mạnh ---------- */
.reg-side { min-width: 0; }
.reg-visual { display: flex; justify-content: center; pointer-events: none; }
.reg-visual img { width: 720px; }

.perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 8px;
  border-left: 4px solid var(--gold-bar);
  background: linear-gradient(90deg, rgba(255, 253, 248, .06), rgba(255, 253, 248, 0));
}
.perks p { font-size: 13px; line-height: 18px; color: var(--text); }
.perks b { display: block; font-size: 15px; line-height: 21px; color: #fff; }
.num {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 46px;
  background: url("../img/num.png") center / contain no-repeat;
  font-weight: 700;
  font-size: 21px;
  line-height: 1;
}

/* ==========================================================
   THẺ ĐĂNG KÝ – khung panel.png của Landing, kéo giãn bằng border-image
   (giữ nguyên góc sáng + đường kẻ dưới tiêu đề)
   ========================================================== */
.reg {
  position: relative;
  width: 100%;
  padding: 0 26px 24px;
  border-image: url("../img/panel.png") 50 24 24 fill / 50px 24px 24px;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .55));
}
.reg__view.is-hidden { display: none; }
.reg__view { animation: regIn .35s ease; }
@keyframes regIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.reg__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  font-size: 20.3px;
  line-height: 1;
  letter-spacing: .3px;
}
.reg__title img { flex: none; }

.reg__form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }

/* ---------- ô nhập ---------- */
.field {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  border: 1.5px solid var(--blue-line);
  border-radius: 10px;
  background: var(--field-bg);
  box-shadow: inset 0 0 12px rgba(47, 140, 255, .12);
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 12px rgba(47, 140, 255, .55), inset 0 0 10px rgba(47, 140, 255, .3);
}
.field.is-error { border-color: var(--error); box-shadow: 0 0 10px rgba(255, 110, 110, .35); }
.field__ic {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0 10px 0 15px;
  fill: var(--gold-bar);
  opacity: .9;
}
.field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 12px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}
.field input::placeholder { color: rgba(255, 255, 255, .45); }
/* nền autofill của Chrome đè mất màu ô */
.field input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 40px #030d24 inset;
  caret-color: #fff;
}

/* nút hiện / ẩn mật khẩu */
.field__eye {
  flex: none;
  width: 44px;
  height: 100%;
  border: 0;
  background: center / 22px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbd494' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
  opacity: .8;
  cursor: pointer;
}
.field__eye.is-on {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbd494' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  opacity: 1;
}

/* captcha */
.field--captcha input { text-transform: uppercase; letter-spacing: 2px; }
.field--captcha input::placeholder { text-transform: none; letter-spacing: 0; }
.captcha {
  position: relative;
  flex: none;
  width: 103px;
  height: 40px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  overflow: hidden;
  background: #e9eef8;
  cursor: pointer;
}
.captcha img { width: 100%; height: 100%; object-fit: cover; }
.captcha img:not([src]) { visibility: hidden; }
.captcha__spin {
  position: absolute;
  right: 3px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(3, 12, 34, .75);
  color: var(--gold-bar);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}
.captcha.is-loading img { opacity: .35; }
.captcha.is-loading .captcha__spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* thông báo */
.reg__msg {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 90, 90, .1);
  border-left: 3px solid var(--error);
  color: var(--error);
  font-size: 13.5px;
  line-height: 20px;
}
.reg__msg.is-info { background: rgba(47, 140, 255, .1); border-left-color: var(--blue); color: var(--info); }

/* nút đăng ký – khung vàng của nút "Tải app Android" bên Landing */
.reg__submit {
  position: relative;
  height: 60px;
  margin-top: 4px;
  border: 0;
  background: url("../img/cta-android.png") center / 100% 100% no-repeat;
  color: #1a0c0a;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  transition: transform .2s, filter .2s;
}
.reg__submit:hover { transform: translateY(-2px); filter: brightness(1.1); }
.reg__submit:active { transform: translateY(1px); }
.reg__submit:disabled { cursor: progress; filter: saturate(.6) brightness(.85); transform: none; }
.reg__submit:focus-visible, .cta-btn:focus-visible, .pill:focus-visible, .captcha:focus-visible, .field__eye:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.reg__links { text-align: center; font-size: 14px; }
.reg__note + .reg__links { margin-top: 6px; }
.reg__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  color: var(--gold-bar);
  transition: opacity .2s;
}
.reg__links a:hover { opacity: .8; }
.reg__links img.flip { transform: scaleX(-1); }

/* ---------- màn thành công / tải app ---------- */
.reg__done {
  margin-top: 20px;
  text-align: center;
  font-size: 15px;
  line-height: 23px;
  color: var(--text);
}
.reg__done b { font-size: 17px; }

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
}
.cta-btn {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 330px;
  height: 63px;
  padding: 0 20px 0 26px;
  background: center / 100% 100% no-repeat;
  transition: transform .2s, filter .2s;
}
.cta-btn:hover { transform: translateY(-3px); filter: brightness(1.12); }
.cta-btn--web { background-image: url("../img/cta-web.png"); }
.cta-btn--android { background-image: url("../img/cta-android.png"); color: #1a0c0a; padding-left: 31px; }
.cta-btn--ios { background-image: url("../img/cta-ios.png"); }
.cta-btn span { flex: 1; text-align: center; line-height: 1; }
.cta-btn b { display: block; font-size: 16px; }
.cta-btn small { display: block; margin-top: 5px; font-size: 11px; }
.cta-btn--android small { color: #341c12; }
.cta-ic, .cta-arrow { flex: none; }
.show-ios .cta-btn--android,
.show-android .cta-btn--ios { display: none; }

.reg__note {
  padding-top: 12px;
  border-top: 3px solid var(--blue-line);
  font-size: 12.5px;
  line-height: 20px;
  text-align: center;
  color: var(--muted);
}
.reg__note a { color: var(--gold-bar); text-decoration: underline; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1100px) {
  .reg-layout { grid-template-columns: 1fr 400px; }
  .perks { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 860px) {
  body { background-size: auto 1160px; }
  .reg-layout { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 6px; }
  .reg-side { display: contents; }
  /* mobile: ảnh -> thẻ đăng ký -> điểm mạnh */
  .reg-visual { order: 1; margin: 0 -8px; }
  .reg-visual img { width: 100%; max-width: 560px; }
  .reg { order: 2; max-width: 440px; margin: 4px auto 0; }
  .perks { order: 3; width: 100%; max-width: 440px; margin-top: 24px; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .page { padding-top: 14px; }
  .topbar { gap: 12px; }
  .pill { width: auto; height: 34px; padding: 0 12px; font-size: 13px; gap: 6px; }
  .logo img { width: 150px; }
  .tagline { margin-top: 4px; font-size: 13px; line-height: 19px; }
  .reg { padding: 0 18px 20px; }
  .reg__title { font-size: 18px; }
  .reg__form { margin-top: 16px; gap: 10px; }
  .field { height: 48px; }
  .field input { font-size: 16px; } /* < 16px thì iOS tự phóng to khi bấm vào ô */
}

@media (prefers-reduced-motion: reduce) {
  .reg__view { animation: none; }
  .captcha.is-loading .captcha__spin { animation: none; }
}
