/* KGame – kgameweb.pics */
:root {
  --bg: #eef2f6;
  --bg-alt: #e4ebf2;
  --surface: #ffffff;
  --ink: #0c1a28;
  --ink-soft: #3d5166;
  --muted: #6b7f94;
  --line: #d2dde8;
  --brand: #0a7ea4;
  --brand-deep: #065a78;
  --accent: #c45c26;
  --ok: #1a7a4c;
  --nav-h: 72px;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(12, 26, 40, 0.08);
  --font-display: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(10, 126, 164, 0.12), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(196, 92, 38, 0.08), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 40%, var(--bg-alt) 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

ul {
  list-style: none;
}

.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(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(210, 221, 232, 0.9);
  box-shadow: 0 4px 24px rgba(12, 26, 40, 0.04);
}

.header-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  max-height: var(--nav-h);
  padding: 10px 0;
}

.logo-link img {
  height: 44px;
  width: auto;
  max-height: calc(var(--nav-h) - 20px);
  object-fit: contain;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--brand-deep);
  background: rgba(10, 126, 164, 0.08);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.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-close {
  display: none;
}

.menu-toggle.is-open .menu-label-open {
  display: none;
}

.menu-toggle.is-open .menu-label-close {
  display: inline;
}

.mobile-panel {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  left: 0;
  z-index: 999;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem 0 1.25rem;
  transform: translateY(-120%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
}

.mobile-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav a {
  color: var(--ink);
  font-weight: 600;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.mobile-auth .btn {
  width: 100%;
}

@media (min-width: 960px) {
  .nav-desktop,
  .header-actions {
    display: flex;
  }

  .menu-toggle,
  .mobile-panel {
    display: none !important;
  }
}

/* Page shell */
main {
  padding-top: var(--nav-h);
}

.hero {
  position: relative;
  min-height: clamp(420px, 72vh, 640px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #0b1f33;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroZoom 14s 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(90deg, rgba(8, 22, 36, 0.88) 0%, rgba(8, 22, 36, 0.55) 48%, rgba(8, 22, 36, 0.25) 100%),
    linear-gradient(0deg, rgba(8, 22, 36, 0.75) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  color: #fff;
  max-width: 640px;
  animation: riseIn 0.8s ease both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.85rem;
  color: #e8f4fa;
}

.hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(210, 221, 232, 0.7);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 42rem;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}

.section-head p {
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.45rem;
}

.prose {
  color: var(--ink-soft);
  max-width: 48rem;
}

.prose p + p {
  margin-top: 1rem;
}

.prose a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.grid-2 {
  display: grid;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
}

.grid-4 {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1.1fr 0.9fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.cat-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 180px;
  background: #102536;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.cat-tile:hover {
  transform: translateY(-4px);
}

.cat-tile img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  opacity: 0.92;
}

.cat-tile span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 1rem;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(0deg, rgba(8, 22, 36, 0.9), transparent);
}

.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
  border: none;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.article-card:hover {
  transform: translateY(-3px);
}

.article-card .thumb {
  border-radius: var(--radius);
  overflow: hidden;
  background: #d8e3ee;
  aspect-ratio: 16 / 10;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .meta {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.article-card h3 {
  margin-top: 0.35rem;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--ink);
}

.article-card p {
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.guide-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .guide-row {
    grid-template-columns: 120px 1fr;
    align-items: center;
  }
}

.guide-row .thumb {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #d8e3ee;
}

.guide-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-row h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.guide-row p {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  align-items: center;
}

@media (min-width: 700px) {
  .brand-strip {
    grid-template-columns: repeat(8, 1fr);
  }
}

.brand-strip img {
  width: 100%;
  height: 52px;
  object-fit: contain;
  filter: grayscale(0.2);
  opacity: 0.9;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.brand-strip img:hover {
  filter: none;
  opacity: 1;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 760px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.25rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-body {
  padding: 0 1.15rem 1.15rem;
  color: var(--ink-soft);
}

.page-hero {
  padding: 2.75rem 0 1.5rem;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.page-hero p {
  color: var(--ink-soft);
  max-width: 42rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span {
  color: var(--ink-soft);
}

.article-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: #d8e3ee;
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-body h2 {
  font-size: 1.35rem;
  margin: 1.75rem 0 0.7rem;
}

.article-body h3 {
  font-size: 1.12rem;
  margin: 1.35rem 0 0.55rem;
}

.article-body p,
.article-body li {
  color: var(--ink-soft);
}

.article-body p + p {
  margin-top: 1rem;
}

.article-body ul,
.article-body ol {
  margin: 0.85rem 0 0.85rem 1.2rem;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li + li {
  margin-top: 0.35rem;
}

.aside-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 1rem;
}

.aside-box h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.aside-links {
  display: grid;
  gap: 0.65rem;
}

.aside-links a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.35;
}

.related-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.legal-content,
.about-content {
  max-width: 760px;
  padding-bottom: 3.5rem;
}

.legal-content h2,
.about-content h2 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.65rem;
}

.legal-content p,
.about-content p {
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: clamp(3rem, 10vw, 5rem);
  letter-spacing: -0.04em;
  color: var(--brand-deep);
}

.error-page p {
  color: var(--ink-soft);
  margin: 0.75rem auto 1.5rem;
  max-width: 28rem;
}

.feature-split {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 860px) {
  .feature-split {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.feature-visual {
  border-radius: var(--radius);
  overflow: hidden;
  background: #102536;
  box-shadow: var(--shadow);
}

.feature-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.criteria-list {
  display: grid;
  gap: 1rem;
}

.criteria-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.criteria-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.criteria-item p {
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.site-footer {
  background: #0b1f33;
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand img {
  height: 42px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.94rem;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.72);
}

.footer-col h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.55rem;
  font-size: 0.94rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.list-page .article-card {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-deep);
  background: rgba(10, 126, 164, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
