/* ========================================================================== */
/*  KBNETZ — Global Styles                                                    */
/* ========================================================================== */

/* === Design tokens === */
:root {
  --brand-1: #111111;
  --brand-2: #FF6437;
  --brand-3: #22c55e;
  --text:    #eaeaea;
  --muted:   #9aa1a9;
  --card:        #1a1f29;
  --card-raise:  #222838;

  --copper: #B87333;
  --copper-dark: #8B5A2B;
  --silver: #C0C0C0;
  --dark-silver: #6B6B6B;

--header-h: 108px;
--portal-row-h: 35px;
}

/* === Reset / base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  background-color: var(--brand-1);
  color: var(--text);
  line-height: 1.6;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

a {
  color: var(--brand-2);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover { color: var(--brand-3); }
a:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ========================================================================== */
/*  Header                                                                    */
/* ========================================================================== */

.header-sticky {
  position: sticky; top: 0; z-index: 1000;
  background: linear-gradient(to bottom, rgba(17,17,17,.97), rgba(17,17,17,.90));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184, 184, 184, .12);
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  height: var(--header-h);
}

/* 3-column: logo | centre | actions */
.header-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 0 0.75rem;
  gap: 1rem;
}

/* Left: KBNetz wordmark */
.header-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: filter .2s ease;
  flex-shrink: 0;
}
.header-logo:hover { filter: drop-shadow(0 0 6px rgba(184,115,51,.5)); }

.logo-wordmark {
  height: 90px;
  width: auto;
  object-fit: contain;
}

/* Centre: Appz branding */
.header-centre {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Main Appz site title */
.site-title {
  margin: 0;
  line-height: 1;
}

.appz-wordmark {
  display: block;
  width: auto;
  height: 82px;
  max-width: 100%;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav-link {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
  position: relative;
  padding: .2rem 0;
  transition: color .2s ease;
  white-space: nowrap;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--brand-2);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .2s ease-out;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* Right: controls + utility links */
.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: .25rem;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}

.utility-nav {
  justify-content: flex-end;
  gap: .9rem;
}

.utility-nav .nav-link {
  font-size: .72rem;
  color: var(--dark-silver);
  padding: .1rem 0;
}

.search-input {
  background-color: var(--card);
  border: 1px solid rgba(107,107,107,.35);
  color: var(--text);
  padding: .3rem .65rem;
  border-radius: 5px;
  font-size: .82rem;
  height: 30px;
  width: 150px;
  transition: border-color .2s ease, box-shadow .2s ease, width .25s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.3);
}
.search-input::placeholder { color: var(--dark-silver); font-size: .8rem; }
.search-input:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 2px rgba(255,100,55,.3), inset 0 1px 2px rgba(0,0,0,.2);
  width: 190px;
}

.settings-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(184,115,51,.3);
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-button:hover {
  background: rgba(255,255,255,.05);
  border-color: var(--brand-2);
  color: var(--text);
}
.settings-button svg {
  width: 15px;
  height: 15px;
  transition: transform .3s ease;
}
.settings-button:hover svg { transform: rotate(45deg); }

.login-button {
  background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
  color: var(--text);
  border: 1px solid rgba(184,115,51,.4);
  padding: 0 .75rem;
  height: 30px;
  border-radius: 5px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.login-button:hover {
  background: linear-gradient(135deg, #333, #2a2a2a);
  border-color: var(--brand-2);
}
.login-button:active { transform: translateY(1px); }

/* ========================================================================== */
/*  GDPR Banner                                                               */
/* ========================================================================== */

.kbz-privacy-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background-color: var(--card-raise);
  padding: .85rem 2rem;
  display: none;
  flex-direction: column;
  gap: .75rem;
  box-shadow: 0 -4px 12px rgba(0,0,0,.3);
  z-index: 2000;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
}

:root[data-kbz-privacy="pending"] .kbz-privacy-banner {
  display: flex;
  opacity: 1;
  visibility: visible;
}

:root[data-kbz-privacy="uncertain"] .kbz-privacy-banner {
  display: none;
  opacity: 0;
  visibility: hidden;
}

.kbz-privacy-banner p { margin: 0; color: var(--text); line-height: 1.5; text-align: center; font-size: .9rem; }
.kbz-privacy-banner a { color: var(--brand-2); font-weight: 500; }
.kbz-privacy-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.kbz-privacy-button {
  padding: .4rem .9rem; border-radius: 5px; cursor: pointer; font-weight: 500; font-size: .85rem;
  border: 1px solid transparent; background: transparent; color: var(--text);
  transition: all .2s ease;
}
#kbzAllowBtn {
  background: linear-gradient(135deg, var(--brand-3), #16a34a);
  color: #fff; border: none;
  box-shadow: 0 2px 8px rgba(34,197,94,.3);
}
#kbzAllowBtn:hover { background: linear-gradient(135deg, #16a34a, #15803d); }
#kbzDeclineBtn {
  background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.2);
}
#kbzDeclineBtn:hover { background: linear-gradient(135deg, #333, #2a2a2a); }

