/*
Theme Name: Moban 8-2-46
Description: Chủ đề WordPress tùy chỉnh cho cổng thông tin game Bầu Cua Tôm Cá (Hoo Hey How) – phong cách hộp sơn mài chín ô: đen huyền, son đỏ, thếp vàng, tối ưu SEO.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

/* Google Fonts (Gantari + Be Vietnam Pro) are enqueued in functions.php — no @import here. */

/* ============================================================
   1. Design tokens — black lacquer + vermilion + gold dust
   ============================================================ */
:root {
  --lac: #d0342c;
  --lac-deep: #941f1a;
  --gold: #d4af37;
  --gold-soft: #ecd28b;
  --gold-deep: #9d7f24;
  --ink: #14090b;
  --ink-soft: #1f1013;
  --bg: #0e0608;
  --surface: #1c0d10;
  --surface-alt: #241215;
  --text: #f3e9d6;
  --text-muted: #c9b394;
  --line: rgba(212, 175, 55, 0.3);
  --radius: 14px;
  --radius-sm: 8px;
  --gloss: linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 28%, transparent 46%);
  --shadow-out: 0 14px 32px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-in: inset 0 6px 20px rgba(0, 0, 0, 0.7), inset 0 -1px 0 rgba(212, 175, 55, 0.16);
  --font-display: 'Gantari', 'Be Vietnam Pro', sans-serif;
  --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  --wrap: 1180px;
}

/* ============================================================
   2. Reset & base — polished black lacquer room
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 46% 30% at 18% -4%, rgba(208, 52, 44, 0.16), transparent 62%),
    radial-gradient(ellipse 46% 30% at 84% -6%, rgba(212, 175, 55, 0.1), transparent 60%),
    radial-gradient(circle at 50% 118%, rgba(208, 52, 44, 0.1), transparent 55%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--gold-soft); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.8rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.15rem); color: var(--gold); }
h3 { font-size: clamp(1.08rem, 2.5vw, 1.35rem); color: var(--gold); }

p { margin: 0 0 1.2em; }

.wrap { width: min(var(--wrap), 92%); margin-inline: auto; }

.section { padding: 3.4rem 0; }

/* Section header: vermilion seal + gold hairline */
.lac-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.lac-heading__seal {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text);
  background: linear-gradient(160deg, var(--lac), var(--lac-deep));
  border-radius: 10px;
  box-shadow: var(--shadow-out);
  transform: rotate(-4deg);
}

.lac-heading h2 { margin: 0; }

.lac-heading--small { margin-bottom: 0.9rem; }

.lac-heading__kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lac);
  margin-bottom: 0.4rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   3. Header — lacquer box rim with gold trim
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background:
    var(--gloss),
    linear-gradient(180deg, var(--ink-soft), var(--ink));
  border-bottom: 1px solid var(--gold-deep);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.7), inset 0 -3px 0 rgba(208, 52, 44, 0.55);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.site-brand { display: flex; align-items: center; gap: 0.7rem; }

.site-brand__logo {
  width: 50px; height: 50px;
  border-radius: 12px;
  border: 1px solid var(--gold-deep);
  box-shadow: var(--shadow-out);
}

.site-brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--text);
  line-height: 1.12;
}

.site-brand__tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-nav { display: none; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0; padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 0.5rem 1.05rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: linear-gradient(160deg, var(--surface-alt), var(--surface));
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.site-nav__link:hover,
.site-nav__link:focus {
  color: var(--ink);
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  border-color: var(--gold-soft);
  transform: translateY(-2px);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 46px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--ink);
  border-bottom: 1px solid var(--gold-deep);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.7);
}

.site-nav.is-open .site-nav__list { flex-direction: column; padding: 0.75rem 4%; }

@media (min-width: 960px) {
  .site-nav { display: block; }
  .nav-toggle { display: none; }
}

/* ============================================================
   4. Hero — glossy box lid
   ============================================================ */
.lac-hero {
  position: relative;
  padding: 3.6rem 0;
  background:
    var(--gloss),
    radial-gradient(ellipse 55% 60% at 78% 20%, rgba(208, 52, 44, 0.18), transparent 65%),
    linear-gradient(180deg, var(--ink-soft), var(--bg));
  border-bottom: 1px solid var(--gold-deep);
  overflow: hidden;
}

