/* KGame – kgamee.pics | Game portal styles */
:root {
  --bg: #0b0f16;
  --bg-2: #121826;
  --bg-3: #182033;
  --surface: #1c2538;
  --text: #eef3fb;
  --muted: #97a6bd;
  --accent: #3b9eff;
  --accent-dark: #1f78e0;
  --accent-soft: rgba(59, 158, 255, 0.14);
  --gold: #d4a84b;
  --line: rgba(255, 255, 255, 0.08);
  --danger: #ef5b5b;
  --radius: 14px;
  --header-h: 70px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --max: 1180px;
  --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);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59, 158, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(212, 168, 75, 0.08), transparent 50%),
    linear-gradient(180deg, #0b0f16 0%, #0e1420 40%, #0b0f16 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 var(--ease);
}

a:hover {
  color: #7cbcff;
}

ul,
ol {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  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;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(11, 15, 22, 0.88);
  backdrop-filter: blur(14px);
  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: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  flex-shrink: 0;
  max-width: 46%;
}

.brand img {
  height: 36px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-text span {
  color: var(--accent);
}

.nav-desktop {
  display: none;
  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: var(--accent-soft);
}

.header-actions {
  display: none;
  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: 10px;
  padding: 0.65rem 1.15rem;
  font-weight: 650;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 8px 22px rgba(31, 120, 224, 0.35);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(59, 158, 255, 0.45);
  color: var(--accent);
  background: var(--accent-soft);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.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 {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: min(86vw, 320px);
  height: calc(100vh - var(--header-h));
  background: #101722;
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform 0.28s var(--ease);
  z-index: 999;
  padding: 1.2rem;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.mobile-panel.open {
  transform: translateX(0);
}

.mobile-panel nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.mobile-panel nav a {
  color: var(--text);
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  font-weight: 550;
}

.mobile-panel nav a:hover,
.mobile-panel nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.mobile-actions {
  display: grid;
  gap: 0.65rem;
}

.menu-overlay {
  position: fixed;
  inset: var(--header-h) 0 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 998;
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: grid;
  align-items: 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::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 12, 20, 0.92) 8%, rgba(8, 12, 20, 0.55) 48%, rgba(8, 12, 20, 0.35) 100%),
    linear-gradient(0deg, rgba(11, 15, 22, 0.98) 0%, transparent 42%);
}

.hero-content {
  padding: 4.5rem 0 3.2rem;
  max-width: 640px;
  animation: rise 0.8s var(--ease) both;
}

.hero-kicker {
  display: inline-block;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.4vw, 3rem);
  margin-bottom: 0.9rem;
}

.hero p {
  font-size: 1.05rem;
  max-width: 34rem;
  color: #c7d3e6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.section-head p {
  margin: 0.35rem 0 0;
  max-width: 38rem;
}

.section-link {
  white-space: nowrap;
  font-weight: 600;
  color: var(--accent);
}

.intro-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}

.intro-copy h2 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  min-height: 260px;
}

.intro-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
}

.promo-strip {
  margin-top: 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.promo-strip img {
  width: 100%;
  height: auto;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-item {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 0.85rem 1.1rem;
  text-align: center;
  color: var(--text);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 158, 255, 0.4);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  color: var(--text);
}

.cat-item img {
  width: 88px;
  height: 88px;
  margin: 0 auto 0.75rem;
  object-fit: contain;
}

.cat-item h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.cat-item p {
  margin: 0;
  font-size: 0.84rem;
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform 0.25s var(--ease), border-color 0.25s;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 158, 255, 0.35);
  color: inherit;
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  background: #0a0e15;
  overflow: hidden;
}

.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.05);
}

.article-card .body {
  padding: 1.05rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.tag {
  color: var(--accent);
  font-weight: 650;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.article-card p {
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
  flex: 1;
}

.read-more {
  font-weight: 650;
  color: var(--accent);
  font-size: 0.9rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 860px;
}

.faq-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 650;
  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.25rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1.1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.5;
  margin: 0 0.35rem;
}

/* Page hero compact */
.page-hero {
  padding: 2.2rem 0 1.2rem;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}

.page-hero p {
  max-width: 46rem;
  font-size: 1.02rem;
}

/* Content layout */
.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.75rem;
  align-items: start;
  padding-bottom: 3.5rem;
}

.prose {
  background: rgba(18, 24, 38, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.7rem;
}

.prose h2 {
  margin-top: 1.6rem;
  font-size: 1.3rem;
}

.prose h3 {
  margin-top: 1.25rem;
  font-size: 1.08rem;
}

.prose img.cover {
  width: 100%;
  border-radius: 12px;
  margin: 0.4rem 0 1.2rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0a0e15;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.side-box {
  background: var(--bg-2);
  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;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.side-list a {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 550;
  display: block;
}

.side-list a:hover {
  color: var(--accent);
}

.side-list span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  margin-top: 0.15rem;
}

.brand-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.brand-row img {
  width: 100%;
  height: 52px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem;
}

/* Category detail blocks */
.cat-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.cat-detail {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.cat-detail img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.cat-detail h3 {
  margin-bottom: 0.35rem;
}

.cat-detail p {
  margin: 0;
  font-size: 0.92rem;
}

/* 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-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #8fd0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  margin-bottom: 0.6rem;
}

.error-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #080b12;
  padding: 3rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 34px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.92rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.note-box {
  background: var(--accent-soft);
  border: 1px solid rgba(59, 158, 255, 0.25);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  color: #cfe4ff;
  font-size: 0.92rem;
  margin: 1rem 0;
}

.list-check {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.list-check li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}

/* Responsive */
@media (max-width: 980px) {
  .intro-grid,
  .content-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cat-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) {
  .nav-desktop,
  .header-actions {
    display: flex;
  }

  .menu-toggle,
  .mobile-panel,
  .menu-overlay {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .brand-text {
    font-size: 1rem;
  }

  .brand img {
    height: 32px;
    max-width: 120px;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 520px;
  }

  .hero-content {
    padding: 3.2rem 0 2.4rem;
  }

  .section {
    padding: 3rem 0;
  }

  .card-grid,
  .related-grid,
  .brand-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-detail {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cat-detail img {
    margin: 0 auto;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }
}
