/* ─── Fonts & Reset ─────────────────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #050510;
  --panel: #0d0d22cc;
  --solid: #0d0d22;
  --border: #2a2a55;
  --cyan: #00f0ff;
  --green: #39ff14;
  --pink: #ff006e;
  --yellow: #fff200;
  --purple: #bf00ff;
  --text: #e8e8ff;
  --dim: #666688;
  --font: "Share Tech Mono", "Courier New", monospace;
  --display: "Orbitron", var(--font);
  --radius: 6px;
}

/* ─── Base ───────────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Scanlines ──────────────────────────────────────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.1) 3px,
    rgba(0, 0, 0, 0.1) 4px
  );
}

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  text-align: center;
  padding: 72px 24px 48px;
  position: relative;
  z-index: 1;
}

.site-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
  margin-bottom: 20px;
}

.title-line-1,
.title-line-2 {
  font-family: "Orbitron", var(--font);
  font-weight: 900;
  display: block;
  color: #fff;
  letter-spacing: 0.06em;
}

.title-line-1 {
  font-size: clamp(1.6rem, 6vw, 4rem);
  text-shadow:
    0 0 20px var(--cyan),
    0 0 60px var(--cyan);
}

.title-line-2 {
  font-size: clamp(1.1rem, 4vw, 2.6rem);
  letter-spacing: 6px;
  color: var(--pink);
  text-shadow:
    0 0 20px var(--pink),
    0 0 60px var(--pink);
}

.site-subtitle {
  color: var(--cyan);
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ─── Games Grid ─────────────────────────────────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  padding-bottom: 80px;
}

/* ─── Game Card ──────────────────────────────────────────────────────────────── */
.game-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 22px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition:
    transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.22s cubic-bezier(0.25, 0.8, 0.25, 1),
    border-color 0.22s ease;
  cursor: pointer;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 10% 10%,
    var(--card-color, var(--cyan)) 0%,
    transparent 65%
  );
  opacity: 0.04;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.game-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--card-color, var(--cyan)),
    transparent
  );
  opacity: 0.5;
  transition: opacity 0.22s ease;
}

.game-card:hover {
  transform: translateY(-9px) rotate(-0.5deg);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--card-color, var(--cyan)),
    0 0 40px color-mix(in srgb, var(--card-color, var(--cyan)) 25%, transparent);
  border-color: var(--card-color, var(--cyan));
}

