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

/* ===================== STORE LAYOUT FINAL ===================== */
.store-section-title {
  display: none !important;
}

.store-sections {
  margin-top: 12px !important;
}

.store-product-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
}

.store-product-card {
  width: 100% !important;
  min-height: 180px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  padding: 18px 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 10px !important;
  background:
    radial-gradient(circle at top, rgba(255, 224, 122, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(18, 18, 32, 0.98), rgba(9, 9, 18, 0.98)) !important;
  text-align: center !important;
}

.store-product-card-button {
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
  color: inherit !important;
  font: inherit !important;
  outline: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

.store-product-card-button:hover:not(:disabled),
.store-product-card-button:focus-visible {
  border-color: rgba(255, 204, 0, 0.5) !important;
  background:
    radial-gradient(circle at top, rgba(255, 224, 122, 0.14), transparent 46%),
    linear-gradient(180deg, rgba(22, 22, 38, 0.99), rgba(10, 10, 20, 0.99)) !important;
  box-shadow: 0 0 22px rgba(255, 204, 0, 0.12) !important;
  transform: translateY(-1px) !important;
}

.store-product-card-button:disabled {
  opacity: 0.6 !important;
  cursor: wait !important;
  transform: none !important;
}

.store-product-top {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
}

.store-product-icon {
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 2rem !important;
  line-height: 1 !important;
}

.store-product-total-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
}

.store-product-total {
  font-size: 1.85rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  color: #fff3c8 !important;
  text-shadow: 0 0 16px rgba(255, 204, 0, 0.12) !important;
}

.store-product-unit {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: #8f96aa !important;
}

.store-product-price {
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: 0.06em !important;
}

.store-product-buy-text {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.24em !important;
  text-transform: uppercase !important;
  color: #a855f7 !important;
}

/* Rótulo do pacote ("Básico", "Grande", etc.) */
.store-product-label {
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  color: #7788aa !important;
  margin-bottom: 2px !important;
}

/* Valor em moedas/R$ */
.store-product-value {
  font-size: 0.60rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.10em !important;
  color: #4caf8a !important;
  margin-bottom: 2px !important;
}

/* Badge "MAIS POPULAR" */
.store-product-badge {
  display: inline-block !important;
  font-size: 0.55rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  background: linear-gradient(90deg, #f59e0b, #ef4444) !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
  margin-bottom: 8px !important;
  align-self: center !important;
}

/* Card destacado (Mais Popular) */
.store-product-popular {
  border-color: rgba(245, 158, 11, 0.55) !important;
  background: rgba(245, 158, 11, 0.07) !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.15) !important;
}

.store-product-popular:hover:not(:disabled),
.store-product-popular:focus-visible {
  border-color: rgba(245, 158, 11, 0.85) !important;
  background: rgba(245, 158, 11, 0.14) !important;
}

/* 6 pacotes → 3 colunas em desktop */
.store-product-list {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 640px) {
  .store-product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .store-product-card {
    min-height: 156px !important;
    padding: 16px 14px !important;
    gap: 14px !important;
  }

  .store-product-top {
    gap: 12px !important;
  }

  .store-product-icon {
    width: 52px !important;
    height: 52px !important;
    flex-basis: 52px !important;
    font-size: 1.15rem !important;
  }

  .store-product-total {
    font-size: 1.6rem !important;
  }

  .store-product-price {
    font-size: 0.94rem !important;
  }

  .store-product-buy-text {
    font-size: 0.72rem !important;
  }
}

/* ===================== STORE LAYOUT OVERRIDE ===================== */
.store-section-title {
  display: none;
}

.store-sections {
  margin-top: 12px;
}

.store-product-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.store-product-card {
  width: 100%;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background:
    radial-gradient(circle at top, rgba(255, 224, 122, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(18, 18, 32, 0.98), rgba(9, 9, 18, 0.98));
  text-align: center;
  position: relative;
}

.store-product-card-button {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
  outline: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.store-product-card-button:hover:not(:disabled),
.store-product-card-button:focus-visible {
  border-color: rgba(255, 204, 0, 0.5);
  background:
    radial-gradient(circle at top, rgba(255, 224, 122, 0.14), transparent 46%),
    linear-gradient(180deg, rgba(22, 22, 38, 0.99), rgba(10, 10, 20, 0.99));
  box-shadow: 0 0 22px rgba(255, 204, 0, 0.12);
  transform: translateY(-1px);
}

.store-product-card-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.store-product-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.store-product-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  line-height: 1;
}

.store-product-total-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.store-product-total {
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff3c8;
  text-shadow: 0 0 16px rgba(255, 204, 0, 0.12);
}

.store-product-unit {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8f96aa;
}

.store-product-price {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
}

.store-product-buy-text {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #a855f7;
}

/* Rótulo do pacote */
.store-product-label {
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #7788aa;
  margin-bottom: 1px;
}

/* Valor moedas/R$ */
.store-product-value {
  font-size: 0.60rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #4caf8a;
}

/* Badge "MAIS POPULAR" */
.store-product-badge {
  display: inline-block;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 2px;
}

/* Card destacado */
.store-product-popular {
  border-color: rgba(245, 158, 11, 0.55);
  background:
    radial-gradient(circle at top, rgba(245, 158, 11, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(22, 18, 10, 0.98), rgba(10, 9, 5, 0.98));
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.14);
}

.store-product-popular:hover:not(:disabled),
.store-product-popular:focus-visible {
  border-color: rgba(245, 158, 11, 0.85);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.26);
}

@media (max-width: 640px) {
  .store-product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-product-card {
    min-height: 148px;
    padding: 12px 10px;
    gap: 10px;
  }

  .store-product-top {
    gap: 10px;
  }

  .store-product-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 1.05rem;
  }

  .store-product-total {
    font-size: 1.4rem;
  }

  .store-product-price {
    font-size: 0.92rem;
  }

  .store-product-buy-text {
    font-size: 0.70rem;
  }
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0f;
  font-family: 'Courier New', Courier, monospace;
  color: #e0e0e0;
}

/* ===================== GAME CONTAINER ===================== */
#game-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

/* Phaser injeta position:absolute inline — sobrescreve para manter
   o canvas centralizado pelo flex do container pai.             */
#game-container canvas {
  display: block !important;
  position: relative !important;
  margin: auto !important;
  image-rendering: pixelated;
}

/* ===================== SCREENS ===================== */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.screen.active,
.screen.visible {
  pointer-events: all;
}

.screen.hidden {
  display: none !important;
}

.screen-content {
  background: rgba(10, 10, 20, 0.96);
  border: 1px solid rgba(0, 255, 200, 0.25);
  border-radius: 4px;
  padding: 40px 32px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 255, 200, 0.08), inset 0 0 40px rgba(0, 0, 0, 0.4);
}

/* ===================== BLACKSPACE HUB ===================== */
.blackspace-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr;
  background: #07070f;
  overflow: hidden;
}

.blackspace-sidebar {
  display: none !important;
  flex-direction: column;
  gap: 10px;
  padding: 24px 14px;
  border-right: 1px solid rgba(0,255,200,0.14);
  background: rgba(4, 4, 12, 0.98);
}

.blackspace-mark {
  color: #00ffc8;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  margin-bottom: 18px;
  text-shadow: 0 0 18px rgba(0,255,200,0.35);
}

.blackspace-game-tab {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #99a;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  cursor: pointer;
}

.blackspace-game-tab.active {
  color: #00ffc8;
  border-color: rgba(0,255,200,0.45);
  background: rgba(0,255,200,0.08);
}

.blackspace-game-tab.disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.blackspace-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 34px clamp(22px, 5vw, 62px);
  overflow-y: auto;
}

.blackspace-main::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,255,200,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,200,0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.45), transparent 76%);
}

.blackspace-header,
.blackspace-wallet,
.blackspace-games,
#blackspace-error {
  position: relative;
}

.blackspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.blackspace-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.blackspace-sound-btn {
  flex: 0 0 auto;
  margin-top: 5px;
  border-color: rgba(255,204,0,0.32);
  color: #ffcc00;
  background: rgba(255,204,0,0.06);
}

.blackspace-sound-btn:hover {
  border-color: rgba(255,204,0,0.64);
  background: rgba(255,204,0,0.12);
}

