/* KGame – kgweb.sbs | Game portal editorial styles */
:root {
  --bg: #eef3f1;
  --bg-deep: #dce8e3;
  --surface: #ffffff;
  --ink: #10231c;
  --ink-soft: #3d5249;
  --muted: #6a7d74;
  --line: rgba(16, 35, 28, 0.1);
  --accent: #0b7a5c;
  --accent-dark: #065a44;
  --accent-soft: #d7f0e6;
  --gold: #b8891a;
  --gold-soft: #f7efd6;
  --danger: #b42318;
  --shadow: 0 12px 40px rgba(16, 35, 28, 0.08);
  --radius: 14px;
  --header-h: 72px;
  --max: 1120px;
  --font: "Be Vietnam Pro", system-ui, sans-serif;
  --display: "Outfit", "Be Vietnam Pro", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(11, 122, 92, 0.12), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(184, 137, 26, 0.1), transparent 55%),
    linear-gradient(180deg, #f5faf8 0%, var(--bg) 40%, #e8efec 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--ink);
}

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;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(16, 35, 28, 0.04);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
  min-width: 0;
}

.brand img {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .brand-name {
    display: none;
  }
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
  font-family: var(--font);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 122, 92, 0.25);
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--bg-deep);
  color: var(--ink);
}

.btn-gold {
  background: var(--gold);
  color: #fff;
}

.btn-gold:hover {
  background: #9a7214;
  color: #fff;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  margin-left: auto;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  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;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem 1.4rem;
  z-index: 999;
  animation: slideDown 0.25s ease;
}

.mobile-panel.is-open {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-panel nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-panel a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
}

.mobile-panel a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.mobile-actions .btn {
  width: 100%;
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }
  .nav-desktop {
    display: flex;
    margin-left: auto;
  }
  .header-actions {
    display: flex;
    margin-left: 0.75rem;
  }
}

/* ===== Main offset ===== */
.site-main {
  padding-top: var(--header-h);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: min(72vh, 620px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0a1f18;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 28, 22, 0.88) 0%, rgba(8, 28, 22, 0.55) 48%, rgba(8, 28, 22, 0.25) 100%),
    linear-gradient(0deg, rgba(8, 28, 22, 0.75) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 3rem;
  color: #fff;
  max-width: 640px;
  animation: fadeUp 0.8s ease both;
}

.hero-content .brand-mark {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 0.4rem;
  color: #fff;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  max-width: 36rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Sections ===== */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 2rem;
  animation: fadeUp 0.7s ease both;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.section-head p {
  margin: 0;
  font-size: 1.02rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ===== Intro ===== */
.intro-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .intro-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-deep);
  min-height: 280px;
}

.intro-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.intro-visual.phone-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  background:
    linear-gradient(145deg, var(--accent-soft), var(--gold-soft));
}

.intro-visual.phone-frame img {
  width: min(180px, 55%);
  min-height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 30px rgba(16, 35, 28, 0.25));
  animation: floatY 4s ease-in-out infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.prose strong {
  color: var(--ink);
  font-weight: 650;
}

/* ===== Categories ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cat-item {
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.cat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(11, 122, 92, 0.35);
  color: inherit;
}

.cat-item .thumb {
  aspect-ratio: 1;
  background: #f3f7f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cat-item .thumb img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.cat-item:hover .thumb img {
  transform: scale(1.06);
}

.cat-item .body {
  padding: 0.85rem 1rem 1.1rem;
}

.cat-item h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.cat-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== Cards / articles ===== */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
}

.article-card .cover {
  aspect-ratio: 4 / 5;
  background: #e8efec;
  overflow: hidden;
}

.article-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .cover img {
  transform: scale(1.04);
}

.article-card .meta {
  padding: 1.1rem 1.15rem 1.3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card .tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.article-card p {
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
}

.article-card .more {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--accent-dark);
}

/* Horizontal list cards */
.list-card {
  display: grid;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s;
}

.list-card:hover {
  box-shadow: var(--shadow);
  color: inherit;
}

@media (min-width: 640px) {
  .list-card {
    grid-template-columns: 160px 1fr;
    align-items: stretch;
  }
}

.list-card .cover {
  aspect-ratio: 3 / 4;
  background: #e8efec;
}

@media (min-width: 640px) {
  .list-card .cover {
    aspect-ratio: auto;
    height: 100%;
    min-height: 140px;
  }
}

.list-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-card .meta {
  padding: 1rem 1.15rem 1.15rem;
}

.list-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.list-stack {
  display: grid;
  gap: 1rem;
}

/* ===== Brands strip ===== */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.brand-strip img {
  height: 36px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  opacity: 0.75;
  filter: grayscale(0.3);
  transition: opacity 0.2s, filter 0.2s;
}

.brand-strip img:hover {
  opacity: 1;
  filter: none;
}

/* ===== FAQ ===== */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 760px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 650;
  font-family: var(--display);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .answer {
  padding: 0 1.15rem 1.15rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.faq-item .answer p:last-child {
  margin-bottom: 0;
}

/* ===== Page hero (inner) ===== */
.page-hero {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  max-width: 640px;
  margin: 0;
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.5;
}

/* ===== Article body ===== */
.article-layout {
  display: grid;
  gap: 2.5rem;
  padding: 2.5rem 0 3.5rem;
}

@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.article-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 2rem;
}

@media (min-width: 700px) {
  .article-body {
    padding: 2rem 2.25rem 2.5rem;
  }
}

.article-body .lead {
  font-size: 1.1rem;
  color: var(--ink);
}

.article-body h2 {
  font-size: 1.35rem;
  margin-top: 1.75rem;
}

.article-body h3 {
  font-size: 1.1rem;
  margin-top: 1.35rem;
}

.article-cover {
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 1.5rem;
  background: #e8efec;
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.sidebar-box h2 {
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.related-list {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.related-list img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8efec;
}

.related-list span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.related-list a:hover span {
  color: var(--accent-dark);
}

/* ===== Promo band ===== */
.promo-band {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(120deg, #0b3d31 0%, #0b7a5c 55%, #146b8a 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  overflow: hidden;
}

@media (min-width: 800px) {
  .promo-band {
    grid-template-columns: 1.2fr 0.8fr;
    padding: 2rem 2.25rem;
  }
}

.promo-band h2,
.promo-band p {
  color: #fff;
}

.promo-band p {
  opacity: 0.9;
}

.promo-band img {
  justify-self: center;
  max-height: 90px;
  width: auto;
  object-fit: contain;
}

/* ===== Error pages ===== */
.error-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.error-page h1 {
  font-size: 1.6rem;
}

/* ===== Footer ===== */
.site-footer {
  background: #0c1f19;
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.footer-brand span {
  font-family: var(--display);
  font-weight: 700;
  color: #fff;
  font-size: 1.15rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* ===== Utilities ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-link {
  font-weight: 650;
}

.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

.checklist {
  padding-left: 1.15rem;
}

.checklist li {
  margin-bottom: 0.45rem;
}

.note-box {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1rem;
  border-radius: 0 10px 10px 0;
  margin: 1.25rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f3f7f5;
  font-weight: 650;
  color: var(--ink);
}

tr:last-child td {
  border-bottom: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
