:root {
  --cyber-bg: #05070f;
  --cyber-bg-2: #0a0a1a;
  --cyber-text: #d5e0ff;
  --cyber-text-muted: rgba(213, 224, 255, 0.55);
  --cyber-border: rgba(123, 47, 247, 0.18);
  --cyber-cyan: #00f0ff;
  --cyber-magenta: #ff00e5;
  --cyber-purple: #7b2ff7;
  --cyber-green: #0aff9d;
  --cyber-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Alias — ProductAI & related pages use the --ai-* prefix */
  --ai-text: #d5e0ff;
  --ai-border: rgba(213, 224, 255, 0.12);
  --ai-text-muted: rgba(213, 224, 255, 0.55);
  /* Chieu cao that cua header AI (nav.navbar fixed-top): 79px (58px logo + padding + border).
     Truoc day logo chi co width, height:auto -> luc anh chua tai xong header tut con 49px
     va lo dai trang 31px. Nay logo co height co dinh nen header luon 79px. */
  --ai-header-h: 80px;
  /* Font tron cho headline: Nunito 800 self-host (latin subset ~16KB, xem guest/partials/stylesheet).
     Fallback u-rounded/Quicksand de van tron tren may khong tai duoc font. */
  --ai-font-display: 'Nunito', 'Avenir Next', ui-rounded, 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

.ai-app {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--cyber-bg);
  color: var(--cyber-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.ai-main { min-height: 100vh; }

/* `overflow-x: hidden` bien .ai-app thanh scroll container -> lam vo `position: sticky`
   cua moi element con (vd. toolbar loc san pham). `clip` khong tao scroll container. */
@supports (overflow: clip) {
  .ai-app { overflow-x: clip; }
}

/* ===== TEMPLATE AI: bu margin-top dung bang chieu cao header that =====
   Header fixed-top khong chiem layout. Truoc day hardcode 80px trong khi header
   chi cao 49px/52px -> du 31px/28px lo nen body sang thanh "dai trang" khi scroll. */
.main--top.template-ai {
  margin-top: var(--ai-header-h, 80px);
}

/* Header fixed-top không chiếm layout — bù padding cho nội dung không bị đè / dư trắng */
.ai-header--glass {
  padding-top: 0;
  padding-bottom: 0;
}
.ai-header--glass .navbar {
  min-height: 0;
}
.ai-header--glass .navbar-brand {
  margin: 0;
  padding: 6px 0;
}
/* Chot chieu cao logo: truoc day height:auto nen khi anh chua tai xong header tut tu 79px
   xuong 49px -> dut layout va lo nen sang duoi header. object-fit giu dung ty le. */
.ai-header--glass .navbar-brand img {
  height: 58px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

/* ===== HEADER GLASS ===== */
.ai-header--glass {
  background: linear-gradient(180deg, rgba(5, 9, 24, 0.96) 0%, rgba(6, 11, 28, 0.9) 60%, rgba(5, 9, 24, 0.55) 100%) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.06) !important;
}
.ai-header--glass .navbar-brand img {
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.5)) brightness(1.35);
  border: none;
}
.ai-header--glass .nav-link { color: var(--cyber-text) !important; }
.ai-header--glass .nav-link:hover { color: var(--cyber-cyan) !important; text-shadow: 0 0 12px rgba(0,240,255,0.6); }
.ai-header--glass .text-white { color: var(--cyber-text) !important; }
.ai-header--glass .dropdown-toggle { color: var(--cyber-text) !important; }
.ai-header--glass .navbar-brand { white-space: nowrap; }
.ai-header--glass .nav-link { white-space: nowrap; }
.ai-header--glass .navbar > .container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}
.ai-header--glass form.d-flex {
  flex-wrap: nowrap;
  align-items: center;
}

