/* Design system "gương Apple" cho appmienphi.com — tham khảo apple.com:
   typography lớn, nhiều khoảng trắng, nav mờ (backdrop-filter), section
   luân phiên sáng/tối, bo góc lớn, chuyển động tinh tế. */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --bg: #ffffff;
  --bg-dark: #000000;
  --bg-subtle: #f5f5f7;
  --text: #1d1d1f;
  --text-dark: #f5f5f7;
  --text-secondary: #6e6e73;
  --text-secondary-dark: #a1a1a6;
  /* Màu thương hiệu — xem /brand/ */
  --accent: #2F6BFF;
  --accent-hover: #1F57E6;
  --brand-ink: #0B1020;
  --brand-amber: #FFB020;
  --brand-pink: #FF4D8D;
  --brand-violet: #7C3AED;
  --divider: rgba(0, 0, 0, 0.08);
  --divider-dark: rgba(255, 255, 255, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1120px;
  --nav-height: 48px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-subtle: #1d1d1f;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --divider: rgba(255, 255, 255, 0.14);
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-subtle: #1d1d1f;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --divider: rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* Lenis (js/motion.js) tự cuộn mượt -> tắt smooth của trình duyệt để khỏi chồng nhau */
html.lenis, html.lenis body { height: auto; scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.47059;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; } /* height:auto để thuộc tính width/height trên <img> chỉ giữ tỉ lệ, không ép chiều cao */

/* ── Nav ─────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--divider);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav { background: rgba(0, 0, 0, 0.8); }
}
:root[data-theme="dark"] .nav { background: rgba(0, 0, 0, 0.8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-logo .logo-light { display: none; } :root:not([data-theme="light"]) .nav-logo .logo-dark { display: block; } }
:root[data-theme="dark"] .nav-logo .logo-light { display: none; }
:root[data-theme="dark"] .nav-logo .logo-dark { display: block; }

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 12px;
  font-weight: 400;
}

.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 22px; width: auto; display: block; }
.nav-logo .logo-dark { display: none; }
.nav.on-dark .nav-logo .logo-light { display: none; }
.nav.on-dark .nav-logo .logo-dark { display: block; }

.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text); opacity: 0.8; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

.nav-actions { display: flex; gap: 16px; align-items: center; }
.nav-actions a { opacity: 0.85; }
.nav-actions a:hover { opacity: 1; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 96px 22px 64px;
  max-width: 980px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 12px;
  background: linear-gradient(180deg, var(--text) 60%, var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lede {
  font-size: clamp(19px, 2.4vw, 28px);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 32px;
  font-weight: 400;
}

.hero-actions { display: flex; gap: 28px; justify-content: center; align-items: center; margin-bottom: 40px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 400;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-link { color: var(--accent); font-size: 17px; }
.btn-link:hover { text-decoration: underline; }
.btn-link::after { content: " ›"; }

.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.25);
}

/* ── Product hero (mirror bố cục apple.com: mỗi mục nội dung là 1 hero
   riêng — kicker nhỏ, headline lớn, 2 link CTA, ảnh lớn full-bleed bên
   dưới, section sáng/tối luân phiên) ───────────────────────────────── */

.product-hero {
  text-align: center;
  padding: 88px 22px 0;
  overflow: hidden;
}
.product-hero.dark { background: #000; color: var(--text-dark); }
.product-hero.dark .text-secondary,
.product-hero.dark p.tagline { color: var(--text-secondary-dark); }
.product-hero.subtle { background: var(--bg-subtle); }

.product-hero .kicker { font-size: 21px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.product-hero.dark .kicker { color: var(--text-secondary-dark); }

.product-hero h2 {
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.product-hero p.tagline {
  font-size: clamp(19px, 2.2vw, 24px);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 20px;
}

.product-hero .links { display: flex; gap: 24px; justify-content: center; margin-bottom: 32px; }
.product-hero .links a { color: var(--accent); font-size: 19px; }
.product-hero .links a:hover { text-decoration: underline; }
.product-hero .links a::after { content: " ›"; }

.product-hero-media {
  display: block;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  max-height: 620px;
  object-fit: cover;
}

/* ── Tile grid (mirror lưới 2 ô lớn kiểu apple.com sau khối hero) ──── */

.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 760px) { .tile-grid { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 56px 40px;
  text-align: center;
  background: var(--bg-subtle);
}
.tile.dark { background: #000; color: var(--text-dark); }
.tile.dark .text-secondary { color: var(--text-secondary-dark); }
.tile h3 { font-size: 32px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }
.tile p { font-size: 17px; color: var(--text-secondary); margin: 0 0 16px; }
.tile img {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  max-height: 60%;
  object-fit: cover;
  object-position: top;
}

/* ── Sections ────────────────────────────────────────────────────── */

.section { padding: 96px 22px; }
.section-subtle { background: var(--bg-subtle); }
.section-dark {
  background: #000;
  color: var(--text-dark);
}
.section-dark .text-secondary { color: var(--text-secondary-dark); }

.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .eyebrow { font-size: 17px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 12px; }
.section-head p { font-size: 19px; color: var(--text-secondary); margin: 0; }

.text-secondary { color: var(--text-secondary); }

/* ── Feature grid ────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  border: 1px solid var(--divider);
  transition: transform 0.25s ease;
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; border-radius: var(--radius-sm); margin-bottom: 24px; aspect-ratio: 4/3; object-fit: cover; }
.card h3 { font-size: 22px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.005em; }
.card p { font-size: 15px; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* ── Flow steps (bắt buộc cho mọi bài hướng dẫn) ─────────────────── */

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  counter-reset: flow-step;
  margin: 40px 0;
}
.flow-step {
  position: relative;
  padding: 28px 24px;
  border-top: 3px solid var(--accent);
  counter-increment: flow-step;
}
.flow-step::before {
  content: counter(flow-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.flow-step img { border-radius: var(--radius-sm); margin: 12px 0; }
.flow-step h4 { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.flow-step p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* ── Article ─────────────────────────────────────────────────────── */

.article { max-width: 720px; margin: 0 auto; padding: 64px 22px 96px; }
.article-hero-image { border-radius: var(--radius-lg); margin: 32px 0 48px; }
.article h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.article .meta { color: var(--text-secondary); font-size: 15px; margin-bottom: 8px; }
.article h2 { font-size: 28px; font-weight: 600; margin-top: 56px; }
.article p { font-size: 19px; line-height: 1.6; color: var(--text); }
.article img { border-radius: var(--radius-md); margin: 24px 0; }
.article figcaption { text-align: center; font-size: 13px; color: var(--text-secondary); margin-top: -12px; }

/* ── Footer ──────────────────────────────────────────────────────── */

.footer {
  background: var(--bg-subtle);
  padding: 0 22px 24px;
  font-size: 12px;
  color: var(--text-secondary);
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; }

.footer-region {
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 24px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 16px;
}
@media (max-width: 900px) { .footer-columns { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .footer-columns { grid-template-columns: 1fr; } }

.footer-columns h4 { font-size: 12px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.footer-columns a { display: block; padding: 6px 0; }
.footer-columns a:hover { text-decoration: underline; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  padding-top: 4px;
}
.footer-legal a:hover { text-decoration: underline; }
.footer-legal .sep { color: var(--divider); }

/* Legacy alias — vài trang cũ còn dùng .footer-links, giữ để không vỡ layout */
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--divider); margin-bottom: 16px; }
.footer-links a:hover { text-decoration: underline; }

/* ── Auth pages ──────────────────────────────────────────────────── */

.auth-wrap {
  max-width: 380px;
  margin: 0 auto;
  padding: 96px 22px;
  text-align: center;
}
.auth-wrap h1 { font-size: 32px; font-weight: 600; margin-bottom: 8px; }
.auth-wrap p { color: var(--text-secondary); margin-bottom: 32px; }
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--divider);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.auth-btn:hover { background: var(--bg-subtle); }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 13px; margin: 24px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--divider); }

/* ---------- Trang app: video giới thiệu + hướng dẫn chi tiết (Markdown đã lọc ở be) ---------- */
.app-video {
  width: 100%; max-width: 960px; aspect-ratio: 16 / 9; display: block; margin: 0 auto;
  border-radius: var(--radius-lg); background: #000; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.guide-content { font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.guide-content > :first-child { margin-top: 0; }
.guide-content h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; margin: 40px 0 12px; }
.guide-content h3 { font-size: 22px; font-weight: 600; margin: 32px 0 10px; }
.guide-content h4, .guide-content h5, .guide-content h6 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
.guide-content p, .guide-content ul, .guide-content ol, .guide-content blockquote, .guide-content pre, .guide-content table { margin: 0 0 16px; }
.guide-content ul, .guide-content ol { padding-left: 24px; }
.guide-content li { margin-bottom: 6px; }
.guide-content a { color: var(--accent); }
.guide-content a:not([href]) { color: inherit; } /* link bị be lọc bỏ href (không phải https) */
.guide-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 8px 0; }
.guide-content blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; color: var(--text-secondary); }
.guide-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--bg-subtle); padding: 2px 6px; border-radius: 6px; }
.guide-content pre { background: var(--bg-subtle); padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; }
.guide-content pre code { background: none; padding: 0; }
.guide-content table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.guide-content th, .guide-content td { border: 1px solid var(--divider); padding: 8px 12px; text-align: left; }
.guide-content hr { border: none; border-top: 1px solid var(--divider); margin: 32px 0; }

