/*
Theme Name: Moban 8-2-33
Description: Chủ đề WordPress Retro Pixel Arcade phong cách tủ arcade: nền đen sâu, vàng neon, bố cục màn hình lớn trung tâm kẹp giữa hai dải khay ném xu (coin rail), lớp quét CRT tĩnh.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

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

/* ============================================================
   1. Design tokens — arcade hall black & coin yellow
   ============================================================ */
:root {
  --arc-yellow: #FFD300;
  --arc-yellow-soft: #FFE873;
  --arc-red: #FF3355;
  --arc-cyan: #29D8E5;
  --arc-black: #0A0A0C;
  --arc-panel: #141419;
  --arc-panel-2: #1D1D24;
  --bg: var(--arc-black);
  --surface: var(--arc-panel);
  --text: #F2EFE6;
  --text-muted: #9C98A8;
  --line: rgba(255, 211, 0, 0.35);
  --shadow-px: 8px 8px 0 rgba(255, 211, 0, 0.85);
  --shadow-px-sm: 4px 4px 0 rgba(255, 211, 0, 0.85);
  --font-display: 'VT323', 'Be Vietnam Pro', monospace;
  --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  --wrap: 1180px;
}

/* ============================================================
   2. Reset & base — hard edges, CRT static overlay
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% -10%, rgba(255, 211, 0, 0.08), transparent 55%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 64px);
  overflow-x: hidden;
}

/* CRT scanlines: static fixed overlay (variant 33 implementation) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 4px);
  mix-blend-mode: multiply;
}

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

a {
  color: var(--arc-yellow);
  text-decoration: none;
  transition: color 0.15s steps(2);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--arc-yellow);
  margin: 0 0 0.55em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); text-shadow: 4px 4px 0 rgba(255, 51, 85, 0.55); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.7rem); }

p {
  margin: 0 0 1.2em;
}

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

.section {
  padding: 3rem 0;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--arc-black);
  background: var(--arc-yellow);
  padding: 0.1rem 0.8rem;
  margin-bottom: 0.9rem;
  box-shadow: var(--shadow-px-sm);
}

.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  margin-top: 0.5rem;
  height: 8px;
  width: 140px;
  background: repeating-linear-gradient(90deg, var(--arc-yellow) 0 14px, var(--arc-red) 14px 28px);
}

/* Pixel divider: coin strip */
.px-divider {
  height: 12px;
  border: 0;
  margin: 0;
  background: repeating-linear-gradient(90deg, var(--arc-yellow) 0 12px, transparent 12px 24px);
  opacity: 0.85;
}

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

/* ============================================================
   3. Header & navigation — coin-slot keys
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 10, 12, 0.96);
  border-bottom: 3px solid var(--arc-yellow);
  box-shadow: 0 6px 0 rgba(255, 51, 85, 0.85);
}

.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: 3px solid var(--arc-yellow);
  box-shadow: 0 0 16px rgba(255, 211, 0, 0.45);
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--arc-yellow);
  line-height: 1;
}

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

.site-nav {
  display: none;
}

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

/* Coin-slot nav keys: dark plate with a glowing slit */
.site-nav__link {
  position: relative;
  display: block;
  padding: 0.6rem 0.95rem 0.6rem 1.9rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--arc-panel-2);
  border: 2px solid var(--line);
  transition: background 0.15s steps(2), color 0.15s steps(2), border-color 0.15s steps(2);
}

.site-nav__link::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 50%;
  width: 4px;
  height: 60%;
  transform: translateY(-50%);
  background: var(--arc-black);
  box-shadow: inset 0 0 0 1px var(--line);
}

.site-nav__link:hover,
.site-nav__link:focus {
  color: var(--arc-black);
  background: var(--arc-yellow);
  border-color: var(--arc-yellow);
}

.site-nav__link:hover::before,
.site-nav__link:focus::before {
  background: var(--arc-black);
  box-shadow: none;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: var(--arc-panel-2);
  border: 2px solid var(--line);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 4px;
  background: var(--arc-yellow);
  transition: transform 0.2s steps(3), opacity 0.2s steps(3);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(10px) 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(-10px) rotate(-45deg);
}

.site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--arc-panel);
  border-bottom: 3px solid var(--arc-yellow);
}

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

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

  .nav-toggle {
    display: none;
  }
}

/* ============================================================
   4. Cabinet skeleton — big screen + two coin rails
   ============================================================ */
.attract {
  overflow: hidden;
  background: var(--arc-yellow);
  border-bottom: 3px solid var(--arc-black);
}

.attract__track {
  display: flex;
  width: max-content;
  animation: attract-run 18s linear infinite;
}

.attract__track span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  color: var(--arc-black);
  padding: 0.4rem 0;
  white-space: nowrap;
}