/* Header mobile: giảm blur + drop-shadow (giật trên GPU yếu) */
@media (max-width: 767px) {
  .ai-header--glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(180deg, rgba(5, 9, 24, 0.99) 0%, rgba(6, 11, 28, 0.98) 100%) !important;
  }
  .ai-header--glass .navbar-brand img {
    filter: brightness(1.2);
  }
  .ai-header--glass .container { padding-top: 6px; padding-bottom: 6px; }
}

/* Menu mobile: nen dac + vung cuon rieng, tranh chu menu mo len noi dung trang */
@media (max-width: 991.98px) {
  .ai-header--glass .navbar-collapse {
    background: rgba(6, 10, 24, 0.98);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 14px;
    margin: 8px 0 10px;
    padding: 8px 14px 14px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  }
  .ai-header--glass .navbar-collapse .navbar-nav { margin-bottom: 0 !important; }
  .ai-header--glass .navbar-collapse .nav-link { padding: 10px 2px; }
  .ai-header--glass .navbar-collapse form.d-flex {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .ai-header--glass .navbar-collapse .dropdown-menu { position: static !important; }
}

/* ===== SECTION ===== */
.ai-section {
  position: relative;
  padding: 48px 0;
  overflow: hidden;
}
.ai-section--hero {
  padding: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
}
.ai-section--cta { padding: 40px 0; }
.ai-section--stats { padding: 24px 0; }

.ai-section__content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== TYPOGRAPHY ===== */
.ai-headline-hero {
  font-family: var(--ai-font-display);
  /* Nunito 800 rong hon font cu ~30% -> ha size de headline van 2 dong tren desktop
     (do o 1440: can 858px o 80px, chi co 662px -> cap 60px = vua khit). */
  font-size: clamp(1.95rem, 4.2vw, 3.75rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--cyber-text);
}
.ai-headline-xl {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--cyber-text);
}
.ai-headline-lg {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.15;
  font-weight: 700;
  color: var(--cyber-text);
}
.ai-headline-md {
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--cyber-text);
}
.ai-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--cyber-text-muted);
}

/* ===== LABEL ===== */
/* Nen hien mac dinh (badge toi), VIEN chi hien khi hover. */
.ai-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0, 240, 255, 0.08);
  color: var(--cyber-cyan);
  border: 1px solid transparent; /* vien chi hien khi hover */
  text-shadow: 0 0 8px rgba(0,240,255,0.4);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ai-label:hover,
.ai-label:focus-visible {
  border-color: rgba(0, 240, 255, 0.5);
  color: #fff;
  background: rgba(0, 240, 255, 0.12);
}

/* ===== GRADIENT TEXT (cyber) ===== */
.ai-gradient-text {
  background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-purple), var(--cyber-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: cyberhue 6s linear infinite;
}
@keyframes cyberhue {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* ===== GLITCH HEADLINE ===== */
.ai-glitch {
  position: relative;
  display: inline-block;
}
.ai-glitch::before,
.ai-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: transparent;
}
.ai-glitch::before {
  color: var(--cyber-cyan);
  animation: glitch-1 3s infinite linear alternate-reverse;
  clip-path: inset(0 0 60% 0);
}
.ai-glitch::after {
  color: var(--cyber-magenta);
  animation: glitch-2 2s infinite linear alternate-reverse;
  clip-path: inset(60% 0 0 0);
}
@keyframes glitch-1 {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, 2px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}
@keyframes glitch-2 {
  0% { transform: translate(0); }
  25% { transform: translate(2px, -1px); }
  50% { transform: translate(-2px, 1px); }
  75% { transform: translate(1px, -2px); }
  100% { transform: translate(0); }
}