/* YouTube dạng "lite": thumbnail + nút play, bấm mới nạp iframe youtube-nocookie */
.yt-lite {
  position: relative; display: block; width: 100%; max-width: 960px; aspect-ratio: 16 / 9; margin: 0 auto;
  border: 0; padding: 0; cursor: pointer; border-radius: var(--radius-lg); overflow: hidden;
  background: #000 center / cover no-repeat; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.yt-lite::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0) 40%); }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%);
  background: rgba(33, 33, 33, .85); border-radius: 16px; transition: background .15s;
}
.yt-play::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-40%, -50%);
  border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff;
}
.yt-lite:hover .yt-play, .yt-lite:focus-visible .yt-play { background: #f00; }


/* ═════════════════════════════════════════════════════════════════════
   v2 — trang chủ "ấn tượng": aurora hero, marquee, bento, steps, CTA.
   Chuyển động do js/motion.js (GSAP + ScrollTrigger + Lenis) điều khiển;
   không có JS / prefers-reduced-motion -> mọi thứ vẫn hiện đầy đủ.
   ═════════════════════════════════════════════════════════════════════ */

:root {
  --grad-1: #2F6BFF;
  --grad-2: #7C3AED;
  --grad-3: #FF4D8D;
  --grad-4: #FFB020;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-float: 0 24px 60px -18px rgba(30, 41, 80, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --glass: rgba(28, 28, 32, 0.72); --glass-border: rgba(255, 255, 255, 0.12); --shadow-float: 0 24px 60px -18px rgba(0, 0, 0, 0.7); }
}
:root[data-theme="dark"] { --glass: rgba(28, 28, 32, 0.72); --glass-border: rgba(255, 255, 255, 0.12); --shadow-float: 0 24px 60px -18px rgba(0, 0, 0, 0.7); }

/* Trạng thái ban đầu cho hero khi có JS (class .motion gắn ở <head>) -> không nháy */
.motion [data-hero] { opacity: 0; transform: translateY(28px); }
.motion [data-hero-stage] { opacity: 0; transform: translateY(40px) scale(0.96); }

.grad-text {
  background: linear-gradient(92deg, var(--grad-1), var(--grad-2) 45%, var(--grad-3) 75%, var(--grad-4));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: grad-shift 8s ease-in-out infinite alternate;
}
@keyframes grad-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* ── Hero v2 ───────────────────────────────────────────────────────── */
.hx { position: relative; overflow: hidden; padding: 88px 22px 40px; text-align: center; isolation: isolate; }
.hx-aurora { position: absolute; inset: -20% -10% auto; height: 900px; z-index: -1; filter: blur(70px); opacity: 0.55; pointer-events: none; }
.hx-aurora span { position: absolute; border-radius: 50%; mix-blend-mode: multiply; animation: blob 18s ease-in-out infinite alternate; }
.hx-aurora span:nth-child(1) { width: 520px; height: 520px; left: 8%; top: 4%; background: #8ec5ff; }
.hx-aurora span:nth-child(2) { width: 460px; height: 460px; right: 10%; top: 0; background: #d6b4ff; animation-delay: -6s; }
.hx-aurora span:nth-child(3) { width: 420px; height: 420px; left: 38%; top: 26%; background: #ffc2d6; animation-delay: -12s; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hx-aurora { opacity: 0.35; } :root:not([data-theme="light"]) .hx-aurora span { mix-blend-mode: screen; } }
@keyframes blob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.12); }
  100% { transform: translate(-30px, 40px) scale(0.94); }
}
.hx-inner { max-width: 980px; margin: 0 auto; }
.hx-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; margin-bottom: 22px;
  font-size: 14px; font-weight: 500; background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 6px 20px -10px rgba(0,0,0,.25);
}
.hx-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.hx-title { font-size: clamp(44px, 8vw, 96px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; margin: 0 0 20px; }
.hx-lede { font-size: clamp(18px, 2.3vw, 24px); color: var(--text-secondary); max-width: 660px; margin: 0 auto 32px; }
.hx .hero-actions { margin-bottom: 56px; flex-wrap: wrap; gap: 16px 28px; }
.btn-lg { padding: 15px 28px; font-size: 18px; font-weight: 500; }
.btn-glow { position: relative; box-shadow: 0 10px 30px -8px rgba(47, 107, 255, 0.6); }
.btn-glow:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -8px rgba(47, 107, 255, 0.7); }
.btn-ghost { background: var(--glass); color: var(--text); border: 1px solid var(--divider); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { background: var(--bg-subtle); }

.hx-stage { position: relative; max-width: 1080px; margin: 0 auto; }
.hx-media { width: 100%; border-radius: 32px; box-shadow: 0 40px 100px -30px rgba(30, 41, 80, 0.45); will-change: transform; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-float);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  text-align: left; font-size: 14px; line-height: 1.3; will-change: transform;
}
.float-card strong { display: block; font-size: 15px; }
.float-card small { color: var(--text-secondary); font-size: 12.5px; }
.float-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.float-card .ic svg { width: 22px; height: 22px; }
.fc-1 { left: -3%; top: 16%; }
.fc-2 { right: -4%; top: 34%; }
.fc-3 { left: 8%; bottom: -5%; }
.ic-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.ic-purple { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.ic-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.ic-orange { background: linear-gradient(135deg, #fb923c, #f97316); }
.ic-pink { background: linear-gradient(135deg, #f472b6, #db2777); }
.ic-teal { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
@media (max-width: 760px) {
  .float-card { transform: scale(0.82); }
  .fc-1 { left: -2%; top: 4%; } .fc-2 { right: -2%; top: auto; bottom: 22%; } .fc-3 { display: none; }
}

/* ── Marquee nhu cầu ──────────────────────────────────────────────── */
.marquee { padding: 36px 0 12px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 70s linear infinite; }
.marquee-track.reverse { animation-direction: reverse; animation-duration: 80s; margin-top: 12px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px; white-space: nowrap;
  font-size: 15px; background: var(--bg-subtle); border: 1px solid var(--divider); transition: background .2s, transform .2s;
}
.chip:hover { background: var(--bg); transform: translateY(-2px); }
.chip img { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; box-shadow: 0 2px 6px -2px rgba(0,0,0,.25); }
.chip { padding: 8px 18px 8px 8px; font-weight: 500; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Bento lý do ──────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(220px, auto); gap: 16px; }
.bento-cell {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; border-radius: 28px; padding: 32px; background: var(--bg-subtle);
  border: 1px solid var(--divider); display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .3s ease, border-color .3s;
}
.bento-cell::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(47, 123, 255, 0.14), transparent 45%);
}
.bento-cell:hover { transform: translateY(-4px); border-color: rgba(47,123,255,.25); }
.bento-cell:hover::before { opacity: 1; }
.bento-cell .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin-bottom: auto; }
.bento-cell .ic svg { width: 26px; height: 26px; }
.bento-cell h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin: 24px 0 6px; }
.bento-cell p { margin: 0; color: var(--text-secondary); font-size: 16px; line-height: 1.5; }
.bento-cell.span-2 { grid-column: span 2; }
.bento-cell.row-2 { grid-row: span 2; }
.bento-cell.feature { background: linear-gradient(145deg, #0b1220, #1b2445 55%, #3b2a6b); color: #fff; border-color: transparent; }
.bento-cell.feature p { color: rgba(255,255,255,.72); }
.bento-cell.feature .big { font-size: clamp(64px, 9vw, 120px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-bottom: 8px; }
.age-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.age-pills span { padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 500; background: var(--bg); border: 1px solid var(--divider); }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } .bento-cell.row-2 { grid-row: auto; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .bento-cell.span-2 { grid-column: auto; } }

/* ── App đang được dùng nhiều (dữ liệu thật từ be) ─────────────────── */
.live-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 22px 24px; margin: 0 -22px; scrollbar-width: none; }
.live-strip::-webkit-scrollbar { display: none; }
.live-card { scroll-snap-align: start; border-radius: 24px; overflow: hidden; background: var(--bg); border: 1px solid var(--divider); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; }
.live-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(0,0,0,.35); }
.live-card .thumb { aspect-ratio: 16 / 10; background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-size: 44px; font-weight: 700; letter-spacing: -0.03em; }
.live-card .body { padding: 16px 18px 18px; }
.live-card .cat { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.live-card h3 { font-size: 18px; margin: 4px 0 6px; font-weight: 600; }
.live-card .meta { font-size: 13px; color: var(--text-secondary); }
.skeleton { background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--divider) 50%, var(--bg-subtle) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── 3 bước ───────────────────────────────────────────────────────── */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps-line { position: absolute; top: 22px; left: 8%; right: 8%; height: 3px; border-radius: 3px; background: var(--divider); }
.steps-line-fill { height: 100%; border-radius: 3px; transform-origin: left; background: linear-gradient(90deg, var(--grad-1), var(--grad-2), var(--grad-3)); }
.no-motion .steps-line-fill, html:not(.motion) .steps-line-fill { transform: none; }
.step { position: relative; text-align: center; }
.step-num {
  width: 46px; height: 46px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--bg); border: 3px solid var(--accent); color: var(--accent); position: relative; z-index: 1;
}
.step img { border-radius: 20px; margin: 0 auto 18px; box-shadow: 0 20px 40px -24px rgba(0,0,0,.4); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.step h3 { font-size: 21px; margin: 0 0 6px; font-weight: 600; }
.step p { margin: 0; color: var(--text-secondary); font-size: 15.5px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 48px; } .steps-line { display: none; } .step img { max-width: 340px; } }

/* ── CTA cuối trang ───────────────────────────────────────────────── */
.cta-glow { position: relative; max-width: var(--max-width); margin: 0 auto; border-radius: 36px; padding: 88px 28px; text-align: center; overflow: hidden; background: #05070f; color: #fff; isolation: isolate; }
.cta-glow::before {
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background: conic-gradient(from 0deg, var(--grad-1), var(--grad-2), var(--grad-3), var(--grad-4), var(--grad-1));
  filter: blur(60px); opacity: .9; animation: spin 16s linear infinite;
}
.cta-glow::after { content: ""; position: absolute; inset: 2px; z-index: -1; border-radius: 34px; background: radial-gradient(ellipse at top, rgba(20, 28, 60, .75), rgba(5, 7, 15, .96) 60%); }
.cta-glow h2 { font-size: clamp(36px, 6vw, 68px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 16px; }
.cta-glow p { color: rgba(255,255,255,.72); font-size: clamp(17px, 2vw, 21px); margin: 0 auto 32px; max-width: 560px; }
.cta-glow .hero-actions { margin: 0; flex-wrap: wrap; gap: 14px 24px; }
.cta-glow .btn-ghost { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ảnh product-hero: bo góc + phóng to khi cuộn (motion.js) */
.product-hero-media { border-radius: 28px 28px 0 0; will-change: transform; }

/* ── Menu điện thoại (motion.js chèn nút ☰) ───────────────────────── */
.nav-toggle { display: none; background: none; border: 0; padding: 6px; margin-left: 4px; cursor: pointer; color: var(--text); }
.nav-toggle svg { width: 20px; height: 20px; display: block; }
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--divider); padding: 8px 22px 16px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.3);
  }
  .nav.open .nav-links a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--divider); opacity: 1; }
  .nav.open .nav-links a:last-child { border-bottom: 0; }
}

