/* KGame — kkgame.monster */
:root {
  --bg: #0b1220;
  --bg-elevated: #121a2b;
  --bg-soft: #182338;
  --surface: #1c2740;
  --line: rgba(148, 178, 220, 0.16);
  --text: #e8eef8;
  --muted: #9bb0cc;
  --brand: #3aa0ff;
  --brand-strong: #1e7fe0;
  --accent: #35d0c5;
  --gold: #e6c36a;
  --danger: #ff6b7a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --nav-h: 72px;
  --max: 1120px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  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(53, 208, 197, 0.12), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, var(--bg) 40%, #0d1524 100%);
  min-height: 100vh;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  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;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(11, 18, 32, 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;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  flex-shrink: 0;
}

.logo-link img {
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: #fff;
  background: rgba(58, 160, 255, 0.14);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(58, 160, 255, 0.45);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: rgba(28, 39, 64, 0.85);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  min-height: 42px;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(12, 18, 30, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-panel.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-panel[hidden] {
  display: none !important;
}

.mobile-panel a {
  display: block;
  color: var(--text);
  padding: 0.85rem 0.75rem;
  border-radius: 10px;
  font-weight: 500;
}

.mobile-panel a:hover {
  background: rgba(58, 160, 255, 0.12);
}

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.mobile-actions .btn {
  width: 100%;
}

main {
  padding-top: var(--nav-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  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(90deg, rgba(8, 14, 26, 0.92) 0%, rgba(8, 14, 26, 0.72) 48%, rgba(8, 14, 26, 0.45) 100%),
    linear-gradient(180deg, rgba(8, 14, 26, 0.2) 0%, rgba(8, 14, 26, 0.85) 100%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding: 3.5rem 0 4rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.65rem;
  background: linear-gradient(120deg, #fff 10%, #9ed0ff 55%, #35d0c5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: #f4f8ff;
}

.hero p {
  font-size: 1.05rem;
  max-width: 34rem;
  margin-bottom: 1.6rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  padding: 4.25rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(24, 35, 56, 0.55), rgba(18, 26, 43, 0.35));
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 640px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-head p {
  margin-bottom: 0;
}

.prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

.prose h3 {
  margin-top: 1.5rem;
  font-size: 1.15rem;
  color: #d7e6fb;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lead {
  font-size: 1.08rem;
  color: #c5d5eb;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  min-height: 180px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(58, 160, 255, 0.45);
}

.cat-item img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: radial-gradient(circle at 50% 40%, rgba(58, 160, 255, 0.12), transparent 65%), #0a0f1a;
  padding: 0.75rem;
}

.cat-item span {
  display: block;
  padding: 0.85rem 1rem 1.1rem;
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  background: #0a0f1a;
  overflow: hidden;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.05);
}

.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;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--brand);
}

.article-card p {
  font-size: 0.92rem;
  flex: 1;
}

.article-card .more {
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Brand intro split */
.intro-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.intro-visual {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #080d18;
  animation: floaty 5s ease-in-out infinite;
}

.intro-visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
  align-items: center;
}

.brand-row img {
  width: 100%;
  height: 42px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.2);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.brand-row img:hover {
  opacity: 1;
  filter: none;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 800px;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
}

.faq-item h3 {
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
  color: #f0f5ff;
}

.faq-item p {
  margin: 0;
  font-size: 0.95rem;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 280px at 0% 0%, rgba(58, 160, 255, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(24, 35, 56, 0.5), transparent);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb span {
  opacity: 0.5;
}

/* Article detail */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  background: #090e18;
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.sidebar-block {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.sidebar-block h2 {
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.related-list a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  align-items: center;
}

.related-list img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #0a0f1a;
}

.related-list a:hover {
  color: var(--brand);
}

/* Category showcase */
.category-blocks {
  display: grid;
  gap: 1.25rem;
}

.category-block {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.category-block img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #0a0f1a;
  border-radius: 10px;
}

.category-block h2 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.category-block p {
  margin: 0;
  font-size: 0.95rem;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #080d17;
  padding: 3rem 0 1.75rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 34px;
  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: #fff;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #7f93ad;
}

.list-page {
  padding: 2.5rem 0 4rem;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid rgba(58, 160, 255, 0.28);
  background:
    linear-gradient(120deg, rgba(58, 160, 255, 0.16), rgba(53, 208, 197, 0.08));
}

.cta-band h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.cta-band p {
  margin: 0;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 980px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-split,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .sidebar-block {
    position: static;
  }

  .category-block {
    grid-template-columns: 120px 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  .nav-desktop,
  .header-actions .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-panel.open:not([hidden]) {
    display: block;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 2.5rem 0 3rem;
  }

  .section {
    padding: 3rem 0;
  }

  .card-grid,
  .cat-grid {
    grid-template-columns: 1fr;
  }

  .category-block {
    grid-template-columns: 1fr;
  }

  .category-block img {
    height: 140px;
  }

  .brand-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .logo-link img {
    height: 32px;
    max-width: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
