.home-showcase {
  padding: 38px 0;
}

/* ============================================================
   RECREATED HERO SECTION MATCHING SCREENSHOT EXACTLY
   ============================================================ */
.hero {
  display: block !important;
  flex-direction: initial !important;
  justify-content: initial !important;
  align-items: initial !important;
  min-height: auto !important;
  padding: 32px 0 16px !important;
  position: relative;
}
.hero:after { display: none !important; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 580px;
}

.hero-copy h1 {
  font-size: clamp(34px, 3.9vw, 50px);
  line-height: 1.04;
  letter-spacing: -.03em;
  margin: 0 0 16px;
  font-weight: 900;
  color: #1A1C1E;
  text-transform: uppercase;
}

.hero-copy h1 .highlight-orange {
  color: #FF5E2B;
}

.hero-copy > p {
  max-width: 520px;
  color: #6B7280;
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0 0 24px;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 28px;
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-radius: 14px;
  background: #FF5E2B;
  color: #FFFFFF !important;
  border: 0;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
  box-shadow: 0 8px 20px -4px rgba(255, 94, 43, 0.4);
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -4px rgba(255, 94, 43, 0.55);
  background: #f04e1c;
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 24px;
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-radius: 14px;
  background: #FFFFFF;
  color: #FF5E2B !important;
  border: 2px solid #FF5E2B;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

.hero-btn-secondary:hover {
  transform: translateY(-2px);
  background: #FFF5F1;
}

/* Feature Badges */
.hero-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #1A1C1E;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.badge-icon {
  font-size: 13px;
}

/* RIGHT SIDE ARTWORK SHOWCASE */
.hero-visual {
  position: relative;
  height: 330px;
  width: 100%;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  width: 88%;
  height: 85%;
  background: linear-gradient(135deg, #FFA272 0%, #FF7E45 100%);
  border-radius: 28px 48px 28px 28px;
  z-index: 1;
  pointer-events: none;
}

.hero-art-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.hero-card {
  position: absolute;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .35s ease;
  text-decoration: none;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 20px 42px rgba(0,0,0,0.22);
  z-index: 10 !important;
}

/* Specific Positions matching screenshot */
.card-amongus {
  top: 15px;
  left: 25px;
  width: 100px;
  height: 100px;
  border-radius: 26px;
  z-index: 4;
}

.card-minecraft {
  top: 10px;
  left: 140px;
  width: 165px;
  height: 230px;
  border-radius: 24px;
  z-index: 5;
}

.card-motox3m {
  top: 15px;
  right: 15px;
  width: 150px;
  height: 110px;
  border-radius: 22px;
  z-index: 3;
}

.card-subway {
  bottom: 15px;
  left: 55px;
  width: 155px;
  height: 115px;
  border-radius: 22px;
  z-index: 4;
}

.card-fruit {
  bottom: 15px;
  right: 25px;
  width: 115px;
  height: 115px;
  border-radius: 26px;
  z-index: 4;
}

/* Tighten spacing to popular section */
#popular.home-showcase {
  padding-top: 12px !important;
}

/* Compact search / catalog controls */
.compact-search {
  height: 44px !important;
  max-width: 260px !important;
  flex: 0 0 auto !important;
  box-shadow: none !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  gap: 10px !important;
}

.compact-search span {
  font-size: 18px !important;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.compact-random {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 16px;
  color: var(--lime);
  background: #FFF0EB;
  border-color: rgba(255,87,34,.3);
}

.compact-random:hover {
  background: var(--lime);
  color: #FFFFFF;
  border-color: var(--lime);
}

#games.catalog .controls {
  align-items: center;
  gap: 12px;
}

#games.catalog .controls .chips {
  flex: 1 1 auto;
  min-width: 0;
}

/* RESPONSIVE DESIGN (320px, 375px, 390px, 430px, 768px, 1024px) */
@media (min-width: 769px) and (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px; }
  .hero-copy h1 { font-size: 34px; }
  .hero-visual { height: 290px; }
  .card-minecraft { width: 140px; height: 195px; left: 120px; }
  .card-amongus { width: 85px; height: 85px; left: 20px; }
  .card-motox3m { width: 130px; height: 95px; }
  .card-subway { width: 135px; height: 98px; left: 45px; }
  .card-fruit { width: 100px; height: 100px; }
}