/* ── Catalog: chip lọc + thẻ app ──────────────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: -8px 0 40px; }
.filter-bar a { padding: 9px 18px; border-radius: 99px; font-size: 15px; background: var(--bg-subtle); border: 1px solid var(--divider); transition: all .2s; }
.filter-bar a:hover { transform: translateY(-2px); }
.filter-bar a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
#app-grid .card { display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
#app-grid .card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); }
#app-grid .card img { margin: 0; border-radius: 0; aspect-ratio: 16 / 10; }
#app-grid .card .card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
#app-grid .card .card-body .btn-link { margin-top: auto; font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  .grad-text, .hx-aurora span, .marquee-track, .cta-glow::before, .skeleton { animation: none !important; }
}

/* ═════════════════════════════════════════════════════════════════════
   v3 — trang chủ điện ảnh: hero tối, câu tuyên bố sáng dần theo cuộn,
   danh mục cuộn ngang (ghim), 3 bước thẻ xếp chồng, ảnh mở bằng clip-path.
   Hình: images/v2/*.webp (gen_images.py, Gemini).
   ═════════════════════════════════════════════════════════════════════ */

/* Hero tối */
.hx-dark { background: radial-gradient(120% 80% at 50% 0%, #1a2150 0%, #0a0d1f 45%, #05060d 100%); color: #f5f5f7; padding-top: 104px; }
.hx-dark .hx-aurora { opacity: .75; }
.hx-dark .hx-aurora span { mix-blend-mode: screen; }
.hx-dark .hx-aurora span:nth-child(1) { background: #2f5bff; }
.hx-dark .hx-aurora span:nth-child(2) { background: #8b3dff; }
.hx-dark .hx-aurora span:nth-child(3) { background: #ff3d8b; opacity: .6; }
.hx-dark .hx-lede { color: rgba(245,245,247,.72); }
.hx-dark .hx-badge { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #f5f5f7; }
.hx-dark .btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.hx-dark .btn-ghost:hover { background: rgba(255,255,255,.16); }
.hx-dark .hx-media { box-shadow: 0 60px 140px -40px rgba(80, 90, 255, .55); }
.hx-dark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hx-dark .float-card { background: rgba(20, 22, 40, .6); border-color: rgba(255,255,255,.14); color: #f5f5f7; }
.hx-dark .float-card small { color: rgba(245,245,247,.65); }
.hx-title .w { display: inline-block; will-change: transform; }
.hx-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}

/* Câu tuyên bố: từng chữ sáng dần theo cuộn */
.statement { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 120px 22px; background: #05060d; color: #f5f5f7; overflow: hidden; isolation: isolate; }
.statement-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: .55; }
.statement::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(5,6,13,.3), rgba(5,6,13,.92) 75%); }
.statement-text { max-width: 1000px; margin: 0; text-align: center; font-size: clamp(32px, 5.4vw, 72px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; }
.statement-text em { font-style: normal; }
.statement-text .sw { display: inline-block; }
.motion .statement-text .sw { opacity: .16; }

/* Danh mục cuộn ngang */
.hscroll { position: relative; overflow: hidden; padding: 112px 0 96px; background: var(--bg); }
.hscroll-head { max-width: var(--max-width); margin: 0 auto 48px; padding: 0 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hscroll-head h2 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
.hscroll-head p { margin: 0; color: var(--text-secondary); font-size: 19px; max-width: 380px; }
.hscroll-track { display: flex; gap: 24px; padding: 0 max(22px, calc((100vw - var(--max-width)) / 2 + 22px)); width: max-content; will-change: transform; }
.panel {
  position: relative; width: min(1040px, 86vw); height: min(620px, 72vh); border-radius: 36px; overflow: hidden; flex-shrink: 0;
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; isolation: isolate;
}
.panel-copy { position: relative; z-index: 1; padding: 56px 48px; display: flex; flex-direction: column; justify-content: flex-end; }
.panel .kicker { font-size: 15px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; opacity: .7; margin-bottom: 10px; }
.panel h3 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 14px; }
.panel p { font-size: 18px; line-height: 1.5; margin: 0 0 24px; opacity: .8; max-width: 400px; }
.panel .links { display: flex; gap: 12px; flex-wrap: wrap; }
.panel .pill { display: inline-flex; align-items: center; gap: 6px; padding: 11px 20px; border-radius: 99px; font-size: 16px; font-weight: 500; background: rgba(255,255,255,.9); color: #111; transition: transform .2s; }
.panel .pill:hover { transform: translateY(-2px); }
.panel .pill.ghost { background: rgba(255,255,255,.18); color: inherit; border: 1px solid rgba(255,255,255,.35); }
.panel-media { position: relative; overflow: hidden; }
.panel-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.panel-blue { background: linear-gradient(145deg, #0f2a6b, #1d4ed8 60%, #60a5fa); color: #fff; }
.panel-coral { background: linear-gradient(145deg, #7c1d3f, #e11d48 55%, #fb923c); color: #fff; }
.panel-mint { background: linear-gradient(145deg, #064e3b, #0d9488 55%, #5eead4); color: #fff; }
.panel .age-pills span { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: #fff; }
.panel .age-pills { margin: -8px 0 24px; }
@media (max-width: 899px) {
  .hscroll-track { flex-direction: column; width: auto; padding: 0 16px; }
  .panel { width: 100%; height: auto; grid-template-columns: 1fr; }
  .panel-media { aspect-ratio: 4 / 3; order: -1; }
  .panel-copy { padding: 32px 26px 36px; }
}

/* Ảnh mở bằng clip-path (motion.js) */
[data-clip] { will-change: clip-path; }

/* 3 bước: thẻ xếp chồng (sticky) */
.stack { max-width: 1040px; margin: 0 auto; display: grid; gap: 28px; padding-bottom: 40px; }
.stack-card {
  position: sticky; top: calc(var(--nav-height) + 40px + var(--i, 0) * 28px);
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; padding: 40px;
  border-radius: 36px; background: var(--bg); border: 1px solid var(--divider);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.35); transform-origin: center top; will-change: transform;
}
.stack-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; }
.stack-card .num { font-size: 15px; font-weight: 700; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; margin-bottom: 12px; }
.stack-card h3 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 12px; }
.stack-card p { font-size: 18px; color: var(--text-secondary); margin: 0; line-height: 1.55; }
.stack-card:nth-child(1) { background: linear-gradient(160deg, transparent 40%, rgba(59,130,246,.10)), var(--bg); }
.stack-card:nth-child(2) { background: linear-gradient(160deg, transparent 40%, rgba(168,85,247,.11)), var(--bg); }
.stack-card:nth-child(3) { background: linear-gradient(160deg, transparent 40%, rgba(20,184,166,.11)), var(--bg); }
@media (max-width: 760px) { .stack-card { grid-template-columns: 1fr; gap: 16px; padding: 22px; border-radius: 28px; } .stack-card img { aspect-ratio: 16 / 9; } .stack-card p { font-size: 16px; } }

/* CTA có ảnh quả cầu */
.cta-glow:has(.cta-orb)::after { background: radial-gradient(ellipse at center, rgba(5, 7, 15, .25), rgba(5, 7, 15, .9) 70%); }
.cta-glow .cta-orb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: .7; border-radius: 34px; }

/* Nav trên nền tối (motion.js gắn .on-dark) */
.nav { transition: background .35s, color .35s, border-color .35s; }
.nav.on-dark { background: rgba(8, 10, 22, .55) !important; color: #f5f5f7; border-bottom-color: rgba(255,255,255,.08); }
.nav.on-dark .nav-links a, .nav.on-dark .nav-toggle { color: #f5f5f7; }
.nav.on-dark .btn-link { color: #7cb4ff; }
@media (max-width: 720px) { .nav.on-dark.open .nav-links { background: #0b0d1c; } .nav.on-dark.open .nav-links a { border-color: rgba(255,255,255,.1); } }

/* ═════════════════════════════════════════════════════════════════════
   Tiêu đề đậm (font thương hiệu Plus Jakarta Sans) + nút hiệu ứng gương
   ═════════════════════════════════════════════════════════════════════ */
:root { --font-display: "Plus Jakarta Sans", var(--font-sans); }

h1, h2, h3,
.hero h1, .hx-title, .product-hero h2, .section-head h2, .article h1, .article h2,
.tile h3, .card h3, .bento-cell h3, .step h3, .stack-card h3, .panel h3, .hscroll-head h2,
.cta-glow h2, .statement-text, .live-card h3, .guide-content h2, .guide-content h3,
.auth-wrap h1, .bento-cell .big {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.card h3, .live-card h3, .bento-cell h3, .step h3 { letter-spacing: -0.02em; }

/* ── Nút gương ── */
.btn, .panel .pill {
  position: relative; overflow: hidden; isolation: isolate;
  font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: transform .2s ease, box-shadow .25s ease, background-color .2s;
}
/* Lớp phản chiếu: nửa trên sáng như mặt kính */
.btn::before, .panel .pill::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.12) 46%, rgba(255,255,255,0) 50%, rgba(255,255,255,.06) 100%);
}
/* Vệt sáng quét ngang khi rê chuột */
.btn::after, .panel .pill::after {
  content: ""; position: absolute; top: -10%; left: -80%; width: 45%; height: 120%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.65), rgba(255,255,255,0));
  transform: skewX(-22deg); transition: left .75s cubic-bezier(.2,.7,.2,1);
}
.btn:hover::after, .panel .pill:hover::after, .btn:focus-visible::after { left: 135%; }
.btn:hover, .panel .pill:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary {
  background: linear-gradient(180deg, #5a8cff 0%, var(--accent) 55%, #2257e6 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 6px rgba(0,20,90,.25), 0 10px 26px -10px rgba(47,107,255,.75);
}
.btn-primary:hover { background: linear-gradient(180deg, #6b98ff 0%, #3a74ff 55%, #2257e6 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 6px rgba(0,20,90,.25), 0 16px 34px -12px rgba(47,107,255,.85); }

/* Nút kính trong (ghost) */
.btn-ghost {
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.18));
  border-color: rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 24px -14px rgba(0,0,0,.35);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.hx-dark .btn-ghost, .cta-glow .btn-ghost {
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.05));
  border-color: rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 30px -14px rgba(0,0,0,.6);
}

/* Nút chính tự quét sáng định kỳ để thu hút ánh nhìn */
.btn-glow::after { animation: btn-shine 4.5s ease-in-out 1.5s infinite; }
.btn-glow:hover::after { animation: none; }
@keyframes btn-shine { 0% { left: -80%; } 22%, 100% { left: 135%; } }

.panel .pill { box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 20px -10px rgba(0,0,0,.35); border-color: rgba(255,255,255,.7); }
.panel .pill.ghost { box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }

/* Nút Đăng ký trên nav */
.nav .nav-cta { padding: 6px 14px; font-size: 13px; border-radius: 99px; color: #fff; opacity: 1; }
.nav .nav-cta:hover { opacity: 1; }

/* Nút đăng nhập Facebook/Google (trang đăng nhập) cũng bóng gương */
.auth-btn { position: relative; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 18px -12px rgba(0,0,0,.4); }

@media (prefers-reduced-motion: reduce) {
  .btn-glow::after { animation: none; }
  .btn::after, .panel .pill::after { transition: none; }
}

/* ── Trang pháp lý & liên hệ ── */
.legal h2 { font-size: 24px; margin-top: 44px; }
.legal ul { padding-left: 22px; margin: 0 0 16px; }
.legal li { font-size: 18px; line-height: 1.6; margin-bottom: 8px; }
.legal a:not(.btn):not(.contact-card) { color: var(--accent); }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 32px 0 40px; }
.contact-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 20px; background: var(--bg-subtle); border: 1px solid var(--divider); transition: transform .2s, border-color .2s; }
.contact-card:hover { transform: translateY(-3px); border-color: rgba(47,107,255,.35); }
.contact-card b { font-family: var(--font-display); font-size: 17px; }
.contact-card span { font-size: 14px; color: var(--text-secondary); line-height: 1.45; }
@media (max-width: 700px) { .contact-cards { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: 16px; padding: 28px; border-radius: 28px; border: 1px solid var(--divider); background: var(--bg); box-shadow: 0 30px 60px -40px rgba(0,0,0,.3); }
.contact-form .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .contact-form .cf-row { grid-template-columns: 1fr; } .contact-form { padding: 20px; } }
.contact-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--divider); font: inherit; font-weight: 400; font-size: 16px; background: var(--bg); color: var(--text);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid rgba(47,107,255,.35); border-color: var(--accent); }
.contact-form .btn { justify-self: start; }
.cf-msg { margin: 0; font-size: 15px; min-height: 1em; }
.cf-msg.ok { color: #16a34a; } .cf-msg.err { color: #d93025; }
.cf-note { margin: 0; font-size: 12.5px; color: var(--text-secondary); }
.cf-note a { color: inherit; text-decoration: underline; }

/* ═════════════════════════════════════════════════════════════════════
   Hiệu ứng kính (glass) cho mọi thành phần dạng nút: chip, chip lọc,
   nhãn tuổi, badge, nút đăng nhập, thẻ liên hệ, tab/segment trong form.
   Kính = nền trong mờ + blur phía sau + viền sáng + phản chiếu nửa trên
   + vệt sáng quét khi rê chuột.
   ═════════════════════════════════════════════════════════════════════ */
:root {
  --glass-bg: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.62) 100%);
  --glass-edge: rgba(255,255,255,.95);
  --glass-hair: rgba(15, 23, 42, .08);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,1), inset 0 -1px 0 rgba(15,23,42,.05), 0 6px 18px -10px rgba(15,23,42,.28);
  --glass-shadow-hover: inset 0 1px 0 rgba(255,255,255,1), inset 0 -1px 0 rgba(15,23,42,.05), 0 14px 30px -14px rgba(47,107,255,.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glass-bg: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.05) 100%);
    --glass-edge: rgba(255,255,255,.22);
    --glass-hair: rgba(255,255,255,.06);
    --glass-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 22px -12px rgba(0,0,0,.7);
    --glass-shadow-hover: inset 0 1px 0 rgba(255,255,255,.3), 0 14px 30px -14px rgba(90,140,255,.5);
  }
}

.chip, .filter-bar a, .age-pills span, .auth-btn, .contact-card,
.tabs button, .seg, .hx-badge {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--glass-bg);
  border: 1px solid var(--glass-edge);
  outline: 1px solid var(--glass-hair); outline-offset: 0;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px) saturate(170%);
  transition: transform .25s ease, box-shadow .25s ease, background .25s;
}
/* Phản chiếu nửa trên */
.chip::before, .filter-bar a::before, .auth-btn::before, .contact-card::before, .tabs button::before, .hx-badge::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.12) 48%, rgba(255,255,255,0) 52%);
}
/* Vệt sáng quét khi rê chuột */
.chip::after, .filter-bar a::after, .auth-btn::after, .contact-card::after, .tabs button::after {
  content: ""; position: absolute; top: -20%; left: -70%; width: 40%; height: 140%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.8), rgba(255,255,255,0));
  transform: skewX(-22deg); transition: left .8s cubic-bezier(.2,.7,.2,1);
}
.chip:hover::after, .filter-bar a:hover::after, .auth-btn:hover::after, .contact-card:hover::after, .tabs button:hover::after { left: 140%; }
.chip:hover, .filter-bar a:hover, .auth-btn:hover, .contact-card:hover { transform: translateY(-2px); box-shadow: var(--glass-shadow-hover); background: var(--glass-bg); }

