/* NGHE Game Studio — Minimalist Inset Neumorphism (Soft UI) in Light & Midnight Navy */
:root {
  color-scheme: light;
  --bg: #F2F3F7;
  --bg-bar: rgba(242, 243, 247, 0.85);
  --well: #EAECEF;
  --well-deep: #E1E4EB;
  --card: #F5F6FA;
  --ink: #171C26;
  --text: #4B5364;
  --muted: #5A6374;
  --line: rgba(23, 28, 38, 0.07);
  --rim: rgba(255, 255, 255, 0.78);
  --sh-dark: rgba(168, 177, 196, 0.52);
  --sh-light: rgba(255, 255, 255, 0.94);

  --neu-inset: inset 6px 6px 16px rgba(168, 177, 196, 0.46), inset -6px -6px 16px rgba(255, 255, 255, 0.95);
  --neu-sunk: inset 4px 4px 10px rgba(154, 165, 186, 0.58), inset -3px -3px 8px rgba(255, 255, 255, 0.82);
  --neu-inset-sm: inset 2.5px 2.5px 6px rgba(168, 177, 196, 0.50), inset -2.5px -2.5px 6px rgba(255, 255, 255, 0.94);
  --neu-raised: 6px 6px 14px rgba(168, 177, 196, 0.42), -4px -4px 11px rgba(255, 255, 255, 0.95);
  --neu-raised-sm: 3px 3px 7px rgba(168, 177, 196, 0.40), -2px -2px 6px rgba(255, 255, 255, 0.92);
  --neu-pocket: inset 3px 3px 8px rgba(168, 177, 196, 0.44), inset -3px -3px 8px rgba(255, 255, 255, 0.86);

  --blue: #2F6FDE;
  --purple: #6E56CF;
  --teal: #1A8F6E;
  --soon-fg: #2458B8;
  --soon-bg: rgba(47, 111, 222, 0.09);
  --soon-bd: rgba(47, 111, 222, 0.20);
  --sans: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #162032;
  --bg-bar: rgba(22, 32, 50, 0.85);
  --well: #121A2A;
  --well-deep: #0D1422;
  --card: #1A263B;
  --ink: #EEF4FC;
  --text: #B0C0D8;
  --muted: #7D91B0;
  --line: rgba(140, 178, 240, 0.08);
  --rim: rgba(140, 178, 240, 0.09);
  --sh-dark: rgba(6, 10, 19, 0.70);
  --sh-light: rgba(44, 66, 102, 0.28);

  --neu-inset: inset 5px 5px 13px rgba(6, 10, 19, 0.72), inset -4px -4px 10px rgba(44, 66, 102, 0.28);
  --neu-sunk: inset 5px 5px 12px rgba(4, 7, 14, 0.82), inset -2px -2px 7px rgba(40, 60, 94, 0.20);
  --neu-inset-sm: inset 2.5px 2.5px 6px rgba(6, 10, 19, 0.70), inset -2px -2px 5px rgba(44, 66, 102, 0.28);
  --neu-raised: 6px 7px 16px rgba(6, 10, 19, 0.56), -3px -3px 9px rgba(44, 66, 102, 0.24);
  --neu-raised-sm: 3px 3px 7px rgba(6, 10, 19, 0.52), -2px -2px 5px rgba(44, 66, 102, 0.22);
  --neu-pocket: inset 3.5px 3.5px 8px rgba(6, 10, 19, 0.60), inset -2.5px -2.5px 7px rgba(42, 62, 96, 0.22);

  --blue: #6AA3FF;
  --purple: #A390F7;
  --teal: #40C79E;
  --soon-fg: #96BFFF;
  --soon-bg: rgba(106, 163, 255, 0.12);
  --soon-bd: rgba(106, 163, 255, 0.24);
}