:root[data-kbz-privacy="pending"] body { padding-bottom: 72px; }

/* ========================================================================== */
/*  Shared tree/nav primitives                                                */
/* ========================================================================== */

.pz-left {
  position: relative; min-width: 180px; max-width: 50vw;
  border-right: 1px solid var(--card);
  display: flex; flex-direction: column; overflow: hidden; overflow-x: hidden;
}

.pz-resizer {
  position: absolute; top: 0; right: 0; width: 6px;
  cursor: col-resize; height: 100%; background: transparent;
}
.pz-resizer:focus { outline: 2px dashed #888; outline-offset: -2px; }

.pz-tools {
  order: -1;
  position: sticky;
  top: 0;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  height: var(--portal-row-h);
  flex: 0 0 var(--portal-row-h);
  padding: 0 .5rem;
  gap: 0;

  background: rgba(0,0,0,.18);
  backdrop-filter: saturate(120%) blur(2px);
  border-bottom: 1px solid var(--card);
}

.pz-tools::after,
.pz-tools::before {
  content: "";
  width: 1px;
  height: 14px;
  margin: 0 1rem;
  background: rgba(255,255,255,.16);
}

.pz-tools::after {
  order: 2;
}

.pz-tools::before {
  order: 4;
}

#pz-tree { flex: 1 1 auto; overflow: auto; overflow-x: hidden; padding: .5rem .25rem .5rem .5rem; }
.pz-tree ul { list-style: none; margin: 0 0 0 .75rem; padding: 0; }
.pz-tree .ti { display: block; }
.pz-tree .ti > ul { display: none; padding-left: .9rem; margin-left: .15rem; }
.pz-tree .ti.open > ul { display: block; }
.pz-tree .ti-row {
  display: flex; align-items: center; gap: .4rem;
  padding: .25rem .25rem; border-radius: .4rem; min-width: 0;
}
.pz-tree .ti-row:hover { background: rgba(255,255,255,.06); }
.pz-tree .ti button.tree-label { all: unset; cursor: pointer; color: var(--muted); transition: color .2s ease; }
.pz-tree .ti .tree-label { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-tree .ti button.tree-label:hover { color: var(--text); }
.pz-tree .ti .chev { transition: transform .15s ease; color: var(--muted); }
.pz-tree .ti.open > .ti-row > .chev { transform: rotate(90deg); }
.pz-tree .ti.leaf .chev { opacity: .35; }

/* Tree section divider */
.pz-tree-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(184,115,51,.35) 20%, rgba(184,115,51,.35) 80%, transparent);
  margin: .55rem .75rem;
  list-style: none;
}

.btn {
  display: inline-block; padding: .35rem .6rem;
  border: 1px solid rgba(107,107,107,.4);
  border-radius: .4rem;
  background: linear-gradient(135deg, rgba(42,42,42,.8), rgba(31,31,31,.8));
  color: var(--text); cursor: pointer; text-decoration: none;
  transition: all .15s ease; white-space: nowrap;
}
.btn:hover {
  background: linear-gradient(135deg, rgba(51,51,51,.9), rgba(42,42,42,.9));
  border-color: var(--copper);
  transform: translateY(-1px);
}
.btn.small { padding: .25rem .5rem; font-size: .85rem; }

#pz-tools .btn.small {
  width: 34px;
  height: 28px;
  padding: 0;
  font-size: 0;

  position: relative;

  display: inline-grid;
  place-items: center;

  background: transparent;
  border: 0;
  border-radius: .35rem;
  box-shadow: none;

  color: var(--muted);
  opacity: .8;
  transform: none;
}

#pz-tools .btn.small:hover {
  background: rgba(255,255,255,.045);
  border: 0;
  color: var(--copper);
  opacity: 1;
  transform: none;
}