/* Chip lọc đang chọn: kính màu xanh thương hiệu */
.filter-bar a.active {
  background: linear-gradient(180deg, #5a8cff 0%, var(--accent) 60%, #2257e6 100%); color: #fff;
  border-color: rgba(255,255,255,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 24px -12px rgba(47,107,255,.8);
}
.tabs button.active { background: linear-gradient(180deg, #fff, rgba(255,255,255,.75)); color: var(--text); }
.seg { padding: 4px; }
.seg button.active { background: linear-gradient(180deg, #5a8cff, var(--accent)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 14px -8px rgba(47,107,255,.8); }

/* Nhãn tuổi trên panel màu: kính trắng trong */
.panel .age-pills span { background: linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,.12)); border-color: rgba(255,255,255,.45); outline-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.hx-dark .hx-badge { outline-color: transparent; }

/* Nền aurora nhẹ phía sau dải chip để kính có thứ mà làm mờ */
.marquee { position: relative; isolation: isolate; }
.marquee::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 90% at 15% 50%, rgba(47,107,255,.16), transparent 70%),
    radial-gradient(35% 90% at 50% 50%, rgba(255,77,141,.12), transparent 70%),
    radial-gradient(40% 90% at 85% 50%, rgba(255,176,32,.14), transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  .chip::after, .filter-bar a::after, .auth-btn::after, .contact-card::after, .tabs button::after { transition: none; }
}

/* Nút trên panel màu (danh mục): kính trong suốt, thấy màu panel xuyên qua */
.panel .pill, .panel .pill.ghost {
  color: #fff; font-weight: 600;
  background: linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.16) 100%);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 -1px 0 rgba(255,255,255,.12), 0 10px 26px -12px rgba(0,0,0,.45);
  backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  text-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.panel .pill.ghost { background: linear-gradient(180deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,.06) 100%); border-color: rgba(255,255,255,.4); }
.panel .pill:hover { background: linear-gradient(180deg, rgba(255,255,255,.52) 0%, rgba(255,255,255,.22) 100%); }
.tabs button, .seg button { font-weight: 600; }

/* Ô icon (bento, thẻ nổi hero): kính màu — màu hơi trong, phản chiếu nửa trên,
   viền sáng, quầng màu phía dưới */
.bento-cell .ic, .float-card .ic { position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -8px 16px -10px rgba(0,0,0,.25), 0 10px 24px -12px var(--ic-glow, rgba(47,107,255,.7));
  backdrop-filter: blur(10px) saturate(180%); -webkit-backdrop-filter: blur(10px) saturate(180%);
}
.bento-cell .ic::before, .float-card .ic::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.14) 46%, rgba(255,255,255,0) 52%);
}
.bento-cell .ic::after, .float-card .ic::after { /* đốm sáng góc trên trái như mặt kính cong */
  content: ""; position: absolute; top: 6%; left: 10%; width: 38%; height: 22%; border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse, rgba(255,255,255,.65), rgba(255,255,255,0) 70%);
}
.bento-cell .ic svg, .float-card .ic svg { filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.25)); }
.ic-blue   { background: linear-gradient(145deg, rgba(96,150,255,.95), rgba(37,99,235,.88)); --ic-glow: rgba(47,107,255,.75); }
.ic-purple { background: linear-gradient(145deg, rgba(192,132,252,.95), rgba(124,58,237,.88)); --ic-glow: rgba(124,58,237,.7); }
.ic-green  { background: linear-gradient(145deg, rgba(74,222,128,.95), rgba(22,163,74,.88)); --ic-glow: rgba(22,163,74,.6); }
.ic-orange { background: linear-gradient(145deg, rgba(253,186,116,.95), rgba(249,115,22,.88)); --ic-glow: rgba(249,115,22,.6); }
.ic-pink   { background: linear-gradient(145deg, rgba(249,168,212,.95), rgba(219,39,119,.88)); --ic-glow: rgba(219,39,119,.6); }
.ic-teal   { background: linear-gradient(145deg, rgba(94,234,212,.95), rgba(13,148,136,.88)); --ic-glow: rgba(13,148,136,.6); }
.bento-cell:hover .ic { transform: translateY(-2px) scale(1.04); transition: transform .3s ease; }