/* ===== BUTTONS ===== */
.ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--cyber-ease), box-shadow 0.25s var(--cyber-ease);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ai-btn:hover { transform: translateY(-2px); }
.ai-btn--primary {
  background: linear-gradient(135deg, var(--cyber-purple), var(--cyber-cyan));
  color: #fff;
  box-shadow: 0 0 20px rgba(123, 47, 247, 0.4);
}
.ai-btn--primary:hover { box-shadow: 0 0 32px rgba(0, 240, 255, 0.5); }
.ai-btn--outline {
  background: transparent;
  color: var(--cyber-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}
.ai-btn--outline:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

/* Ghost (hero home): NEN hien mac dinh (mat phang toi), vien CHI hien khi hover.
   Border luon 1px transparent de hover khong lam nhay layout. */
.ai-btn--ghost {
  background: rgba(213, 224, 255, 0.06);
  color: var(--cyber-text);
  border: 1px solid transparent;
  box-shadow: none;
  padding: 12px 18px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.ai-btn--ghost i { font-size: 0.85em; opacity: 0.75; transition: transform 0.2s var(--cyber-ease); }
.ai-btn--ghost:hover,
.ai-btn--ghost:focus-visible {
  color: #fff;
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.18);
  transform: translateY(-2px);
}
.ai-btn--ghost:hover i { opacity: 1; transform: translateX(3px); }

/* Cum CTA hero: 3 nut cung style (nen hien mac dinh, vien chi khi hover) */
.ai-hero__cta { gap: 8px; margin-bottom: 20px; margin-top: 4px; }
/* Eco-System: dung chung .ai-btn--ghost nen khong can style rieng nua;
   chi bo margin-left de thang hang voi 2 nut kia. */
.ai-hero__cta > .ai-hero__desktop-link { margin-left: 0; }

/* Nut download app desktop (link trung tam tai app): NEN hien mac dinh, VIEN chi khi hover
   -> dong bo voi 3 nut CTA hero o tren. */
.ai-hero__download { margin-top: 16px; }
.ai-btn--download {
  background: rgba(213, 224, 255, 0.06);
  color: var(--cyber-text);
  border: 1px solid transparent;
  box-shadow: none;
  padding: 11px 20px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  font-weight: 600;
}
.ai-btn--download i { color: var(--cyber-cyan); }
.ai-btn--download:hover,
.ai-btn--download:focus-visible {
  color: #fff;
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.18);
}

/* ===== CARDS ===== */
.ai-card {
  height: 100%;
  border-radius: 12px;
  padding: 24px;
  background: rgba(10, 10, 26, 0.65);
  border: 1px solid var(--cyber-border);
  transition: transform 0.3s var(--cyber-ease), border-color 0.3s, box-shadow 0.3s;
}
.ai-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.2);
}

/* ===== ICON ===== */
.ai-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 17px;
  margin-bottom: 14px;
  flex-shrink: 0;
  background: rgba(0, 240, 255, 0.1);
  color: var(--cyber-cyan);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

/* ===== SIDEBAR ===== */
/* An khi cham footer: footer cao ~390px, dot fixed bottom:32px nen luon phu len
   dong copyright. JS them .ai-sidebar--hidden khi footer vao viewport. */
.ai-sidebar {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: row;
  gap: 12px;
  background: rgba(5, 7, 15, 0.85);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--cyber-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.25s var(--cyber-ease), transform 0.25s var(--cyber-ease);
}
/* An khi footer dang hien (tranh de len dong copyright). */
.ai-sidebar--hidden {
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
}
.ai-sidebar__item { position: relative; }
.ai-sidebar__dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: rgba(213, 224, 255, 0.2);
  border: 1px solid rgba(213, 224, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s var(--cyber-ease);
  transform: rotate(45deg);
}
.ai-sidebar__dot--active {
  background: var(--cyber-cyan);
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.7);
}
.ai-sidebar__label {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.85);
  color: var(--cyber-cyan);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ai-sidebar__item:hover .ai-sidebar__label { opacity: 1; }

/* ===== ANIMATIONS ===== */
.ai-stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--cyber-ease), transform 0.5s var(--cyber-ease);
}
.ai-stagger-item.visible { opacity: 1; transform: translateY(0); }

