/* ===== CSS VARIABLES ===== */
:root {
  /* Brand blues */
  --color-primary: #005DF8;
  --color-primary-alt: #0068F9;
  --color-footer-bg: #0050D7;
  --color-reward-gradient-start: #1E4FD8;
  --color-reward-gradient-end: #0A1C4D;
  --color-btn-gradient-start: #143A88;
  --color-btn-gradient-end: #0A2263;
  --color-download-app-bg: #0B1F45;
  --color-download-item-text: #081A47;
  --color-hero-bg: #161920;
  --color-tick: #171B26;
  --color-eyebrow: #414A5E;
  --color-check-icon: #63C8FF;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-text-secondary: #6B7280;
  --color-bg-light: #F4F4F4;
  --color-border-light: #EEF1F6;
  --color-text-dark: #1F2937;
  --color-download-app-label: #3A4459;
  --color-muted-blue-gray: #A9B6CE;

  /* Accents */
  --color-accent-yellow: #FFD147;
  --color-accent-gold: #FFC92E;
  --color-btn-border-gold: #E2B44E;
  --color-success-green: #2BF07A;

  /* Shadows & glows */
  --shadow-card: rgba(15, 23, 42, 0.08);
  --shadow-btn: rgba(0, 0, 0, 0.3);
  --shadow-btn-hover: rgba(0, 0, 0, 0.38);
  --shadow-text: rgba(0, 0, 0, 0.4);
  --shadow-text-soft: rgba(0, 0, 0, 0.45);
  --shadow-item-hover: rgba(0, 0, 0, 0.28);
  --glow-white-soft: rgba(255, 255, 255, 0.4);
  --glow-white-strong: rgba(255, 255, 255, 0.7);
  --glow-blue-soft: rgba(130, 190, 255, 0.5);
  --glow-blue-strong: rgba(130, 190, 255, 0.9);
  --glow-purple-soft: rgba(180, 100, 255, 0.35);
  --glow-purple-strong: rgba(180, 100, 255, 0.7);
  --glow-link-icon: rgba(70, 190, 255, 0.5);
  --glow-link-name: rgba(90, 175, 255, 0.75);
  --glow-success: rgba(43, 240, 122, 0.45);
  --glow-gold: rgba(255, 209, 71, 0.6);
  --border-white-faint: rgba(255, 255, 255, 0.18);
  --border-blue-faint: rgba(120, 180, 255, 0.22);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* DESKTOP CSS */
/* overflow-x:hidden lives on body ONLY. Putting it on html too makes html
   opt out of propagating body's overflow to the viewport (per the CSS
   overflow spec's "propagation to viewport" rule) — so body ends up as its
   own internal overflow-y:auto scroll container instead of the page
   scrolling normally at the viewport level (window.scrollY stays 0,
   document.scrollingElement.scrollHeight never grows, full-page screenshots
   render blank past the first viewport). Keeping it on body alone lets the
   propagation happen as intended: horizontal clipping without hijacking
   vertical scroll. */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

body {
  overflow-x: hidden;
}

.header {
  width: 100%;
  line-height: 0;
  overflow: hidden;
  margin-bottom: -2px;
}

.top-desktop {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.top-mobile {
  display: none;
  width: 100%;
  height: auto;
  margin-bottom: -3px;

  image-rendering: auto;
  -webkit-image-rendering: auto;
  object-fit: cover;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.desktop {
  display: flex;
  flex-direction: column;
  /*min-height: 100vh;*/
  width: 100%;
  margin: 0;
  padding: 0;

  background-color: var(--color-hero-bg);
  background-image: url("./images/background.png");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;

  position: relative;
  overflow-y: auto;
}

/* ===== HERO / LOGO / SIDE SOCIAL RAIL ===== */
.menu-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1520px;
  margin: 10px auto 80px;
  justify-content: center;
}

.title-img {
  display: inline-flex;
  height: clamp(52px, 7.5vw, 130px);
  width: auto;
  /*animation: logo-bounce 2.6s ease-in-out infinite;*/
}

@keyframes logo-bounce {
  0%, 100% {
    /*transform: scale(1);*/
    /*filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.65));*/
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 6px var(--glow-white-soft)) drop-shadow(0 0 14px var(--glow-blue-soft)) drop-shadow(0 0 24px var(--glow-purple-soft));
  }
  50% {
    /*transform: scale(1.05);*/
    /*filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85));*/
    opacity: 1;
    transform: scale(1.045);
    filter: drop-shadow(0 0 16px var(--glow-white-strong)) drop-shadow(0 0 32px var(--glow-blue-strong)) drop-shadow(0 0 55px var(--glow-purple-strong));
  }
}

.title-group {
  width: 100%;
  text-align: center;
  margin-top: 12px;
  margin-bottom: 58px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0vh;
}

.social-icons {
  position: fixed;
  right: 2vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: -3.5vh;
  z-index: 100;
}

.social-icon {
  width: clamp(50px, 4vw, 140px);
  height: clamp(50px, 5vw, 140px);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  /* transform: scale(1.1); */
}

.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== LINK CARDS ===== */
.link-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 0;
}

