/* ============================================================
   MIB JOGOS WIDGET — 3 game cards side-by-side
   Cada card: thumb edge-to-edge + 2 mini-colunas (ALL/48HR) com #rank
   Tema-agnóstico: usa CSS vars com defaults neutros.
   ============================================================ */

#mib-jogos-widget {
  /* Tokens default (sobrescrevíveis por página) */
  --mj-bg:        rgba(0, 0, 0, 0.55);
  --mj-card:     rgba(255, 255, 255, 0.03);
  --mj-border:   rgba(255, 255, 255, 0.12);
  --mj-accent:   #00e5ff;
  --mj-text:     rgba(230, 240, 250, 0.92);
  --mj-muted:    rgba(230, 240, 250, 0.45);
  --mj-dim:      rgba(230, 240, 250, 0.22);

  /* Cores das faixas de multiplicador */
  --mj-t0-bg:    #2D4454;  --mj-t0-fg:    #ffffff;  /* <2x       */
  --mj-t1-bg:    #DCDFE4;  --mj-t1-fg:    #000000;  /* 2-5x      */
  --mj-t5-bg:    #017BFF;  --mj-t5-fg:    #ffffff;  /* 5-10x     */
  --mj-t10-bg:   #ff9d00;  --mj-t10-fg:   #000000;  /* 10-100x   */
  --mj-t100-bg:  #00e701;  --mj-t100-fg:  #000000;  /* 100-1000x */
  --mj-t1k-bg:   #50e3c2;  --mj-t1k-fg:   #000000;  /* 1000x+   teal */
}

#mib-jogos-widget.mj-multi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  color: var(--mj-text);
}

/* =================== CARD =================== */
.mj-card {
  background: var(--mj-bg);
  border: 1px solid var(--mj-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.4) inset, 0 6px 22px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mj-card:hover {
  border-color: var(--mj-accent);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.4) inset, 0 6px 26px rgba(0, 0, 0, 0.6), 0 0 22px rgba(0, 229, 255, 0.18);
}

/* ====== HEADER do card: thumb centralizado (~70% largura) ====== */
.mj-card-head {
  position: relative;
  padding: 10px 0;
  cursor: pointer;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mj-thumb {
  width: 55%;
  max-width: 150px;
  height: auto;
  display: block;
  aspect-ratio: 180 / 236;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s;
}

.mj-card-head:hover .mj-thumb { transform: scale(1.04); }

/* ====== BODY do card (2 mini-colunas) ====== */
.mj-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--mj-border);
  flex: 1;
}

.mj-col {
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 8px 12px;
  min-height: 0;
}

