/* 8GB Vibe - 8gb.beeca.vn. Nền tối và sáng theo hệ thống. */
:root {
  /* Lục bảo, khớp Palette.accent trong app (Sources/EightGBVibe/StyledComponents.swift). */
  --luc-dam: #058C66;
  --luc-sang: #14B880;
  --gradient: linear-gradient(135deg, var(--luc-dam), var(--luc-sang));
  /* Nền có chữ trắng: tông đậm hơn để đủ tương phản (chữ trắng trên #14B880 chỉ 2,6:1). */
  --gradient-nut: linear-gradient(135deg, #04704F, var(--luc-dam));
  --gradient-chu: linear-gradient(135deg, #04704F, var(--luc-dam));
  --nen: #f5f8f6;
  --nen-2: #e9f0ec;
  --the: #ffffff;
  --vien: rgba(15, 45, 32, .10);
  --chu: #121a16;
  --chu-phu: #4f5e57;
  --nhan-nen: rgba(5, 140, 102, .12);
  --nhan-chu: #04704F;
  --bong: 0 1px 2px rgba(15,45,32,.06), 0 12px 32px -12px rgba(15,45,32,.18);
  --bo: 16px;
  --rong: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --gradient-chu: linear-gradient(135deg, var(--luc-sang), #4ADE9F);
    --nen: #0b110e;
    --nen-2: #111a16;
    --the: #17211c;
    --vien: rgba(255, 255, 255, .09);
    --chu: #eef4f1;
    --chu-phu: #9db0a7;
    --nhan-nen: rgba(20, 184, 128, .16);
    --nhan-chu: #5EE0AE;
    --bong: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--nen);
  color: var(--chu);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin-bottom: 16px; }
h3 { font-size: 18px; font-weight: 650; margin-bottom: 6px; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--luc-sang); outline-offset: 3px; border-radius: 6px; }

.khung { width: 100%; max-width: var(--rong); margin: 0 auto; padding: 0 20px; }
.khung-hep { max-width: 780px; }

/* Đầu trang */
.dau {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--nen) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--vien);
}
.dau-trong { display: flex; align-items: center; gap: 24px; height: 60px; }
.thuong-hieu { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; }
.thuong-hieu img { border-radius: 8px; }
.menu { display: flex; gap: 22px; margin-left: auto; }
.menu a { text-decoration: none; color: var(--chu-phu); font-size: 15px; }
.menu a:hover { color: var(--chu); }

/* Nút */
.nut {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; font-weight: 600; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--gradient-nut); color: #fff;
  box-shadow: 0 8px 24px -8px rgba(5, 140, 102, .65);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.nut:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 28px -8px rgba(5, 140, 102, .75); }
.nut:active { transform: translateY(0); }
.nut-nho { padding: 8px 16px; font-size: 14px; }
.nut-lon { padding: 15px 30px; font-size: 18px; }
.nut-phu {
  padding: 15px 26px; font-size: 18px;
  background: var(--the); color: var(--chu); box-shadow: none; border: 1px solid var(--vien);
}
.nut-phu:hover { box-shadow: var(--bong); }