.blackspace-title {
  color: #00ffc8;
  font-size: clamp(2.4rem, 7vw, 5.3rem);
  line-height: 0.95;
  letter-spacing: 0.16em;
  font-weight: 900;
  text-shadow: 0 0 28px rgba(0,255,200,0.38);
}

.blackspace-subtitle {
  margin-top: 12px;
  color: #778;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  max-width: 560px;
}

.blackspace-account {
  min-width: 260px;
  display: flex;
  justify-content: flex-end;
}

.blackspace-login-btn {
  min-width: 160px;
  margin: 0;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: transparent;
  color: #2288ff;
  border: 1.5px solid #2288ff;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.blackspace-login-btn:hover {
  background: rgba(34, 136, 255, 0.12);
  color: #66aaff;
  border-color: #66aaff;
}

.blackspace-login-btn:active {
  background: rgba(34, 136, 255, 0.22);
}

.blackspace-user {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  padding: 9px;
  border: 1px solid rgba(0,255,200,0.22);
  background: rgba(4,4,12,0.82);
}

.blackspace-user-photo,
.blackspace-user-initial {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(0,255,200,0.38);
}

.blackspace-user-photo {
  object-fit: cover;
}

.blackspace-user-initial {
  display: grid;
  place-items: center;
  color: #00ffc8;
  font-weight: 900;
  background: rgba(0,255,200,0.08);
}

.blackspace-user-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.blackspace-user-name,
.blackspace-user-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blackspace-user-name {
  color: #dde;
  font-size: 0.78rem;
  font-weight: 700;
}

.blackspace-user-email {
  color: #667;
  font-size: 0.66rem;
}

.blackspace-wallet {
  width: min(720px, 100%);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.blackspace-wallet-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(255,204,0,0.20);
  background: rgba(255,204,0,0.06);
  flex-shrink: 0;
}

.blackspace-wallet-main {
  flex: 1 1 180px;
}

.blackspace-wallet-packages {
  flex: 0 1 auto;
  border-color: rgba(168,85,247,0.30);
  background: rgba(168,85,247,0.07);
}

.blackspace-wallet-label {
  color: #667;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.blackspace-wallet-value {
  color: #ffcc00;
  font-size: 1.15rem;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(255,204,0,0.35);
}

.blackspace-wallet-gems {
  color: #a855f7;
  text-shadow: 0 0 14px rgba(168,85,247,0.32);
}

.blackspace-games {
  display: grid;
  grid-template-columns: minmax(0, 720px);
  gap: 14px;
  align-items: start;
}

.blackspace-game-card {
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(260px, 1fr);
  gap: 22px;
  padding: 16px;
  border: 1px solid rgba(0,255,200,0.25);
  background: rgba(8, 8, 20, 0.88);
  box-shadow: 0 20px 60px rgba(0,0,0,0.32);
}

.blackspace-game-preview {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(0,255,200,0.16);
  background: #080814;
}

.blackspace-preview-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20,20,60,0.65) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,20,60,0.65) 1px, transparent 1px);
  background-size: 26px 26px;
}

.blackspace-preview-platform {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 48px;
  height: 10px;
  background: #0d0d22;
  border-top: 2px solid #00ffc8;
}

.blackspace-preview-player {
  position: absolute;
  left: 52%;
  bottom: 58px;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 1px solid rgba(0,255,200,0.8);
  box-shadow: 0 0 18px rgba(0,255,200,0.25);
}

.blackspace-preview-platform.subir {
  bottom: auto;
  top: 56px;
}

.blackspace-preview-player.subir {
  bottom: auto;
  top: 86px;
  box-shadow: 0 0 18px rgba(255,136,0,0.28);
}

.blackspace-preview-runner-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 44px;
  height: 10px;
  background: #0d0d22;
  border-top: 2px solid #ffcc00;
}

.blackspace-preview-door {
  position: absolute;
  bottom: 54px;
  width: 30px;
  height: 58px;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.16);
}

.blackspace-preview-door::after {
  content: '';
  position: absolute;
  right: 5px;
  top: 28px;
  width: 4px;
  height: 4px;
  background: currentColor;
}

.blackspace-preview-door.true {
  left: 54%;
  color: #ffffff;
  border-color: #ffffff;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 18px rgba(255,255,255,0.3);
}

.blackspace-preview-door.gray {
  left: 28%;
  color: #999999;
  border-color: #777777;
  background: rgba(120,120,120,0.28);
}

.blackspace-preview-door.green {
  left: 76%;
  color: #00dd88;
  border-color: #00dd88;
  background: rgba(0,200,120,0.22);
}

.blackspace-preview-player.entrar {
  left: 18%;
  bottom: 56px;
  box-shadow: 0 0 18px rgba(255,204,0,0.28);
}

.surpresa-preview {
  background:
    radial-gradient(circle at 50% 50%, rgba(0,255,217,0.08), transparent 24%),
    linear-gradient(180deg, #05050f, #070b18 62%, #04040d);
}

.blackspace-preview-core-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 126px;
  height: 126px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(63,128,255,0.35);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(0,255,217,0.08);
}

.blackspace-preview-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: rgba(0,255,217,0.95);
  box-shadow: 0 0 20px rgba(0,255,217,0.35);
}

.blackspace-preview-player.surpresa {
  left: 50%;
  top: 70%;
  bottom: auto;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px rgba(0,255,217,0.28);
}

.blackspace-preview-enemy {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255,255,255,0.12);
}

.blackspace-preview-enemy.enemy-a {
  left: 18%;
  top: 28%;
  background: #22cc66;
}

.blackspace-preview-enemy.enemy-b {
  right: 18%;
  top: 38%;
  background: #3a8bff;
}

.blackspace-preview-enemy.enemy-c {
  left: 26%;
  bottom: 18%;
  background: #ff4d5a;
}

/* ── Torre preview tile ─────────────────────── */
.torre-preview {
  overflow: hidden;
  background: linear-gradient(180deg, #07030f 0%, #0d0720 55%, #110b08 100%);
}

/* Debris (lava rising from bottom) */
.torre-preview::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22%;
  background: linear-gradient(180deg, transparent, rgba(180,20,40,0.55) 40%, rgba(220,30,50,0.82));
  border-top: 2px solid rgba(255,60,80,0.7);
  animation: torre-debris-rise 2.4s ease-in-out infinite alternate;
  z-index: 2;
}
@keyframes torre-debris-rise {
  0%   { height: 18%; }
  100% { height: 28%; }
}

/* Door at the top */
.blackspace-preview-tower {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 38px;
  background: rgba(0,20,10,0.9);
  border: 2px solid #00ff88;
  box-shadow: 0 0 16px rgba(0,255,136,0.45);
  z-index: 4;
}

/* Door arrow */
.blackspace-preview-tower::before {
  content: '↑';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #00ff88;
  font-size: 1rem;
  text-shadow: 0 0 8px #00ff88;
}

/* Platform spans — 4 platforms at different heights */
.blackspace-preview-tower span {
  position: absolute;
  height: 5px;
  border-radius: 2px;
  background: #00ffc8;
  box-shadow: 0 0 8px rgba(0,255,200,0.5);
}

.blackspace-preview-tower span:nth-child(1) {
  width: 52px; left: -22px; bottom: -52px;
  background: #aa44ff;
  box-shadow: 0 0 8px rgba(170,68,255,0.5);
}
.blackspace-preview-tower span:nth-child(2) {
  width: 44px; left: 18px; bottom: -92px;
  background: #00ffc8;
}
.blackspace-preview-tower span:nth-child(3) {
  width: 48px; left: -26px; bottom: -132px;
  background: #ff8833;
  box-shadow: 0 0 8px rgba(255,136,51,0.5);
}
.blackspace-preview-tower span:nth-child(4) {
  width: 40px; left: 10px; bottom: -172px;
  background: #00ffc8;
}

/* Player block — bouncing up between platforms */
.blackspace-preview-stone {
  position: absolute;
  left: calc(50% - 8px);
  width: 16px;
  height: 16px;
  background: #ffffff;
  border: 2px solid #00ffc8;
  box-shadow: 0 0 12px rgba(0,255,200,0.6);
  z-index: 5;
  animation: torre-player-climb 1.8s ease-in-out infinite;
}
@keyframes torre-player-climb {
  0%   { bottom: 28%; }
  30%  { bottom: 44%; }
  55%  { bottom: 58%; }
  75%  { bottom: 72%; }
  90%  { bottom: 82%; }
  100% { bottom: 82%; opacity: 0; }
}