/* ===== SCANLINE ===== */
.ai-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.ai-scanline::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,240,255,0.4), transparent);
  animation: scan 4s linear infinite;
}
@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

/* ===== GRID NEON ===== */
.ai-grid-neon {
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ===== STARFIELD ===== */
.ai-starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  will-change: opacity;
}
.ai-starfield::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  top: 10%;
  left: 8%;
  box-shadow:
    120px 40px 0 rgba(0,240,255,0.8), 280px 80px 0 rgba(255,0,229,0.6), 400px 20px 0 rgba(123,47,247,0.7),
    80px 180px 0 rgba(0,240,255,0.5), 200px 140px 0 rgba(255,255,255,0.9), 350px 200px 0 rgba(0,240,255,0.4),
    500px 120px 0 rgba(255,0,229,0.6), 50px 300px 0 rgba(0,240,255,0.7), 180px 280px 0 rgba(123,47,247,0.5),
    320px 340px 0 rgba(0,240,255,0.8), 460px 260px 0 rgba(255,255,255,0.4), 600px 180px 0 rgba(255,0,229,0.6),
    700px 240px 0 rgba(0,240,255,0.6), 60px 520px 0 rgba(255,255,255,0.5), 220px 500px 0 rgba(0,240,255,0.7),
    380px 540px 0 rgba(123,47,247,0.4), 520px 480px 0 rgba(0,240,255,0.6), 680px 420px 0 rgba(255,0,229,0.5);
  animation: twinkle 4s ease-in-out infinite alternate;
}
.ai-starfield::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  background: #fff;
  top: 25%;
  left: 15%;
  box-shadow:
    60px 30px 0 rgba(0,240,255,0.5), 160px 60px 0 rgba(255,0,229,0.4), 300px 15px 0 rgba(123,47,247,0.6),
    100px 120px 0 rgba(0,240,255,0.5), 240px 100px 0 rgba(255,255,255,0.7), 400px 90px 0 rgba(0,240,255,0.4),
    500px 160px 0 rgba(255,0,229,0.5), 80px 220px 0 rgba(0,240,255,0.6), 220px 200px 0 rgba(123,47,247,0.4),
    340px 240px 0 rgba(0,240,255,0.7), 480px 210px 0 rgba(255,255,255,0.5), 580px 130px 0 rgba(255,0,229,0.4),
    650px 300px 0 rgba(0,240,255,0.6), 120px 340px 0 rgba(255,255,255,0.5), 280px 320px 0 rgba(0,240,255,0.7);
  animation: twinkle 5s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle { 0% { opacity: 0.3; } 100% { opacity: 1; } }

/* ===== AURORA ===== */
.ai-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background:
    radial-gradient(ellipse 70% 45% at 20% 40%, rgba(123, 47, 247, 0.2), transparent),
    radial-gradient(ellipse 55% 45% at 80% 25%, rgba(0, 240, 255, 0.15), transparent),
    radial-gradient(ellipse 50% 55% at 50% 75%, rgba(255, 0, 229, 0.1), transparent);
  animation: aurora 14s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.06) translateX(20px); }
  100% { opacity: 0.4; transform: scale(0.98) translateX(-10px); }
}

/* ===== GALAXY NEBULA ===== */
.ai-galaxy {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
  background:
    radial-gradient(ellipse 60% 45% at 28% 22%, rgba(80, 40, 180, 0.22), transparent),
    radial-gradient(ellipse 50% 40% at 72% 55%, rgba(0, 160, 255, 0.14), transparent),
    radial-gradient(ellipse 45% 50% at 55% 78%, rgba(255, 0, 180, 0.1), transparent),
    radial-gradient(ellipse 35% 35% at 82% 18%, rgba(10, 255, 170, 0.08), transparent),
    radial-gradient(ellipse 30% 30% at 15% 68%, rgba(120, 60, 220, 0.14), transparent);
  animation: galaxy-drift 24s ease-in-out infinite alternate;
}
@keyframes galaxy-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-35px, 22px, 0) scale(1.06); }
  100% { transform: translate3d(25px, -18px, 0) scale(1); }
}