@keyframes attract-run {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.arcade-layout {
  display: grid;
  gap: 1.4rem;
  padding: 1.8rem 0 3rem;
}

@media (min-width: 1100px) {
  .arcade-layout {
    grid-template-columns: 150px minmax(0, 1fr) 150px;
    gap: 2rem;
  }
}

/* Coin rails: vertical side columns with coin slots */
.coin-rail {
  display: none;
  flex-direction: column;
  gap: 1.2rem;
  background: var(--arc-panel);
  border: 3px solid var(--line);
  padding: 1.2rem 0.9rem;
  align-self: start;
  position: sticky;
  top: 92px;
}

@media (min-width: 1100px) {
  .coin-rail {
    display: flex;
  }
}

.coin-rail__credit {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--arc-red);
  text-align: center;
  border: 2px dashed var(--line);
  padding: 0.5rem 0.3rem;
}

.coin-rail__credit b {
  display: block;
  color: var(--arc-yellow);
  font-size: 2rem;
}

.coin-slot {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--arc-yellow);
  background: var(--arc-panel-2);
  border: 2px solid var(--line);
  padding: 0.9rem 0.4rem;
}

.coin-slot::before {
  content: '';
  display: block;
  width: 6px;
  height: 26px;
  margin: 0 auto 0.5rem;
  background: var(--arc-black);
  box-shadow: inset 0 0 0 1px var(--arc-yellow);
}

.coin-rail__vtext {
  writing-mode: vertical-rl;
  margin: 0.4rem auto 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Cabinet screen: marquee bulbs border */
.cabinet-screen {
  background: var(--arc-panel);
  border: 4px solid var(--arc-yellow);
  box-shadow: 0 0 0 8px var(--arc-black), 0 0 0 10px var(--line), 12px 12px 0 rgba(255, 51, 85, 0.4);
  padding: 1.4rem clamp(1rem, 3vw, 2.2rem) 2rem;
}

/* Carousel inside the cabinet screen */
.carousel {
  position: relative;
  border: 3px solid var(--line);
}

.carousel__track {
  position: relative;
  aspect-ratio: 2560 / 1080;
  min-height: 220px;
  max-height: 560px;
}

.carousel__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.7s steps(6);
}

.carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.carousel__dot {
  width: 16px;
  height: 16px;
  border: 2px solid var(--arc-yellow);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.carousel__dot.is-active {
  background: var(--arc-yellow);
  box-shadow: 0 0 10px rgba(255, 211, 0, 0.9);
}

.screen-title {
  text-align: center;
  margin-top: 1.6rem;
}

.screen-title p {
  max-width: 68ch;
  margin-inline: auto;
  color: var(--text-muted);
}

/* INSERT COIN strip: blinking */
.insert-coin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  letter-spacing: 0.22em;
  color: var(--arc-black);
  background: var(--arc-yellow);
  border: 3px solid var(--arc-black);
  box-shadow: 6px 6px 0 var(--arc-red);
  padding: 0.7rem 1rem;
  margin: 2rem 0;
  text-transform: uppercase;
}

.insert-coin__blink {
  animation: coin-blink 0.9s steps(2) infinite;
}

@keyframes coin-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* ============================================================
   5. CTA button — coin-fed start button
   ============================================================ */
.cta-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--arc-black);
  background: var(--arc-yellow);
  border: 3px solid var(--arc-black);
  box-shadow: var(--shadow-px), 0 0 26px rgba(255, 211, 0, 0.35);
  padding: 0.6rem 2.4rem;
  transition: transform 0.1s steps(2), box-shadow 0.1s steps(2);
}

.cta-btn:hover,
.cta-btn:focus {
  color: var(--arc-black);
  background: var(--arc-yellow-soft);
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 rgba(255, 211, 0, 0.85);
}

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

/* ============================================================
   6. High-score pixel table
   ============================================================ */
.hiscore {
  margin-top: 1.6rem;
  overflow-x: auto;
}

.hiscore table {
  width: 100%;
  border-collapse: collapse;
  background: var(--arc-black);
  border: 3px solid var(--arc-yellow);
}

.hiscore th,
.hiscore td {
  font-family: var(--font-display);
  font-size: 1.08rem;
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 2px dashed rgba(255, 211, 0, 0.25);
}

.hiscore thead th {
  color: var(--arc-red);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--arc-yellow);
}

