/*
Theme Name: Moban 8-2-39
Description: Chủ đề WordPress Glassmorphism cho cổng thông tin game Bầu Cua Tôm Cá (Hoo Hey How) – biến thể Đáy Biển: bố cục lặn dọc một cột, khoang kính mờ theo độ sâu, điều hướng đảo nổi bên trái, tối ưu SEO.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

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

/* ============================================================
   1. Deep-sea design tokens
   ============================================================ */
:root {
  --bg: #010b16;
  --bg-deep: #000610;
  --ink: #e2f3ff;
  --ink-muted: #8fb3c9;
  --glow: #5fd6ff;
  --glow-soft: #9be8ff;
  --bio: #7cf2c0;
  --glass: rgba(122, 190, 240, 0.06);
  --glass-strong: rgba(122, 190, 240, 0.11);
  --edge: rgba(120, 210, 255, 0.22);
  --edge-hi: rgba(255, 255, 255, 0.3);
  --blur: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 30px 70px rgba(0, 8, 20, 0.65);
  --font-display: 'Figtree', 'Be Vietnam Pro', sans-serif;
  --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  --wrap: 1180px;
}

/* ============================================================
   2. Reset & base
   ============================================================ */
*,
*::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(--ink);
  background-color: var(--bg);
  overflow-x: hidden;
}

/* Fixed abyss gradient layer */
.abyss-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 30% at 50% -6%, rgba(95, 214, 255, 0.16), transparent 65%),
    radial-gradient(ellipse 40% 26% at 12% 34%, rgba(124, 242, 192, 0.06), transparent 60%),
    linear-gradient(180deg, #06253a 0%, var(--bg) 38%, var(--bg-deep) 100%);
}

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

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

a:hover {
  color: var(--glow-soft);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.24;
  color: #f0faff;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.95rem); }
h3 { font-size: clamp(1.05rem, 2.3vw, 1.25rem); }

p {
  margin: 0 0 1.2em;
}

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

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

/* ============================================================
   3. Header — mobile glass bar / desktop side floating island
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(1, 11, 22, 0.62);
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
}

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

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

.site-brand__logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--edge-hi);
  box-shadow: 0 0 20px rgba(95, 214, 255, 0.35);
}

.site-brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  color: #f0faff;
  line-height: 1.1;
}

.site-brand__tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-nav {
  display: none;
}

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

.site-nav__link {
  display: block;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  transition: background 0.25s ease, color 0.25s ease;
}

.site-nav__link:hover,
.site-nav__link:focus {
  color: #02202e;
  background: linear-gradient(140deg, var(--glow-soft), var(--glow));
}

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

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--glow);
  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: rgba(1, 10, 20, 0.9);
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

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

.site-nav.is-open .site-nav__link {
  padding: 0.8rem 1rem;
}

/* Desktop: the header becomes a floating island dock on the left */
@media (min-width: 960px) {
  body {
    padding-left: 236px;
  }

  .site-header {
    position: fixed;
    top: 50%;
    left: 16px;
    right: auto;
    transform: translateY(-50%);
    width: 204px;
    border: 1px solid var(--edge);
    border-radius: 20px;
    background: var(--glass-strong);
    box-shadow: var(--shadow), inset 0 1px 0 var(--edge-hi);
  }

  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    padding: 1.1rem 0.9rem;
  }

  .site-brand {
    flex-direction: column;
    text-align: center;
  }

  .site-nav {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0.35rem;
  }

  .site-nav__link {
    text-align: center;
  }

  .nav-toggle {
    display: none;
  }
}

/* ============================================================
   4. Dive column & hatch panels
   ============================================================ */
.dive-column {
  width: min(780px, 94%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  padding: 2.6rem 0 3rem;
}

.hatch {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge-hi);
  padding: 2.4rem clamp(1.2rem, 4vw, 2.2rem) 2.2rem;
}

.hatch__title {
  margin-bottom: 0.5em;
}

.hatch__lead {
  color: var(--ink-muted);
}

.depth-badge {
  position: absolute;
  top: -13px;
  left: 22px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--glow);
  background: #05202f;
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 0.3rem 0.95rem;
}

.hatch--hero {
  text-align: center;
}