/* ===== SHOOTING STARS ===== */
.ai-shooting-star {
  position: absolute;
  width: 180px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(0,240,255,0.65) 45%, transparent);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  animation: shoot 4.5s ease-in infinite;
}
/* Deferred: sao băng chỉ kích hoạt sau khi trang đã load xong (không cản render ban đầu) */
.ai-home .ai-shooting-star {
  animation-play-state: paused;
}
.ai-home.ai-bg-anim .ai-shooting-star {
  animation-play-state: running;
}
.ai-shooting-star::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(0,240,255,0.8);
}
.ai-shooting-star--1 { top: 8%; left: 8%; animation-delay: 0s; }
.ai-shooting-star--2 { top: 16%; left: 60%; animation-delay: 1.2s; }
.ai-shooting-star--3 { top: 30%; left: 25%; animation-delay: 2.2s; width: 150px; }
.ai-shooting-star--4 { top: 42%; left: 70%; animation-delay: 0.8s; width: 140px; }
.ai-shooting-star--5 { top: 52%; left: 12%; animation-delay: 3s; width: 160px; }
.ai-shooting-star--6 { top: 64%; left: 55%; animation-delay: 1.6s; width: 130px; }
.ai-shooting-star--7 { top: 74%; left: 30%; animation-delay: 3.6s; width: 150px; }
@keyframes shoot {
  0% { opacity: 0; transform: translate(0, 0) rotate(35deg) scaleX(0.4); }
  5% { opacity: 1; }
  20% { opacity: 0; transform: translate(340px, 260px) rotate(35deg) scaleX(1); }
  100% { opacity: 0; transform: translate(340px, 260px) rotate(35deg) scaleX(1); }
}

/* ===== NOISE (lightweight) ===== */
.ai-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0, transparent 1px, transparent 3px);
}

/* ===== APP STORE BUTTON ===== */
.ai-app-store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid rgba(213, 224, 255, 0.15);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}
.ai-app-store-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}
.ai-app-store-btn i { font-size: 1.55rem; color: var(--cyber-cyan); text-shadow: 0 0 10px rgba(0,240,255,0.6); }

/* ===== STORE LINKS: 2 hang co dinh goc trai tren =====
   Mac dinh: icon + text + NEN mo. Hover/focus: moi hien VIEN bo goc nhe (10px).
   Kem hieu ung "pulse" (giong nut Facebook/Contact goc phai).
   Dat duoi header AI (--ai-header-h) de khong de len logo. z-index < header (1030). */
.ai-fixed-stores {
  position: fixed;
  top: calc(var(--ai-header-h, 80px) + 10px);
  left: 12px;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  transition: opacity 0.25s var(--cyber-ease), transform 0.25s var(--cyber-ease);
}
.ai-fixed-store {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 38px;
  /* 2 nut PHAI cung be rong, neu khong nen cua "App Store" (chu ngan hon)
     se hep hon "Google Play" -> nhin lech. 126px = width cua nut dai nhat + padding. */
  min-width: 126px;
  padding: 0 10px;
  border-radius: 10px;          /* bo goc nhe, khong tron thanh pill */
  background: rgba(213, 224, 255, 0.07); /* NEN hien mac dinh */
  border: 1px solid transparent; /* VIEN chi hien khi hover (giu cho khong nhay layout) */
  color: var(--cyber-text);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
/* Nen nut "sang ra roi tan" (glow pulse tren nen), khong phai vong vien lan ra.
   z-index:0 tren nen, duoi icon/text (z-index:1). */
.ai-fixed-store__pulse {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 35% 30%, rgba(0, 240, 255, 0.30), rgba(0, 240, 255, 0.08) 70%);
  border: 1px solid rgba(0, 240, 255, 0.30);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.18), inset 0 0 10px rgba(0, 240, 255, 0.06);
  opacity: 0;
  animation: ai-store-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
  will-change: opacity;
}
.ai-fixed-store__pulse::after {
  /* lop sang phu lech pha -> nhip "tho" lien tuc */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 65% 70%, rgba(0, 240, 255, 0.22), transparent 72%);
  opacity: 0;
  animation: ai-store-pulse 2.4s ease-in-out infinite;
  animation-delay: 1.2s;
}
.ai-fixed-store:nth-child(2) .ai-fixed-store__pulse { animation-delay: 0.6s; }
.ai-fixed-store:nth-child(2) .ai-fixed-store__pulse::after { animation-delay: 1.8s; }
/* Sang ra roi tan tren nen (khong scale de khong vuot khoi nut). */
@keyframes ai-store-pulse {
  0%, 100% { opacity: 0; }
  45%, 55% { opacity: 1; }
}
/* Icon + text luon noi tren vong pulse */
.ai-fixed-store i,
.ai-fixed-store__label { position: relative; z-index: 1; }
.ai-fixed-store i {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--cyber-cyan);
  width: 18px;
  text-align: center;
  flex: 0 0 18px;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.45);
}
.ai-fixed-store__label {
  margin-left: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}
