/* KGame kg-g.lol — portal styles */
:root {
  --bg: #0b1220;
  --bg-elevated: #121a2b;
  --bg-soft: #182338;
  --surface: #1c2740;
  --line: rgba(148, 183, 255, 0.16);
  --text: #e8eefc;
  --muted: #9aacc8;
  --accent: #3db8ff;
  --accent-2: #1f8fd6;
  --gold: #e2b45a;
  --danger: #ff6b7a;
  --ok: #3dcea0;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --nav-h: 72px;
  --max: 1160px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", 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 500px at 10% -10%, rgba(61, 184, 255, 0.18), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(226, 180, 90, 0.1), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, #0b1220 40%, #0d1526 100%);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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: #7ad0ff;
}

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: #c7d3ea;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(11, 18, 32, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 0;
  max-height: calc(var(--nav-h) - 20px);
}

.brand img {
  height: 42px;
  width: auto;
  max-height: 42px;
  object-fit: contain;
}

.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.nav-desktop a {
  color: #c9d6ef;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0;
  position: relative;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: #fff;
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  font-family: inherit;
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
}

.btn-primary:hover {
  color: #041018;
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(61, 184, 255, 0.45);
  color: #fff;
}

.btn-gold {
  background: linear-gradient(135deg, #f0c56d, #c9922f);
  color: #1a1204;
}

.btn-gold:hover {
  color: #1a1204;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.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(12, 19, 34, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1rem 1.25rem;
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-panel a {
  display: block;
  padding: 0.75rem 0.4rem;
  color: #d7e2f7;
  border-bottom: 1px solid rgba(148, 183, 255, 0.08);
  font-weight: 500;
}

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 1rem;
}

.page-main {
  padding-top: var(--nav-h);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 14, 26, 0.92) 0%, rgba(8, 14, 26, 0.72) 42%, rgba(8, 14, 26, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 14, 26, 0.2) 0%, rgba(8, 14, 26, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 4rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #fff, #9fd8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 600;
  color: #f2f6ff;
  margin-bottom: 0.85rem;
}

.hero p {
  font-size: 1.05rem;
  max-width: 34rem;
}

.hero-cta {
  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-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(24, 35, 56, 0.55), rgba(18, 26, 43, 0.2));
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 42rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
}

.section-head p {
  margin-bottom: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  min-height: 180px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-item:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 184, 255, 0.45);
}

.category-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #000;
}

.category-item .label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 0.95rem;
  background: linear-gradient(180deg, transparent, rgba(5, 10, 20, 0.92));
  color: #fff;
  font-weight: 600;
  font-family: var(--font-display);
}

.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(18, 26, 43, 0.75);
  transition: transform 0.22s ease, border-color 0.22s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 184, 255, 0.4);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}

.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: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.article-card .meta {
  font-size: 0.8rem;
  color: #8ea0c0;
}

.article-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.article-card h3 a {
  color: #f1f5ff;
}

.article-card p {
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

.article-card .more {
  margin-top: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.4rem;
}

.prose h3 {
  margin-top: 1.4rem;
  font-size: 1.15rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.8rem;
}

.feature-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.85rem 1rem;
  background: rgba(28, 39, 64, 0.65);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.feature-list .icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(61, 184, 255, 0.15);
  color: var(--accent);
  font-weight: 700;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 26, 43, 0.7);
  padding: 0.9rem 1rem;
  margin-bottom: 0.7rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-display);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 700;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0.75rem 0 0.2rem;
}

.page-banner {
  padding: 2.8rem 0 1.6rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(61, 184, 255, 0.14), transparent 60%),
    rgba(12, 19, 34, 0.4);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: #93a5c4;
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: #93a5c4;
}

.breadcrumb span {
  opacity: 0.55;
}

.page-banner h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.page-banner p {
  max-width: 46rem;
  margin-bottom: 0;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.2rem 0 3.5rem;
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1.4rem;
  background: #000;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.side-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 26, 43, 0.8);
  padding: 1rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.side-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.side-list a {
  color: #d5e1f7;
  font-size: 0.92rem;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.65rem;
  align-items: center;
}

.side-list img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.7rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  filter: grayscale(0.2) brightness(0.95);
  opacity: 0.9;
  transition: opacity 0.2s ease, filter 0.2s ease;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.35rem;
  border: 1px solid transparent;
}

.brand-strip img:hover {
  opacity: 1;
  filter: none;
  border-color: var(--line);
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(61, 184, 255, 0.28);
  background:
    linear-gradient(120deg, rgba(61, 184, 255, 0.14), rgba(226, 180, 90, 0.08));
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #080e18;
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}

.site-footer h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.site-footer p,
.site-footer a {
  color: #9aacc8;
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 183, 255, 0.1);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  color: #7f91b0;
  font-size: 0.85rem;
}

.error-page {
  min-height: calc(100vh - var(--nav-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);
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.4rem;
}

.reveal {
  animation: fade-up 0.7s ease both;
}

.reveal-delay-1 { animation-delay: 0.08s; }
.reveal-delay-2 { animation-delay: 0.16s; }
.reveal-delay-3 { animation-delay: 0.24s; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 1rem 0 1.4rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

th,
td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(148, 183, 255, 0.1);
  text-align: left;
  font-size: 0.92rem;
}

th {
  background: rgba(28, 39, 64, 0.8);
  color: #fff;
}

td {
  color: #c7d3ea;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(61, 184, 255, 0.14);
  color: #9fd8ff;
  border: 1px solid rgba(61, 184, 255, 0.25);
}

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .side-box { position: static; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .brand-strip { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .nav-desktop,
  .nav-actions { display: none; }

  .menu-toggle { display: inline-flex; }
  .mobile-panel { display: block; }

  .brand img { height: 36px; max-height: 36px; }
  .brand span { font-size: 1rem; }

  .hero {
    min-height: 70vh;
    align-items: flex-end;
  }

  .hero-content { padding: 3rem 0 2.4rem; }

  .section { padding: 3rem 0; }

  .grid-3,
  .related-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  .brand-strip { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .category-item img { height: 140px; }
  .mobile-actions { grid-template-columns: 1fr; }
}