.link-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.link-item {
  width: 100%;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
  container-type: inline-size;
}

.link-item:hover {
  transform: translateY(-4px);
  filter: brightness(1.15);
}

.link-card {
  position: relative;
  width: 100%;
  aspect-ratio: 312 / 146;
  background: url("./images/link-bg.png") center center / 100% 100% no-repeat;
}

.link-card-head {
  position: absolute;
  /* top:24.5% (chỉnh sau, không rõ bởi đâu) ăn gần hết khoảng trống phía
     trên nút CONNECTING (top:62.5%) — ở mobile, khi chữ ms giãn tới mức
     trần + 3 chữ số ("999ms"), khối head cao thêm vài px là đủ đè lên nút,
     vỡ layout. Sau khi tăng gap giữa LINK N/ms (.link-card-info), khối head
     cao hơn nên hạ tiếp xuống 14% để luôn còn khoảng hở an toàn (~3px+) ở
     mọi bề rộng, kể cả 320px với "999ms" (đã đo bằng Playwright). */
  top: 18%;
  /* left/right BẰNG với .link-btn (16%/16%) để bề rộng khối head khớp bề
     rộng nút CONNECTING, và đối xứng để khối head luôn nằm giữa link-card
     theo chiều ngang — trước đây left:22%/right:5% lệch tâm khiến khối
     icon+text bị dồn về phía trái-lệch, để trống mảng lớn bên phải khi
     text ngắn. */
  left: 16%;
  right: 16%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  gap: 4.5cqi;
}

.link-globe {
  width: 55px;
  width: 14.5cqi;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 4px var(--glow-link-icon));
}

/* Vạch phân cách dọc giữa icon globe và khối LINK N / speed, theo đúng
   hình mẫu — kéo dài hết chiều cao của khối head nhờ align-self:stretch
   (bằng chiều cao .link-card-info, vì globe hình vuông thường thấp hơn). */
.link-divider {
  align-self: stretch;
  width: 2px;
  flex-shrink: 0;
  background: linear-gradient(
    180deg,
    rgba(102, 195, 255, 0) 0%,
    rgba(102, 195, 255, 0.9) 15%,
    rgba(160, 220, 255, 0.95) 50%,
    rgba(102, 195, 255, 0.9) 85%,
    rgba(102, 195, 255, 0) 100%
  );
  box-shadow: 0 0 6px var(--glow-link-icon);
}

.link-card-info {
  display: flex;
  flex-direction: column;
  /* Giãn thêm một chút giữa LINK N và dòng ms (trước 0.8cqi quá sát). */
  gap: 5px;
  gap: 2.9cqi;
  min-width: 0;
}

.link-name {
  color: var(--color-white);
  font-weight: bolder;
  font-size: 29px;
  font-size: 8.2cqi;
  line-height: 1.05;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-shadow: 0 0 10px var(--glow-link-name), 0 2px 3px var(--shadow-text-soft);
}