.ai-fixed-store:hover,
.ai-fixed-store:focus-visible {
  color: #fff;
  background: rgba(0, 240, 255, 0.12); /* nen dam hon khi hover */
  border-color: rgba(0, 240, 255, 0.5); /* VIEN chi hien khi hover */
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .ai-fixed-store { transition: none; }
  .ai-fixed-store__pulse { animation: none; opacity: 0; }
}
@media (max-width: 767px) {
  .ai-fixed-stores { top: calc(var(--ai-header-h, 80px) + 8px); left: 8px; gap: 2px; }
  .ai-fixed-store { height: 34px; padding: 0 8px; }
  .ai-fixed-store i { font-size: 1rem; }
  .ai-fixed-store__label { font-size: 0.78rem; }
  /* Mobile: cuon qua hero thi an rail (tranh de len noi dung/nut) */
  .ai-fixed-stores--hidden { opacity: 0; transform: translateY(-8px); pointer-events: none; }
  /* Chua cho rail (2 hang) o goc trai: day noi dung hero xuong */
  #ai-hero .ai-section__content { padding-top: 78px; }
}

/* ===== ECOSYSTEM CARD FLASH (nhay vien khi tro tu hero) ===== */
.ai-card--flash {
  animation: ai-card-flash 0.7s ease-in-out 3;
  border-color: rgba(0, 240, 255, 0.8) !important;
}
@keyframes ai-card-flash {
  0%, 100% { box-shadow: 0 0 0 rgba(0,240,255,0); border-color: rgba(0,240,255,0.25); }
  50% { box-shadow: 0 0 28px rgba(0,240,255,0.65), inset 0 0 18px rgba(0,240,255,0.12); border-color: rgba(0,240,255,0.9); }
}

/* ===== FOOTER VIEW MORE ===== */
/* Tieu de footer "Products & Services" la link toi /product (thay "View more").
   Ke thua style heading, chi them kha nang bam + mui ten huong dan. */
