/* Greedy CEO — estilos solo para la versión web (se inyectan después de los del juego). */

/* Opciones que no aplican fuera de Android: login con Google (CrazyGames lo prohíbe),
   calificar en Play Store y email (abriría un cliente externo). La tienda premium
   queda con anuncios (sin CEO Pass ni Starter Pack) o se oculta si no hay anuncios.
   El Backup Code SÍ queda: es el puente para usar la misma partida en todas las plataformas. */
.web-no-store #marketBtn,
.web-ad-store #marketModal .online-tab[data-mtab="pass"],
.web-ad-store #marketModal .online-tab[data-mtab="starter"],
#linkGoogleBtn,
#rateAppBtn,
#emailFeedbackBtn,
#accountStatusBox,
[data-i18n="accountHint"] {
  display: none !important;
}

/* Sin compras reales en web: los skins del CEO PASS no se consiguen, y sin anuncios tampoco los premium. */
html.web-ad-store .skin-action.premium-btn[data-tab="pass"],
html.web-no-store .skin-action.premium-btn {
  display: none !important;
}
/* Y sus tarjetas tampoco: quedaban bloqueadas, con su etiqueta y sin botón (no se pueden conseguir aquí).
   Sin tienda: ningún skin premium sin comprar. Con anuncios: los del CEO PASS (regla aparte: un navegador
   sin :has() descarta solo esa y queda como antes). */
html.web-no-store .skin-item.premium.locked {
  display: none !important;
}
html.web-ad-store .skin-item.premium.locked:has(.premium-btn[data-tab="pass"]) {
  display: none !important;
}
/* Web sin portal (sin anuncios): no mostrar los botones de anuncio "temporalmente deshabilitados". */
html.web-no-store .ad-disabled {
  display: none !important;
}
/* La fila solo si todos sus botones son de anuncio (con CEO PASS el x2 es gratis y debe verse).
   Regla aparte: un navegador sin :has() descarta solo esta, no la de arriba. */
html.web-no-store .boost-row:not(:has(.boost-btn:not(.ad-disabled))) {
  display: none !important;
}

/* Toques rápidos: sin zoom por doble toque / pellizco y sin seleccionar texto con un toque largo
   (iOS ignora user-scalable=no y el user-select sin prefijo). Los campos de texto sí se pueden usar. */
html, body {
  touch-action: pan-x pan-y;
}
* {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* El código se puede seleccionar a mano por si el portapapeles está bloqueado en el iframe. */
#backupCodeBox {
  user-select: all;
  -webkit-user-select: all;
}

/* Pantallas anchas (computadora / tablet horizontal): el juego queda como una
   columna centrada, con un fondo de oficina nocturna a los lados. */
@media (min-width: 540px) {
  html, body {
    background-color: #070a14;
    background-image:
      linear-gradient(rgba(251, 191, 36, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(251, 191, 36, 0.035) 1px, transparent 1px),
      radial-gradient(ellipse at 50% 15%, #1c2546 0%, #0b1020 55%, #070a14 100%);
    background-size: 28px 28px, 28px 28px, 100% 100%;
  }
  #app {
    box-shadow:
      0 0 0 3px var(--gold-dk),
      0 0 0 6px #0a0e1a,
      0 0 50px rgba(0, 0, 0, 0.85),
      0 0 140px rgba(251, 191, 36, 0.10);
  }
}

/* ================= Portales: inicio limpio ================= */
/* Al principio solo lo básico (ver syncEarlyGame en platform.js). */
html.gc-early #onlineBtn,
html.gc-early #socialBtn,
html.gc-early #clanBtn,
html.gc-early #notifBtn,
html.gc-early #skinsBtn,
html.gc-early #marketBtn,
html.gc-early #prestigeBtn,
html.gc-early #ascendBtn,
html.gc-early .spy-row {
  display: none !important;
}

/* ================= Computadora / tablet horizontal ================= */
/* Dos columnas: HUD + sede (izquierda) y negocios (derecha). El zoom general lo pone platform.js. */
html.gc-desk #app {
  max-width: none;
  width: 100%;
  height: calc(100dvh / var(--gz, 1));
  display: grid;
  grid-template-columns: minmax(360px, 46%) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "hud    floors"
    "obj    floors"
    "roof   floors"
    "boost  floors"
    "spy    floors";
}
html.gc-desk #app > .hud { grid-area: hud; }
html.gc-desk #app > .objective { grid-area: obj; }
html.gc-desk #app > .boost-row { grid-area: boost; }
html.gc-desk #app > .spy-row { grid-area: spy; }
/* La torre se reparte entre las dos columnas (mismo tema de cielo en ambas). */
html.gc-desk #towerWrap { display: contents; }
/* El cielo (con sus estrellas) va detrás de la sede, en la misma celda. */
html.gc-desk #towerWrap > .stars {
  grid-area: roof;
  position: relative;
  height: auto;
  min-height: 0;
  background: inherit;
}
html.gc-desk #towerWrap > .roof {
  grid-area: roof;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: transparent;
  justify-content: flex-end;
}
html.gc-desk #towerWrap > .roof > * { zoom: var(--rz, 1); }
html.gc-desk #floors {
  grid-area: floors;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: inherit;
  border-left: 3px solid var(--gold-dk);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dk) transparent;
}