/* Floor badge (top-right) */
.blackspace-preview-rank {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(34,197,94,0.65);
  color: #22c55e;
  background: rgba(34,197,94,0.08);
  font-size: 0.75rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  text-shadow: 0 0 8px rgba(34,197,94,0.5);
  z-index: 6;
}

.blackspace-game-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.blackspace-game-kicker {
  color: #ffcc00;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.blackspace-game-info h2 {
  color: #00ffc8;
  font-size: 1.75rem;
  letter-spacing: 0.12em;
}

.blackspace-game-info p {
  color: #889;
  font-size: 0.82rem;
  line-height: 1.55;
}

.blackspace-game-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #667;
  font-size: 0.72rem;
}

.blackspace-game-stats strong {
  color: #00ffc8;
}

.blackspace-play-btn {
  max-width: 220px;
  margin-top: 4px;
}

.btn-hub-back {
  flex-shrink: 0;
}

#btn-open-blackspace {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

#btn-side-menu-open,
#side-menu-overlay,
#side-menu-drawer {
  display: none !important;
}

/* ===================== SIDE DRAWER MENU ===================== */
.side-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 900;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.side-menu-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: block; /* ainda ocupa layout durante transição */
}

.side-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(280px, 82vw);
  background: linear-gradient(180deg, #0a0a16 0%, #05050c 100%);
  border-right: 1px solid rgba(0, 255, 200, 0.22);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.55), 1px 0 0 rgba(168, 85, 247, 0.12);
  z-index: 910;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.24s ease;
  padding-top: env(safe-area-inset-top);
}
.side-menu-drawer.hidden {
  transform: translateX(-100%);
  pointer-events: none;
}

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.side-menu-title {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  letter-spacing: 0.32em;
  color: #00ffc8;
  text-shadow: 0 0 10px rgba(0, 255, 200, 0.35);
}
.side-menu-close {
  background: transparent;
  border: none;
  color: #889;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.side-menu-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.side-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 10px;
  flex: 1;
  overflow-y: auto;
}

.side-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #ccd;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.side-menu-item:hover {
  background: rgba(0, 255, 200, 0.07);
  border-color: rgba(0, 255, 200, 0.28);
  color: #00ffc8;
}
.side-menu-item:active {
  transform: translateY(1px);
}
.side-menu-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}
.side-menu-label {
  flex: 1;
}

.side-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 10px 8px;
}

.side-menu-item-danger:hover {
  background: rgba(255, 80, 80, 0.08);
  border-color: rgba(255, 80, 80, 0.28);
  color: #ff9090;
}

/* ── Lista de jogos estilo hub (igual à página inicial) ── */
.side-menu-games {
  padding: 16px 14px 10px;
  gap: 10px;
}

.side-menu-game-item {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: #cce6ff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.side-menu-game-item:hover {
  background: rgba(0, 255, 200, 0.05);
  border-color: rgba(0, 255, 200, 0.32);
  color: #e6fff9;
}

.side-menu-game-item.active {
  background: rgba(0, 255, 200, 0.10);
  border-color: rgba(0, 255, 200, 0.55);
  color: #00ffc8;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 200, 0.18), 0 0 12px rgba(0, 255, 200, 0.12);
}

/* ── Rodapé com botão Inicio ── */
.side-menu-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 10px;
}

/* ===================== MENU (novo layout) ===================== */
.menu-fullscreen {
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: rgba(10, 10, 20, 0.97);
  border-left: 1px solid rgba(0,255,200,0.12);
  border-right: 1px solid rgba(0,255,200,0.12);
}

/* ── Barra superior ── */
.menu-topbar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0.42), rgba(0,0,0,0));
  flex-shrink: 0;
}

.menu-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.menu-topbar-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.game-title-top {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  color: #00ffc8;
  text-shadow: 0 0 24px rgba(0,255,200,0.62);
  text-transform: uppercase;
}

.menu-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Recursos no topbar (energia + gemas) ── */
.menu-topbar-resources {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.menu-res-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.menu-res-energy {
  border-color: rgba(255, 200, 0, 0.3);
  background: rgba(255, 200, 0, 0.08);
}

.menu-res-gems {
  border-color: rgba(100, 160, 255, 0.3);
  background: rgba(100, 160, 255, 0.08);
}

.menu-res-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.menu-res-value {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.04em;
  color: #dde;
}

.menu-actions-below {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 390px;
  margin-top: -4px;
}

.btn-topbar {
  background: transparent;
  border: 1px solid rgba(0,255,200,0.25);
  color: #00ffc8;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 9px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-topbar:hover {
  background: rgba(0,255,200,0.1);
  border-color: rgba(0,255,200,0.55);
}

.btn-topbar-sm {
  font-size: 0.65rem;
  padding: 4px 7px;
  border-color: rgba(255,255,255,0.15);
  color: #778;
}

.btn-topbar-google {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  color: #ccc;
  border-color: rgba(255,255,255,0.2);
}

.btn-topbar-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.user-profile {
  position: relative;
  z-index: 30;
}

.user-avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(0,255,200,0.38);
  background: rgba(0, 255, 200, 0.08);
  box-shadow: 0 0 18px rgba(0,255,200,0.16);
  color: #00ffc8;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  display: grid;
  place-items: center;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-initial {
  font-size: 1rem;
  font-weight: 900;
}

.user-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 190px;
  padding: 10px;
  border: 1px solid rgba(0,255,200,0.28);
  background: rgba(7, 7, 17, 0.98);
  box-shadow: 0 18px 38px rgba(0,0,0,0.42);
  z-index: 31;
}

.user-name-top {
  display: block;
  font-size: 0.72rem;
  color: #00ffc8;
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-email-top {
  display: block;
  color: #667;
  font-size: 0.62rem;
  margin: 3px 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Área central ── */
.menu-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 20px;
  overflow-y: auto;
}

.heroic-meta-strip {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 2px;
}

.heroic-meta-chip {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(91, 225, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(10,18,36,0.92), rgba(8,12,24,0.98)),
    radial-gradient(circle at top left, rgba(0,255,200,0.10), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.heroic-meta-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0,255,200,0.1);
  border: 1px solid rgba(0,255,200,0.18);
  font-size: 0.95rem;
}

.heroic-meta-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b8cab;
}