.link-speed {
  display: flex;
  flex-direction: row;
  /* Canh đáy (không phải giữa) để icon cột sóng và chữ ms cùng nằm trên một
     baseline, thay vì canh theo tâm hộp dòng. */
  align-items: flex-end;
  /* .link-card-info stretch cả link-name lẫn link-speed cùng một bề rộng —
     flex-start (mặc định) để mép trái dòng SPEED luôn thẳng hàng với mép
     trái chữ LINK X phía trên, trên mọi breakpoint. */
  justify-content: flex-start;
  color: var(--color-success-green);
  font-weight: 700;
  font-size: 11px;
  font-size: 4.3cqi;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 8px var(--glow-success);
}

.link-speed i {
  display: inline-flex;
  align-items: flex-end;
  margin-right: 4px;
  margin-right: 1.6cqi;
  /* Nhỏ lại so với trước (1.7em → 1.3em), bớt lấn át chữ ms. */
  font-size: 1.3em;
  position: relative;
  /* Nhích nhẹ lên để đáy các cột sóng khớp sát baseline chữ ms — chỉ cần
     rất ít vì .link-speed đã canh flex-end (đáy hộp dòng). */
  top: -0.05em;
  /* fa-solid đã là weight 900 (đậm nhất Font Awesome có) nên font-weight
     không tăng thêm được nữa. Giả lập đậm hơn bằng cách "tô viền" quanh
     glyph cùng màu — dùng em để tỉ lệ viền giữ nguyên khi icon co giãn. */
  -webkit-text-stroke: 0.035em currentColor;
}

.link-ms {
  color: var(--color-success-green);
  font-weight: 700;
  transition: opacity 0.3s ease;
  /* Lớn hơn trước (0.72em → 0.95em) để cân đối hơn với icon đã thu nhỏ. */
  font-size: 0.95em;
}

.link-btn {
  position: absolute;
  left: 16%;
  right: 16%;
  top: 62.5%;
  height: 27.5%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  /*background: linear-gradient(180deg, rgba(70, 150, 255, 0.5) 0%, rgba(18, 86, 224, 0.62) 100%);
  box-shadow: inset 0 1px 0 rgba(190, 224, 255, 0.5), 0 0 10px rgba(48, 132, 255, 0.45);*/
  color: var(--color-white);
  font-weight: 700;
  font-size: 16px;
  font-size: 5.1cqi;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px var(--shadow-text);
}

.link-btn i {
  position: absolute;
  right: 6%;
  font-size: 0.85em;
  opacity: 0.95;
}

/* CHECK SPEED */
.check-speed-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 275px;
  padding: 13px 30px;
  border-radius: 999px;
  border: 1.5px solid var(--color-btn-border-gold);
  background: linear-gradient(180deg, var(--color-btn-gradient-start) 0%, var(--color-btn-gradient-end) 100%);
  color: var(--color-white);
  font-family: inherit;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--shadow-btn);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.check-speed-btn i {
  color: var(--color-check-icon);
  font-size: 18px;
}

.check-speed-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-btn-hover);
}

/* ===== HERO CONTENT LAYOUT (badge / heading / links / speed / banner) ===== */
.section-desktop {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
}