.game-card:hover::before {
  opacity: 0.1;
}
.game-card:hover::after {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card-emoji {
  font-size: 2.8rem;
  line-height: 1;
  display: block;
  transition: transform 0.22s ease;
  filter: drop-shadow(
    0 0 8px color-mix(in srgb, var(--card-color, var(--cyan)) 60%, transparent)
  );
}

.game-card:hover .card-emoji {
  transform: scale(1.15) rotate(5deg);
}

.card-name {
  font-family: "Orbitron", var(--font);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  padding-top: 4px;
  letter-spacing: 0.04em;
}

.card-desc {
  font-size: 0.95rem;
  color: rgba(232, 232, 255, 0.75);
  line-height: 1.7;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  color: rgba(232, 232, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.meta-item {
  font-size: 0.82rem;
  color: var(--text);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-label {
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  margin-right: 6px;
}

.card-footer {
  margin-top: 8px;
}

.play-btn {
  display: inline-block;
  padding: 9px 20px;
  background: var(--cyan);
  color: var(--bg);
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  font-family: "Orbitron", var(--font);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow:
    0 0 16px rgba(0, 240, 255, 0.4),
    inset 0 0 8px rgba(255, 255, 255, 0.1);
  transition:
    box-shadow 0.2s ease,
    filter 0.2s ease,
    transform 0.2s ease;
}

.game-card:hover .play-btn {
  filter: brightness(1.2);
  box-shadow:
    0 0 28px rgba(0, 240, 255, 0.7),
    0 0 6px #fff;
  transform: scale(1.04);
}

/* ─── Empty State ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.empty-emoji {
  font-size: 4rem;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  position: relative;
  z-index: 1;
}

.site-footer .container {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.admin-link {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  transition: color 0.15s;
}

.admin-link:hover {
  color: var(--cyan);
}

.footer-sep {
  color: var(--border);
}

.footer-count {
  color: var(--dim);
  font-size: 0.78rem;
}

/* ─── Shared Buttons ─────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 11px 24px;
  background: var(--cyan);
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 0 16px rgba(0, 240, 255, 0.4),
    inset 0 0 8px rgba(255, 255, 255, 0.1);
  transition:
    box-shadow 0.15s,
    transform 0.1s,
    filter 0.15s;
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow:
    0 0 28px rgba(0, 240, 255, 0.7),
    0 0 6px #fff;
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  text-align: center;
}

.btn-ghost {
  display: inline-block;
  padding: 9px 18px;
  background: transparent;
  border: 1.5px solid var(--cyan);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
  transition:
    box-shadow 0.15s,
    background 0.15s;
}

.btn-ghost:hover {
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.06);
}

/* ─── Flash messages ─────────────────────────────────────────────────────────── */
.flash {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.flash--success {
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid rgba(57, 255, 20, 0.3);
  color: var(--green);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.1);
}

.flash--error {
  background: rgba(255, 0, 110, 0.08);
  border: 1px solid rgba(255, 0, 110, 0.3);
  color: var(--pink);
  box-shadow: 0 0 12px rgba(255, 0, 110, 0.1);
}

/* ─── Filter Bar ─────────────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-top: 32px;
  margin-bottom: 28px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: rgba(232, 232, 255, 0.8);
  font-family: var(--font);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}

.filter-toggle:hover {
  color: var(--cyan);
}

.filter-toggle-icon {
  flex-shrink: 0;
}

.filter-toggle-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.filter-toggle--open .filter-toggle-chevron {
  transform: rotate(180deg);
}

.filter-toggle-count {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--cyan);
  font-size: 0.62rem;
  padding: 1px 8px;
  border-radius: 20px;
  letter-spacing: 0.08em;
}

.filter-body {
  overflow: hidden;
  max-height: 0;
  transition:
    max-height 0.35s ease,
    margin-top 0.35s ease;
}

.filter-body.is-open {
  max-height: 900px;
  margin-top: 18px;
}

.filter-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
  padding-bottom: 6px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 232, 255, 0.45);
  min-width: 64px;
  padding-top: 5px;
  flex-shrink: 0;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-pill {
  background: transparent;
  border: 1px solid rgba(232, 232, 255, 0.18);
  color: rgba(232, 232, 255, 0.55);
  font-family: var(--font);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
  line-height: 1.5;
}

.filter-pill:hover {
  border-color: rgba(232, 232, 255, 0.5);
  color: var(--text);
}

.filter-pill.active {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.18);
}

.filter-clear {
  background: transparent;
  border: 1px solid rgba(255, 0, 110, 0.35);
  color: var(--pink);
  font-family: var(--font);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.filter-clear:hover {
  background: rgba(255, 0, 110, 0.08);
  border-color: var(--pink);
}

.filter-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  gap: 16px;
}

.filter-empty .empty-emoji {
  font-size: 2.5rem;
}
.filter-empty p {
  color: var(--dim);
  font-size: 0.9rem;
}

/* ─── Card Badges ─────────────────────────────────────────────────────────────── */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.card-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.card-badge {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid;
  line-height: 1.6;
}

.card-badge--original {
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.06);
}
.card-badge--beta {
  color: var(--yellow);
  border-color: rgba(255, 242, 0, 0.35);
  background: rgba(255, 242, 0, 0.06);
}
.card-badge--offline {
  color: var(--dim);
  border-color: var(--border);
  background: transparent;
}
.card-badge--featured {
  color: var(--purple);
  border-color: rgba(191, 0, 255, 0.35);
  background: rgba(191, 0, 255, 0.06);
}

/* ─── Ad Placements ──────────────────────────────────────────────────────────── */
.sponsor-zone {
  width: 100%;
  padding: 12px 0 24px;
}

.sponsor-zone--footer {
  padding: 24px 0;
}

.sponsor-zone ins {
  display: block;
  width: 100%;
}

/* ─── Footer Legal ───────────────────────────────────────────────────────────── */
.footer-copy {
  opacity: 0.7;
}

.footer-legal-link {
  color: var(--dim);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}

.footer-legal-link:hover {
  color: var(--cyan);
}

/* ─── 404 Page ───────────────────────────────────────────────────────────────── */
.error-404-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 24px 100px;
  max-width: 600px;
  margin: 0 auto;
}

.error-404-code {
  font-family: "Orbitron", var(--font);
  font-size: clamp(5rem, 20vw, 9rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--cyan);
  text-shadow:
    0 0 40px rgba(0, 240, 255, 0.5),
    0 0 80px rgba(0, 240, 255, 0.2);
  margin-bottom: 8px;
}

.error-404-subtitle {
  font-family: "Orbitron", var(--font);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--magenta, #ff00ff);
  text-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
  margin-bottom: 32px;
}

.error-404-message {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 10px;
}

.error-404-sub-message {
  font-size: 0.85rem;
  color: var(--dim);
  margin-bottom: 36px;
}

.error-404-pixel-art {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  color: rgba(0, 240, 255, 0.5);
  letter-spacing: 0.1em;
  line-height: 1.8;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  background: var(--panel);
  white-space: pre;
}

.continue-prompt {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 40px;
  animation: blink-cursor 1.1s step-end infinite;
}

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

.error-404-btn {
  font-size: 0.85rem;
}

/* ─── Modals ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 16, 0.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-overlay.is-open {
  display: flex;
}

.modal-box {
  background: var(--solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.08);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
  font-family: var(--font);
}

.modal-close:hover {
  color: var(--text);
}

.modal-title {
  font-family: "Orbitron", var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 0 12px var(--cyan);
}

.modal-body {
  color: var(--dim);
  font-size: 0.88rem;
  line-height: 1.8;
}

.modal-body p {
  margin-bottom: 14px;
}
.modal-body h2,
.modal-body h3 {
  color: var(--text);
  margin: 20px 0 8px;
  font-family: "Orbitron", var(--font);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.modal-body a {
  color: var(--cyan);
}

/* ─── Site Nav ───────────────────────────────────────────────────────────────── */
.site-nav {
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.site-nav .container {
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  justify-content: center;
}

.site-nav-links {
  display: flex;
  align-items: center;
}

.site-nav-link {
  display: inline-block;
  padding: 14px 28px;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 232, 255, 0.55);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.site-nav-link:hover {
  color: var(--text);
}

.site-nav-link--active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.site-nav-sep {
  color: var(--border);
  font-size: 0.8rem;
  padding: 0 4px;
  -webkit-user-select: none;
  user-select: none;
}

/* ─── Burger menu (mobile only) ──────────────────────────────────────────────── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-right: -10px;
}

.nav-burger span {
  display: block;
  width: 28px;
  height: 2px;
  background: rgba(232, 232, 255, 0.7);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
  transform-origin: center;
}

.nav-burger.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-burger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-burger.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-mobile {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  border-top: 0 solid var(--border);
}

.nav-mobile.is-open {
  max-height: 400px;
  border-top-width: 1px;
  margin-bottom: 24px;
}

.nav-mobile-link {
  display: block;
  padding: 18px 24px;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 232, 255, 0.65);
  text-decoration: none;
  text-align: center;
  border-bottom: 1px solid var(--border);
  transition:
    color 0.15s,
    background 0.15s;
}

.nav-mobile-link:last-child {
  border-bottom: none;
}

.nav-mobile-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.nav-mobile-link--active {
  color: var(--cyan);
}

/* ─── Blog Listing ───────────────────────────────────────────────────────────── */
.blog-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.blog-title {
  font-family: "Orbitron", var(--font);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 20px var(--cyan),
    0 0 60px rgba(0, 240, 255, 0.3);
  margin-bottom: 8px;
}

.blog-subtitle {
  color: var(--dim);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding-bottom: 60px;
}

.blog-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition:
    transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.22s cubic-bezier(0.25, 0.8, 0.25, 1),
    border-color 0.22s ease;
}

.blog-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 10% 10%,
    var(--cyan) 0%,
    transparent 65%
  );
  opacity: 0.04;
  transition: opacity 0.22s ease;
  pointer-events: none;
  z-index: 1;
}