/* ═════════════════════════════════════════════════════════════════════
   Trang tài khoản (đăng nhập/đăng ký/quên/đặt lại mật khẩu/xác minh):
   thẻ kính giữa nền aurora
   ═════════════════════════════════════════════════════════════════════ */
.auth-page { background: var(--bg-subtle); }
.auth-shell { position: relative; isolation: isolate; min-height: calc(100vh - var(--nav-height)); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px 40px; overflow: hidden; }
.auth-aurora { position: absolute; inset: -10%; z-index: -1; filter: blur(80px); opacity: .55; pointer-events: none; }
.auth-aurora span { position: absolute; border-radius: 50%; animation: blob 20s ease-in-out infinite alternate; }
.auth-aurora span:nth-child(1) { width: 480px; height: 480px; left: 5%; top: 5%; background: #8ab0ff; }
.auth-aurora span:nth-child(2) { width: 420px; height: 420px; right: 5%; top: 20%; background: #c4a6ff; animation-delay: -7s; }
.auth-aurora span:nth-child(3) { width: 380px; height: 380px; left: 35%; bottom: 0; background: #ffb8d2; animation-delay: -14s; }
.auth-card {
  width: 100%; max-width: 440px; padding: 36px 32px 28px; border-radius: 32px; text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.66));
  border: 1px solid rgba(255,255,255,.9); outline: 1px solid rgba(15,23,42,.06);
  box-shadow: inset 0 1px 0 #fff, 0 40px 90px -40px rgba(30, 41, 80, .45);
  backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%);
}
.auth-mark { width: 52px; height: 52px; margin-bottom: 18px; }
.auth-card h1 { font-size: 30px; line-height: 1.12; margin: 0 0 8px; }
.auth-card h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; font-size: 22px; margin: 0 0 8px; }
.auth-sub { color: var(--text-secondary); font-size: 15.5px; line-height: 1.5; margin: 0 0 24px; }
.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; font-size: 14px; font-weight: 600; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; }
.field-link { font-weight: 500; font-size: 13.5px; color: var(--accent); }
.field-hint { font-size: 12.5px; font-weight: 400; color: var(--text-secondary); }
.field input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 400; color: var(--text);
  background: rgba(255,255,255,.85); border: 1px solid rgba(15,23,42,.12);
  box-shadow: inset 0 1px 2px rgba(15,23,42,.06); transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #a1a1aa; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,107,255,.16); background: #fff; }