.section-left {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.section-download {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.section-download-left {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.section-download-right {
  width: 48%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.item-verify img {
  width: 100%;
  max-width: 253px;
  height: auto;
  display: block;
  object-fit: contain;
}

.item-verify {
  display: none;
  margin-bottom: 40px;
}

/* -- Download app panel (iOS / QR / Android buttons) -- */
.section-download-app {
  width: 100%;
}

.banner-right {
  text-align: center;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.banner-right img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* Social Buttons */
/* Grid of 3 columns x 2 rows (3 on top, 3 on bottom). The row wrappers use
   display:contents so their <a> children become direct grid items and lay
   out in DOM order without needing manual per-item positioning. */
.social {
  display: none;
  width: clamp(240px, 92vw, 442px);
  margin: 0 auto;
}

.social-row-top,
.social-row {
  display: contents;
}

.social-btn-link {
  aspect-ratio: 105 / 107;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.social-btn-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.social-btn-link:hover {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* ===== TEXT UTILITY CLASSES ===== */
.title {
  font-size: 40px;
  font-weight: bold;
}

.title-1 {
  font-size: 24px;
  font-weight: bolder;
}

.text-yellow {
  color: var(--color-accent-yellow);
}

.text-blue {
  color: var(--color-primary-alt);
}

.text-center {
  text-align: center;
}

.font-bold {
  font-weight: bold;
}

/* ===== SEO CONTENT WRAPPER ===== */
/*.seo {*/
/*  background: url("../images/bg-seo.png") no-repeat center center;*/
/*}*/

.seo-container {
  background: var(--color-bg-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 10px 80px 80px;
}

.seo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flex-row-center-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.flex-column-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.flex-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* SEO SECTION 1 */
.seo-1 {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.seo-1-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  width: 100%;
}

.seo-1-1-img {
  width: 100%;
  height: 100%;
  flex: 1;
}

.seo-1-1-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.seo-1-desktop {
  display: block;
}

.seo-1-mobile {
  display: none;
}

/* ===== LIGHT-THEME PANEL (intro + benefits) ===== */
/* Scoped to .hl-* classes only — must never leak into the dark-theme
   sections (games / promotions / mobile access / conclusion) that reuse
   .title, .text-blue, .text-white, .seo-2-card-title, etc. */
.hl-panel {
  width: 100%;
  max-width: 1290px;
  margin: 0 auto;
}

.hl-panel img {
  width: auto;
  height: auto;
}

/* -- Intro block -- */
.hl-intro {
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  padding: 48px 10px 40px;
}

.hl-intro .seo-1-column {
  gap: 18px;
}

.hl-eyebrow {
  display: block;
  color: var(--color-eyebrow);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 600;
}

.hl-tick {
  display: block;
  width: 46px;
  height: 3px;
  background: var(--color-tick);
}

.hl-heading {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(26px, 2.4vw, 46px);
  line-height: 1.22;
  color: var(--color-primary);
}

.hl-desc {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 600;
}

.hl-media {
  padding: 18px;
  align-items: center;
  justify-content: center;
}

.hl-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Only the desktop image participates in the row layout — the mobile
   image keeps its existing display:none/.block toggle (defined with
   .seo-1-desktop / .seo-1-mobile) untouched by .hl-media. */
.hl-intro .seo-1-desktop.hl-media {
  flex: 0.85 1 0;
  align-self: stretch;
  display: flex;
}

/* -- Benefits block -- */
.hl-benefits {
  padding: 48px 10px 40px;
  gap: 14px;
}

.hl-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.3;
  color: var(--color-primary);
}

.hl-subtitle {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.hl-cards {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 12px;
}

.hl-card {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 28px;
  background: var(--color-white);
  border-radius: 18px;
  box-shadow: 0 10px 26px var(--shadow-card);
  text-align: left;
}

/* Prefixed with .hl-panel to out-specificity ".hl-panel img { width/height: auto }"
   above — otherwise that rule wins and the icon renders at its native pixel size. */
.hl-panel .hl-card-icon {
  flex: 0 0 auto;
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.hl-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hl-card-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.3;
  color: var(--color-primary);
}

.hl-card-text {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

/* -- Small 2-column cards (Lightning / About BC8 architecture) -- */
.hl-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.hl-card-sm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--color-white);
  border-radius: 18px;
  box-shadow: 0 10px 26px var(--shadow-card);
  text-align: left;
}

.hl-card-sm-icon {
  color: var(--color-primary);
  font-size: 22px;
  margin-bottom: 4px;
}

.hl-card-sm-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  color: var(--color-primary);
}

.hl-card-sm-text {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

/* -- Gaming showcase panel (light gray, sits below the white hl-panel) -- */
.hl-panel-gray {
  background: var(--color-bg-light);
}

.hl-gaming {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 48px 10px 40px;
}

.hl-gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 12px;
}

.hl-gallery-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: 18px;
  box-shadow: 0 10px 26px var(--shadow-card);
  overflow: hidden;
}

.hl-gallery-card img {
  width: 100%;
  object-fit: cover;
}

.hl-gallery-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 26px;
}

.hl-gallery-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  color: var(--color-primary);
}

.hl-gallery-text {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

/* -- Reward cards (2-column variant of hl-gallery) -- */
.hl-gallery-2col {
  grid-template-columns: 1fr 1fr;
}

.hl-reward-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, var(--color-reward-gradient-start) 0%, var(--color-reward-gradient-end) 75%);
}

.hl-reward-banner i {
  font-size: 46px;
  color: var(--color-accent-yellow);
  filter: drop-shadow(0 0 14px var(--glow-gold));
}

/* -- Game category table -- */
.hl-table-wrap {
  width: 100%;
  margin-top: 12px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--color-white);
  box-shadow: 0 10px 26px var(--shadow-card);
}

.hl-table {
  width: 100%;
  border-collapse: collapse;
}

.hl-table th {
  background: var(--color-primary);
  color: var(--color-white);
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  padding: 18px 20px;
  border-right: 1px solid var(--border-white-faint);
}

.hl-table th:last-child {
  border-right: none;
}

.hl-table td {
  text-align: center;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border-light);
}