/* Hero */
.hero { position: relative; padding: 72px 0 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 760px; z-index: -1;
  background:
    radial-gradient(40% 50% at 35% 40%, rgba(5, 140, 102, .26), transparent 70%),
    radial-gradient(35% 45% at 68% 35%, rgba(20, 184, 128, .22), transparent 70%);
  filter: blur(10px);
}
.hero-trong { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-icon { width: 112px; height: 112px; filter: drop-shadow(0 18px 30px rgba(5, 140, 102, .45)); margin-bottom: 20px; }
.nhan {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--nhan-nen); color: var(--nhan-chu);
  font-size: 14px; font-weight: 650; margin-bottom: 14px;
}
.hero h1 { font-size: clamp(44px, 8vw, 76px); font-weight: 800; letter-spacing: -0.035em; }
.khau-hieu {
  font-size: clamp(22px, 3.4vw, 32px); font-weight: 650; margin-top: 6px;
  background: var(--gradient-chu); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mo-ta { max-width: 600px; color: var(--chu-phu); font-size: 19px; margin-top: 16px; }
.hanh-dong { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.yeu-cau { color: var(--chu-phu); font-size: 15px; margin-top: 16px; }
.phien-ban { color: var(--chu-phu); font-size: 13px; margin-top: 4px; opacity: .85; }

.anh-chinh { margin: 56px auto 0; max-width: 1000px; }
.anh-chinh img, .anh-tab img {
  border-radius: 1.9% / 2.8%;
  box-shadow: 0 30px 80px -20px rgba(10, 50, 35, .45), 0 0 0 1px var(--vien);
}

/* Mục */
.muc { padding: 88px 0; }
.muc-nen { background: var(--nen-2); }
.mo-dau {
  font-size: 14px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em;
  color: var(--nhan-chu); margin-bottom: 10px;
}
.dan { color: var(--chu-phu); font-size: 19px; max-width: 760px; }

.so-lieu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px 0; }
.o-so {
  background: var(--the); border: 1px solid var(--vien); border-radius: var(--bo);
  padding: 22px 20px; box-shadow: var(--bong);
}
.o-so b {
  display: block; font-size: 30px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15;
  background: var(--gradient-chu); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.o-so span { display: block; color: var(--chu-phu); font-size: 15px; margin-top: 6px; line-height: 1.45; }
.hai-cot { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.hai-cot p { color: var(--chu-phu); }
.ghi-nguon { color: var(--chu-phu); font-size: 13px; margin-top: 28px; opacity: .8; }

/* Tính năng */
.luoi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.the {
  background: var(--the); border: 1px solid var(--vien); border-radius: var(--bo);
  padding: 24px 22px; box-shadow: var(--bong);
  transition: transform .2s ease;
}
.the:hover { transform: translateY(-2px); }
.the p { color: var(--chu-phu); font-size: 15px; line-height: 1.55; }
.bieu-tuong {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center; background: var(--gradient-nut);
}
.bieu-tuong svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Ảnh chụp */
.tab-anh {
  display: inline-flex; gap: 4px; padding: 4px; margin: 20px 0 28px;
  background: var(--nen-2); border: 1px solid var(--vien); border-radius: 999px;
}
.tab-anh button {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--chu-phu);
  background: transparent; border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer;
}
.tab-anh button[aria-selected="true"] { background: var(--the); color: var(--chu); box-shadow: var(--bong); }
.anh-tab { margin: 0; }
.anh-tab figcaption { color: var(--chu-phu); font-size: 15px; margin-top: 16px; text-align: center; }
.cho-anh {
  aspect-ratio: 16 / 11; border: 2px dashed var(--vien); border-radius: var(--bo);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 24px; color: var(--chu-phu); background: var(--the);
}
.cho-anh p { max-width: 420px; }

/* An toàn */
.danh-sach-an-toan {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px;
}
.danh-sach-an-toan li {
  position: relative; padding: 14px 16px 14px 50px; color: var(--chu-phu);
  background: var(--the); border: 1px solid var(--vien); border-radius: 14px;
}
.danh-sach-an-toan li b { color: var(--chu); }
.danh-sach-an-toan li::before {
  content: ""; position: absolute; left: 16px; top: 17px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gradient) no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a11 11 0 1 0 0 22 11 11 0 0 0 0-22zm-1.3 15.6-4.5-4.4 1.4-1.4 3.1 3 6.2-6.2 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a11 11 0 1 0 0 22 11 11 0 0 0 0-22zm-1.3 15.6-4.5-4.4 1.4-1.4 3.1 3 6.2-6.2 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Cài đặt */
.buoc { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.buoc li {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--the); border: 1px solid var(--vien); border-radius: var(--bo); padding: 22px; box-shadow: var(--bong);
}
.buoc p { color: var(--chu-phu); font-size: 15px; }
.so-buoc {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--gradient-nut);
}
.meo {
  margin-top: 20px; padding: 14px 18px; border-radius: 12px; font-size: 15px;
  background: var(--nhan-nen); color: var(--chu);
}
.kiem-tra { margin-top: 20px; }
.kiem-tra summary { cursor: pointer; color: var(--chu-phu); font-size: 15px; }
.kiem-tra p { color: var(--chu-phu); font-size: 15px; margin-top: 10px; }
pre, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13.5px; }
pre {
  background: var(--the); border: 1px solid var(--vien); border-radius: 10px;
  padding: 12px 14px; overflow-x: auto; margin: 10px 0 0;
}
.ma-sha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ma-sha code { word-break: break-all; }
.nut-chep {
  font: inherit; font-size: 13px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  background: var(--the); color: var(--chu); border: 1px solid var(--vien);
}