.ai-footer__heading-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.ai-footer__heading-link i {
  font-size: 0.72em;
  opacity: 0.7;
  transition: transform 0.2s var(--cyber-ease), opacity 0.2s;
}
.ai-footer__heading-link:hover { color: var(--cyber-cyan); }
.ai-footer__heading-link:hover i { opacity: 1; transform: translateX(4px); }
.ai-footer__heading-link:focus-visible {
  outline: 2px solid rgba(0, 240, 255, 0.6);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== ECOSYSTEM: card flex + nut don day + scroll doc ===== */
#ai-ecosystem .ai-card { display: flex; flex-direction: column; }
#ai-ecosystem .ai-card .ai-body { flex: 1 0 auto; }
#ai-ecosystem .ai-eco__link { align-self: center; }

/* ===== ORBIT (horizontal desktop) ===== */
@media (min-width: 768px) {
  .ai-orbit-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: auto;
    height: 100vh;
    width: 100vw;
    -webkit-overflow-scrolling: touch;
  }
  .ai-orbit-container::-webkit-scrollbar { display: none; }
  .ai-orbit-section {
    min-width: 100vw;
    height: 100vh;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    opacity: 0.5;
  }
  .ai-orbit-section--active { opacity: 1; }
  .ai-orbit-section--inactive { opacity: 0.5; }
  /* Ecosystem nhieu card: cho scroll doc noi bo, giu orbit ngang */
  #ai-ecosystem.ai-orbit-section {
    overflow-y: auto;
    align-items: flex-start;
    padding: 48px 0;
  }
}

@media (max-width: 767px) {
  .ai-section { padding: 28px 0; }
  .ai-section--hero { min-height: auto; padding: 32px 0 24px; }
  .ai-section__content { padding: 0 14px; }
  .ai-card { padding: 16px; }
  .ai-sidebar { display: none; }
  .ai-starfield::before,
  .ai-starfield::after { animation: none; }
  .ai-aurora { animation: none; }
  .ai-galaxy { animation: none; }
  .ai-scanline::after { animation: none; }
  .ai-shooting-star { display: none; }
  .ai-glitch::before,
  .ai-glitch::after { display: none; }
  .ai-chelated-anim { animation: none; }
}

/* ===== REDUCED MOTION: tắt toàn bộ animation nặng ===== */
@media (prefers-reduced-motion: reduce) {
  .ai-starfield::before,
  .ai-starfield::after,
  .ai-aurora,
  .ai-galaxy,
  .ai-scanline::after,
  .ai-glitch::before,
  .ai-glitch::after,
  .ai-innovation__ring {
    animation: none !important;
  }
  .ai-innovation__img { animation: none; }
}

/* ===== SCROLL ARROWS ===== */
.ai-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--cyber-border);
  background: rgba(5, 7, 15, 0.7);
  color: var(--cyber-cyan);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s, background 0.2s, border-color 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ai-arrow--prev { left: 20px; }
.ai-arrow--next { right: 20px; }
.ai-home:hover .ai-arrow { opacity: 1; }
.ai-arrow:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

/* ===== HIDE ANIMATION TOGGLE ===== */
.ai-animate-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(5, 7, 15, 0.7);
  border: 1px solid var(--cyber-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--cyber-text-muted);
}
.ai-animate-toggle input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--cyber-cyan);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.ai-animate-toggle input:checked {
  background: var(--cyber-cyan);
}
.ai-animate-toggle input:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #05070f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ===== STATIC MODE (disable animations) ===== */
.ai-home--static .ai-starfield::before,
.ai-home--static .ai-starfield::after,
.ai-home--static .ai-aurora,
.ai-home--static .ai-galaxy,
.ai-home--static .ai-shooting-star,
.ai-home--static .ai-scanline::after { animation: none !important; }
.ai-home--static .ai-shooting-star { display: none !important; }
.ai-home--static .ai-innovation__ring,
.ai-home--static .ai-innovation__img { animation: none !important; }

/* ===== INTRO VIDEO ===== */
.ai-intro-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 998;
  pointer-events: none;
  border: none;
  /* An mac dinh (fade mout khi hoat dong lai); video luon mounted voi
     preload="none" nen khong tai 4.2MB khi vao trang. */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.ai-intro-video--on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .ai-intro-video { transition: none; }
}

/* ===== HERO store buttons: mobile xep doc (fix be layout do text dai) ===== */
@media (max-width: 576px) {
  #ai-hero .d-flex.gap-3 { flex-wrap: wrap; }
  #ai-hero .ai-app-store-btn {
    flex: 1 1 100%;
    white-space: normal;
    text-align: center;
    padding: 12px 16px;
  }
}