/* KGame – k-game-web.pics */
:root {
  --bg: #070b14;
  --bg-elevated: #0f1524;
  --surface: #151c2e;
  --surface-2: #1c253a;
  --border: rgba(201, 168, 76, 0.18);
  --border-soft: rgba(148, 163, 184, 0.12);
  --text: #eef2f8;
  --text-muted: #9aa6bd;
  --accent: #3d8bfd;
  --accent-2: #1e5fbf;
  --gold: #c9a84c;
  --gold-soft: #e8d48a;
  --danger: #e85d5d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --nav-h: 72px;
  --max: 1120px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", sans-serif;
  --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(61, 139, 253, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(201, 168, 76, 0.1), transparent 50%),
    linear-gradient(180deg, #0a1020 0%, var(--bg) 40%, #05080f 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--gold);
}

ul,
ol {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
}

h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

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(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 1.5rem, var(--max));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  max-width: min(48vw, 220px);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: calc(var(--nav-h) - 24px);
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.04em;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: rgba(61, 139, 253, 0.12);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #a8872e 100%);
  color: #12100a;
}

.btn-primary:hover {
  color: #12100a;
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(61, 139, 253, 0.45);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(61, 139, 253, 0.12);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--gold-soft);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  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;
}

.menu-toggle .label-close {
  display: none;
}

.menu-toggle.is-open .label-menu {
  display: none;
}

.menu-toggle.is-open .label-close {
  display: inline;
}

.mobile-nav {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: min(320px, 92vw);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  background: rgba(15, 21, 36, 0.98);
  border-left: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 1rem;
  transform: translateX(105%);
  transition: transform 0.3s var(--ease);
  z-index: 999;
  box-shadow: var(--shadow);
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0.85rem;
  color: var(--text-muted);
  border-radius: 8px;
  font-weight: 500;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--text);
  background: rgba(61, 139, 253, 0.12);
}

.mobile-actions {
  display: grid;
  gap: 0.6rem;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 998;
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 960px) {
  .nav-desktop {
    display: flex;
  }

  .header-actions {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-nav,
  .nav-overlay {
    display: none !important;
  }
}

/* Main */
.site-main {
  padding-top: var(--nav-h);
  min-height: 70vh;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 720px);
  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(7, 11, 20, 0.92) 0%, rgba(7, 11, 20, 0.72) 48%, rgba(7, 11, 20, 0.45) 100%),
    linear-gradient(0deg, rgba(7, 11, 20, 0.95) 0%, transparent 45%);
}

.hero-content {
  padding: 3.5rem 0 3rem;
  max-width: 640px;
  animation: fadeUp 0.8s var(--ease) both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #fff 20%, var(--gold-soft) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.hero p {
  font-size: 1.02rem;
  margin-bottom: 1.5rem;
  max-width: 36rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(21, 28, 46, 0.45), transparent);
  border-block: 1px solid var(--border-soft);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.55rem;
}

/* Intro / prose */
.prose {
  max-width: 42rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.intro-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .intro-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  animation: fadeIn 1s var(--ease) 0.15s both;
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 720px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 980px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cat-item {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s var(--ease);
  text-decoration: none;
  color: inherit;
}

.cat-item:hover {
  border-color: rgba(201, 168, 76, 0.45);
  transform: translateY(-4px);
}

.cat-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #000;
}

.cat-item span {
  padding: 0.85rem 0.9rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-align: center;
}

/* Article cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 680px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s var(--ease);
  height: 100%;
}

.article-card:hover {
  border-color: rgba(61, 139, 253, 0.35);
  transform: translateY(-3px);
}

.article-card a.card-media {
  display: block;
  overflow: hidden;
}

.article-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #000;
  transition: transform 0.45s var(--ease);
}

.article-card:hover img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.45rem;
  letter-spacing: 0.02em;
}

.card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card-body h3 a {
  color: var(--text);
  text-decoration: none;
}

.card-body h3 a:hover {
  color: var(--gold-soft);
}

.card-body p {
  font-size: 0.92rem;
  flex: 1;
  margin-bottom: 0.85rem;
}

.card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 760px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  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(--gold);
  font-size: 1.25rem;
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(61, 139, 253, 0.08), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  list-style: none;
  padding: 0;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--gold-soft);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  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 280px;
    align-items: start;
  }
}

.article-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 2rem;
}

@media (min-width: 720px) {
  .article-content {
    padding: 2rem 2.25rem 2.5rem;
  }
}

.article-cover {
  margin: 0 0 1.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

.article-content h2 {
  margin-top: 1.75rem;
}

.article-content h3 {
  margin-top: 1.35rem;
}

.article-content ul li,
.article-content ol li {
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.sidebar {
  display: grid;
  gap: 1.25rem;
}

.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.sidebar-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-soft);
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.related-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.7rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.related-list a:hover {
  color: var(--gold-soft);
}

.related-list img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}

/* Category detail blocks */
.cat-detail {
  display: grid;
  gap: 1.5rem;
}

.cat-block {
  display: grid;
  gap: 1.25rem;
  padding: 1.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

@media (min-width: 760px) {
  .cat-block {
    grid-template-columns: 180px 1fr;
    align-items: center;
  }
}

.cat-block img {
  width: 100%;
  max-width: 180px;
  margin-inline: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #000;
}

/* Brands strip */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0;
}

.brand-strip img {
  height: 36px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(0.2);
  transition: opacity 0.2s;
}

.brand-strip img:hover {
  opacity: 1;
}

/* Legal / about */
.legal-content {
  max-width: 740px;
  padding: 2.5rem 0 3.5rem;
}

.legal-content h2 {
  margin-top: 2rem;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--nav-h) - 200px);
  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;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: #05080f;
  border-top: 1px solid var(--border-soft);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.92rem;
  max-width: 28rem;
}

.footer-col h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: var(--gold-soft);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
