/* KGame – Game info portal (vi-VN) */
:root {
  --bg: #0c1118;
  --bg-elevated: #141b26;
  --bg-soft: #1a2433;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef6;
  --muted: #9aadc2;
  --accent: #4ba3e3;
  --accent-strong: #2f8fd4;
  --accent-soft: rgba(75, 163, 227, 0.14);
  --warm: #f0b429;
  --danger: #e85d5d;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 72px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font-display: "Space Grotesk", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(75, 163, 227, 0.18), transparent 60%),
    radial-gradient(900px 420px at -10% 20%, rgba(47, 143, 212, 0.12), transparent 55%),
    linear-gradient(180deg, #0a0f16 0%, var(--bg) 40%, #0d131c 100%);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #7bc2f0;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(12, 17, 24, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-height: calc(var(--header-h) - 24px);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--muted);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #041018;
  box-shadow: 0 8px 20px rgba(47, 143, 212, 0.28);
}

.btn-primary:hover {
  color: #041018;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: rgba(75, 163, 227, 0.45);
  color: var(--text);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-toggle .label-close {
  display: none;
}

.menu-toggle.is-open .label-menu {
  display: none;
}

.menu-toggle.is-open .label-close {
  display: inline;
}

.nav-drawer {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: min(100%, 320px);
  height: calc(100vh - var(--header-h));
  background: #101722;
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform 0.28s var(--ease);
  z-index: 999;
  padding: 1.25rem;
  overflow-y: auto;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer a {
  display: block;
  color: var(--text);
  padding: 0.85rem 0.7rem;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--line);
}

.nav-drawer a:hover,
.nav-drawer a.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.drawer-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.drawer-overlay {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
  z-index: 998;
}

.drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

main {
  padding-top: var(--header-h);
}

.hero {
  position: relative;
  min-height: min(78vh, 680px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 12, 18, 0.92) 0%, rgba(8, 12, 18, 0.55) 48%, rgba(8, 12, 18, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 12, 18, 0.2) 0%, rgba(8, 12, 18, 0.88) 100%);
}

.hero-content {
  padding: 4.5rem 0 3.5rem;
  max-width: 640px;
  animation: riseIn 0.9s var(--ease) both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.85rem;
  background: linear-gradient(120deg, #fff 10%, #9fd0f5 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.hero p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 720px;
}

.section-head h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.intro-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.intro-copy p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.category-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  min-height: 160px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.category-item:hover {
  transform: translateY(-4px);
  border-color: rgba(75, 163, 227, 0.45);
}

.category-item img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(75, 163, 227, 0.18), transparent 55%),
    var(--bg-soft);
  padding: 0.75rem;
}

.category-item span {
  display: block;
  padding: 0.85rem 1rem 1rem;
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-display);
}

.card-grid {
  display: grid;
  gap: 1.15rem;
}

.article-card {
  display: grid;
  gap: 0.9rem;
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.15rem;
}

.article-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.article-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.article-card h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  font-family: var(--font-display);
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.guide-list {
  display: grid;
  gap: 0.85rem;
}

.guide-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.guide-item img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.guide-item h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-family: var(--font-display);
}

.guide-item h3 a {
  color: var(--text);
}

.guide-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-weight: 600;
  font-family: var(--font-display);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0;
  padding: 0 1.1rem 1.1rem;
  color: var(--muted);
}

.page-hero {
  padding: 2.6rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(75, 163, 227, 0.08), transparent);
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 46rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.5;
}

.content-wrap {
  display: grid;
  gap: 2rem;
  padding: 2.2rem 0 3.5rem;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin: 2rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.prose h3 {
  margin: 1.5rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose a.ext-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 1.2rem 0 1.5rem;
  background: var(--bg-soft);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.related h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.related a {
  color: var(--text);
}

.related a:hover {
  color: var(--accent);
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.2);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 0.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #090d13;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.8rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.8rem;
}

.footer-brand p,
.footer-col p {
  color: var(--muted);
  margin: 0;
  font-size: 0.92rem;
}

.footer-col h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

.footer-col a {
  display: block;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  justify-content: space-between;
}

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  letter-spacing: -0.04em;
}

.error-page p {
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: #9fd0f5;
  font-size: 0.78rem;
  font-weight: 600;
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}

.list-toolbar a {
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
}

.list-toolbar a.is-active,
.list-toolbar a:hover {
  color: var(--text);
  border-color: rgba(75, 163, 227, 0.45);
  background: var(--accent-soft);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-card {
    border: 0;
    padding-bottom: 0;
  }

  .intro-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.2rem;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none;
  }

  .nav-desktop,
  .header-actions {
    display: flex;
  }

  .nav-drawer,
  .drawer-overlay {
    display: none !important;
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-wrap.has-aside {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (max-width: 991px) {
  .header-actions.desktop-only {
    display: none;
  }
}
