/* KGame - kgapp.cfd | Game knowledge portal */
@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Sora:wght@500;600;700&display=swap");

:root {
  --bg: #070b14;
  --bg-elevated: #0e1524;
  --surface: #141c2e;
  --surface-2: #1a2438;
  --line: rgba(196, 214, 240, 0.1);
  --text: #eef3fb;
  --muted: #95a6bd;
  --accent: #3d8bfd;
  --accent-2: #62a7ff;
  --gold: #d4a54a;
  --gold-soft: #f0d48a;
  --ok: #3ecf8e;
  --danger: #ef6b6b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --max: 1160px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", sans-serif;
}

*,
*::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 500px at 10% -10%, rgba(61, 139, 253, 0.18), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(212, 165, 74, 0.12), transparent 50%),
    linear-gradient(180deg, #0a1020 0%, var(--bg) 40%, #05080f 100%);
  background-attachment: fixed;
  line-height: 1.7;
  min-height: 100vh;
  padding-top: var(--header-h);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--gold-soft);
}

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;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.86);
  border-bottom: 1px solid var(--line);
}

.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;
  color: var(--text);
  flex-shrink: 0;
  max-height: calc(var(--header-h) - 20px);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #b8842d 100%);
  color: #1a1204;
}

.btn-primary:hover {
  color: #120c02;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(61, 139, 253, 0.5);
  color: var(--accent-2);
}

.btn-outline {
  border-color: rgba(212, 165, 74, 0.45);
  color: var(--gold-soft);
  background: rgba(212, 165, 74, 0.08);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  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-weight: 600;
  font-size: 0.88rem;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-panel {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: rgba(8, 12, 22, 0.97);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.4rem;
  z-index: 999;
  box-shadow: var(--shadow);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-panel a {
  color: var(--text);
  padding: 0.75rem 0.6rem;
  border-radius: 10px;
  font-weight: 500;
}

.mobile-panel a:hover,
.mobile-panel a.active {
  background: rgba(61, 139, 253, 0.12);
  color: var(--accent-2);
}

.mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.mobile-auth .btn {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 15, 0.92) 0%, rgba(5, 8, 15, 0.72) 42%, rgba(5, 8, 15, 0.35) 100%),
    linear-gradient(0deg, rgba(5, 8, 15, 0.95) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  max-width: 640px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.brand-mark img {
  height: 36px;
  width: auto;
}

.brand-mark span {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  margin-bottom: 0.9rem;
  color: #fff;
}

.hero .lead {
  font-size: 1.05rem;
  color: #c9d5e8;
  margin-bottom: 1.5rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(20, 28, 46, 0.55), rgba(20, 28, 46, 0.15));
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 46rem;
}

.section-head h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

/* Prose content */
.prose {
  max-width: 70ch;
}

.prose h2,
.prose h3 {
  margin-top: 1.8rem;
  color: var(--text);
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.rich-block {
  background: rgba(20, 28, 46, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.side-panel {
  background: linear-gradient(160deg, rgba(61, 139, 253, 0.12), rgba(212, 165, 74, 0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.side-panel h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.side-panel ul {
  margin: 0;
  padding-left: 1.1rem;
}

.side-panel li {
  margin-bottom: 0.45rem;
  color: var(--muted);
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-item {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  color: var(--text);
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 139, 253, 0.45);
  box-shadow: var(--shadow);
  color: var(--text);
}

.cat-item .thumb {
  aspect-ratio: 1 / 1;
  background: #05070d;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cat-item .thumb img {
  max-height: 78%;
  width: auto;
  object-fit: contain;
}

.cat-item .label {
  padding: 0.85rem 0.75rem 1.05rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 165, 74, 0.35);
  color: inherit;
}

.article-card .cover {
  aspect-ratio: 16 / 11;
  background: #05070d;
  overflow: hidden;
}

.article-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .cover img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 1rem 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.article-card h3 {
  font-size: 1.02rem;
  margin: 0;
}

.article-card p {
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
}

.article-card .more {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-top: 0.35rem;
}

/* Brands */
.brand-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-row .brand-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  display: grid;
  place-items: center;
  min-height: 64px;
}

.brand-row img {
  max-height: 28px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
  filter: brightness(1.05);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.2rem;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
  margin: 0;
}

/* Promo strip */
.promo-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  align-items: center;
}

.promo-visual {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.promo-visual img {
  border-radius: 12px;
}

.promo-visual .vip {
  height: 56px;
  width: auto;
}

.promo-visual .promo {
  height: 56px;
  width: auto;
  max-width: 100%;
}

.promo-visual .phone {
  height: 140px;
  width: auto;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.6rem 0 1.6rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(61, 139, 253, 0.08), transparent);
}

.page-hero h1 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  margin-bottom: 0.65rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent-2);
}

.breadcrumb span {
  opacity: 0.5;
}

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

.article-main .cover-xl {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  background: #05070d;
}

.article-main .cover-xl img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-aside {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.aside-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.aside-box h3 {
  font-size: 0.98rem;
  margin-bottom: 0.75rem;
}

.aside-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aside-links li {
  margin-bottom: 0.55rem;
}

.aside-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

.aside-links a:hover {
  color: var(--gold-soft);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

/* About visual */
.about-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-visual figure {
  margin: 0;
  background: #05070d;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 1rem;
}

.about-visual img {
  max-height: 200px;
  width: auto;
  object-fit: contain;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h) - 220px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 6rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #05080f;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.9rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.45rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--accent-2);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.tag {
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.list-page .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.list-page .filters a {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.list-page .filters a.active,
.list-page .filters a:hover {
  border-color: rgba(61, 139, 253, 0.5);
  color: var(--text);
  background: rgba(61, 139, 253, 0.1);
}

.guide-steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.guide-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.guide-step::before {
  counter-increment: step;
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #1d4f9a);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.guide-step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}

.guide-step p {
  margin: 0;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.feature-item p {
  margin: 0;
  font-size: 0.92rem;
}

.icon-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.icon-row img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Motions */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(212, 165, 74, 0.25);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(212, 165, 74, 0);
  }
}

.hero-content,
.section-head,
.cat-item,
.article-card {
  animation: riseIn 0.7s ease both;
}

.cat-item:nth-child(2),
.article-card:nth-child(2) {
  animation-delay: 0.08s;
}

.cat-item:nth-child(3),
.article-card:nth-child(3) {
  animation-delay: 0.14s;
}

.cat-item:nth-child(4),
.article-card:nth-child(4) {
  animation-delay: 0.2s;
}

.btn-primary {
  animation: softPulse 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid,
  .article-layout,
  .promo-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
  }

  .brand-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-desktop,
  .header-actions .desktop-only {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .header-actions {
    gap: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  .brand img {
    height: 34px;
    max-height: 34px;
  }

  .brand-text {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding: 3.2rem 0 2.4rem;
  }

  .cat-grid,
  .card-grid,
  .related-grid,
  .feature-list,
  .about-visual {
    grid-template-columns: 1fr;
  }

  .brand-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .section {
    padding: 3rem 0;
  }

  .promo-visual .phone {
    height: 120px;
  }
}

@media (max-width: 420px) {
  .brand-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-auth {
    grid-template-columns: 1fr;
  }
}
