/* KGame – k-game-web.autos | Game Câu Cá Vạn Cân portal */
:root {
  --bg: #f3f7f9;
  --bg-alt: #e8f1f4;
  --surface: #ffffff;
  --ink: #14222b;
  --ink-soft: #3d5563;
  --muted: #6b8494;
  --line: #d5e3ea;
  --brand: #0c6e75;
  --brand-deep: #084f55;
  --brand-soft: #d7eef0;
  --accent: #d97706;
  --accent-soft: #fff4e5;
  --ok: #0f766e;
  --danger: #b91c1c;
  --shadow: 0 10px 30px rgba(12, 55, 70, 0.08);
  --radius: 14px;
  --nav-h: 72px;
  --max: 1120px;
  --font-display: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: var(--nav-h);
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9f3f5 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #ffe8c8 0%, transparent 45%),
    linear-gradient(180deg, #f7fbfc 0%, var(--bg) 40%, #eef5f7 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; color: var(--ink-soft); }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ===== Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(213, 227, 234, 0.9);
  box-shadow: 0 2px 16px rgba(8, 50, 60, 0.05);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  flex-shrink: 0;
  max-height: calc(var(--nav-h) - 16px);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand-text {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--brand-deep);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
}

.btn-primary:hover { color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--brand-deep);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-accent {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
}

.btn-accent:hover { color: #fff; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  margin-left: auto;
}

.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; }
.menu-toggle .menu-label-close { display: none; }
.menu-toggle.is-open .menu-label-open { display: none; }
.menu-toggle.is-open .menu-label-close { display: inline; }

.mobile-panel {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.75rem 1rem 1.1rem;
}

.mobile-panel.is-open { display: block; }

.mobile-panel a {
  display: block;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  color: var(--ink-soft);
  font-weight: 600;
}

.mobile-panel a:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.mobile-auth .btn { width: 100%; }

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .nav-desktop { display: flex; }
  .nav-actions { display: flex; }
  .mobile-panel { display: none !important; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #08343a;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 30, 36, 0.35) 0%, rgba(6, 30, 36, 0.78) 70%, rgba(6, 30, 36, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 55, 62, 0.55) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.2rem;
  color: #fff;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.hero-content .brand-mark {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.hero-content h1 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  max-width: 36ch;
}

.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); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: fade-up 0.7s ease both;
}

/* ===== Sections ===== */
.section {
  padding: 3.4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(232, 241, 244, 0.7));
}

.section-head {
  margin-bottom: 1.6rem;
  max-width: 640px;
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.45rem;
}

/* Intro */
.intro-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 860px) {
  .intro-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
  }
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0b3d44;
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.feature-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.feature-list img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.feature-list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.feature-list span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  padding: 1rem 0.75rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  color: var(--ink);
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: #9dced3;
  box-shadow: var(--shadow);
  color: var(--brand-deep);
}

.cat-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.cat-item span {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Cards / articles */
.card-grid {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 700px) {
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d3d44;
}

.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: 1rem 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.75rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.article-card h3 a {
  color: var(--ink);
}

.article-card h3 a:hover {
  color: var(--brand);
}

.article-card p {
  font-size: 0.92rem;
  flex: 1;
}

.read-more {
  margin-top: 0.6rem;
  font-weight: 700;
  color: var(--brand);
  font-size: 0.9rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.7rem;
  max-width: 800px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 700;
  color: var(--ink);
  position: relative;
  padding-right: 2.5rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 1.2rem;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--ink-soft);
}

/* Page hero (inner) */
.page-hero {
  padding: 2.4rem 0 1.6rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(12, 110, 117, 0.08), transparent 50%),
    linear-gradient(180deg, #fff, transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a { color: var(--brand-deep); }
.breadcrumb span { color: var(--muted); }

/* Article layout */
.article-layout {
  display: grid;
  gap: 2rem;
  padding: 2.2rem 0 3rem;
}

@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem 1.6rem;
}

@media (min-width: 700px) {
  .prose { padding: 1.8rem 2rem 2rem; }
}

.prose .cover {
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 1.25rem;
  background: #0d3d44;
}

.prose .cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.prose h2 { margin-top: 1.6rem; }
.prose h3 { margin-top: 1.25rem; }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }

.sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.side-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.side-links a {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
}

.side-links a:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.related-grid {
  display: grid;
  gap: 0.85rem;
}

.related-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.7rem;
  align-items: center;
}

.related-item img {
  width: 84px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.related-item strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.35;
}

/* Brands strip */
.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.brand-row img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0.2);
}

/* CTA band */
.cta-band {
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(120deg, #0c6e75 0%, #084f55 55%, #0a3d48 100%);
  color: #fff;
  display: grid;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem;
}

@media (min-width: 800px) {
  .cta-band {
    grid-template-columns: 1.2fr 0.8fr;
    padding: 0 0 0 2rem;
  }
}

.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.88); margin-bottom: 1rem; }
.cta-band img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  justify-self: end;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--nav-h) - 200px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.4rem;
}

/* Footer */
.site-footer {
  background: #0b2c33;
  color: rgba(255, 255, 255, 0.82);
  padding: 2.8rem 0 1.6rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 1.6rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  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-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: space-between;
}

.ext-link {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
