/* KGame – k-game-app.homes */
:root {
  --bg: #070d14;
  --bg-elevated: #0e1620;
  --bg-soft: #132031;
  --line: rgba(120, 160, 200, 0.16);
  --text: #e7eef7;
  --muted: #8fa3b8;
  --accent: #1ea0ff;
  --accent-2: #47c6ff;
  --accent-soft: rgba(30, 160, 255, 0.14);
  --warn: #f0b429;
  --danger: #ff6b6b;
  --ok: #3dd68c;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --nav-h: 72px;
  --max: 1180px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", 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 500px at 10% -10%, rgba(30, 160, 255, 0.18), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(71, 198, 255, 0.1), transparent 50%),
    linear-gradient(180deg, #0a121c 0%, var(--bg) 40%, #060a10 100%);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #9adfff;
}

ul,
ol {
  padding-left: 1.2rem;
}

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;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(7, 13, 20, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  color: var(--text);
}

.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;
  letter-spacing: 0.04em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1478d4);
  color: #fff;
  box-shadow: 0 8px 24px rgba(30, 160, 255, 0.28);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  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(10, 16, 24, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  z-index: 999;
  transform-origin: top;
  animation: panelIn 0.22s ease;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel a {
  display: block;
  color: var(--text);
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.mobile-panel .mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.35rem;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  padding-top: var(--nav-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  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-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 10, 16, 0.92) 0%, rgba(5, 10, 16, 0.72) 42%, rgba(5, 10, 16, 0.45) 100%),
    linear-gradient(0deg, rgba(7, 13, 20, 0.98) 0%, transparent 48%);
}

.hero-content {
  padding: 4.5rem 0 3.5rem;
  max-width: 720px;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
  background: linear-gradient(90deg, #fff, #9adfff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.7s ease both;
}

.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 650;
  margin-bottom: 0.9rem;
  color: var(--text);
  animation: rise 0.7s ease 0.08s both;
}

.hero .lead {
  font-size: 1.05rem;
  max-width: 38rem;
  margin-bottom: 1.5rem;
  animation: rise 0.7s ease 0.16s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.7s ease 0.24s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 4.2rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 46rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.split img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.prose {
  color: var(--muted);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose h2,
.prose h3 {
  margin-top: 1.8rem;
  color: var(--text);
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  min-height: 180px;
  display: block;
  color: var(--text);
}

.cat-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.cat-item:hover img {
  transform: scale(1.05);
}

.cat-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

/* Cards / article lists */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
  border-color: rgba(30, 160, 255, 0.45);
  transform: translateY(-3px);
  color: inherit;
}

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-soft);
}

.article-card .body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.article-card .tag {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-card h3 {
  font-size: 1.05rem;
  margin: 0;
  color: var(--text);
}

.article-card p {
  font-size: 0.92rem;
  margin: 0;
}

/* Brand strip */
.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  max-height: 48px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.2);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.brand-strip img:hover {
  opacity: 1;
  filter: none;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
  padding: 1rem 1.15rem;
}

.faq-item h3 {
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.95rem;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.8rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(30, 160, 255, 0.08), transparent 70%);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  max-width: 40rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent-2);
}

.breadcrumb span {
  opacity: 0.5;
}

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.article-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.sidebar-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 1.1rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.sidebar-box h2 {
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.side-link {
  display: block;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
}

.side-link:last-child {
  border-bottom: 0;
}

/* List page */
.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.chip {
  display: inline-flex;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.chip.active,
.chip:hover {
  color: var(--text);
  border-color: rgba(30, 160, 255, 0.5);
  background: var(--accent-soft);
}

/* About / legal */
.legal {
  padding: 2.5rem 0 4rem;
  max-width: 800px;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

/* 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, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #05090f;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  display: block;
  padding: 0.28rem 0;
}

.site-footer a:hover {
  color: var(--accent-2);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.notice {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--warn);
  background: rgba(240, 180, 41, 0.08);
  border-radius: 0 10px 10px 0;
  color: #e8d7a4;
  font-size: 0.9rem;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 160, 255, 0.08), transparent);
}

.feature h3 {
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  font-size: 0.93rem;
}

.promo-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 200px at 80% 20%, rgba(30, 160, 255, 0.2), transparent 60%),
    var(--bg-elevated);
}

.promo-band img {
  justify-self: center;
  max-height: 280px;
  width: auto;
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive */
@media (max-width: 980px) {
  .split,
  .article-layout,
  .promo-band,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .feature-row {
    grid-template-columns: 1fr 1fr;
  }

  .cat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .sidebar-box {
    position: static;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  .nav-desktop,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .brand img {
    height: 34px;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content {
    padding: 3rem 0 2.4rem;
  }

  .card-grid,
  .feature-row,
  .cat-grid {
    grid-template-columns: 1fr;
  }

  .cat-item,
  .cat-item img {
    min-height: 160px;
    height: 160px;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .brand-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn {
    width: 100%;
  }

  .hero-cta {
    flex-direction: column;
  }
}