.pw { position: relative; display: block; }
.pw input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.pw-meter { display: block; height: 4px; border-radius: 4px; background: rgba(15,23,42,.08); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .3s, background .3s; }
.ts-slot:empty { display: none; }
.btn-block { width: 100%; }
.form-msg { margin: 0; font-size: 14px; line-height: 1.45; min-height: 0; }
.form-msg.err { color: #d93025; } .form-msg.ok { color: #16a34a; }
.auth-card .auth-divider { margin: 22px 0 16px; }
.social { display: grid; gap: 10px; }
.social .auth-btn, .google-slot .auth-btn {
  width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; font: inherit; font-size: 15.5px; font-weight: 600; color: var(--text); cursor: pointer;
}
.google-slot { display: flex; justify-content: center; min-height: 50px; }
.auth-foot { text-align: center; font-size: 14.5px; color: var(--text-secondary); margin: 22px 0 0; }
.auth-foot a, .auth-legal a { color: var(--accent); font-weight: 600; }
.auth-legal { max-width: 440px; text-align: center; font-size: 12.5px; color: var(--text-secondary); margin: 18px 0 0; }
.auth-legal a { font-weight: 500; }
.auth-done { text-align: center; }
.done-icon { font-size: 44px; line-height: 1; margin-bottom: 12px; }
.auth-done p { color: var(--text-secondary); font-size: 15px; line-height: 1.55; margin: 0 0 20px; }
.nav-hint { font-size: 12px; }
@media (max-width: 480px) { .auth-card { padding: 28px 20px 22px; border-radius: 26px; } .nav-hint { display: none; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth-page { background: #05060d; }
  :root:not([data-theme="light"]) .auth-card { background: linear-gradient(180deg, rgba(28,30,44,.8), rgba(18,20,32,.7)); border-color: rgba(255,255,255,.12); outline-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 40px 90px -40px rgba(0,0,0,.8); }
  :root:not([data-theme="light"]) .field input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: var(--text); }
  :root:not([data-theme="light"]) .auth-aurora { opacity: .3; }
}

/* ═════════════════════════════════════════════════════════════════════
   Hình đại diện app (js/media.js): video tự phát, slider ảnh, YouTube, ảnh bìa
   ═════════════════════════════════════════════════════════════════════ */
.m-box { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b1020; }
.m-box > img, .m-box > video, .m-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-slider img { opacity: 0; transform: scale(1.04); transition: opacity .7s ease, transform 3.5s ease; }
.m-slider img.is-active { opacity: 1; transform: scale(1); }
.m-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.m-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.55); box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: width .3s, background .3s; cursor: pointer; }
.m-dots i.is-active { width: 20px; background: #fff; }
.m-cover { filter: saturate(1.05); }
.m-badge { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.12)); border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.m-badge-video::before { content: "● "; color: #ff4d6d; }
.m-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; transform: translate(-50%, -50%); border-radius: 12px; background: rgba(20,20,20,.75); z-index: 2; }
.m-play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-40%, -50%); border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.live-card:hover .m-play, .card:hover .m-play { background: #f00; }
/* Thẻ ở trang chủ + catalog dùng chung khối media */
.live-card .m-box { border-radius: 0; }
#app-grid .card .m-box { border-radius: 0; }

/* Gallery ảnh trang chi tiết */
.gallery { position: relative; max-width: var(--max-width); margin: 0 auto; }
.gallery-track { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 720px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 22px 20px; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 24px; scroll-snap-align: center; box-shadow: 0 24px 50px -28px rgba(0,0,0,.45); }
.gallery-nav { position: absolute; top: 42%; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: 20px; color: var(--text); z-index: 2;
  background: var(--glass-bg); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.gallery-nav[data-dir="-1"] { left: 8px; } .gallery-nav[data-dir="1"] { right: 8px; }
@media (max-width: 700px) { .gallery-nav { display: none; } .gallery-track { grid-auto-columns: 86%; } }
/* Nút kính trên nav sáng: chữ màu mực (nav-cta mặc định chữ trắng cho nút xanh) */
.nav .btn-ghost.nav-cta { color: var(--text); }
.nav.on-dark .btn-ghost.nav-cta { color: #fff; }
/* Nav khi đã đăng nhập */
.nav-user { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; max-width: 180px; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; flex-shrink: 0;
  background: linear-gradient(145deg, #6b98ff, #7C3AED); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 10px -4px rgba(47,107,255,.7); }
.nav-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .nav-user-name { display: none; } }

/* Trang chi tiết app: thẻ thông tin kính */
.app-meta-section { padding-top: 16px; }
.app-meta { max-width: 760px; margin: 0 auto; padding: 28px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.7)); border: 1px solid rgba(255,255,255,.95); outline: 1px solid rgba(15,23,42,.07);
  box-shadow: inset 0 1px 0 #fff, 0 30px 70px -45px rgba(30,41,80,.45); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.app-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.app-stats .stat { padding: 14px 16px; border-radius: 18px; background: var(--bg-subtle); border: 1px solid var(--divider); min-width: 0; }
.stat-label { display: block; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 4px; }
.app-stats b { font-family: var(--font-display); font-size: 18px; font-weight: 800; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-stats b small { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.app-stats .free { color: #16a34a; }
@media (max-width: 640px) { .app-stats { grid-template-columns: 1fr 1fr; } .app-meta { padding: 20px; } }
.rate-box { margin-top: 22px; }
.stars { display: flex; gap: 6px; font-size: 32px; line-height: 1; cursor: pointer; color: #FFB020; }
.stars span { transition: transform .15s; } .stars span:hover { transform: scale(1.15); }
.app-meta details { margin-top: 24px !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-meta { background: linear-gradient(180deg, rgba(28,30,44,.8), rgba(18,20,32,.7)); border-color: rgba(255,255,255,.12); outline-color: transparent; } }
