/* KGame – kgameee.lol | Game portal styles */
@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 {
  --navy: #0a1f36;
  --navy-mid: #123354;
  --ocean: #0e7490;
  --cyan: #22d3ee;
  --blue: #1d7be8;
  --blue-soft: #3b9eff;
  --sand: #e8f1f8;
  --bg: #f3f7fb;
  --surface: #ffffff;
  --text: #142433;
  --muted: #5a6f82;
  --line: #d5e2ee;
  --danger: #dc3d4a;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(10, 31, 54, 0.1);
  --header-h: 72px;
  --max: 1180px;
  --font: "Be Vietnam Pro", sans-serif;
  --display: "Sora", "Be Vietnam Pro", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--ocean);
}

ul {
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(10, 31, 54, 0.97), rgba(12, 38, 64, 0.94));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.nav-bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  z-index: 1002;
}

.logo-link img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  justify-content: center;
}

.nav-desktop a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1.15rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-login {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-register {
  background: linear-gradient(135deg, var(--blue), var(--ocean));
  color: #fff;
  box-shadow: 0 6px 18px rgba(29, 123, 232, 0.35);
}

.btn-register:hover {
  color: #fff;
  box-shadow: 0 8px 22px rgba(14, 116, 144, 0.4);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #0ea5c6);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1002;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  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;
  inset: 0;
  top: var(--header-h);
  background: rgba(8, 22, 40, 0.98);
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}

.nav-mobile.is-open {
  transform: translateX(0);
}

.nav-mobile a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-mobile a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-mobile .mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-mobile .mobile-auth .btn {
  width: 100%;
  padding: 0.85rem;
}

body.menu-open {
  overflow: hidden;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: clamp(420px, 78vh, 640px);
  margin-top: var(--header-h);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(6, 18, 34, 0.92) 0%, rgba(8, 28, 52, 0.72) 48%, rgba(10, 40, 70, 0.45) 100%),
    linear-gradient(to top, rgba(6, 16, 30, 0.9) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 3.25rem;
  max-width: 640px;
  animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero-brand span {
  background: linear-gradient(90deg, var(--cyan), #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.hero-lead {
  color: rgba(226, 240, 255, 0.88);
  font-size: 1.02rem;
  margin-bottom: 1.5rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== Sections ===== */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--surface);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 640px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-bottom: 0.4rem;
}

/* Intro / brand */
.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.intro-copy h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
  color: var(--navy);
}

.intro-copy p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.intro-copy p a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: floatY 5s ease-in-out infinite;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.cat-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy);
  aspect-ratio: 3/4;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(10, 31, 54, 0.2);
}

.cat-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cat-item:hover img {
  transform: scale(1.05);
}

.cat-item figcaption,
.cat-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(6, 16, 30, 0.92));
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: var(--display);
}

/* Article cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.article-card .thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--navy-mid);
}

.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;
  flex: 1;
}

.article-card .tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ocean);
  margin-bottom: 0.45rem;
}

.article-card h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 0.55rem;
  color: var(--navy);
}

.article-card h3 a {
  color: inherit;
}

.article-card h3 a:hover {
  color: var(--blue);
}

.article-card p {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.article-card .meta {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: #8a9bab;
}

/* Guide list */
.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.15rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-row:hover {
  border-color: #a8c8e4;
  box-shadow: var(--shadow);
}

.guide-row img {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
}

.guide-row h3 {
  font-size: 1.05rem;
  font-family: var(--display);
  margin-bottom: 0.3rem;
}

.guide-row h3 a {
  color: var(--navy);
}

.guide-row p {
  color: var(--muted);
  font-size: 0.9rem;
}

.guide-row .more {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  padding-right: 0.5rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 820px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1.05rem 1.25rem;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--ocean);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.25rem 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Page hero (inner) */
.page-hero {
  margin-top: var(--header-h);
  padding: 3rem 0 2.25rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(34, 211, 238, 0.15), transparent 50%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 0.55rem;
}

.page-hero p {
  color: rgba(220, 235, 250, 0.85);
  max-width: 560px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.55);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
}

.breadcrumb a:hover {
  color: var(--cyan);
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.4);
}

/* Article content */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 2.1rem;
}

.prose .cover {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.prose .cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.prose h1 {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
  color: var(--navy);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.prose .article-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.prose h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--navy);
  margin: 1.75rem 0 0.7rem;
}

.prose h3 {
  font-size: 1.05rem;
  color: var(--navy-mid);
  margin: 1.35rem 0 0.55rem;
}

.prose p {
  margin-bottom: 1rem;
  color: #3a4d5e;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1rem 1.2rem;
  color: #3a4d5e;
}

.prose li {
  margin-bottom: 0.4rem;
  list-style: disc;
}

.prose ol li {
  list-style: decimal;
}

.prose a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.side-box h3 {
  font-family: var(--display);
  font-size: 1rem;
  margin-bottom: 0.9rem;
  color: var(--navy);
}

.side-links a {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
}

.side-links a:last-child {
  border-bottom: none;
}

.side-links a:hover {
  color: var(--blue);
}

.promo-banner {
  border-radius: 12px;
  overflow: hidden;
}

.promo-banner img {
  width: 100%;
}

/* Related */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

/* Legal / about */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.legal-content h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 1.75rem 0 0.65rem;
  color: var(--navy);
}

.legal-content p,
.legal-content li {
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.legal-content ul {
  margin-left: 1.2rem;
  margin-bottom: 1rem;
}

.legal-content li {
  list-style: disc;
}

/* Error pages */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 50% 30%, rgba(34, 211, 238, 0.12), transparent 45%),
    linear-gradient(160deg, var(--navy), #0c2a4a);
  color: #fff;
}

.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--cyan), var(--blue-soft));
  -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: rgba(220, 235, 250, 0.8);
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-inline: auto;
}

.error-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Brand strip */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
  opacity: 0.75;
}

.brand-strip img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0.3);
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, #0f4a6e 55%, var(--ocean) 100%);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.cta-band h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-bottom: 0.6rem;
}

.cta-band p {
  color: rgba(230, 245, 255, 0.85);
  margin-bottom: 1.35rem;
  max-width: 480px;
  margin-inline: auto;
}

/* Footer */
.site-footer {
  background: #071628;
  color: rgba(220, 235, 250, 0.75);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand img {
  height: 42px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  font-family: var(--display);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.footer-col a {
  display: block;
  color: rgba(220, 235, 250, 0.7);
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

.footer-col a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(220, 235, 250, 0.5);
}

/* Utilities */
.text-link {
  font-weight: 600;
}

.mt-2 {
  margin-top: 2rem;
}

.section-link {
  display: inline-flex;
  margin-top: 1.5rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav-desktop,
  .nav-actions .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-mobile {
    display: flex;
  }

  .logo-link img {
    height: 42px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .hero {
    min-height: 70vh;
    align-items: center;
  }

  .hero-content {
    padding: 2.5rem 0;
  }

  .cat-grid,
  .card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .guide-row {
    grid-template-columns: 100px 1fr;
  }

  .guide-row img {
    width: 100px;
    height: 70px;
  }

  .guide-row .more {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .prose {
    padding: 1.35rem 1.15rem;
  }

  .section {
    padding: 3rem 0;
  }
}