#pz-tools .btn.small:focus-visible {
  outline: 1px solid rgba(184,115,51,.7);
  outline-offset: 2px;
}

#pz-expand-all {
  order: 1;
}

#pz-collapse-all {
  order: 3;
}

#pz-focus-game {
  order: 5;
}

#pz-focus-game.btn.small::before {
  content: "◀";
  display: flex;
  align-items: center;
  justify-content: flex-end;

  width: 15px;
  height: 14px;
  padding-left: 4px;

  border-left: 2px solid currentColor;

  font-size: 11px;
  font-weight: 900;
  line-height: 1;

  transform: translateY(2px);
}

#pz-expand-all.btn.small::before,
#pz-collapse-all.btn.small::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;

  width: 11px;
  height: 7px;

  background: currentColor;

  clip-path: polygon(
    0 0,
    50% 65%,
    100% 0,
    100% 35%,
    50% 100%,
    0 35%
  );

  transform-origin: 50% 50%;
}

#pz-expand-all.btn.small::before {
  transform: translate(-50%, -50%);
}

#pz-collapse-all.btn.small::before {
  transform: translate(-50%, -50%) rotate(180deg);
}

/* ========================================================================== */
/*  Reduced Motion                                                            */
/* ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================================================== */
/*  Responsive — header + mobile drawer                                       */
/* ========================================================================== */

.pz-mobile-nav-toggle,
.pz-mobile-nav-backdrop { display: none; }

