/* KGame – kgweb.monster */
:root {
  --ink: #12232d;
  --ink-soft: #3d5563;
  --muted: #6a8190;
  --line: #d7e4ec;
  --paper: #f2f7fa;
  --surface: #ffffff;
  --brand: #0c6f8a;
  --brand-deep: #084d61;
  --accent: #12b5c9;
  --accent-soft: #e4f7fa;
  --nav: #083544;
  --nav-ink: #eef8fb;
  --warn: #c45c26;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(8, 53, 68, 0.1);
  --header-h: 72px;
  --max: 1120px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", 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(18, 181, 201, 0.12), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(12, 111, 138, 0.1), transparent 50%),
    linear-gradient(180deg, #eaf3f7 0%, var(--paper) 28%, #eef4f7 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-deep);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.6em;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

ul, ol {
  color: var(--ink-soft);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(8, 53, 68, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: var(--header-h);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--nav-ink);
  flex-shrink: 0;
  max-width: min(48vw, 220px);
  overflow: hidden;
}

.brand img {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  white-space: nowrap;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: rgba(238, 248, 251, 0.88);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  background: rgba(18, 181, 201, 0.18);
  color: #fff;
}

.auth-desktop {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #fff;
  box-shadow: 0 8px 20px rgba(12, 111, 138, 0.28);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.btn-outline {
  background: transparent;
  color: var(--brand-deep);
  border: 1.5px solid rgba(12, 111, 138, 0.35);
}

.btn-outline:hover {
  background: var(--accent-soft);
  color: var(--brand-deep);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.menu-toggle[aria-expanded="true"] .label-open {
  display: none;
}

.menu-toggle .label-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .label-close {
  display: inline;
}

.nav-mobile {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  background: #07303d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.nav-mobile.open {
  display: block;
}

.nav-mobile a {
  display: block;
  color: rgba(238, 248, 251, 0.92);
  text-decoration: none;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  font-weight: 500;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  background: rgba(18, 181, 201, 0.16);
  color: #fff;
}

.nav-mobile .auth-mobile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile .auth-mobile .btn {
  width: 100%;
}

@media (min-width: 960px) {
  .menu-toggle {
    display: none;
  }

  .nav-desktop,
  .auth-desktop {
    display: flex;
  }

  .nav-mobile,
  .nav-mobile.open {
    display: none !important;
  }

  .header-inner {
    gap: 1.25rem;
  }

  .brand {
    max-width: 240px;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: grid;
  align-items: end;
  color: #fff;
  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-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 32, 42, 0.35) 0%, rgba(6, 32, 42, 0.72) 55%, rgba(6, 32, 42, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 53, 68, 0.55), transparent 60%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 5.5rem 0 3.2rem;
  animation: rise 0.7s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.45rem;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  font-weight: 600;
  max-width: 18ch;
  margin-bottom: 0.75rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 42ch;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(215, 228, 236, 0.8);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin-top: 1.8rem;
  font-size: 1.45rem;
}

.prose h3 {
  margin-top: 1.4rem;
  font-size: 1.15rem;
}

.prose a.ext {
  font-weight: 600;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

@media (min-width: 720px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 980px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cat-item {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a3342;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
}

.cat-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.cat-item:hover img {
  transform: scale(1.04);
}

.cat-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 0.9rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(4, 28, 36, 0.92));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
}

/* Cards / article lists */
.card-grid {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 700px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 18px rgba(8, 53, 68, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d3a48;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.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;
  font-weight: 500;
}

.article-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.article-card p {
  margin: 0;
  font-size: 0.92rem;
}

/* Feature split */
.split {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
  }

  .split.reverse .split-media {
    order: 2;
  }
}

.split-media {
  border-radius: 18px;
  overflow: hidden;
  background: #0a3342;
  box-shadow: var(--shadow);
}

.split-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.feature-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.8rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}

.feature-list img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.feature-list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.feature-list span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 46rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.2rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  padding: 0.95rem 0;
  list-style: none;
}

.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 {
  margin: 0 0 1rem;
}

/* Brands */
.brand-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .brand-row {
    grid-template-columns: repeat(8, 1fr);
  }
}

.brand-row img {
  width: 100%;
  height: 56px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem;
  filter: grayscale(0.15);
}

/* Page hero (inner) */
.page-hero {
  padding: 2.6rem 0 1.4rem;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  max-width: 18ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  opacity: 0.6;
}

/* Article */
.article-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.article-cover {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 1.4rem;
  background: #0a3342;
  box-shadow: var(--shadow);
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: grid;
  gap: 1rem;
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.side-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.side-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.side-links a:hover {
  color: var(--brand);
}

.related-grid {
  display: grid;
  gap: 0.75rem;
}

.related-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.related-item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #0a3342;
}

.related-item strong {
  font-size: 0.88rem;
  color: var(--ink);
  display: block;
  line-height: 1.35;
}

/* CTA band */
.cta-band {
  background:
    linear-gradient(135deg, rgba(8, 77, 97, 0.95), rgba(12, 111, 138, 0.92)),
    url("banner.3dd2.webp") center/cover;
  color: #fff;
  border-radius: 20px;
  padding: 2rem 1.4rem;
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .cta-band {
    grid-template-columns: 1.4fr auto;
    align-items: center;
    padding: 2.2rem 2rem;
  }
}

.cta-band h2 {
  color: #fff;
  margin: 0 0 0.4rem;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Footer */
.site-footer {
  background: #062833;
  color: rgba(238, 248, 251, 0.86);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.site-footer p,
.site-footer li {
  color: rgba(238, 248, 251, 0.78);
  font-size: 0.92rem;
}

.site-footer a {
  color: rgba(238, 248, 251, 0.86);
  text-decoration: none;
}

.site-footer a:hover {
  color: #7fe0ec;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
  color: rgba(238, 248, 251, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-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;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.error-page h1 {
  font-size: 1.6rem;
}

/* Utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--brand-deep);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.list-check {
  padding-left: 1.1rem;
}

.list-check li {
  margin-bottom: 0.45rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(18, 181, 201, 0.08);
  color: var(--ink);
  font-family: var(--font-display);
}

tr:last-child td {
  border-bottom: 0;
}

.note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1rem;
  border-radius: 0 10px 10px 0;
  color: var(--ink-soft);
  margin: 1rem 0;
}

.phone-visual {
  max-width: 280px;
  margin-inline: auto;
}

@media (max-width: 959px) {
  :root {
    --header-h: 64px;
  }

  .brand img {
    height: 34px;
    max-width: 150px;
  }
}
