/* Myst Poketibia — interface no estilo clássico do OTClient */
:root {
  --bg: #1b1b1b;
  --panel: #2f2f2f;
  --panel-dark: #242424;
  --edge-light: #5c5c5c;
  --edge-dark: #0f0f0f;
  --slot: #1c1c1c;
  --text: #dcdcdc;
  --muted: #8e8e8e;
  --gold: #ffcb3c;
  --hp: #c22a2a;
  --hp-ok: #2fa935;
  --exp: #2f71d0;
  --font: Verdana, Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font: 11px var(--font); overflow: hidden; user-select: none; }
button, input, select { font: 11px var(--font); color: var(--text); }
canvas { image-rendering: pixelated; }
.hidden { display: none !important; }
.empty { color: var(--muted); padding: 6px; text-align: center; }

/* moldura "chanfrada" do OTClient */
.bevel { background: var(--panel); border: 1px solid var(--edge-dark); box-shadow: inset 1px 1px var(--edge-light), inset -1px -1px #151515; }
.inset { background: var(--slot); border: 1px solid #090909; box-shadow: inset 1px 1px #000, inset -1px -1px #3a3a3a; }
.btn { padding: 3px 9px; cursor: pointer; background: linear-gradient(#4a4a4a, #363636); border: 1px solid #0d0d0d; box-shadow: inset 1px 1px #6a6a6a, inset -1px -1px #222; }
.btn:hover { background: linear-gradient(#555, #3e3e3e); }
.btn:active { box-shadow: inset 1px 1px #222, inset -1px -1px #6a6a6a; }
.btn.on { background: linear-gradient(#7a2a2a, #5a1c1c); }
input.field, select.field { padding: 4px 6px; width: 100%; }

#game-container { display: flex; flex-direction: column; height: 100vh; }

/* barra superior */
#top-bar { height: 30px; display: flex; align-items: center; gap: 10px; padding: 0 8px; }
#top-bar .brand { font-weight: bold; color: var(--gold); letter-spacing: 1px; display: flex; align-items: center; gap: 6px; }
#top-bar .brand img { width: 18px; height: 18px; }
#top-bar .stats { display: flex; gap: 6px; margin-left: auto; }
#top-bar .stat { padding: 2px 8px; }
#top-bar .stat b { color: var(--gold); }
#top-bar .actions { display: flex; gap: 3px; }
#top-bar .actions .btn { padding: 2px 6px; min-width: 26px; height: 22px; display: grid; place-items: center; }
#top-bar .actions img { width: 16px; height: 16px; }

/* layout */
#main-view { flex: 1; display: grid; grid-template-columns: 212px 1fr 212px; gap: 3px; padding: 3px; min-height: 0; }
#sidebar-left, #sidebar-right { display: flex; flex-direction: column; gap: 3px; min-height: 0; }
#center-viewport { display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 0; }

.window { display: flex; flex-direction: column; min-height: 0; }
.window > .title { height: 18px; flex: 0 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 5px;
  font-weight: bold; color: #e8e8e8; text-shadow: 1px 1px #000; background: linear-gradient(#505050, #3a3a3a); border-bottom: 1px solid #111; }
.window > .title small { font-weight: normal; color: var(--muted); }
.window > .title .tbtn { width: 15px; height: 14px; padding: 0; font-size: 10px; line-height: 12px; }
.window > .body { padding: 4px; overflow: auto; min-height: 0; }
.window.grow { flex: 1; }

/* treinador */
.trainer-name { font-size: 13px; font-weight: bold; color: #fff; margin-bottom: 4px; display: flex; justify-content: space-between; }
.trainer-name span { color: var(--gold); font-size: 11px; }
.bar { position: relative; height: 13px; margin: 2px 0; }
.bar .fill { position: absolute; inset: 1px auto 1px 1px; width: 0; transition: width .2s; }
.bar .fill.hp { background: linear-gradient(#e04848, var(--hp)); }
.bar .fill.exp { background: linear-gradient(#4d8fe8, var(--exp)); }
.bar .fill.php { background: linear-gradient(#45c34b, var(--hp-ok)); }
.bar .txt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: #fff; text-shadow: 1px 1px #000; }
.trainer-meta { display: flex; justify-content: space-between; color: var(--muted); margin-top: 3px; }
.trainer-meta b { color: var(--gold); }

/* pokébar */
#pokebar-slots { display: flex; flex-direction: column; gap: 3px; }
.pokebar-slot { display: flex; gap: 5px; align-items: center; padding: 3px; cursor: pointer; }
.pokebar-slot:hover { border-color: #777; }
.pokebar-slot.active { box-shadow: inset 0 0 0 1px var(--gold); }
.pokebar-slot.fainted { opacity: .5; filter: grayscale(1); }
.pokebar-slot.vacant { opacity: .35; cursor: default; }
.pokebar-slot.dragging { opacity: .4; }
.pokebar-slot.drop, .inv-slot.drop { box-shadow: inset 0 0 0 2px var(--gold); }
.pokebar-slot .pic { width: 40px; height: 40px; flex: 0 0 40px; }
.pokebar-slot .info { flex: 1; min-width: 0; }
.pokebar-slot .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: bold; }
.pokebar-slot .name small { color: var(--gold); font-weight: normal; }
.pokebar-slot .sub { color: var(--muted); font-size: 10px; }
.pokebar-slot .key { color: var(--muted); font-size: 9px; align-self: flex-start; }

/* tela do jogo */
#canvas-wrapper { flex: 1; position: relative; min-height: 0; background: #000; border: 1px solid #000; box-shadow: 0 0 0 1px #444; }
#game-canvas { display: block; width: 100%; height: 100%; cursor: default; } /* a mira (crosshair) só no order/corda */
#zoom-controls { position: absolute; right: 5px; top: 5px; display: flex; gap: 2px; }
#zoom-controls .btn { width: 22px; height: 20px; padding: 0; }
#active-pokemon-hud { position: absolute; left: 5px; top: 5px; display: flex; gap: 5px; align-items: center; padding: 4px; min-width: 170px; background: rgba(30,30,30,.9); }
#active-pokemon-hud canvas { width: 40px; height: 40px; }
#active-pokemon-hud .hud-title { font-weight: bold; margin-bottom: 2px; }

/* golpes */
#cooldown-bar { display: flex; gap: 2px; padding: 3px; min-height: 46px; flex-wrap: wrap; justify-content: center; align-content: center; }
.move-slot { position: relative; width: 66px; height: 38px; cursor: pointer; display: grid; place-items: center; text-align: center; overflow: hidden; }
.move-slot .hk { position: absolute; left: 2px; top: 0; font-size: 9px; color: var(--muted); }
.move-slot .mn { font-size: 9px; line-height: 10px; padding: 8px 2px 0; }
.move-slot .cd { position: absolute; inset: 0; display: grid; place-items: center; font-weight: bold; font-size: 13px; color: #fff; background: rgba(0,0,0,.7); opacity: 0; }
.move-slot.on-cd .cd { opacity: 1; }
.move-slot.disabled { opacity: .35; cursor: not-allowed; }
.move-slot .tb { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }

/* chat */
#chat-container { height: 150px; display: flex; flex-direction: column; }
.chat-tabs { display: flex; gap: 1px; padding: 2px 2px 0; background: #222; }
.chat-tab { padding: 2px 10px; cursor: pointer; background: #3a3a3a; border: 1px solid #111; border-bottom: none; color: var(--muted); }
.chat-tab.active { background: #4b4b4b; color: #fff; }
.chat-tab.unread { color: #ff9a3c; }
.chat-messages { flex: 1; overflow-y: auto; padding: 3px 5px; background: #191919; font-size: 11px; line-height: 14px; user-select: text; }
.chat-msg .time { color: #6d6d6d; margin-right: 4px; }
.chat-msg .author { color: #f0f000; margin-right: 3px; }
.chat-msg.default .text { color: #f0f000; }
.chat-msg.server .text { color: #ffffff; }
.chat-msg.battle .text { color: #ff9a9a; }
.chat-msg.npc .author, .chat-msg.npc .text { color: #5fdcff; }
.chat-msg.world .author { color: var(--gold); }
.chat-msg.world .text { color: #e8e8e8; }
.chat-input-bar { display: flex; gap: 2px; padding: 2px; background: #222; }
.chat-input-bar input { flex: 1; padding: 3px 5px; }

/* minimapa */
.minimap-box { position: relative; height: 150px; }
#minimap-canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.minimap-controls { position: absolute; right: 3px; top: 3px; display: flex; flex-direction: column; gap: 2px; }
.minimap-controls .btn { width: 18px; height: 16px; padding: 0; font-size: 10px; }

/* batalha */
#battle-list { display: flex; flex-direction: column; gap: 2px; }
.battle-entry { display: flex; gap: 4px; align-items: center; padding: 2px; cursor: pointer; border: 1px solid transparent; }
.battle-entry:hover { border-color: #666; }
.battle-entry.targeted { border-color: #e02020; }
.battle-entry canvas { width: 26px; height: 26px; flex: 0 0 26px; }
.battle-entry .info { flex: 1; min-width: 0; }
.battle-entry .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.battle-entry .bar { height: 5px; margin: 1px 0 0; }

/* mochila (contêiner) */
.inventory-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; } /* 5 colunas de quadrados iguais */
.window > .body { overflow-x: hidden; }
.inv-slot { position: relative; min-width: 0; width: 100%; aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.inv-slot:hover { box-shadow: inset 0 0 0 1px #888; }
.inv-slot.selected { box-shadow: inset 0 0 0 1px var(--gold); }
.inv-slot canvas { width: 80%; height: auto; max-width: 30px; }
.inv-slot .count { position: absolute; right: 1px; bottom: 0; font-size: 9px; font-weight: bold; color: #fff; text-shadow: 1px 1px #000, -1px -1px #000; }
/* mochila: 4 colunas e itens maiores (com 5 colunas os itens ficavam pequenos demais) */
#inventory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
#inventory-grid .inv-slot canvas { width: 80%; max-width: 38px; }
#inventory-grid .inv-slot .count { right: 2px; bottom: 1px; font-size: 11px; }
/* pokébolas da mochila no mesmo tamanho dos itens */
#ball-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
#ball-row .ball-slot canvas { width: 80%; max-width: 38px; }
.money-line { margin-top: 4px; display: flex; justify-content: space-between; color: var(--muted); }
.money-line b { color: var(--gold); }

/* janelas modais */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.45); }
.modal-overlay.active { display: flex; }
.modal-card { width: min(520px, 94vw); max-height: 90vh; display: flex; flex-direction: column; }
.modal-card.wide { width: min(920px, 96vw); }
.modal-header { display: flex; align-items: center; gap: 6px; padding: 4px 6px; font-weight: bold; background: linear-gradient(#505050, #3a3a3a); border-bottom: 1px solid #111; }
.modal-header h2 { font-size: 12px; flex: 1; }
.modal-body { padding: 8px; overflow: auto; }
.form-group { margin-bottom: 8px; }
.form-group label { display: block; margin-bottom: 3px; color: var(--muted); }
.login-title { text-align: center; font-size: 20px; font-weight: bold; color: var(--gold); margin: 4px 0 10px; letter-spacing: 2px; }
.starters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 4px; }
.starter-choice { display: flex; flex-direction: column; align-items: center; padding: 4px; cursor: pointer; }
.starter-choice.selected { box-shadow: inset 0 0 0 1px var(--gold); }
.login-status { min-height: 16px; margin: 6px 0; color: var(--gold); }
.btn-wide { width: 100%; padding: 7px; font-weight: bold; }

/* ---------------------------------------------------------------- minha conta */
.acc-card, .st-card { position: relative; width: min(620px, 94vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 16px; background: #12151d; border: 1px solid rgba(255, 203, 60, .22); box-shadow: 0 30px 80px rgba(0,0,0,.7), inset 0 1px rgba(255,255,255,.05);
  animation: card-in .18s ease-out; user-select: text; }
@keyframes card-in { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.acc-x { position: absolute; top: 10px; right: 12px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; font-size: 18px; line-height: 1; }
.acc-x:hover { background: rgba(255,80,80,.6); }
.acc-hero { position: relative; display: flex; gap: 18px; align-items: center; padding: 22px 24px 18px;
  background: radial-gradient(circle at 18% 30%, rgba(255,203,60,.28), transparent 55%), radial-gradient(circle at 90% 0%, rgba(80,120,255,.25), transparent 50%), linear-gradient(160deg, #262b3a, #151821); }
.acc-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,203,60,.5), transparent); }
.acc-avatar { position: relative; flex: none; width: 104px; height: 104px; border-radius: 50%;
  background: radial-gradient(circle at 50% 70%, rgba(255,255,255,.12), rgba(0,0,0,.35) 70%); border: 2px solid rgba(255,203,60,.45);
  box-shadow: 0 0 0 6px rgba(255,203,60,.07), 0 10px 30px rgba(0,0,0,.5); }
.acc-avatar canvas { width: 104px; height: 104px; image-rendering: auto; }
.acc-lvl { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 3px 12px; border-radius: 20px; white-space: nowrap;
  background: linear-gradient(#ffd75a, #d29a1c); color: #1a1305; font-weight: bold; font-size: 11px; box-shadow: 0 3px 0 #7a5208; }
.acc-lvl b { font-size: 14px; }
.acc-id { min-width: 0; flex: 1; }
.acc-id h2 { font-size: 26px; color: #fff; letter-spacing: .5px; margin: 6px 0 2px; text-shadow: 0 2px 10px rgba(0,0,0,.6); overflow: hidden; text-overflow: ellipsis; }
.acc-sub { color: #a8b1c3; font-size: 11px; }
.acc-exp { margin-top: 12px; height: 8px; border-radius: 6px; background: rgba(0,0,0,.45); overflow: hidden; box-shadow: inset 0 1px 2px #000; }
.acc-exp i { display: block; height: 100%; background: linear-gradient(90deg, #2f71d0, #6fb4ff); border-radius: 6px; box-shadow: 0 0 10px rgba(80,160,255,.6); transition: width .4s; }
.acc-exp-text { display: block; margin-top: 4px; color: #8a93a3; font-size: 10px; }
.acc-group { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 10px; font-weight: bold; letter-spacing: .5px; text-transform: uppercase;
  background: #2b3140; color: #c9d2e3; border: 1px solid #3a4256; }
.acc-group.g2 { background: #1d3a2a; color: #7ddc9a; border-color: #2c5a40; }
.acc-group.g3 { background: #4a2808; color: #ffa53a; border-color: #b8650f; } /* GM: laranja (como a tag do chat e do mapa) */
.acc-group.g4 { background: #3a1d4a; color: #d59bff; border-color: #5b2d77; }
.acc-group.g5 { background: linear-gradient(#ffd75a, #d29a1c); color: #1a1305; border-color: #7a5208; }
.st-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.st-cat { cursor: pointer; font-family: inherit; opacity: .45; padding: 4px 11px; }
.st-cat b { margin-left: 4px; opacity: .8; }
.st-cat:hover:not(:disabled) { opacity: .8; }
.st-cat.active { opacity: 1; box-shadow: 0 0 0 2px rgba(255,203,60,.55); }
.st-cat:disabled { cursor: default; }
/* busca em cima, filtro de categoria embaixo */
.st-row.st-poke-filter { flex-direction: column; align-items: stretch; flex-wrap: nowrap; margin-bottom: 10px; }
.st-row.st-poke-filter .st-search { width: 100%; min-width: 0; flex: none; }
.st-select { cursor: pointer; }
.acc-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 14px 18px 4px; }
.acc-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 10px; background: #1a1e29; border: 1px solid #262c3a; }
.acc-stat span { font-size: 16px; }
.acc-stat b { color: #fff; font-size: 13px; }
.acc-stat small { color: #7d8698; font-size: 9px; text-transform: uppercase; letter-spacing: .5px; }
.acc-tabs, .st-tabs { display: flex; gap: 4px; padding: 10px 18px 0; border-bottom: 1px solid #232838; }
.acc-tab, .st-tab { padding: 8px 14px; border: 0; border-radius: 8px 8px 0 0; background: none; color: #7d8698; font-weight: bold; cursor: pointer; border-bottom: 2px solid transparent; }
.acc-tab:hover, .st-tab:hover { color: #c9d2e3; }
.acc-tab.active, .st-tab.active { color: #ffcb3c; border-bottom-color: #ffcb3c; background: rgba(255,203,60,.06); }
.acc-body, .st-body { padding: 14px 18px 18px; overflow: auto; min-height: 220px; }
.acc-pane, .st-pane { display: none; }
.acc-pane.active, .st-pane.active { display: block; animation: card-in .15s ease-out; }
.acc-team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.acc-poke { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: linear-gradient(135deg, #1d2230, #171a24);
  border: 1px solid #272d3d; transition: transform .12s, border-color .12s; cursor: default; }
.acc-poke:hover { transform: translateY(-2px); border-color: rgba(255,203,60,.5); }
.acc-poke.out { border-color: rgba(80,200,120,.6); box-shadow: 0 0 12px rgba(80,200,120,.15); }
.acc-poke.fainted { filter: grayscale(.8); opacity: .75; }
.acc-poke.vacant { justify-content: center; border-style: dashed; min-height: 70px; }
.ap-empty { color: #4f5768; }
.ap-pic canvas { width: 52px; height: 52px; image-rendering: auto; }
.ap-info { flex: 1; min-width: 0; }
.ap-info b { color: #fff; font-size: 12px; } .ap-info small { color: #8a93a3; margin-left: 4px; }
.ap-types { margin: 3px 0; }
.ap-hp { height: 5px; border-radius: 4px; background: #0b0d13; overflow: hidden; }
.ap-hp i { display: block; height: 100%; background: linear-gradient(90deg, #2fa935, #7de06a); }
.ap-ball canvas { width: 24px; height: 24px; }
.acc-kv { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px 14px; padding: 12px 14px; border-radius: 10px; background: #1a1e29; margin-bottom: 14px; }
.acc-kv span { color: #7d8698; } .acc-kv b { color: #fff; }
.acc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acc-form label { display: flex; flex-direction: column; gap: 4px; color: #9aa3b4; font-size: 11px; }
.acc-form label:first-of-type { grid-column: 1 / -1; }
.acc-form input, .st-search, .st-num, .st-form input, .sc-run input { padding: 9px 11px; border-radius: 8px; border: 1px solid #2a303c; background: #0b0d13; color: #fff; font-size: 12px; }
.acc-form input:focus, .st-search:focus, .st-num:focus, .st-form input:focus, .sc-run input:focus { outline: none; border-color: #ffcb3c; box-shadow: 0 0 0 3px rgba(255,203,60,.15); }
.acc-btn { grid-column: 1 / -1; padding: 10px; border: 0; border-radius: 9px; cursor: pointer; font-weight: bold; font-size: 13px; color: #1a1305;
  background: linear-gradient(#ffd75a, #d29a1c); box-shadow: 0 3px 0 #7a5208; }
.acc-btn:hover { filter: brightness(1.08); }
.acc-status { grid-column: 1 / -1; min-height: 16px; color: #ff8a8a; text-align: center; }
.acc-status.ok { color: #7ddc7d; }
.acc-hint { color: #6d7586; font-size: 10px; margin-top: 10px; text-align: center; }
.acc-access { display: flex; flex-direction: column; gap: 6px; }
.acc-line { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #1a1e29; border-left: 3px solid #3a4256; }
.acc-line i { width: 8px; height: 8px; border-radius: 50%; background: #3a4256; flex: none; }
.acc-line div { flex: 1; min-width: 0; } .acc-line div b { color: #fff; display: block; } .acc-line small { color: #7d8698; }
.acc-line > span { text-align: right; color: #a8b1c3; font-size: 10px; }
.acc-line.in { border-left-color: #2fa935; } .acc-line.in i { background: #2fa935; }
.acc-line.fail { border-left-color: #d04040; } .acc-line.fail i { background: #d04040; } .acc-line.fail b { color: #ff8a8a; }
.acc-line.new { border-left-color: #ffcb3c; } .acc-line.new i { background: #ffcb3c; }
.acc-line.acc { border-left-color: #6fb4ff; } .acc-line.acc i { background: #6fb4ff; }
@media (max-width: 560px) { .acc-stats { grid-template-columns: repeat(3, 1fr); } .acc-team { grid-template-columns: 1fr; } .acc-hero { flex-direction: column; text-align: center; } }

/* ---------------------------------------------------------------- painel da staff no jogo */
.st-card { width: min(880px, 96vw); height: min(640px, 92vh); }
.st-header { display: flex; align-items: center; gap: 12px; padding: 14px 56px 12px 18px; background: linear-gradient(160deg, #262b3a, #151821); }
.st-header h2 { font-size: 16px; color: #ffcb3c; }
.st-me { flex: 1; display: flex; align-items: center; gap: 8px; color: #fff; }
.st-header .btn { border-radius: 8px; text-decoration: none; padding: 6px 12px; }
.st-body { flex: 1; }
.st-body h4 { color: #ffcb3c; margin: 14px 0 8px; font-size: 12px; }
.st-search { width: 100%; margin-bottom: 10px; }
.st-num { width: 74px; }
.st-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.st-row .st-search { flex: 1; width: auto; margin: 0; min-width: 180px; }
.st-body .btn { border-radius: 7px; padding: 6px 11px; }
.st-body .btn.danger { background: linear-gradient(#8a2a2a, #5a1c1c); }
.st-body .btn.primary { background: linear-gradient(#ffd75a, #d29a1c); color: #1a1305; font-weight: bold; box-shadow: 0 3px 0 #7a5208; border-color: #7a5208; }
.st-commands { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.st-cmd { padding: 10px 12px; border-radius: 10px; background: #1a1e29; border: 1px solid #262c3a; }
.st-cmd.locked { opacity: .45; }
.sc-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.sc-head code { color: #ffcb3c; font-size: 11px; }
.sc-desc { color: #a8b1c3; margin: 5px 0 8px; }
.sc-run { display: flex; gap: 6px; } .sc-run input { flex: 1; padding: 6px 8px; font-family: monospace; }
.sc-lock { color: #7d8698; font-size: 10px; }
.st-split { display: grid; grid-template-columns: 300px 1fr; gap: 14px; height: 100%; }
.st-poke-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 470px; overflow: auto; padding-right: 4px; }
.st-poke { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; background: #1a1e29; border: 1px solid #262c3a; cursor: pointer; font-size: 10px; text-align: center; }
.st-poke:hover { border-color: #4a5470; } .st-poke.selected { border-color: #ffcb3c; background: #231d0c; }
.st-poke canvas { width: 40px; height: 40px; image-rendering: auto; }
.st-detail { padding: 14px; border-radius: 12px; background: #161a24; border: 1px solid #232838; overflow: auto; max-height: 520px; }
.sp-head { display: flex; gap: 12px; align-items: center; } .sp-head h3 { color: #fff; font-size: 18px; margin-bottom: 4px; }
.sp-head small { color: #8a93a3; }
.sp-pic canvas { width: 64px; height: 64px; image-rendering: auto; }
.st-form { display: flex; gap: 10px; margin: 12px 0 8px; } .st-form label { display: flex; flex-direction: column; gap: 4px; color: #9aa3b4; } .st-form input { width: 110px; }
.st-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.st-give { display: grid; grid-template-columns: 1.4fr 1.3fr .7fr .7fr; gap: 8px; align-items: end; padding: 10px; border-radius: 10px; background: #1a1e29; border: 1px solid #262c3a; }
.st-give label { display: flex; flex-direction: column; gap: 4px; color: #9aa3b4; min-width: 0; }
.st-give input, .st-give select { padding: 7px 8px; border-radius: 7px; border: 1px solid #2a303c; background: #0b0d13; color: #fff; min-width: 0; }
.st-give .btn { grid-column: 1 / -1; padding: 9px; }
.st-ballpick { display: flex; align-items: center; gap: 4px; } .st-ballpick select { flex: 1; } .st-ballpick canvas { width: 24px; height: 24px; flex: none; }
.sp-spawns { display: flex; flex-direction: column; gap: 4px; }
.sp-row { display: grid; grid-template-columns: 1.2fr 1fr auto auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #1a1e29; }
.sp-row.off { opacity: .5; } .sp-pos { color: #fff; font-family: monospace; }
.sp-st { font-size: 10px; padding: 1px 7px; border-radius: 10px; background: #2b3140; }
.sp-st.vivo { background: #1d3a2a; color: #7ddc9a; } .sp-st.desativado { background: #3a1d1d; color: #ff8a8a; } .sp-st.desmaiado { background: #3a321d; color: #ffcb3c; }
.st-player { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #1a1e29; margin-bottom: 6px; }
.st-player b { color: #fff; } .st-player small { display: block; color: #7d8698; margin-top: 2px; }
.st-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.st-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: #1a1e29; border: 1px solid #262c3a; cursor: pointer; color: #dcdcdc; }
.st-item:hover { border-color: #ffcb3c; } .st-item small { color: #6d7586; }
.st-towns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
/* aba Mundo: cidades e hunts por continente */
.st-cont h5 { margin: 8px 0 5px; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: #ffcb3c; }
.st-cont h5 small { color: #8b93a5; font-weight: normal; margin-left: 4px; }
#st-hunts .st-towns { max-height: 260px; overflow-y: auto; padding-right: 4px; }
.st-hunt { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 1px; max-width: 230px; }
.st-hunt b { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.st-hunt small { font-size: 10px; opacity: .65; font-weight: normal; }
.st-hunt.custom { border-color: #ffcb3c; }
#st-world-q { margin-bottom: 4px; }
@media (max-width: 700px) { .st-split, .st-commands { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- inventário, insígnias, escolha de pokémon e menu da pokébola */
/* inventário: pokébola principal grande à esquerda (2 linhas) e os 6 atalhos em 3 colunas */
/* janela Inventário: posições do inventory.otui original (slots de 34px) */
.inv-panel { position: relative; width: 178px; height: 152px; margin: 0 auto; }
.inv-panel .inv-btn, .inv-panel .inv-side { position: absolute; width: 34px; height: 34px; }
.inv-side { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; } .inv-side img { width: 26px; height: 26px; } .inv-side:hover { filter: brightness(1.25); }
.inv-btn.main { box-shadow: inset 0 0 0 1px rgba(255,203,60,.6), inset 1px 1px #3e3e3e; }
.inv-btn.main .slotbg { position: absolute; inset: 1px; width: 32px; height: 32px; opacity: .35; }
.inv-btn.main canvas { position: relative; }
.inv-money { position: absolute; right: 1px; bottom: 0; font-size: 8px; font-weight: bold; color: #ffcb3c; text-shadow: 1px 1px #000, -1px -1px #000; pointer-events: none; }


.inv-btn { display: grid; place-items: center; padding: 0; cursor: pointer; border-radius: 3px;
  background: linear-gradient(#2a2a2a, #1a1a1a); border: 1px solid #090909; box-shadow: inset 1px 1px #3e3e3e, inset -1px -1px #000; }
.inv-btn:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.inv-btn { overflow: hidden; } .inv-btn img, .inv-btn canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.inv-btn.on { box-shadow: inset 0 0 0 2px #3fdc5a; }
.inv-btn.off img { filter: grayscale(1) brightness(.5); }
.inv-hint { min-height: 14px; margin-top: 4px; text-align: center; color: var(--gold); font-size: 10px; }
body.targeting, body.targeting * { cursor: crosshair !important; }
.badges-card { width: min(560px, 94vw); padding: 20px; }
.badges-head, .pick-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.badges-head img { width: 40px; height: 40px; image-rendering: pixelated; }
.badges-head h2, .pick-head h2 { color: #fff; font-size: 18px; } .badges-head small, .pick-head small { color: #8a93a3; }
.badges-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 12px; background: #1a1e29; border: 1px solid #262c3a; text-align: center; }
.badge canvas { width: 48px; height: 48px; image-rendering: pixelated; filter: grayscale(1) brightness(.55); }
.badge b { color: #6d7586; font-size: 11px; } .badge small { color: #4f5768; font-size: 9px; }
.badge.own { border-color: rgba(255,203,60,.5); background: radial-gradient(circle at 50% 30%, rgba(255,203,60,.14), #1a1e29 70%); }
.badge.own canvas { filter: drop-shadow(0 0 6px rgba(255,203,60,.5)); } .badge.own b { color: #ffcb3c; } .badge.own small { color: #a8b1c3; }
.pick-card { width: min(460px, 94vw); padding: 20px; }
.pick-head canvas { width: 32px; height: 32px; }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #1a1e29; border: 1px solid #262c3a; cursor: pointer; text-align: left; color: #dcdcdc; }
.pick-row:hover:not(:disabled) { border-color: #ffcb3c; } .pick-row:disabled { opacity: .4; cursor: not-allowed; }
.pick-row canvas:first-child { width: 40px; height: 40px; image-rendering: auto; }
.pick-row div { flex: 1; } .pick-row b { color: #fff; } .pick-row small { color: #8a93a3; } .pick-row span { display: block; color: #a8b1c3; font-size: 10px; }
.poke-menu { position: fixed; z-index: 650; min-width: 200px; padding: 4px; border-radius: 10px; background: rgba(16,19,27,.98); border: 1px solid rgba(255,203,60,.3); box-shadow: 0 12px 30px rgba(0,0,0,.7); }
.poke-menu button { display: block; width: 100%; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: #dcdcdc; text-align: left; cursor: pointer; }
.poke-menu button:hover { background: #262c3a; color: #ffcb3c; }
.poke-menu hr { border: 0; border-top: 1px solid #262c3a; margin: 4px 2px; }
.pt-addon { color: #d59bff; }
/* ficha curta de item no chão */
.it-tip { display: flex; gap: 10px; align-items: center; } .it-tip canvas { width: 32px; height: 32px; }
.it-tip b { display: block; color: #fff; } .it-tip span { display: block; color: #ffcb3c; } .it-tip small { color: #6d7586; font-size: 9px; }
/* addons da espécie */
.pick-list.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.addon-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 12px; background: #1a1e29; border: 1px solid #262c3a; color: #dcdcdc; cursor: pointer; }
.addon-card canvas { width: 64px; height: 64px; image-rendering: auto; }
.addon-card b { color: #fff; font-size: 10px; text-align: center; } .addon-card small { color: #6d7586; font-size: 9px; }
.addon-card:not(.have) canvas { filter: grayscale(.8) brightness(.6); }
.addon-card.have { border-color: rgba(213,155,255,.4); } .addon-card.using { border-color: #ffcb3c; background: #231d0c; }
.addon-card:disabled { cursor: default; } .addon-card:not(:disabled):hover { border-color: #ffcb3c; }
.inv-slot.draggable { cursor: grab; }

/* ---------------------------------------------------------------- pokébolas na mochila e ficha do pokémon */
.ball-label { color: var(--muted); margin-bottom: 3px; } .ball-label small { color: #5f5f5f; font-size: 9px; }
/* 6 pokébolas sempre numa linha só, do tamanho da janela (sem rolagem lateral) */
.ball-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid #222; }
.ball-slot { min-width: 0; width: 100%; aspect-ratio: 1; display: grid; place-items: center; cursor: grab; position: relative; overflow: hidden; }
.ball-slot canvas { width: 80%; height: auto; max-width: 26px; }
.ball-slot:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.ball-slot.out::after { content: ''; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: #3fdc5a; box-shadow: 0 0 4px #3fdc5a; }
.ball-slot.fainted canvas { filter: grayscale(1) brightness(.6); }
.ball-slot.vacant { cursor: default; }
.ball-ghost { position: fixed; z-index: 500; width: 32px; height: 32px; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); transform: scale(1.15); }
.ball-ghost.bad { filter: drop-shadow(0 0 4px #f44) grayscale(.6); }
body.throwing, body.throwing * { cursor: grabbing !important; }
.poke-tip { position: fixed; z-index: 600; width: 270px; pointer-events: none; padding: 12px; border-radius: 12px; background: rgba(16, 19, 27, .97);
  border: 1px solid rgba(255,203,60,.3); box-shadow: 0 16px 40px rgba(0,0,0,.7); color: #dcdcdc; }
.pt-head { display: flex; gap: 10px; align-items: center; }
.pt-pic { width: 72px; height: 72px; border-radius: 10px; background: radial-gradient(circle at 50% 65%, rgba(255,255,255,.12), transparent 70%); flex: none; }
.pt-pic canvas { width: 72px; height: 72px; image-rendering: auto; }
.pt-id { flex: 1; min-width: 0; }
.pt-name { color: #fff; font-size: 14px; font-weight: bold; }
.pt-gender.g1, .pt-gender.gmale { color: #6fb4ff; } .pt-gender.g2, .pt-gender.gfemale { color: #ff8ad0; }
.pt-sub { color: #8a93a3; margin: 2px 0 4px; } .pt-boost { color: #ffcb3c; }
.pt-ball canvas { width: 32px; height: 32px; }
.pt-hp { position: relative; height: 14px; margin: 10px 0 8px; border-radius: 7px; background: #0b0d13; overflow: hidden; }
.pt-hp .fill { height: 100%; background: linear-gradient(90deg, #2fa935, #7de06a); } .pt-hp .fill.mid { background: linear-gradient(90deg, #c9a227, #ffd75a); }
.pt-hp .fill.low { background: linear-gradient(90deg, #a92f2f, #ff6a6a); }
.pt-hp span { position: absolute; inset: 0; text-align: center; font-size: 10px; line-height: 14px; color: #fff; text-shadow: 1px 1px #000; }
.pt-stats { display: grid; grid-template-columns: 70px 1fr 50px; gap: 4px 8px; align-items: center; font-size: 10px; }
.pt-stats span { color: #8a93a3; } .pt-stats b { color: #fff; text-align: right; }
.pt-bar { height: 5px; border-radius: 4px; background: #0b0d13; overflow: hidden; } .pt-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d29a1c, #ffd75a); }
.pt-moves { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 10px; }
.pt-move { display: flex; align-items: center; gap: 4px; padding: 2px; border-radius: 6px; background: #1a1e29; font-size: 9px; min-width: 0; }
.pt-move canvas { width: 20px; height: 20px; flex: none; } .pt-move span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pt-move small { color: #6d7586; }
.pt-move.locked { opacity: .4; }
.pt-foot { margin-top: 8px; color: #6d7586; font-size: 9px; text-align: center; }

.npc-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.npc-shop-list { max-height: 320px; overflow-y: auto; }
.npc-shop-row { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-bottom: 1px solid #222; }
.npc-shop-row span { flex: 1; }
.npc-shop-row .qty { width: 50px; }
.npc-body h4 { margin: 6px 0 3px; color: var(--gold); }

.outfit-editor { display: flex; gap: 10px; }
.outfit-preview-frame { flex: 0 0 136px; height: 136px; display: grid; place-items: center; }
.outfit-picker { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.outfit-part-tabs { display: flex; gap: 2px; }
.outfit-part.active { box-shadow: inset 0 0 0 1px var(--gold); }
.outfit-palette-grid { display: grid; grid-template-columns: repeat(19, 1fr); gap: 1px; }
.outfit-swatch { aspect-ratio: 1; border: 1px solid #000; cursor: pointer; padding: 0; }
.outfit-swatch.selected { outline: 2px solid #fff; z-index: 1; }

.bigmap-wrap { position: relative; }
.bigmap { display: block; margin: 0 auto; cursor: grab; background: #000; }
.bigmap-bar { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.bigmap-bar select { width: auto; }

/* ---------------------------------------------------------------- Pokédex (aparelho vermelho com tela) */
.dex-card { position: relative; width: min(980px, 96vw); height: min(680px, 92vh); display: flex; flex-direction: column; overflow: hidden; user-select: text;
  border-radius: 18px; background: linear-gradient(160deg, #d23a3a, #9c1c1c 60%, #7c1414); padding: 0 12px 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.7), inset 0 2px rgba(255,255,255,.25), inset 0 -3px rgba(0,0,0,.3); animation: card-in .18s ease-out; }
.dex-top { display: flex; align-items: center; gap: 14px; padding: 12px 50px 10px 6px; }
.dex-top h2 { color: #fff; font-size: 22px; letter-spacing: 2px; text-shadow: 0 2px 0 #6a0f0f; }
.dex-count { color: #ffd6d6; font-size: 11px; margin-left: auto; }
.dex-lights { display: flex; align-items: flex-start; gap: 6px; }
.dex-lights i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #3a0a0a; box-shadow: inset -2px -2px 3px rgba(0,0,0,.35), inset 2px 2px 3px rgba(255,255,255,.5); }
.dex-lights .lens { width: 40px; height: 40px; border: 3px solid #fff; background: radial-gradient(circle at 35% 35%, #bff0ff, #2aa8e8 45%, #0b5d9c);
  box-shadow: 0 0 0 3px #3a0a0a, 0 0 18px rgba(80,200,255,.6), inset -4px -4px 8px rgba(0,0,0,.35); animation: dex-blink 3s infinite; }
@keyframes dex-blink { 50% { box-shadow: 0 0 0 3px #3a0a0a, 0 0 28px rgba(120,220,255,.9), inset -4px -4px 8px rgba(0,0,0,.35); } }
.dex-lights .r { background: #ff4a4a; } .dex-lights .y { background: #ffd23a; } .dex-lights .g { background: #4ad86a; }
.dex-top .acc-x { top: 12px; background: rgba(0,0,0,.3); }
.dex-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 290px 1fr; gap: 12px; }
.dex-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 10px; border-radius: 12px; background: #2a0d0d; box-shadow: inset 0 2px 6px rgba(0,0,0,.5); }
.dex-search { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid #5a1c1c; background: #160606; color: #fff; font-size: 12px; }
.dex-search:focus { outline: none; border-color: #ffd23a; }
.dex-filters { display: flex; gap: 8px; align-items: center; color: #ffd6d6; font-size: 10px; }
.dex-filters select { flex: 1; padding: 5px; border-radius: 7px; border: 1px solid #5a1c1c; background: #160606; color: #fff; }
.dex-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-right: 3px; }
.dex-entry { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 9px; cursor: pointer; background: rgba(255,255,255,.04); border: 1px solid transparent; }
.dex-entry:hover { background: rgba(255,255,255,.09); }
.dex-entry.selected { background: rgba(255,210,58,.16); border-color: #ffd23a; }
.dex-entry canvas { width: 36px; height: 36px; image-rendering: auto; flex: none; }
.dex-entry b { display: block; color: #fff; font-size: 11px; } .dex-entry span { color: #c9a0a0; font-size: 9px; }
.dex-entry:not(.seen) b { color: #d8b8b8; }
.dex-entry.seen b::after { content: ' ●'; color: #4ad86a; font-size: 8px; }
canvas.nosprite { background: radial-gradient(circle, #3a3a3a 30%, transparent 32%); opacity: .5; }
.tdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 2px; vertical-align: middle; border: 1px solid rgba(0,0,0,.5); }
.dex-screen { min-height: 0; overflow-y: auto; border-radius: 12px; padding: 14px; background: #10131b; border: 6px solid #2a0d0d; box-shadow: inset 0 0 30px rgba(0,0,0,.7); }
.dex-empty { height: 100%; display: grid; place-items: center; text-align: center; color: #6d7586; }
.dex-empty img { width: 64px; height: 64px; image-rendering: pixelated; opacity: .5; }
.dex-hero { display: flex; gap: 18px; align-items: center; padding: 14px; border-radius: 14px; margin-bottom: 12px;
  background: radial-gradient(circle at 15% 50%, rgba(255,255,255,.12), transparent 60%), linear-gradient(135deg, var(--tc, #3a4256), #161a24); }
.dex-pic { position: relative; width: 120px; height: 120px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 65%, rgba(255,255,255,.18), rgba(0,0,0,.3) 70%); border: 2px solid rgba(255,255,255,.2); }
.dex-pic canvas { width: 120px; height: 120px; image-rendering: auto; }
.dex-pic.nosprite span { position: absolute; color: #8a93a3; font-size: 10px; text-align: center; }
.dex-id h3 { color: #fff; font-size: 26px; margin: 6px 0 10px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.dex-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.dex-tags .type-badge { border-radius: 20px; padding: 2px 10px; border: 0; font-weight: bold; }
.dex-seen { padding: 2px 10px; border-radius: 20px; background: #1d3a2a; color: #7ddc9a; font-size: 10px; font-weight: bold; }
.dex-facts { display: flex; gap: 8px; flex-wrap: wrap; }
.dex-facts span { display: flex; flex-direction: column; padding: 6px 12px; border-radius: 10px; background: rgba(0,0,0,.3); color: #a8b1c3; font-size: 9px; text-transform: uppercase; }
.dex-facts b { color: #fff; font-size: 14px; text-transform: none; }
.dex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dex-grid section { padding: 12px; border-radius: 12px; background: #161a24; border: 1px solid #232838; }
.dex-screen h4 { color: #ffd23a; font-size: 12px; margin-bottom: 8px; } .dex-h { margin-top: 12px; }
.dex-stat { display: grid; grid-template-columns: 74px 1fr 44px; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 10px; color: #a8b1c3; }
.dex-stat div { height: 8px; border-radius: 5px; background: #0b0d13; overflow: hidden; }
.dex-stat i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #d23a3a, #ffd23a); }
.dex-stat b { color: #fff; text-align: right; }
.dex-evo { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: #1d2230; cursor: pointer; margin-bottom: 6px; border: 1px solid transparent; }
.dex-evo:hover { border-color: #ffd23a; } .dex-evo canvas { width: 56px; height: 56px; image-rendering: auto; }
.dex-evo b { display: block; color: #fff; } .dex-evo span { color: #8a93a3; font-size: 10px; }
.dex-evo.shiny .star { font-size: 28px; width: 56px; text-align: center; }
.dex-catch { color: #a8b1c3; margin-top: 6px; } .dex-catch b { color: #fff; }
.dex-moves { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.dex-move { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: #161a24; border: 1px solid #232838; }
.dex-move canvas { width: 32px; height: 32px; flex: none; border-radius: 6px; }
.dex-move b { display: block; color: #fff; font-size: 11px; } .dex-move span { color: #8a93a3; font-size: 9px; }
.type-bg-fire { --tc: #7a2d10; } .type-bg-water { --tc: #1d3a7a; } .type-bg-grass { --tc: #24521c; } .type-bg-electric { --tc: #6a5a00; }
.type-bg-ice { --tc: #2a5a5a; } .type-bg-fighting { --tc: #5a1814; } .type-bg-poison { --tc: #4a1c4a; } .type-bg-ground { --tc: #5a4a22; }
.type-bg-flying { --tc: #3a3470; } .type-bg-psychic { --tc: #6a1e3a; } .type-bg-bug { --tc: #44500c; } .type-bg-rock { --tc: #4a4420; }
.type-bg-ghost { --tc: #2e2648; } .type-bg-dragon { --tc: #2c1670; } .type-bg-dark { --tc: #2e261e; } .type-bg-steel { --tc: #44445a; }
.type-bg-fairy { --tc: #6a3a56; } .type-bg-normal { --tc: #4a4a3a; }
@media (max-width: 760px) { .dex-body, .dex-grid { grid-template-columns: 1fr; } }
.type-badge { display: inline-block; padding: 1px 6px; margin-right: 3px; font-size: 10px; color: #fff; border: 1px solid #000; }
.help-text li { margin: 4px 0 4px 16px; }

.game-notice { position: fixed; left: 50%; bottom: 200px; transform: translateX(-50%); z-index: 200; padding: 5px 12px; color: #fff; background: rgba(20,20,20,.92);
  border: 1px solid #000; opacity: 0; pointer-events: none; transition: opacity .15s; text-shadow: 1px 1px #000; }
.game-notice.active { opacity: 1; }

/* cores de tipo */
.type-normal { background: #8a8a6a; } .type-fire { background: #d0601f; } .type-water { background: #3b6fd6; } .type-grass { background: #4c9a3a; }
.type-electric { background: #c9a800; } .type-ice { background: #5cb8b8; } .type-fighting { background: #a02b26; } .type-poison { background: #8a3a8a; }
.type-ground { background: #b89a4a; } .type-flying { background: #7f6fd0; } .type-psychic { background: #d0406a; } .type-bug { background: #8a9a1a; }
.type-rock { background: #9a8a3a; } .type-ghost { background: #5a4a8a; } .type-dragon { background: #5a2ad8; } .type-dark { background: #5a4a3a; }
.type-steel { background: #8a8aa8; } .type-fairy { background: #d07aa8; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #4a4a4a; border: 1px solid #111; }

@media (max-width: 900px) {
  #main-view { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; overflow-y: auto; }
  #sidebar-left, #sidebar-right { flex-direction: row; flex-wrap: wrap; }
}

/* menu de janelas */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 24px; z-index: 50; min-width: 150px; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.menu label { display: flex; gap: 6px; align-items: center; padding: 2px 4px; cursor: pointer; white-space: nowrap; }
.menu label:hover { background: #3a3a3a; }
.win-tools { display: flex; gap: 2px; margin-left: auto; }
.window > .title { cursor: default; }
.window.minimized { flex: 0 0 auto !important; height: auto !important; }
/* alças para ajustar a altura das janelas e do chat */
.window, #chat-container { position: relative; }
.win-resize { position: absolute; left: 0; right: 0; height: 6px; cursor: ns-resize; z-index: 5; }
.win-resize.bottom { bottom: -3px; } .win-resize.top { top: -3px; }
.win-resize::after { content: ''; position: absolute; left: 50%; top: 2px; width: 28px; height: 2px; margin-left: -14px; border-radius: 2px; background: #555; opacity: 0; transition: opacity .15s; }
.window:hover > .win-resize::after, #chat-container:hover > .win-resize::after, .win-resize:hover::after { opacity: 1; background: var(--gold); }
.window.minimized > .win-resize { display: none; }
body.resizing, body.resizing * { cursor: ns-resize !important; user-select: none; }
#chat-container { min-height: 70px; }
.window.minimized > .body { display: none; }

/* ícone do golpe */
.move-slot { width: 76px; height: 40px; display: flex; align-items: center; gap: 3px; padding: 3px; text-align: left; justify-content: flex-start; }
.move-slot .mi { width: 32px; height: 32px; flex: 0 0 32px; }
.move-slot .mn { padding: 0; font-size: 9px; line-height: 10px; }
.move-slot .hk { left: auto; right: 2px; }
.move-slot .cd { font-size: 12px; }

.login-hint { color: var(--muted); margin: 4px 0 8px; line-height: 15px; }

/* ---------------------------------------------------------------- NPC (tema pela função: loja dourada, enfermeira rosa, morador azul) */
.npc-card { --accent: #6fb4ff; --accent2: #2d4877; --glow: rgba(80,140,255,.25);
  position: relative; width: min(900px, 96vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; user-select: text;
  border-radius: 16px; background: #12151d; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 40px var(--glow); animation: card-in .18s ease-out; }
.npc-card.theme-shop { --accent: #ffcb3c; --accent2: #7a5208; --glow: rgba(255,190,50,.18); }
.npc-card.theme-heal { --accent: #ff8ad0; --accent2: #8a2a60; --glow: rgba(255,110,190,.2); }
.npc-head { display: flex; align-items: center; gap: 16px; padding: 16px 60px 14px 20px; position: relative;
  background: radial-gradient(circle at 12% 40%, var(--glow), transparent 55%), linear-gradient(160deg, #262b3a, #151821); }
.npc-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6; }
.npc-face { width: 80px; height: 80px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 65%, rgba(255,255,255,.14), rgba(0,0,0,.35) 70%); border: 2px solid var(--accent); box-shadow: 0 0 0 5px var(--glow); }
.npc-face canvas { width: 72px; height: 72px; image-rendering: auto; }
.npc-id h2 { font-size: 22px; color: #fff; margin: 4px 0 2px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.npc-id small { color: #a8b1c3; }
.npc-role { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 10px; font-weight: bold; letter-spacing: .5px; text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 18%, #12151d); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.npc-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; padding: 14px 18px 18px; min-height: 400px; overflow: auto; }
.npc-card:not(:has(.npc-trade:not(.hidden))) .npc-layout { grid-template-columns: 1fr; min-height: 260px; }
.npc-talk { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.npc-dialog { flex: 1; min-height: 200px; max-height: 430px; overflow-y: auto; padding: 12px; line-height: 16px; display: flex; flex-direction: column; gap: 8px;
  background: #0d1017 !important; border: 1px solid #232838 !important; border-radius: 12px; box-shadow: none !important; }
.npc-dialog > div { max-width: 88%; padding: 7px 11px; border-radius: 12px; font-size: 11px; animation: card-in .15s ease-out; }
.npc-dialog .npc { align-self: flex-start; background: #1d2230; color: #dfe6f3; border-bottom-left-radius: 3px; border-left: 2px solid var(--accent); }
.npc-dialog .npc b { color: var(--accent); }
.npc-dialog .me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 22%, #1a1e29); color: #fff; border-bottom-right-radius: 3px; }
.npc-dialog .me b { color: #ffe27a; }
.npc-dialog a.kw { color: var(--accent); font-weight: bold; text-decoration: none; border-bottom: 1px dashed var(--accent); cursor: pointer; }
.npc-dialog a.kw:hover { filter: brightness(1.25); }
.npc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.npc-actions .btn { flex: 1; min-width: 90px; padding: 9px 12px; border-radius: 9px; border: 1px solid #2a303c; background: #1a1e29; box-shadow: none; font-weight: bold; color: #dcdcdc; }
.npc-actions .btn:hover { border-color: var(--accent); color: var(--accent); background: #1d2230; }
.npc-actions .btn:first-child { background: linear-gradient(color-mix(in srgb, var(--accent) 85%, #fff), var(--accent)); color: #1a1305; border-color: var(--accent2); box-shadow: 0 3px 0 var(--accent2); }
.npc-trade { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.npc-tabs { display: flex; gap: 6px; }
.npc-tab { padding: 8px 16px !important; border-radius: 9px !important; border: 1px solid #2a303c !important; background: #1a1e29 !important; box-shadow: none !important; font-weight: bold; color: #8a93a3; }
.npc-tab.active { color: #1a1305 !important; background: var(--accent) !important; border-color: var(--accent2) !important; }
.npc-tabs .field { flex: 1; width: auto; padding: 8px 11px; border-radius: 9px; border: 1px solid #2a303c; background: #0b0d13; box-shadow: none; color: #fff; }
.npc-tabs .field:focus { outline: none; border-color: var(--accent); }
.npc-items { flex: 1; min-height: 190px; max-height: 270px; overflow-y: auto; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; align-content: start;
  background: #0d1017 !important; border: 1px solid #232838 !important; border-radius: 12px; box-shadow: none !important; }
.npc-items .empty { grid-column: 1 / -1; }
.npc-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; cursor: pointer; border-radius: 10px;
  background: #1a1e29; border: 1px solid #262c3a; transition: border-color .1s, transform .1s; }
.npc-item:hover { border-color: #4a5470; transform: translateY(-1px); }
.npc-item.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, #1a1e29); }
.npc-item .ii { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: #0d1017; }
.npc-item .ii canvas { width: 32px; height: 32px; }
.npc-item .nm { color: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.npc-item .pr { color: var(--accent); font-weight: bold; }
.npc-item small { display: block; color: #7d8698; }
.npc-detail { display: flex; gap: 14px; padding: 12px; background: #161a24 !important; border: 1px solid #232838 !important; border-radius: 12px; box-shadow: none !important; }
.npc-detail canvas { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 12px; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); }
.npc-detail-info { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.npc-item-name { font-size: 15px; font-weight: bold; color: #fff; }
.npc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #8a93a3; }
.npc-row b { color: #fff; }
.npc-row.amount input[type=range] { flex: 1; accent-color: var(--accent); }
.npc-row.amount input[type=number] { width: 64px; padding: 4px 6px; border-radius: 7px; border: 1px solid #2a303c; background: #0b0d13; box-shadow: none; color: #fff; }
.npc-row.total { padding-top: 5px; border-top: 1px solid #232838; } .npc-row.total b { font-size: 15px; color: var(--accent); }
#npc-confirm { margin-top: 4px; padding: 10px; border-radius: 9px; border: 0; font-size: 13px; color: #1a1305;
  background: linear-gradient(color-mix(in srgb, var(--accent) 85%, #fff), var(--accent)); box-shadow: 0 3px 0 var(--accent2); }
#npc-confirm:disabled { filter: grayscale(.8) brightness(.6); cursor: not-allowed; }
@media (max-width: 720px) { .npc-layout { grid-template-columns: 1fr; } }

/* roupas */
.outfit-editor { align-items: flex-start; }
.outfit-name { font-weight: bold; color: var(--gold); min-height: 14px; }
.outfit-skins { display: grid; grid-template-columns: repeat(auto-fill, 50px); gap: 3px; padding: 4px; max-height: 220px; overflow-y: auto; }
.outfit-skins .skin { width: 50px; height: 50px; display: grid; place-items: center; cursor: pointer; background: #1a1a1a; border: 1px solid #000; }
.outfit-skins .skin:hover { border-color: #888; }
.outfit-skins .skin.selected { border-color: var(--gold); background: #3a3420; }
.outfit-skins .skin canvas { width: 44px; height: 44px; }
.outfit-palette-grid { max-width: 420px; }
input[type=range] { accent-color: #c9a227; }
.outfit-skins .skin:has(canvas.blank) { display: none; }

/* janela de roupas */
.btn.on-gold { box-shadow: inset 0 0 0 1px #ffcb3c, inset 1px 1px #6a6a6a; color: #ffcb3c; font-weight: bold; }
.btn-gold { background: linear-gradient(#b8902a, #8a6a16); color: #fff; font-weight: bold; text-shadow: 1px 1px #000; }
.btn-gold:hover { background: linear-gradient(#cfa333, #9c7a1c); }
.outfit-card { width: min(980px, 96vw); }
.outfit-layout { display: grid; grid-template-columns: 250px 1fr; gap: 12px; }
.outfit-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.stage-view { position: relative; width: 230px; height: 230px; border: 1px solid #000; border-radius: 4px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, #4b5a73 0%, #29303d 55%, #151820 100%); box-shadow: inset 0 0 0 1px #5a6478, inset 0 -30px 50px rgba(0,0,0,.45); }
.stage-view canvas { position: absolute; left: 15px; top: 5px; width: 200px; height: 200px; z-index: 1; }
.stage-floor { position: absolute; left: 50%; bottom: 22px; width: 130px; height: 26px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 55%, transparent 72%); }
.outfit-stage .outfit-name { font-size: 14px; color: #ffcb3c; text-shadow: 1px 1px #000; text-align: center; min-height: 18px; }
.stage-controls { display: flex; gap: 4px; }
.stage-controls .btn { min-width: 44px; padding: 4px 10px; }
.outfit-options { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.outfit-section { background: #232323; border: 1px solid #111; box-shadow: inset 1px 1px #383838; padding: 8px; border-radius: 3px; }
.outfit-section h4 { color: #e8e8e8; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.outfit-section h4 small { color: var(--muted); text-transform: none; letter-spacing: 0; }
.outfit-skins { display: grid; grid-template-columns: repeat(auto-fill, 56px); gap: 4px; max-height: 196px; overflow-y: auto; padding: 2px; background: none; border: 0; box-shadow: none; }
.outfit-skins .skin { width: 56px; height: 56px; border-radius: 4px; background: linear-gradient(#2a2f38, #1b1e24); border: 1px solid #000; transition: transform .08s; }
.outfit-skins .skin:hover { border-color: #8a8a8a; transform: translateY(-1px); }
.outfit-skins .skin.selected { border-color: #ffcb3c; box-shadow: 0 0 0 1px #ffcb3c, 0 0 8px rgba(255,203,60,.4); background: linear-gradient(#4a4128, #2c2716); }
.outfit-skins .skin canvas { width: 48px; height: 48px; }
.outfit-part-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 6px; }
.outfit-part { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px; cursor: pointer; color: #ddd;
  background: linear-gradient(#3e3e3e, #2d2d2d); border: 1px solid #0d0d0d; border-radius: 3px; }
.outfit-part i { width: 14px; height: 14px; border: 1px solid #000; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.outfit-part.active { box-shadow: 0 0 0 1px #ffcb3c; color: #fff; background: linear-gradient(#4f4a36, #353020); }
.outfit-palette-grid { display: grid; grid-template-columns: repeat(19, 1fr); gap: 2px; max-width: none; }
.outfit-swatch { aspect-ratio: 1; border: 1px solid #000; border-radius: 2px; cursor: pointer; padding: 0; transition: transform .06s; }
.outfit-swatch:hover { transform: scale(1.25); z-index: 2; position: relative; }
.outfit-swatch.selected { outline: 2px solid #fff; outline-offset: 0; transform: scale(1.2); position: relative; z-index: 2; }
.addon-chips { display: flex; gap: 6px; }
.chip { display: inline-flex; cursor: pointer; }
.chip input { display: none; }
.chip span { padding: 4px 12px; border-radius: 12px; border: 1px solid #000; background: #333; color: #bbb; }
.chip input:checked + span { background: linear-gradient(#b8902a, #8a6a16); color: #fff; }
.outfit-footer { display: flex; justify-content: flex-end; gap: 6px; padding: 8px; border-top: 1px solid #111; background: #262626; }
.outfit-footer .btn { padding: 6px 16px; }
@media (max-width: 760px) { .outfit-layout { grid-template-columns: 1fr; } }
.outfit-card { max-height: 94vh; }
.outfit-card .outfit-layout { overflow-y: auto; }
.outfit-palette-grid { grid-template-columns: repeat(19, 20px); gap: 2px; justify-content: start; }
.outfit-swatch { width: 20px; height: 20px; aspect-ratio: auto; }
.outfit-skins { max-height: 172px; }

/* tela de login / registro */
.login-screen { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; overflow: hidden; background: #05070b;
  transition: opacity .5s; }

/* fundo animado */
.lb, .lb > * { position: absolute; inset: 0; pointer-events: none; }
.lb-img { inset: -6%; background: url('../images/background.png') center/cover; filter: saturate(1.15) brightness(.85); animation: lb-zoom 38s ease-in-out infinite alternate; }
@keyframes lb-zoom { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-2%, -1.5%); } }
.lb-aurora { mix-blend-mode: screen; opacity: .55; filter: blur(60px); }
.lb-aurora i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; animation: lb-drift 22s ease-in-out infinite alternate; }
.lb-aurora i:nth-child(1) { background: radial-gradient(circle, rgba(255,190,40,.55), transparent 65%); left: -15%; top: -20%; }
.lb-aurora i:nth-child(2) { background: radial-gradient(circle, rgba(60,140,255,.5), transparent 65%); right: -20%; top: 10%; animation-duration: 28s; animation-delay: -8s; }
.lb-aurora i:nth-child(3) { background: radial-gradient(circle, rgba(230,50,70,.45), transparent 65%); left: 20%; bottom: -30%; animation-duration: 32s; animation-delay: -15s; }
@keyframes lb-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.15); } 100% { transform: translate(-6vw, 10vh) scale(.9); } }
.lb-grid { background-image: linear-gradient(rgba(255,203,60,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,203,60,.07) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(to top, #000 0%, transparent 55%); -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 55%);
  transform: perspective(500px) rotateX(60deg) translateY(30%); transform-origin: bottom; animation: lb-grid 6s linear infinite; }
@keyframes lb-grid { to { background-position: 0 48px, 0 0; } }
/* pokébolas desenhadas em CSS subindo devagar, cada uma num tamanho, lugar e ritmo */
.lb-balls span { position: absolute; bottom: -60px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 50% 50%, #fff 0 14%, #222 15% 22%, transparent 23%),
    linear-gradient(#e8394a 0 46%, #222 46% 54%, #f1f1f1 54%);
  box-shadow: 0 0 0 2px #222, 0 0 18px rgba(255,255,255,.25);
  animation: lb-rise var(--d) linear infinite; animation-delay: var(--w); }
@keyframes lb-rise { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .55; } 85% { opacity: .4; }
  100% { transform: translateY(-115vh) rotate(540deg); opacity: 0; } }
.lb-vignette { background: radial-gradient(ellipse at center, rgba(5,7,12,.1) 30%, rgba(5,7,12,.85)); }

/* painel de vidro com borda de luz girando */
.login-panel { position: relative; width: min(390px, 100%); padding: 26px 28px 20px; border-radius: 18px; isolation: isolate;
  background: linear-gradient(160deg, rgba(26,30,42,.82), rgba(12,14,20,.9)); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(0,0,0,.65), inset 0 1px rgba(255,255,255,.07); animation: lp-in .7s cubic-bezier(.2,.9,.3,1.2) both; }
.login-panel::before { content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--lp-a, 0deg), rgba(255,203,60,.1), rgba(255,203,60,.9), rgba(232,57,74,.6), rgba(80,150,255,.6), rgba(255,203,60,.1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: lp-spin 6s linear infinite; }
@property --lp-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes lp-spin { to { --lp-a: 360deg; } }
@keyframes lp-in { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
.login-panel.shake { animation: lp-shake .45s; }
@keyframes lp-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

.login-logo { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 6px; }
.ll-ball { position: relative; width: 54px; height: 54px; display: grid; place-items: center; animation: ll-bob 3.2s ease-in-out infinite; }
.ll-ball::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed rgba(255,203,60,.5); animation: lp-spin-r 10s linear infinite; }
.ll-ball::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; box-shadow: 0 0 24px 6px rgba(255,80,80,.35); animation: ll-glow 2.4s ease-in-out infinite; }
.ll-ball img { width: 44px; height: 44px; image-rendering: pixelated; animation: ll-wobble 4s ease-in-out infinite; }
@keyframes lp-spin-r { to { transform: rotate(360deg); } }
@keyframes ll-bob { 50% { transform: translateY(-5px); } }
@keyframes ll-glow { 50% { box-shadow: 0 0 34px 10px rgba(255,203,60,.4); } }
@keyframes ll-wobble { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-14deg); } 82% { transform: rotate(12deg); } 88% { transform: rotate(-6deg); } }
.ll-text b { display: block; font-size: 34px; letter-spacing: 7px; line-height: 1; color: transparent;
  background: linear-gradient(90deg, #ffcb3c, #fff3c4, #ffcb3c, #e0a92a) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 0 #7a4a00) drop-shadow(0 0 14px rgba(255,180,40,.35)); animation: ll-shine 5s linear infinite; }
@keyframes ll-shine { to { background-position: -250% 0; } }
.ll-text span { display: block; margin-top: 3px; font-size: 12px; letter-spacing: 6px; color: #c9d2e3; }
.login-welcome { text-align: center; margin: 4px 0 16px; color: #9aa3b4; font-size: 12px; min-height: 16px; }
.login-welcome span { display: inline-block; animation: lw-in .4s ease both; }
.login-screen.register .lw-login, .login-screen:not(.register) .lw-reg { display: none; }
@keyframes lw-in { from { opacity: 0; transform: translateY(5px); } }

/* abas com o destaque deslizando */
.login-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 18px; border-radius: 12px;
  background: rgba(5,7,11,.7); box-shadow: inset 0 1px 3px rgba(0,0,0,.6); }
.lt-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px;
  background: linear-gradient(#ffd75a, #d29a1c); box-shadow: 0 2px 10px rgba(255,190,40,.35); transition: transform .35s cubic-bezier(.3,1.4,.5,1); }
.login-screen.register .lt-ind { transform: translateX(100%); }
.login-tab { position: relative; z-index: 1; padding: 9px; border: 0; background: none; color: #8a93a3; font-weight: bold; font-size: 13px; cursor: pointer; transition: color .25s; }
.login-tab:hover { color: #d7dce6; }
.login-tab.active { color: #1a1305; }

#login-form { display: flex; flex-direction: column; gap: 12px; }
.lf { display: flex; flex-direction: column; gap: 5px; color: #9aa3b4; font-size: 11px; letter-spacing: .3px; }
.lf-box { position: relative; display: flex; align-items: center; }
.lf-ico { position: absolute; left: 11px; font-style: normal; font-size: 13px; opacity: .6; transition: opacity .2s, transform .2s; pointer-events: none; }
#login-form .lf input { width: 100%; padding: 11px 38px 11px 36px; border-radius: 10px; border: 1px solid #2a303c; background: rgba(5,7,11,.75); color: #fff; font-size: 13px;
  transition: border-color .2s, box-shadow .2s, background .2s; }
#login-form .lf input::placeholder { color: #5a6273; }
#login-form .lf input:focus { outline: none; border-color: #ffcb3c; background: rgba(12,14,20,.9); box-shadow: 0 0 0 3px rgba(255,203,60,.15), 0 0 18px rgba(255,203,60,.12); }
.lf-box:focus-within .lf-ico { opacity: 1; transform: scale(1.12); }
.lf-eye { position: absolute; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; cursor: pointer; font-size: 14px; opacity: .45; transition: opacity .2s, background .2s; }
.lf-eye:hover { opacity: .9; background: rgba(255,255,255,.06); }
.lf-eye.on { opacity: 1; }

/* validação do criar conta: verde = ok, vermelho = problema, travado = espera o campo anterior */
.lf-msg { min-height: 0; font-size: 10.5px; line-height: 13px; color: #8a93a3; }
.lf-msg:empty { display: none; }
.lf.ok .lf-msg { color: #6fe39a; animation: lw-in .3s ease both; }
.lf.bad .lf-msg { color: #ff8a8a; animation: lw-in .3s ease both; }
.lf.checking .lf-msg { color: var(--gold); }
#login-form .lf.ok input { border-color: #3fbf6f; box-shadow: 0 0 0 3px rgba(63,191,111,.15); }
#login-form .lf.bad input { border-color: #e0505a; box-shadow: 0 0 0 3px rgba(224,80,90,.15); }
.lf.ok > span { color: #8fe3b0; } .lf.bad > span { color: #ff9c9c; }
.lf-state { position: absolute; right: 12px; width: 16px; height: 16px; font-style: normal; display: grid; place-items: center; pointer-events: none; }
.lf.ok .lf-state::before { content: '✔'; color: #6fe39a; font-size: 13px; animation: ls-pop .35s cubic-bezier(.3,1.6,.5,1) both; }
.lf.bad .lf-state::before { content: '✖'; color: #ff7a7a; font-size: 12px; animation: ls-pop .35s cubic-bezier(.3,1.6,.5,1) both; }
.lf.checking .lf-state::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,203,60,.25); border-top-color: var(--gold); animation: lp-spin-r .7s linear infinite; }
@keyframes ls-pop { from { transform: scale(0); } }
.lf.bad .lf-box { animation: lp-shake .35s; }
.lf.locked { opacity: .4; transition: opacity .3s; }
.lf.locked .lf-box { cursor: not-allowed; }
#login-form .lf.locked input { cursor: not-allowed; }
.lf.locked .lf-ico { filter: grayscale(1); }

/* recarregou a página já logado: em vez do formulário, a tela de "voltando ao jogo" */
.login-resume { position: relative; display: none; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #c9d2e3;
  width: min(340px, 100%); padding: 34px 28px 28px; border-radius: 18px; background: linear-gradient(160deg, rgba(26,30,42,.82), rgba(12,14,20,.9));
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(255,203,60,.25);
  box-shadow: 0 30px 80px rgba(0,0,0,.65), inset 0 1px rgba(255,255,255,.07); animation: lp-in .6s ease both; }
.login-screen.resuming .login-resume { display: flex; }
.login-screen.resuming .login-panel { display: none; }
.login-resume b { font-size: 22px; letter-spacing: 1px; color: transparent;
  background: linear-gradient(90deg, #ffcb3c, #fff3c4, #ffcb3c, #e0a92a) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 0 #7a4a00); animation: ll-shine 4s linear infinite; }
.login-resume span { font-size: 13px; color: #9aa3b4; min-height: 16px; }
/* pokébola girando e quicando, como a de captura */
.lr-ball { position: relative; width: 74px; height: 74px; margin-bottom: 6px; animation: lr-bounce 1.2s cubic-bezier(.5,0,.5,1) infinite; }
.lr-ball::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -16px; height: 8px; border-radius: 50%; background: rgba(0,0,0,.5); filter: blur(3px);
  animation: lr-shadow 1.2s cubic-bezier(.5,0,.5,1) infinite; }
.lr-ball i { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 4px #1a1a1a, 0 0 30px rgba(255,203,60,.45);
  background: radial-gradient(circle at 50% 50%, #fff 0 13%, #1a1a1a 14% 21%, transparent 22%), linear-gradient(#e8394a 0 46%, #1a1a1a 46% 54%, #f4f4f4 54%);
  animation: lr-spin 1.2s ease-in-out infinite; }
.lr-ball i::after { content: ''; position: absolute; left: 18%; top: 12%; width: 22%; height: 14%; border-radius: 50%; background: rgba(255,255,255,.55); transform: rotate(-30deg); }
@keyframes lr-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes lr-shadow { 0%, 100% { transform: scale(1); opacity: .7; } 50% { transform: scale(.6); opacity: .35; } }
@keyframes lr-spin { 0% { transform: rotate(0); } 60%, 100% { transform: rotate(360deg); } }
.lr-bar { width: 220px; height: 6px; margin-top: 6px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 2px #000; }
.lr-bar i { display: block; width: 40%; height: 100%; border-radius: 6px; background: linear-gradient(90deg, transparent, #ffcb3c, #fff3c4, #ffcb3c, transparent);
  animation: lr-load 1.4s ease-in-out infinite; }
@keyframes lr-load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* campos de criar conta: abrem e fecham deslizando (para entrar não tem confirmação de senha) */
.reg-fields { display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: -12px; transition: grid-template-rows .4s ease, opacity .3s, margin-top .4s; }
.reg-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 4px; margin: -4px; } /* folga para o brilho do foco */
.login-screen.register .reg-fields { grid-template-rows: 1fr; opacity: 1; margin-top: 0; }
.login-screen:not(.register) .reg-fields { pointer-events: none; visibility: hidden; transition: grid-template-rows .4s ease, opacity .3s, margin-top .4s, visibility 0s .4s; }

.sex-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sex input { display: none; }
.sex span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; border-radius: 10px; border: 1px solid #2a303c; background: rgba(5,7,11,.75);
  color: #9aa3b4; cursor: pointer; transition: all .2s; }
.sex span b { font-size: 16px; color: #6fb4ff; }
.sex-f span b { color: #ff8ac2; }
.sex span:hover { border-color: #4a5266; color: #d7dce6; }
.sex input:checked + span { border-color: #6fb4ff; color: #fff; background: rgba(40,80,140,.3); box-shadow: 0 0 14px rgba(80,150,255,.25); }
.sex-f input:checked + span { border-color: #ff8ac2; background: rgba(140,40,90,.3); box-shadow: 0 0 14px rgba(255,120,190,.25); }

.btn-login { position: relative; overflow: hidden; margin-top: 2px; padding: 12px; border: 0; border-radius: 11px; cursor: pointer; font-weight: bold; font-size: 14px;
  letter-spacing: .5px; color: #1a1305; background: linear-gradient(#ffd75a, #d29a1c); box-shadow: 0 4px 0 #7a5208, 0 10px 24px rgba(210,154,28,.3);
  transition: transform .12s, box-shadow .12s, filter .2s; }
.btn-login::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: bl-shine 3.2s ease-in-out infinite; }
@keyframes bl-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.btn-login:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 5px 0 #7a5208, 0 14px 30px rgba(210,154,28,.4); }
.btn-login:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #7a5208, 0 6px 14px rgba(210,154,28,.25); }
.btn-login:disabled { filter: grayscale(.5) brightness(.85); cursor: wait; }
.btn-login.loading span::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border-radius: 50%;
  border: 2px solid rgba(26,19,5,.3); border-top-color: #1a1305; animation: lp-spin-r .7s linear infinite; }

.login-status { text-align: center; min-height: 16px; font-size: 12px; color: #9aa3b4; transition: color .2s; }
.login-status:empty { min-height: 0; margin: -6px 0; }
.login-status.err { color: #ff8a8a; }
.login-status.busy { color: var(--gold); }
.login-hint { color: #8a93a3; font-size: 11px; text-align: center; margin: 0; }
.login-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); color: #6d7586; font-size: 10px; text-align: center; }
.login-screen.hidden { display: none; }

@media (max-width: 420px) { .login-panel { padding: 22px 18px 16px; } .ll-text b { font-size: 28px; } }
@media (prefers-reduced-motion: reduce) { .login-screen *, .login-screen *::before, .login-screen *::after { animation: none !important; transition: none !important; } }

/* reCAPTCHA v2 na tela de entrada (o quadro do Google tem 304x78) */
.login-captcha { display: flex; justify-content: center; min-height: 78px; margin: 2px 0; }
.login-captcha > div { border-radius: 4px; overflow: hidden; }
/* dar pokémon (painel staff): nome e full addon na linha de baixo */
.st-give label:has(#sp-nick) { grid-column: span 2; }
.st-give label.st-chk { flex-direction: row; align-items: center; gap: 6px; grid-column: span 2; padding-bottom: 8px; cursor: pointer; }
.st-give label.st-chk input { width: auto; }

/* Tela de entrada com rolagem: com o e-mail e o captcha a aba Criar passa da altura da janela. A tela rola (o fundo
   animado fica parado) e o painel continua centralizado quando cabe (margin: auto em vez do place-items, que cortava
   o topo ao rolar). */
.login-screen { display: flex; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: rgba(255,203,60,.45) transparent; }
.login-screen::-webkit-scrollbar { width: 8px; }
.login-screen::-webkit-scrollbar-thumb { background: rgba(255,203,60,.4); border-radius: 8px; }
.login-screen .lb { position: fixed; }
.login-screen > .login-panel, .login-screen > .login-resume { margin: auto; flex-shrink: 0; }
/* janelas baixas (notebook): tudo mais compacto */
@media (max-height: 860px) {
  .login-panel { padding: 18px 22px 14px; }
  .login-logo { margin-bottom: 2px; }
  .ll-ball { width: 44px; height: 44px; }
  .ll-ball img { width: 36px; height: 36px; }
  .login-welcome { margin: 2px 0 10px; }
  .login-tabs { margin-bottom: 12px; }
  #login-form { gap: 9px; }
  #login-form .lf input { padding-top: 9px; padding-bottom: 9px; }
  .reg-inner { gap: 9px; }
  .login-foot { margin-top: 8px; padding-top: 8px; }
}