.hl-table td:first-child {
  font-weight: 700;
  color: var(--color-text-dark);
}

/* ===== FOOTER ===== */
.footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background: var(--color-footer-bg);
  padding: 20px 0;
  /*width: 100%;*/
  /*height: 100%;*/
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  box-sizing: border-box;
}

.footer-content img {
  width: calc(10% - 11px);
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
  transform-origin: center;
}

.footer-content img:hover {
  transform: scale(1.08);
}

.footer-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px;
  margin-top: 20px;
}

.footer-end img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
  transform-origin: center;
  margin: 0 5px;
}

.footer-end img:hover {
  transform: scale(1.08);
}

.footer-end-content {
  display: flex;
  justify-content: center;
  margin: 0 3px;
}

.footer-copyright {
  color: var(--color-white);
  font-size: clamp(11px, 3.2vw, 20px);
  text-align: center;
  white-space: nowrap;
  width: 100%;
}

.mw-1300 {
  max-width: 1290px;
}

.download-app {
  margin-top: 0;
  max-width: 633px;
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 13px;
  padding: 14px 23px;
  justify-content: flex-start;
  align-items: center;

  border: 1px solid var(--border-blue-faint);
  border-radius: 18px;
  background: var(--color-download-app-bg);
  box-shadow: 0 8px 26px var(--shadow-btn);
}

.download-app-title {
  flex-shrink: 0;
  margin-right: auto;
  line-height: 1.15;
}

.download-app-title p {
  font-size: 17px;
  letter-spacing: 0.3px;
}

.download-app .secure {
  display: block;
  margin-top: 6px;
  color: var(--color-muted-blue-gray);
  font-size: 10px;
  white-space: nowrap;
}

.download-app-qr {
  flex-shrink: 0;
  width: 92px;
  line-height: 0;
}

.download-app-item img {
  object-fit: cover;
}

.download-app-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 165px;
  justify-content: center;
  background: var(--color-white);
  padding: 8px 16px;
  border-radius: 12px;
  color: var(--color-download-item-text);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-app-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-item-hover);
}