.blog-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5;
  transition: opacity 0.22s ease;
  z-index: 2;
}

.blog-card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.blog-card:hover {
  transform: translateY(-8px) rotate(-0.3deg);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--cyan),
    0 0 40px rgba(0, 240, 255, 0.2);
  border-color: var(--cyan);
}

.blog-card:hover::before {
  opacity: 0.1;
}

.blog-card:hover::after {
  opacity: 1;
}

.blog-card-image {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--solid);
  border-bottom: 1px solid var(--border);
}

.blog-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-card-title {
  font-family: "Orbitron", var(--font);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  line-height: 1.4;
}

.blog-card-excerpt {
  color: var(--dim);
  font-size: 0.85rem;
  line-height: 1.6;
  flex: 1;
}

.blog-card-date {
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 2px;
}

.blog-tag {
  display: inline-block;
  position: relative;
  z-index: 4;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: rgba(0, 240, 255, 0.7);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}

a.blog-tag:hover {
  background: rgba(0, 240, 255, 0.14);
  color: var(--cyan);
}

.blog-filter-active {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--dim);
}

.blog-filter-clear {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 20px;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.blog-filter-clear:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ─── Single Post ────────────────────────────────────────────────────────────── */
/* ─── Post hero banner (full-width, title overlaid) ─────────────────────────── */
.post-hero-banner {
  position: relative;
  width: 100%;
  min-height: 420px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.post-hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 16, 0.15) 0%,
    rgba(5, 5, 16, 0.55) 50%,
    rgba(5, 5, 16, 0.92) 100%
  );
  pointer-events: none;
}