html[data-theme="dark"] body {
  background-image: radial-gradient(ellipse 90% 45% at 50% 0%, rgba(95, 145, 235, 0.09), transparent 70%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .22s ease, color .22s ease;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* one language visible at a time */
html[data-lang="vi"] [lang="en"],
html[data-lang="en"] [lang="vi"] { display: none !important; }

.nowrap { white-space: nowrap; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-bar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand img { height: 26px; width: auto; }
html[data-theme="dark"] .brand img { filter: invert(1) brightness(1.06); }
.brand span {
  font: 500 9.5px/1 var(--sans);
  letter-spacing: .34em;
  margin-right: -.34em;
  color: var(--ink);
}

.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav > a, .nav summary {
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  padding: 20px 0;
  transition: color .15s ease;
}
.nav > a:hover, .nav summary:hover { color: var(--blue); }
.nav details { position: relative; }
.nav summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; user-select: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: translateY(-1.5px) rotate(45deg);
  transition: transform .18s ease, border-color .18s ease;
}
.nav details[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
  border-color: var(--blue);
}

.drop {
  position: absolute;
  top: calc(100% + 4px);
  left: -14px;
  min-width: 210px;
  background: var(--card);
  border: 1px solid var(--rim);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--neu-raised);
}
.drop a {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  transition: box-shadow .15s ease, background-color .15s ease;
}
.drop a:hover {
  background: var(--well);
  box-shadow: var(--neu-inset-sm);
}

/* soft inset controls in header */
.prefs { display: inline-flex; align-items: center; gap: 10px; }
.seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  background: var(--well);
  box-shadow: var(--neu-inset-sm);
}
.seg button {
  background: transparent;
  border: 0;
  height: 26px;
  padding: 0 11px;
  border-radius: 8px;
  font: 600 12px/1 var(--sans);
  color: var(--muted);
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--neu-raised-sm);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--rim);
  border-radius: 11px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--neu-raised-sm);
  cursor: pointer;
  transition: box-shadow .16s ease, background-color .16s ease, transform .12s ease;
}
.theme-btn:hover { color: var(--blue); }
.theme-btn:active { background: var(--well); box-shadow: var(--neu-inset-sm); }
.theme-btn .ic-sun { display: none; }
html[data-theme="dark"] .theme-btn .ic-sun { display: block; }
html[data-theme="dark"] .theme-btn .ic-moon { display: none; }

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--rim);
  border-radius: 11px;
  box-shadow: var(--neu-raised-sm);
  color: var(--ink);
  width: 40px;
  height: 36px;
  font-size: 17px;
  cursor: pointer;
}
.top.open .menu-btn {
  background: var(--well);
  box-shadow: var(--neu-inset-sm);
}

/* soft pill tags */
.pill {
  display: inline-block;
  flex-shrink: 0;
  font: 600 11px/1 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--well);
  box-shadow: var(--neu-inset-sm);
  white-space: nowrap;
}
/* a tag inside an already-sunk card stays flat: no third level of depth */
.card.lab .pill { background: var(--well-deep); box-shadow: none; }
.pill.soon {
  color: var(--soon-fg);
  background: var(--soon-bg);
  border: 1px solid var(--soon-bd);
  box-shadow: none;
}

/* typography */
h1, h2, h3 {
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: -.02em;
  line-height: 1.18;
  margin: 0;
  text-wrap: balance;
}
p, li, dd { text-wrap: pretty; }
h1 { font-size: clamp(38px, 5.8vw, 64px); font-weight: 700; margin: 0 0 16px; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; }
h3 { font-size: 18.5px; font-weight: 600; }
.lead { font-size: 19px; color: var(--ink); font-weight: 500; max-width: 620px; margin: 0; }
.sublead { font-size: 16px; color: var(--text); max-width: 580px; margin: 8px 0 0; }

/* tactile buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font: 600 15px/1.2 var(--sans);
  border: 1px solid transparent;
  box-shadow: var(--neu-raised-sm);
  transition: transform .14s ease, opacity .14s ease, box-shadow .16s ease;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn.line {
  background: var(--card);
  color: var(--ink);
  border-color: var(--rim);
  box-shadow: var(--neu-raised-sm);
}
.btn.line:hover {
  opacity: 1;
  background: var(--well);
  box-shadow: var(--neu-inset-sm);
  transform: none;
}

/* hero — soft inset showcase tray */
.hero { padding: 44px 0 28px; }
.hero-well {
  background: var(--well);
  border-radius: 28px;
  padding: 56px 52px;
  box-shadow: var(--neu-inset);
}
.hero .actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

