/* KGame – Sòng bạc thượng lưu cẩm nang */
:root {
  --bg: #eef3f8;
  --bg-elevated: #ffffff;
  --ink: #152033;
  --ink-soft: #4a5a70;
  --line: #d5dee9;
  --navy: #0f1b2d;
  --navy-2: #162640;
  --accent: #2f8fe8;
  --accent-deep: #1a6fc0;
  --gold: #c9a227;
  --gold-soft: #e8d48b;
  --success: #1f8a5b;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(15, 27, 45, 0.08);
  --header-h: 72px;
  --font-display: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --max: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(47, 143, 232, 0.14), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(201, 162, 39, 0.1), transparent 55%),
    linear-gradient(180deg, #f5f8fc 0%, var(--bg) 40%, #e8eef5 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

.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(15, 27, 45, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.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;
  text-decoration: none;
  flex-shrink: 0;
  max-height: calc(var(--header-h) - 20px);
}

.brand img {
  height: 44px;
  width: auto;
  max-height: 44px;
  object-fit: contain;
}

.brand-text {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem 1.1rem;
  flex: 1;
  justify-content: flex-end;
}

.nav-desktop a {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: #fff;
  text-decoration: none;
}

.nav-desktop a.active {
  color: var(--gold-soft);
}

.auth-desktop {
  display: none;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 143, 232, 0.28);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-ghost:hover {
  border-color: #fff;
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--accent-deep);
  border-color: #c9daf0;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  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;
}

.menu-toggle .label-close {
  display: none;
}

.menu-toggle.is-open .label-menu {
  display: none;
}

.menu-toggle.is-open .label-close {
  display: inline;
}

.mobile-panel {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--navy-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.25rem 1.35rem;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 999;
  max-height: calc(100vh - var(--header-h));
  overflow: auto;
}

.mobile-panel.is-open {
  display: flex;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-panel a {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  font-weight: 500;
}

.mobile-auth {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.mobile-auth .btn {
  flex: 1;
}

@media (min-width: 980px) {
  .nav-desktop,
  .auth-desktop {
    display: flex;
  }

  .menu-toggle,
  .mobile-panel {
    display: none !important;
  }
}

/* ===== Page shell ===== */
.page-main {
  padding-top: var(--header-h);
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: min(72vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0b1524;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.78;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 16, 28, 0.92) 0%, rgba(8, 16, 28, 0.55) 48%, rgba(8, 16, 28, 0.35) 100%),
    linear-gradient(0deg, rgba(8, 16, 28, 0.85) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 3rem;
  max-width: 640px;
  color: #fff;
}

.hero-content .brand-mark {
  display: block;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
  background: linear-gradient(90deg, #fff 20%, var(--gold-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.02rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.section {
  padding: 3.4rem 0;
}

.section-head {
  margin-bottom: 1.7rem;
  max-width: 720px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
}

.section-head p {
  margin: 0;
}

.section-muted {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(213, 222, 233, 0.7);
}

.prose {
  max-width: 760px;
}

.prose a.ext-link {
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.grid-3 {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}

.grid-2 {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Category tiles – not card clutter in hero; interactive browse units */
.cat-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
  min-height: 210px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.cat-tile:hover {
  transform: translateY(-4px);
  text-decoration: none;
}

.cat-tile img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.45s ease;
}

.cat-tile:hover img {
  transform: scale(1.05);
}

.cat-tile span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.1rem;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
}

/* Article cards – interaction containers */
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
  text-decoration: none;
  border-color: #b7cce4;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f1b2d;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card .body {
  padding: 1rem 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.article-card .tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.article-card h3 {
  font-size: 1.05rem;
  margin: 0;
  color: var(--ink);
}

.article-card p {
  margin: 0;
  font-size: 0.92rem;
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: center;
}

.brand-row img {
  height: 36px;
  width: auto;
  opacity: 0.85;
  filter: grayscale(0.2);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.2rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.9rem 0;
  list-style: none;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary {
  color: var(--accent-deep);
}

.faq-item p {
  margin: 0 0 1rem;
}

.intro-block {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .intro-block {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b1524;
  min-height: 280px;
}

.intro-visual img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.breadcrumb {
  padding: 1.1rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb span {
  margin: 0 0.35rem;
  opacity: 0.5;
}

.page-hero {
  padding: 1.6rem 0 0.4rem;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.article-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 3rem;
}

@media (min-width: 980px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.2rem 0 1.5rem;
  background: #0b1524;
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-body h2 {
  margin-top: 1.6rem;
  font-size: 1.35rem;
}

.article-body h3 {
  margin-top: 1.2rem;
  font-size: 1.1rem;
}

.article-body ul,
.article-body ol {
  color: var(--ink-soft);
  padding-left: 1.2rem;
}

.article-meta {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.sidebar-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.sidebar-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.related-list {
  display: grid;
  gap: 0.85rem;
}

.related-list a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.related-list img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #0b1524;
}

.related-list span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding: 2.8rem 0 1.6rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  gap: 1.6rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  display: block;
  margin-bottom: 0.4rem;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.86rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}

.notice {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.75rem;
}

.list-page .article-card {
  flex-direction: row;
  min-height: 140px;
}

.list-page .article-card .thumb {
  width: 42%;
  max-width: 240px;
  aspect-ratio: auto;
  min-height: 140px;
}

.list-page .article-card .thumb img {
  height: 100%;
}

@media (max-width: 640px) {
  .list-page .article-card {
    flex-direction: column;
  }

  .list-page .article-card .thumb {
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
}

.guide-steps {
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

.guide-steps li {
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1rem 3.2rem;
  position: relative;
  color: var(--ink-soft);
}

.guide-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.guide-steps {
  margin: 0;
  padding: 0;
}

.pill-note {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--accent-deep);
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}