.post-hero-back {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 2;
  display: inline-block;
  color: rgba(232, 232, 255, 0.7);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  background: rgba(5, 5, 16, 0.5);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    color 0.15s,
    background 0.15s;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.post-hero-back:hover {
  color: #fff;
  background: rgba(0, 240, 255, 0.15);
}

.post-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px 40px;
}

.post-title {
  font-family: "Orbitron", var(--font);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  line-height: 1.25;
  margin-bottom: 14px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-date,
.post-updated {
  font-size: 0.78rem;
  color: rgba(232, 232, 255, 0.65);
  letter-spacing: 0.06em;
}

/* ─── Post side-rail layout ──────────────────────────────────────────────────── */
.post-rails-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
}

.post-rail {
  width: 160px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  padding-top: 40px;
}

/* ─── Post body / wrap (center column) ──────────────────────────────────────── */
.post-body,
.post-wrap {
  flex: 1;
  min-width: 0;
  max-width: 760px;
}

.post-body {
  padding: 48px 0 80px;
}

.post-wrap {
  padding: 40px 0 80px;
}

.post-back {
  display: inline-block;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
  transition: color 0.15s;
}

.post-back:hover {
  color: var(--cyan);
}

.post-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

/* Hide rails below 1200px — not enough room */
@media (max-width: 1199px) {
  .post-rail {
    display: none;
  }
  .post-rails-wrap {
    padding: 0 24px;
  }
}

.post-content {
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--text);
}

.post-content h1,
.post-content h2,
.post-content h3 {
  font-family: "Orbitron", var(--font);
  color: #fff;
  margin: 28px 0 12px;
  letter-spacing: 0.06em;
}

.post-content h2 {
  font-size: 1rem;
}
.post-content h3 {
  font-size: 0.85rem;
}
.post-content p {
  margin-bottom: 16px;
}

.post-content a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
  transition: border-color 0.15s;
}

.post-content a:hover {
  border-color: var(--cyan);
}

.post-content ul,
.post-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 8px 0;
}

/* Responsive embeds */
.post-content iframe,
.post-content embed,
.post-content object,
.post-content video {
  max-width: 100%;
}

.post-content audio {
  width: 100%;
  display: block;
}

.post-content figure.wp-block-audio {
  margin: 16px 0;
}

.post-content .embed-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 20px 0;
}

.post-content .embed-wrap iframe,
.post-content .embed-wrap embed,
.post-content .embed-wrap object {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-content pre {
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 16px;
  font-family: var(--font);
  font-size: 0.88em;
}

.post-content code {
  font-family: var(--font);
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.88em;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
}

.post-content blockquote {
  border-left: 3px solid var(--cyan);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--dim);
}

/* ─── Post image gallery ─────────────────────────────────────────────────────── */
.post-content .wp-block-gallery,
.post-content .galleryimages {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 28px 0;
  list-style: none;
  padding: 0;
}

.post-content .wp-block-gallery .wp-block-image,
.post-content .galleryimages figure {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.03);
}

.post-content .wp-block-gallery .wp-block-image img,
.post-content .galleryimages img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition:
    transform 0.25s,
    filter 0.25s;
}

.post-content .wp-block-gallery .wp-block-image:hover img,
.post-content .galleryimages figure:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.post-content .wp-block-gallery .wp-block-image a,
.post-content .galleryimages a {
  display: block;
  height: 100%;
  border: none;
}

/* ─── Gallery lightbox modal ─────────────────────────────────────────────────── */
.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}

.gallery-modal--open {
  display: flex;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 12, 0.92);
  cursor: pointer;
  animation: gallery-fade-in 0.18s ease;
}

@keyframes gallery-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.gallery-modal-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
  animation: gallery-scale-in 0.18s ease;
}

@keyframes gallery-scale-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gallery-modal-img {
  display: block;
  max-width: 90vw;
  max-height: 82vh;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
  object-fit: contain;
}

.gallery-modal-caption {
  margin-top: 12px;
  font-size: 0.78rem;
  color: rgba(232, 232, 255, 0.55);
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 600px;
}

.gallery-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.gallery-modal-close:hover {
  background: rgba(0, 240, 255, 0.2);
}