/* Hỏi đáp */
.hoi-dap { margin-top: 28px; display: grid; gap: 10px; }
.hoi-dap details {
  background: var(--the); border: 1px solid var(--vien); border-radius: 14px; padding: 0 20px;
}
.hoi-dap summary {
  cursor: pointer; list-style: none; font-weight: 600; padding: 18px 28px 18px 0; position: relative;
}
.hoi-dap summary::-webkit-details-marker { display: none; }
.hoi-dap summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--chu-phu); transition: transform .2s ease;
}
.hoi-dap details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.hoi-dap details p { color: var(--chu-phu); padding-bottom: 18px; }

/* Kêu gọi cuối */
.cuoi { text-align: center; }
.cuoi-trong { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cuoi-trong img { filter: drop-shadow(0 14px 24px rgba(5, 140, 102, .4)); }
.cuoi-trong > p { color: var(--chu-phu); margin-bottom: 12px; }
.cuoi h2 { margin-bottom: 0; margin-top: 8px; }

/* Chân trang */
.chan { border-top: 1px solid var(--vien); padding: 32px 0 40px; font-size: 14px; color: var(--chu-phu); }
.chan-trong { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.chan-trong p:last-child { margin-left: auto; }
.beeca { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.beeca img { height: 32px; width: auto; }
.beeca b { color: var(--chu); }
.chan a:hover { color: var(--chu); }

/* Màn hình vừa */
@media (max-width: 960px) {
  .luoi { grid-template-columns: repeat(2, 1fr); }
  .so-lieu { grid-template-columns: repeat(2, 1fr); }
}
/* Điện thoại */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu { display: none; }
  .dau-trong { justify-content: space-between; }
  .hero { padding: 48px 0 40px; }
  .hero-icon { width: 88px; height: 88px; }
  .mo-ta { font-size: 17px; }
  .hanh-dong { flex-direction: column; width: 100%; max-width: 340px; }
  .nut-lon, .nut-phu { width: 100%; }
  .anh-chinh { margin-top: 36px; }
  .muc { padding: 64px 0; }
  .dan { font-size: 17px; }
  .hai-cot, .danh-sach-an-toan, .buoc { grid-template-columns: 1fr; }
  .so-lieu { gap: 12px; }
  .o-so { padding: 18px 16px; }
  .o-so b { font-size: 24px; }
  .tab-anh { display: flex; width: 100%; }
  .tab-anh button { flex: 1; padding: 8px 6px; font-size: 14px; }
  .chan-trong { flex-direction: column; align-items: flex-start; gap: 10px; }
  .chan-trong p:last-child { margin-left: 0; }
}
@media (max-width: 480px) {
  .luoi { grid-template-columns: 1fr; }
}
.o-so b i {
  display: block; font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: 0;
  color: var(--chu-phu); -webkit-text-fill-color: var(--chu-phu); margin-bottom: 2px;
}

/* Tên thương hiệu: "8GB" là chính, "Vibe" là phụ */
.ten b { font-weight: 800; }
.ten span { font-weight: 400; color: var(--chu-phu); }
.thuong-hieu .ten span { font-weight: 500; }