.heroic-meta-value {
  color: #f3fbff;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

/* Preview animado */
.menu-preview-canvas {
  display: block;
  width: 100%;
  height: 184px;
  border: 1px solid rgba(82,208,255,0.2);
  border-radius: 18px;
  margin-bottom: 8px;
  background:
    radial-gradient(circle at top, rgba(0,255,200,0.08), transparent 42%),
    linear-gradient(180deg, rgba(4,7,18,0.92), rgba(8,14,32,0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 18px 40px rgba(0,0,0,0.32);
}

/* Botão JOGAR grande */
.btn-play-big {
  font-size: 1.5rem !important;
  padding: 18px 0 !important;
  width: 100%;
  max-width: 360px;
  letter-spacing: 0.25em !important;
  border-radius: 18px;
}

.game-subtitle {
  font-size: 0.75rem;
  color: #445;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: -6px;
}

/* compat — old refs */
.sound-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.2s;
}
.sound-btn:hover { border-color: rgba(0,255,200,0.5); }

/* ===================== PAUSA ===================== */
.pause-content {
  text-align: center;
  max-width: 300px;
}

.pause-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #00ffc8;
  text-shadow: 0 0 24px rgba(0,255,200,0.4);
  margin-bottom: 32px;
}

.pause-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: none;
  border-radius: 2px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.btn-primary {
  background: #00ffc8;
  color: #0a0a0f;
  box-shadow: 0 0 20px rgba(0, 255, 200, 0.35);
}

.btn-primary:hover {
  background: #33ffd4;
  box-shadow: 0 0 30px rgba(0, 255, 200, 0.6);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(0, 255, 200, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #00ffc8;
  border: 1px solid rgba(0, 255, 200, 0.4);
}

.btn-secondary:hover {
  background: rgba(0, 255, 200, 0.08);
  border-color: rgba(0, 255, 200, 0.7);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.75rem;
  width: auto;
  background: transparent;
  color: #556;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-small:hover {
  color: #e0e0e0;
  border-color: rgba(255,255,255,0.3);
}

.btn-icon {
  border: none;
  background: none;
  cursor: pointer;
}

.btn-back {
  background: none;
  border: none;
  color: #556;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 24px;
  display: block;
  transition: color 0.2s;
  letter-spacing: 0.05em;
}

.btn-back:hover {
  color: #00ffc8;
}

.shop-heroic-lead {
  color: #8da4bf;
  font-size: 0.8rem;
  line-height: 1.6;
  margin: -2px 0 18px;
}

.shop-heroic-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.shop-heroic-stat {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(79,209,255,0.18);
  background:
    radial-gradient(circle at top left, rgba(0,255,200,0.10), transparent 60%),
    rgba(255,255,255,0.03);
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px 10px;
  align-items: center;
}

.shop-heroic-stat-icon {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(0,255,200,0.08);
}

.shop-heroic-stat-name {
  color: #6c89a9;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.shop-heroic-stat-value {
  color: #f5fbff;
  font-size: 1rem;
}

.shop-heroic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.shop-heroic-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(79,209,255,0.16);
  background:
    linear-gradient(180deg, rgba(12,18,34,0.94), rgba(7,11,22,0.98)),
    radial-gradient(circle at top right, rgba(91,225,255,0.10), transparent 48%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.shop-heroic-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.shop-heroic-card-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0,255,200,0.08);
  border: 1px solid rgba(0,255,200,0.16);
  font-size: 1rem;
}

.shop-heroic-card-title {
  color: #f5fbff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.shop-heroic-card .shop-item-sub,
.shop-heroic-card .shop-item-next {
  margin-bottom: 8px;
}

.shop-heroic-card .btn-buy {
  width: 100%;
  margin-top: 8px;
}

body[data-current-game="heroi-heroico"] .menu-main {
  gap: 14px;
}

body[data-current-game="heroi-heroico"] .menu-preview-canvas {
  height: 240px;
}

body[data-current-game="heroi-heroico"] .btn-play-big {
  max-width: 380px;
  background: linear-gradient(135deg, #00e4c1, #34f0ff);
  color: #02121b;
}

body[data-current-game="heroi-heroico"] .game-subtitle {
  color: #7f96b2;
  text-align: center;
  max-width: 440px;
}

/* ===================== AUTH ===================== */
.auth-content {
  max-width: 360px;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #00ffc8;
  margin-bottom: 28px;
  text-align: center;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 2px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 16px;
}

.btn-google:hover {
  background: #f0f0f0;
  box-shadow: 0 2px 12px rgba(255,255,255,0.15);
}

.google-icon {
  flex-shrink: 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #334;
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-mode-switch {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.auth-mode-btn {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: #8892a5;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  cursor: pointer;
}

.auth-mode-btn.active {
  border-color: rgba(0,255,200,0.35);
  background: rgba(0,255,200,0.08);
  color: #00ffc8;
}

.input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  color: #e0e0e0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.input:focus {
  border-color: rgba(0, 255, 200, 0.4);
  background: rgba(0, 255, 200, 0.03);
}

.input::placeholder {
  color: #445;
}

.auth-forgot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -2px;
  padding: 12px;
  border: 1px solid rgba(0,255,200,0.14);
  background: rgba(0,255,200,0.04);
}

.auth-helper-text {
  color: #8e9aae;
  font-size: 0.78rem;
  line-height: 1.5;
}

.password-rules {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.password-rules-title {
  color: #aeb8c8;
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.password-rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.password-rule-item {
  color: #7c8595;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-rule-item::before {
  content: 'x';
  color: #ff4466;
  font-weight: 700;
  text-transform: uppercase;
}

.password-rule-item.is-valid {
  color: #c8fff1;
}

.password-rule-item.is-valid::before {
  content: 'ok';
  color: #00ffc8;
}

.auth-link {
  text-align: center;
  font-size: 0.8rem;
  color: #556;
  margin-top: 4px;
}

.link-btn {
  background: none;
  border: none;
  color: #00ffc8;
  font-family: 'Courier New', Courier, monospace;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.link-btn:hover {
  color: #33ffd4;
}

.error-msg {
  color: #ff4466;
  font-size: 0.82rem;
  text-align: center;
  margin-top: 10px;
  padding: 8px;
  background: rgba(255, 68, 102, 0.08);
  border: 1px solid rgba(255, 68, 102, 0.2);
  border-radius: 2px;
}

.success-msg {
  color: #00ffc8;
  font-size: 0.82rem;
  text-align: center;
  margin-top: 10px;
  padding: 8px;
  background: rgba(0, 255, 200, 0.08);
  border: 1px solid rgba(0, 255, 200, 0.2);
  border-radius: 2px;
}

.auth-skip {
  text-align: center;
  margin-top: 20px;
  font-size: 0.8rem;
  color: #334;
}

/* ===================== RANKING ===================== */
.ranking-content {
  max-width: 440px;
  max-height: 85vh;
}

.ranking-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #00ffc8;
  margin-bottom: 24px;
  text-align: center;
}

.ranking-list {
  overflow-y: auto;
  max-height: 60vh;
}

.ranking-list::-webkit-scrollbar {
  width: 4px;
}

.ranking-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.03);
}

.ranking-list::-webkit-scrollbar-thumb {
  background: rgba(0,255,200,0.2);
  border-radius: 2px;
}

.ranking-entry {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
  transition: background 0.15s;
}

.ranking-entry:hover {
  background: rgba(0,255,200,0.03);
}

.ranking-entry.top-3 .rank {
  color: #ffcc00;
  font-weight: 900;
}

.rank {
  text-align: center;
  color: #445;
  font-size: 0.8rem;
  font-weight: 700;
}

.rank-name {
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #00ffc8;
  font-weight: 700;
  white-space: nowrap;
}

.rank-date {
  color: #334;
  font-size: 0.75rem;
  white-space: nowrap;
}

.ranking-header {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 10px;
  padding: 6px 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-size: 0.7rem;
  color: #334;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.loading {
  text-align: center;
  color: #334;
  padding: 40px;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
}

/* ===================== GAME OVER ===================== */
.gameover-content {
  text-align: center;
  max-width: 360px;
}

.gameover-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #ff4466;
  text-shadow: 0 0 30px rgba(255, 68, 102, 0.5);
  margin-bottom: 36px;
}

.score-display {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 28px;
}

.score-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: #445;
  text-transform: uppercase;
}

.score-value {
  font-size: 2rem;
  font-weight: 900;
  color: #e0e0e0;
}

.score-value.best {
  color: #00ffc8;
  text-shadow: 0 0 20px rgba(0,255,200,0.4);
}

.save-msg {
  font-size: 0.8rem;
  color: #00ffc8;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.save-msg.error,
.ranking-error {
  color: #ff4466;
  letter-spacing: 0.04em;
}

.gameover-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===================== POWERUP OVERLAY ===================== */
#powerup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  transition: box-shadow 0.3s;
}

#powerup-overlay.speed-reducer-active {
  box-shadow: inset 0 0 80px rgba(0, 120, 255, 0.25);
}

#powerup-overlay.jet-active {
  box-shadow: inset 0 0 80px rgba(255, 140, 0, 0.25);
}

/* ===================== UTILITY ===================== */
.hidden {
  display: none !important;
}

/* ===================== SCROLLBAR ===================== */
.screen-content::-webkit-scrollbar {
  width: 4px;
}

.screen-content::-webkit-scrollbar-track {
  background: transparent;
}

.screen-content::-webkit-scrollbar-thumb {
  background: rgba(0,255,200,0.2);
  border-radius: 2px;
}

/* ===================== PLAYER STATS (MENU) ===================== */
.menu-stats-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin: 0 0 2px;
}

.total-points-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 130px;
}

.high-score-display .pts-label {
  color: #00ffc8;
}

.pts-label {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: #445;
  text-transform: uppercase;
}

.pts-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffcc00;
  text-shadow: 0 0 18px rgba(255, 204, 0, 0.45);
  letter-spacing: 0.05em;
}

.pts-value.best {
  color: #00ffc8;
  text-shadow: 0 0 18px rgba(0, 255, 200, 0.38);
}

.pts-value.energy {
  color: #00ffc8;
  text-shadow: 0 0 16px rgba(0, 255, 200, 0.28);
}

