/* KGame – kgameweb.blog */
:root {
  --bg: #0a0e16;
  --bg-soft: #101826;
  --surface: #151e2e;
  --surface-2: #1a2538;
  --line: rgba(148, 173, 210, 0.14);
  --text: #e9eef7;
  --muted: #95a4bc;
  --accent: #4b9dff;
  --accent-deep: #2b6fd4;
  --accent-soft: rgba(75, 157, 255, 0.14);
  --gold: #d4b45a;
  --danger: #e85d5d;
  --ok: #3ecf8e;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --max: 1180px;
  --font: "Be Vietnam Pro", "Segoe 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(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(43, 111, 212, 0.22), transparent 55%),
    radial-gradient(900px 500px at 90% 5%, rgba(212, 180, 90, 0.08), transparent 50%),
    linear-gradient(180deg, #0a0e16 0%, #0d1320 40%, #0a0e16 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #7bb8ff;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.7em;
  font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 3.2vw, 2.55rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.15rem; }

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);
  display: flex;
  align-items: center;
  background: rgba(10, 14, 22, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  max-height: calc(var(--header-h) - 20px);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.15rem;
  flex-wrap: wrap;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0;
  position: relative;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
}

.nav-desktop a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.auth-desktop {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(43, 111, 212, 0.35);
}

.btn-primary:hover { color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(75, 157, 255, 0.45);
  color: #fff;
  background: var(--accent-soft);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(12, 17, 28, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.35rem;
  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.5rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.mobile-panel .mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}

.mobile-panel .mobile-auth .btn { width: 100%; }

main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  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(8, 12, 20, 0.92) 0%, rgba(8, 12, 20, 0.72) 42%, rgba(8, 12, 20, 0.35) 100%),
    linear-gradient(0deg, rgba(8, 12, 20, 0.95) 0%, transparent 45%);
}

.hero-content {
  padding: 3.5rem 0 3.2rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.hero-brand img {
  height: 48px;
  width: auto;
}

.hero-brand span {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin-bottom: 0.85rem;
  color: #fff;
}

.hero .lead {
  font-size: 1.05rem;
  color: #c5d0e2;
  margin-bottom: 1.5rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  animation: rise 0.7s ease both;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.section-head p {
  margin: 0;
  max-width: 36rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.panel {
  background: linear-gradient(180deg, rgba(26, 37, 56, 0.85), rgba(16, 24, 38, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 280px;
}

.intro-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.ext-link {
  color: var(--gold);
  font-weight: 600;
  border-bottom: 1px dashed rgba(212, 180, 90, 0.45);
}

.ext-link:hover {
  color: #efd48a;
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-item {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  color: inherit;
  text-decoration: none;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(75, 157, 255, 0.4);
  box-shadow: var(--shadow);
  color: inherit;
}

.cat-item .thumb {
  aspect-ratio: 1 / 1;
  background: #000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cat-item .thumb img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.cat-item .meta {
  padding: 0.9rem 1rem 1.1rem;
}

.cat-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--text);
}

.cat-item p {
  margin: 0;
  font-size: 0.86rem;
}

/* Cards */
.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;
  transition: transform 0.25s ease, border-color 0.25s ease;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(75, 157, 255, 0.35);
  color: inherit;
}

.article-card .cover {
  aspect-ratio: 16 / 10;
  background: #000;
  overflow: hidden;
}

.article-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover .cover img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 1rem 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.article-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  color: var(--text);
}

.article-card p {
  margin: 0;
  font-size: 0.9rem;
  flex: 1;
}

/* 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;
  opacity: 0.85;
  filter: grayscale(0.2);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.brand-strip img:hover {
  opacity: 1;
  filter: none;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  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: "+";
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
  margin: 0;
}

/* Promo strip */
.promo-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.promo-row img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.5rem;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.4rem 0 1.2rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(43, 111, 212, 0.12), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { opacity: 0.5; }

/* Article */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.75rem;
  padding: 2rem 0 3.5rem;
}

.article-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 2rem;
}

.article-content .cover-lg {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0 0 1.4rem;
  background: #000;
}

.article-content .cover-lg img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-content h2 {
  margin-top: 1.6rem;
}

.article-content h3 {
  margin-top: 1.25rem;
  color: #d7e3f5;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.side-list a {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  display: block;
}

.side-list a:hover { color: var(--accent); }

.related-mini {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.65rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.related-mini img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.related-mini span {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 550;
  line-height: 1.35;
}

/* Lists */
.list-page {
  padding: 2rem 0 3.5rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--surface);
}

.chip.active,
.chip:hover {
  color: #fff;
  border-color: rgba(75, 157, 255, 0.5);
  background: var(--accent-soft);
}

/* Legal / about */
.prose {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
}

.prose .panel {
  padding: 1.75rem 1.5rem;
}

.prose h2 { margin-top: 1.8rem; }
.prose li { margin-bottom: 0.4rem; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 0.9rem 1rem;
  border-radius: 0 10px 10px 0;
  margin: 1.2rem 0;
  color: #c9d7ec;
}

.warn {
  border-left-color: var(--gold);
  background: rgba(212, 180, 90, 0.1);
}

/* 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);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #9ec5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.4rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #070b12;
  padding: 2.75rem 0 1.5rem;
  margin-top: 1rem;
}

.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-grid h4 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: #fff;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-grid a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-grid a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

.disclaimer {
  font-size: 0.82rem;
  color: #7f8da3;
  margin-top: 0.75rem;
}

/* Utilities */
.text-light { color: var(--text); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.guide-steps {
  display: grid;
  gap: 0.9rem;
  counter-reset: step;
}

.guide-steps li {
  list-style: none;
  position: relative;
  padding: 1rem 1rem 1rem 3.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.guide-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Responsive */
@media (max-width: 980px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-grid,
  .article-layout,
  .promo-row,
  .two-col,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .brand-strip { grid-template-columns: repeat(4, 1fr); }
  .nav-desktop,
  .header-actions .auth-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .sidebar { order: 2; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand img { height: 34px; max-height: 34px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .brand-strip { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
  .hero { min-height: 520px; }
  .hero-content { padding: 2.4rem 0 2.2rem; }
  .section { padding: 2.5rem 0; }
  .article-content { padding: 1.15rem 1rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
