/* ==========================================================================
   FMJ03 MODERN CYBER-MINIMAL ARCADE THEME
   Design System, Tokens & Custom Components
   ========================================================================== */

:root {
  /* Canvas & Surfaces */
  --fmj-canvas: #090a0f;
  --fmj-canvas-rgb: 9, 10, 15;
  --fmj-surface: #121520;
  --fmj-surface-muted: #181d2c;
  --fmj-surface-float: #1e2436;
  --fmj-surface-glass: rgba(18, 21, 32, 0.82);

  /* Accents */
  --fmj-primary: #00f0a8;
  --fmj-primary-rgb: 0, 240, 168;
  --fmj-primary-hover: #00d695;
  --fmj-secondary: #3b82f6;
  --fmj-danger: #f43f5e;
  --fmj-rating: #fbbf24;

  /* Borders */
  --fmj-border: #1f2738;
  --fmj-border-light: rgba(255, 255, 255, 0.08);
  --fmj-border-hover: #35425c;
  --fmj-border-glow: rgba(0, 240, 168, 0.4);

  /* Text Hierarchy */
  --fmj-text-1: #f8fafc;
  --fmj-text-2: #cbd5e1;
  --fmj-text-3: #94a3b8;
  --fmj-text-4: #64748b;

  /* Geometry & Shadows */
  --fmj-radius-sm: 8px;
  --fmj-radius-md: 12px;
  --fmj-radius-lg: 16px;
  --fmj-radius-xl: 20px;
  --fmj-radius-pill: 9999px;

  --fmj-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --fmj-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --fmj-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --fmj-shadow-glow: 0 0 24px rgba(0, 240, 168, 0.2);

  /* Transition timings */
  --fmj-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fmj-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base resets & typography */
html {
  background-color: var(--fmj-canvas);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background-color: var(--fmj-canvas);
  color: var(--fmj-text-2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

::selection {
  background: rgba(0, 240, 168, 0.25);
  color: #00f0a8;
}

/* Custom modern scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--fmj-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--fmj-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--fmj-border-hover);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.fmj-navbar {
  background: var(--fmj-surface-glass);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--fmj-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 68px;
  transition: all 0.25s ease;
}

.fmj-nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.fmj-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.fmj-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f0a8 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #090a0f;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 0 14px rgba(0, 240, 168, 0.35);
  letter-spacing: -0.5px;
}

.fmj-brand-text {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.fmj-brand-text span {
  color: var(--fmj-primary);
}

/* Category Quick Chips Bar */
.fmj-chips-strip {
  background: rgba(18, 21, 32, 0.6);
  border-bottom: 1px solid var(--fmj-border);
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
  z-index: 40;
  margin-top: 68px;
}
.fmj-chips-strip::-webkit-scrollbar {
  display: none;
}

.fmj-chips-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.fmj-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--fmj-radius-pill);
  background: var(--fmj-surface);
  border: 1px solid var(--fmj-border);
  color: var(--fmj-text-3);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s var(--fmj-ease);
}

.fmj-chip:hover {
  background: var(--fmj-surface-float);
  border-color: var(--fmj-border-hover);
  color: var(--fmj-text-1);
}

.fmj-chip.active {
  background: rgba(0, 240, 168, 0.14);
  border-color: rgba(0, 240, 168, 0.4);
  color: var(--fmj-primary);
  box-shadow: 0 0 12px rgba(0, 240, 168, 0.15);
}

/* Search bar in Navbar */
.fmj-search-box {
  position: relative;
  width: 280px;
}

.fmj-search-input {
  width: 100%;
  background: var(--fmj-surface-muted);
  border: 1px solid var(--fmj-border);
  border-radius: var(--fmj-radius-pill);
  padding: 8px 36px 8px 16px;
  font-size: 13px;
  color: var(--fmj-text-1);
  transition: all 0.2s var(--fmj-ease);
}

.fmj-search-input:focus {
  outline: none;
  border-color: var(--fmj-primary);
  background: var(--fmj-surface);
  box-shadow: 0 0 0 3px rgba(0, 240, 168, 0.15);
}

.fmj-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--fmj-text-4);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.fmj-search-btn:hover {
  color: var(--fmj-primary);
}