/* sections — clean breathing space without harsh horizontal lines */
section.block { padding: 36px 0; scroll-margin-top: 76px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }

/* What we do — 3 soft inset wells */
.genres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.genres > div {
  background: var(--well);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--neu-inset);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.genre-bar {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: var(--c);
  margin-bottom: 4px;
}
.genres p { margin: 0; font-size: 15px; }

/* Products — Soft Sculpted Folder-Well Dashboard */
.dash-shell {
  width: 100%;
  background: var(--well);
  border-radius: 28px;
  box-shadow: var(--neu-inset);
  overflow: hidden;
}
.dash-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}
.dash-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 20px 28px;
  border: 0;
  text-align: left;
  font-family: var(--sans);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
/* Active tab flows seamlessly with .dash-body inside the big well */
.dash-tab[aria-selected="true"] {
  background: transparent;
  color: var(--ink);
}
/* Inactive tab sinks smoothly inside the corner of the big well — no floating pill */
.dash-tab[aria-selected="false"] {
  background: var(--well-deep);
  color: var(--muted);
  box-shadow: var(--neu-sunk);
}
.dash-tab:first-child[aria-selected="false"] {
  border-radius: 28px 0 22px 0;
}
.dash-tab:last-child[aria-selected="false"] {
  border-radius: 0 28px 0 22px;
}
.dash-tab[aria-selected="false"]:hover {
  background: var(--well);
}

.dash-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dash-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--muted);
  opacity: .45;
  transition: background-color .16s ease, opacity .16s ease, box-shadow .16s ease;
}
.dash-tab[aria-selected="true"] .dash-dot {
  background: var(--blue);
  opacity: 1;
  box-shadow: 0 0 0 4px var(--soon-bg);
}
.dash-tab strong {
  font: 600 16.5px/1.25 var(--sans);
  color: var(--muted);
  transition: color .15s ease;
}
.dash-tab[aria-selected="true"] strong {
  color: var(--ink);
}
.dash-tab[aria-selected="false"]:hover strong {
  color: var(--ink);
}
.dash-tag {
  font: 400 12px/1 var(--mono);
  color: var(--muted);
  white-space: nowrap;
}

.dash-body {
  padding: 18px 26px 26px;
}

