/* KGame – cổng tin tức game vi-VN */
:root {
  --bg: #f3f6f9;
  --bg-soft: #e8eef5;
  --surface: #ffffff;
  --ink: #142033;
  --ink-soft: #3d4d63;
  --muted: #6b7c90;
  --line: #d5dee9;
  --brand: #1a8fd6;
  --brand-deep: #0f5f96;
  --brand-soft: #d9effb;
  --accent: #0d9b8a;
  --accent-soft: #d8f3ef;
  --warn: #c45c26;
  --shadow: 0 12px 32px rgba(20, 32, 51, 0.08);
  --radius: 14px;
  --nav-h: 68px;
  --max: 1120px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(26, 143, 214, 0.14), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(13, 155, 138, 0.1), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 40%, #eef3f8 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--brand);
}

ul,
ol {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.45rem);
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Fixed nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  overflow: visible;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(213, 222, 233, 0.9);
  box-shadow: 0 4px 18px rgba(20, 32, 51, 0.05);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-height: 48px;
  line-height: 0;
}

.brand-link img {
  height: 36px;
  width: auto;
  max-height: 36px;
  max-width: 148px;
  object-fit: contain;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  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) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(26, 143, 214, 0.28);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--brand-deep);
  border-color: rgba(15, 95, 150, 0.35);
}

.btn-ghost:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.btn-on-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.menu-toggle .label-close {
  display: none;
}

.menu-toggle.is-open .label-open {
  display: none;
}

.menu-toggle.is-open .label-close {
  display: inline;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.75rem 1rem 1.1rem;
  z-index: 999;
}

.mobile-panel.is-open {
  display: block;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-panel a {
  display: block;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
  font-weight: 600;
  border-radius: 8px;
}

.mobile-panel a:hover {
  background: var(--brand-soft);
}

.mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.mobile-auth .btn {
  width: 100%;
}

main {
  padding-top: var(--nav-h);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(72vh, 620px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: #0b2740;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 24, 40, 0.88) 0%, rgba(8, 24, 40, 0.55) 48%, rgba(8, 24, 40, 0.25) 100%),
    linear-gradient(0deg, rgba(8, 24, 40, 0.75) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.2rem;
  max-width: 640px;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  color: #fff;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: fadeUp 0.7s ease both;
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 600;
  margin-bottom: 0.85rem;
  animation: fadeUp 0.7s ease 0.08s both;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  max-width: 36rem;
  animation: fadeUp 0.7s ease 0.16s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
  animation: fadeUp 0.7s ease 0.24s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(232, 238, 245, 0.7));
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 42rem;
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

/* Intro */
.intro-grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.intro-visual {
  justify-self: center;
}

.intro-visual img {
  width: min(220px, 70vw);
  filter: drop-shadow(0 16px 30px rgba(20, 32, 51, 0.18));
  animation: floatY 4.5s ease-in-out infinite;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.1rem 0.85rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(26, 143, 214, 0.35);
  color: var(--ink);
}

.cat-item img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.cat-item span {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.15rem;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.article-card .thumb {
  aspect-ratio: 260 / 200;
  overflow: hidden;
  background: var(--bg-soft);
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.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;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.72rem;
}

.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-deep);
}

.article-card p {
  font-size: 0.92rem;
  flex: 1;
}

.read-more {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brand-deep);
  margin-top: 0.6rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.2rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.95rem 0;
  list-style: none;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--brand);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding-bottom: 0.9rem;
  margin: 0;
}

/* 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: var(--line);
}

.breadcrumb a {
  color: var(--muted);
}

.page-hero {
  padding: 1.6rem 0 0.5rem;
}

.page-hero p {
  max-width: 44rem;
}

/* Article page */
.article-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 3rem;
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  margin: 1.25rem 0 1.5rem;
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  margin-inline: auto;
}

.prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 1.8rem;
}

.prose h3 {
  margin-top: 1.3rem;
}

.prose li {
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
}

.related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.brand-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  align-items: center;
}

.brand-row img {
  width: 100%;
  height: 56px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem;
  filter: grayscale(0.15);
}

.feature-split {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.feature-split img {
  width: min(280px, 100%);
  margin-inline: auto;
  object-fit: contain;
}

.promo-strip {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f5f96, #0d9b8a);
  color: #fff;
}

.promo-strip p {
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}

.promo-strip img {
  max-height: 72px;
  width: auto;
}

.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(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: #0f1b2b;
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-brand img {
  height: 38px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.ext-link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive */
@media (min-width: 720px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .feature-split,
  .footer-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .menu-toggle,
  .mobile-panel {
    display: none !important;
  }

  .nav-desktop,
  .nav-actions {
    display: flex;
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr 300px;
  }

  .brand-row {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 480px) {
  .brand-link img {
    height: 34px;
    max-width: 132px;
  }

  .hero-content {
    padding: 3.2rem 0 2.4rem;
  }

  .cat-item img {
    width: 72px;
    height: 72px;
  }
}