@media (max-width: 900px) {
  :root { --header-h: 92px; }

  .pz-left {
    position: fixed;
    z-index: 30;
    top: var(--header-h, 0);
    left: 0; bottom: 0;
    width: min(56vw, 220px);
    max-width: none; min-width: 0;
    height: auto;
    background: rgba(10,12,16,.98);
    border-right: 1px solid rgba(255,255,255,.14);
    box-shadow: 16px 0 30px rgba(0,0,0,.45);
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

  .pz-left.open { transform: translateX(0); }
  .pz-resizer { display: none; }

  .pz-mobile-nav-toggle {
    display: flex;
    position: fixed; z-index: 31;
    left: 0; top: 42vh;
    transform: translateY(-50%);
    width: 30px; min-height: 100px;
    align-items: center; justify-content: center;
    padding: .4rem .15rem;
    border: 1px solid rgba(184,106,42,.6);
    border-left: none;
    border-radius: 0 .5rem .5rem 0;
    background: linear-gradient(180deg, rgba(24,26,30,.96), rgba(10,12,16,.96));
    color: var(--brand-2);
    cursor: pointer;
    box-shadow: 4px 4px 14px rgba(0,0,0,.35);
  }

  .pz-mobile-nav-toggle span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: .12em;
    font-size: .65rem;
    font-weight: 700;
  }

  .pz-mobile-nav-backdrop {
    display: block;
    position: fixed; z-index: 20;
    inset: 0;
    background: rgba(0,0,0,.45);
  }
  .pz-mobile-nav-backdrop[hidden] { display: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .header-container {
    grid-template-columns: auto 1fr auto;
    padding: 0 1rem; gap: .5rem;
  }

.logo-wordmark { height: 44px; }
.appz-wordmark { height: 52px; }

.main-nav { gap: .65rem; }

  .nav-link { font-size: .76rem; }

  .search-input {
    width: 110px;
    height: 28px;
    font-size: .78rem;
  }
  .search-input:focus { width: 140px; }

  .settings-button,
  .login-button {
    height: 28px;
  }

  .login-button { padding: 0 .6rem; font-size: .78rem; }

  .kbz-privacy-banner {
    padding: .6rem 1rem;
    gap: .5rem;
  }
  .kbz-privacy-actions { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 540px) {
.main-nav { display: none; }
.search-input { width: 90px; }
.search-input:focus { width: 120px; }
.logo-wordmark { height: 34px; }
.appz-wordmark { height: 44px; }
}

/* ========================================================================== */
/*  Appz Portal                                                                */
/* ========================================================================== */

/* Three-column layout: nav | viewport | promo */
.gz-layout {
  --gz-left-w: clamp(190px, 15vw, 260px);

  display: grid;
  grid-template-columns: var(--gz-left-w) 1fr 300px;
  min-height: calc(100vh - var(--header-h));
  position: relative;
}

/* Manual game-focus mode: hide left navigation but keep portal + ads visible */
@media (min-width: 901px) {
  .gz-layout.gz-focus-mode {
    grid-template-columns: 0 1fr 300px;
  }

  .gz-layout.gz-focus-mode > .pz-left {
    display: none;
  }

  .gz-layout.gz-focus-mode > .gz-center {
    grid-column: 2;
  }

  .gz-layout.gz-focus-mode > .gz-promo {
    grid-column: 3;
  }

  .gz-layout.gz-focus-mode > .pz-mobile-nav-toggle {
    display: flex;
    position: fixed;
    z-index: 31;
    left: 0;
    top: 42vh;
    transform: translateY(-50%);
    width: 30px;
    min-height: 100px;
    align-items: center;
    justify-content: center;
    padding: .4rem .15rem;
    border: 1px solid rgba(184,106,42,.6);
    border-left: none;
    border-radius: 0 .5rem .5rem 0;
    background: linear-gradient(180deg, rgba(24,26,30,.96), rgba(10,12,16,.96));
    color: var(--brand-2);
    cursor: pointer;
    box-shadow: 4px 4px 14px rgba(0,0,0,.35);
  }

  .gz-layout.gz-focus-mode > .pz-mobile-nav-toggle span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: .12em;
    font-size: .65rem;
    font-weight: 700;
  }
}

/* ---- Left nav ---- */
.gz-nav {
  border-right: 1px solid var(--card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gz-tree {
  flex: 1 1 auto;
  overflow: auto;
  overflow-x: hidden;
  padding: .5rem .25rem .5rem .5rem;
}

/* Category rows fully clickable */
.gz-cat-row { cursor: pointer; }
.gz-cat-row:hover { background: rgba(255,255,255,.06); }

/* Game status badges */
.gz-status-badge {
  font-size: .62rem;
  font-weight: 600;
  padding: .1rem .3rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .03em;
  vertical-align: middle;
  margin-left: .3rem;
}

.gz-status-badge.live {
  background: rgba(34,197,94,.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.3);
}

.gz-status-badge.coming-soon {
  background: rgba(255,140,0,.1);
  color: #ff8c00;
  border: 1px solid rgba(255,140,0,.25);
}

/* ---- Center viewport ---- */
.gz-center {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-top: var(--portal-row-h);
  background: var(--brand-1);
}

.gz-view {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Welcome splash */
.gz-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex: 1 1 auto;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--muted);
}

.gz-welcome-icon {
  font-size: 4rem;
  line-height: 1;
  filter: grayscale(20%);
  animation: gz-float 3s ease-in-out infinite;
}

.gz-welcome-controller {
  display: block;
  width: clamp(90px, 8vw, 130px);
  height: auto;
  margin: 0 auto;
  animation: gz-float 3s ease-in-out infinite;
}

@keyframes gz-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.gz-welcome h2 {
  margin: 0;
  color: #ff8a1f;
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow:
    0 0 8px rgba(255, 138, 31, .18),
    0 1px 0 rgba(0, 0, 0, .65);
}

.gz-welcome p {
  margin: .65rem 0 0;
  color: #aeb5bf;
  font-size: 1rem;
  letter-spacing: .01em;
}

/* Game card */
.gz-game-card {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.gz-game-card-live {
  padding: 1rem 2rem;
  gap: 0;
  overflow: hidden;
}

.gz-game-header {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
}

.gz-game-icon { font-size: 2rem; line-height: 1; }

.gz-game-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -.5px;
}

.gz-game-blurb {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.gz-game-tags { display: flex; gap: .5rem; flex-wrap: wrap; }

.gz-game-tag {
  font-size: .75rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.1);
}

/* iframe viewport */
.gz-iframe-wrap {
  flex: 1 1 auto;
  min-height: 0;
  background: #0a0c10;
  border-radius: .5rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
}

.gz-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  display: block;
}

/* Coming soon state */
.gz-coming-soon {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  background: rgba(255,140,0,.03);
  border-radius: .5rem;
  border: 1px dashed rgba(255,140,0,.2);
  min-height: 280px;
}

.gz-coming-soon-icon { font-size: 3rem; }

.gz-coming-soon h3 {
  font-size: 1.25rem;
  color: #ff8c00;
  margin: 0;
}

.gz-coming-soon p {
  color: var(--muted);
  margin: 0;
  font-size: .95rem;
}

/* Center bottom ad bar */
.gz-ad-bar {
  flex-shrink: 0;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;

margin-left: calc(1rem + 2px);
width: calc(100% - 1rem - 2px);
  padding: .75rem 2rem;

  background: rgba(255,255,255,.01);
  border-top: 1px solid rgba(255,255,255,.05);
}

.gz-bottom-ad {
  min-height: 90px;
  border-radius: .45rem;
  background: rgba(255,255,255,.015);
  border: 1px dashed rgba(255,255,255,.07);

  display: flex;
  align-items: center;
  justify-content: center;
}

.gz-ad-label {
  color: rgba(255,255,255,.1);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

.kbz-adsense-unit {
  width: 100%;
}

/* Portal switcher bar */
.gz-portal-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;

  height: var(--portal-row-h);

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,.18);
  backdrop-filter: saturate(120%) blur(2px);
  border-bottom: 1px solid var(--card);
}

