/*
Theme Name: GameZone
Theme URI: https://yoursite.com
Description: A Poki-style games website theme. Clean, fast, and built for HTML5 and iFrame games.
Version: 1.0
Author: You
Author URI: https://yoursite.com
Text Domain: gamezone
*/

/* ===========================
   CSS VARIABLES
=========================== */
:root {
  --color-primary:    #6c3ce1;
  --color-accent:     #f97316;
  --color-bg:         #f0f0f5;
  --color-white:      #ffffff;
  --color-text:       #1a1a2e;
  --color-muted:      #888888;
  --color-border:     #e0e0e8;
  --color-hover-overlay: rgba(20, 10, 40, 0.82);
  --radius-card:      14px;
  --radius-pill:      20px;
  --nav-height:       56px;
  --font-main:        'Nunito', sans-serif;
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-main); }

/* ===========================
   NAVBAR
=========================== */
.site-nav {
  background: var(--color-white);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}
.nav-logo span { color: var(--color-accent); }

.nav-search-wrap {
  display: flex;
  align-items: center;
  background: var(--color-bg);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  gap: 6px;
  width: 180px;
}
.nav-search-wrap svg { width: 14px; height: 14px; stroke: var(--color-muted); flex-shrink: 0; }
.nav-search-wrap input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--color-text);
  width: 100%;
  font-family: var(--font-main);
}
.nav-search-wrap input::placeholder { color: var(--color-muted); }

.nav-right { margin-left: auto; }
.btn-signin {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn-signin:hover { opacity: 0.88; }

/* ===========================
   CATEGORY BAR
=========================== */
.category-bar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-pill {
  background: var(--color-bg);
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 13px;
  color: #555;
  font-family: var(--font-main);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  display: inline-block;
}
.cat-pill:hover,
.cat-pill.active {
  background: var(--color-primary);
  color: #fff;
}

/* ===========================
   MAIN CONTENT
=========================== */
.site-main { padding: 24px; max-width: 1400px; margin: 0 auto; }

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}
.section-see-all {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 600;
}
.section-see-all:hover { text-decoration: underline; }

/* ===========================
   GAMES GRID
=========================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

/* ===========================
   GAME CARD
=========================== */
.game-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  display: block;
}

.game-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

/* fallback when no image — colored bg with emoji/text */
.game-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  transition: transform 0.2s ease;
  background: #fde8ff;
}

.game-card:hover .game-card-thumb,
.game-card:hover .game-card-thumb-placeholder {
  transform: scale(1.06);
}

.game-card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--color-hover-overlay);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 8px 8px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card:hover .game-card-label,
.game-card:focus .game-card-label {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   SINGLE GAME PAGE
=========================== */
.game-single-main {
  max-width: 900px;
  margin: 0 auto;
}

/* Breadcrumb */
.game-breadcrumb {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 12px;
}
.game-breadcrumb a { color: var(--color-primary); }
.game-breadcrumb a:hover { text-decoration: underline; }
.game-breadcrumb span { color: var(--color-text); }

/* Player shell */
.game-player-shell {
  background: #111827;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
}
.game-player-area {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-player-area iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Player bar */
.game-player-bar {
  background: #1a1f2e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
}
.game-player-bar-title {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0f0;
}
.game-player-bar-actions { display: flex; gap: 8px; }
.game-pbar-btn {
  background: #2a3050;
  color: #a0a8c0;
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11px;
  font-family: var(--font-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
}
.game-pbar-btn:hover { background: #3a4060; color: #fff; }

/* Game meta info */
.game-meta-bar {
  background: var(--color-white);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  margin-bottom: 12px;
}
.game-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.game-meta-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}
.game-tag {
  background: var(--color-bg);
  color: #555;
  font-size: 11px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  text-decoration: none;
}
.game-tag-cat {
  background: #ede8ff;
  color: #5c3ab6;
}
.game-meta-desc {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
}

/* Ad slot — single, clearly labeled */
.game-ad-slot {
  background: var(--color-white);
  border: 1px dashed #c8c0e8;
  border-radius: 12px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin-bottom: 20px;
  text-align: center;
}
.game-ad-label {
  font-size: 10px;
  color: #b0a0cc;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: block;
}

/* Related games section */
.related-games-section { margin-bottom: 32px; }

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 40px;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .site-nav { padding: 0 14px; }
  .nav-search-wrap { width: 140px; }
  .site-main { padding: 14px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 8px; }
  .game-single-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); }
  .category-bar { padding: 8px 14px; }
}

