/* Zamunda.Games navigation and homepage leaderboard enhancements */
.zg-site-nav {
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.28);
}

.zg-main-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  margin-left: 0.15rem;
}

.zg-nav-item {
  position: relative;
  list-style: none;
}

.zg-nav-genres {
  position: relative;
}

.zg-nav-link,
.zg-genre-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.5rem 0.72rem;
  border-radius: 999px;
  color: rgb(203, 213, 225);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.zg-genre-trigger {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.zg-nav-link:hover,
.zg-genre-trigger:hover,
.zg-nav-genres:focus-within .zg-genre-trigger,
.zg-nav-genres:hover .zg-genre-trigger,
.zg-nav-genres.is-open .zg-genre-trigger {
  color: #fff;
  background: rgba(124, 58, 237, 0.16);
}

.zg-genre-trigger svg {
  width: 0.9rem;
  height: 0.9rem;
  opacity: 0.72;
}

.zg-nav-link-highlight {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(217, 70, 239, 0.88));
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.25);
}

.zg-nav-link-highlight:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 1), rgba(232, 121, 249, 0.94));
  transform: translateY(-1px);
}

.zg-genre-panel {
  position: fixed;
  top: 4.85rem;
  left: 50%;
  z-index: 80;
  width: min(980px, calc(100vw - 2rem));
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.zg-nav-genres:hover .zg-genre-panel,
.zg-nav-genres:focus-within .zg-genre-panel,
.zg-nav-genres.is-open .zg-genre-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.zg-genre-panel-inner {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.5rem;
  background: linear-gradient(145deg, rgba(15, 23, 41, 0.98), rgba(30, 42, 69, 0.98));
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.58), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
}

.zg-genre-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.85rem;
}

.zg-genre-kicker {
  color: #a78bfa;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.zg-genre-title {
  margin-top: 0.15rem;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.zg-genre-all {
  flex-shrink: 0;
  color: #c4b5fd;
  font-size: 0.84rem;
  font-weight: 800;
}

.zg-genre-all:hover {
  color: #fff;
}

.zg-genre-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 1.25rem 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.34);
  color: #94a3b8;
}

.zg-genre-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.92rem;
}

.zg-genre-search input::placeholder {
  color: #64748b;
}

.zg-genre-masonry {
  column-count: 4;
  column-gap: 0.95rem;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding: 0 1.25rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: #7c3aed rgba(15, 23, 42, 0.75);
}

.zg-genre-masonry::-webkit-scrollbar {
  width: 10px;
}

.zg-genre-masonry::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.75);
  border-radius: 999px;
}

.zg-genre-masonry::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b5cf6, #475569);
  border: 2px solid rgba(15, 23, 42, 0.75);
  border-radius: 999px;
}

.zg-genre-link {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  width: 100%;
  margin: 0 0 0.5rem;
  break-inside: avoid;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0.9rem;
  background: rgba(30, 42, 69, 0.72);
  color: #cbd5e1;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.zg-genre-link:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(124, 58, 237, 0.22);
  color: #fff;
}

.zg-genre-icon {
  font-size: 1.1rem;
}

.zg-genre-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 800;
}

.zg-genre-count {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
}

.zg-genre-empty {
  margin: 0 1.25rem 1.25rem;
  padding: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  color: #94a3b8;
  text-align: center;
}

.zg-mobile-nav-panel {
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.zg-mobile-quick-links {
  display: grid;
  gap: 0.5rem;
  margin: 0.25rem 0 1rem;
}

.zg-mobile-quick-links a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 1rem;
  background: rgba(30, 42, 69, 0.72);
  color: #e2e8f0;
  font-weight: 800;
}

.zg-mobile-quick-links a.zg-mobile-leaderboard {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(217, 70, 239, 0.8));
  color: #fff;
}

.zg-mobile-genres {
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 1.2rem;
  background: rgba(15, 23, 41, 0.6);
}

.zg-mobile-genres-title {
  margin-bottom: 0.75rem;
  color: #fff;
  font-weight: 900;
}

.zg-mobile-genre-search {
  margin: 0 0 0.85rem;
}

.zg-mobile-genre-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  max-height: 52vh;
  overflow: auto;
  padding-right: 0.15rem;
}