@media (max-width: 1100px) {
  #games.catalog .controls { flex-wrap: wrap; align-items: flex-start; }
  .compact-search { max-width: none !important; width: 100% !important; }
  #games.catalog .controls .chips { width: 100%; order: 2; }
  .controls-right { order: 3; width: 100%; justify-content: space-between; }
  .controls-right select { flex: 1; }
}

@media (max-width: 768px) {
  .hero { padding: 20px 0 10px !important; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-copy { max-width: 100%; text-align: left; }
  .hero-copy h1 { font-size: clamp(26px, 7vw, 36px); margin-bottom: 12px; }
  .hero-copy > p { font-size: 14px; margin-bottom: 18px; }
  .hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin-bottom: 18px;
  }
  .hero-btn-primary, .hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(88%, 320px);
    height: 46px;
    min-height: 46px;
    padding: 0 16px;
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-radius: 13px;
    text-align: center;
    box-sizing: border-box;
    margin: 0 auto;
    flex: none;
  }
  .hero-btn-primary {
    background: #FF5E2B;
    color: #FFFFFF !important;
    border: 0;
    box-shadow: 0 4px 14px rgba(255, 94, 43, 0.3);
  }
  .hero-btn-primary:active {
    transform: scale(0.98);
    background: #f04e1c;
  }
  .hero-btn-secondary {
    background: #FFFFFF;
    color: #FF5E2B !important;
    border: 1px solid rgba(255, 94, 43, 0.45);
    box-shadow: none;
    font-weight: 700;
  }
  .hero-btn-secondary:active {
    transform: scale(0.98);
    background: #FFF5F1;
  }
  .hero-badges { gap: 8px; }
  .badge-item { padding: 5px 11px; font-size: 10px; }

  .hero-visual { height: 180px; margin-top: 5px; }
  .hero-backdrop { width: 95%; height: 90%; }
  .card-amongus { width: 70px; height: 70px; top: 10px; left: 10px; }
  .card-minecraft { width: 110px; height: 150px; top: 10px; left: 90px; }
  .card-motox3m { width: 110px; height: 80px; top: 10px; right: 10px; }
  .card-subway { width: 115px; height: 82px; bottom: 10px; left: 30px; }
  .card-fruit { width: 80px; height: 80px; bottom: 10px; right: 15px; }
}

@media (max-width: 430px) {
  .hero { padding: 16px 0 8px !important; }
  .hero-copy h1 { font-size: 26px; }
  .hero-copy > p { font-size: 13px; margin-bottom: 14px; }
  .hero-actions { flex-direction: column; width: 100%; gap: 10px; align-items: center; }
  .hero-btn-primary, .hero-btn-secondary { width: min(88%, 310px); height: 46px; min-height: 46px; justify-content: center; }
  .hero-badges { gap: 6px; justify-content: flex-start; }
  .badge-item { padding: 4px 9px; font-size: 9.5px; }
  .hero-visual { height: 160px; }
  .card-amongus { width: 60px; height: 60px; top: 8px; left: 5px; }
  .card-minecraft { width: 95px; height: 135px; top: 8px; left: 70px; }
  .card-motox3m { width: 95px; height: 70px; top: 8px; right: 5px; }
  .card-subway { width: 100px; height: 72px; bottom: 8px; left: 20px; }
  .card-fruit { width: 70px; height: 70px; bottom: 8px; right: 8px; }
}

@media (max-width: 375px) {
  .hero-copy h1 { font-size: 24px; }
  .hero-copy > p { font-size: 12.5px; }
  .hero-btn-primary, .hero-btn-secondary { width: min(90%, 290px); height: 45px; min-height: 45px; font-size: 12px; }
  .hero-visual { height: 145px; }
  .card-minecraft { width: 85px; height: 120px; left: 60px; }
  .card-subway { width: 90px; height: 65px; }
  .card-motox3m { width: 85px; height: 62px; }
  .card-amongus { width: 52px; height: 52px; }
  .card-fruit { width: 60px; height: 60px; }
}

@media (max-width: 320px) {
  .hero-copy h1 { font-size: 22px; }
  .hero-copy > p { font-size: 12px; }
  .hero-btn-primary, .hero-btn-secondary { width: min(92%, 270px); height: 44px; min-height: 44px; font-size: 11.5px; padding: 0 10px; }
  .badge-item { font-size: 9px; padding: 3px 7px; }
}


.home-showcase + .home-showcase {
  padding-top: 18px;
}

