/* KGame – kg-web.beauty */
:root {
  --bg: #0b1220;
  --bg-elevated: #121a2b;
  --bg-soft: #182338;
  --surface: #1c2740;
  --line: rgba(148, 176, 220, 0.18);
  --text: #e8eef9;
  --muted: #9aabc7;
  --blue: #2f8cff;
  --blue-deep: #1a5fc4;
  --blue-soft: rgba(47, 140, 255, 0.14);
  --gold: #d4b56a;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --max: 1180px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", 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(47, 140, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(212, 181, 106, 0.08), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, var(--bg) 40%, #0a0f1a 100%);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #6bb0ff;
}

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;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  max-width: min(220px, 48vw);
  color: var(--text);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: var(--blue-soft);
}

.auth-desktop {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  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;
  text-decoration: none;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 8px 22px rgba(47, 140, 255, 0.28);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue-soft);
}

.btn-outline {
  border-color: rgba(47, 140, 255, 0.45);
  color: #d7e8ff;
  background: rgba(47, 140, 255, 0.08);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(12, 18, 30, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 1.25rem;
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.mobile-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav a {
  color: var(--muted);
  padding: 0.75rem 0.2rem;
  border-bottom: 1px solid rgba(148, 176, 220, 0.1);
  font-weight: 500;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--text);
}

.mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

.page {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 720px);
  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 top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 12, 22, 0.35) 0%, rgba(8, 12, 22, 0.55) 40%, rgba(8, 12, 22, 0.96) 100%),
    linear-gradient(90deg, rgba(8, 12, 22, 0.75) 0%, rgba(8, 12, 22, 0.25) 55%, rgba(8, 12, 22, 0.55) 100%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 3.5rem;
  max-width: 680px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
  background: linear-gradient(120deg, #ffffff 20%, #8ec5ff 70%, #d4b56a 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 650;
  margin-bottom: 0.85rem;
}

.hero p {
  font-size: 1.02rem;
  max-width: 540px;
  color: #c5d3ea;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sections */
.section {
  padding: 4.2rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(24, 35, 56, 0.45), rgba(24, 35, 56, 0.15));
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 720px;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.section-head p {
  margin: 0;
}

.eyebrow {
  display: inline-block;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

/* Intro / prose */
.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

.prose h3 {
  margin-top: 1.5rem;
  font-size: 1.15rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  min-height: 210px;
  color: #fff;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 140, 255, 0.55);
  color: #fff;
}

.cat-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 1.2rem;
  background:
    radial-gradient(circle at 50% 30%, rgba(47, 140, 255, 0.18), transparent 60%),
    #0d1422;
}

.cat-card .cat-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(5, 10, 20, 0.92));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

/* Cards / articles */
.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;
  transition: transform 0.25s ease, border-color 0.25s ease;
  color: inherit;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 140, 255, 0.45);
  color: inherit;
}

.article-card .thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #0d1422;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.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(--gold);
  font-weight: 600;
  margin-bottom: 0.45rem;
  letter-spacing: 0.03em;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.article-card p {
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
  flex: 1;
}

.article-card .more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
}

/* Brands strip */
.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  height: 52px;
  object-fit: contain;
  filter: grayscale(0.2) brightness(1.05);
  opacity: 0.85;
  transition: opacity 0.2s ease, filter 0.2s ease;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.45rem;
  border: 1px solid transparent;
}

.brand-strip img:hover {
  opacity: 1;
  filter: none;
  border-color: var(--line);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 860px;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}

.faq-item h3 {
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.95rem;
}

/* CTA band */
.cta-band {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(47, 140, 255, 0.16), rgba(18, 26, 43, 0.9));
}

.cta-band img {
  width: 100%;
  max-height: 90px;
  object-fit: contain;
}

/* Page hero compact */
.page-hero {
  padding: 2.8rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(47, 140, 255, 0.1), transparent);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--blue);
}

.breadcrumb span {
  opacity: 0.5;
}

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.article-main {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem 2rem;
}

.article-cover {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 1rem 0 1.4rem;
  border: 1px solid var(--line);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h2 {
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.side-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.side-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.7rem;
  color: var(--text);
  align-items: center;
}

.side-list img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: #0d1422;
}

.side-list span {
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 600;
}

.promo-link img {
  width: 100%;
  border-radius: 10px;
}

/* Category detail blocks */
.split-list {
  display: grid;
  gap: 1.2rem;
}

.split-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.split-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #0d1422;
  border-radius: 10px;
  padding: 0.5rem;
}

.split-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.split-item p {
  margin: 0;
  font-size: 0.94rem;
}

/* Legal / simple */
.legal {
  padding: 2.5rem 0 4rem;
  max-width: 820px;
}

.legal h2 {
  margin-top: 1.8rem;
  font-size: 1.25rem;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-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(--blue), #8ec5ff);
  -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.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: 36px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.92rem;
}

.footer-col h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: #fff;
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.footer-col a:hover {
  color: var(--blue);
}

.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;
}

/* Utilities */
.reveal {
  animation: rise 0.7s ease both;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-light { color: #d7e3f7; }

@media (max-width: 980px) {
  .nav-desktop,
  .auth-desktop {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-panel {
    display: block;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .cta-band,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .split-item {
    grid-template-columns: 120px 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .brand img {
    height: 34px;
    max-height: 34px;
  }

  .brand span {
    font-size: 1rem;
  }

  .hero {
    min-height: 68vh;
  }

  .hero-content {
    margin-bottom: 2.2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .card-grid,
  .cat-grid {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .split-item {
    grid-template-columns: 1fr;
  }

  .article-main {
    padding: 1.15rem;
  }

  .btn {
    width: 100%;
  }

  .hero-actions .btn {
    width: auto;
  }
}
