/* Interadex (site): a mesma cara da Interadex do jogo. Aparelho vermelho com a lente azul e os
   ledinhos em cima, e a telinha digital por dentro (azul-esverdeada, com linhas de varredura).
   Feito primeiro para o celular; no computador a descrição fica do lado dos cards. */

:root { --fonte: 'Fredoka', 'Segoe UI', 'Arial Rounded MT Bold', Arial, sans-serif; --tinta: #2a0e12; --amarelo: #ffd21f; --tela: #e9fbff; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--fonte); color: var(--tela);
  background: radial-gradient(ellipse at 50% 0%, #2b3f7a 0%, #141d3a 60%, #0b1024 100%) fixed;
  padding: 10px max(8px, env(safe-area-inset-right)) 24px max(8px, env(safe-area-inset-left));
}
button, input { font-family: var(--fonte); }
[hidden] { display: none !important; }

.dex-aparelho {
  width: min(1100px, 100%); margin: 0 auto; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #e8323a 0%, #c41f2a 100%); border: 5px solid var(--tinta); border-radius: 26px;
  box-shadow: 0 8px 0 var(--tinta), 0 16px 36px rgba(0, 0, 0, .45); padding: 10px 12px 14px;
}
.dex-cabeca { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.dex-lente {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 4px solid #f4f2ea;
  background: radial-gradient(circle at 35% 35%, #bfe9ff 0 18%, #2f8bff 40%, #1747a8 100%); box-shadow: 0 0 0 3px var(--tinta), 0 0 14px rgba(120, 200, 255, .8);
}
.dex-led { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--tinta); }
.dex-led.r { background: #ff4d5a; } .dex-led.a { background: var(--amarelo); } .dex-led.v { background: #4cd964; }
.dex-titulo { flex: 1; margin-left: 4px; font-weight: 700; font-size: 20px; letter-spacing: 3px; color: #fff5e6; text-shadow: 0 2px 0 var(--tinta); text-decoration: none; }
.dex-live {
  font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 3px solid var(--tinta);
  background: #fff5e6; color: var(--tinta); box-shadow: 0 3px 0 var(--tinta); white-space: nowrap;
}
.dex-live.ao-vivo { background: #ff4d5a; color: #fff; animation: pisca-live 1.6s ease-in-out infinite; }
@keyframes pisca-live { 50% { background: #ff8a93; } }

.dex-tela {
  display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 16px; border: 5px solid var(--tinta); min-height: 60vh;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at 30% 0%, #1d6d86 0%, #0f3e57 55%, #0a2a3e 100%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .45);
}
.dex-rodape { text-align: center; font-size: 12px; color: #ffe1e1; opacity: .85; margin-top: 8px; }

/* a busca pelo @ */
.dex-procura { display: flex; gap: 8px; }
.dex-procura input {
  flex: 1; min-width: 0; font-size: 17px; font-weight: 600; color: var(--tinta); background: #fff5e6;
  border: 3px solid var(--tinta); border-radius: 12px; padding: 8px 12px; box-shadow: 0 3px 0 var(--tinta); outline: none;
}
.dex-btn {
  font-weight: 700; font-size: 15px; color: var(--tinta); background: var(--amarelo); border: 3px solid var(--tinta); border-radius: 12px;
  padding: 6px 12px; cursor: pointer; box-shadow: 0 3px 0 var(--tinta); white-space: nowrap;
}
.dex-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--tinta); }
.dex-btn.claro { background: #fff5e6; }
.dex-resultados { display: flex; flex-direction: column; gap: 4px; background: rgba(4, 18, 30, .7); border: 2px solid rgba(233, 251, 255, .25); border-radius: 12px; padding: 6px; }
.dex-resultados button {
  display: flex; align-items: baseline; gap: 8px; text-align: left; width: 100%; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  color: var(--tela); background: rgba(233, 251, 255, .06); border: 1px solid rgba(233, 251, 255, .14); font-size: 16px; font-weight: 600;
}
.dex-resultados button:hover, .dex-resultados button:focus { background: rgba(255, 210, 31, .18); border-color: var(--amarelo); outline: none; }
.dex-resultados small { opacity: .7; font-weight: 500; }
.dex-resultados .nada { padding: 8px 10px; opacity: .8; font-size: 15px; }

/* início: quem está na ilha e a explicação */
.dex-bloco { background: rgba(4, 18, 30, .45); border: 2px solid rgba(233, 251, 255, .18); border-radius: 14px; padding: 10px; }
.dex-bloco-tit { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.dex-ilha { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dex-ilha .vazio { grid-column: 1 / -1; opacity: .75; font-size: 15px; }
.dex-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px; cursor: pointer; color: var(--tela);
  background: rgba(233, 251, 255, .08); border: 2px solid rgba(233, 251, 255, .18); font: 600 13px var(--fonte);
}
.dex-chip:hover { background: rgba(255, 210, 31, .16); border-color: var(--amarelo); }
.dex-chip img { width: 60px; height: 60px; object-fit: contain; }
.dex-chip span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dex-ajuda p { margin: 6px 0 0; font-size: 15px; line-height: 1.4; opacity: .92; }

/* o dono da Interadex */
.dex-dono { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dex-foto {
  flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--cor, #ffd21f); border: 3px solid var(--tela); font-weight: 700; font-size: 22px; color: #fff;
}
.dex-foto img { width: 100%; height: 100%; object-fit: cover; }
/* o nome pede uma linha boa só para ele; as insígnias e os botões descem quando não cabem */
.dex-quem { display: flex; flex-direction: column; min-width: 0; flex: 1 1 190px; }
.dex-nome { font-weight: 700; font-size: 21px; overflow-wrap: anywhere; line-height: 1.15; }
.dex-arroba { font-size: 13px; opacity: .75; overflow-wrap: anywhere; }
.dex-onde { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(233, 251, 255, .12); white-space: nowrap; }
.dex-onde.na-ilha { background: rgba(76, 217, 100, .25); color: #c8ffd4; }
.dex-ins { display: flex; gap: 3px; }
.insignia.apagada { filter: grayscale(1) brightness(.7); opacity: .4; }
.dex-resumo { flex-basis: 100%; font-size: 14px; opacity: .88; }

/* cards e descrição */
.dex-corpo { display: grid; grid-template-columns: 1fr; gap: 10px; }
.dex-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; align-content: start; }
.dex-card {
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 4px 8px; border-radius: 14px; cursor: pointer;
  background: rgba(233, 251, 255, .08); border: 2px solid rgba(233, 251, 255, .18); transition: transform .15s, background .15s, border-color .15s; user-select: none;
  color: var(--tela); font-family: var(--fonte);
}
.dex-card:hover { transform: translateY(-2px); background: rgba(233, 251, 255, .14); }
.dex-card.atual { border-color: var(--amarelo); background: rgba(255, 210, 31, .16); box-shadow: 0 0 12px rgba(255, 210, 31, .35); }
.dex-card.brilha { border-color: #ffe98a; }
.dex-card.pulo { animation: dex-pulo .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes dex-pulo { 0% { transform: scale(1); } 35% { transform: scale(1.12); box-shadow: 0 0 24px rgba(255, 210, 31, .85); } 100% { transform: scale(1); } }
.dex-card img { width: 64px; height: 64px; object-fit: contain; }
.dc-nome { font-weight: 700; font-size: 13px; }
.dc-nv { font-size: 12px; opacity: .85; }
.dc-iv { margin-top: 3px; font-size: 11px; }
.dc-lider { position: absolute; left: 6px; top: 4px; color: var(--amarelo); font-size: 16px; text-shadow: 0 1px 0 #000; }
.dc-lider.espera { font-size: 14px; }
.dc-time { position: absolute; right: 6px; bottom: 30px; color: #ff9f43; font-size: 15px; text-shadow: 0 1px 0 #000; }
.dc-brilho { position: absolute; right: 6px; top: 4px; font-size: 14px; }

.dex-detalhe { background: rgba(4, 18, 30, .55); border: 2px solid rgba(233, 251, 255, .2); border-radius: 14px; padding: 12px; }
.dd-topo { display: flex; gap: 12px; align-items: center; }
.dd-topo img { width: 100px; height: 100px; object-fit: contain; background: rgba(233, 251, 255, .08); border-radius: 14px; flex: none; }
.dd-nome { font-weight: 700; font-size: 23px; }
.dd-nv { font-size: 14px; opacity: .9; margin-bottom: 4px; }
.tipo {
  display: inline-block; color: #fff; font-weight: 700; font-size: 13px; padding: 2px 9px; border-radius: 999px; margin: 2px 2px 0 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35); border: 2px solid rgba(0, 0, 0, .25);
}
.dex-comp { display: block; width: 100%; margin-top: 10px; padding: 8px 12px; border-radius: 12px; text-align: center; font-weight: 700; font-size: 15px; }
.dex-comp.ja { color: #ffe98a; background: rgba(255, 210, 31, .14); border: 2px solid var(--amarelo); }
.dex-comp.espera { color: #bfe9ff; background: rgba(143, 220, 255, .12); border: 2px dashed #8fdcff; }
.dex-comp.dica { color: var(--tela); background: rgba(233, 251, 255, .07); border: 2px dashed rgba(233, 251, 255, .35); font-weight: 600; }
.dex-comp.dica code, .dex-dica code { font-family: var(--fonte); font-weight: 700; color: var(--amarelo); }
.dex-hab { margin-top: 10px; padding: 7px 10px; border-radius: 10px; background: rgba(233, 251, 255, .08); border: 1px solid rgba(233, 251, 255, .22); font-size: 14px; }
.dex-hab small { display: block; opacity: .8; margin-top: 2px; }
.dex-stats { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.dex-stat, .dex-xp { display: grid; grid-template-columns: 104px 1fr 44px; align-items: center; gap: 8px; font-size: 14px; }
.dex-stat b, .dex-xp b { text-align: right; font-size: 13px; }
.dex-xp { margin-top: 10px; grid-template-columns: 1fr; gap: 4px; }
.dex-xp b { text-align: left; }
.dex-barra { height: 12px; border-radius: 999px; background: rgba(233, 251, 255, .12); overflow: hidden; border: 1px solid rgba(233, 251, 255, .25); }
.dex-barra i { display: block; height: 100%; border-radius: 999px; transition: width .9s cubic-bezier(.2, .8, .3, 1); }
.dex-iv { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; flex-wrap: wrap; }
.dex-iv span { opacity: .8; margin-right: 2px; }
.dex-iv b { padding: 1px 8px; border-radius: 8px; background: rgba(233, 251, 255, .1); border: 1px solid rgba(233, 251, 255, .22); }
.dex-iv b.max { background: rgba(255, 210, 31, .22); border-color: var(--amarelo); color: #ffe98a; }
.dex-evo { margin-top: 12px; padding: 10px; border-radius: 12px; background: rgba(233, 251, 255, .07); border: 1px dashed rgba(233, 251, 255, .35); font-size: 14px; }
.dex-evo small { display: block; opacity: .75; margin-top: 2px; }
.dex-evo.final { text-align: center; font-weight: 700; color: #b9ffcf; }
.dex-sombras { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.dex-sombra { width: 84px; height: 84px; object-fit: contain; filter: brightness(0) drop-shadow(0 0 6px rgba(140, 220, 255, .85)); opacity: .9; }
.dex-sombra.mini { width: 52px; height: 52px; }
.dex-q { font-weight: 700; font-size: 26px; color: #8fdcff; text-shadow: 0 0 8px rgba(140, 220, 255, .8); }
.dex-dica { margin-top: 10px; font-size: 13px; opacity: .85; line-height: 1.4; }

/* o IV (cores iguais às do jogo) */
.ivb { display: inline-block; font: 700 12px/1.35 var(--fonte); padding: 0 5px; border-radius: 6px; color: #17151f; background: #c4c9d4; vertical-align: middle; white-space: nowrap; }
.ivb.iv-c { background: #8fd0ff; }
.ivb.iv-b { background: #7be38a; }
.ivb.iv-a { background: var(--amarelo); }
.ivb.iv-max { background: linear-gradient(90deg, #ff7ad9, #ffd21f); box-shadow: 0 0 8px rgba(255, 122, 217, .8); }

.dex-vazio { padding: 20px 10px; text-align: center; font-size: 16px; opacity: .9; }

/* aviso rapidinho (capturou, subiu de nível, evoluiu) */
.dex-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 12px); max-width: min(92vw, 520px); z-index: 10;
  padding: 10px 16px; border-radius: 14px; background: var(--tinta); color: #fff5e6; font-weight: 700; font-size: 16px; text-align: center;
  border: 3px solid var(--amarelo); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.dex-toast.ver { opacity: 1; transform: translate(-50%, 0); }

/* computador: a descrição fica do lado dos cards */
@media (min-width: 860px) {
  body { padding-top: 22px; }
  .dex-aparelho { padding: 12px 16px 18px; }
  .dex-lente { width: 46px; height: 46px; }
  .dex-titulo { font-size: 22px; }
  .dex-tela { padding: 12px; }
  .dex-corpo { grid-template-columns: 1fr 360px; align-items: start; }
  .dex-grade { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); max-height: 72vh; overflow-y: auto; padding-right: 4px; }
  .dex-card img { width: 84px; height: 84px; }
  .dc-nome { font-size: 14px; }
  .dex-detalhe { position: sticky; top: 12px; max-height: 72vh; overflow-y: auto; }
}
@media (max-width: 380px) {
  .dex-led { display: none; }
  .dex-titulo { font-size: 17px; letter-spacing: 2px; }
}