.zg-mobile-genre-link {
  display: grid;
  grid-template-columns: 1.25rem 1fr auto;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.7rem;
  border-radius: 0.9rem;
  background: rgba(30, 42, 69, 0.76);
  color: #e2e8f0;
}

.zg-mobile-genre-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.83rem;
}

.zg-mobile-genre-link em {
  color: #94a3b8;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.zg-home-lb-section {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 1rem;
  background:
    radial-gradient(circle at 12% 10%, rgba(124, 58, 237, 0.24), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(217, 70, 239, 0.14), transparent 28%),
    #0f1729;
}

.zg-home-lb-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 72%, transparent);
  pointer-events: none;
}

.zg-home-lb-section > .max-w-7xl {
  position: relative;
  z-index: 1;
}

.zg-home-lb-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}

.zg-home-lb-copy,
.zg-home-top-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1.6rem;
  background: linear-gradient(145deg, rgba(30, 42, 69, 0.86), rgba(15, 23, 41, 0.92));
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255,255,255,0.06);
}

.zg-home-lb-copy {
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

.zg-home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.2);
  color: #ddd6fe;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zg-home-lb-copy h2 {
  max-width: 720px;
  color: #fff;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.zg-home-lb-copy p {
  max-width: 680px;
  margin-top: 1rem;
  color: #cbd5e1;
  font-size: 1.02rem;
  line-height: 1.75;
}

.zg-home-lb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.zg-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 900;
}

.zg-home-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #d946ef);
  box-shadow: 0 16px 38px rgba(124, 58, 237, 0.3);
}

.zg-home-btn-secondary {
  color: #e2e8f0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(148, 163, 184, 0.13);
}

.zg-home-top-card {
  padding: 1rem;
}

.zg-home-top-title {
  margin-bottom: 0.75rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
}

.zg-home-player-row {
  display: grid;
  grid-template-columns: auto 2.1rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem;
  border-radius: 1rem;
  color: #e2e8f0;
  background: rgba(15, 23, 41, 0.58);
}

.zg-home-player-row + .zg-home-player-row {
  margin-top: 0.55rem;
}

.zg-home-player-rank {
  color: #facc15;
  font-weight: 900;
}

.zg-home-player-row img {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255,255,255,0.12);
}

.zg-home-player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.zg-home-player-row strong {
  min-width: 2.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #86efac;
  text-align: center;
}

.zg-home-top-card-empty p {
  color: #94a3b8;
  line-height: 1.65;
}

.zg-home-lb-games {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.zg-home-lb-game-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1.25rem;
  background: rgba(30, 42, 69, 0.84);
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.22);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.zg-home-lb-game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 26px 58px rgba(2, 6, 23, 0.32);
}

.zg-home-lb-game-thumb {
  position: relative;
  aspect-ratio: 1 / 0.72;
  overflow: hidden;
  background: #1e2a45;
}

.zg-home-lb-game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.zg-home-lb-game-card:hover .zg-home-lb-game-thumb img {
  transform: scale(1.05);
}

.zg-home-lb-game-thumb span {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 41, 0.82);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
}

.zg-home-lb-game-body {
  padding: 0.85rem;
}

.zg-home-lb-game-body h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 900;
}

.zg-home-lb-game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.zg-home-lb-game-meta span {
  padding: 0.26rem 0.46rem;
  border-radius: 999px;
  background: rgba(15, 23, 41, 0.56);
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 800;
}

@media (max-width: 1280px) {
  .zg-genre-masonry {
    column-count: 4;
  }
  .zg-nav-link,
  .zg-genre-trigger {
    padding-inline: 0.58rem;
    font-size: 0.78rem;
  }
  .zg-site-nav .search-bar input {
    width: 13rem;
  }
  .zg-home-lb-games {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .zg-genre-masonry {
    column-count: 3;
  }
  .zg-home-lb-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .zg-home-lb-section {
    padding: 3rem 1rem;
  }
  .zg-home-lb-games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .zg-home-lb-copy h2 {
    font-size: 2.35rem;
  }
}

@media (max-width: 420px) {
  .zg-mobile-genre-list,
  .zg-home-lb-games {
    grid-template-columns: 1fr;
  }
}
