/* KGame – k-gg.pics | vi-VN game info portal */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
  --bg: #070d18;
  --bg-2: #0d1628;
  --bg-3: #132038;
  --surface: rgba(18, 32, 56, 0.72);
  --line: rgba(120, 160, 220, 0.16);
  --text: #e8eef8;
  --muted: #93a4bd;
  --blue: #2f84ff;
  --blue-2: #5aa2ff;
  --cyan: #3fd0ff;
  --gold: #e0b45a;
  --danger: #ff5d6c;
  --ok: #35d09a;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --max: 1180px;
  --font: 'Be Vietnam Pro', sans-serif;
  --display: 'Sora', 'Be Vietnam Pro', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47, 132, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(63, 208, 255, 0.1), transparent 50%),
    linear-gradient(180deg, #08101c 0%, var(--bg) 40%, #050a12 100%);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-2); text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { color: var(--cyan); }
ul, ol { padding-left: 1.2rem; }
h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.25;
  margin: 0 0 .6em;
  letter-spacing: -0.02em;
}
p { margin: 0 0 1rem; color: var(--muted); }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 13, 24, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  max-height: var(--header-h);
  overflow: hidden;
  max-width: min(180px, 48vw);
}
.brand img {
  height: 40px;
  width: auto;
  max-width: 100%;
  max-height: calc(var(--header-h) - 24px);
  object-fit: contain;
}
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-desktop a {
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
  opacity: .88;
}
.nav-desktop a:hover,
.nav-desktop a.active { color: var(--cyan); opacity: 1; }
.header-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .62rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #1a5fd4);
  color: #fff;
  box-shadow: 0 8px 24px rgba(47, 132, 255, 0.28);
}
.btn-primary:hover { color: #fff; }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--blue-2); color: var(--cyan); }
.btn-lg { padding: .85rem 1.4rem; font-size: 1rem; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: .45rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: .45rem .7rem;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: .88rem;
}
.menu-toggle svg { width: 22px; height: 22px; flex-shrink: 0; }
.menu-toggle .icon-close { display: none; }
.menu-toggle.is-open .icon-menu { display: none; }
.menu-toggle.is-open .icon-close { display: block; }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: rgba(8, 14, 26, 0.97);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.4rem;
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.nav-mobile.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-mobile ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: .15rem;
}
.nav-mobile a {
  display: block;
  padding: .75rem .5rem;
  color: var(--text);
  font-weight: 500;
  border-radius: 8px;
}
.nav-mobile a:hover { background: var(--bg-3); color: var(--cyan); }
.nav-mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

@media (max-width: 960px) {
  .nav-desktop, .header-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-mobile { display: block; }
  :root { --header-h: 64px; }
  .brand img { height: 34px; }
}

/* Main offset */
main { padding-top: var(--header-h); }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 10, 20, 0.92) 0%, rgba(5, 10, 20, 0.72) 48%, rgba(5, 10, 20, 0.45) 100%),
    linear-gradient(180deg, rgba(5, 10, 20, 0.2) 0%, rgba(5, 10, 20, 0.85) 100%);
}
.hero-content {
  padding: 4.5rem 0 4rem;
  max-width: 640px;
  animation: rise .8s ease both;
}
.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 .5rem;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 30px rgba(47, 132, 255, 0.35);
}
.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .85rem;
}
.hero .lead {
  font-size: 1.05rem;
  color: #b8c6db;
  margin-bottom: 1.6rem;
  max-width: 34rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: fadeUp .7s ease both;
  animation-timeline: view();
  animation-range: entry 10% cover 30%;
}
@supports not (animation-timeline: view()) {
  .reveal { animation: fadeUp .7s ease both; }
}

/* Sections */
.section { padding: 4.2rem 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(15, 28, 48, 0.55), rgba(10, 18, 32, 0.2));
  border-block: 1px solid var(--line);
}
.section-head {
  margin-bottom: 2rem;
  max-width: 700px;
}
.section-head h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  margin-bottom: .45rem;
}
.section-head p { margin: 0; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: .55rem;
}

