/* Trang giới thiệu app (tools/showcase/render.mjs). Nền tối mặc định, sáng theo prefers-color-scheme.
   Không phông ngoài, không CDN (CSP style-src 'self'). */
:root {
  --bg: #0b1020;
  --bg2: #111a33;
  --text: #e8ecf8;
  --dim: #9aa6c4;
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hi: rgba(255, 255, 255, 0.08);
  --green: #34d399;
  --blue: #38bdf8;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --grad: linear-gradient(120deg, var(--green), var(--blue) 55%, var(--violet));
  --radius: 18px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fc;
    --bg2: #eaf0fb;
    --text: #101828;
    --dim: #5b6782;
    --line: rgba(16, 24, 40, 0.1);
    --glass: rgba(255, 255, 255, 0.75);
    --glass-hi: #fff;
    --green: #059669;
    --blue: #0284c7;
    --violet: #7c3aed;
    --amber: #d97706;
    --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(52, 211, 153, 0.13), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
img { max-width: 100%; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- nút */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--glass); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; background: var(--glass-hi); transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #04121f; border: 0; box-shadow: 0 6px 24px rgba(56, 189, 248, 0.3); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 14px 24px; font-size: 17px; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.play { font-size: 0.8em; }

/* ---------------------------------------------------------------- thanh trên */
.lang-hint { display: flex; justify-content: center; gap: 12px; align-items: center; padding: 8px 16px; background: var(--bg2); border-bottom: 1px solid var(--line); font-size: 14px; }
.lang-hint[hidden] { display: none; }
.lang-hint-x { background: none; border: 0; color: var(--dim); font-size: 20px; cursor: pointer; line-height: 1; }
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.apk-btn { flex-shrink: 0; color: var(--text); font-weight: 600; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.apk-btn:hover { text-decoration: none; border-color: var(--dim); }
.top-nav { display: flex; gap: 22px; margin-left: auto; }
.top-nav a { color: var(--dim); font-weight: 500; font-size: 15px; }
.top-nav a:hover { color: var(--text); text-decoration: none; }
.lang { color: var(--dim); font-weight: 700; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.lang:hover { color: var(--text); text-decoration: none; }
@media (max-width: 860px) {
  .top-nav { display: none; }
  .lang { margin-left: auto; }
}
@media (max-width: 480px) {
  .top-cta { display: none; }
  .brand span { font-size: 15px; }
  .top-in { gap: 10px; }
  .apk-btn { padding: 4px 9px; font-size: 12px; }
}

/* ---------------------------------------------------------------- hero */
.hero { padding: 72px 0 40px; }
.hero-in { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.kicker { display: inline-block; color: var(--green); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-size: clamp(42px, 7vw, 76px); font-weight: 850; letter-spacing: -0.03em; }
.hero h1 span { display: block; }
.hero h1 .l2 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 22px; font-size: 18px; color: var(--dim); max-width: 600px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 440px; width: 100%; justify-self: center; display: grid; place-items: center; }
.orb { position: absolute; inset: 12%; border-radius: 50%; background: var(--grad); filter: blur(60px); opacity: 0.35; }
.hero-logo { position: relative; border-radius: 30px; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.cloud { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.cloud li { position: absolute; animation: float 7s ease-in-out infinite; }
.cloud-ic { width: 58px; height: 58px; border-radius: 15px; display: block; box-shadow: var(--shadow); background: var(--glass-hi); object-fit: cover; }
.cloud .app-ic-empty { display: grid; place-items: center; font-weight: 800; }
.cloud .c0 { top: 2%; left: 38%; }
.cloud .c1 { top: 12%; left: 8%; animation-delay: -1s; }
.cloud .c2 { top: 10%; right: 6%; animation-delay: -2s; }
.cloud .c3 { top: 40%; left: 0; animation-delay: -3s; }
.cloud .c4 { top: 38%; right: 0; animation-delay: -4s; }
.cloud .c5 { bottom: 12%; left: 8%; animation-delay: -5s; }
.cloud .c6 { bottom: 10%; right: 8%; animation-delay: -6s; }
.cloud .c7 { bottom: 0; left: 40%; animation-delay: -2.5s; }
.cloud .c8 { top: 24%; left: 24%; animation-delay: -3.5s; transform: scale(0.8); }
.cloud .c9 { top: 22%; right: 22%; animation-delay: -4.5s; }
.cloud .c10 { bottom: 24%; left: 24%; animation-delay: -1.5s; }
.cloud .c11 { bottom: 22%; right: 24%; animation-delay: -5.5s; }
.cloud .c8 .cloud-ic, .cloud .c9 .cloud-ic, .cloud .c10 .cloud-ic, .cloud .c11 .cloud-ic { width: 44px; height: 44px; border-radius: 12px; opacity: 0.85; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { max-width: 240px; order: -1; margin-bottom: -10px; }
  .hero-logo { width: 88px; height: 88px; border-radius: 22px; }
  .cloud-ic { width: 42px; height: 42px; border-radius: 11px; }
  .cloud .c8 .cloud-ic, .cloud .c9 .cloud-ic, .cloud .c10 .cloud-ic, .cloud .c11 .cloud-ic { width: 32px; height: 32px; border-radius: 9px; }
}

.stats { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats li { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; backdrop-filter: blur(10px); }
.stats strong { display: block; font-size: clamp(28px, 4vw, 40px); font-weight: 850; letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stats span { color: var(--dim); font-size: 14px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------------- mục */
.sec { padding: 64px 0; }
.sec h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.sec-lead { color: var(--dim); margin-top: 10px; max-width: 720px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 28px 0 22px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
.tab { padding: 8px 16px; border-radius: 999px; color: var(--dim); font-weight: 600; font-size: 15px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab[aria-selected='true'] { background: var(--glass-hi); color: var(--text); box-shadow: 0 1px 0 var(--line) inset, 0 2px 10px rgba(0, 0, 0, 0.15); }
.tab .count { font-size: 12px; color: var(--dim); margin-left: 4px; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .tab { flex: none; padding: 8px 12px; font-size: 14px; }
}
.search { flex: 1 1 260px; max-width: 360px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--text); font: inherit; }
.search::placeholder { color: var(--dim); }

.panel + .panel { margin-top: 40px; }
.panel-title { font-size: 18px; margin-bottom: 14px; }
.js .panel-title { display: none; }
.js .panel[data-inactive] { display: none; }
.js .panel + .panel { margin-top: 0; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.app {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(10px); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.app:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); box-shadow: var(--shadow); }
.app-pin { grid-column: span 2; background: linear-gradient(140deg, color-mix(in srgb, var(--green) 10%, transparent), color-mix(in srgb, var(--violet) 10%, transparent)), var(--glass); }
@media (max-width: 600px) { .app-pin { grid-column: auto; } }
.app[hidden], .app.is-more { display: none; }
.app-top { display: flex; gap: 12px; align-items: flex-start; }
.app-ic { width: 56px; height: 56px; border-radius: 14px; flex: none; object-fit: cover; background: var(--glass-hi); box-shadow: 0 0 0 1px var(--line); }
.app-ic-empty { display: grid; place-items: center; font-weight: 800; font-size: 22px; color: var(--text); background: var(--grad); }
.app-id { min-width: 0; flex: 1; }
/* Nhãn nằm trên tên (không chung hàng) — chung hàng thì tên dài bị bóp còn vài chữ/dòng, gãy giữa từ. */
.app-id h3 { font-size: 16px; font-weight: 700; overflow-wrap: break-word; }
.pkg { color: var(--dim); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; margin-bottom: 6px; font-size: 11px; font-weight: 700; line-height: 1.5; padding: 1px 9px; border-radius: 999px; letter-spacing: 0.02em; border: 1px solid; }
.badge-production { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.badge-testing, .badge-closed { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, transparent); background: color-mix(in srgb, var(--blue) 10%, transparent); }
.badge-partner, .badge-new { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent); }
.app-tag { color: var(--dim); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.app-pin .app-tag { -webkit-line-clamp: 3; line-clamp: 3; }
.app-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--dim); }
.star { color: var(--amber); }
/* Chữ nút dài ("Test it together → get Test chéo 12 tester") được xuống dòng, không tràn khỏi thẻ. */
.app .btn { margin-top: auto; align-self: flex-start; max-width: 100%; white-space: normal; text-align: center; line-height: 1.35; }
.btn-join { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.more { margin: 20px auto 0; display: flex; }
.more[hidden] { display: none; }
.empty { padding: 28px; text-align: center; color: var(--dim); background: var(--glass); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty[hidden] { display: none; }
.updated { margin-top: 18px; font-size: 13px; text-align: right; }

.steps { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; }
.steps li, .feats li { position: relative; padding: 24px 22px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); }
.step-n { position: absolute; top: 16px; right: 18px; font-weight: 850; font-size: 40px; line-height: 1; color: var(--line); }
.step-ic, .feat-ic { font-size: 30px; display: block; margin-bottom: 14px; }
.steps h3, .feats h3 { font-size: 17px; margin-bottom: 8px; }
.steps p, .feats p { color: var(--dim); font-size: 14px; }
.feats { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 960px) { .steps, .feats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps, .feats { grid-template-columns: 1fr; } }

.band { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding: 32px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(120deg, color-mix(in srgb, var(--amber) 14%, transparent), color-mix(in srgb, var(--violet) 12%, transparent)), var(--glass); }
.band h2 { font-size: clamp(24px, 3vw, 32px); }
.band p { color: var(--dim); margin-top: 8px; max-width: 620px; }

details { border: 1px solid var(--line); border-radius: 14px; background: var(--glass); margin-top: 10px; }
summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; position: relative; padding-right: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 20px; top: 50%; translate: 0 -50%; font-size: 22px; color: var(--dim); transition: rotate 0.2s ease; }
details[open] summary::after { rotate: 45deg; }
details p { padding: 0 20px 18px; color: var(--dim); }
#faq h2 { margin-bottom: 20px; }

.cta { text-align: center; }
.cta p { color: var(--dim); margin: 12px auto 26px; max-width: 560px; }

.foot { border-top: 1px solid var(--line); padding: 30px 0 40px; margin-top: 20px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.foot-in p:first-child { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.foot-in img { border-radius: 5px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot nav a { color: var(--dim); font-size: 14px; }
.foot .small { flex-basis: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud li { animation: none; }
  .app, .btn { transition: none; }
  .app:hover, .btn:hover { transform: none; }
}
