/* KGame – kkgame.xyz */
@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap");

:root {
  --bg: #eef3f8;
  --bg-deep: #dfe8f2;
  --surface: #ffffff;
  --ink: #152033;
  --ink-soft: #4a5568;
  --muted: #6b7a90;
  --line: #d5e0ec;
  --brand: #1f7aef;
  --brand-dark: #0f5ec4;
  --brand-soft: #e8f1fe;
  --accent: #0d9b8a;
  --accent-soft: #e6f7f4;
  --warm: #e8772e;
  --danger: #c62828;
  --shadow: 0 12px 32px rgba(21, 32, 51, 0.08);
  --shadow-sm: 0 4px 14px rgba(21, 32, 51, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 72px;
  --max: 1160px;
  --font: "Be Vietnam Pro", sans-serif;
  --display: "Sora", "Be Vietnam Pro", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(31, 122, 239, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(13, 155, 138, 0.1), transparent 50%),
    linear-gradient(180deg, #f5f8fc 0%, var(--bg) 40%, var(--bg-deep) 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--brand);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

.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(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(213, 224, 236, 0.9);
  box-shadow: 0 2px 20px rgba(21, 32, 51, 0.04);
}

.header-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-height: calc(var(--nav-h) - 24px);
}

.logo-link img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav-desktop a {
  padding: 0.45rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.auth-desktop {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(31, 122, 239, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(31, 122, 239, 0.4);
  color: #fff !important;
}

.btn-outline {
  background: transparent;
  color: var(--brand-dark) !important;
  border: 1.5px solid var(--brand);
}

.btn-outline:hover {
  background: var(--brand-soft);
}

.btn-on-dark {
  background: transparent;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
}

.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.45rem 0.7rem;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--brand-dark);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem 1.5rem;
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-mobile.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile a {
  display: block;
  padding: 0.75rem 0.5rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.nav-mobile a.active {
  color: var(--brand-dark);
}

.nav-mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.nav-mobile-auth .btn {
  width: 100%;
}

body.has-fixed-nav {
  padding-top: var(--nav-h);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0b1a2e;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 18, 36, 0.88) 0%, rgba(8, 18, 36, 0.55) 48%, rgba(8, 18, 36, 0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0 5rem;
  max-width: 640px;
  animation: fadeUp 0.8s ease both;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  color: #e8f0ff;
  margin-bottom: 0.85rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: rgba(230, 238, 250, 0.88);
  margin-bottom: 1.75rem;
  max-width: 34em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ----- Sections ----- */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.45);
}

.section-head {
  margin-bottom: 2.25rem;
  max-width: 640px;
  animation: fadeUp 0.6s ease both;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin-bottom: 0.45rem;
}

.section-head p {
  margin-bottom: 0;
  font-size: 1.02rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ----- Intro / prose ----- */
.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: fadeIn 1s ease both;
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.prose a.ext-link {
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose h2 {
  font-size: 1.45rem;
  margin-top: 1.75rem;
}

.prose h3 {
  font-size: 1.15rem;
  margin-top: 1.35rem;
}

.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1em;
  color: var(--ink-soft);
}

.prose li {
  margin-bottom: 0.4em;
}

/* ----- Category grid ----- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.cat-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1.05;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cat-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.cat-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.cat-item:hover img {
  transform: scale(1.06);
}

.cat-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(8, 16, 32, 0.85));
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
}

/* ----- Cards / articles ----- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-deep);
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.05);
}

.article-card .body {
  padding: 1.15rem 1.2rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card .tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  color: var(--ink);
}

.article-card h3 a:hover {
  color: var(--brand-dark);
}

.article-card .excerpt {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  flex: 1;
}

.article-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ----- Guide list ----- */
.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.guide-row:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.guide-row img {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.guide-row h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.guide-row h3 a {
  color: var(--ink);
}

.guide-row p {
  margin: 0;
  font-size: 0.9rem;
}

/* ----- FAQ ----- */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 820px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--brand);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .faq-a {
  padding: 0 1.2rem 1.15rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ----- Brands strip ----- */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.brand-strip img {
  height: 36px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(20%);
  transition: opacity 0.2s ease;
}

.brand-strip img:hover {
  opacity: 1;
}

/* ----- Page hero (inner) ----- */
.page-hero {
  padding: 2.75rem 0 2rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  max-width: 640px;
  margin: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb span {
  color: var(--ink-soft);
}

/* ----- Article page ----- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

.article-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.article-cover {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.sidebar-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.side-link {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.side-link:last-child {
  border-bottom: none;
}

.side-link:hover {
  color: var(--brand-dark);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-top: 1.5rem;
}

/* ----- CTA band ----- */
.cta-band {
  padding: 3.5rem 0;
  background:
    linear-gradient(120deg, rgba(15, 94, 196, 0.95), rgba(13, 155, 138, 0.88)),
    url("banner.3dd2.webp") center / cover;
  color: #fff;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--brand-dark) !important;
  box-shadow: none;
}

/* ----- Footer ----- */
.site-footer {
  background: #0f1a2b;
  color: rgba(230, 238, 250, 0.78);
  padding: 3.5rem 0 1.5rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand img {
  height: 38px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(230, 238, 250, 0.65);
  font-size: 0.92rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: rgba(230, 238, 250, 0.65);
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  font-size: 0.82rem;
  color: rgba(230, 238, 250, 0.45);
  text-align: center;
}

/* ----- 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(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.5rem;
}

/* ----- Misc ----- */
.age-note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff8e8;
  border: 1px solid #f0d9a0;
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}

.age-note strong {
  color: var(--warm);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-item {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.feature-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.85rem;
}

.feature-item h3 {
  font-size: 1.05rem;
}

.feature-item p {
  margin: 0;
  font-size: 0.92rem;
}

.list-page-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  padding: 2.5rem 0 4rem;
}

.list-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.list-item:hover {
  box-shadow: var(--shadow);
}

.list-item .thumb {
  aspect-ratio: 1;
  overflow: hidden;
}

.list-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-item .body {
  padding: 1.15rem 1.15rem 1.15rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.list-item h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.list-item h2 a {
  color: var(--ink);
}

.list-item p {
  font-size: 0.9rem;
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pill:hover {
  background: var(--brand);
  color: #fff;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .list-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  .logo-link img {
    height: 34px;
    max-height: 34px;
  }

  .nav-desktop,
  .auth-desktop {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-mobile {
    display: block;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content {
    padding: 3rem 0 3.5rem;
  }

  .card-grid,
  .related-grid,
  .feature-row {
    grid-template-columns: 1fr;
  }

  .guide-row {
    grid-template-columns: 100px 1fr;
  }

  .guide-row img {
    width: 100px;
    height: 70px;
  }

  .guide-row .btn {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .list-item {
    grid-template-columns: 120px 1fr;
  }

  .list-item .body {
    padding: 0.85rem 0.85rem 0.85rem 0;
  }

  .article-main {
    padding: 1.25rem;
  }

  .section {
    padding: 3.25rem 0;
  }
}

@media (max-width: 480px) {
  .cat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .cat-item span {
    font-size: 0.9rem;
    padding: 1.5rem 0.65rem 0.75rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }
}