.pts-value.gems {
  color: #a855f7;
  text-shadow: 0 0 16px rgba(168, 85, 247, 0.32);
}

.menu-status-msg {
  min-height: 18px;
  margin-top: 8px;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #7de9d3;
}

.menu-status-msg.error {
  color: #ff7788;
}

/* ===================== POINTS (GAME OVER) ===================== */
.points-earned-row,
.points-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 2px;
}

.points-earned-row {
  background: rgba(255, 204, 0, 0.06);
  border: 1px solid rgba(255, 204, 0, 0.15);
}

.points-total-row {
  background: rgba(0, 255, 200, 0.04);
  border: 1px solid rgba(0, 255, 200, 0.1);
  margin-bottom: 20px;
}

.pts-earned-label,
.pts-total-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: #556;
  text-transform: uppercase;
}

.pts-earned-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffcc00;
  text-shadow: 0 0 12px rgba(255, 204, 0, 0.4);
}

.pts-total-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #00ffc8;
}

/* ===================== SHOP ===================== */
.shop-content {
  max-width: 460px;
  max-height: 85vh;
}

.shop-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #00ffc8;
  margin-bottom: 20px;
  text-align: center;
}

.shop-balance-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 204, 0, 0.06);
  border: 1px solid rgba(255, 204, 0, 0.2);
  border-radius: 2px;
  margin-bottom: 24px;
}

.shop-balance-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: #556;
  text-transform: uppercase;
}

.shop-balance-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffcc00;
  text-shadow: 0 0 12px rgba(255, 204, 0, 0.4);
}

/* ===================== ADMIN ===================== */
.admin-content {
  max-width: 1100px;
  max-height: 88vh;
}

.admin-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #00ffc8;
  margin-bottom: 20px;
  text-align: center;
}

.admin-catalog-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.admin-catalog-card,
.admin-panel {
  border: 1px solid rgba(0,255,200,0.16);
  background: rgba(8, 8, 20, 0.72);
}

.admin-catalog-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}

.admin-catalog-card strong {
  color: #ffcc00;
  font-size: 1rem;
}

.admin-catalog-card small,
.admin-catalog-label {
  color: #778;
}

.admin-catalog-label,
.admin-section-title {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-search {
  margin: 0;
}

.quiz-editor-content {
  width: min(1100px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.quiz-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.quiz-editor-label {
  display: block;
  margin: 10px 0 6px;
  color: #8fa7bc;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-editor-textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
}

.quiz-editor-inline {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.quiz-editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quiz-editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 70vh;
  overflow: auto;
}

.quiz-editor-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(82,255,217,0.16);
  background: rgba(10,18,34,0.86);
  color: #dff6ff;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quiz-editor-item-editing {
  border-color: #ffd84d;
  box-shadow: 0 0 0 2px rgba(255,216,77,0.18);
  background: rgba(40,30,8,0.5);
}
.quiz-editor-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #8fa7bc;
}
.quiz-editor-item-id {
  opacity: 0.55;
  font-weight: 400;
}
.quiz-editor-item-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: #ffd84d;
  color: #1a1700;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.quiz-editor-item-prompt {
  font-size: 0.92rem;
}
.quiz-editor-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.quiz-editor-item-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
}
.quiz-editor-item-btn-danger {
  border-color: rgba(255,90,90,0.4);
  color: #ff7b7b;
}
.quiz-editor-item-btn-danger:hover {
  background: rgba(255,90,90,0.12);
}

@media (max-width: 900px) {
  .quiz-editor-grid {
    grid-template-columns: 1fr;
  }

  .quiz-editor-actions {
    grid-template-columns: 1fr;
  }
}

.admin-refresh-btn {
  min-width: 110px;
}

.admin-rankings-btn {
  min-width: 190px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  min-height: 420px;
}

.admin-panel {
  padding: 12px;
}

.admin-section-title {
  color: #00ffc8;
  margin-bottom: 10px;
}

.admin-user-list,
.admin-user-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-user-list {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-user-item {
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #e0e0e0;
  cursor: pointer;
}

.admin-user-item.active {
  border-color: rgba(0,255,200,0.45);
  background: rgba(0,255,200,0.08);
}

.admin-user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.admin-user-meta,
.admin-detail-meta,
.admin-grant-meta,
.admin-empty {
  color: #788;
  font-size: 0.74rem;
  line-height: 1.45;
}

.admin-user-wallet,
.admin-detail-wallet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.admin-wallet-chip {
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.admin-wallet-chip strong {
  display: block;
  font-size: 0.96rem;
  color: #ffcc00;
}

.admin-wallet-chip.coins strong {
  color: #ffcc00;
}

.admin-wallet-chip.gems strong {
  color: #a855f7;
}

.admin-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.admin-detail-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.admin-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.admin-toggle-row label {
  color: #dde;
  font-size: 0.8rem;
}

.admin-grants {
  display: grid;
  gap: 10px;
}

.admin-grant-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.admin-grant-btn {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid rgba(255,204,0,0.22);
  background: rgba(255,204,0,0.06);
  color: #ffdf88;
  cursor: pointer;
}

.admin-grant-btn.gems {
  border-color: rgba(168,85,247,0.26);
  background: rgba(168,85,247,0.08);
  color: #d9b3ff;
}

.admin-grant-log {
  display: grid;
  gap: 8px;
}

.admin-grant-entry {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.admin-grant-title {
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
}

.shop-section {
  margin-bottom: 22px;
}

.shop-section-header {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: #445;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-section-note {
  font-size: 0.65rem;
  color: #334;
  letter-spacing: 0.1em;
  text-transform: none;
}

.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}

.shop-item:hover {
  background: rgba(255,255,255,0.02);
}

.shop-item-left {
  flex: 1;
  min-width: 0;
}

.shop-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #dde;
  margin-bottom: 4px;
}

.shop-item-sub {
  font-size: 0.75rem;
  color: #556;
  letter-spacing: 0.05em;
}

.shop-item-next {
  font-size: 0.72rem;
  color: #00ffc8;
  opacity: 0.6;
  margin-top: 3px;
}

.shop-item-right {
  flex-shrink: 0;
}

.btn-buy {
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  width: auto;
  background: rgba(0, 255, 200, 0.1);
  color: #00ffc8;
  border: 1px solid rgba(0, 255, 200, 0.35);
  border-radius: 2px;
  font-family: 'Courier New', Courier, monospace;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-buy:hover:not(:disabled) {
  background: rgba(0, 255, 200, 0.18);
  border-color: rgba(0, 255, 200, 0.6);
}

.btn-buy:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-buy.btn-owned {
  background: rgba(0, 255, 200, 0.08);
  color: #00ffc8;
  border-color: rgba(0, 255, 200, 0.5);
  opacity: 1;
  cursor: default;
}

.btn-danger {
  background: rgba(255, 68, 102, 0.08);
  color: #ff4466;
  border: 1px solid rgba(255, 68, 102, 0.3);
}

.btn-danger:hover {
  background: rgba(255, 68, 102, 0.16);
  border-color: rgba(255, 68, 102, 0.55);
}

.shop-unequip-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

/* Flash feedback */
.flash-ok {
  animation: flash-ok-anim 0.4s ease-out;
}

@keyframes flash-ok-anim {
  0%   { box-shadow: inset 0 0 0 2px rgba(0,255,200,0); }
  40%  { box-shadow: inset 0 0 0 2px rgba(0,255,200,0.6); }
  100% { box-shadow: inset 0 0 0 2px rgba(0,255,200,0); }
}

/* ===================== CONSUMABLE QTY BADGE ===================== */
.consumable-qty {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 900;
  color: #ffcc00;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
  margin-left: 4px;
}

/* Row that holds name + qty badge inline */
.shop-item-qty {
  display: flex;
  align-items: center;
  gap: 0;
}

/* ===================== BLACKSPACE LOGIN BUTTON ===================== */
.blackspace-login-btn {
  min-width: 160px;
  background: transparent;
  color: #2288ff;
  border: 1.5px solid #2288ff;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.blackspace-login-btn:hover {
  background: rgba(34, 136, 255, 0.12);
  color: #66aaff;
  border-color: #66aaff;
}

/* ===================== STORE BUTTON (HUB WALLET) ===================== */
.blackspace-store-btn,
.blackspace-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Courier New', Courier, monospace;
}

.blackspace-store-btn {
  color: #a855f7;
  background: rgba(168, 85, 247, 0.08);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
}

.blackspace-store-btn:hover {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.6);
  color: #c084fc;
}