/* ==========================================================================
   USER PROFILE HEADER & DROPDOWN MENU
   ========================================================================== */

.fmj-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-radius: var(--fmj-radius-pill);
  background: var(--fmj-surface);
  border: 1px solid var(--fmj-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.fmj-user-btn:hover {
  background: var(--fmj-surface-float);
  border-color: rgba(0, 240, 168, 0.4);
}

.fmj-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 240, 168, 0.4);
}

.fmj-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: #121520 !important;
  border: 1px solid #1f2738 !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  padding: 6px 0 !important;
  z-index: 9999 !important;
  backdrop-filter: blur(20px);
}

.fmj-user-dropdown-header {
  padding: 10px 16px;
  border-bottom: 1px solid #1f2738;
}

.fmj-user-dropdown-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.fmj-user-dropdown-xp {
  font-size: 11px;
  font-weight: 700;
  color: #00f0a8;
  margin-top: 4px;
}

.fmj-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.18s var(--fmj-ease);
}

.fmj-user-dropdown-item:hover {
  background: #181d2c;
  color: #00f0a8;
  padding-left: 20px;
}

.fmj-user-dropdown-item svg {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  flex-shrink: 0;
  transition: color 0.18s ease;
}

.fmj-user-dropdown-item:hover svg {
  color: #00f0a8;
}

.fmj-user-dropdown-divider {
  height: 1px;
  background: #1f2738;
  margin: 6px 0;
}

.fmj-user-dropdown-item.admin {
  color: #fbbf24;
}

.fmj-user-dropdown-item.admin:hover {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
}

.fmj-user-dropdown-item.admin svg {
  color: #fbbf24;
}

.fmj-user-dropdown-item.logout {
  color: #f43f5e;
}

.fmj-user-dropdown-item.logout:hover {
  color: #ff6482;
  background: rgba(244, 63, 94, 0.12);
}

.fmj-user-dropdown-item.logout svg {
  color: #f43f5e;
}

/* ==========================================================================
   POKI-STYLE BENTO HERO MOSAIC (DIRECTION A 1:1 REPLICATION)
   ========================================================================== */

.fmj-hero-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px !important;
  margin-bottom: 36px;
}

@media (min-width: 640px) {
  .fmj-hero-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px !important;
  }
}

@media (min-width: 1024px) {
  .fmj-hero-mosaic {
    grid-template-columns: 1.55fr 1fr 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px !important;
  }

  .fmj-hero-spotlight {
    grid-row: span 2 !important;
    grid-column: 1 !important;
  }
}

@media (min-width: 1280px) {
  .fmj-hero-mosaic {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 18px !important;
  }
}

@media (max-width: 1023px) {
  .fmj-hero-spotlight {
    grid-column: 1 / -1;
  }
}

.fmj-hero-spotlight {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #141724;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s var(--fmj-ease), border-color 0.28s ease, box-shadow 0.28s ease;
  text-decoration: none;
}

.fmj-hero-spotlight:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 240, 168, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(0, 240, 168, 0.2);
}

.fmj-hero-spotlight-art {
  width: 100%;
  flex: 1;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  background: #10131d;
}

@media (min-width: 1024px) {
  .fmj-hero-spotlight-art {
    height: 60%;
    flex: none;
    min-height: 0;
  }
}

.fmj-hero-spotlight-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--fmj-ease);
}

.fmj-hero-spotlight:hover .fmj-hero-spotlight-img {
  transform: scale(1.05);
}

.fmj-hero-spotlight-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 240, 168, 0.95);
  color: #062419;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--fmj-radius-pill);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 240, 168, 0.3);
  z-index: 5;
}