.gz-portal-link {
  position: relative;
  padding: 0 1.15rem;

  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .03em;
  line-height: var(--portal-row-h);

  transition: color .2s ease;
}

.gz-portal-link::after {
  content: "";
  position: absolute;
  left: 1.15rem;
  right: 1.15rem;
  bottom: 5px;
  height: 1px;

  background: var(--brand-3);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .2s ease-out;
}

.gz-portal-link:hover {
  color: var(--text);
}

.gz-portal-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.gz-portal-divider {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,.16);
}

/* Portal-specific utility row above right panel */
.gz-promo-tools {
  position: relative;
  z-index: 5;
  
  height: var(--portal-row-h);
  flex: 0 0 var(--portal-row-h);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;

  background: rgba(0,0,0,.18);
  backdrop-filter: saturate(120%) blur(2px);
  border-bottom: 1px solid var(--card);

  color: var(--muted);
}

.gz-promo-tools-label {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .03em;
}

.gz-promo-tools-soon {
  font-size: .52rem;
  font-weight: 700;
  line-height: 1;
  padding: .16rem .3rem;

  color: #ff8c00;
  background: rgba(255,140,0,.08);
  border: 1px solid rgba(255,140,0,.2);
  border-radius: 999px;
}

/* ---- Right promo panel ---- */
.gz-promo {
  border-left: 1px solid var(--card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gz-promo-inner {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.gz-promo-heading {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 .4rem;
  text-align: center;
}

.gz-promo-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.gz-promo-item {
  background: var(--card);
  border-radius: .45rem;
  padding: .5rem .65rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
}

.gz-promo-item:hover {
  border-color: rgba(255,140,0,.3);
  background: var(--card-raise);
  transform: translateX(2px);
}

.gz-promo-item.active {
  border-color: #ff8c00;
  background: rgba(255,140,0,.08);
}

.gz-promo-item-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }

.gz-promo-item-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gz-promo-item-badge {
  font-size: .58rem;
  padding: .08rem .28rem;
  border-radius: 999px;
  font-weight: 700;
  flex-shrink: 0;
}

.gz-promo-item-badge.live {
  background: rgba(34,197,94,.2);
  color: #4ade80;
}

.gz-promo-item-badge.coming-soon {
  background: rgba(255,140,0,.15);
  color: #ff8c00;
}

/* Advertisement area in promo panel */
.gz-promo-ads {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 0 .85rem .85rem;
}

.gz-promo-ad {
  width: 100%;
  min-height: 250px;
  border-radius: .45rem;
  background: rgba(255,255,255,.015);
  border: 1px dashed rgba(255,255,255,.07);

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Appz responsive ---- */
@media (max-width: 1100px) {
  .gz-layout {
    grid-template-columns: var(--gz-left-w) 1fr 260px;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .gz-layout.gz-focus-mode {
    grid-template-columns: 0 1fr 260px;
  }
}

@media (max-width: 900px) {
  .gz-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto;
  }

  .gz-promo {
    border-left: none;
    border-top: 1px solid var(--card);
    flex-direction: column;
    overflow: hidden;
  }

  .gz-promo-inner {
    flex-direction: row;
    align-items: center;
    padding: .6rem .85rem;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .gz-promo-heading { display: none; }

  .gz-promo-list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: .4rem;
    width: max-content;
  }

  .gz-promo-item { min-width: 130px; }

  .gz-promo-ads { display: none; }
  .gz-promo-ad { display: none; }
}

@media (max-width: 600px) {
  .gz-game-card { padding: 1rem; }
  .gz-promo-inner { padding: .5rem .75rem; }

  .gz-ad-bar {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .gz-bottom-ad:nth-child(n + 2) {
    display: none;
  }
}