.gallery-modal-prev,
.gallery-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.gallery-modal-prev {
  left: 16px;
}
.gallery-modal-next {
  right: 16px;
}

.gallery-modal-prev:hover,
.gallery-modal-next:hover {
  background: rgba(0, 240, 255, 0.2);
}

.gallery-modal-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.72rem;
  color: rgba(232, 232, 255, 0.4);
  letter-spacing: 0.08em;
  pointer-events: none;
}

/* ─── Post navigation (prev / next) ─────────────────────────────────────────── */
.post-nav {
  border-top: 1px solid var(--border);
  padding: 40px 24px 60px;
}

.post-nav-inner {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.post-nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.2s,
    background 0.2s;
  min-width: 0;
}

.post-nav-card:hover {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.04);
}

.post-nav-card--empty {
  visibility: hidden;
  pointer-events: none;
}

.post-nav-card--next {
  flex-direction: row-reverse;
  text-align: right;
}

.post-nav-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
}

.post-nav-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.post-nav-label {
  font-size: 0.68rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-nav-title {
  font-size: 0.88rem;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Resources Page ─────────────────────────────────────────────────────────── */
.resource-section {
  margin-bottom: 40px;
}

.resource-section-title {
  font-family: "Orbitron", var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.resource-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.2s,
    background 0.2s;
}

.resource-card:hover {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.04);
}

.resource-emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 30px;
  text-align: center;
}

.resource-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.resource-title {
  font-size: 0.92rem;
  color: #fff;
}

.resource-desc {
  font-size: 0.78rem;
  color: var(--dim);
  line-height: 1.4;
}

.resource-arrow {
  flex-shrink: 0;
  color: var(--dim);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.resource-card:hover .resource-arrow {
  color: var(--cyan);
}

/* ─── Contact Page ───────────────────────────────────────────────────────────── */
.contact-honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-success {
  text-align: center;
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.contact-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.35);
  color: var(--green);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.contact-success-title {
  font-family: "Orbitron", var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  text-transform: uppercase;
}

.contact-success p {
  color: var(--dim);
  font-size: 0.9rem;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

/* Tablet — 768px */
@media (max-width: 768px) {
  .site-header {
    padding: 48px 20px 36px;
  }

  /* Post prev/next — stack vertically */
  .post-nav-inner {
    grid-template-columns: 1fr;
  }
  .post-nav-card--empty {
    display: none;
  }
  .post-nav-card--next {
    flex-direction: row;
    text-align: left;
  }

  /* Modal — less padding */
  .modal-box {
    padding: 28px 24px;
  }

  /* Blog grid — 2 columns on tablet */
  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* Mobile — 640px */
@media (max-width: 640px) {
  .site-header {
    padding: 40px 16px 28px;
  }

  /* Nav — burger menu */
  .site-nav .container {
    justify-content: center;
  }
  .site-nav-links {
    display: none;
  }
  .nav-burger {
    display: flex;
  }

  /* Games */
  .games-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .game-card {
    padding: 20px 16px 16px;
  }
  .card-name {
    font-size: 1.2rem;
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-header {
    padding: 32px 0 20px;
    margin-bottom: 28px;
  }
  .blog-title {
    font-size: 1.2rem;
  }

  /* Post */
  .post-rails-wrap {
    padding: 0 16px;
  }
  .post-wrap {
    padding: 24px 0 60px;
  }
  .post-body {
    padding: 32px 0 60px;
  }
  .post-hero-banner {
    min-height: 260px;
  }
  .post-hero-inner {
    padding: 0 16px 24px;
  }
  .post-title {
    font-size: 1.3rem;
  }
  .post-hero-back {
    top: 14px;
    left: 14px;
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  /* Post nav */
  .post-nav {
    padding: 28px 16px 48px;
  }
  .post-nav-inner {
    grid-template-columns: 1fr;
  }
  .post-nav-thumb {
    width: 52px;
    height: 52px;
  }

  /* Gallery lightbox */
  .gallery-modal-prev {
    left: 6px;
  }
  .gallery-modal-next {
    right: 6px;
  }
  .gallery-modal-prev,
  .gallery-modal-next {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }

  /* Modal */
  .modal-box {
    padding: 24px 16px;
  }

  /* Footer */
  .site-footer .container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}

/* Small mobile — 400px */
@media (max-width: 400px) {
  .post-title {
    font-size: 1.1rem;
  }
  .post-hero-banner {
    min-height: 220px;
  }
  .card-name {
    font-size: 1.05rem;
  }
  .container {
    padding: 0 14px;
  }
}