/* ===========================
   GAME PLAY START SCREEN
=========================== */
.game-player-area {
  position: relative;
  overflow: hidden;
}
.game-frame-holder {
  width: 100%;
  height: 100%;
}
.game-start-screen {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111827;
  background-size: cover;
  background-position: center;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.game-start-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.game-play-btn {
  border: none;
  background: var(--color-primary);
  color: #fff;
  min-width: 150px;
  min-height: 56px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.game-play-btn:hover {
  transform: scale(1.04);
  opacity: 0.95;
}
.game-play-icon {
  font-size: 17px;
  line-height: 1;
}

@media (max-width: 480px) {
  .game-play-btn {
    min-width: 130px;
    min-height: 50px;
    padding: 12px 24px;
    font-size: 16px;
  }
}

/* ===========================
   PROFESSIONAL PLAY SCREEN UPGRADE
=========================== */
.game-start-screen {
  padding: 24px;
  background-color: #0b1020;
}
.game-start-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.12), transparent 32%),
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.42));
  pointer-events: none;
}
.game-start-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  max-width: 360px;
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(10, 14, 30, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}
.game-start-thumb {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.18);
}
.game-start-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-start-eyebrow {
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.game-start-title {
  color: #fff;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.12;
  font-weight: 900;
  text-shadow: 0 3px 14px rgba(0,0,0,0.4);
  margin-bottom: 8px;
}
.game-play-btn {
  position: relative;
  min-width: 178px;
  min-height: 62px;
  font-size: 19px;
  background: linear-gradient(135deg, var(--color-primary), #8b5cf6);
  box-shadow: 0 18px 38px rgba(92, 58, 182, 0.38), 0 8px 18px rgba(0,0,0,0.3);
  cursor: pointer;
}
.game-play-btn::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 2px solid rgba(255,255,255,0.2);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.game-play-btn:hover::after {
  opacity: 1;
  transform: scale(1);
}
.game-play-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 2px;
}

@media (max-width: 480px) {
  .game-start-screen { padding: 14px; }
  .game-start-content {
    width: 86%;
    padding: 18px 16px;
    border-radius: 20px;
  }
  .game-start-thumb {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }
  .game-start-title { font-size: 20px; }
  .game-play-btn {
    min-width: 156px;
    min-height: 54px;
    font-size: 17px;
  }
}


/* ===========================
   MOBILE GAME PORTAL MODE
=========================== */
@media (max-width: 768px) {
  .game-single-main {
    padding-left: 0;
    padding-right: 0;
  }

  .game-breadcrumb,
  .game-meta-bar,
  .game-ad-slot,
  .related-games-section {
    margin-left: 14px;
    margin-right: 14px;
  }

  .game-player-shell {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .game-player-area {
    min-height: 62vh;
    height: 62vh;
    border-radius: 0;
    background: #050816;
  }

  .game-player-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-radius: 0;
  }

  .game-start-screen {
    min-height: 62vh;
  }

  .game-start-content {
    width: min(88%, 360px);
    transform: translateY(-8px);
  }

  .game-play-btn {
    min-width: 190px;
    min-height: 64px;
    font-size: 19px;
  }
}

/* When the browser enters fullscreen, make the game fill the whole screen cleanly. */
.game-player-area:fullscreen,
.game-player-area:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  background: #000;
}

.game-player-area:fullscreen iframe,
.game-player-area:-webkit-full-screen iframe,
.game-player-area:fullscreen .game-frame-holder,
.game-player-area:-webkit-full-screen .game-frame-holder {
  width: 100vw !important;
  height: 100vh !important;
  border: 0;
}

.game-player-area:fullscreen .game-start-screen,
.game-player-area:-webkit-full-screen .game-start-screen {
  display: none;
}