.hiscore td.quote {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.hiscore .rank {
  color: var(--arc-cyan);
}

.hiscore .stars {
  color: var(--arc-yellow);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ============================================================
   7. Game list — features as cabinet select rows
   ============================================================ */
.game-list {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.game-list__row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  background: var(--arc-panel-2);
  border: 2px solid var(--line);
  padding: 1rem 1.1rem;
  transition: border-color 0.15s steps(2), transform 0.15s steps(2);
}

@media (min-width: 720px) {
  .game-list__row {
    grid-template-columns: 120px 1fr;
  }
}

.game-list__row:hover {
  border-color: var(--arc-yellow);
  transform: translateX(6px);
}

/* Joystick cursor appears on hover */
.game-list__row:hover .game-list__title::before {
  content: '► ';
  color: var(--arc-red);
}

.game-list__thumb img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 2px solid var(--line);
}

.game-list__title {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.game-list__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================
   8. Rules table
   ============================================================ */
.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0 0;
  background: var(--arc-black);
  border: 3px solid var(--arc-yellow);
}

.rules-table th,
.rules-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 2px dashed rgba(255, 211, 0, 0.25);
  font-size: 0.94rem;
}

.rules-table th {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--arc-red);
  text-transform: uppercase;
}

.rules-table td:last-child {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--arc-yellow);
  white-space: nowrap;
}

.rules-table tbody tr:hover {
  background: rgba(255, 211, 0, 0.06);
}

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

/* ============================================================
   9. Symbol grid — light-up panels
   ============================================================ */
.icon-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

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

@media (min-width: 1024px) {
  .icon-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.icon-tile {
  text-align: center;
  background: var(--arc-panel-2);
  border: 2px solid var(--line);
  padding: 1rem 0.7rem;
  transition: border-color 0.15s steps(2), box-shadow 0.15s steps(2);
}

.icon-tile:hover {
  border-color: var(--arc-yellow);
  box-shadow: 0 0 18px rgba(255, 211, 0, 0.4);
}

.icon-tile img {
  width: 84px;
  height: 84px;
  margin: 0 auto 0.7rem;
  border: 2px solid var(--line);
}

.icon-tile__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--arc-yellow);
}

/* ============================================================
   10. Breadcrumbs — route chip strip
   ============================================================ */
.breadcrumbs {
  padding: 1rem 0 0;
  font-size: 0.85rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  background: var(--arc-panel-2);
  border: 2px solid var(--line);
  padding: 0.15rem 0.7rem;
  color: var(--text-muted);
}

.breadcrumbs li + li::before {
  content: '»';
  margin-right: 0.45rem;
  color: var(--arc-yellow);
}

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

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

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

/* ============================================================
   11. Archive — cabinet poster cards
   ============================================================ */
.page-head {
  padding: 2rem 0 0.6rem;
}

.post-grid {
  display: grid;
  gap: 1.6rem;
  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);
  }
}

.post-card {
  background: var(--arc-panel);
  border: 3px solid var(--line);
  overflow: hidden;
  transition: border-color 0.15s steps(2), transform 0.15s steps(2), box-shadow 0.15s steps(2);
}

.post-card:hover {
  border-color: var(--arc-yellow);
  transform: translateY(-6px);
  box-shadow: 8px 8px 0 rgba(255, 51, 85, 0.55);
}

.post-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 3px solid var(--line);
}

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

.post-card__title {
  font-size: 1.4rem;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

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

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

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

.post-card__meta {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--arc-red);
}

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

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

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.7rem;
  border: 2px solid var(--line);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.15rem;
  background: var(--arc-panel-2);
}

.page-numbers.current {
  background: var(--arc-yellow);
  color: var(--arc-black);
  border-color: var(--arc-yellow);
}

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

.page-numbers.current:hover {
  color: var(--arc-black);
}

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

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

.single-meta span {
  background: var(--arc-panel-2);
  border: 2px solid var(--line);
  padding: 0.25rem 0.8rem;
}

.entry-content {
  max-width: 780px;
  background: var(--arc-panel);
  border: 3px solid var(--line);
  padding: 2rem clamp(1.2rem, 4vw, 2.8rem) 2.4rem;
  margin-bottom: 2.5rem;
}

.entry-content img {
  border: 3px solid var(--line);
}

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

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 1rem 1.4rem;
  border-left: 8px solid var(--arc-yellow);
  background: var(--arc-black);
  font-style: italic;
}

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

.cta-strip {
  text-align: center;
  padding: 2.4rem 1rem;
  margin: 2rem 0 3rem;
  border: 3px dashed var(--line);
  background: radial-gradient(ellipse at center, rgba(255, 211, 0, 0.08), transparent 70%);
}

/* ============================================================
   13. Footer
   ============================================================ */
.site-footer {
  border-top: 4px solid var(--arc-yellow);
  background: var(--arc-panel);
  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(--arc-yellow);
}

.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-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ============================================================
   14. 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: 3px solid var(--arc-yellow);
  outline-offset: 3px;
}