.fmj-hero-spotlight-info {
  padding: 16px 20px;
  background: linear-gradient(180deg, #141724 0%, #0d0f18 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex: 1;
}

@media (min-width: 1024px) {
  .fmj-hero-spotlight-info {
    height: 40%;
    flex: none;
  }
}

.fmj-hero-spotlight-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fmj-hero-spotlight-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.fmj-hero-spotlight-cta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.fmj-hero-spotlight-btn {
  background: #00f0a8;
  color: #062419;
  font-weight: 800;
  font-size: 12px;
  padding: 7px 18px;
  border-radius: var(--fmj-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 240, 168, 0.35);
  transition: all 0.2s ease;
}

.fmj-hero-spotlight:hover .fmj-hero-spotlight-btn {
  background: #00d695;
  transform: scale(1.03);
}

.fmj-view-all-pill {
  padding: 6px 16px;
  border-radius: var(--fmj-radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: #00f0a8;
  background: rgba(0, 240, 168, 0.1);
  border: 1px solid rgba(0, 240, 168, 0.3);
  text-decoration: none;
  transition: all 0.2s ease;
}

.fmj-view-all-pill:hover {
  background: #00f0a8;
  color: #062419;
  box-shadow: 0 4px 16px rgba(0, 240, 168, 0.25);
  transform: translateY(-1px);
}

/* ==========================================================================
   POKI-STYLE SQUIRCLE VISUAL GAME CARD
   ========================================================================== */

.fmj-card {
  background: #141724;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.28s var(--fmj-ease), box-shadow 0.28s ease, border-color 0.28s ease;
  cursor: pointer;
}

.fmj-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(0, 240, 168, 0.55);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 240, 168, 0.22);
  z-index: 10;
}

.fmj-card-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #10131d;
}

.fmj-card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--fmj-ease);
}

.fmj-card:hover .fmj-card-art {
  transform: scale(1.07);
}

.fmj-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(10, 12, 18, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Pure hover reveal overlay (Zero smudge when idle) */
.fmj-card-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(9, 10, 15, 0.94) 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 12px;
  z-index: 6;
  pointer-events: none;
}

.fmj-card:hover .fmj-card-hover-overlay {
  opacity: 1;
}

.fmj-card-hover-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.fmj-card-hover-meta {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

.fmj-card-hover-play {
  font-size: 10px;
  font-weight: 800;
  color: #00f0a8;
  white-space: nowrap;
  background: rgba(0, 240, 168, 0.15);
  border: 1px solid rgba(0, 240, 168, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ==========================================================================
   GAME PLAY PAGE (THEATER, LIGHTS OFF, CONTROLS)
   ========================================================================== */

/* Lights Off Overlay */
.fmj-lights-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.95);
  backdrop-filter: blur(14px);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
body.lights-off .fmj-lights-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Game Player Stage */
.fmj-player-shell {
  background: var(--fmj-surface);
  border: 1px solid var(--fmj-border);
  border-radius: var(--fmj-radius-xl);
  overflow: hidden;
  box-shadow: var(--fmj-shadow-lg);
  position: relative;
  transition: all 0.35s var(--fmj-ease);
}

body.lights-off .fmj-player-shell {
  z-index: 90;
  border-color: var(--fmj-primary);
  box-shadow: 0 0 50px rgba(0, 240, 168, 0.25);
}

/* Theater Mode expansion */
body.theater-mode .fmj-theater-target {
  grid-column: 1 / -1 !important;
}
body.theater-mode .fmj-theater-hide {
  display: none !important;
}

.fmj-iframe-box {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  max-height: 85vh;
}

@media (min-width: 768px) {
  .fmj-iframe-box {
    min-height: 520px;
  }
}

.fmj-game-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Player Bar Controls */
.fmj-player-controls {
  padding: 14px 20px;
  background: var(--fmj-surface-muted);
  border-top: 1px solid var(--fmj-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.fmj-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--fmj-surface);
  border: 1px solid var(--fmj-border);
  color: var(--fmj-text-2);
  padding: 8px 14px;
  border-radius: var(--fmj-radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--fmj-ease);
}

.fmj-ctrl-btn:hover {
  background: var(--fmj-surface-float);
  border-color: var(--fmj-border-hover);
  color: var(--fmj-text-1);
}

.fmj-ctrl-btn.active {
  background: rgba(0, 240, 168, 0.15);
  border-color: var(--fmj-primary);
  color: var(--fmj-primary);
}

.fmj-ctrl-btn.fav.active {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--fmj-danger);
  color: var(--fmj-danger);
}

/* ==========================================================================
   METADATA CARDS, ACCORDION & TABS
   ========================================================================== */

.fmj-panel {
  background: var(--fmj-surface);
  border: 1px solid var(--fmj-border);
  border-radius: var(--fmj-radius-lg);
  padding: 22px;
  margin-bottom: 20px;
}

.fmj-panel-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--fmj-text-1);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fmj-panel-title .icon {
  color: var(--fmj-primary);
}