.icon-down {
  width: 20px;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

/* Logo Apple bo tròn dồn phần lá mỏng lên đỉnh và phần thân đặc ở dưới, nên
   dù bounding-box đã canh giữa hàng (giống icon Android), mắt vẫn thấy nó
   lệch xuống so với chữ "iOS". Nhích lên vài % chiều cao của chính icon
   (translateY theo %, không phải px, để tự co giãn đúng ở mọi breakpoint)
   để cân bằng thị giác với text bên cạnh. */
.icon-apple {
  transform: translateY(-14%);
}

.download-app-item-text {
  display: flex;
  align-items: center;
  line-height: 1;
}

/* "Download on the" / "Get it for" bỏ hiển thị trên mọi breakpoint — chỉ còn
   icon + tên nền tảng (iOS/Android), canh giữa trong box nhờ
   .download-app-item đã có justify-content:center sẵn. */
.title-download-app {
  display: none;
}

.title-download-platform {
  font-size: 22px;
  line-height: 1;
  color: var(--color-download-item-text);
  white-space: nowrap;
}

.conclusion-title {

}

.conclusion-desc {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.3;
}

.qr-code {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid var(--color-accent-gold);
  background: var(--color-white);
  padding: 3px;
}

/* LAPTOP NHỎ (1025PX - 1290PX): .menu-container không có padding (chỉ auto-center
   qua .mw-1300 khi viewport > 1290px) trong khi .seo-container vẫn giữ 80px cố định
   => lệch padding trái/phải rõ rệt. Đồng bộ cả hai về cùng một giá trị co giãn. */
@media (min-width: 1025px) and (max-width: 1290px) {
  .menu-container {
    padding: 0 2.5%;
  }

  .seo-container {
    padding-left: 2.5%;
    padding-right: 2.5%;
  }

  /* LAPTOP NHỎ / NEST HUB MAX (1280x800): .section-download-left chỉ còn ~50%
     bề rộng nên .download-app (title + 2 nút + QR) sát mép, dễ đè lên nhau.
     Giảm gap/padding và bỏ nowrap ở dòng "Fast install..." để chữ xuống dòng
     thay vì tràn ra ngoài. */
  .download-app {
    gap: clamp(2px, calc(2px + (100vw - 1025px) * 0.02264), 8px);
    padding: 12px clamp(6px, calc(6px + (100vw - 1025px) * 0.03774), 16px);
  }

  .download-app-title p {
    font-size: 15px;
  }

  .download-app .secure {
    white-space: normal;
    font-size: 9px;
  }

  /* min-width GIỮ CỐ ĐỊNH 150px cho cả 2 box (đủ rộng cho "Android" — chữ
     dài hơn "iOS") để luôn bằng nhau; phần co giãn theo bề rộng màn hình để
     tránh tràn nằm ở gap/padding/QR, không phải ở min-width. */
  .download-app-item {
    min-width: 150px;
    padding: 8px clamp(4px, calc(4px + (100vw - 1025px) * 0.03019), 12px);
  }

  .download-app-qr {
    width: clamp(56px, calc(56px + (100vw - 1025px) * 0.11321), 86px);
  }
}

/* MÀN HÌNH NHỎ (MAX-WIDTH: 1024PX) */
@media (max-width: 1024px) {
  /* ---- Stacked layout: logo > heading > links > check speed > banner > app > social ---- */
  .section-desktop {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .menu-container {
    padding: 0 2.5%;
  }

  .section-left {
    gap: 0;
    align-items: center;
  }

  .section-download,
  .section-download-left {
    display: contents;
  }

  .title-group {
    order: 1;
    margin: 20px 0 40px;
  }

  .link-section {
    order: 3;
    width: 100%;
    margin-top: 0;
    gap: 22px;
  }

  .link-items {
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
  }

  .check-speed-btn {
    min-width: 0;
    width: 56%;
    max-width: 320px;
    padding: 12px 16px;
    font-size: 15px;
    gap: 8px;
  }

  .check-speed-btn i {
    font-size: 16px;
  }

  .section-download-right {
    order: 4;
    width: 100%;
    margin-top: 15px;
    justify-content: center;
  }

  .banner-right img {
    width: 94%;
    max-width: 100%;
    margin: 0 auto;
  }

  /* .section-download-app là container query context cho toàn bộ khối
     .download-app bên dưới — mọi kích thước (gap/padding/QR/icon/font) đều
     co giãn theo cqi (% bề rộng của chính container này) bằng clamp(min,
     giá trị-co-giãn,max). Nhờ vậy MỘT rule duy nhất tự thích ứng mượt với
     mọi bề rộng thiết bị (điện thoại nhỏ → tablet 640px), không cần thêm
     media query riêng cho từng dòng máy như trước. */
  .section-download-app {
    order: 5;
    width: 100%;
    margin-top: 8px;
    display: flex;
    justify-content: center;
    container-type: inline-size;
  }

  .download-app {
    display: flex;
    width: 94%;
    max-width: 94%;
    align-items: center;
    justify-content: space-between;
    gap: clamp(2px, 1cqi, 10px);
    padding: clamp(10px, 3.4cqi, 22px) clamp(6px, 2.4cqi, 16px);
    border-radius: clamp(14px, 3.1cqi, 20px);
  }

  .download-app-title {
    display: none;
  }

  /* min-width ép cả 2 box (iOS ngắn / Android dài) rộng bằng nhau — canh
     theo đúng bề rộng tự nhiên của box "Android" (chữ dài hơn) ở mọi cqi,
     box "iOS" ngắn hơn sẽ được justify-content:center (đã có sẵn) giãn đều
     ra cho khớp. */
  .download-app-item {
    flex: 0 0 auto;
    min-width: clamp(66px, 30cqi, 178px);
    gap: clamp(2px, 1cqi, 6px);
    padding: clamp(4px, 1.1cqi, 8px) clamp(5px, 1.6cqi, 10px);
    border: 2px solid var(--color-accent-gold);
    border-radius: clamp(10px, 2.2cqi, 14px);
  }

  .download-app-qr {
    flex: 0 0 auto;
    width: clamp(58px, 23cqi, 145px);
    align-self: center;
  }

  /* icon-down dùng CHUNG công thức clamp với title-download-platform để
     logo và chữ luôn cùng kích thước ở mọi cqi — tránh logo to/nhỏ hơn chữ
     như trước (icon-down từng lớn hơn hẳn font-size). */
  .icon-down {
    width: clamp(13px, 4.3cqi, 26px);
    max-width: clamp(13px, 4.3cqi, 26px);
  }

  .title-download-platform {
    font-size: clamp(13px, 4.3cqi, 26px);
  }

  /* Social diamonds 3 x 2 */
  .social {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 15px;
    width: 84%;
    max-width: 420px;
    margin: 33px auto 40px;
  }

  .social-icons {
    display: none;
  }

  .desktop {
    background: url('./images/background-h5.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .title {
    font-size: 16px;
    text-align: center;
  }

  .title-1 {
    font-size: 17px;
    text-align: center;
  }

  .seo-container {
    gap: 16px;
    padding: 16px;
  }

  /* -- Light panel (intro + benefits) on tablet/mobile -- */
  .hl-panel {
    border-radius: 18px;
  }

  .hl-intro {
    flex-direction: column;
    gap: 20px;
    padding: 24px 0 28px;
  }

  .hl-intro .seo-1-desktop.hl-media {
    display: none;
  }

  .hl-intro .seo-1-mobile.hl-media {
    display: flex;
    width: 100%;
  }

  .hl-heading {
    font-size: clamp(22px, 5.5vw, 30px);
  }

  .hl-benefits {
    padding: 28px 0 32px;
  }

  .hl-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }

  .hl-panel .hl-card-icon {
    width: 100%;
    height: auto;
    align-self: center;
  }

  .hl-card-title {
    font-size: 19px;
  }

  .hl-cards-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hl-card-sm {
    padding: 20px;
  }

  .hl-gaming {
    padding: 28px 0 32px;
  }

  .hl-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hl-table-wrap {
    overflow-x: auto;
  }

  .hl-table {
    /*min-width: 480px;*/
  }

  .hl-table th,
  .hl-table td {
    padding: 14px 12px;
    font-size: 13px;
  }

  .flex-column-center {
    gap: 16px;
  }

  .flex-row-center-between {
    gap: 16px;
  }

  .seo-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }

  .seo-1-desktop {
    display: none;
  }

  .seo-1-mobile {
    display: flex;
    text-align: center;
    justify-content: center;
  }

  .seo-1-1-img img {
    width: 60%;
    height: 60%;
    object-fit: contain;
  }

  .seo-1-column {
    align-items: center;
    gap: 16px;
  }

  .seo-5 .title-1 {
    font-size: 12px;
  }
}

/* MÁY TÍNH BẢNG (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .menu-container {
    margin-bottom: 10px;
  }

  /* .seo-container mặc định 16px ở block <=1024px, đè lại left/right cho khớp
     với .menu-container (2.5%) để padding trái/phải đều nhau trên tablet. */
  .seo-container {
    padding-left: 2.5%;
    padding-right: 2.5%;
  }

  /* width:100% (kế thừa từ block <=1024px) quá to trên tablet — thu lại
     theo đúng tỉ lệ mà .seo-1-1-img img đang dùng ở cùng breakpoint. */
  .hl-panel .hl-card-icon {
    width: 60%;
    height: auto;
  }

  .top-desktop {
    display: none;
  }

  .top-mobile {
    display: block;
  }

  .section-left {
    max-width: 640px;
  }

  .title-img {
    height: clamp(66px, 14vw, 100px);;
  }

  .title-group {
    margin: 30px 0 56px;
  }

  .link-section {
    gap: 28px;
  }

  .link-items {
    gap: 16px;
  }

  .check-speed-btn {
    width: 55%;
    max-width: 360px;
    padding: 14px 20px;
    font-size: 18px;
  }

  .check-speed-btn i {
    font-size: 19px;
  }

  .section-download-right {
    margin-top: 28px;
  }

  .section-download-app {
    margin-top: 22px;
  }

  /* Tablet: item cao hơn (padding dọc tăng) và QR to hơn, gần 2 nút hơn.
     Ghi đè riêng cho tablet (thay vì tăng hệ số cqi ở rule chung) vì rule
     chung còn phải phục vụ mobile — tăng hệ số ở đó sẽ làm QR to hơn cả ở
     điện thoại nhỏ (iPhone 4 320px) và gây tràn trở lại. Container của
     .section-download-app luôn = 640px trong dải 768-1024px (do
     .section-left giới hạn max-width:640px ở trên) nên dùng px cố định an
     toàn, không cần cqi. */
  .download-app-item {
    min-width: 190px;
    padding: 16px 12px;
  }

  .download-app-qr {
    width: 175px;
  }

  .social {
    width: 84%;
    max-width: 560px;
    gap: 18px 22px;
    margin: 46px auto 56px;
  }

  /* Tablet has room for 2 columns — only mobile drops to 1 */
  .hl-cards-row {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .hl-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  /* Only the 3-card gallery has a leftover odd card — the 2-card
     reward gallery (.hl-gallery-2col) must keep its plain 2-up grid. */
  .hl-gallery:not(.hl-gallery-2col) .hl-gallery-card:last-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
  }

  .hl-gallery:not(.hl-gallery-2col) .hl-gallery-card:last-child img {
    width: 42%;
    height: auto;
    flex-shrink: 0;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .hl-gallery:not(.hl-gallery-2col) .hl-gallery-card:last-child .hl-gallery-body {
    flex: 1;
    justify-content: center;
  }
}

/* MOBILE (<= 767px) */
@media (max-width: 767px) {
  .menu-container {
    margin-bottom: 10px;
  }

  /* Ở mobile, .link-item khá hẹp (2 cột) nên 3.6cqi (giá trị dùng chung
     desktop/tablet) ra chữ SPEED quá nhỏ (~6-9px), khó đọc. Tăng hệ số cqi
     và đặt sàn/trần rõ ràng bằng clamp để chữ luôn đủ lớn mà vẫn co giãn
     theo bề rộng thẻ, không tràn ra ngoài card. */
  .link-speed {
    font-size: clamp(11px, 6cqi, 14px);
  }

  .top-desktop {
    display: none;
  }

  .top-mobile {
    display: block;
  }

  .title-img {
    height: clamp(50px, 15vw, 82px);
  }

  .seo-1-1-img img {
    width: 100% !important;
  }
}

/* ĐIỆN THOẠI HẸP (<= 320PX) */
@media (max-width: 320px) {
  .menu-container {
    margin-bottom: 0px;
  }

  .check-speed-btn {
    width: 60%;
  }
}

