/* KGame – kgamee.homes | 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: #eef2f7;
  --bg-deep: #dfe7f2;
  --surface: #ffffff;
  --ink: #101828;
  --muted: #5b6578;
  --line: rgba(16, 24, 40, 0.1);
  --brand: #1a6bff;
  --brand-2: #0ea5e9;
  --brand-dark: #0b3d8c;
  --gold: #d4a017;
  --header: #0a1220;
  --header-2: #132038;
  --ok: #0f9f6e;
  --danger: #d14343;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(10, 18, 32, 0.12);
  --nav-h: 72px;
  --max: 1120px;
  --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(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(26, 107, 255, 0.12), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(212, 160, 23, 0.1), transparent 55%),
    linear-gradient(180deg, #f7f9fc 0%, var(--bg) 40%, var(--bg-deep) 100%);
  line-height: 1.65;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
ul { padding-left: 1.2rem; }
h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
p { margin: 0 0 1rem; color: var(--muted); }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Skip */
.skip-link {
  position: absolute; left: -999px; top: 0; background: #fff; padding: 0.5rem 1rem; z-index: 10000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10, 18, 32, 0.96), rgba(13, 26, 48, 0.92));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-bar {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  max-height: calc(var(--nav-h) - 16px);
  overflow: hidden;
}
.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}
.brand-text {
  font-family: var(--display);
  font-weight: 800;
  color: #fff;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-desktop a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}
.nav-desktop a:hover,
.nav-desktop a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.nav-actions {
  display: none;
  align-items: center;
  gap: 0.55rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  font-family: var(--font);
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 8px 22px rgba(26, 107, 255, 0.35);
}
.btn-primary:hover { color: #fff; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.btn-outline {
  background: transparent;
  color: var(--brand-dark);
  border: 1.5px solid rgba(26, 107, 255, 0.35);
}
.btn-outline:hover { background: rgba(26, 107, 255, 0.08); color: var(--brand-dark); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }
.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: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #0d1728;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1rem 1.25rem;
  box-shadow: var(--shadow);
}
.nav-mobile.is-open { display: block; }
.nav-mobile ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.nav-mobile a {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 500;
}
.nav-mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .nav-actions { display: flex; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

main { padding-top: var(--nav-h); }

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #0a1220;
}
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 14, 28, 0.88) 0%, rgba(8, 14, 28, 0.55) 48%, rgba(8, 14, 28, 0.35) 100%),
    linear-gradient(0deg, rgba(8, 14, 28, 0.85) 0%, transparent 45%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 3rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}
.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  margin: 0 0 0.6rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 20%, #9ec5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
}
.hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  max-width: 36rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }

@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); }
}

/* Sections */
.section { padding: 3.5rem 0; }
.section-head {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}
.section-head h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.4rem;
}
.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2));
  border-block: 1px solid rgba(255, 255, 255, 0.5);
}

.prose {
  max-width: 48rem;
}
.prose p { color: var(--muted); font-size: 1.02rem; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose h2 { margin-top: 1.75rem; }
.prose h3 { margin-top: 1.35rem; font-size: 1.15rem; }

.brand-intro {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 860px) {
  .brand-intro { grid-template-columns: 1.2fr 0.8fr; }
}
.brand-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0a1220;
  min-height: 260px;
  box-shadow: var(--shadow);
}
.brand-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
}
.reveal { animation: fadeUp 0.7s ease both; }

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
@media (min-width: 640px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}
.cat-item {
  position: relative;
  display: block;
  background: #0a1220;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 24px rgba(10, 18, 32, 0.18);
}
.cat-item:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 36px rgba(10, 18, 32, 0.28);
}
.cat-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8%;
  transition: transform 0.35s ease;
}
.cat-item:hover img { transform: scale(1.06); }
.cat-item span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.6rem 0.75rem 0.75rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
}

/* Cards / articles */
.card-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  height: 100%;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.article-card .thumb {
  background: #0a1220;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .thumb img { transform: scale(1.05); }
.article-card .body { padding: 1rem 1.05rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.article-card .meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-weight: 600;
}
.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}
.article-card h3 a { color: var(--ink); }
.article-card h3 a:hover { color: var(--brand); }
.article-card p {
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
  flex: 1;
}
.article-card .more {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brand-dark);
}

/* FAQ */
.faq-list { display: grid; gap: 0.75rem; max-width: 48rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-weight: 700;
  color: var(--ink);
  position: relative;
  padding-right: 2.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--brand);
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
  font-size: 0.96rem;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  background:
    linear-gradient(135deg, rgba(10, 18, 32, 0.95), rgba(19, 48, 96, 0.9)),
    #0a1220;
  color: #fff;
  border-bottom: 3px solid rgba(26, 107, 255, 0.45);
}
.page-hero h1 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.page-hero p { color: rgba(255, 255, 255, 0.78); max-width: 40rem; margin-bottom: 0; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}
.breadcrumb a { color: rgba(255, 255, 255, 0.85); }
.breadcrumb span { opacity: 0.5; }

/* Article layout */
.article-layout {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 3.5rem;
}
@media (min-width: 960px) {
  .article-layout { grid-template-columns: 1fr 300px; align-items: start; }
}
.article-cover {
  border-radius: 16px;
  overflow: hidden;
  background: #0a1220;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  margin: 0 auto;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
}
.sidebar-block h3 { font-size: 1rem; margin-bottom: 0.85rem; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
.side-list li:last-child { margin-bottom: 0; padding-bottom: 0; border: 0; }
.side-list a { color: var(--ink); font-weight: 600; font-size: 0.92rem; }
.side-list a:hover { color: var(--brand); }
.related-grid { margin-top: 2.5rem; }

/* Category showcase large */
.cat-showcase {
  display: grid;
  gap: 1.25rem;
}
.cat-row {
  display: grid;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
}
@media (min-width: 720px) {
  .cat-row { grid-template-columns: 180px 1fr; padding: 1.15rem 1.35rem; }
}
.cat-row img {
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
  background: #0a1220;
  border-radius: 12px;
  padding: 0.5rem;
}
.cat-row h3 { margin-bottom: 0.4rem; }
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0 0;
}
.brand-strip img {
  height: 36px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.2);
}

/* 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, 14vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #0c1526, #070d18);
  color: rgba(255, 255, 255, 0.78);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 720px) {
  .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.75); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.footer-brand img { height: 36px; width: auto; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* Utils */
.cta-band {
  background: linear-gradient(135deg, #0d3d8c, #1a6bff 55%, #0ea5e9);
  color: #fff;
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  display: grid;
  gap: 1rem;
  align-items: center;
  box-shadow: var(--shadow);
}
@media (min-width: 720px) {
  .cta-band { grid-template-columns: 1fr auto; padding: 2rem 2.25rem; }
}
.cta-band h2 { color: #fff; margin: 0 0 0.4rem; }
.cta-band p { color: rgba(255, 255, 255, 0.88); margin: 0; }
.promo-banner {
  display: block;
  max-width: 420px;
  margin: 1.25rem 0 0;
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(26, 107, 255, 0.12);
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--ok));
}

/* Content links highlight natural */
.ext-link { font-weight: 700; }