@media (orientation: landscape) and (max-width: 900px) {
  .game-player-area {
    min-height: 78vh;
    height: 78vh;
  }
}


/* ===========================
   MOBILE FAKE FULLSCREEN OVERLAY
   More reliable on iPhone/Safari than real browser fullscreen.
=========================== */

.game-close-overlay-btn {
  display: none;
}

.game-play-btn {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  white-space: nowrap;
}

body.gamezone-overlay-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
}

@media (max-width: 768px) {
  .game-player-shell.game-overlay-mode {
    position: fixed;
    inset: 0;
    z-index: 999999;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    background: #000;
    overflow: hidden;
  }

  .game-player-shell.game-overlay-mode .game-player-area {
    width: 100vw;
    height: calc(100vh - 44px);
    height: calc(100dvh - 44px);
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 0;
    background: #000;
  }

  .game-player-shell.game-overlay-mode .game-frame-holder,
  .game-player-shell.game-overlay-mode iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
  }

  .game-player-shell.game-overlay-mode .game-player-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 44px;
    z-index: 1000000;
    padding: 6px 10px;
    border-radius: 0;
    background: rgba(8, 10, 18, 0.96);
  }

  .game-player-shell.game-overlay-mode .game-player-bar-title {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-player-shell.game-overlay-mode .game-close-overlay-btn {
    display: inline-flex;
    background: #fff;
    color: #111827;
    font-weight: 800;
  }

  .game-player-shell.game-overlay-mode .game-start-screen {
    display: none;
  }

  .game-start-content {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .game-play-btn {
    border-radius: 999px !important;
    padding: 0 28px !important;
    min-height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===========================
   POKI-STYLE HOMEPAGE UPGRADE
=========================== */
.home-section {
  margin-bottom: 30px;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 24px;
  align-items: center;
  min-height: 320px;
  margin-bottom: 28px;
  padding: 28px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(249,115,22,0.30), transparent 30%),
    linear-gradient(135deg, #1b1145 0%, #5c3ab6 48%, #8b5cf6 100%);
  box-shadow: 0 22px 60px rgba(55, 30, 120, 0.22);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,0.16), transparent 22%),
    linear-gradient(to bottom, rgba(255,255,255,0.06), rgba(0,0,0,0.10));
  pointer-events: none;
}

.home-hero-copy,
.home-hero-media {
  position: relative;
  z-index: 1;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-hero-title {
  max-width: 620px;
  color: #fff;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
  text-shadow: 0 10px 30px rgba(0,0,0,0.24);
}

.home-hero-text {
  max-width: 560px;
  color: rgba(255,255,255,0.82);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 14px;
}

.home-hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.home-hero-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.home-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.home-hero-play,
.home-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.home-hero-play {
  background: #fff;
  color: #4c2ab0;
  box-shadow: 0 16px 34px rgba(0,0,0,0.22);
}

.home-hero-secondary {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
}

.home-hero-play:hover,
.home-hero-secondary:hover {
  transform: translateY(-2px);
  opacity: 0.94;
}

.home-hero-media {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 32px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: 0 26px 70px rgba(0,0,0,0.34);
  border: 8px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.16);
}

.home-hero-media img,
.home-hero-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.home-hero-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 92px;
  background: rgba(255,255,255,0.18);
}

.home-hero-media:hover img,
.home-hero-media:hover .home-hero-placeholder {
  transform: scale(1.05);
}

.home-trending-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(118px, 150px);
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.home-trending-row .game-card {
  scroll-snap-align: start;
  box-shadow: 0 10px 24px rgba(30, 24, 70, 0.08);
}

.home-trending-row::-webkit-scrollbar {
  height: 8px;
}
.home-trending-row::-webkit-scrollbar-thumb {
  background: rgba(108, 60, 225, 0.22);
  border-radius: 999px;
}

.gamezone-pagination {
  text-align: center;
  margin-top: 24px;
}

.gamezone-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin: 3px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--color-border);
}

.gamezone-pagination .page-numbers.current,
.gamezone-pagination .page-numbers:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.gamezone-empty-state {
  color: var(--color-muted);
  padding: 40px 0;
  text-align: center;
}
.gamezone-empty-state a {
  color: var(--color-primary);
  font-weight: 800;
}

