/* =========================================
   GAMELOVERZ-STYLE — COMPLETE REDESIGN
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --bg: #0B0E14;
  --bg-card: #151922;
  --bg-sidebar: #111318;
  --bg-hover: #1a1f2b;
  --accent: #8B5CF6;
  --accent2: #EC4899;
  --text: #F1F2F4;
  --muted: #8891A4;
  --border: rgba(255, 255, 255, 0.07);
  --rail-w: 56px;
  /* collapsed icon-only rail */
  --sidebar-w: 230px;
  /* expanded sidebar with text */
  --header-h: 64px;
  --strip-h: 44px;
}

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

html {
  background: var(--bg);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg) !important;
  color: var(--text) !important;
  min-height: 100vh;
  overflow-x: hidden;
}

/* scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #2a2d3e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ================================================
   TOP HEADER
   ================================================ */
.gl-header {
  position: relative;
  height: var(--header-h);
  background: #12151e;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  z-index: 300;
  margin-left: var(--rail-w);
}

/* Header Navigation (Dynamic) */
.gl-nav-top {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-right: 24px;
  white-space: nowrap;
  list-style: none; /* In case CMS uses <li> */
}

.gl-header-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.2s;
}

.gl-header-link:hover {
  color: var(--text);
}

.gl-nav-top li {
  display: inline-block;
}

/* Hamburger */
.gl-hamburger {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
  transition: background .2s;
}

.gl-hamburger:hover {
  background: rgba(255, 255, 255, 0.06);
}

.gl-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: background .2s;
}

.gl-hamburger:hover span {
  background: var(--text);
}

/* Logo */
.gl-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.gl-logo img {
  height: 36px;
  width: auto;
}

/* Search */
.gl-search {
  flex: 1;
  max-width: 320px;
  margin: 0 20px 0 auto;
  position: relative;
}

.gl-search input {
  width: 100%;
  height: 42px;
  background: #1c2030;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: 0 44px 0 18px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
}

.gl-search input::placeholder {
  color: var(--muted);
}

.gl-search input:focus {
  border-color: var(--accent);
  background: #1f2438;
}

.gl-search button {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color .2s;
}

.gl-search button:hover {
  color: var(--accent);
}

/* Auth */
.gl-auth {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gl-auth .btn-login {
  padding: 8px 22px;
  border-radius: 50px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}

.gl-auth .btn-login:hover {
  background: #7C3AED;
  transform: translateY(-1px);
}

/* ================================================
   INFO STRIP
   ================================================ */
.gl-strip {
  position: relative;
  height: var(--strip-h);
  background: #0d1019;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  z-index: 290;
  overflow: hidden;
  margin-left: var(--rail-w);
}

.gl-strip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.gl-strip-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.gl-strip-item strong {
  color: var(--text);
}

@media (max-width: 640px) {
  .gl-strip {
    gap: 16px;
  }

  .gl-strip-item.hide-sm {
    display: none;
  }
}

/* ================================================
   SIDEBAR OVERLAY BACKDROP
   ================================================ */
.gl-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 250;
  cursor: pointer;
}

.gl-overlay.active {
  display: block;
}

/* ================================================
   SIDEBAR  (icon rail always, text on expand)
   ================================================ */
.gl-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow: hidden;
  z-index: 260;
  transition: width .28s cubic-bezier(.4, 0, .2, 1);
  will-change: width;
}

.gl-sidebar-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

/* When expanded (class "open" added by JS or on hover) */
.gl-sidebar.open,
.gl-sidebar:hover {
  width: var(--sidebar-w);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  z-index: 400;
}

.gl-sidebar.open .gl-nav-link .nav-label,
.gl-sidebar:hover .gl-nav-link .nav-label {
  width: auto;
  opacity: 1;
}

.gl-sidebar.open .gl-nav-section-title,
.gl-sidebar:hover .gl-nav-section-title {
  display: block;
}

.gl-sidebar.open .gl-nav-divider,
.gl-sidebar:hover .gl-nav-divider {
  display: block;
}

.gl-sidebar.open .gl-sidebar-tags,
.gl-sidebar:hover .gl-sidebar-tags {
  display: flex;
}

/* ── Nav Items ── */
.gl-sidebar-nav {
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

.gl-sidebar-section {
  padding: 0;
  margin-bottom: 20px;
}

.gl-sidebar-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 20px 20px 10px;
  opacity: 0;
  transition: opacity .2s;
  white-space: nowrap;
  overflow: hidden;
}

.gl-sidebar.open .gl-sidebar-title,
.gl-sidebar:hover .gl-sidebar-title {
  opacity: 0.6;
}

.gl-nav-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .6;
  padding: 14px 0 6px 18px;
  white-space: nowrap;
  overflow: hidden;
  display: none;
  /* hidden in collapsed rail */
}

