/* KGame – kgame-web.autos | vi-VN portal */
:root {
  --bg: #0b1520;
  --bg-soft: #122033;
  --bg-card: #162636;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef5;
  --muted: #9aafc2;
  --brand: #1fa97a;
  --brand-2: #f0b429;
  --accent: #2ec4b6;
  --danger: #e85d5d;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --nav-h: 72px;
  --max: 1180px;
  --font-display: "Be Vietnam Pro", "Segoe UI", 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(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(46, 196, 182, 0.18), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(240, 180, 41, 0.12), transparent 55%),
    linear-gradient(180deg, #0a121c 0%, var(--bg) 40%, #0d1824 100%);
  min-height: 100vh;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--brand-2);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(10, 18, 28, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 0;
  max-width: 46%;
}

.brand img {
  height: 36px;
  width: auto;
  max-height: calc(var(--nav-h) - 24px);
  max-width: 140px;
  object-fit: contain;
}

.brand span {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.1rem;
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.2rem;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #168a63);
  color: #04140e;
}

.btn-primary:hover {
  color: #04140e;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  margin-left: auto;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #0e1a27;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.25rem;
  z-index: 999;
  box-shadow: var(--shadow);
}

.mobile-panel.open {
  display: block;
  animation: slideDown 0.22s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-panel a {
  display: block;
  color: var(--text);
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid var(--line);
}

.mobile-panel .mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mobile-panel .mobile-actions .btn {
  width: 100%;
}

main {
  padding-top: var(--nav-h);
}

.hero {
  position: relative;
  min-height: min(78vh, 720px);
  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 top;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 14, 22, 0.92) 8%, rgba(8, 14, 22, 0.55) 48%, rgba(8, 14, 22, 0.35) 100%),
    linear-gradient(0deg, rgba(8, 14, 22, 0.95) 0%, transparent 45%);
}

.hero-content {
  padding: 4.5rem 0 3.5rem;
  max-width: 640px;
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.hero-brand img {
  height: 48px;
  width: auto;
}

.hero-brand strong {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.01em;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  line-height: 1.25;
  font-weight: 700;
}

.hero p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.section {
  padding: 4rem 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
}

.section-head p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 56ch;
}

.eyebrow {
  display: inline-block;
  color: var(--brand-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.intro-copy p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.intro-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.intro-visual img {
  width: min(240px, 70%);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
  animation: floatY 4.5s ease-in-out infinite;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1rem 1.2rem;
  text-align: center;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.category-item:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 196, 182, 0.45);
  color: var(--text);
}

.category-item img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto 0.85rem;
}

.category-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.category-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 180, 41, 0.35);
  color: var(--text);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a121c;
}

.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: 1rem 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.article-card .meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.article-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.article-card .more {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
}

.guide-list {
  display: grid;
  gap: 0.9rem;
}

.guide-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  color: var(--text);
}

.guide-item:hover {
  border-color: rgba(31, 169, 122, 0.45);
  color: var(--text);
}

.guide-item img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
}

.guide-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
}

.guide-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 860px;
}

.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.1rem;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--brand-2);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.1rem 1.1rem;
  color: var(--muted);
}

.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.brand-strip img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0.2) brightness(1.1);
}

.page-hero {
  padding: 2.6rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(31, 169, 122, 0.08), transparent);
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span {
  opacity: 0.5;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.2rem 0 4rem;
}

.prose {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}

.prose h2 {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin: 1.3rem 0 0.55rem;
  font-size: 1.12rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose img.cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0.4rem 0 1.2rem;
}

.sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.side-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--bg-soft);
}

.side-box h3 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
}

.side-box a {
  display: block;
  color: var(--text);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.side-box a:last-child {
  border-bottom: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.status-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.status-page h1 {
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  margin: 0 0 0.4rem;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.status-page p {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto 1.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #09131d;
  padding: 3rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 40px;
  width: auto;
  margin-bottom: 0.8rem;
}

.footer-brand p,
.footer-col a {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-col h4 {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
}

.footer-col a {
  display: block;
  margin-bottom: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
}

.promo-banner {
  display: grid;
  place-items: center;
  margin: 1rem 0 0;
}

.promo-banner img {
  width: min(100%, 640px);
  border-radius: 12px;
}

.text-link {
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

@media (max-width: 980px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .content-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .guide-item {
    grid-template-columns: 100px 1fr;
  }

  .guide-item .btn {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  .nav-desktop,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .brand {
    max-width: calc(100% - 110px);
  }

  .brand img {
    height: 32px;
    max-width: 120px;
  }

  .brand span {
    font-size: 1rem;
  }

  .hero {
    min-height: 68vh;
  }

  .hero-content {
    padding: 3rem 0 2.4rem;
  }

  .card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .guide-item {
    grid-template-columns: 1fr;
  }

  .guide-item img {
    width: 100%;
    height: 140px;
  }
}