.products { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.products[hidden] { display: none; }
.card {
  background: var(--card);
  border: 1px solid var(--rim);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--neu-raised);
  scroll-margin-top: 156px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card.lab {
  background: var(--well);
  border: 0;
  box-shadow: var(--neu-pocket);
}
.prod-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.prod { display: flex; gap: 14px; align-items: center; min-width: 0; }
.prod img {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 15px;
  box-shadow: var(--neu-raised-sm);
}
.app-icon {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 15px;
  background: var(--well);
  box-shadow: var(--neu-inset-sm);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lab-icon {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 15px;
  background: var(--card);
  border: 1px solid var(--rim);
  box-shadow: var(--neu-raised-sm);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.prod h3 { font-size: 19px; margin-bottom: 3px; }
.meta { display: block; font: 400 12.5px/1.4 var(--mono); color: var(--muted); }
.card p { margin: 0; font-size: 15px; }

/* Contact — Soft Inset Well */
.contact-well {
  background: var(--well);
  border-radius: 26px;
  padding: 34px 38px;
  box-shadow: var(--neu-inset);
}
.contact-mail {
  display: inline-block;
  font: 600 clamp(17.5px, 4.6vw, 31px)/1.3 var(--sans);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
  word-break: break-word;
  transition: color .15s ease;
}
.contact-mail:hover { color: var(--blue); }
.kv { margin: 0; display: flex; flex-wrap: wrap; gap: 14px 18px; }
.kv div {
  background: var(--card);
  border: 1px solid var(--rim);
  border-radius: 15px;
  padding: 12px 20px;
  box-shadow: var(--neu-raised-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  flex: 1;
}
.kv dt { font: 500 12px var(--mono); color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; }
.kv a { text-decoration: none; }
.kv a:hover { color: var(--blue); }

footer { padding: 28px 0 40px; margin-top: 20px; }
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font: 400 13px var(--mono);
  color: var(--muted);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* privacy / legal */
.sub-nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.sub-nav > a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.sub-nav > a:hover { color: var(--blue); }
.wrap.doc { max-width: 780px; padding: 40px 16px 80px; }
.doc > div {
  background: var(--well);
  border-radius: 26px;
  padding: 20px 34px 34px;
  box-shadow: var(--neu-inset);
}
.doc h1 { margin-top: 14px; font-size: clamp(28px, 4.8vw, 40px); }
.doc h2 { font-size: 17px; margin-top: 28px; scroll-margin-top: 84px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--ink); }
.doc a { color: var(--blue); }

/* mobile */
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .menu-btn { display: inline-flex; }
  .top .nav {
    position: absolute;
    top: 68px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--card);
    border: 1px solid var(--rim);
    border-radius: 20px;
    display: none;
    padding: 8px 18px 18px;
    box-shadow: var(--neu-raised);
  }
  .top.open .nav { display: flex; }
  .nav > a { padding: 14px 0; border-bottom: 1px solid var(--line); display: block; }
  .nav details { border-bottom: 1px solid var(--line); }
  .nav summary { padding: 14px 0; display: flex; justify-content: space-between; width: 100%; }
  .drop { position: static; border: 0; box-shadow: none; background: transparent; padding: 0 0 10px 10px; }
  .drop a { padding: 8px 10px; }
  .nav .prefs { margin-top: 14px; align-self: flex-start; }

  .hero { padding: 24px 0 16px; }
  .hero-well { padding: 34px 24px; border-radius: 24px; }
  .lead { font-size: 17.5px; }
  .sublead { font-size: 15px; }

  section.block { padding: 24px 0; }
  .sec-head { margin-bottom: 16px; }
  .genres { grid-template-columns: 1fr; gap: 16px; }
  .genres > div { padding: 22px; border-radius: 20px; }

  .dash-shell { border-radius: 22px; }
  .dash-tab { padding: 15px 16px; }
  .dash-tab:first-child[aria-selected="false"] { border-radius: 22px 0 18px 0; }
  .dash-tab:last-child[aria-selected="false"] { border-radius: 0 22px 0 18px; }
  .dash-tab strong { font-size: 14px; }
  .dash-tag { display: none; }
  .dash-body { padding: 14px 14px 16px; }

  .products { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 20px; border-radius: 18px; scroll-margin-top: 84px; }
  .prod-head { flex-wrap: wrap; }
  .contact-well { padding: 24px 18px; border-radius: 22px; }
  .kv { gap: 12px; }
  .kv div:first-child { flex-basis: 100%; }
  .kv div { flex: 1 1 136px; min-width: 0; padding: 11px 14px; }
  .kv dd { font-size: 14.5px; white-space: nowrap; }
  .doc > div { padding: 14px 22px 26px; border-radius: 22px; }
}

/* product card navigation */
.card-actions { margin-top: auto; padding-top: 4px; display: flex; }
.card-btn { padding: 10px 18px; font-size: 14.5px; gap: 8px; }
.card-btn .arr { transition: transform .16s ease; }
.card-btn:hover .arr { transform: translateX(3px); }
.card-btn.is-disabled { cursor: default; color: var(--muted); background: var(--well); border-color: transparent; box-shadow: var(--neu-inset-sm); opacity: .85; }
.card-btn.is-disabled:hover { transform: none; opacity: .85; }
/* the whole DGD card opens the game page; the visible button stays the main target */
.card.has-link { position: relative; transition: transform .16s ease, box-shadow .16s ease; }
.card.has-link:hover { transform: translateY(-2px); }
.card.has-link .card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card.has-link .card-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