.lac-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(212, 175, 55, 0.16) 1px, transparent 1.6px),
    radial-gradient(rgba(212, 175, 55, 0.1) 1px, transparent 1.4px);
  background-size: 130px 110px, 90px 80px;
  background-position: 0 0, 45px 40px;
  opacity: 0.5;
  pointer-events: none;
}

.lac-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.lac-hero__kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  margin-bottom: 1rem;
}

.lac-hero h1 span { color: var(--lac); }

.lac-hero__lead { max-width: 62ch; color: var(--text-muted); font-size: 1.02rem; }

/* ============================================================
   5. CTA button — vermilion lacquer seal
   ============================================================ */
.cta-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  color: var(--text);
  background: linear-gradient(160deg, #e0524a, var(--lac) 55%, var(--lac-deep));
  border-radius: 12px;
  padding: 0.95rem 2.6rem;
  box-shadow: var(--shadow-out), inset 0 0 0 1px rgba(243, 233, 214, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: cta-lac 3s ease-in-out infinite;
}

.cta-btn:hover,
.cta-btn:focus {
  color: var(--text);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 36px rgba(208, 52, 44, 0.45), inset 0 0 0 1px rgba(243, 233, 214, 0.25);
}

.cta-btn--block { display: block; width: max-content; margin-inline: auto; }

@keyframes cta-lac {
  0%, 100% { box-shadow: 0 10px 26px rgba(208, 52, 44, 0.3), inset 0 0 0 1px rgba(243, 233, 214, 0.25); }
  50% { box-shadow: 0 10px 42px rgba(208, 52, 44, 0.5), inset 0 0 0 1px rgba(243, 233, 214, 0.25); }
}

/* ============================================================
   6. Nine-grid — the lacquer tray
   ============================================================ */
.nine-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 0.6rem;
  padding: 1rem;
  background: var(--gloss), linear-gradient(180deg, var(--ink-soft), var(--ink));
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
}

@media (min-width: 640px) { .nine-grid { grid-template-columns: repeat(3, 1fr); } }

.cell {
  position: relative;
  text-align: center;
  padding: 1.2rem 0.9rem 1.1rem;
  background: var(--gloss), linear-gradient(165deg, var(--surface-alt), var(--surface));
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-in);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.cell:hover { transform: translateY(-5px); border-color: var(--gold); }

.cell__img {
  width: 84px; height: 84px;
  margin: 0 auto 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--gold-deep);
  object-fit: cover;
}

.cell__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
}

.cell--feature { text-align: left; }

.cell--feature img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-deep);
  margin-bottom: 0.7rem;
}

.cell--feature .cell__text { font-size: 0.86rem; color: var(--text-muted); margin: 0.3rem 0 0; }

.cell--feature h3 { font-size: 1rem; margin-bottom: 0.25rem; }

.cell--cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: radial-gradient(ellipse at 50% 0, rgba(208, 52, 44, 0.22), transparent 70%),
    var(--gloss), linear-gradient(165deg, var(--surface-alt), var(--surface));
}

.cell--cta p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }

/* ============================================================
   7. Rules tray + feature duo
   ============================================================ */
.lac-tray {
  margin-top: 0.6rem;
  padding: 1.3rem;
  background: var(--gloss), linear-gradient(180deg, var(--ink-soft), var(--ink));
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow-in);
}

.rules-table { width: 100%; border-collapse: collapse; }

.rules-table th,
.rules-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
  font-size: 0.94rem;
}

.rules-table th {
  background: linear-gradient(160deg, var(--lac), var(--lac-deep));
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.rules-table td:nth-child(3) { color: var(--gold); font-weight: 600; }

.rules-table tbody tr:hover { background: rgba(212, 175, 55, 0.06); }

.table-scroll { overflow-x: auto; }

.feature-duo {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  margin-top: 0.6rem;
}

@media (min-width: 760px) { .feature-duo { grid-template-columns: repeat(2, 1fr); } }

.lac-card {
  position: relative;
  background: var(--gloss), linear-gradient(165deg, var(--surface-alt), var(--surface));
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-out);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.lac-card:hover { transform: translateY(-6px); border-color: var(--gold); }

.lac-card__media img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

.lac-card__body { padding: 1.2rem 1.3rem 1.4rem; }

.lac-card__text { font-size: 0.93rem; color: var(--text-muted); margin: 0; }

/* ============================================================
   8. Reviews — gold-dust cards
   ============================================================ */
.dust-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: 1fr;
  margin-top: 0.6rem;
}