.hatch--hero .depth-badge {
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.hatch__figure {
  position: relative;
  margin: 1.4rem 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.hatch__figure img {
  width: 100%;
}

.hatch__veil {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  background: linear-gradient(180deg, rgba(6, 37, 58, 0.12), rgba(1, 11, 22, 0.66) 82%);
  pointer-events: none;
}

.hatch--cta {
  text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(95, 214, 255, 0.12), transparent 72%),
    var(--glass);
}

/* ============================================================
   5. CTA button
   ============================================================ */
.cta-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #02202e;
  background: linear-gradient(150deg, #d6f6ff, var(--glow) 55%, #2ea3d8);
  border-radius: var(--radius-sm);
  padding: 0.95rem 2.5rem;
  box-shadow: 0 14px 36px rgba(95, 214, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: cta-sonar 3s ease-in-out infinite;
}

.cta-btn:hover,
.cta-btn:focus {
  color: #02202e;
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(95, 214, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

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

@keyframes cta-sonar {
  0%, 100% { box-shadow: 0 14px 36px rgba(95, 214, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
  50% { box-shadow: 0 14px 54px rgba(95, 214, 255, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
}

/* ============================================================
   6. Gear rows, creature grid, log entries, rules table
   ============================================================ */
.gear-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1.4rem;
}

.gear-row {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  background: var(--glass-strong);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.gear-row:hover {
  transform: translateX(8px);
  border-color: var(--glow);
}

.gear-row__media img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--edge-hi);
}

.gear-row__title {
  margin-bottom: 0.25rem;
}

.gear-row__text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

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

.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--edge);
}

.rules-table th,
.rules-table td {
  padding: 0.8rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid rgba(120, 210, 255, 0.12);
  font-size: 0.93rem;
}

.rules-table th {
  background: rgba(95, 214, 255, 0.14);
  color: #d8f4ff;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.rules-table tbody tr:hover {
  background: rgba(95, 214, 255, 0.07);
}

.creature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

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

.creature-tile {
  text-align: center;
  background: var(--glass-strong);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  padding: 1rem 0.7rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.creature-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(95, 214, 255, 0.2);
}

.creature-tile img {
  width: 76px;
  height: 76px;
  margin: 0 auto 0.6rem;
  border-radius: 50%;
  border: 1px solid var(--edge-hi);
}

.creature-tile__name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--glow);
}

.log-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1.2rem;
}

.log-entry {
  margin: 0;
  padding: 1.1rem 1.3rem;
  border-left: 3px solid var(--glow);
  background: var(--glass-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.log-entry__stars {
  color: var(--bio);
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
}

.log-entry__text {
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.log-entry__author {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--glow-soft);
}

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

/* Keep the breadcrumb trail inside the dive column width */
nav.breadcrumbs.wrap {
  width: min(780px, 94%);
}

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

.breadcrumbs li + li::before {
  content: '›';
  margin-right: 0.4rem;
  color: var(--glow);
}

.breadcrumbs a {
  color: var(--ink-muted);
}

.breadcrumbs a:hover {
  color: var(--glow);
}

.breadcrumbs [aria-current="page"] {
  color: var(--glow);
}

/* ============================================================
   8. Archive — vertical dive log (single-column stack)
   ============================================================ */
.dive-list {
  width: min(780px, 94%);
  margin-inline: auto;
  padding: 1.6rem 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.dive-post {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge-hi);
  padding: 1.1rem;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.dive-post:hover {
  transform: translateX(8px);
  border-color: var(--glow);
}

.dive-post__media {
  position: relative;
  flex-shrink: 0;
}

.dive-post__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.dive-post__media::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, transparent 55%, rgba(1, 11, 22, 0.55));
  pointer-events: none;
}

.dive-post__title {
  margin-bottom: 0.35rem;
}

.dive-post__title a {
  color: var(--ink);
}

.dive-post__title a:hover {
  color: var(--glow);
}

.dive-post__excerpt {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}

.dive-post__meta {
  font-size: 0.8rem;
  color: var(--bio);
}

@media (min-width: 640px) {
  .dive-post {
    flex-direction: row;
    align-items: center;
  }

  .dive-post__media {
    width: 240px;
  }
}

.page-head {
  padding: 2.2rem 0 0;
}

.page-head .hatch {
  margin-top: 1.2rem;
}

/* Fallback aliases for index.php / 404.php */
.card,
.post-card {
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge-hi);
  overflow: hidden;
}

.post-grid {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  padding: 1.6rem 0;
}

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

.post-card__body {
  padding: 1rem 1.2rem 1.3rem;
}

.post-card__title a {
  color: var(--ink);
}

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

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.post-card__meta {
  font-size: 0.8rem;
  color: var(--bio);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.4rem;
  color: var(--ink-muted);
}

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

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.7rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.page-numbers.current {
  background: linear-gradient(140deg, var(--glow-soft), var(--glow));
  color: #02202e;
  border-color: transparent;
}

.page-numbers:hover {
  border-color: var(--glow);
  color: var(--glow);
}

.page-numbers.current:hover {
  color: #02202e;
}

/* ============================================================
   9. Single post
   ============================================================ */
.single-shell {
  width: min(780px, 94%);
  margin-inline: auto;
  padding: 1.6rem 0 0;
}

.single-hatch {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge-hi);
  padding: 2rem clamp(1.2rem, 4vw, 2.2rem);
}

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

.single-media {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0.6rem 0 0;
}

.single-media img {
  width: 100%;
}

.single-media__veil {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  background: linear-gradient(180deg, transparent 52%, rgba(1, 11, 22, 0.6));
  pointer-events: none;
}

.entry-content {
  max-width: 780px;
  padding-top: 1.4rem;
}

.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: 3px solid var(--glow);
  background: var(--glass-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.related-block {
  width: min(780px, 94%);
  margin-inline: auto;
  padding: 2.2rem 0 0;
}

.related-block .post-grid {
  padding: 1.2rem 0 0;
}

.cta-shell {
  width: min(780px, 94%);
  margin-inline: auto;
  padding: 2.2rem 0 3rem;
}

.cta-shell .hatch {
  text-align: center;
}

/* ============================================================
   10. Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--edge);
  background: rgba(0, 6, 16, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  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(--ink-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-footer__nav a:hover {
  color: var(--glow);
}

.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(--ink-muted);
}

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

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

/* ============================================================
   11. 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(--glow);
  outline-offset: 3px;
}
