/* KGame kgkg.pics — shared styles */
:root {
  --bg: #0e1614;
  --bg-soft: #15221e;
  --surface: #1a2b26;
  --surface-2: #213530;
  --line: rgba(212, 175, 120, 0.18);
  --text: #e8efe9;
  --muted: #9bb0a6;
  --accent: #d4af78;
  --accent-2: #7ec8a3;
  --danger: #e07a6a;
  --radius: 14px;
  --nav-h: 68px;
  --max: 1120px;
  --font-display: "Lexend", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", sans-serif;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::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 600px at 10% -10%, rgba(126, 200, 163, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(212, 175, 120, 0.1), transparent 50%),
    linear-gradient(180deg, #101a17 0%, var(--bg) 40%, #0b1210 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #f0d3a2;
}

ul,
ol {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.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(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(14, 22, 20, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 0;
  max-width: 48%;
  overflow: hidden;
}

.brand img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  object-position: left center;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  margin-left: auto;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.is-open .icon-menu {
  display: none;
}

.nav-toggle.is-open .icon-close {
  display: block;
}

.nav-toggle .toggle-label::before {
  content: "Menu";
}

.nav-toggle.is-open .toggle-label::before {
  content: "Đóng";
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 0.35rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
  font-family: var(--font-body);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #d4af78, #b8894a);
  color: #1a1208;
}

.btn-primary:hover {
  color: #1a1208;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.86rem;
}

/* —— Layout —— */
main {
  padding-top: var(--nav-h);
}

.hero {
  position: relative;
  min-height: clamp(320px, 52vw, 480px);
  display: flex;
  align-items: flex-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;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 16, 14, 0.88) 0%, rgba(10, 16, 14, 0.55) 48%, rgba(10, 16, 14, 0.35) 100%),
    linear-gradient(0deg, rgba(10, 16, 14, 0.92) 0%, transparent 55%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 2.4rem;
  max-width: 640px;
  animation: rise 0.8s var(--ease) both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.hero h1 {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.hero p {
  color: #d5e0da;
  font-size: 1.02rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

section {
  padding: 3.5rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 640px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
}

.section-head p {
  margin-bottom: 0;
}

.bg-soft {
  background: linear-gradient(180deg, rgba(26, 43, 38, 0.55), rgba(21, 34, 30, 0.25));
  border-block: 1px solid var(--line);
}

/* —— Grids / cards —— */
.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 1.2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.cat-card,
.article-card,
.guide-card,
.faq-item,
.content-panel {
  background: linear-gradient(160deg, rgba(33, 53, 48, 0.9), rgba(21, 34, 30, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}

.cat-card:hover,
.article-card:hover,
.guide-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 120, 0.4);
  box-shadow: var(--shadow);
}

.cat-card {
  text-align: center;
  padding: 1.1rem 0.9rem 1.25rem;
  color: var(--text);
  display: block;
}

.cat-card img {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 260 / 348;
  object-fit: cover;
  margin: 0 auto 0.85rem;
  border-radius: 12px;
}

.cat-card h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.cat-card p {
  font-size: 0.86rem;
  margin: 0;
}

.article-card,
.guide-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  height: 100%;
}

.article-card .thumb,
.guide-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
}

.article-card .thumb img,
.guide-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.article-card:hover .thumb img,
.guide-card:hover .thumb img {
  transform: scale(1.05);
}

.article-card .body,
.guide-card .body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  font-size: 0.78rem;
  color: var(--accent-2);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-card h3,
.guide-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.article-card p,
.guide-card p {
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  flex: 1;
}

.read-more {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 1.4rem;
  font-size: 1.1rem;
  color: #f0e6d4;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong {
  color: #e9f2ec;
  font-weight: 600;
}

.brand-block {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.brand-visual {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 280px;
  background: var(--surface);
}

.brand-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.brand-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1.2rem;
}

.brand-logos img {
  height: 28px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  opacity: 0.85;
  filter: brightness(1.05);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.8rem;
  max-width: 800px;
}

.faq-item {
  padding: 0;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-display);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
  margin: 0;
}

/* Page hero small */
.page-hero {
  padding: 2.6rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(33, 53, 48, 0.45), transparent);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  list-style: none;
  padding: 0;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  opacity: 0.5;
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.4rem 0 3.5rem;
  align-items: start;
}

.sidebar .widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.sidebar h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.side-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-list li {
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.side-list a {
  color: var(--text);
  font-size: 0.92rem;
}

.side-list a:hover {
  color: var(--accent);
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 1.4rem;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.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);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.partner-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.15);
}

.partner-strip img {
  height: 32px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  opacity: 0.8;
}

.promo-banner {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 1.5rem 0;
}

.promo-banner img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-item {
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(26, 43, 38, 0.65);
}

.feature-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.7rem;
}

.feature-item h3 {
  font-size: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #0a110f;
  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;
}

.site-footer h3 {
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: var(--text);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3,
  .related-grid,
  .feature-row,
  .brand-block,
  .page-layout,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brand-block,
  .page-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 62px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-panel {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    left: 0;
    background: rgba(12, 18, 16, 0.97);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.2rem 1.3rem;
    gap: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s var(--ease), opacity 0.28s;
  }

  .nav-panel.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.65rem 0;
    font-size: 1rem;
  }

  .nav-cta {
    margin-left: 0;
    flex-direction: column;
    width: 100%;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .brand img {
    height: 32px;
    max-width: 120px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .related-grid,
  .feature-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 360px;
    align-items: flex-end;
  }

  .hero-content {
    margin-bottom: 1.6rem;
  }

  section {
    padding: 2.6rem 0;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