@media (max-width: 768px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 20px;
    gap: 18px;
    border-radius: 22px;
    margin-bottom: 22px;
  }

  .home-hero-copy {
    order: 2;
  }

  .home-hero-media {
    order: 1;
    width: min(72vw, 280px);
    margin: 0 auto;
    border-radius: 26px;
    border-width: 6px;
  }

  .home-hero-title {
    font-size: 34px;
  }

  .home-hero-text {
    font-size: 14px;
  }

  .home-hero-play,
  .home-hero-secondary {
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
  }

  .home-trending-row {
    grid-auto-columns: 108px;
    gap: 9px;
  }
}

@media (max-width: 480px) {
  .home-hero {
    padding: 16px;
    border-radius: 20px;
  }

  .home-hero-media {
    width: min(70vw, 220px);
  }

  .home-hero-title {
    font-size: 30px;
  }

  .home-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-hero-play,
  .home-hero-secondary {
    width: 100%;
  }
}

/* ===========================
   CLEAN HOMEPAGE POPULAR GRID
   First popular game is only slightly bigger.
=========================== */
.home-popular-section {
  margin-bottom: 28px;
}

.home-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
  margin-bottom: 8px;
}

.home-popular-grid .game-card {
  box-shadow: 0 10px 24px rgba(30, 24, 70, 0.08);
}

.home-popular-grid .game-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.home-popular-grid .game-card:first-child::after {
  content: "Popular";
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .home-popular-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
  }

  .home-popular-grid .game-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (max-width: 420px) {
  .home-popular-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .home-popular-grid .game-card:first-child::after {
    top: 7px;
    left: 7px;
    padding: 5px 8px;
    font-size: 10px;
  }
}

/* ================================
   Poki-style floating widget header
   ================================ */
.site-nav,
.category-bar {
  display: none !important;
}

