/* KGame – cổng tin game / minh bạch nền tảng */
:root {
  --bg: #07101c;
  --bg-elevated: #0d1a2c;
  --bg-soft: #12243a;
  --surface: rgba(18, 36, 58, 0.72);
  --line: rgba(125, 211, 252, 0.14);
  --text: #e8f1fb;
  --muted: #9bb0c7;
  --accent: #2ec4b6;
  --accent-2: #3aa0ff;
  --gold: #e8c56a;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --max: 1140px;
  --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 600px at 10% -10%, rgba(46, 196, 182, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(58, 160, 255, 0.14), transparent 50%),
    linear-gradient(180deg, #050b14 0%, var(--bg) 40%, #091525 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent);
}

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);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(7, 16, 28, 0.88);
  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;
  min-width: 0;
}

.brand img {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.04em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--text);
  background: rgba(46, 196, 182, 0.12);
}

.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-weight: 600;
  font-size: 0.92rem;
  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), #1fa896);
  color: #04131a;
}

.btn-primary:hover {
  color: #04131a;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(46, 196, 182, 0.45);
  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.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(7, 16, 28, 0.97);
  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;
}

.nav-mobile.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile a {
  display: block;
  color: var(--text);
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.nav-mobile .mobile-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: 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(5, 11, 20, 0.92) 0%, rgba(5, 11, 20, 0.55) 48%, rgba(5, 11, 20, 0.35) 100%),
    linear-gradient(180deg, rgba(5, 11, 20, 0.25) 0%, rgba(5, 11, 20, 0.9) 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, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
  background: linear-gradient(90deg, #fff 0%, #9be7df 55%, #7cc4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.hero p {
  font-size: 1.05rem;
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: fadeUp 0.7s ease both;
}

/* Sections */
.section {
  padding: 4.25rem 0;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 640px;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.section-kicker {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.prose {
  max-width: 72ch;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.grid-2 {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  backdrop-filter: blur(8px);
}

.panel img {
  width: 100%;
  border-radius: 10px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.feature-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.75rem;
  align-items: start;
  color: var(--muted);
}

.feature-list img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-item {
  display: block;
  text-align: center;
  padding: 1.1rem 0.8rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 36, 58, 0.9), rgba(10, 20, 34, 0.9));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 196, 182, 0.4);
  box-shadow: var(--shadow);
  color: var(--text);
}

.cat-item img {
  width: 100%;
  max-width: 140px;
  margin: 0 auto 0.85rem;
  aspect-ratio: 1;
  object-fit: contain;
}

.cat-item strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cat-item span {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(10, 20, 34, 0.75);
  transition: transform 0.25s ease, border-color 0.25s ease;
  color: inherit;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(58, 160, 255, 0.35);
  color: inherit;
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a1422;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s 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;
  gap: 0.45rem;
  flex: 1;
}

.meta {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-card h3 {
  font-size: 1.05rem;
  margin: 0;
  color: var(--text);
}

.article-card p {
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 26, 44, 0.8);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.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.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(46, 196, 182, 0.08), transparent),
    var(--bg-elevated);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span {
  opacity: 0.5;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  max-width: 20ch;
}

.page-hero .lead {
  max-width: 62ch;
  margin-top: 0.75rem;
}

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body h2 {
  margin-top: 1.8rem;
  font-size: 1.35rem;
}

.article-body h3 {
  margin-top: 1.35rem;
  font-size: 1.1rem;
}

.article-body p,
.article-body li {
  color: var(--muted);
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
}

.sidebar h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.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.65rem;
  align-items: center;
  color: var(--text);
}

.side-list img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.side-list span {
  font-size: 0.88rem;
  line-height: 1.35;
}

/* Brands strip */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.brand-strip img {
  height: 36px;
  width: auto;
  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, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #050b14;
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.checklist li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--muted);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 196, 182, 0.15);
}

.promo-banner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(46, 196, 182, 0.12), rgba(58, 160, 255, 0.08));
}

.promo-banner img {
  justify-self: center;
  max-height: 220px;
  width: auto;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--muted);
}

th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

tr:last-child td {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 980px) {
  .grid-2,
  .article-layout,
  .promo-banner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-mobile {
    display: block;
  }

  .brand img {
    height: 34px;
    max-width: 130px;
  }

  :root {
    --header-h: 64px;
  }
}

@media (max-width: 640px) {
  .card-grid,
  .cat-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding: 3rem 0 2.5rem;
  }

  .section {
    padding: 3rem 0;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