.mj-col-title {
  font-size: 0.58rem;
  letter-spacing: 2.5px;
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--mj-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mj-col-sub {
  font-size: 0.45rem;
  letter-spacing: 1.5px;
  color: #ffffff;
  opacity: 0.75;
  font-weight: 400;
}

.mj-rounds {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ====== ROUND ITEM (rank | pill cravado | data hora inline) ====== */
.mj-round {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--mj-card);
  border: 1px solid var(--mj-border);
  transition: transform 0.15s, box-shadow 0.15s;
}

.mj-round:hover {
  transform: translateX(1px);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
}

.mj-rank {
  font-size: 0.95rem;
  line-height: 1;
  min-width: 22px;
  text-align: left;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

.mj-mult {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 0;
  border-radius: 3px;
  text-align: center;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
  width: 5.4rem;          /* cravado: comporta "999.999.999×" */
  box-sizing: border-box;
}

.mj-time {
  font-family: 'Arial Black', 'Arial Bold', Arial, sans-serif;
  color: #ffffff;
  letter-spacing: 0.2px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
  font-size: 0.55rem;
}

.mj-date { opacity: 0.75; }
.mj-hour { }

/* ====== FAIXAS DE COR (chapadas, sem efeitos) ====== */
.mj-tier-0   .mj-mult { background: var(--mj-t0-bg);   color: var(--mj-t0-fg); }
.mj-tier-1   .mj-mult { background: var(--mj-t1-bg);   color: var(--mj-t1-fg); }
.mj-tier-5   .mj-mult { background: var(--mj-t5-bg);   color: var(--mj-t5-fg); }
.mj-tier-10  .mj-mult { background: var(--mj-t10-bg);  color: var(--mj-t10-fg); }
.mj-tier-100 .mj-mult { background: var(--mj-t100-bg); color: var(--mj-t100-fg); }
.mj-tier-1k  .mj-mult { background: var(--mj-t1k-bg);  color: var(--mj-t1k-fg); }

/* ====== EMPTY / LOADING ====== */
.mj-empty, .mj-loading {
  padding: 14px 4px;
  text-align: center;
  color: var(--mj-dim);
  font-size: 0.6rem;
  letter-spacing: 2px;
}

.mj-loading::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--mj-border);
  border-top-color: var(--mj-accent);
  border-radius: 50%;
  animation: mj-spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes mj-spin {
  to { transform: rotate(360deg); }
}

/* =================== RESPONSIVO =================== */
/* Tablet: 2 cards por linha */
@media (max-width: 900px) {
  #mib-jogos-widget.mj-multi {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 card por linha + time empilhada abaixo do pill */
@media (max-width: 600px) {
  #mib-jogos-widget.mj-multi {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .mj-card-head { padding: 8px 0; }
  .mj-thumb { width: 38%; max-width: 110px; }
  .mj-col { padding: 10px 12px 12px; }
  .mj-col-title { font-size: 0.66rem; letter-spacing: 2px; }
  .mj-col-sub { font-size: 0.5rem; }

  /* Layout do round: rank coluna esquerda (rowspan 2), pill em cima, time embaixo */
  .mj-round {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      'rank mult'
      'rank time';
    row-gap: 3px;
    column-gap: 10px;
    padding: 6px 8px;
  }
  .mj-rank { grid-area: rank; align-self: center; font-size: 1.1rem; min-width: 26px; }
  .mj-mult { grid-area: mult; justify-self: stretch; font-size: 0.78rem; width: auto; padding: 3px 4px; }
  .mj-time { grid-area: time; justify-self: end; font-size: 0.62rem; gap: 6px; }
  .mj-date { font-size: 0.6rem; }
  .mj-hour { font-size: 0.66rem; }
}

/* Em telas menores, reduz font ligeiramente */
@media (max-width: 1280px) and (min-width: 901px) {
  .mj-mult { font-size: 0.55rem; width: 5rem; }
  .mj-time { font-size: 0.5rem; gap: 3px; }
  .mj-rank { font-size: 0.85rem; min-width: 18px; }
}

/* =================== BANNER PROPAGANDA (full-width abaixo do split) =================== */
.mj-promo-banner {
  display: block;
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(180, 0, 255, 0.12) 0%, rgba(255, 0, 128, 0.12) 50%, rgba(180, 0, 255, 0.12) 100%);
  border: 1px solid rgba(255, 0, 128, 0.35);
  border-radius: 8px;
  color: #fff;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(255, 0, 128, 0.6);
  animation: mj-promo-pulse 2.4s ease-in-out infinite;
  box-sizing: border-box;
}

.mj-promo-banner::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  animation: mj-promo-sweep 3.2s ease-in-out infinite;
}

.mj-promo-banner:hover {
  background: linear-gradient(90deg, rgba(255, 0, 128, 0.22) 0%, rgba(180, 0, 255, 0.22) 50%, rgba(255, 0, 128, 0.22) 100%);
  border-color: #ff0080;
  box-shadow: 0 0 24px rgba(255, 0, 128, 0.5);
  transform: translateY(-1px);
}

@keyframes mj-promo-pulse {
  0%, 100% { border-color: rgba(255, 0, 128, 0.35); }
  50%      { border-color: rgba(255, 0, 128, 0.7); }
}

@keyframes mj-promo-sweep {
  0%   { left: -100%; }
  60%, 100% { left: 200%; }
}

@media (max-width: 640px) {
  .mj-promo-banner { font-size: 0.66rem; letter-spacing: 1px; padding: 11px 12px; }
}

/* =================== BOTÃO WHATSAPP FLUTUANTE =================== */
#mj-wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.5);
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: mj-wa-ring 2.2s ease-in-out infinite;
}

#mj-wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7);
}

#mj-wa-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

@keyframes mj-wa-ring {
  0%   { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70%  { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45), 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 640px) {
  #mj-wa-float { width: 48px; height: 48px; bottom: 16px; right: 16px; }
  #mj-wa-float svg { width: 26px; height: 26px; }
}