.poki-widget {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 99999;
  width: 112px;
  height: 138px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  overflow: visible;
  box-shadow: 0 14px 35px rgba(8, 28, 60, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.poki-widget-logo {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #003a63;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  border-radius: 24px 24px 0 0;
}

.poki-widget-actions {
  height: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.poki-widget-icon {
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0b94f5;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.poki-widget-icon:first-child {
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom-left-radius: 24px;
}

.poki-widget-icon:last-child {
  border-bottom-right-radius: 24px;
}

.poki-widget-icon:hover {
  background: rgba(11, 148, 245, 0.08);
}

.poki-widget-icon:active {
  transform: scale(0.94);
}

.poki-widget-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.poki-search-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: 240px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 14px 35px rgba(8, 28, 60, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.poki-widget.search-open .poki-search-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.poki-search-panel input[type="search"] {
  width: 100%;
  height: 42px;
  border: 0;
  outline: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
}

.poki-search-panel input[type="search"]::placeholder {
  color: #64748b;
}

@media (max-width: 600px) {
  .poki-widget {
    top: 12px;
    left: 12px;
    width: 92px;
    height: 112px;
    border-radius: 20px;
  }

  .poki-widget-logo {
    height: 66px;
    font-size: 23px;
    border-radius: 20px 20px 0 0;
  }

  .poki-widget-actions {
    height: 46px;
  }

  .poki-widget-icon svg {
    width: 24px;
    height: 24px;
  }

  .poki-widget-icon:first-child {
    border-bottom-left-radius: 20px;
  }

  .poki-widget-icon:last-child {
    border-bottom-right-radius: 20px;
  }

  .poki-search-panel {
    width: min(260px, calc(100vw - 24px));
  }
}

/* ================================
   Layout safety for Poki widget
   Keeps the floating widget from covering game cards/content.
   ================================ */
.site-main {
  padding-left: 160px;
}

@media (max-width: 900px) {
  .site-main {
    padding-left: 128px;
  }
}

@media (max-width: 600px) {
  .site-main {
    padding: 138px 12px 22px 12px;
  }
}

/* ================================
   Poki-like grid integration for floating widget
   The widget floats over an intentional first grid space,
   while games continue beside it and below it.
   ================================ */
.site-main {
  padding-left: 24px !important;
  padding-right: 24px !important;
  padding-top: 20px !important;
}

.home-popular-section .section-header {
  padding-left: 132px;
  min-height: 18px;
}

.home-popular-grid::before {
  content: "";
  display: block;
  aspect-ratio: 1 / 1;
  grid-column: span 1;
  grid-row: span 1;
  pointer-events: none;
}

@media (max-width: 900px) {
  .site-main {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .home-popular-section .section-header {
    padding-left: 120px;
  }
}

@media (max-width: 600px) {
  .site-main {
    padding: 14px 12px 22px 12px !important;
  }

  .home-popular-section .section-header {
    padding-left: 104px;
    min-height: 38px;
    align-items: flex-start;
  }

  .home-popular-grid::before {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* =====================================================
   FINAL REFINEMENT: compact widget + spaced popular cards
===================================================== */
.poki-widget {
  width: 112px !important;
  height: 56px !important;
  top: 18px !important;
  left: 18px !important;
  border-radius: 18px !important;
  overflow: visible !important;
}
.poki-widget-logo { display: none !important; }
.poki-widget-actions {
  height: 56px !important;
  width: 100% !important;
  border-top: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}
.poki-widget-icon:first-child {
  border-bottom-left-radius: 18px !important;
  border-top-left-radius: 18px !important;
}
.poki-widget-icon:last-child {
  border-bottom-right-radius: 18px !important;
  border-top-right-radius: 18px !important;
}
.site-main {
  padding-top: 18px !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}
.home-popular-section .section-header {
  padding-left: 128px !important;
  min-height: 42px !important;
  align-items: center !important;
}
.home-popular-grid::before {
  grid-column: span 1 !important;
  grid-row: span 1 !important;
}
.home-popular-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  grid-auto-flow: dense !important;
  gap: 12px !important;
  margin-top: 8px !important;
}
.home-popular-grid .game-card:first-child,
.home-popular-grid .game-card:nth-child(2),
.home-popular-grid .game-card:nth-child(8),
.home-popular-grid .game-card:nth-child(14) {
  grid-column: auto !important;
  grid-row: auto !important;
}
.home-popular-grid .game-card:nth-child(2),
.home-popular-grid .game-card:nth-child(8),
.home-popular-grid .game-card:nth-child(14) {
  grid-column: span 2 !important;
  grid-row: span 2 !important;
}
.home-popular-grid .game-card:first-child::after { content: none !important; }
.home-popular-grid .game-card:nth-child(2)::after,
.home-popular-grid .game-card:nth-child(8)::after,
.home-popular-grid .game-card:nth-child(14)::after {
  content: "Popular";
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.games-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  grid-auto-flow: dense !important;
  gap: 12px !important;
  margin-top: 14px !important;
}
.games-grid .game-card:nth-child(2),
.games-grid .game-card:nth-child(8),
.games-grid .game-card:nth-child(14),
.games-grid .game-card:nth-child(20),
.games-grid .game-card:nth-child(26) {
  grid-column: span 2;
  grid-row: span 2;
}
@media (max-width: 600px) {
  .poki-widget {
    top: 12px !important;
    left: 12px !important;
    width: 96px !important;
    height: 48px !important;
    border-radius: 16px !important;
  }
  .poki-widget-actions { height: 48px !important; }
  .poki-widget-icon:first-child {
    border-bottom-left-radius: 16px !important;
    border-top-left-radius: 16px !important;
  }
  .poki-widget-icon:last-child {
    border-bottom-right-radius: 16px !important;
    border-top-right-radius: 16px !important;
  }
  .site-main { padding: 12px 10px 22px 10px !important; }
  .home-popular-section .section-header {
    padding-left: 108px !important;
    min-height: 48px !important;
  }
  .home-popular-grid,
  .games-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .home-popular-grid .game-card:nth-child(2),
  .home-popular-grid .game-card:nth-child(8),
  .home-popular-grid .game-card:nth-child(14),
  .games-grid .game-card:nth-child(2),
  .games-grid .game-card:nth-child(8),
  .games-grid .game-card:nth-child(14),
  .games-grid .game-card:nth-child(20),
  .games-grid .game-card:nth-child(26) {
    grid-column: span 2 !important;
    grid-row: span 2 !important;
  }
}

/* ===========================
   RECOMMENDED GAMES ON SINGLE GAME PAGE
   Desktop: right side panel. Mobile: row below game.
=========================== */
.game-single-main {
  max-width: 1180px !important;
}

.game-play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}

.game-play-layout .game-player-shell {
  margin-bottom: 0;
}

.game-suggestions-sidebar {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 14px;
}

.game-suggestions-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.game-suggestions-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c3aed;
}

.game-suggestions-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1;
  color: #111827;
}

.game-suggestions-list {
  display: grid;
  gap: 10px;
}

.suggestion-game-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #111827;
  text-decoration: none;
  border-radius: 14px;
  padding: 7px;
  background: #f8fafc;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.suggestion-game-card:hover,
.suggestion-game-card:focus {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.suggestion-thumb-wrap {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 13px;
  overflow: hidden;
  background: #eef2ff;
  flex: 0 0 auto;
}

.suggestion-thumb-wrap img,
.suggestion-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
}

.suggestion-thumb-placeholder {
  font-size: 24px;
}

.suggestion-game-title {
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 980px) {
  .game-single-main {
    max-width: 900px !important;
  }

  .game-play-layout {
    grid-template-columns: 1fr;
  }

  .game-suggestions-sidebar {
    position: static;
  }

  .game-suggestions-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .suggestion-game-card {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .suggestion-thumb-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 768px) {
  .game-play-layout {
    gap: 10px;
    margin-bottom: 12px;
  }

  .game-suggestions-sidebar {
    margin-left: 14px;
    margin-right: 14px;
    border-radius: 16px;
    padding: 12px 10px;
    overflow: hidden;
  }

  .game-suggestions-head {
    margin-bottom: 9px;
  }

  .game-suggestions-head h2 {
    font-size: 15px;
  }

  .game-suggestions-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .suggestion-game-card {
    flex: 0 0 96px;
    scroll-snap-align: start;
    padding: 6px;
    border-radius: 14px;
  }

  .suggestion-game-title {
    font-size: 12px;
  }
}

/* =====================================================
   DESKTOP GAME PAGE UPGRADE
   PC only: left suggestions + smaller center game + right ad/suggestions + bottom suggestions.
   Mobile keeps the previous recommendation row below the game.
===================================================== */
@media (min-width: 981px) {
  .game-single-main {
    max-width: 1320px !important;
  }

  .game-play-layout-pc {
    display: grid !important;
    grid-template-columns: 180px minmax(520px, 760px) 280px !important;
    gap: 18px !important;
    align-items: start !important;
    margin-bottom: 18px !important;
  }

  .game-play-layout-pc .game-player-shell {
    width: 100% !important;
    max-width: 760px !important;
    margin: 0 auto !important;
  }

  .game-play-layout-pc .game-player-area {
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .desktop-left-suggestions,
  .desktop-right-panel,
  .desktop-bottom-suggestions {
    display: block !important;
  }

  .desktop-left-suggestions,
  .right-suggestions-box {
    position: sticky !important;
    top: 18px !important;
  }

  .desktop-left-suggestions .game-suggestions-list,
  .right-suggestions-box .game-suggestions-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  .desktop-left-suggestions .suggestion-game-card,
  .right-suggestions-box .suggestion-game-card {
    grid-template-columns: 54px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 6px !important;
  }

  .desktop-left-suggestions .suggestion-thumb-wrap,
  .right-suggestions-box .suggestion-thumb-wrap {
    width: 54px !important;
    height: 54px !important;
    aspect-ratio: auto !important;
  }

  .desktop-left-suggestions .suggestion-game-title,
  .right-suggestions-box .suggestion-game-title {
    font-size: 12px !important;
  }

  .desktop-right-panel {
    display: grid !important;
    gap: 14px !important;
  }

  .game-side-ad-slot {
    min-height: 250px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed #c8c0e8;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  }

  .mobile-suggestions {
    display: none !important;
  }

  .desktop-bottom-suggestions {
    margin: 4px 0 18px !important;
  }

  .bottom-suggestions-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .bottom-suggestions-row .suggestion-game-card {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    padding: 8px !important;
  }

  .bottom-suggestions-row .suggestion-thumb-wrap {
    width: 72px !important;
    height: 72px !important;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .game-play-layout-pc {
    grid-template-columns: 155px minmax(480px, 1fr) 240px !important;
    gap: 14px !important;
  }

  .desktop-left-suggestions .suggestion-game-card,
  .right-suggestions-box .suggestion-game-card {
    grid-template-columns: 1fr !important;
  }

  .desktop-left-suggestions .suggestion-thumb-wrap,
  .right-suggestions-box .suggestion-thumb-wrap {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }
}

@media (max-width: 980px) {
  .desktop-left-suggestions,
  .desktop-right-panel,
  .desktop-bottom-suggestions {
    display: none !important;
  }

  .mobile-suggestions {
    display: block !important;
  }
}

/* =====================================================
   FINAL: clean top-left search only (profile removed)
===================================================== */
.poki-widget,
.poki-search-panel,
.poki-widget-actions,
.poki-widget-icon,
.poki-widget-logo {
  display: none !important;
}

.top-search-widget {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 99999;
  width: 230px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(8, 28, 60, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top-search-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b94f5;
  flex: 0 0 auto;
}

.top-search-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.top-search-widget input[type="search"] {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  min-width: 0;
}

.top-search-widget input[type="search"]::placeholder {
  color: #64748b;
  font-weight: 700;
}

.home-popular-section .section-header {
  padding-left: 250px !important;
  min-height: 56px !important;
}

@media (max-width: 600px) {
  .top-search-widget {
    top: 12px;
    left: 12px;
    width: 190px;
    height: 48px;
    border-radius: 16px;
    padding: 0 13px;
  }

  .top-search-widget input[type="search"] {
    font-size: 14px;
  }

  .home-popular-section .section-header {
    padding-left: 210px !important;
    min-height: 50px !important;
  }
}


/* Mobile fake fullscreen small exit button */
.mobile-game-exit-btn {
  display: none;
}

@media (max-width: 768px) {
  .game-player-shell.game-overlay-mode .mobile-game-exit-btn {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    z-index: 1000002;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    color: #111827;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .game-player-shell.game-overlay-mode .mobile-game-exit-btn span {
    transform: translateY(-1px);
  }
}

/* =====================================================
   Professional footer links
===================================================== */
.site-footer {
  margin-top: 48px;
  padding: 28px 20px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(246,248,252,0.98));
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-brand strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.footer-brand span {
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.footer-links a:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(8, 28, 60, 0.12);
}

.footer-bottom {
  max-width: 1180px;
  margin: 18px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .site-footer {
    margin-top: 34px;
    padding: 24px 14px 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
    width: 100%;
  }

  .footer-links a {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }
}

/* =====================================================
   Standard WordPress pages: About / Contact / Privacy / Terms
===================================================== */
.page-main {
  max-width: 980px;
  margin: 34px auto 0;
  padding: 0 20px;
}

.page-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 26px;
  padding: 34px;
  box-shadow: 0 18px 45px rgba(8, 28, 60, 0.08);
}

.page-header {
  margin-bottom: 22px;
}

.page-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.page-content {
  color: #334155;
  font-size: 17px;
  line-height: 1.8;
}

.page-content p,
.page-content ul,
.page-content ol {
  margin-top: 0;
  margin-bottom: 18px;
}

.page-content h2,
.page-content h3 {
  color: #0f172a;
  margin-top: 30px;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-content a {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .page-main {
    margin-top: 24px;
    padding: 0 14px;
  }

  .page-card {
    border-radius: 20px;
    padding: 24px 18px;
  }

  .page-content {
    font-size: 16px;
    line-height: 1.75;
  }
}

/* =====================================================
   Home link + search widget: lets legal pages return to games
===================================================== */
.top-nav-widget {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-home-link {
  height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(8, 28, 60, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.top-home-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(8, 28, 60, 0.18);
}

.top-home-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  color: #0b94f5;
}

.top-home-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.top-search-widget {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: 230px;
}

.home-popular-section .section-header {
  padding-left: 355px !important;
}

.page-back-home {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #eef6ff;
  color: #0b94f5;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.page-back-home:hover {
  background: #dbeeff;
  text-decoration: none !important;
}

@media (max-width: 600px) {
  .top-nav-widget {
    top: 12px;
    left: 12px;
    gap: 8px;
  }

  .top-home-link {
    height: 48px;
    padding: 0 12px;
    border-radius: 16px;
  }

  .top-home-text {
    display: none;
  }

  .top-search-widget {
    width: 180px;
  }

  .home-popular-section .section-header {
    padding-left: 248px !important;
  }
}

/* Strong SEO footer */
.seo-footer {
  margin-top: 56px;
  padding: 0;
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.18), transparent 34%), #07111f;
  color: #cbd5e1;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-seo-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 22px 28px;
}

.footer-seo-block {
  max-width: 940px;
  margin: 0 auto 34px;
  text-align: center;
}

.footer-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-seo-block h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.footer-seo-block p:not(.footer-kicker) {
  margin: 0 auto 14px;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.8;
}

.footer-category-block,
.footer-search-block {
  margin-top: 28px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.footer-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 900;
}

.footer-section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.38), transparent);
}

.footer-category-list,
.footer-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-category-pill,
.footer-keyword-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.footer-category-pill:hover,
.footer-keyword-list a:hover {
  transform: translateY(-2px);
  background: #2563eb;
  color: #fff;
}

.footer-category-pill-disabled {
  opacity: 0.72;
  cursor: default;
}

.footer-category-pill-disabled:hover {
  transform: none;
  background: rgba(30, 41, 59, 0.92);
}

.footer-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.seo-footer .footer-brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.seo-footer .footer-brand strong {
  color: #fff;
  font-size: 18px;
}

.seo-footer .footer-brand span {
  color: #94a3b8;
  font-size: 13px;
}

.seo-footer .footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.seo-footer .footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.seo-footer .footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.seo-footer .footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 16px 22px 22px;
  text-align: center;
}

.seo-footer .footer-bottom p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 768px) {
  .footer-seo-wrap {
    padding: 36px 16px 24px;
  }

  .footer-seo-block {
    text-align: left;
  }

  .footer-seo-block h2 {
    font-size: 25px;
  }

  .footer-seo-block p:not(.footer-kicker) {
    font-size: 14px;
    line-height: 1.72;
  }

  .footer-category-block,
  .footer-search-block {
    padding: 18px;
    border-radius: 20px;
  }

  .footer-main-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .seo-footer .footer-links {
    justify-content: flex-start;
  }
}


/* =====================================================
   Compact search on gameplay pages only
   Homepage keeps the normal search widget.
===================================================== */
.gameplay-search-widget {
  display: none;
}

body.single-game .top-nav-widget {
  display: none;
}

body.single-game .gameplay-search-widget {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100000;
  display: flex;
  align-items: center;
  height: 46px;
  width: 46px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(8, 28, 60, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: width 0.2s ease, box-shadow 0.2s ease;
}

body.single-game .gameplay-search-widget:focus-within,
body.single-game .gameplay-search-widget:hover {
  width: 205px;
  box-shadow: 0 16px 38px rgba(8, 28, 60, 0.2);
}

.gameplay-search-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #0b94f5;
  cursor: pointer;
}

.gameplay-search-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.gameplay-search-widget input[type="search"] {
  min-width: 0;
  width: 145px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.gameplay-search-widget input[type="search"]::placeholder {
  color: #64748b;
}

@media (max-width: 768px) {
  body.single-game .gameplay-search-widget {
    top: 10px;
    left: 10px;
    height: 42px;
    width: 42px;
  }

  body.single-game .gameplay-search-widget:focus-within,
  body.single-game .gameplay-search-widget:hover {
    width: 178px;
  }

  .gameplay-search-icon {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .gameplay-search-icon svg {
    width: 19px;
    height: 19px;
  }

  .gameplay-search-widget input[type="search"] {
    width: 120px;
    font-size: 13px;
  }
}