.blackspace-feedback-btn {
  color: #33d1ff;
  background: rgba(51, 209, 255, 0.08);
  border: 1.5px solid rgba(51, 209, 255, 0.35);
}

.blackspace-feedback-btn:hover {
  background: rgba(51, 209, 255, 0.16);
  border-color: rgba(51, 209, 255, 0.62);
  color: #8ee8ff;
}

/* ===================== BS MODAL OVERLAY ===================== */
.bs-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bs-modal-overlay.hidden {
  display: none !important;
}

/* ===================== BS MODAL BOX ===================== */
.bs-modal {
  position: relative;
  background: #0a0a14;
  border: 1px solid rgba(0, 255, 200, 0.22);
  border-radius: 6px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0,255,200,0.06);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bs-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: #446;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 3px;
  transition: color 0.15s;
}

.bs-modal-close:hover {
  color: #fff;
}

.bs-modal-title {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
}

.bs-modal-subtitle {
  font-size: 0.75rem;
  color: #778;
  text-align: center;
  letter-spacing: 0.06em;
  margin-bottom: 22px;
}

.bs-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.bs-modal-btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(34, 136, 255, 0.16);
  border: 1.5px solid rgba(34, 136, 255, 0.55);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Courier New', Courier, monospace;
}

.bs-modal-btn-primary:hover {
  background: rgba(34, 136, 255, 0.28);
  border-color: rgba(34, 136, 255, 0.85);
}

.bs-modal-btn-ghost {
  width: 100%;
  padding: 10px;
  font-size: 0.78rem;
  color: #556;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Courier New', Courier, monospace;
}

.bs-modal-btn-ghost:hover {
  color: #aab;
  border-color: rgba(255,255,255,0.18);
}

/* ===================== STORE MODAL ===================== */
.bs-modal-store {
  max-width: 680px;
  width: 96vw;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.bs-modal-store * {
  box-sizing: border-box;
}

.growth-controls-modal {
  max-width: 460px;
}

.growth-controls-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.growth-control-row {
  display: grid;
  gap: 6px;
}

.growth-control-label {
  color: #a5dfff;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.growth-control-select {
  width: 100%;
  background: rgba(2, 18, 32, 0.94);
  color: #f2fbff;
  border: 1px solid rgba(0, 255, 200, 0.24);
  letter-spacing: 0.05em;
}

.growth-control-select:focus {
  outline: none;
  border-color: rgba(0, 255, 200, 0.7);
  box-shadow: 0 0 0 2px rgba(0, 255, 200, 0.16);
}

.store-loading,
.store-error,
.store-notice {
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 18px 0;
}

.store-loading {
  color: #778;
}

.store-error {
  color: #ff6677;
}

.store-notice {
  color: #00ffc8;
  opacity: 0.7;
}

.store-section {
  margin-bottom: 24px;
}

.store-section-title {
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: #445;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.store-product-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.store-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  transition: background 0.15s, border-color 0.15s;
}

.store-product-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(168, 85, 247, 0.28);
}

.store-product-icon {
  flex: 0 0 36px;
  font-size: 1.6rem;
  text-align: center;
  line-height: 1;
}

.store-product-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.store-product-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #dde;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.store-product-amount {
  font-size: 0.72rem;
  color: #778;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-product-card .store-buy-btn,
.store-buy-btn {
  flex: 0 0 auto;
  width: auto;
  padding: 9px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
  border: 1.5px solid rgba(168, 85, 247, 0.38);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Courier New', Courier, monospace;
  white-space: nowrap;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
}

.store-buy-btn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.7);
  color: #c084fc;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.store-buy-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bs-modal-feedback {
  max-width: 560px;
  width: min(94vw, 560px);
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.feedback-label {
  color: #aeb8c8;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.feedback-select {
  appearance: none;
  color: #eef4ff;
  background-color: #0a0a14;
}

.feedback-select option {
  color: #111111;
  background: #ffffff;
}

.feedback-textarea {
  min-height: 150px;
  resize: vertical;
}

/* ===================== ADMIN WALLET EDITOR ===================== */
.admin-wallet-edit-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.admin-wallet-edit-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 80px auto;
  gap: 8px;
  align-items: center;
}

.admin-wallet-edit-row-wide {
  grid-template-columns: minmax(140px, 1fr) 90px minmax(180px, 1.6fr) auto;
}

.admin-num-input {
  padding: 6px 8px;
  font-size: 0.82rem;
  width: 100%;
}

.admin-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9aa3b2;
  font-size: 0.78rem;
}

.admin-inline-check input {
  margin: 0;
}

.admin-settings-hint {
  color: #9aa3b2;
  font-size: 0.78rem;
  line-height: 1.4;
}

.admin-loss-entry {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.admin-loss-status.available {
  color: #00ffc8;
}

.admin-loss-status.lost {
  color: #ffb060;
}

.admin-loss-status.unknown {
  color: #9aa3b2;
}

.admin-sm-btn {
  padding: 6px 10px;
  font-size: 0.72rem;
  width: auto;
  white-space: nowrap;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 480px) {
  .screen {
    align-items: stretch;
  }

  .screen-content {
    padding: calc(18px + env(safe-area-inset-top)) 20px calc(22px + env(safe-area-inset-bottom));
    border-radius: 0;
    border-left: none;
    border-right: none;
    max-width: 100%;
    max-height: none;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .game-title {
    font-size: 2.2rem;
  }

  .blackspace-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .blackspace-sidebar {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: calc(12px + env(safe-area-inset-top)) 12px 10px;
    border-right: none;
    border-bottom: 1px solid rgba(0,255,200,0.14);
    overflow-x: auto;
  }

  .blackspace-mark {
    flex: 0 0 auto;
    margin: 0 8px 0 0;
    font-size: 0.78rem;
  }

  .blackspace-game-tab {
    flex: 0 0 auto;
    width: auto;
    min-width: 142px;
    padding: 10px 9px;
    font-size: 0.66rem;
  }

  .blackspace-main {
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  }

  .blackspace-header {
    flex-direction: column;
    gap: 16px;
  }

  .blackspace-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .blackspace-title {
    font-size: 2.25rem;
    letter-spacing: 0.12em;
  }

  .blackspace-subtitle {
    font-size: 0.74rem;
  }

  .blackspace-account,
  .blackspace-login-btn,
  .blackspace-user {
    width: 100%;
    min-width: 0;
  }

  .blackspace-user {
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
  }

  .blackspace-wallet {
    width: 100%;
    flex-wrap: wrap;
  }

  .blackspace-wallet-main {
    flex: 1 1 100%;
  }

  .blackspace-store-btn,
  .blackspace-feedback-btn {
    flex: 1 1 auto;
  }

  .blackspace-wallet-label {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .blackspace-wallet-value {
    font-size: 0.98rem;
  }

  .blackspace-game-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px;
  }

  .blackspace-game-preview {
    min-height: 150px;
  }

  .blackspace-game-info h2 {
    font-size: 1.25rem;
  }

  .blackspace-game-info p {
    font-size: 0.75rem;
  }

  .blackspace-play-btn {
    max-width: none;
  }

  .btn-hub-back {
    font-size: 0.62rem;
    padding: 5px 7px;
  }

  .auth-content,
  .pause-content,
  .gameover-content {
    justify-content: center;
  }

  .shop-content,
  .ranking-content,
  .admin-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .shop-content .btn-back,
  .ranking-content .btn-back,
  .admin-content .btn-back {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -18px 16px;
    padding: calc(14px + env(safe-area-inset-top)) 18px 12px;
    background: rgba(10, 10, 20, 0.98);
    border-bottom: 1px solid rgba(0, 255, 200, 0.12);
  }

  .shop-title,
  .ranking-title,
  .admin-title {
    font-size: 1.35rem;
    margin-bottom: 18px;
  }

  .admin-catalog-bar,
  .admin-toolbar,
  .admin-grid,
  .admin-user-wallet,
  .admin-detail-wallet {
    grid-template-columns: 1fr;
  }

  .admin-wallet-edit-row,
  .admin-wallet-edit-row-wide {
    grid-template-columns: 1fr;
  }

  .shop-balance-bar {
    margin-bottom: 20px;
  }

  .shop-section {
    margin-bottom: 18px;
  }

  .shop-section-header {
    letter-spacing: 0.18em;
  }

  .shop-item {
    gap: 10px;
    padding: 12px 0;
  }

  .shop-item-name {
    font-size: 0.82rem;
  }

  .shop-item-sub,
  .shop-item-next {
    font-size: 0.68rem;
  }

  .btn-buy {
    padding: 9px 10px;
    min-width: 86px;
    font-size: 0.68rem;
  }

  .ranking-list {
    max-height: none;
    flex: 1;
  }

  .ranking-entry,
  .ranking-header {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .rank-date,
  .ranking-header span:last-child {
    display: none;
  }

  /* Recursos no topbar — mobile */
  .menu-topbar-resources {
    right: 8px;
    gap: 4px;
  }

  .menu-res-chip {
    padding: 3px 6px;
  }

  .menu-res-icon {
    font-size: 0.75rem;
  }

  .menu-res-value {
    font-size: 0.68rem;
  }

  /* Store modal — mobile: uma coluna */
  .store-product-list {
    grid-template-columns: 1fr;
  }

  .store-product-card {
    gap: 10px;
    padding: 11px 10px;
  }

  .store-product-icon {
    flex: 0 0 30px;
    font-size: 1.4rem;
  }

  .store-product-name {
    font-size: 0.84rem;
  }

  .store-product-amount {
    font-size: 0.7rem;
  }

  .store-buy-btn {
    padding: 8px 10px;
    font-size: 0.74rem;
  }
}

/* ===================================================
   HUB — Nova interface
   =================================================== */

/* O hub Blackspace precisa rolar no mobile — o .screen pai é position:fixed
   com overflow:hidden, então habilitamos scroll vertical SÓ neste screen. */
#screen-blackspace {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: block;           /* sobrescreve o flex centralizador do .screen */
  align-items: initial;
  justify-content: initial;
}

/* Página completa */
.bs-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #05050f;
  color: #fff;
  font-family: 'Courier New', Courier, monospace;
}

/* ── Navbar ─────────────────────────────────────── */
.bs-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 20px;
  height: 58px;
  background: rgba(6,6,16,0.97);
  border-bottom: 1px solid rgba(0,255,200,0.13);
  position: sticky;
  top: 0;
  z-index: 90;
  flex-shrink: 0;
}

