/* KGame – kgamee.beauty | Game info portal */
:root {
  --bg: #0b1220;
  --bg-2: #111a2e;
  --surface: #162238;
  --surface-2: #1c2c45;
  --line: rgba(148, 178, 220, 0.18);
  --text: #e8f0fb;
  --muted: #9bb0c9;
  --accent: #3ba4ff;
  --accent-2: #1ee0c2;
  --gold: #f0c14b;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", sans-serif;
  --max: 1180px;
}

*,
*::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(59, 164, 255, 0.18), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(30, 224, 194, 0.12), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, var(--bg) 40%, #0d1628 100%);
  min-height: 100vh;
  line-height: 1.65;
}

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: var(--accent-2);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

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);
  display: flex;
  align-items: center;
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-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;
  flex-shrink: 0;
  color: var(--text);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: calc(var(--header-h) - 28px);
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.desktop-nav a {
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--text);
  background: rgba(59, 164, 255, 0.12);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  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(--accent), #2b7de0);
  color: #fff;
  box-shadow: 0 8px 24px rgba(59, 164, 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(--accent);
  color: var(--accent);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.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;
}

.mobile-panel {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: min(320px, 100%);
  height: calc(100vh - var(--header-h));
  background: rgba(14, 22, 38, 0.98);
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  z-index: 999;
  padding: 1.25rem;
  overflow-y: auto;
}

.mobile-panel.is-open {
  transform: translateX(0);
}

.mobile-panel nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-panel a {
  color: var(--text);
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  background: transparent;
}

.mobile-panel a:hover {
  background: rgba(59, 164, 255, 0.1);
}

.mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 998;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  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;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 14, 26, 0.92) 0%, rgba(8, 14, 26, 0.72) 48%, rgba(8, 14, 26, 0.35) 100%),
    linear-gradient(180deg, transparent 40%, rgba(11, 18, 32, 0.95) 100%);
}

.hero-content {
  padding: 4.5rem 0 3.2rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  letter-spacing: 0.03em;
  margin-bottom: 0.6rem;
  background: linear-gradient(90deg, #fff, #9fd0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.hero p {
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 680px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.section-alt {
  background: linear-gradient(180deg, rgba(22, 34, 56, 0.55), rgba(22, 34, 56, 0.2));
  border-block: 1px solid var(--line);
}

.prose {
  max-width: 760px;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 1.02rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Cards / grids */
.grid-3 {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}

.grid-4 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.category-card,
.article-card,
.guide-card,
.feature-item {
  background: linear-gradient(160deg, rgba(28, 44, 69, 0.9), rgba(18, 28, 48, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.article-card:hover,
.guide-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 164, 255, 0.45);
  box-shadow: var(--shadow);
}

.category-card a,
.article-card a,
.guide-card a {
  color: inherit;
  display: block;
  height: 100%;
}

.category-media,
.article-media {
  aspect-ratio: 16 / 10;
  background: #000;
  overflow: hidden;
}

.category-media img,
.article-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card:hover img,
.article-card:hover img {
  transform: scale(1.04);
}

.category-body,
.article-body,
.guide-body,
.feature-item {
  padding: 1rem 1.1rem 1.2rem;
}

.category-body h3,
.article-body h3,
.guide-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.tag {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(59, 164, 255, 0.12);
  color: #9fd0ff;
  font-size: 0.75rem;
  font-weight: 600;
}

.feature-grid {
  display: grid;
  gap: 1rem;
}

.feature-item h3 {
  font-size: 1.05rem;
  color: var(--text);
}

.feature-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.7rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(22, 34, 56, 0.65);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  list-style: none;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding: 0 1.15rem 1.1rem;
  margin: 0;
}

/* Page hero / breadcrumb */
.page-hero {
  padding: 2.6rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(59, 164, 255, 0.15), transparent 60%),
    linear-gradient(180deg, rgba(22, 34, 56, 0.45), transparent);
}

.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);
}

.breadcrumb span[aria-hidden="true"] {
  opacity: 0.5;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

/* Article */
.article-layout {
  display: grid;
  gap: 2rem;
  padding: 2.4rem 0 4rem;
}

.article-content {
  background: rgba(18, 28, 48, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem 1.8rem;
}

.article-content .cover {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.3rem;
  background: #000;
}

.article-content .cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-content h2 {
  margin-top: 1.6rem;
  font-size: 1.35rem;
}

.article-content h3 {
  margin-top: 1.25rem;
  font-size: 1.1rem;
}

.article-content ul,
.article-content ol {
  color: var(--muted);
  padding-left: 1.2rem;
}

.related-list {
  display: grid;
  gap: 0.85rem;
}

.related-list a {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(22, 34, 56, 0.7);
  color: var(--text);
}

.related-list a:hover {
  border-color: var(--accent);
}

.sidebar-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: rgba(22, 34, 56, 0.65);
  margin-bottom: 1rem;
}

.sidebar-box h2 {
  font-size: 1.05rem;
}

/* Brands strip */
.brand-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  max-height: 42px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.2);
}

/* 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, 14vw, 7rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.4rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #080e18;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 1.8rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.8rem;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* Motion */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: rise 0.7s ease both;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .article-content {
    padding: 1.8rem 1.8rem 2.2rem;
  }

  .brand-strip {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (min-width: 992px) {
  .desktop-nav {
    display: flex;
    flex: 1;
    justify-content: center;
  }

  .header-actions {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-panel,
  .menu-overlay {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .desktop-nav,
  .header-actions {
    display: none !important;
  }
}
