/* KGame – kgamee.sbs | Game info portal */
:root {
  --bg: #0c0e14;
  --bg-elevated: #141824;
  --surface: #1a1f2e;
  --surface-hover: #222839;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef1f7;
  --text-muted: #9aa3b5;
  --accent: #4d9fff;
  --accent-strong: #2b78e0;
  --accent-soft: rgba(77, 159, 255, 0.14);
  --gold: #d4a84b;
  --danger: #e85d5d;
  --radius: 12px;
  --header-h: 72px;
  --max: 1120px;
  --font-display: "Oxanium", "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(77, 159, 255, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(212, 168, 75, 0.08), transparent 50%),
    linear-gradient(180deg, #0c0e14 0%, #10131c 40%, #0c0e14 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #7bb6ff;
}

ul,
ol {
  padding-left: 1.25rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.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);
  display: flex;
  align-items: center;
  background: rgba(12, 14, 20, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.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: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  max-height: var(--header-h);
  padding: 10px 0;
}

.brand img {
  height: 44px;
  width: auto;
  max-height: calc(var(--header-h) - 20px);
  object-fit: contain;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  justify-content: center;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #4d9fff, #2f78e0);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  margin-left: auto;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.menu-toggle .label-close {
  display: none;
}

.menu-toggle.is-open .label-open {
  display: none;
}

.menu-toggle.is-open .label-close {
  display: inline;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 10, 16, 0.97);
  padding: 1.25rem 1.5rem 2rem;
  z-index: 999;
  overflow-y: auto;
}

.nav-mobile.is-open {
  display: block;
  animation: fadeSlide 0.28s var(--ease);
}

.nav-mobile a {
  display: block;
  color: var(--text);
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.nav-mobile .mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 900px) {
  .nav-desktop,
  .header-actions {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }
}

/* Main offset for fixed header */
.site-main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(420px, 78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 10, 16, 0.92) 0%, rgba(8, 10, 16, 0.72) 48%, rgba(8, 10, 16, 0.35) 100%),
    linear-gradient(0deg, rgba(8, 10, 16, 0.95) 0%, transparent 45%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 3.5rem;
  max-width: 640px;
  animation: riseIn 0.7s var(--ease) both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.85rem;
}

.hero .lead {
  color: rgba(238, 241, 247, 0.88);
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 640px;
}

.section-head p {
  margin-bottom: 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.02);
  border-block: 1px solid var(--border);
}

.prose {
  max-width: 720px;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose h2 {
  margin-top: 2rem;
}

.prose h3 {
  margin-top: 1.5rem;
  color: var(--text);
}

.prose li {
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 700px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.25rem 0.75rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(77, 159, 255, 0.45);
  background: var(--surface-hover);
  color: var(--text);
}

.cat-item img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.cat-item span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Article cards — interaction containers */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(77, 159, 255, 0.4);
  box-shadow: var(--shadow);
  color: inherit;
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0c12;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.article-card p {
  font-size: 0.92rem;
  margin-bottom: 0;
  flex: 1;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 800px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  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;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-body {
  padding: 0 1.15rem 1.15rem;
}

.faq-item .faq-body p:last-child {
  margin-bottom: 0;
}

/* Brand strip */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 1.75rem;
  padding: 1.5rem 0;
  opacity: 0.85;
}

.brand-strip img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0.2);
}

/* Page hero (inner pages) */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(77, 159, 255, 0.08), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span[aria-hidden] {
  opacity: 0.5;
}

/* Article layout */
.article-layout {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 3.5rem;
}

@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.sidebar-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-list li {
  border-bottom: 1px solid var(--border);
}

.related-list li:last-child {
  border-bottom: none;
}

.related-list a {
  display: block;
  padding: 0.7rem 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.related-list a:hover {
  color: var(--accent);
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #090b10;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand img {
  height: 40px;
  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 a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* Misc */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.criteria-list {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .criteria-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.criteria-item {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.criteria-item h3 {
  margin-bottom: 0.4rem;
}

.criteria-item p {
  margin-bottom: 0;
  font-size: 0.93rem;
}

.promo-banner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(77, 159, 255, 0.12), rgba(212, 168, 75, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .promo-banner {
    grid-template-columns: 1fr 200px;
  }
}

.promo-banner img {
  justify-self: center;
  max-height: 180px;
  width: auto;
  object-fit: contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body.menu-open {
  overflow: hidden;
}
