/* =====================================================================
   NTO Idle — tema "vila oculta à noite"
   ===================================================================== */
@font-face {
  font-family: "NjNaruto";
  src: url("../assets/ui/njnaruto.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg-0: #0b0d12;
  --bg-1: #12151d;
  --bg-2: #181c26;
  --bg-3: #212633;
  --line: #2a3040;
  --line-2: #364058;
  --text: #e8ebf3;
  --text-2: #a9b0c2;
  --muted: #6c7489;
  --orange: #ff7a1a;
  --orange-2: #ffa054;
  --chakra: #3cc7ff;
  --gold: #f2c14e;
  --hp: #ff4d5e;
  --mana: #3d8bff;
  --exp: #a970ff;
  --green: #4ade80;
  --red: #f43f5e;
  --rare: #ffd166;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 20% -10%, #1c2233 0%, var(--bg-0) 60%),
              var(--bg-0);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
}
button { font-family: inherit; }
input, select {
  font-family: inherit;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
input:focus, select:focus { border-color: var(--orange); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.grow { flex: 1; min-height: 0; }
.gold-text { color: var(--gold); }
.chakra-text { color: var(--chakra); }
.hp-text { color: var(--hp); }
.green { color: var(--green); }
.red { color: var(--red); }
.orange { color: var(--orange-2); }
.small { font-size: 12px; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: block; }

/* ---------- logo ---------- */
.logo, .logo-big {
  font-family: "NjNaruto", var(--font);
  letter-spacing: 1px;
  color: var(--text);
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(255, 122, 26, .35);
}
.logo { font-size: 26px; }
.logo-big { font-size: 56px; }
.logo span, .logo-big span { color: var(--orange); }

/* ---------- loading ---------- */
#screen-loading { display: none; place-items: center; }
#screen-loading.active { display: grid; }
.loading-box { text-align: center; width: 360px; }
.loading-bar { height: 8px; background: var(--bg-3); border-radius: 8px; overflow: hidden; margin: 22px 0 10px; }
#loading-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--gold)); transition: width .2s; }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: transform .06s, background .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
}
.btn:hover { background: #2a3040; border-color: #4a5470; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #ff8a35, #ff6a00); border-color: #ff9a4d; color: #1a0d00; }
.btn-primary:hover { background: linear-gradient(180deg, #ff9b52, #ff7a1a); }
.btn-danger { background: #3a1620; border-color: #6b2333; color: #ff9aa8; }
.btn-danger:hover { background: #4d1b29; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text-2);
  white-space: nowrap;
}
.chip.orange { background: rgba(255, 122, 26, .12); border-color: rgba(255, 122, 26, .5); color: var(--orange-2); }
.chip.gold { background: rgba(242, 193, 78, .12); border-color: rgba(242, 193, 78, .5); color: var(--gold); }
.chip.green { background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .45); color: var(--green); }
.chip.red { background: rgba(244, 63, 94, .12); border-color: rgba(244, 63, 94, .5); color: #ff8a9a; }
.chip.blue { background: rgba(60, 199, 255, .12); border-color: rgba(60, 199, 255, .5); color: var(--chakra); }
.chip.purple { background: rgba(169, 112, 255, .12); border-color: rgba(169, 112, 255, .5); color: #c9a4ff; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.02) inset;
}
.card-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted);
  font-weight: 700; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;
}
.panel-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.panel-sub { color: var(--text-2); margin: 0 0 16px; }

/* ---------- bars ---------- */
.bar {
  position: relative; height: 14px; background: #0c0f16; border-radius: 6px; overflow: hidden;
  border: 1px solid #262c3b;
}
.bar > div { height: 100%; width: 0%; transition: width .25s ease; border-radius: 6px; }
.bar > span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; font-family: var(--mono); color: #fff; text-shadow: 0 1px 2px #000;
}
.bar-hp > div { background: linear-gradient(90deg, #ff2d4a, #ff6b7a); box-shadow: 0 0 10px rgba(255,45,74,.4); }
.bar-mana > div { background: linear-gradient(90deg, #2e6cff, #5ab0ff); box-shadow: 0 0 10px rgba(46,108,255,.4); }
.bar-exp > div { background: linear-gradient(90deg, #7c3aed, #b388ff); }
.bar-enemy > div { background: linear-gradient(90deg, #ff9500, #ffc94d); }
.bar-cd > div { background: var(--chakra); }
.bar.thin { height: 8px; }
.bar.thin > span { display: none; }

/* =====================================================================
   CRIAÇÃO DE PERSONAGEM
   ===================================================================== */
#screen-create { overflow: auto; }
.create-wrap { max-width: 1240px; margin: 0 auto; padding: 32px 24px 60px; }
.create-header { text-align: center; margin-bottom: 24px; }
.create-body { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.voc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.voc-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px 8px;
  cursor: pointer; text-align: center; transition: transform .12s, border-color .12s, box-shadow .12s;
  position: relative;
}
.voc-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.voc-card.selected { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255,122,26,.35), 0 8px 20px rgba(255,122,26,.15); }
.voc-card .sprite-box { margin: 0 auto 6px; }
.voc-card .voc-name { font-weight: 700; font-size: 13px; }
.voc-card .voc-sub { font-size: 10px; color: var(--muted); }
.voc-detail { position: sticky; top: 20px; align-self: start; }
.voc-detail .portrait { width: 100%; height: 160px; object-fit: contain; image-rendering: pixelated; margin-bottom: 8px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.voc-detail h3 { margin: 0 0 4px; font-size: 20px; }
.voc-detail ul { list-style: none; padding: 0; margin: 10px 0 0; }
.voc-detail li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.saga-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.create-footer { display: flex; align-items: end; gap: 14px; margin-top: 22px; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.field input, .field select { min-width: 220px; }

/* =====================================================================
   INGAME LAYOUT
   ===================================================================== */
#screen-game { display: none; flex-direction: column; }
#screen-game.active { display: flex; }
.topbar {
  height: 64px; display: grid; grid-template-columns: 170px 300px 1fr auto auto; align-items: center;
  gap: 18px; padding: 0 18px; background: linear-gradient(180deg, #161a24, #10131b);
  border-bottom: 1px solid var(--line);
}
.top-char { display: flex; align-items: center; gap: 10px; }
.top-portrait { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; }
.top-name { font-weight: 800; display: flex; gap: 8px; align-items: center; }
.top-level { font-size: 12px; color: var(--text-2); }
.top-exp .bar { height: 18px; }
.top-stats { display: flex; gap: 8px; }
.stat-pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); font-family: var(--mono); font-weight: 700; font-size: 13px;
}
.stat-pill i { font-style: normal; color: var(--muted); }
.stat-pill.gold { color: var(--gold); }
.stat-pill.gold i { color: var(--gold); }
.stat-pill.elo { color: #c9a4ff; }
.stat-pill.elo i { color: #c9a4ff; }
.top-actions { display: flex; gap: 6px; }

.layout { flex: 1; display: grid; grid-template-columns: 200px 1fr 320px; min-height: 0; }
.sidenav { background: var(--bg-1); border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--text-2); cursor: pointer; font-weight: 600; font-size: 13px;
  text-align: left; position: relative;
}
.nav-btn i { font-style: normal; width: 20px; text-align: center; font-size: 15px; }
.nav-btn:hover { background: var(--bg-2); color: var(--text); }
.nav-btn.active { background: rgba(255,122,26,.12); border-color: rgba(255,122,26,.35); color: var(--orange-2); }
.nav-btn em { margin-left: auto; font-style: normal; font-size: 10px; background: var(--orange); color: #1a0d00; border-radius: 999px; padding: 1px 6px; font-weight: 800; }
.nav-btn em:empty { display: none; }
.nav-spacer { flex: 1; }

.main { overflow: auto; padding: 20px 22px; }
.panel { display: none; }
.panel.active { display: block; }

.rightbar { background: var(--bg-1); border-left: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.vital-label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; font-family: var(--mono); }
.vital + .vital { margin-top: 8px; }
.vital-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 10px; font-size: 12px; }
.vital-grid div { display: flex; justify-content: space-between; }
.vital-grid b { font-family: var(--mono); font-weight: 600; }

.equip-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, auto); gap: 4px; max-width: 200px; margin: 0 auto; }
.equip-slot {
  aspect-ratio: 1; background: #0c0f16; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center;
  position: relative; cursor: pointer; transition: border-color .12s;
}
.equip-slot:hover { border-color: var(--line-2); }
.equip-slot.filled { border-color: #3b4560; background: #121620; }
.equip-slot.rare { border-color: var(--rare); box-shadow: 0 0 8px rgba(255,209,102,.25) inset; }
.equip-slot.rare-tank { border-color: var(--green); box-shadow: 0 0 8px rgba(74,222,128,.25) inset; }
.equip-slot.rare-dano { border-color: var(--orange); box-shadow: 0 0 8px rgba(255,122,26,.25) inset; }
.equip-slot.rare-speed { border-color: var(--chakra); box-shadow: 0 0 8px rgba(60,199,255,.25) inset; }
.equip-slot small { position: absolute; bottom: 1px; left: 0; right: 0; text-align: center; font-size: 7px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; pointer-events: none; }
.equip-slot.filled small { display: none; }
.equip-slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.equip-slot .rar { position: absolute; right: 3px; top: 1px; font-size: 10px; font-family: var(--mono); color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.slot-glyph { width: 26px; height: 26px; fill: none; stroke: #3a4258; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.equip-slot:hover .slot-glyph { stroke: #5a6480; }
.equip-corner { aspect-ratio: 1; display: grid; place-items: center; opacity: .9; }
.equip-corner img { width: 44px; height: 44px; object-fit: contain; }
.toggles { display: flex; flex-direction: column; gap: 6px; }
.toggle { display: flex; align-items: center; justify-content: space-between; font-size: 12px; cursor: pointer; }
.switch { width: 34px; height: 18px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.toggle.on .switch { background: rgba(255,122,26,.35); border-color: var(--orange); }
.toggle.on .switch::after { left: 18px; background: var(--orange); }

.combat-log { overflow: auto; height: 100%; font-family: var(--mono); font-size: 11px; display: flex; flex-direction: column; gap: 2px; }
.combat-log div { padding: 2px 4px; border-radius: 4px; color: var(--text-2); }
.combat-log .dmg { color: #ffb4bd; }
.combat-log .hit { color: #ffd9a3; }
.combat-log .heal { color: #9bf0b7; }
.combat-log .loot { color: var(--gold); }
.combat-log .exp { color: #c9a4ff; }
.combat-log .sys { color: var(--chakra); }
.combat-log .death { color: var(--red); font-weight: 700; }

/* =====================================================================
   SPRITES
   ===================================================================== */
.sprite-box { position: relative; display: grid; place-items: center; }
.sprite { image-rendering: pixelated; background-repeat: no-repeat; display: block; }
.icon-item { width: 32px; height: 32px; image-rendering: pixelated; }

/* =====================================================================
   HUNT
   ===================================================================== */
.hunt-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
.zone-tier { margin-bottom: 20px; }
.zone-tier h4 { margin: 0 0 8px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; display: flex; align-items: center; gap: 10px; }
.zone-tier h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.zone-card { display: flex; gap: 12px; align-items: center; cursor: pointer; transition: transform .1s, border-color .1s; padding: 10px 12px; }
.zone-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.zone-card.locked { opacity: .45; cursor: not-allowed; }
.zone-card.active { border-color: var(--orange); box-shadow: 0 0 0 1px rgba(255,122,26,.5); }
.zone-card .zone-name { font-weight: 700; font-size: 13px; }
.zone-card .zone-meta { font-size: 11px; color: var(--muted); }
.zone-card .zone-mons { display: flex; gap: 2px; margin-top: 4px; }
.zone-spots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.zone-spots .spot { font-size: 10px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-1); color: var(--text-2); cursor: pointer; font-family: var(--mono); }
.zone-spots .spot:hover { border-color: var(--orange); color: var(--orange-2); }
.zone-spots .spot.on { background: rgba(255,122,26,.15); border-color: var(--orange); color: var(--orange-2); }
.danger { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 4px; }
.danger.d0 { color: var(--green); background: rgba(74,222,128,.1); }
.danger.d1 { color: var(--gold); background: rgba(242,193,78,.1); }
.danger.d2 { color: var(--orange-2); background: rgba(255,122,26,.12); }
.danger.d3 { color: var(--red); background: rgba(244,63,94,.12); }

/* mapa real */
.mapview { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #06070b; aspect-ratio: 15 / 11; }
.mapview-canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.mapview-hud { position: absolute; left: 10px; top: 8px; font-family: var(--mono); font-size: 11px; color: #cfd6e6; text-shadow: 0 1px 2px #000; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 6px; }
/* arena */
.arena-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 14px; }
.arena {
  position: relative; height: 300px; border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(600px 200px at 50% 110%, rgba(255,122,26,.10), transparent 70%),
    linear-gradient(180deg, #0f1420 0%, #131927 55%, #1b2233 100%);
  border: 1px solid var(--line);
}
.arena::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px; opacity: .6;
  mask-image: linear-gradient(180deg, transparent, #000 40%);
}
.arena .ground { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.35)); }
.fighter { position: absolute; bottom: 70px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .12s; }
.fighter.player { left: 20%; }
.fighter.enemy { right: 20%; }
.fighter .name { font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.fighter .bar { width: 120px; height: 9px; }
.fighter .sprite-box { filter: drop-shadow(0 8px 6px rgba(0,0,0,.6)); }
.fighter.hit .sprite-box { animation: shake .25s; }
.fighter.dead .sprite-box { animation: die .5s forwards; }
.fighter.attack .sprite-box { animation: lunge .3s; }
.fighter.enemy.attack .sprite-box { animation: lungeL .3s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
@keyframes die { to { opacity: 0; transform: translateY(6px) scale(.9); } }
@keyframes lunge { 30% { transform: translateX(14px); } }
@keyframes lungeL { 30% { transform: translateX(-14px); } }
.arena .idle-msg { position: absolute; left: 0; right: 0; top: 18px; text-align: center; color: var(--muted); font-weight: 600; }
.float-dmg {
  position: absolute; font-family: var(--mono); font-weight: 800; font-size: 15px; pointer-events: none;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(0,0,0,.8); animation: floatUp 1s ease-out forwards; white-space: nowrap;
}
.float-dmg.player { color: #ffd166; }
.float-dmg.enemy { color: #ff7b8a; }
.float-dmg.heal { color: #7ff0a4; }
.float-dmg.crit { font-size: 20px; color: #ff9a3c; }
.float-dmg.miss { color: var(--muted); font-size: 12px; }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(0) scale(.8); } 15% { opacity: 1; transform: translateY(-8px) scale(1.05); } 100% { opacity: 0; transform: translateY(-44px); } }
.fx { position: absolute; pointer-events: none; image-rendering: pixelated; z-index: 3; }
.arena-side { display: flex; flex-direction: column; gap: 10px; }
.minimap { width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #06070b; position: relative; }
.minimap canvas { width: 100%; height: 100%; image-rendering: pixelated; filter: saturate(.75) brightness(.85); }
.minimap .pin { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 0 10px var(--orange); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,122,26,.0); } }
.hunt-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12px; }
.hunt-stats div { display: flex; justify-content: space-between; }
.hunt-stats b { font-family: var(--mono); font-weight: 600; }
.loot-strip { display: flex; flex-wrap: wrap; gap: 4px; min-height: 36px; }
.loot-strip .li { position: relative; width: 36px; height: 36px; background: #0c0f16; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; }
.loot-strip .li span { position: absolute; right: 1px; bottom: 0; font-size: 9px; font-family: var(--mono); color: var(--gold); text-shadow: 0 0 2px #000; }
.hunt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.jutsu-bar { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.jutsu-cd { width: 44px; text-align: center; }
.jutsu-cd .ic { width: 44px; height: 44px; border-radius: 8px; background: #0c0f16; border: 1px solid var(--line); position: relative; overflow: hidden; display: grid; place-items: center; }
.jutsu-cd .ic .ov { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(60,199,255,.25); }
.jutsu-cd small { font-size: 9px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jutsu-cd.active .ic { border-color: #c9a4ff; box-shadow: 0 0 8px rgba(169,112,255,.5); }
.spell-icon { image-rendering: pixelated; display: block; }
.jutsu-card .jdesc { font-size: 11px; color: var(--text-2); margin-top: 6px; line-height: 1.35; }
.jutsu-card .fxbox img { width: 40px; height: 40px; }

/* =====================================================================
   PERSONAGEM / INVENTÁRIO
   ===================================================================== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.stat-list { list-style: none; margin: 0; padding: 0; }
.stat-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.stat-list li:last-child { border-bottom: 0; }
.stat-list b { font-family: var(--mono); font-weight: 600; }
.stat-list .sub { font-size: 11px; color: var(--muted); }
.char-hero { display: flex; gap: 16px; align-items: center; }
.char-hero .sprite-box { width: 96px; height: 96px; background: #0c0f16; border-radius: 12px; border: 1px solid var(--line); }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.inv-slot {
  aspect-ratio: 1; background: #0c0f16; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center;
  position: relative; cursor: pointer; transition: border-color .12s, transform .1s;
}
.inv-slot:hover { border-color: var(--line-2); transform: translateY(-1px); }
.inv-slot.rare { border-color: var(--rare); }
.inv-slot.equipable { border-color: #3b4560; }
.inv-slot .count { position: absolute; right: 2px; bottom: 1px; font-size: 9px; font-family: var(--mono); color: var(--gold); text-shadow: 0 0 2px #000; }
.inv-slot .lv { position: absolute; left: 3px; top: 1px; font-size: 8px; color: var(--muted); }
.inv-slot .lv.locked { color: var(--red); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.filters .btn.active, .map-ctl .btn.active { border-color: var(--orange); color: var(--orange-2); }

/* item detail (modal/tooltip) */
.item-head { display: flex; gap: 12px; align-items: center; }
.item-head .ibox { width: 48px; height: 48px; background: #0c0f16; border: 1px solid var(--line-2); border-radius: 8px; display: grid; place-items: center; }
.item-head .ibox img { width: 32px; height: 32px; image-rendering: pixelated; }
.item-name { font-weight: 800; font-size: 15px; }
.item-name.rare { color: var(--rare); }
.item-stats { margin: 10px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 12px; }
.item-stats div { display: flex; justify-content: space-between; }
.item-stats b { font-family: var(--mono); font-weight: 600; }
.item-stats .up { color: var(--green); }
.item-stats .down { color: var(--red); }
.item-desc { font-size: 12px; color: var(--text-2); font-style: italic; }
.item-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none; max-width: 300px;
  background: #0d1017; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 12px;
}

/* =====================================================================
   JUTSUS / LOJA / TASKS / SAGAS / RANK
   ===================================================================== */
.jutsu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.jutsu-card { display: flex; gap: 12px; align-items: center; }
.jutsu-card.locked { opacity: .5; }
.jutsu-card .fxbox { width: 56px; height: 56px; background: #0c0f16; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.jutsu-card .jname { font-weight: 700; }
.jutsu-card .jwords { font-size: 11px; color: var(--muted); font-style: italic; }
.jutsu-card .jmeta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.shop-item { display: flex; gap: 10px; align-items: center; }
.shop-item .ibox { width: 44px; height: 44px; background: #0c0f16; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.shop-item .ibox img { width: 32px; height: 32px; image-rendering: pixelated; }
.shop-item .price { font-family: var(--mono); color: var(--gold); font-weight: 700; font-size: 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 14px; cursor: pointer; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; }
.tab.active { color: var(--orange-2); border-bottom-color: var(--orange); }

.task-list { display: grid; gap: 8px; }
.task-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.task-card.done { opacity: .55; }
.task-card .tname { font-weight: 700; }
.task-card .bar { margin-top: 6px; height: 8px; }
.task-card .bar span { display: none; }

.saga-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.boss-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; position: relative; }
.boss-card.locked { opacity: .5; }
.boss-card.done { border-color: rgba(74,222,128,.4); }
.boss-card .bname { font-weight: 800; }
.boss-card .bmeta { font-size: 11px; color: var(--muted); }
.boss-card .sprite-box { height: 96px; }
.boss-card .check { position: absolute; top: 8px; right: 8px; }

.rank-list { display: grid; gap: 8px; }
.rank-card { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; }
.rank-card img { width: 64px; height: 64px; object-fit: contain; image-rendering: auto; }
.rank-card.current { border-color: var(--orange); }
.rank-card.locked { opacity: .5; }

/* map panel */
.map-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #06070b; height: calc(100vh - 200px); }
.map-wrap canvas { position: absolute; left: 0; top: 0; image-rendering: pixelated; cursor: grab; filter: saturate(.75) brightness(.85); }
.map-ctl { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; flex-wrap: wrap; }

/* =====================================================================
   MODAL / TOASTS
   ===================================================================== */
.modal { position: fixed; inset: 0; background: rgba(4,6,10,.7); display: grid; place-items: center; z-index: 50; backdrop-filter: blur(3px); }
.modal-box { width: min(560px, 92vw); max-height: 86vh; overflow: auto; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #12161f; border: 1px solid var(--line-2); border-left: 3px solid var(--orange); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; animation: toastIn .2s; max-width: 340px; }
.toast.gold { border-left-color: var(--gold); }
.toast.green { border-left-color: var(--green); }
.toast.red { border-left-color: var(--red); }
.toast.purple { border-left-color: var(--exp); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv b { font-family: var(--mono); font-weight: 600; }
.offline-box .big { font-size: 26px; font-weight: 800; color: var(--gold); font-family: var(--mono); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 64px 1fr 300px; }
  .nav-btn span { display: none; }
  .topbar { grid-template-columns: 120px 240px 1fr auto auto; }
}

/* =====================================================================
   LOGIN / CONTA / PERSONAGENS
   ===================================================================== */
.login-screen { overflow: auto; }
.login-bg { position: absolute; inset: 0; background: url("../assets/ui/login-bg.jpg") center/cover no-repeat; filter: saturate(.85) brightness(.55); }
.login-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,18,.35), rgba(11,13,18,.9) 85%); }
.login-wrap { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 16px; gap: 10px; }
.login-logo { width: 190px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }
.login-title { font-family: "NjNaruto", var(--font); font-size: 44px; letter-spacing: 1px; text-shadow: 0 2px 0 #000, 0 0 24px rgba(255,122,26,.45); }
.login-title span { color: var(--orange); }
.login-title.small-title { font-size: 30px; }
.login-card { width: min(400px, 100%); padding: 18px 20px 16px; background: rgba(18,21,29,.92); backdrop-filter: blur(6px); }
.login-tabs { margin-bottom: 14px; }
.login-tabs .tab { flex: 1; text-align: center; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card .field input { min-width: 0; width: 100%; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.form-error { background: rgba(244,63,94,.12); border: 1px solid rgba(244,63,94,.45); color: #ff8a9a; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.login-mode { margin-top: 12px; text-align: center; }
.login-foot { text-align: center; max-width: 460px; }
.chars-wrap { position: relative; max-width: 860px; margin: 0 auto; padding: 30px 16px 60px; }
.chars-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.chars-list { display: grid; gap: 8px; }
.char-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .12s, transform .1s; }
.char-row:hover { border-color: var(--orange); transform: translateY(-1px); }
.char-row .cname { font-weight: 800; font-size: 15px; }
.char-row .cmeta { font-size: 12px; color: var(--text-2); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.char-row .cactions { display: flex; gap: 6px; }
.chars-empty { padding: 30px; text-align: center; color: var(--muted); }

/* depot */
.depot-list { display: grid; gap: 6px; }
.depot-card { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; }
.depot-card.here { border-color: var(--green); }
.depot-card .dname { font-weight: 700; }
.inv-slot.disabled { opacity: .6; cursor: not-allowed; }
