/* KGame kg-g.click — shared styles */
:root {
  --bg: #07101c;
  --bg-2: #0c1a2e;
  --bg-3: #12243c;
  --surface: rgba(18, 36, 60, 0.72);
  --line: rgba(148, 175, 210, 0.18);
  --text: #e8eef8;
  --muted: #9aafc7;
  --brand: #2f7dff;
  --brand-2: #5aa0ff;
  --accent: #d4a84b;
  --ok: #3ecf8e;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --max: 1160px;
  --font: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --display: "Sora", "Be Vietnam Pro", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47, 125, 255, 0.22), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(212, 168, 75, 0.12), transparent 50%),
    linear-gradient(180deg, #081325 0%, var(--bg) 40%, #050b14 100%);
  min-height: 100vh;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #9ec5ff;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

ul, ol {
  color: var(--muted);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  backdrop-filter: blur(16px);
  background: rgba(7, 16, 28, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.logo-link img {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: #fff;
  background: rgba(47, 125, 255, 0.16);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  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.65rem 1.15rem;
  font-weight: 600;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #1a5ad4);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(90, 160, 255, 0.5);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, #c9952f, #e0b75a);
  color: #1a1205;
}

.btn-accent:hover {
  color: #1a1205;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(8, 16, 28, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-mobile.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile a {
  display: block;
  color: var(--text);
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.nav-mobile .mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.nav-mobile .mobile-actions .btn {
  width: 100%;
}

body.menu-open {
  overflow: hidden;
}

main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  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 top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 11, 20, 0.92) 0%, rgba(5, 11, 20, 0.55) 48%, rgba(5, 11, 20, 0.35) 100%),
    linear-gradient(0deg, rgba(5, 11, 20, 0.95) 0%, transparent 42%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 4.5rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.brand-mark {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  background: linear-gradient(90deg, #fff, #9ec5ff 55%, #d4a84b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.hero p {
  font-size: 1.02rem;
  max-width: 34rem;
  color: #c5d4e8;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-on-scroll.reveal,
.reveal {
  opacity: 1;
  transform: none;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(18, 36, 60, 0.35), transparent);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cat-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(90, 160, 255, 0.45);
}

.cat-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cat-item:hover img {
  transform: scale(1.05);
}

.cat-item span {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1rem 1.1rem;
  background: linear-gradient(0deg, rgba(5, 11, 20, 0.92), transparent);
  color: #fff;
  font-weight: 700;
  font-family: var(--display);
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(12, 26, 46, 0.7);
  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: 16 / 10;
  overflow: hidden;
  background: var(--bg-3);
}

.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.1rem 1.15rem 1.25rem;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--brand-2);
}

.article-card p {
  font-size: 0.92rem;
  margin: 0;
}

/* Brand intro */
.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.intro-visual {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  min-height: 320px;
}

.intro-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.feature-list li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.7rem;
  color: var(--muted);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* Brands strip */
.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  filter: grayscale(0.2) brightness(1.05);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.brand-strip img:hover {
  opacity: 1;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 26, 46, 0.55);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: #fff;
  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 p {
  padding: 0 1.15rem 1.1rem;
  margin: 0;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.8rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(47, 125, 255, 0.1), transparent);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand-2);
}

.breadcrumb span {
  opacity: 0.5;
}

/* Content layout */
.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.content-main {
  min-width: 0;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 1.4rem;
  font-size: 1.1rem;
}

.prose p,
.prose li {
  color: #b7c7db;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose img {
  border-radius: 12px;
  margin: 1.2rem 0;
  border: 1px solid var(--line);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: rgba(12, 26, 46, 0.7);
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.side-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-links li {
  margin-bottom: 0.65rem;
}

.side-links a {
  color: #c8d7ea;
  font-size: 0.92rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #050b14;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.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.9rem;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #7f93ab;
  font-size: 0.85rem;
}

/* 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(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

/* Utilities */
.mt-2 { margin-top: 2rem; }
.text-center { text-align: center; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(47, 125, 255, 0.15);
  color: var(--brand-2);
  font-weight: 600;
}

.promo-banner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(18, 36, 60, 0.9), rgba(47, 125, 255, 0.12));
}

.promo-banner .copy {
  padding: 1.8rem;
}

.promo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
}

.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: rgba(12, 26, 46, 0.55);
}

.guide-row img {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.guide-row h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.guide-row h3 a {
  color: var(--text);
}

.guide-row p {
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 980px) {
  .cat-grid,
  .card-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .content-wrap,
  .promo-banner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .guide-row {
    grid-template-columns: 110px 1fr;
  }

  .guide-row .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .nav-desktop,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-mobile {
    display: block;
  }

  .logo-link img {
    height: 34px;
    max-width: 132px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    margin-bottom: 3rem;
  }

  .cat-grid,
  .card-grid,
  .related-grid,
  .brand-strip {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 3.2rem 0;
  }
}

@media (max-width: 520px) {
  .cat-grid,
  .card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .guide-row {
    grid-template-columns: 1fr;
  }

  .guide-row img {
    width: 100%;
    height: 160px;
  }

  .brand-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}