.fmj-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--fmj-radius-pill);
  background: var(--fmj-surface-muted);
  border: 1px solid var(--fmj-border);
  color: var(--fmj-text-3);
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.fmj-tag-pill:hover {
  border-color: var(--fmj-primary);
  color: var(--fmj-primary);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.fmj-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
}

.fmj-pagination ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.fmj-pagination li {
  display: inline-flex;
}

.fmj-pagination a,
.fmj-pagination span {
  padding: 8px 16px;
  border-radius: var(--fmj-radius-pill);
  background: var(--fmj-surface);
  border: 1px solid var(--fmj-border);
  color: var(--fmj-text-3);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fmj-pagination a:hover {
  background: var(--fmj-surface-float);
  border-color: var(--fmj-border-hover);
  color: var(--fmj-text-1);
}

.fmj-pagination .current,
.fmj-pagination .active,
.fmj-pagination .current a,
.fmj-pagination li.current a,
.fmj-pagination .active a {
  background: var(--fmj-primary) !important;
  border-color: var(--fmj-primary) !important;
  color: #062419 !important;
  cursor: default;
}

/* ==========================================================================
   COMMENTS & FORMS
   ========================================================================== */

.comment-form-wrapper {
  background: var(--fmj-surface);
  border: 1px solid var(--fmj-border);
  border-radius: var(--fmj-radius-lg);
  padding: 16px;
}

.comment-form-wrapper textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--fmj-text-1);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}
.comment-form-wrapper textarea:focus {
  outline: none;
}

.tpl-user-comment {
  background: var(--fmj-surface);
  border: 1px solid var(--fmj-border);
  border-radius: var(--fmj-radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
}

/* Toast Message */
.fmj-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--fmj-surface-float);
  border: 1px solid var(--fmj-primary);
  color: var(--fmj-text-1);
  font-weight: 700;
  font-size: 13px;
  padding: 12px 20px;
  border-radius: var(--fmj-radius-pill);
  box-shadow: var(--fmj-shadow-md), var(--fmj-shadow-glow);
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--fmj-ease);
  z-index: 9999;
}
.fmj-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .fmj-navbar {
    height: 60px;
  }
  .fmj-chips-strip {
    margin-top: 60px;
  }
  .fmj-search-box {
    width: 100%;
  }
  .fmj-iframe-box {
    min-height: 280px;
  }
}

/* ==========================================================================
   ARTICLE & PAGE PROSE TYPOGRAPHY (.fmj-prose)
   ========================================================================== */

.fmj-prose {
  font-size: 15px;
  line-height: 1.85;
  color: #cbd5e1;
}