.bs-navbar-logo {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.26em;
  color: #00ffc8;
  text-shadow: 0 0 16px rgba(0,255,200,0.4);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.bs-navbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.bs-navbar-coins {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: rgba(255,216,77,0.1);
  border: 1px solid rgba(255,216,77,0.22);
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffd84d;
  white-space: nowrap;
  flex-shrink: 0;
}

.bs-coin-value {
  color: #ffd84d;
  font-weight: 700;
}

.bs-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 11px;
  height: 34px;
  border: 1px solid rgba(0,255,200,0.18);
  background: rgba(0,255,200,0.05);
  color: #b0f0e8;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: 'Courier New', Courier, monospace;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.bs-nav-btn:hover {
  background: rgba(0,255,200,0.12);
  border-color: rgba(0,255,200,0.38);
  color: #00ffc8;
}

.bs-nav-icon-btn {
  padding: 6px 10px;
  font-size: 1rem;
}

.bs-login-btn {
  background: rgba(0,255,200,0.1);
  border-color: rgba(0,255,200,0.45);
  color: #00ffc8;
  font-weight: 700;
  padding: 6px 14px;
}

/* ── Avatar wrap + dropdown ─────────────────────── */
.bs-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.bs-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(0,255,200,0.35);
  background: rgba(0,0,0,0.55);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  padding: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bs-avatar-btn:hover,
.bs-avatar-btn[aria-expanded="true"] {
  border-color: rgba(0,255,200,0.7);
  box-shadow: 0 0 12px rgba(0,255,200,0.22);
}

.bs-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.bs-avatar-initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 900;
  color: #00ffc8;
  pointer-events: none;
}

.bs-avatar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: rgba(9,9,20,0.98);
  border: 1px solid rgba(0,255,200,0.18);
  border-radius: 10px;
  box-shadow: 0 8px 36px rgba(0,0,0,0.6);
  z-index: 200;
  overflow: hidden;
  animation: bsDropIn 0.14s ease;
}

@keyframes bsDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bs-dropdown-user {
  padding: 14px 16px 11px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.bs-dropdown-name {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-dropdown-email {
  display: block;
  font-size: 0.72rem;
  color: #5a6080;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.bs-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.bs-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #aab0c8;
  font-size: 0.84rem;
  font-family: 'Courier New', Courier, monospace;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.bs-dropdown-item:hover {
  background: rgba(0,255,200,0.07);
  color: #00ffc8;
}

.bs-dropdown-logout {
  color: #ff7070;
}

.bs-dropdown-logout:hover {
  background: rgba(255,80,80,0.07);
  color: #ff6e6e;
}

/* ── Grade de jogos ─────────────────────────────── */
.bs-games-section {
  flex: 1;
  padding: 28px 24px 40px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.bs-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.bs-game-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,255,200,0.1);
  background: rgba(8,8,20,0.88);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: 'Courier New', Courier, monospace;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  outline: none;
}

.bs-game-tile:hover,
.bs-game-tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 44px rgba(0,255,200,0.13);
  border-color: rgba(0,255,200,0.32);
}

.bs-game-tile:active {
  transform: translateY(-1px);
}

/* Thumbnail = o blackspace-game-preview existente, numa proporção quadrada */
.bs-game-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #05050f;
}

.bs-tile-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Garante que o preview preenche sem altura mínima fixa */
.bs-game-tile .blackspace-game-preview {
  position: relative;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
}

.bs-game-label {
  padding: 10px 13px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid rgba(0,255,200,0.08);
  background: rgba(6,6,16,0.6);
}

.bs-game-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e8eaf0;
  letter-spacing: 0.03em;
}

.bs-game-score {
  font-size: 0.7rem;
  color: #00bb88;
  letter-spacing: 0.04em;
}

/* ── Responsivo ─────────────────────────────────── */
@media (max-width: 1100px) {
  .bs-games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .bs-games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .bs-games-section {
    padding: 18px 14px 32px;
  }
  .bs-nav-text {
    display: none;
  }
  .bs-navbar {
    padding: 0 12px;
    gap: 6px;
  }
  .bs-navbar-coins {
    padding: 4px 9px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .bs-games-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .bs-game-tile .blackspace-game-preview {
    aspect-ratio: 16 / 9;
  }
  .bs-game-thumb {
    aspect-ratio: 16 / 9;
  }
  .bs-games-section {
    padding: 14px 12px 28px;
  }

  /* Navbar ainda mais compacto para caber tudo sem sobreposição */
  .bs-navbar {
    padding: 0 8px;
    gap: 4px;
    height: 52px;
  }
  .bs-navbar-logo {
    font-size: 0.80rem;
    letter-spacing: 0.14em;
  }
  .bs-navbar-actions {
    gap: 4px;
  }
  .bs-nav-btn {
    padding: 5px 8px;
    height: 30px;
    font-size: 0.76rem;
  }
  .bs-nav-icon-btn {
    padding: 5px 7px;
  }
  .bs-navbar-coins {
    padding: 3px 7px;
    font-size: 0.72rem;
    gap: 3px;
  }
}

/* Telas muito estreitas (≤360px): encolhe o logo ao máximo */
@media (max-width: 360px) {
  .bs-navbar-logo {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }
  .bs-navbar-coins {
    font-size: 0.68rem;
    padding: 3px 6px;
  }
  .bs-nav-btn {
    padding: 4px 6px;
    height: 28px;
  }
}

/* ===================================================
   TELA HUB — Entrada Principal
   =================================================== */

#screen-hub {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05050f;
}

.hub-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-height: 100%;
  padding: 40px 24px;
  overflow: hidden;
  text-align: center;
}

/* ── Estrelas decorativas ────────────────────── */
.hub-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hub-stars span {
  position: absolute;
  display: block;
  background: #fff;
  border-radius: 50%;
  animation: hubStarFloat linear infinite;
  opacity: 0;
}

