/* KGame — k-game-app.cfd */
@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: #f3f6fb;
  --bg-alt: #e8eef7;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --brand: #1d6feb;
  --brand-deep: #0b4fbf;
  --brand-soft: #dbeafe;
  --accent: #0ea5a4;
  --nav-h: 72px;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --max: 1120px;
  --font: 'Be Vietnam Pro', system-ui, 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(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(29, 111, 235, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(14, 165, 164, 0.1), transparent 55%),
    linear-gradient(180deg, #eef3fa 0%, var(--bg) 28%, #f7f9fc 100%);
  line-height: 1.65;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.6em;
}
p { margin: 0 0 1em; color: var(--ink-soft); }
ul, ol { color: var(--ink-soft); }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 18, 36, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}
.logo-link {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-link img {
  height: 42px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.nav-desktop a {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.header-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(29, 111, 235, 0.28);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn-outline {
  background: transparent;
  color: var(--brand-deep);
  border: 1.5px solid rgba(29, 111, 235, 0.35);
}
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; 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; }
.menu-toggle .menu-label::after { content: 'Menu'; }
.menu-toggle.is-open .menu-label::after { content: 'Đóng'; }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #0b1220;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.25rem 1.35rem;
  z-index: 999;
  flex-direction: column;
  gap: 0.35rem;
  animation: slideDown 0.22s ease;
}
.nav-mobile.is-open { display: flex; }
.nav-mobile a {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
}
.nav-mobile a:hover { background: rgba(255, 255, 255, 0.06); }
.nav-mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 960px) {
  .menu-toggle { display: none; }
  .nav-desktop { display: flex; }
  .header-actions { display: flex; }
  .nav-mobile { display: none !important; }
}

/* Main offset */
main { padding-top: var(--nav-h); }

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 14, 28, 0.35) 0%, rgba(8, 14, 28, 0.72) 55%, rgba(8, 14, 28, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 14, 28, 0.75) 0%, rgba(8, 14, 28, 0.25) 70%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 3.5rem 0 3.25rem;
  max-width: 720px;
  margin-left: max(1rem, calc((100% - var(--max)) / 2));
  animation: fadeUp 0.7s ease both;
}
.hero-brand {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin: 0 0 0.55rem;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  margin: 0 0 0.85rem;
  max-width: 34ch;
}
.hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  max-width: 48ch;
  margin-bottom: 1.4rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.section {
  padding: 4.25rem 0;
}
.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(232, 238, 247, 0.7));
}
.section-head {
  margin-bottom: 2rem;
  max-width: 640px;
}
.section-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  margin-bottom: 0.45rem;
}
.section-head p { margin: 0; }

.prose {
  max-width: 72ch;
}
.prose h2 { margin-top: 1.8em; font-size: 1.35rem; }
.prose h3 { margin-top: 1.4em; font-size: 1.12rem; }
.prose a { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.45rem; }

.brand-intro {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 860px) {
  .brand-intro {
    grid-template-columns: 1.15fr 0.85fr;
  }
}
.brand-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0b1220;
  box-shadow: var(--shadow);
  animation: fadeUp 0.8s ease 0.1s both;
}
.brand-visual img {
  width: 100%;
  margin: 0 auto;
  max-height: 420px;
  object-fit: contain;
}
.brand-visual::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(11, 18, 32, 0.55));
  pointer-events: none;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 700px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}
.cat-item {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.cat-item img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  background: #0b1220;
}
.cat-item span {
  padding: 0.85rem 0.9rem 1rem;
  font-weight: 700;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--ink);
}

/* Article cards */
.card-grid {
  display: grid;
  gap: 1.15rem;
}
@media (min-width: 700px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.article-card img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  background: #0f172a;
}
.article-card .card-body {
  padding: 1.05rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}
.article-card p {
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 800px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 700;
  font-family: var(--display);
  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(--brand);
  font-weight: 500;
}
.faq-item[open] summary::after { content: '–'; }
.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  margin: 0;
  color: var(--ink-soft);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1.1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
}
.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 0.35rem;
  color: #94a3b8;
}
.breadcrumb a { color: var(--brand-deep); font-weight: 500; }

/* Page hero compact */
.page-hero {
  padding: 2.5rem 0 1.5rem;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.55rem;
}
.page-hero p { max-width: 60ch; margin: 0; }

/* Article layout */
.article-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}
.article-cover {
  border-radius: 16px;
  overflow: hidden;
  margin: 1.25rem 0 1.75rem;
  background: #0b1220;
}
.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.sidebar-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}
.related-list a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  text-decoration: none !important;
  color: inherit;
  align-items: center;
}
.related-list img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #0b1220;
}
.related-list span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

/* Partners strip */
.partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: center;
  justify-content: flex-start;
}
.partner-row img {
  height: 36px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.15);
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}
.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin: 0 0 0.4rem;
}
.error-page h1 { margin-bottom: 0.5rem; }
.error-page p { max-width: 42ch; margin: 0 auto 1.5rem; }

/* Footer */
.site-footer {
  background: #0b1220;
  color: rgba(255, 255, 255, 0.78);
  padding: 3.25rem 0 1.75rem;
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}
.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand img {
  height: 40px;
  width: auto;
  margin-bottom: 0.9rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}
.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.gap-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