.fmj-prose h1,
.fmj-prose h2,
.fmj-prose h3,
.fmj-prose h4 {
  color: #ffffff;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.fmj-prose h2 {
  font-size: 20px;
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.fmj-prose h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: #00f0a8;
  border-radius: 2px;
  flex-shrink: 0;
}

.fmj-prose h3 {
  font-size: 17px;
  margin-top: 26px;
  margin-bottom: 10px;
  color: #f1f5f9;
}

.fmj-prose h4 {
  font-size: 15px;
  margin-top: 20px;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.fmj-prose p {
  margin-bottom: 16px;
  color: #cbd5e1;
}

.fmj-prose a {
  color: #00f0a8;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(0, 240, 168, 0.4);
  transition: all 0.2s ease;
}

.fmj-prose a:hover {
  color: #5df7c8;
  border-bottom-style: solid;
  border-bottom-color: #00f0a8;
}

.fmj-prose strong,
.fmj-prose b {
  color: #ffffff;
  font-weight: 700;
}

.fmj-prose ul {
  list-style-type: disc;
  padding-left: 24px;
  margin-top: 8px;
  margin-bottom: 18px;
}

.fmj-prose ol {
  list-style-type: decimal;
  padding-left: 24px;
  margin-top: 8px;
  margin-bottom: 18px;
}

.fmj-prose li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.fmj-prose blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  background: #181d2c;
  border-left: 4px solid #00f0a8;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #94a3b8;
}

.fmj-prose code {
  background: #181d2c;
  color: #00f0a8;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid #232b3d;
}

/* Prevent double empty br tags from nl2br in HTML content */
.fmj-prose br + br {
  display: none;
}
.fmj-prose h2 + br,
.fmj-prose h3 + br,
.fmj-prose p + br {
  display: none;
}

/* ==========================================================================
   FOOTER (MATCHING FMJ02 CONTENT WITH MODERN ARCADE LAYOUT)
   ========================================================================== */

.fmj-footer {
  margin-top: 64px;
  background: #0a0c13;
  border-top: 1px solid #181d2c;
  color: var(--fmj-text-3);
}

.fmj-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 20px;
}

@media (min-width: 640px) {
  .fmj-footer-inner {
    padding: 40px 24px;
  }
}

.fmj-footer-widgets {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 28px;
}

@media (min-width: 640px) {
  .fmj-footer-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .fmj-footer-widgets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.fmj-footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid #141824;
}

@media (min-width: 640px) {
  .fmj-footer-bottom {
    flex-direction: row;
  }
}

.fmj-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.fmj-footer-brand:hover {
  color: var(--fmj-primary);
}

.fmj-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
}

.fmj-footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.fmj-footer-links a:hover {
  color: var(--fmj-primary);
}

/* ==========================================================================
   POKI-STYLE RESPONSIVE GAMES GRID & TAILWIND FIXES
   ========================================================================== */

/* High-density visual game card grid (Guaranteed generous gaps) */
.fmj-games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px !important;
}

@media (min-width: 480px) {
  .fmj-games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px !important;
  }
}

@media (min-width: 768px) {
  .fmj-games-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px !important;
  }
}

@media (min-width: 1024px) {
  .fmj-games-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px !important;
  }
}

@media (min-width: 1280px) {
  .fmj-games-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px !important;
  }
}

@media (min-width: 1536px) {
  .fmj-games-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 22px !important;
  }
}

/* Explicit Gap Utilities (Guarantees gaps even when templates use tailwind gap classes) */
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-3\.5 { gap: 14px !important; }
.gap-4 { gap: 16px !important; }
.gap-4\.5 { gap: 18px !important; }
.gap-5 { gap: 20px !important; }
.gap-6 { gap: 24px !important; }
.gap-8 { gap: 32px !important; }

