/* KGame – kg-app.beauty | Game info portal */
:root {
  --bg-deep: #070d18;
  --bg-base: #0c1524;
  --bg-elevated: #132033;
  --bg-soft: #1a2a42;
  --line: rgba(120, 170, 220, 0.16);
  --text: #e8eef7;
  --text-muted: #9aadc4;
  --accent: #3ba0ff;
  --accent-2: #1f7fe0;
  --accent-soft: rgba(59, 160, 255, 0.14);
  --gold: #c9a45c;
  --danger: #e05a5a;
  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 72px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", sans-serif;
  --max: 1120px;
  --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(59, 160, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 5%, rgba(201, 164, 92, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 40%, #0a1320 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #7ec2ff;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 3.5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--text-muted); }

ul, ol { color: var(--text-muted); }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ===== Header / Nav ===== */
.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, 13, 24, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 0;
  max-height: calc(var(--nav-h) - 20px);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.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: var(--accent-soft);
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.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;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
}

.btn-primary:hover { color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  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;
  margin-left: auto;
}

.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; }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 13, 24, 0.97);
  padding: 1.25rem 1.5rem 2rem;
  z-index: 999;
  overflow-y: auto;
}

.nav-mobile.is-open { display: block; }

.nav-mobile a {
  display: block;
  padding: 0.9rem 0.5rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.nav-mobile .mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 960px) {
  .nav-desktop { display: flex; }
  .nav-actions { display: flex; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ===== Main offset ===== */
main {
  padding-top: var(--nav-h);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: min(88vh, 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(180deg, rgba(7, 13, 24, 0.35) 0%, rgba(7, 13, 24, 0.55) 40%, rgba(7, 13, 24, 0.96) 100%),
    linear-gradient(90deg, rgba(7, 13, 24, 0.75) 0%, rgba(7, 13, 24, 0.25) 55%, transparent 100%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 3rem 0 4rem;
  animation: fadeUp 0.8s var(--ease) both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  margin: 0 0 0.5rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero h1 {
  max-width: 18ch;
  margin-bottom: 0.75rem;
  color: #fff;
}

.hero-lead {
  max-width: 42ch;
  font-size: 1.05rem;
  color: #c5d4e8;
  margin-bottom: 1.5rem;
}

.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: 4rem 0;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-head p {
  margin-bottom: 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(19, 32, 51, 0.55), transparent);
}

/* ===== Intro / prose ===== */
.prose {
  max-width: 68ch;
}

.prose p { margin-bottom: 1.1em; }

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ext-links-note {
  display: inline;
}

/* ===== Category grid ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}

.cat-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), border-color 0.3s;
  text-decoration: none;
  color: var(--text);
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 160, 255, 0.45);
  color: var(--text);
}

.cat-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #050a12;
  padding: 0.75rem;
}

.cat-item span {
  display: block;
  padding: 0.75rem 0.9rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

/* ===== Article cards ===== */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .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(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 160, 255, 0.4);
}

.article-card a.card-media {
  display: block;
  overflow: hidden;
  background: #050a12;
}

.article-card .card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.article-card:hover .card-media img {
  transform: scale(1.04);
}

.article-card .card-body {
  padding: 1.1rem 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card .card-excerpt {
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 0.85rem;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.85;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 760px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-display);
  position: relative;
  padding-right: 2.5rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 400;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item .faq-a {
  padding: 0 1.15rem 1.15rem;
  margin: 0;
  font-size: 0.95rem;
}

/* ===== Partners / brands ===== */
.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.brand-row img {
  height: 36px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(0.2);
  transition: opacity 0.2s;
}

.brand-row img:hover { opacity: 1; }

/* ===== Page hero (inner) ===== */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
  background:
    linear-gradient(135deg, rgba(59, 160, 255, 0.08), transparent 50%),
    var(--bg-base);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-hidden] { opacity: 0.5; }

.page-hero h1 { margin-bottom: 0.4rem; }
.page-hero .lead {
  max-width: 52ch;
  margin: 0;
}

/* ===== Article detail ===== */
.article-layout {
  display: grid;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.75rem;
  border: 1px solid var(--line);
  background: #050a12;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body h2 {
  margin-top: 1.75rem;
}

.article-body h3 {
  margin-top: 1.35rem;
  color: #d5e4f5;
}

.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
  margin-bottom: 1.1em;
}

.article-body li { margin-bottom: 0.35em; }

.related-box,
.side-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.side-box h3 {
  font-size: 1rem;
  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: 0; }

.side-box a {
  display: block;
  padding: 0.7rem 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.side-box a:hover { color: var(--accent); }

.related-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== About / legal ===== */
.content-page {
  padding: 2.5rem 0 4rem;
}

.content-page .prose {
  max-width: 72ch;
}

/* ===== Error pages ===== */
.error-page {
  min-height: calc(100vh - var(--nav-h));
  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(--accent), #8ec8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  margin-bottom: 0.75rem;
}

.error-page p {
  max-width: 36ch;
  margin-inline: auto;
  margin-bottom: 1.5rem;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  background: #060b14;
  padding: 3rem 0 2rem;
  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.9rem;
  max-width: 32ch;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col a {
  display: block;
  padding: 0.3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* ===== Misc ===== */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(59, 160, 255, 0.16), rgba(19, 32, 51, 0.9)),
    var(--bg-elevated);
  border: 1px solid var(--line);
}

.cta-band h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.cta-band p { margin: 0; }

.split-visual {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .split-visual {
    grid-template-columns: 1fr 1fr;
  }
}

.split-visual .visual {
  border-radius: var(--radius);
  overflow: hidden;
  background: #050a12;
  border: 1px solid var(--line);
}

.split-visual .visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag-list span {
  font-size: 0.8rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #9ccfff;
  border: 1px solid rgba(59, 160, 255, 0.25);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
