/* VersaPlay v3.6.8 — cabeçalho + conteúdo + rodapé universais */
:root{
  --vp-shell-height:100vh;
  --vp-bg:#06101e;
  --vp-bg2:#081523;
  --vp-line:rgba(120,211,255,.16);
  --vp-text:#f0f7ff;
  --vp-muted:#8fa7bc;
  --vp-green:#63e6a1;
}
*{box-sizing:border-box}
html{
  margin:0;
  width:100%;
  height:100%;
  min-height:100%;
  background:var(--vp-bg);
}
body.vp-item-shell{
  margin:0;
  width:100%;
  height:var(--vp-shell-height);
  min-height:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  background:var(--vp-bg);
  color:var(--vp-text);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  overscroll-behavior:none;
}

/* ===== Cabeçalho padrão ===== */
.vp-item-bar{
  position:relative;
  z-index:20;
  width:100%;
  min-width:0;
  min-height:62px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:
    calc(6px + env(safe-area-inset-top,0px))
    calc(12px + env(safe-area-inset-right,0px))
    6px
    calc(12px + env(safe-area-inset-left,0px));
  border-bottom:1px solid var(--vp-line);
  background:linear-gradient(90deg,rgba(32,194,255,.07),transparent 34%),#091827;
  box-shadow:0 4px 18px rgba(0,0,0,.18);
}
.vp-item-brand{
  min-width:0;
  height:46px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 9px 4px 5px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(6,17,31,.72);
  color:var(--vp-text);
  text-decoration:none;
  font-weight:850;
}
.vp-item-brand:hover,.vp-item-brand:focus-visible{border-color:rgba(99,230,161,.42);outline:none}
.vp-item-brand img{width:36px;height:36px;flex:0 0 36px;object-fit:contain;border-radius:9px}
.vp-item-info{min-width:0}
.vp-item-title-line{min-width:0;display:flex;align-items:center;gap:7px}
.vp-item-title-line strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.95rem;
}
.vp-item-type-icon{flex:0 0 auto;font-size:.98rem}
.vp-item-type{
  flex:0 0 auto;
  padding:3px 7px;
  border:1px solid rgba(40,198,255,.22);
  border-radius:999px;
  color:#bdeaff;
  font-size:.66rem;
  font-weight:800;
}
.vp-item-meta{
  min-width:0;
  display:flex;
  gap:8px;
  margin-top:2px;
  color:var(--vp-muted);
  font-size:.68rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.vp-item-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.vp-item-meta span+span::before{content:"•";margin-right:8px;color:#516b82}
.vp-item-actions{display:flex;align-items:center;gap:6px}
.vp-item-action{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 11px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:10px;
  background:#12263c;
  color:#dcecf9;
  text-decoration:none;
  font-size:.76rem;
  font-weight:800;
  white-space:nowrap;
}
.vp-item-action:hover,.vp-item-action:focus-visible{border-color:rgba(40,198,255,.38);outline:none}
.vp-item-home{background:var(--vp-green);border-color:transparent;color:#062216}

/* ===== Área do jogo/aplicativo =====
 * minmax(0,1fr) no body + min-height:0 aqui é essencial no celular.
 * Não usamos calc(100vh - x) nem calc(100dvh - x).
 */
.vp-item-stage{
  position:relative;
  z-index:1;
  width:100%;
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:#050d18;
}
.vp-item-frame{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  min-width:0;
  min-height:1px;
  display:block;
  border:0;
  margin:0;
  padding:0;
  background:#050d18;
  -webkit-overflow-scrolling:touch;
  touch-action:auto;
}
.vp-item-loading{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:#050d18;
  color:#c9dced;
  font-size:.82rem;
  pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease;
}
.vp-item-loading.is-hidden{opacity:0;visibility:hidden}
.vp-item-spinner{
  width:18px;height:18px;
  border:2px solid rgba(255,255,255,.18);
  border-top-color:var(--vp-green);
  border-radius:50%;
  animation:vp-spin .8s linear infinite;
}
@keyframes vp-spin{to{transform:rotate(360deg)}}

/* ===== Conteúdo externo ===== */
.vp-item-external{
  width:100%;
  height:100%;
  min-height:0;
  display:grid;
  place-items:center;
  overflow:auto;
  padding:18px;
  background:radial-gradient(circle at 50% 20%,rgba(40,198,255,.10),transparent 38rem),#06101e;
}
.vp-item-external-card{
  width:min(560px,100%);
  padding:26px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:20px;
  background:#0c1c2f;
  text-align:center;
  box-shadow:0 22px 70px rgba(0,0,0,.30);
}
.vp-item-external-icon{font-size:3rem}
.vp-item-external-card h1{margin:10px 0;font-size:clamp(1.5rem,5vw,2.2rem)}
.vp-item-external-card p{margin:0 auto 20px;max-width:460px;color:var(--vp-muted);line-height:1.55}
.vp-item-open-external,.vp-item-back-link{
  display:inline-flex;
  min-height:42px;
  align-items:center;
  justify-content:center;
  margin:4px;
  padding:0 14px;
  border-radius:10px;
  text-decoration:none;
  font-weight:800;
}
.vp-item-open-external{background:var(--vp-green);color:#052116}
.vp-item-back-link{border:1px solid rgba(255,255,255,.09);background:#14263b;color:#d9e8f5}

/* ===== Rodapé padrão ===== */
.vp-item-footer{
  position:relative;
  z-index:20;
  width:100%;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:6px;
  padding:
    5px
    calc(10px + env(safe-area-inset-right,0px))
    calc(5px + env(safe-area-inset-bottom,0px))
    calc(10px + env(safe-area-inset-left,0px));
  border-top:1px solid rgba(120,211,255,.11);
  background:var(--vp-bg2);
  color:#718ca4;
  font-size:.66rem;
  line-height:1.25;
  text-align:center;
}
.vp-item-footer a{color:#9fc8e6;text-decoration:none;font-weight:700}
.vp-item-footer a:hover,.vp-item-footer a:focus-visible{color:#cfeeff;text-decoration:underline;outline:none}

/* ===== Celular ===== */
@media(max-width:720px){
  .vp-item-bar{
    min-height:54px;
    gap:6px;
    padding:
      calc(4px + env(safe-area-inset-top,0px))
      calc(6px + env(safe-area-inset-right,0px))
      4px
      calc(6px + env(safe-area-inset-left,0px));
  }
  .vp-item-brand{
    width:42px;
    height:42px;
    padding:3px;
    justify-content:center;
    border-radius:10px;
  }
  .vp-item-brand span{display:none}
  .vp-item-brand img{width:34px;height:34px}
  .vp-item-title-line{gap:4px}
  .vp-item-title-line strong{font-size:.80rem}
  .vp-item-type{display:none}
  .vp-item-meta{font-size:.60rem;gap:5px}
  .vp-item-catalog{display:none}
  .vp-item-action{
    min-width:48px;
    min-height:38px;
    padding:0 7px;
    font-size:.69rem;
  }
  .vp-item-footer{
    gap:4px;
    padding:
      4px
      calc(6px + env(safe-area-inset-right,0px))
      calc(4px + env(safe-area-inset-bottom,0px))
      calc(6px + env(safe-area-inset-left,0px));
    font-size:.59rem;
  }
}

/* Telefones estreitos: preserva espaço útil do jogo. */
@media(max-width:430px){
  .vp-item-meta span:first-child{display:none}
  .vp-item-meta span+span::before{display:none}
  .vp-item-title-line strong{max-width:46vw}
  .vp-item-footer span[aria-hidden="true"]{display:none}
}

/* Paisagem em celular: cabeçalho/rodapé ficam mínimos. */
@media(orientation:landscape) and (max-height:560px){
  .vp-item-bar{
    min-height:44px;
    padding-top:2px;
    padding-bottom:2px;
  }
  .vp-item-brand{width:38px;height:38px}
  .vp-item-brand img{width:30px;height:30px}
  .vp-item-meta{display:none}
  .vp-item-action{min-height:34px}
  .vp-item-footer{
    padding-top:2px;
    padding-bottom:calc(2px + env(safe-area-inset-bottom,0px));
    font-size:.56rem;
  }
}

/* Melhora inicial antes do JS medir o viewport visual. */
@supports(height:100dvh){
  :root{--vp-shell-height:100dvh}
}
