/* KGame – Game Câu Cá Vạn Cân portal */
:root {
  --bg: #07121f;
  --bg-soft: #0c1a2e;
  --bg-card: #10243a;
  --surface: #14304a;
  --line: rgba(120, 190, 230, 0.18);
  --text: #e8f2fa;
  --muted: #9db6cb;
  --accent: #2ec7ff;
  --accent-2: #1a9fd9;
  --accent-soft: rgba(46, 199, 255, 0.14);
  --gold: #e6c35c;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --max: 1120px;
  --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(900px 420px at 10% -10%, rgba(46, 199, 255, 0.16), transparent 60%),
    radial-gradient(700px 380px at 90% 0%, rgba(30, 120, 180, 0.18), transparent 55%),
    linear-gradient(180deg, #06101c 0%, #07121f 40%, #091828 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: #7adcff;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.7em;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
  color: var(--muted);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 18, 31, 0.88);
  backdrop-filter: blur(14px);
  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;
  color: var(--text);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: calc(var(--header-h) - 24px);
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  font-family: var(--font-body);
}

.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: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  right: 0;
  left: 0;
  z-index: 999;
  background: rgba(8, 18, 32, 0.97);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.35rem;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.mobile-panel.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-panel a {
  display: block;
  padding: 0.75rem 0.4rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.mobile-panel .mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 1rem;
}

.mobile-panel .mobile-actions .btn {
  width: 100%;
}

main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 14, 26, 0.92) 8%, rgba(5, 14, 26, 0.55) 48%, rgba(5, 14, 26, 0.35) 100%),
    linear-gradient(0deg, rgba(7, 18, 31, 0.95) 0%, rgba(7, 18, 31, 0.25) 45%, transparent 70%);
}

.hero-content {
  padding: 4.5rem 0 3.2rem;
  max-width: 640px;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: 0.03em;
  margin-bottom: 0.55rem;
  background: linear-gradient(120deg, #fff 20%, #8adfff 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeUp 0.7s ease both;
}

.hero h1 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 600;
  margin-bottom: 0.85rem;
  animation: fadeUp 0.7s ease 0.08s both;
}

.hero p {
  font-size: 1.05rem;
  max-width: 34rem;
  animation: fadeUp 0.7s ease 0.16s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
  animation: fadeUp 0.7s ease 0.24s both;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  margin-bottom: 0.45rem;
}

.section-head p {
  max-width: 40rem;
  margin-bottom: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.intro-visual .float-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.6rem;
}

.intro-visual .float-badge img {
  height: 42px;
  width: auto;
  aspect-ratio: auto;
  border-radius: 8px;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.cat-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  min-height: 210px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 199, 255, 0.45);
}

.cat-item img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: center;
  background: #000;
}

.cat-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 1rem 0.95rem;
  background: linear-gradient(transparent, rgba(4, 12, 22, 0.92));
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
}

/* Article cards – interaction containers */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 199, 255, 0.4);
  color: inherit;
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a1524;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.05);
}

.article-card .body {
  padding: 1.05rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
  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;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
}

/* Page hero compact */
.page-hero {
  padding: 2.6rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(46, 199, 255, 0.08), transparent 70%);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.5;
}

/* Content layout */
.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.4rem 0 3.5rem;
}

.prose {
  background: rgba(16, 36, 58, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.8rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 1.6rem;
}

.prose h3 {
  font-size: 1.1rem;
  margin-top: 1.25rem;
}

.prose ul, .prose ol {
  color: var(--muted);
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose img.inline-cover {
  width: 100%;
  border-radius: 12px;
  margin: 1rem 0 1.2rem;
  border: 1px solid var(--line);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.side-box {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.side-links {
  display: grid;
  gap: 0.55rem;
}

.side-links a {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.side-links a:hover {
  color: var(--accent);
}

.promo-side img {
  width: 100%;
  border-radius: 10px;
}

/* Lists */
.news-list {
  display: grid;
  gap: 1rem;
}

.news-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: border-color 0.2s ease;
}

.news-row:hover {
  border-color: rgba(46, 199, 255, 0.4);
  color: inherit;
}

.news-row .thumb {
  min-height: 120px;
  background: #0a1524;
}

.news-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-row .body {
  padding: 0.95rem 1rem 1rem 0;
}

.news-row h3 {
  font-size: 1.05rem;
  margin: 0.2rem 0 0.4rem;
  color: var(--text);
}

/* Brand strip */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(10, 24, 40, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.brand-strip img {
  height: 36px;
  width: auto;
  opacity: 0.85;
  filter: grayscale(0.15);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.brand-strip img:hover {
  opacity: 1;
  filter: none;
}

/* 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);
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #7adcff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.4rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #050e18;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.footer-brand img {
  height: 36px;
  width: auto;
}

.site-footer h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.86rem;
}

.ext-link {
  color: var(--accent);
  border-bottom: 1px dotted rgba(46, 199, 255, 0.45);
}

/* Utilities */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

/* Responsive */
@media (max-width: 960px) {
  .intro-grid,
  .content-wrap {
    grid-template-columns: 1fr;
  }

  .cat-grid,
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-desktop,
  .header-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .brand img {
    height: 34px;
  }

  .cat-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .news-row {
    grid-template-columns: 1fr;
  }

  .news-row .thumb {
    aspect-ratio: 16 / 9;
  }

  .news-row .body {
    padding: 0 1rem 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70vh;
  }

  .prose {
    padding: 1.2rem 1rem 1.4rem;
  }
}