.section-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-link:hover {
  color: var(--lime);
}

.section-copy {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.hero-ad-row {
  display: grid;
  grid-template-columns: minmax(600px, 970px) minmax(350px, 1fr);
  gap: 24px;
  width: 100%;
  margin: 22px 0 28px;
  align-items: stretch;
}

.hero-ad-row .ad-home { margin: 0; width: 100%; }
.hero-popular { height: 250px; padding: 15px; overflow: hidden; background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; }
.hero-popular-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.hero-popular-head h2 { margin: 3px 0 0; font-size: 18px; letter-spacing: -.03em; }
.hero-popular-head a { display: grid; place-items: center; width: 30px; height: 30px; background: var(--panel2); border-radius: 9px; color: var(--lime); }
.hero-popular .game-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.hero-popular .cover-wrap { aspect-ratio: 16 / 9; border-radius: 9px; }
.hero-popular .cover-wrap::after,.hero-popular .fav-dot { display: none; }
.hero-popular .card-text { padding: 5px 1px 0; }
.hero-popular .card-text strong { font-size: 9px; }
.hero-popular .card-text span { display: none; }

@media (max-width: 720px) {
  .home-showcase { padding: 28px 0; }
  .hero-ad-row { grid-template-columns: 1fr; }
  .hero-popular { height: auto; }
  .hero .search-row { align-items: stretch; }
  .hero .search-row .search { max-width: none; }
  .hero .search-row .stats { margin: 8px 0 0; justify-content: space-between; }
  .hero .search-row .stats div { padding-left: 0; border-left: 0; }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .hero-ad-row { grid-template-columns: 1fr; }
  .hero-popular { height: auto; }
  .hero-popular .game-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .hero .search-row { flex-wrap: wrap; }
  .hero .search-row .stats { width: 100%; margin: 10px 0 0; }
}

/* Compact toolbar layout for search actions and site statistics */
.hero .search-row .search { max-width: 440px; }
.hero .search-row .primary { min-width: 166px; }
.hero .search-row .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 384px;
  height: 58px;
  margin: 0;
  padding: 0 6px;
  gap: 0;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.hero .search-row .stats div {
  min-width: 0;
  width: 100%;
  height: 34px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-left: 1px solid var(--line);
}
.hero .search-row .stats div:first-child { border-left: 0; }
.hero .search-row .stats strong { width:100%; font-size: 17px; line-height: 1; text-align:center; }
.hero .search-row .stats span { width:100%; margin-top: 4px; font-size: 8px; text-align:center; }

@media (max-width: 1100px) {
  .hero .search-row .stats { width:100%; margin-top: 10px; }
}

@media (max-width: 720px) {
  .hero .search-row .primary { width: 100%; }
  .hero .search-row .stats { width: 100%; height: 64px; }
  .hero .search-row .stats div { min-width: 0; flex: 1; padding: 0 8px; border-left: 1px solid var(--line); }
  .hero .search-row .stats div:first-child { border-left: 0; }
}


/* AI Game Finder + tightened homepage spacing */
.ai-finder{width:100%;margin-top:10px;margin-bottom:8px;padding:18px 20px;display:grid;grid-template-columns:minmax(220px,.72fr) minmax(420px,1.28fr);gap:24px;align-items:center;background:#FFFFFF;border:1px solid var(--line);border-radius:18px}.ai-finder h2{margin:5px 0 7px;font-size:22px;letter-spacing:-.04em}.ai-finder p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.ai-input-row{display:flex;gap:10px}.ai-input-row input{min-width:0;flex:1;height:52px;padding:0 16px;color:var(--text);background:#F4F2EE;border:1px solid var(--line);border-radius:13px;outline:0}.ai-input-row input:focus{border-color:var(--lime)}.ai-input-row .primary{height:52px;white-space:nowrap}.ai-suggestions{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.ai-suggestions button{padding:7px 10px;border-radius:99px;font-size:10px;color:var(--muted);background:#F4F2EE}.ai-suggestions button:hover{color:var(--text);border-color:#53617a}.ai-status{min-height:18px;margin-top:8px;color:var(--muted);font-size:11px}.ai-results{margin-top:12px;grid-template-columns:repeat(6,minmax(0,1fr))}.ai-results .card-text span{display:none}
/* Search/AI area -> Popular Games */
.ai-finder + #popular,#popular{scroll-margin-top:80px}section:has(.ai-finder){padding-bottom:8px!important}#popular.home-showcase{padding-top:10px!important;padding-bottom:8px!important;margin-top:0!important}
/* Popular Games -> All Games */
#popular + .catalog{padding-top:10px!important;margin-top:0!important}
@media(max-width:900px){.ai-finder{grid-template-columns:1fr}.ai-results{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:720px){.ai-finder{padding:16px;margin-top:8px;margin-bottom:5px;gap:14px}.ai-input-row{flex-direction:column}.ai-input-row .primary{width:100%}.ai-results{grid-template-columns:repeat(3,minmax(0,1fr))}section:has(.ai-finder){padding-bottom:5px!important}#popular.home-showcase{padding-top:7px!important;padding-bottom:5px!important}#popular + .catalog{padding-top:7px!important}}
/* v22 spacing + AI reason text */
.search-row{margin-bottom:8px!important}
.ai-finder{margin-top:6px!important;margin-bottom:4px!important}
#popular.home-showcase{padding-top:6px!important;padding-bottom:5px!important;margin-top:0!important}
#popular + .catalog{padding-top:7px!important;margin-top:0!important}
.ai-results .card-text .ai-reason{display:block;margin-top:4px;font-size:9px;line-height:1.35;color:var(--muted);font-weight:500}
.ai-input-row .primary:disabled{opacity:.65;cursor:wait}
@media(max-width:720px){.search-row{margin-bottom:5px!important}.ai-finder{margin-top:4px!important;margin-bottom:3px!important}#popular.home-showcase{padding-top:5px!important;padding-bottom:4px!important}#popular + .catalog{padding-top:5px!important}}


/* v26 homepage polish */
.hero .search-row .search{
  border-color:rgba(255,255,255,.13);
  background:#FFFFFF;
}
.hero .search-row .search:focus-within{
  border-color:rgba(157,255,99,.62);
  box-shadow:0 0 0 3px rgba(157,255,99,.07);
}
.ai-finder{
  border-color:rgba(255,255,255,.12);
  box-shadow:0 14px 36px rgba(0,0,0,.12);
}
.ai-suggestions button{
  color:var(--text);
  border-color:rgba(255,255,255,.10);
}
.ai-suggestions button:hover{
  color:var(--lime);
  border-color:rgba(157,255,99,.38);
  background:rgba(157,255,99,.07);
}

/* v28 verified centered 970x250 advertising */
.ad-slot-center{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  margin:12px auto 14px;
  overflow:hidden;
}
.ad-slot-center .ad-placeholder{
  width:970px;
  max-width:100%;
  min-height:250px;
  margin:0 auto;
  display:flex;
  justify-content:center;
  align-items:center;
}
@media(max-width:720px){
  .ad-slot-center{margin:9px auto 11px}
  .ad-slot-center .ad-placeholder{min-height:90px}
}

/* v31: AI Game Finder between Popular Games and All Games */
.home-ai-between{
  padding:8px 0 7px!important;
  margin:0!important;
}
#popular.home-showcase{
  padding-bottom:5px!important;
}
#popular + .home-ai-between{
  padding-top:6px!important;
}
.home-ai-between + #games.catalog{
  padding-top:7px!important;
  margin-top:0!important;
}
.home-ai-between .ai-finder{
  margin:0!important;
}
@media(max-width:720px){
  .home-ai-between{padding:5px 0!important}
  .home-ai-between + #games.catalog{padding-top:5px!important}
}
/* ============================================================
   BAMZO GAME PLAYER & FULLSCREEN MOBILE COMPATIBILITY STYLES
   ============================================================ */

/* 1. Expand Player Container to Full Viewport */
#player.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100dvh !important; /* Dynamically adjusts to mobile browser toolbars */
  z-index: 99999 !important;
  background: #000;
  display: flex !important;
  flex-direction: column !important;
}

/* Ensure the iframe fills the player wrapper completely */
#player.is-fullscreen iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  touch-action: none; /* Prevents page swipe/gesture interference while playing */
}

/* 2. Prevent Background Document Scrolling in Fullscreen Mode */
body.has-fullscreen,
html.has-fullscreen {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* 3. Floating Mobile Exit Button */
#player .fullscreen-exit-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.7);
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  -webkit-tap-highlight-color: transparent;
}

#player.is-fullscreen .fullscreen-exit-btn {
  display: flex;
}