@media (min-width: 640px) {
  .sm\:gap-2 { gap: 8px !important; }
  .sm\:gap-3 { gap: 12px !important; }
  .sm\:gap-3\.5 { gap: 14px !important; }
  .sm\:gap-4 { gap: 16px !important; }
  .sm\:gap-4\.5 { gap: 18px !important; }
  .sm\:gap-5 { gap: 20px !important; }
  .sm\:gap-6 { gap: 24px !important; }
}

@media (min-width: 768px) {
  .md\:gap-3 { gap: 12px !important; }
  .md\:gap-3\.5 { gap: 14px !important; }
  .md\:gap-4 { gap: 16px !important; }
  .md\:gap-4\.5 { gap: 18px !important; }
  .md\:gap-5 { gap: 20px !important; }
}

@media (min-width: 1024px) {
  .lg\:gap-3 { gap: 12px !important; }
  .lg\:gap-3\.5 { gap: 14px !important; }
  .lg\:gap-4 { gap: 16px !important; }
  .lg\:gap-4\.5 { gap: 18px !important; }
  .lg\:gap-5 { gap: 20px !important; }
}

/* Missing Tailwind Breakpoint Utilities (Fixes Desktop Search Bar, Hamburger, Columns) */
@media (min-width: 640px) {
  .sm\:block { display: block !important; }
  .sm\:inline-block { display: inline-block !important; }
  .sm\:flex { display: flex !important; }
  .sm\:hidden { display: none !important; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}

@media (min-width: 768px) {
  .md\:block { display: block !important; }
  .md\:inline-block { display: inline-block !important; }
  .md\:flex { display: flex !important; }
  .md\:hidden { display: none !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}

@media (min-width: 1024px) {
  .lg\:block { display: block !important; }
  .lg\:inline-block { display: inline-block !important; }
  .lg\:flex { display: flex !important; }
  .lg\:hidden { display: none !important; }
  .lg\:col-span-1 { grid-column: span 1 / span 1 !important; }
  .lg\:col-span-2 { grid-column: span 2 / span 2 !important; }
  .lg\:col-span-3 { grid-column: span 3 / span 3 !important; }
  .lg\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .lg\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .lg\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .lg\:col-span-8 { grid-column: span 8 / span 8 !important; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
}

.gap-2 { gap: 8px !important; }
.gap-2\.5 { gap: 10px !important; }
.gap-3 { gap: 12px !important; }

@media (min-width: 1280px) {
  .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
}

/* ==========================================================================
   GAME DETAILS SIDEBAR: RECOMMENDED TILES (DIRECTION A - POKI 2-COL MOSAIC)
   ========================================================================== */

.fmj-rec-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .fmj-rec-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (min-width: 1024px) {
  .fmj-rec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

.fmj-rec-tile {
  position: relative;
  border-radius: var(--fmj-radius-md, 12px);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #121520;
  border: 1px solid var(--fmj-border, #1f2738);
  display: block;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.2s ease,
              box-shadow 0.25s ease;
}

.fmj-rec-tile:hover {
  transform: translateY(-2px);
  border-color: var(--fmj-primary, #00f0a8);
  box-shadow: 0 8px 22px rgba(0, 240, 168, 0.22);
}

.fmj-rec-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.fmj-rec-tile:hover .fmj-rec-tile-img {
  transform: scale(1.06);
}

.fmj-rec-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(6, 9, 15, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px 10px;
  pointer-events: none;
}

.fmj-rec-tile-name {
  font-size: 11.5px;
  font-weight: 750;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.fmj-rec-tile:hover .fmj-rec-tile-name {
  color: var(--fmj-primary, #00f0a8);
}

.fmj-rec-tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 10px;
  color: #94a3b8;
  font-family: var(--fmj-font-mono, monospace);
  font-weight: 600;
}

.fmj-rec-tile-play {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 240, 168, 0.92);
  color: #062419;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.fmj-rec-tile:hover .fmj-rec-tile-play {
  opacity: 1;
  transform: scale(1);
}