.gl-sidebar.open .gl-nav-section-title {
  display: block;
}

.gl-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 12px;
  display: none;
}

.gl-sidebar.open .gl-nav-divider {
  display: block;
}

/* nav link */
.gl-nav-link {
  display: flex;
  align-items: center;
  padding: 0;
  height: 46px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: all .2s;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  border-left: 3px solid transparent;
}

.gl-nav-link:hover {
  color: var(--text);
  background: rgba(139, 92, 246, 0.07);
}

.gl-nav-link.active {
  color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
  border-left-color: var(--accent);
}

.gl-nav-link .nav-icon {
  flex-shrink: 0;
  width: var(--rail-w);
  height: 46px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}

.gl-nav-link .nav-icon svg,
.gl-nav-link .nav-icon i {
  width: 20px;
  height: 20px;
  display: block;
  margin: 0 auto;
}

/* Optical alignment for emojis to match SVGs */
.gl-nav-link .nav-icon:not(:has(svg)) {
  padding-left: 1px;
}

.gl-nav-link .nav-label {
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
  white-space: nowrap;
  margin-left: 4px;
}

.gl-sidebar.open .gl-nav-link .nav-label,
.gl-sidebar:hover .gl-nav-link .nav-label {
  opacity: 1;
  visibility: visible;
}

.gl-sidebar.open .gl-nav-link .nav-label {
  width: auto;
  opacity: 1;
}

/* category icon thumbnails in sidebar */
.gl-nav-link .nav-thumb {
  font-size: 20px;
  line-height: 1;
}

/* tags in sidebar */
.gl-sidebar-tags {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 14px 14px;
}

.gl-sidebar.open .gl-sidebar-tags {
  display: flex;
}

.gl-sidebar-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 50px;
  background: rgba(139, 92, 246, 0.08);
  color: var(--muted);
  text-decoration: none;
  border: 1px solid rgba(139, 92, 246, 0.15);
  transition: all .18s;
  white-space: nowrap;
}

.gl-sidebar-tag:hover {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent);
  border-color: var(--accent);
}

/* ================================================
   MAIN CONTENT WRAPPER
   ================================================ */
.gl-body {
  padding-top: 0;
  margin-left: var(--rail-w);
  min-height: 100vh;
  transition: margin-left .28s cubic-bezier(.4, 0, .2, 1);
}

/* Push content when sidebar opens */
.gl-sidebar.open~.gl-body {
  /* optional: uncomment to push content right when sidebar opens */
  /* margin-left: var(--sidebar-w); */
}

@media (max-width: 768px) {
  .gl-sidebar {
    width: 0;
  }

  .gl-sidebar.open {
    width: 100%;
  }

  .gl-body, 
  .gl-footer,
  .gl-header,
  .gl-strip {
    margin-left: 0 !important;
  }

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

  .footer-widgets {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* ================================================
   INFO BAR (below hero, not fixed)
   ================================================ */
.gl-info-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 14px 20px;
  background: #0d1019;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.gl-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.gl-info-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ================================================
   HERO BANNER
   ================================================ */
.gl-hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: center;
  background: var(--bg);
}

.gl-hero-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  opacity: 0.28;
}

.gl-hero-grid>div {
  background-size: cover;
  background-position: center;
}

.gl-hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(11, 14, 20, 0.97) 0%, rgba(11, 14, 20, 0.78) 55%, rgba(11, 14, 20, 0.95) 100%);
}

.gl-hero-content {
  position: relative;
  z-index: 2;
  padding: 44px 32px;
  max-width: 580px;
}

.gl-hero-content h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 10px;
}

.gl-hero-content h1 .hl {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gl-hero-content p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ================================================
   SECTION LAYOUT
   ================================================ */
.gl-section {
  padding: 24px 20px 8px;
}

.gl-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.gl-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.gl-section-title svg,
.gl-section-title span.title-icon {
  color: var(--accent);
}

.gl-view-more {
  font-size: 12.5px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}

.gl-view-more:hover {
  color: #a78bfa;
  text-decoration: underline;
}

/* ================================================
   HORIZONTAL CATEGORY CAPSULE SLIDER
   ================================================ */
.gl-cat-track-wrap {
  position: relative;
  overflow: hidden;
  padding-bottom: 4px;
}

.gl-cat-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}

.gl-cat-track::-webkit-scrollbar {
  display: none;
}

/* Capsule pill */
.gl-cat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 50px;
  background: #1c2232;
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
  white-space: nowrap;
  user-select: none;
  scroll-snap-align: start;
}

.gl-cat-pill:hover {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  transform: translateY(-1px);
}

.gl-cat-pill.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.gl-cat-pill .p-emoji {
  font-size: 17px;
  line-height: 1;
}