.hub-stars span:nth-child(1)  { width:2px; height:2px; left:10%;  top:15%; animation-duration:8s;  animation-delay:0s;   opacity:.5; }
.hub-stars span:nth-child(2)  { width:1px; height:1px; left:20%;  top:70%; animation-duration:11s; animation-delay:2s;   opacity:.4; }
.hub-stars span:nth-child(3)  { width:3px; height:3px; left:35%;  top:25%; animation-duration:9s;  animation-delay:1s;   opacity:.3; }
.hub-stars span:nth-child(4)  { width:1px; height:1px; left:55%;  top:80%; animation-duration:13s; animation-delay:3s;   opacity:.5; }
.hub-stars span:nth-child(5)  { width:2px; height:2px; left:70%;  top:10%; animation-duration:7s;  animation-delay:0.5s; opacity:.4; }
.hub-stars span:nth-child(6)  { width:1px; height:1px; left:80%;  top:55%; animation-duration:12s; animation-delay:4s;   opacity:.6; }
.hub-stars span:nth-child(7)  { width:2px; height:2px; left:90%;  top:35%; animation-duration:10s; animation-delay:1.5s; opacity:.3; }
.hub-stars span:nth-child(8)  { width:3px; height:3px; left:5%;   top:50%; animation-duration:14s; animation-delay:2.5s; opacity:.4; }
.hub-stars span:nth-child(9)  { width:1px; height:1px; left:45%;  top:5%;  animation-duration:9s;  animation-delay:0.8s; opacity:.5; }
.hub-stars span:nth-child(10) { width:2px; height:2px; left:60%;  top:90%; animation-duration:11s; animation-delay:3.5s; opacity:.3; }
.hub-stars span:nth-child(11) { width:1px; height:1px; left:25%;  top:40%; animation-duration:16s; animation-delay:1.2s; opacity:.4; }
.hub-stars span:nth-child(12) { width:2px; height:2px; left:75%;  top:65%; animation-duration:8s;  animation-delay:5s;   opacity:.5; }
.hub-stars span:nth-child(13) { width:3px; height:3px; left:15%;  top:85%; animation-duration:10s; animation-delay:2s;   opacity:.3; }
.hub-stars span:nth-child(14) { width:1px; height:1px; left:50%;  top:45%; animation-duration:13s; animation-delay:0.3s; opacity:.5; }
.hub-stars span:nth-child(15) { width:2px; height:2px; left:88%;  top:20%; animation-duration:9s;  animation-delay:4.5s; opacity:.4; }
.hub-stars span:nth-child(16) { width:1px; height:1px; left:3%;   top:30%; animation-duration:15s; animation-delay:1.8s; opacity:.6; }
.hub-stars span:nth-child(17) { width:3px; height:3px; left:40%;  top:75%; animation-duration:7s;  animation-delay:6s;   opacity:.3; }
.hub-stars span:nth-child(18) { width:1px; height:1px; left:65%;  top:8%;  animation-duration:12s; animation-delay:0.7s; opacity:.5; }
.hub-stars span:nth-child(19) { width:2px; height:2px; left:32%;  top:60%; animation-duration:10s; animation-delay:3.2s; opacity:.4; }
.hub-stars span:nth-child(20) { width:1px; height:1px; left:93%;  top:48%; animation-duration:14s; animation-delay:2.8s; opacity:.3; }

@keyframes hubStarFloat {
  0%   { transform: translateY(0)   scale(1);   opacity: inherit; }
  50%  { opacity: 1; }
  100% { transform: translateY(-30px) scale(1.4); opacity: 0; }
}

/* ── Logo ────────────────────────────────────── */
.hub-logo {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(1.8rem, 6vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.28em;
  color: #00ffc8;
  text-shadow:
    0 0 20px rgba(0,255,200,0.55),
    0 0 60px rgba(0,255,200,0.2);
  margin-bottom: 14px;
}

/* ── Tagline ─────────────────────────────────── */
.hub-tagline {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  margin-bottom: 44px;
}

/* ── Grade de portais ────────────────────────── */
.hub-portals {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 680px;
}

/* ── Card portal base ────────────────────────── */
.hub-portal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 240px;
  min-height: 210px;
  padding: 32px 24px 28px;
  border-radius: 20px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  -webkit-tap-highlight-color: transparent;
}

.hub-portal-bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.07;
  transition: opacity 0.22s;
}

.hub-portal:hover .hub-portal-bg,
.hub-portal:focus-visible .hub-portal-bg {
  opacity: 0.14;
}

.hub-portal:hover,
.hub-portal:focus-visible {
  transform: translateY(-5px) scale(1.02);
  outline: none;
}

.hub-portal:active {
  transform: scale(0.98);
}

/* ── Jogos ───────────────────────────────────── */
.hub-portal-games {
  background: rgba(0, 255, 200, 0.05);
  border-color: rgba(0, 255, 200, 0.25);
  box-shadow:
    0 4px 24px rgba(0,255,200,0.08),
    inset 0 1px 0 rgba(0,255,200,0.1);
}
.hub-portal-games .hub-portal-bg {
  background: radial-gradient(circle at 50% 0%, #00ffc8, transparent 70%);
}
.hub-portal-games:hover {
  border-color: rgba(0, 255, 200, 0.6);
  box-shadow:
    0 12px 40px rgba(0,255,200,0.18),
    inset 0 1px 0 rgba(0,255,200,0.15);
}
.hub-portal-games .hub-portal-name { color: #00ffc8; }
.hub-portal-games .hub-portal-arrow { color: #00ffc8; }

/* ── Studio ──────────────────────────────────── */
.hub-portal-studio {
  background: rgba(99, 102, 241, 0.07);
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow:
    0 4px 24px rgba(99,102,241,0.1),
    inset 0 1px 0 rgba(99,102,241,0.1);
}
.hub-portal-studio .hub-portal-bg {
  background: radial-gradient(circle at 50% 0%, #a855f7, transparent 70%);
}
.hub-portal-studio:hover {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow:
    0 12px 40px rgba(168,85,247,0.2),
    inset 0 1px 0 rgba(168,85,247,0.15);
}
.hub-portal-studio .hub-portal-name { color: #a78bfa; }
.hub-portal-studio .hub-portal-arrow { color: #a78bfa; }

/* ── Elementos internos ──────────────────────── */
.hub-portal-icon {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.hub-portal-name {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hub-portal-sub {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
}

.hub-portal-arrow {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}

.hub-portal:hover .hub-portal-arrow,
.hub-portal:focus-visible .hub-portal-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Responsivo ──────────────────────────────── */
@media (max-width: 520px) {
  .heroic-meta-strip,
  .shop-heroic-summary,
  .shop-heroic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hub-portals {
    flex-direction: column;
    gap: 16px;
  }
  .hub-portal {
    min-height: 150px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
    padding: 20px 24px;
  }
  .hub-portal-icon {
    font-size: 2rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .hub-portal-name { font-size: 1.1rem; }
  .hub-portal-arrow {
    position: static;
    opacity: 1;
    transform: none;
    margin-left: auto;
    flex-shrink: 0;
  }
  .hub-logo { letter-spacing: 0.14em; }
}
.shop-disabled .bs-navbar-coins,
.shop-disabled #btn-open-store,
.shop-disabled #btn-shop,
.shop-disabled #btn-go-shop,
.shop-disabled .menu-res-energy,
.shop-disabled .menu-res-gems,
.shop-disabled #menu-total-pts,
.shop-disabled #btn-edit-profile,
.shop-disabled #profile-coins-display,
.shop-disabled .points-earned-row,
.shop-disabled .points-total-row,
.shop-disabled #screen-shop,
.shop-disabled .char-btn-buy {
  display: none !important;
}

.games-trimmed #btn-open-cair,
.games-trimmed #btn-open-entrar,
.games-trimmed #btn-open-surpresa,
.games-trimmed #btn-open-click,
.games-trimmed #btn-open-click-rapido,
.games-trimmed #btn-open-helicoptero,
.games-trimmed #btn-open-heroi,
.games-trimmed #btn-side-game-cair,
.games-trimmed #btn-side-game-entrar,
.games-trimmed #btn-side-game-surpresa,
.games-trimmed #btn-side-game-click,
.games-trimmed #btn-side-game-click-rapido,
.games-trimmed #btn-side-game-helicoptero,
.games-trimmed #btn-side-game-heroi,
.games-trimmed #modal-store,
.games-trimmed #modal-char-picker,
.games-trimmed #modal-profile-editor {
  display: none !important;
}
