/* KGame – kgweb.cfd | Portal styles */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Orbitron:wght@600;700&display=swap');

:root {
  --bg: #070b14;
  --bg-elevated: #0f1624;
  --surface: #151e30;
  --surface-2: #1c2740;
  --line: rgba(120, 160, 220, 0.16);
  --text: #eaf0fa;
  --muted: #93a4bd;
  --accent: #3aa0ff;
  --accent-2: #1e6fd4;
  --accent-soft: rgba(58, 160, 255, 0.14);
  --danger: #ff5c6c;
  --success: #3dcaa0;
  --radius: 14px;
  --header-h: 72px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --max: 1120px;
  --font: "Be Vietnam Pro", sans-serif;
  --display: "Orbitron", "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(58, 160, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(30, 111, 212, 0.12), transparent 50%),
    linear-gradient(180deg, #0a1220 0%, var(--bg) 40%, #05080f 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: #7cc4ff;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 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;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(7, 11, 20, 0.86);
  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.65rem;
  color: var(--text);
  flex-shrink: 0;
  max-width: 46%;
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.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.7rem 1.15rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(30, 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: var(--accent);
  color: var(--accent);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-panel {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: min(320px, 100%);
  height: calc(100vh - var(--header-h));
  background: rgba(10, 16, 28, 0.98);
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  z-index: 999;
  padding: 1.25rem;
  overflow-y: auto;
}

.mobile-panel.open {
  transform: translateX(0);
}

.mobile-panel nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-panel a {
  color: var(--text);
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: transparent;
}

.mobile-panel a:hover {
  background: var(--accent-soft);
}

.mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 998;
}

.menu-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

main {
  padding-top: var(--header-h);
}

.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;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 11, 20, 0.35) 0%, rgba(7, 11, 20, 0.72) 48%, rgba(7, 11, 20, 0.96) 100%),
    linear-gradient(90deg, rgba(7, 11, 20, 0.7) 0%, rgba(7, 11, 20, 0.2) 55%, rgba(7, 11, 20, 0.55) 100%);
}

.hero-content {
  padding: 4.5rem 0 3.2rem;
  max-width: 680px;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.12em;
  color: #fff;
  margin-bottom: 0.85rem;
}

.hero h1 {
  margin-bottom: 0.85rem;
}

.hero p {
  font-size: 1.05rem;
  max-width: 52ch;
  color: #c7d4e8;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.section {
  padding: 3.5rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 62ch;
}

.section-head p {
  margin-bottom: 0;
}

.grid-2 {
  display: grid;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
}

.grid-4 {
  display: grid;
  gap: 1rem;
}

.intro-block {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.category-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 180px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-item:hover {
  transform: translateY(-4px);
  border-color: rgba(58, 160, 255, 0.45);
}

.category-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.category-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 1rem;
  background: linear-gradient(transparent, rgba(5, 8, 15, 0.92));
  color: #fff;
  font-weight: 600;
}

.card-list {
  display: grid;
  gap: 1.15rem;
}

.article-card {
  display: grid;
  gap: 0.9rem;
  background: transparent;
  border: 0;
  padding: 0;
}

.article-card a.thumb {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.article-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover img {
  transform: scale(1.04);
}

.article-card .meta {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.article-card h3 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.05rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card p {
  margin: 0;
  font-size: 0.92rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(21, 30, 48, 0.65);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary {
  color: var(--accent);
}

.faq-item .faq-body {
  padding: 0 1.15rem 1.1rem;
}

.faq-item .faq-body p {
  margin: 0;
}

.page-hero {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(58, 160, 255, 0.08), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.5;
}

.content-wrap {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 3.5rem;
}

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 2rem;
}

.prose h3 {
  margin-top: 1.4rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose img {
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 1.25rem 0;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 1.25rem 0 1.75rem;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.related {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.brand-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-row img {
  width: 100%;
  max-height: 48px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.2);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #05080f;
  padding: 3rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.92rem;
}

.footer-col h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.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(3.5rem, 12vw, 6rem);
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--accent), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .intro-block {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .card-list.featured {
    grid-template-columns: 1.2fr 1fr;
  }

  .card-list.featured .article-card:first-child {
    grid-row: span 2;
  }

  .card-list.featured .article-card:first-child img {
    aspect-ratio: 4 / 3;
    height: 100%;
  }
}

@media (min-width: 960px) {
  .nav-desktop,
  .header-actions {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .brand {
    max-width: none;
  }

  .brand-text {
    display: none;
  }
}

@media (max-width: 767px) {
  .brand-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .hero {
    min-height: 68vh;
  }

  .category-item img {
    height: 150px;
  }
}