/* Scroll arrows */
.gl-cat-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a1f2b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.gl-cat-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.gl-cat-arrow.left {
  left: 8px;
}

.gl-cat-arrow.right {
  right: 8px;
}

/* ================================================
   GAME GRID  (vertical auto-fill, used on category pages etc.)
   ================================================ */
.gl-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}

/* ================================================
   HORIZONTAL SCROLL GAME ROW  (home sections)
   7 cards visible, rest scroll horizontally
   ================================================ */
.gl-hscroll-wrap {
  width: 100%;
  position: relative;
}

.gl-hscroll-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #2a2d3e transparent;
  scroll-snap-type: x mandatory;
}

.gl-hscroll-track::-webkit-scrollbar {
  height: 4px;
}

.gl-hscroll-track::-webkit-scrollbar-track {
  background: transparent;
}

.gl-hscroll-track::-webkit-scrollbar-thumb {
  background: #2a2d3e;
  border-radius: 4px;
}

/*
  Card width = (viewport - sidebar - section-padding - 6 gaps) / 7
   sidebar      = var(--rail-w) = 56px
   section pad  = 20px × 2     = 40px
   6 gaps       = 12px × 6     = 72px
   total offset = 168px
*/
.gl-hscroll-track .kiz-game-card {
  flex: 0 0 calc((100vw - var(--rail-w) - 40px - 48px) / 7);
  min-width: 100px;
  max-width: 200px;
}

@media (max-width: 768px) {

  /* mobile: sidebar = 0, show ~3.5 cards so user can see there's more */
  .gl-hscroll-track .kiz-game-card {
    flex: 0 0 calc((100vw - 40px - 24px) / 3);
  }
}

/* ── Game card styles (moved here from inline in grid-2.php) ── */
.kiz-game-card {
  display: block;
  text-decoration: none;
}

.kiz-container {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #2A364F;
  border: 2px solid transparent;
  transition: all 0.3s ease-in-out;
  box-sizing: border-box;
  scroll-snap-align: start;
}

.kiz-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.kiz-game-card:hover .kiz-container {
  border-color: #3b82f6 !important;
  box-shadow:
    0 0 8px 1px rgba(59, 130, 246, 0.8),
    0 0 15px 3px rgba(37, 99, 235, 0.5),
    0 0 30px 6px rgba(29, 78, 216, 0.3) !important;
  transform: translateY(-3px);
}

.kiz-game-card:hover .kiz-img {
  transform: scale(1.05);
}

.kiz-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 10px;
}

.kiz-game-card:hover .kiz-overlay {
  opacity: 1;
}

.kiz-title {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* kiz card color match */
.kiz-container {
  background: var(--bg-card) !important;
}


/* ================================================
   SEO EXPLORE BLOCK (Above Footer)
   ================================================ */
.gl-bottom-seo {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}
.gl-seo-info {
  flex: 0 0 360px;
  background: #1c2030;
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 900px) {
  .gl-bottom-seo { flex-direction: column; }
  .gl-seo-info { flex: auto; }
}
.gl-seo-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.4;
}
.gl-seo-info p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.gl-seo-info a {
  font-size: 13px;
  color: #a78bfa;
  font-weight: 700;
  text-decoration: none;
}
.gl-seo-info a:hover {
  text-decoration: underline;
}

.gl-seo-tags-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.gl-seo-tags {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 40px) / 6);
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  height: 100%;
  padding: 4px;
  scroll-snap-type: x mandatory;
}
@media (max-width: 1200px) {
  .gl-seo-tags {
    grid-auto-columns: calc((100% - 32px) / 5);
  }
}
@media (max-width: 1000px) {
  .gl-seo-tags {
    grid-auto-columns: calc((100% - 24px) / 4);
  }
}
@media (max-width: 800px) {
  .gl-seo-tags {
    grid-auto-columns: calc((100% - 16px) / 3);
  }
}
@media (max-width: 600px) {
  .gl-seo-tags {
    grid-auto-columns: calc((100% - 16px) / 3);
  }
}
.gl-seo-tags::-webkit-scrollbar {
  display: none;
}
.gl-seo-tag {
  background: #1c2030;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 105px;
  min-height: 80px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  box-sizing: border-box;
  scroll-snap-align: start;
}
.gl-seo-tag:hover {
  background: #252a3f;
  transform: translateY(-2px);
}
.gl-seo-tag .seo-icon {
  font-size: 20px;
}
.gl-seo-tag .seo-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-top: auto;
  padding-top: 14px;
}
.gl-seo-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a1f2b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.gl-seo-arrow.left {
  left: 10px;
}
.gl-seo-arrow.right {
  right: 10px;
}
.gl-seo-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}
.gl-seo-arrow svg {
  width: 22px;
  height: 22px;
}

/* ================================================
   FOOTER
   ================================================ */