/* Intro / prose */
.prose {
  max-width: 72ch;
}
.prose h2 { font-size: 1.45rem; margin-top: 1.8rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4rem; color: #dce6f5; }
.prose p, .prose li { color: var(--muted); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.content-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 860px) {
  .content-grid { grid-template-columns: 1fr; }
}
.media-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: var(--shadow);
}
.media-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #000;
  padding: 1rem;
}
.media-frame.wide img { aspect-ratio: 16 / 10; object-fit: cover; padding: 0; }

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr; }
}
.cat-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  transition: transform .25s, border-color .25s, box-shadow .25s;
  text-decoration: none;
}
.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 132, 255, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.cat-item img {
  width: 100%;
  aspect-ratio: 1.15 / 1;
  object-fit: contain;
  background: radial-gradient(circle at 50% 40%, #15243c, #05080f 75%);
  padding: .75rem;
}
.cat-item .cat-body {
  padding: 1rem 1.05rem 1.15rem;
  border-top: 1px solid var(--line);
}
.cat-item h3 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
  color: var(--text);
}
.cat-item p {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
}
.article-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform .25s, border-color .25s;
  height: 100%;
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(63, 208, 255, 0.35);
}
.article-card .thumb {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #000;
}
.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.article-card:hover .thumb img { transform: scale(1.05); }
.article-card .body {
  padding: 1.05rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.article-card .tag {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .4rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.article-card h3 {
  font-size: 1.02rem;
  margin: 0 0 .5rem;
}
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--cyan); }
.article-card p {
  font-size: .9rem;
  margin: 0 0 1rem;
  flex: 1;
}
.article-card .meta {
  font-size: .8rem;
  color: #7e90ab;
  display: flex;
  justify-content: space-between;
  gap: .5rem;
}

/* FAQ */
.faq-list { display: grid; gap: .75rem; max-width: 820px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 22, 40, 0.7);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--cyan);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '–'; }
.faq-item .faq-a {
  padding: 0 1.15rem 1.15rem;
  color: var(--muted);
  margin: 0;
}

/* Page hero / breadcrumb */
.page-hero {
  padding: 2.6rem 0 1.6rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 280px at 20% 0%, rgba(47, 132, 255, 0.15), transparent 60%),
    linear-gradient(180deg, rgba(15, 28, 48, 0.5), transparent);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  list-style: none;
  padding: 0;
}
.breadcrumb a { color: var(--blue-2); }
.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: .4rem;
  color: #5d7090;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: .5rem;
}
.page-hero .lead { max-width: 60ch; margin: 0; }

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.2rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
}
.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  background: #000;
}
.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  margin-inline: auto;
  background: radial-gradient(circle at center, #15243c, #05080f);
}
.article-body h2 { margin-top: 1.8rem; font-size: 1.35rem; }
.article-body h3 { margin-top: 1.3rem; font-size: 1.1rem; }
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: grid;
  gap: 1rem;
}
.side-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: rgba(13, 22, 40, 0.75);
}
.side-box h3 {
  font-size: .95rem;
  margin: 0 0 .85rem;
  color: var(--text);
}
.side-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .65rem;
}
.side-box a {
  color: #c5d3e8;
  font-size: .9rem;
  display: block;
  line-height: 1.4;
}
.side-box a:hover { color: var(--cyan); }

/* Related */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 800px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* Brands strip */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}
.brand-strip img {
  height: 36px;
  width: auto;
  object-fit: contain;
  opacity: .75;
  filter: grayscale(.2);
  transition: opacity .2s, filter .2s;
}
.brand-strip img:hover { opacity: 1; filter: none; }

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  text-align: center;
  padding: 3rem 0;
}
.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin: 0 0 .4rem;
  text-shadow: 0 0 40px rgba(47, 132, 255, 0.35);
}
.error-page h1 { font-size: 1.6rem; }
.error-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #050912;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand img {
  height: 38px;
  width: auto;
  margin-bottom: .9rem;
  object-fit: contain;
}
.footer-brand p { font-size: .9rem; margin: 0; }
.footer-col h4 {
  font-size: .92rem;
  margin: 0 0 .9rem;
  color: #fff;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}
.footer-col a {
  color: var(--muted);
  font-size: .9rem;
}
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem;
  font-size: .82rem;
  color: #6f829e;
}

/* Misc */
.list-check {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: .65rem;
}
.list-check li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--muted);
}
.list-check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .45rem;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 0 0 3px rgba(47, 132, 255, 0.18);
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}
.note-box {
  border-left: 3px solid var(--blue);
  background: rgba(47, 132, 255, 0.08);
  padding: 1rem 1.15rem;
  border-radius: 0 10px 10px 0;
  margin: 1.25rem 0;
}
.note-box p { margin: 0; color: #c5d4ea; }
.cta-band {
  padding: 2.5rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(47, 132, 255, 0.16), rgba(63, 208, 255, 0.05)),
    var(--bg-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.cta-band h2 { margin: 0 0 .35rem; font-size: 1.35rem; }
.cta-band p { margin: 0; max-width: 42ch; }
.phone-visual {
  max-width: 180px;
  margin-inline: auto;
}
.phone-visual img {
  width: 100%;
  object-fit: contain;
}
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
th, td {
  border: 1px solid var(--line);
  padding: .7rem .85rem;
  text-align: left;
}
th { background: rgba(47, 132, 255, 0.12); color: var(--text); }
td { color: var(--muted); }

body.menu-open { overflow: hidden; }