@media (min-width: 860px) { .dust-grid { grid-template-columns: repeat(3, 1fr); } }

.gold-card {
  padding: 1.6rem 1.5rem 1.4rem;
  background:
    radial-gradient(circle at 16% 12%, rgba(212, 175, 55, 0.2) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 30%, rgba(212, 175, 55, 0.16) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 84%, rgba(212, 175, 55, 0.14) 0 2px, transparent 3px),
    linear-gradient(165deg, var(--surface-alt), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
}

.gold-card__stars { color: var(--gold); letter-spacing: 0.18em; margin-bottom: 0.6rem; }

.gold-card__text { font-style: italic; font-size: 0.95rem; color: var(--text); }

.gold-card__author { margin: 0.9rem 0 0; font-weight: 700; font-size: 0.86rem; color: var(--gold-soft); }

/* ============================================================
   9. Breadcrumbs
   ============================================================ */
.breadcrumbs { padding: 1rem 0 0; font-size: 0.85rem; }

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0; padding: 0;
  list-style: none;
  color: var(--text-muted);
}

.breadcrumbs li + li::before { content: '—'; margin-right: 0.4rem; color: var(--lac); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs [aria-current="page"] { color: var(--gold); }

/* ============================================================
   10. Archive — lacquer cell cards
   ============================================================ */
.page-head { padding: 2.2rem 0 0.6rem; }

.post-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  padding: 1.6rem 0 3rem;
}

@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--gloss), linear-gradient(165deg, var(--surface-alt), var(--surface));
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover { transform: translateY(-6px); border-color: var(--gold); }

.post-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.post-card__body { padding: 1.1rem 1.2rem 1.35rem; }

.post-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.04rem; margin-bottom: 0.4rem; color: var(--text); }

.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--gold); }

.post-card__excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.8rem; }

.post-card__meta {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  background: linear-gradient(160deg, var(--lac), var(--lac-deep));
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
}

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }

.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 3rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px; height: 42px;
  padding: 0 0.7rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 700;
  background: var(--surface);
  box-shadow: var(--shadow-out);
}

.page-numbers.current {
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  color: var(--ink);
  border-color: var(--gold-soft);
}

.page-numbers:hover { border-color: var(--gold); color: var(--gold); }
.page-numbers.current:hover { color: var(--ink); }

/* ============================================================
   11. Single post
   ============================================================ */
.single-head { padding: 2rem 0 1rem; }

.single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.entry-content {
  max-width: 780px;
  padding: 1.8rem;
  background: var(--gloss), linear-gradient(180deg, var(--ink-soft), var(--ink));
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow-in);
}

.entry-content img { border-radius: var(--radius-sm); }

.entry-content h2,
.entry-content h3 { margin-top: 1.8em; }

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 1rem 1.4rem;
  border-left: 4px solid var(--lac);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.related-block { padding: 2.5rem 0 3rem; }

.cta-strip {
  text-align: center;
  padding: 2.6rem 1rem;
  margin: 2rem 0 3rem;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  background: radial-gradient(ellipse at center, rgba(208, 52, 44, 0.16), transparent 70%), var(--ink);
  box-shadow: var(--shadow-in);
}

/* ============================================================
   12. Footer — box base with red seam
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--gold-deep);
  box-shadow: inset 0 4px 0 rgba(208, 52, 44, 0.6);
  background: var(--gloss), linear-gradient(180deg, var(--ink-soft), #070304);
  padding: 2.8rem 0 1.6rem;
  text-align: center;
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
}

.site-footer__nav a { color: var(--text-muted); font-size: 0.92rem; font-weight: 600; }
.site-footer__nav a:hover { color: var(--gold); }

.site-footer__badge { margin: 1.4rem 0; }

.site-footer__disclaimer {
  max-width: 720px;
  margin: 1.2rem auto 0;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.site-footer__disclaimer p { margin: 0.3em 0; }

.site-footer__copy { margin-top: 1.4rem; font-size: 0.78rem; color: rgba(201, 179, 148, 0.55); }

/* ============================================================
   13. Motion & a11y
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
