/* KGame — k-g.click — Game bài knowledge portal */
@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap");

:root {
  --bg: #0b0f16;
  --bg-2: #121826;
  --bg-3: #1a2233;
  --surface: rgba(26, 34, 51, 0.72);
  --line: rgba(148, 178, 230, 0.14);
  --text: #edf2fb;
  --muted: #9aabc4;
  --accent: #4f8fff;
  --accent-2: #7eb6ff;
  --accent-deep: #2a5fd4;
  --gold: #d4b56a;
  --danger: #e85d5d;
  --ok: #3ecf8e;
  --radius: 14px;
  --header-h: 72px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --font-display: "Outfit", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", sans-serif;
  --max: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(79, 143, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(42, 95, 212, 0.12), transparent 50%),
    linear-gradient(180deg, #0b0f16 0%, #101622 40%, #0b0f16 100%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #fff;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

.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(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 15, 22, 0.82);
  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;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-height: calc(var(--header-h) - 24px);
}

.logo img {
  height: 40px;
  width: auto;
  max-height: calc(var(--header-h) - 24px);
  object-fit: contain;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--text);
  background: rgba(79, 143, 255, 0.1);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.55rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  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(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 143, 255, 0.28);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: rgba(126, 182, 255, 0.45);
  color: #fff;
}

.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-open {
  display: none;
}

.menu-toggle.is-open .label-close {
  display: inline;
}

.menu-toggle.is-open .icon-open {
  display: none;
}

.menu-toggle.is-open .icon-close {
  display: block;
}

.menu-toggle .icon-close {
  display: none;
}

.nav-mobile {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: min(100%, 340px);
  height: calc(100vh - var(--header-h));
  background: #101722;
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  z-index: 999;
  padding: 1.25rem;
  overflow-y: auto;
}

.nav-mobile.is-open {
  transform: translateX(0);
}

.nav-mobile a {
  display: block;
  padding: 0.85rem 0.6rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.nav-mobile-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 998;
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 960px) {
  .nav-desktop,
  .header-actions {
    display: flex;
  }

  .menu-toggle,
  .nav-mobile,
  .nav-overlay {
    display: none !important;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 2rem) 0 3.5rem;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.02);
  animation: heroZoom 14s ease-in-out infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 15, 22, 0.92) 0%, rgba(11, 15, 22, 0.72) 42%, rgba(11, 15, 22, 0.35) 100%),
    linear-gradient(180deg, rgba(11, 15, 22, 0.2) 0%, rgba(11, 15, 22, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  animation: fadeUp 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, #fff 20%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.hero p {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 52ch;
  margin-bottom: 1.5rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes heroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
main {
  padding-top: 0;
}

.section {
  padding: 4.25rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.55), rgba(18, 24, 38, 0.2));
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 640px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}

.section-head p {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

/* Brand intro */
.intro-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 880px) {
  .intro-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }
}

.intro-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.intro-copy p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.intro-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-3);
  box-shadow: var(--shadow);
  animation: floatSoft 5.5s ease-in-out infinite;
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 720px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cat-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-3);
  isolation: isolate;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 182, 255, 0.4);
}

.cat-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #000;
  transition: transform 0.35s ease;
}

.cat-item:hover img {
  transform: scale(1.05);
}

.cat-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.85rem 0.85rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Article cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 182, 255, 0.35);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.article-card .tag {
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--text);
}

.article-card p {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.article-card .more {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Guide list */
.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.guide-item:hover {
  border-color: rgba(126, 182, 255, 0.35);
  background: rgba(79, 143, 255, 0.06);
}

.guide-item img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}

.guide-item h3 {
  font-size: 1.02rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.guide-item p {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (min-width: 800px) {
  .guide-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  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: "+";
  color: var(--accent-2);
  font-size: 1.25rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .answer {
  padding: 0 1.15rem 1.15rem;
  color: var(--muted);
}

/* Page hero (inner) */
.page-hero {
  padding: calc(var(--header-h) + 2.5rem) 0 2rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 80% at 80% 0%, rgba(79, 143, 255, 0.12), transparent 60%);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 0.7rem;
}

.page-hero p {
  color: var(--muted);
  max-width: 62ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent-2);
}

.breadcrumb span {
  opacity: 0.5;
}

/* Article detail */
.article-layout {
  display: grid;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.article-main {
  max-width: 760px;
}

.article-cover {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1.75rem;
  background: #000;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 2rem 0 0.8rem;
}

.prose h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.65rem;
}

.prose p,
.prose li {
  color: var(--muted);
  margin-bottom: 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  margin-bottom: 1.2rem;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.sidebar-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--surface);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.sidebar-box h2 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.related-list {
  display: grid;
  gap: 0.85rem;
}

.related-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.7rem;
  align-items: center;
  color: var(--text);
}

.related-list img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.related-list span {
  font-size: 0.9rem;
  line-height: 1.35;
}

/* Legal / content pages */
.content-page {
  padding: 2.5rem 0 4rem;
  max-width: 820px;
}

.content-page h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 2rem 0 0.8rem;
}

.content-page p,
.content-page li {
  color: var(--muted);
  margin-bottom: 1rem;
}

.content-page ul {
  list-style: disc;
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

/* Error pages */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 2rem) 1rem 3rem;
  text-align: center;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto 1.5rem;
}

/* Brands strip */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  opacity: 0.85;
}

.brand-strip img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0.2) brightness(1.1);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #090d14;
  padding: 3rem 0 1.75rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.9rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 36ch;
}

.footer-col h3 {
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  padding: 0.28rem 0;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--accent-2);
}

.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Utilities */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.text-link {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(79, 143, 255, 0.14), rgba(26, 34, 51, 0.6));
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.cta-band p {
  color: var(--muted);
  font-size: 0.92rem;
}

.tag-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(79, 143, 255, 0.12);
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 600;
}

.category-detail {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .category-detail {
    grid-template-columns: 180px 1fr;
    align-items: start;
  }
}

.category-detail img {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  background: #000;
  border: 1px solid var(--line);
}

.category-detail h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.category-detail p {
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.sep {
  height: 1px;
  background: var(--line);
  margin: 2.5rem 0;
}
