/* KGame – k-gg.baby */
@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Sora:wght@600;700;800&display=swap");

:root {
  --bg: #07090e;
  --bg-2: #0d1118;
  --surface: #141a24;
  --surface-2: #1a2230;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef1f6;
  --muted: #9aa3b5;
  --accent: #2d8cff;
  --accent-2: #1a6fd4;
  --accent-soft: rgba(45, 140, 255, 0.14);
  --silver: #c5ccd8;
  --danger: #e85d5d;
  --ok: #3ecf8e;
  --radius: 14px;
  --nav-h: 72px;
  --logo-h: 88px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --max: 1180px;
  --font: "Be Vietnam Pro", sans-serif;
  --display: "Sora", 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(45, 140, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(45, 140, 255, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 40%, var(--bg) 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: #7cbcff;
}

ul {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  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);
  background: rgba(7, 9, 14, 0.78);
  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;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.brand img {
  height: var(--logo-h);
  width: auto;
  object-fit: contain;
  margin-top: calc((var(--logo-h) - var(--nav-h)) / 2 + 6px);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--silver);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: #fff;
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  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(--accent), var(--accent-2));
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(45, 140, 255, 0.45);
  color: #fff;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.88rem;
  margin-left: auto;
}

.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, 13, 20, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 1.25rem;
  z-index: 999;
}

.mobile-panel.open {
  display: block;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-panel a {
  display: block;
  padding: 0.75rem 0;
  color: var(--silver);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.mobile-panel a:last-child {
  border-bottom: none;
}

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mobile-actions .btn {
  width: 100%;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: clamp(420px, 78vh, 640px);
  margin-top: var(--nav-h);
  display: flex;
  align-items: flex-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(90deg, rgba(7, 9, 14, 0.92) 0%, rgba(7, 9, 14, 0.55) 48%, rgba(7, 9, 14, 0.35) 100%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.2) 0%, rgba(7, 9, 14, 0.92) 100%);
}

.hero-content {
  padding: 3.5rem 0 3rem;
  max-width: 640px;
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.4rem;
  background: linear-gradient(180deg, #fff 30%, var(--silver));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: #c7cedb;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* —— Sections —— */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.55), rgba(20, 26, 36, 0.2));
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 720px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  color: #fff;
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

/* Brand intro */
.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.intro-copy h2 {
  color: #fff;
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  min-height: 280px;
  border: 1px solid var(--line);
}

.intro-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.intro-visual.float-art {
  background: radial-gradient(circle at 50% 40%, rgba(45, 140, 255, 0.2), transparent 60%),
    var(--surface);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.intro-visual.float-art img {
  width: min(100%, 320px);
  height: auto;
  object-fit: contain;
  min-height: 0;
  animation: floaty 4s ease-in-out infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.cat-item {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 190px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 140, 255, 0.4);
}

.cat-item img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: radial-gradient(circle at 50% 40%, rgba(45, 140, 255, 0.12), transparent 65%),
    #0a0d14;
  padding: 1rem;
}

.cat-item span {
  display: block;
  padding: 0.85rem 1rem 1rem;
  color: #fff;
  font-weight: 600;
  font-family: var(--display);
}

.cat-item small {
  display: block;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 400;
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 140, 255, 0.35);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0d14;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 1.05rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  color: #fff;
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card p {
  font-size: 0.92rem;
  flex: 1;
}

.article-card .more {
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 860px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: #fff;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
}

/* Page hero (inner) */
.page-hero {
  margin-top: var(--nav-h);
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 280px at 0% 0%, rgba(45, 140, 255, 0.14), transparent 60%),
    var(--bg);
}

.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;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: #fff;
}

.page-hero .lead {
  max-width: 720px;
  margin: 0;
}

/* Article detail */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 0 4rem;
}

.article-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.article-cover {
  aspect-ratio: 21 / 9;
  background: #0a0d14;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  padding: 1.6rem 1.5rem 2rem;
}

.article-body h2 {
  color: #fff;
  font-size: 1.35rem;
  margin-top: 1.6rem;
}

.article-body h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-top: 1.25rem;
}

.article-body p,
.article-body li {
  color: var(--muted);
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  display: grid;
  gap: 1rem;
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.85rem;
}

.side-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-box li {
  border-bottom: 1px solid var(--line);
}

.side-box li:last-child {
  border-bottom: none;
}

.side-box a {
  display: block;
  padding: 0.65rem 0;
  color: var(--silver);
  font-size: 0.92rem;
}

.side-box a:hover {
  color: var(--accent);
}

/* Content pages */
.prose {
  max-width: 820px;
  padding: 2.5rem 0 4rem;
}

.prose h2 {
  color: #fff;
  margin-top: 2rem;
}

.prose h3 {
  color: #fff;
  margin-top: 1.4rem;
}

.prose li {
  color: var(--muted);
  margin-bottom: 0.35rem;
}

/* Brands strip */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0 0;
  opacity: 0.85;
}

.brand-strip img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0.2);
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--nav-h));
  margin-top: var(--nav-h);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  background: linear-gradient(180deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  color: #fff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #06080c;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 48px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.92rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  padding: 0.28rem 0;
  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;
  gap: 0.75rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

.warning-note {
  background: rgba(232, 93, 93, 0.08);
  border: 1px solid rgba(232, 93, 93, 0.25);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  color: #f0c4c4;
  font-size: 0.92rem;
  margin: 1.25rem 0;
}

.ext-link {
  color: var(--accent);
  font-weight: 600;
}

/* List filters */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--surface);
}

.tag.active,
.tag:hover {
  border-color: rgba(45, 140, 255, 0.45);
  color: #fff;
  background: var(--accent-soft);
}

/* Related */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

/* Motion reduce */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* —— Responsive —— */
@media (max-width: 980px) {
  .intro-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .cat-grid,
  .card-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
    --logo-h: 76px;
  }

  .nav-desktop,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 70vh;
    align-items: flex-end;
  }

  .hero-content {
    padding: 2.5rem 0 2rem;
  }

  .cat-grid,
  .card-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .article-cover {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  .hero-cta .btn {
    width: 100%;
  }

  .mobile-actions {
    grid-template-columns: 1fr;
  }
}