.gl-footer {
  background: #0d1019;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding: 36px 24px 20px;
  margin-left: var(--rail-w);
  transition: margin-left .28s cubic-bezier(.4, 0, .2, 1);
}

.gl-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}

.gl-footer-copy {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.gl-footer-copy a {
  color: var(--accent);
  text-decoration: none;
}

.gl-footer-copy a:hover {
  text-decoration: underline;
}

/* ================================================
   GAME PAGE
   ================================================ */
.gl-game-page {
  padding: 0 20px 40px;
}

.gl-game-layout {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.gl-game-main {
  flex: 1;
  min-width: 0;
}

/* Right Sidebar (CMS-controlled: ads, game lists, etc.) */
.gl-game-sidebar {
  flex: 0 0 280px;
  min-width: 0;
}

.gl-game-sidebar .widget {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.gl-game-sidebar .widget-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Style game grid cards inside sidebar */
.gl-game-sidebar .grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
}

/* Style vertical game list inside sidebar */
.gl-game-sidebar .space-y-4 > a .flex {
  padding: 8px !important;
  border-radius: 10px;
}

.gl-game-sidebar .space-y-4 > a .w-20 {
  width: 56px !important;
  height: 56px !important;
}

@media (max-width: 1024px) {
  .gl-game-sidebar {
    flex: 0 0 240px;
  }
}

@media (max-width: 768px) {
  .gl-game-layout {
    flex-direction: column;
  }

  .gl-game-sidebar {
    flex: auto;
    width: 100%;
  }
}

/* Game Player */
.gl-game-player {
  background: var(--bg-card);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.gl-game-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.gl-game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Game Info Bar */
.gl-game-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.gl-game-info-left {
  flex: 1;
  min-width: 0;
}

.gl-game-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gl-game-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.gl-game-info-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Vote / Fav buttons */
.gl-game-votes {
  display: flex;
  gap: 4px;
}

.gl-game-btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  font-size: 16px;
}

.gl-game-btn-icon svg {
  width: 18px;
  height: 18px;
}

.gl-game-btn-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}

.gl-game-btn-icon.active {
  color: #f43f5e;
  border-color: #f43f5e;
}

.gl-game-btn-icon.report {
  font-size: 14px;
}

/* Primary action buttons */
.gl-game-primary-btns {
  display: flex;
  gap: 6px;
}

.gl-game-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.gl-game-btn-primary:hover {
  background: #7C3AED;
  transform: translateY(-1px);
}

/* Content blocks (Description, Instructions, etc.) */
.gl-game-block {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.gl-game-block-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gl-game-block-content {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.gl-game-block-content p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.gl-game-block-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Tags / Categories list */
.gl-game-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gl-game-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.gl-game-tag:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.gl-game-tag.cat {
  background: rgba(139, 92, 246, 0.15);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .gl-game-page {
    padding: 0 10px 30px;
  }

  .gl-game-info-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .gl-game-title {
    font-size: 15px;
    white-space: normal;
  }

  .gl-game-info-right {
    width: 100%;
    justify-content: space-between;
  }

  .gl-game-primary-btns {
    flex: 1;
  }

  .gl-game-btn-primary {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
  }

  .gl-game-block {
    padding: 16px;
    border-radius: 10px;
  }
}

/* ================================================
   COMPAT — keep old PHP template classes working
   ================================================ */
main.min-h-screen {
  background: transparent !important;
}

body.bg-game-dark {
  background-color: var(--bg) !important;
}

.max-w-7xl {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* CMS nav menu in sidebar */
ul.gl-cms-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.gl-cms-nav li {
  position: relative;
}

a.gl-cms-nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 0 0 16px;
  height: 44px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color .18s, background .18s;
  white-space: nowrap;
  overflow: hidden;
}

a.gl-cms-nav-link:hover {
  color: var(--text);
  background: rgba(139, 92, 246, 0.07);
}

ul.gl-cms-sub {
  list-style: none;
  padding: 0 0 0 16px;
  background: rgba(0, 0, 0, 0.1);
}

/* labels hidden in collapsed rail, shown when open */
.gl-sidebar .gl-cms-nav-label {
  opacity: 0;
  transition: opacity .2s .05s;
}

.gl-sidebar.open .gl-cms-nav-label {
  opacity: 1;
}

/* ================================================
   HIDE-SHOW HELPERS
   ================================================ */
.gl-mobile-close {
  display: none !important;
}

@media (max-width: 768px) {
  .gl-mobile-hide {
    display: none !important;
  }
  .gl-mobile-close {
    display: flex !important;
    background: rgba(255, 255, 255, 0.04);
    color: #fca5a5 !important;
  }
  .gl-mobile-close .nav-icon {
    color: #fca5a5 !important;
  }
}
.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .gl-cat-arrow, .gl-seo-arrow {
    display: none !important;
  }
}