/* KGame Portal - kgamecc.monster */
:root {
  --bg: #0b1220;
  --bg-soft: #121a2b;
  --bg-card: #162033;
  --surface: #1a2740;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e8eef7;
  --muted: #9aabbf;
  --accent: #3db8ff;
  --accent-2: #1e8fd6;
  --accent-soft: rgba(61, 184, 255, 0.14);
  --success: #3ecf8e;
  --warning: #f0b429;
  --danger: #ef5b6a;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --nav-h: 72px;
  --max: 1180px;
  --font-display: "Sora", 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 500px at 10% -10%, rgba(61, 184, 255, 0.16), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(30, 143, 214, 0.12), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, var(--bg) 40%, #0d1524 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: #7fd0ff;
}

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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #041018;
  padding: 0.6rem 1rem;
  z-index: 10000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(14px);
  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: flex;
  align-items: center;
  flex-shrink: 0;
  max-height: calc(var(--nav-h) - 20px);
}

.brand img {
  height: 42px;
  width: auto;
  max-height: 42px;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.65rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
}

.btn-primary:hover {
  color: #041018;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.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;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.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, 33, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  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;
  color: var(--text);
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.mobile-panel .mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mobile-panel .mobile-auth .btn {
  width: 100%;
}

/* Main */
main {
  padding-top: var(--nav-h);
}

.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.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(0deg, rgba(8, 14, 26, 0.9) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  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, 5vw, 3.6rem);
  color: #fff;
  margin-bottom: 0.6rem;
}

.hero h1 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 600;
  color: #dce8f7;
  margin-bottom: 0.9rem;
}

.hero p {
  font-size: 1.05rem;
  max-width: 52ch;
  color: #b7c6d8;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(22, 32, 51, 0.55), rgba(11, 18, 32, 0.2));
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 680px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.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-card);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.feature-list {
  display: grid;
  gap: 0.85rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.7rem;
  align-items: start;
  color: var(--muted);
}

.feature-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card);
  min-height: 190px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 184, 255, 0.45);
}

.category-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.category-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 0.9rem 0.85rem;
  background: linear-gradient(transparent, rgba(5, 10, 20, 0.92));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 184, 255, 0.4);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
}

.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.05rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: #7f92a8;
  margin-bottom: 0.55rem;
}

.tag {
  color: var(--accent);
  font-weight: 600;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card p {
  font-size: 0.92rem;
  flex: 1;
}

.read-more {
  margin-top: 0.8rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.brand-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-row img {
  width: 100%;
  height: 54px;
  object-fit: contain;
  filter: grayscale(0.2) brightness(1.05);
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
  max-width: 860px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  font-family: var(--font-display);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-body {
  padding: 0 1.1rem 1.1rem;
  color: var(--muted);
}

.cta-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.6rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(61, 184, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(61, 184, 255, 0.12), rgba(22, 32, 51, 0.8)),
    var(--bg-card);
}

.cta-band img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin-inline: auto;
}

.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;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
  margin: 1.4rem 0 1.2rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.55;
}

.page-hero {
  padding: 2.2rem 0 0.5rem;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
  padding-bottom: 3rem;
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1.4rem;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.sidebar-box {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 1rem;
}

.sidebar-box h3 {
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.side-list {
  display: grid;
  gap: 0.85rem;
}

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  align-items: center;
}

.side-item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}

.side-item a {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.side-item a:hover {
  color: var(--accent);
}

.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);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #080e18;
  padding: 3rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 40px;
  width: auto;
  margin-bottom: 0.9rem;
}

.footer-grid h3 {
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: #7a8ba0;
  font-size: 0.84rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.inline-note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 0.9rem 1rem;
  border-radius: 0 10px 10px 0;
  margin: 1.2rem 0;
  color: #c7d7ea;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.soft-panel {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.soft-panel h3 {
  font-size: 1.05rem;
}

@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-box {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav-desktop,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .mobile-panel {
    display: block;
  }

  .intro-grid,
  .cta-band,
  .two-col {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  :root {
    --nav-h: 64px;
  }

  .brand img {
    height: 36px;
    max-height: 36px;
  }

  .card-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 68vh;
  }

  .hero-content {
    padding: 3.2rem 0 2.4rem;
  }
}
