/* Ninja Legends — site (página inicial, wiki, login/cadastro). Mesma paleta do HUD do jogo. */
@font-face { font-family: "Cinzel"; src: url("../fonts/Cinzel.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #07061a;
  --bg-2: #0d0b26;
  --panel: #131034;
  --panel-2: #1a1642;
  --line: rgba(232, 196, 106, 0.22);
  --line-strong: rgba(232, 196, 106, 0.55);
  --gold: #e8c46a;
  --gold-2: #f6dc94;
  --gold-deep: #9a6d1f;
  --text: #f1ead8;
  --dim: #b7ad97;
  --muted: #847b69;
  --red: #e2574c;
  --blue: #6f8ef2;
  --green: #79c98a;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3, .serif { font-family: "Cinzel", Georgia, serif; letter-spacing: 0.03em; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 10px; color: var(--gold); }
h3 { font-size: 20px; margin: 0 0 6px; color: var(--text); }
.wrap { width: min(var(--wrap), 100% - 32px); margin: 0 auto; }
.pixel { image-rendering: pixelated; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ── Topo ─────────────────────────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 6, 26, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); font-family: "Cinzel", serif; font-size: 20px; font-weight: 700; white-space: nowrap; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 22px; flex: 1; }
.nav a { color: var(--dim); font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--gold); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.who { color: var(--dim); font-size: 14px; white-space: nowrap; }
.who b { color: var(--text); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; color: var(--text); width: 42px; height: 38px; font-size: 18px; cursor: pointer; }

/* ── Botões ───────────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid var(--line-strong);
  font: 600 15px/1 system-ui, sans-serif; cursor: pointer; color: var(--text); background: rgba(255, 255, 255, 0.03);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); color: var(--text); background: rgba(232, 196, 106, 0.1); }
.btn-gold {
  color: #2a1a02; border-color: #f6dc94;
  background: linear-gradient(180deg, #f8e2a0 0%, #e8c46a 45%, #b98a2f 100%);
  box-shadow: 0 6px 20px rgba(232, 196, 106, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-gold:hover { color: #2a1a02; box-shadow: 0 10px 28px rgba(232, 196, 106, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn-lg { padding: 15px 30px; font-size: 17px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ── Hero ─────────────────────────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: min(760px, 88vh); display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url("../img/bg/floresta.jpg") center/cover no-repeat; transform: scale(1.05); animation: drift 40s ease-in-out infinite alternate; }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,6,26,.94) 0%, rgba(7,6,26,.7) 42%, rgba(7,6,26,.25) 70%, rgba(7,6,26,.55) 100%), linear-gradient(to top, var(--bg) 0%, transparent 35%); }
@keyframes drift { from { transform: scale(1.05) translateX(-1%); } to { transform: scale(1.12) translateX(1%); } }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 70px 0 90px; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 14px; background: rgba(7, 6, 26, .5); }
.hero h1 { font-size: clamp(44px, 7vw, 82px); line-height: 1.02; margin: 18px 0 16px; color: var(--gold-2); text-shadow: 0 4px 0 #2b1d05, 0 0 40px rgba(232,196,106,.25); }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text); max-width: 560px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--dim); }
.hero-art { position: relative; height: 420px; display: flex; align-items: flex-end; justify-content: center; gap: clamp(18px, 4vw, 56px); }
.hero-hero { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; }
.hero-hero img { height: 300px; filter: drop-shadow(0 16px 20px rgba(0,0,0,.6)); animation: bob 3.2s ease-in-out infinite; }
.hero-hero.h2 img { height: 330px; animation-delay: -1.1s; }
.hero-hero.h3 img { animation-delay: -2.2s; }
.hero-hero::after { content: ""; position: absolute; bottom: 26px; width: 80%; height: 18px; border-radius: 50%; background: radial-gradient(rgba(0,0,0,.6), transparent 70%); z-index: -1; }
.hero-hero figcaption { margin-top: 10px; font-family: "Cinzel", serif; font-size: 15px; letter-spacing: .12em; color: var(--gold-2); text-shadow: 0 2px 6px rgba(0,0,0,.8); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ── Seções ───────────────────────────────────────────────────────────────────────────────── */
.section { padding: 90px 0; }
.section.alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--dim); margin: 0; font-size: 17px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .ico { flex: none; width: 84px; height: 84px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(7,6,26,.6); display: grid; place-items: center; overflow: hidden; }
.feature .ico img { max-height: 78px; max-width: 78px; image-rendering: pixelated; }
.feature p { margin: 0; color: var(--dim); font-size: 15px; }

/* ── Classes ──────────────────────────────────────────────────────────────────────────────── */
.class-tabs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.class-tab { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font: 600 15px system-ui, sans-serif; }
.class-tab img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.class-tab.on { border-color: var(--gold); background: rgba(232,196,106,.12); color: var(--gold-2); }
.class-panel { display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: start; }
.class-stage { position: relative; height: 380px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; background: center/cover no-repeat; }
.class-stage::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,6,26,.85), rgba(7,6,26,.15)); }
.class-stage img { position: relative; height: 300px; margin-bottom: 18px; filter: drop-shadow(0 12px 14px rgba(0,0,0,.6)); }
.class-info .role { color: var(--gold); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.class-info h3 { font-size: 34px; font-family: "Cinzel", serif; margin: 2px 0 4px; }
.class-info .tagline { font-style: italic; color: var(--dim); margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--dim); }
.chip b { color: var(--text); font-weight: 600; }
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.skill { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: rgba(7,6,26,.55); border: 1px solid var(--line); }
.skill img { width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--line-strong); image-rendering: pixelated; flex: none; }
.skill h4 { margin: 0 0 2px; font-size: 15px; color: var(--gold-2); }
.skill p { margin: 0; font-size: 14px; color: var(--dim); line-height: 1.45; }
.skill .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Regiões ──────────────────────────────────────────────────────────────────────────────── */
.regions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.region { position: relative; min-height: 250px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: center/cover no-repeat; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; }
.region::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,6,26,.95) 10%, rgba(7,6,26,.2) 70%); }
.region > * { position: relative; }
.region h3 { font-family: "Cinzel", serif; font-size: 24px; color: var(--gold-2); }
.region .lv { font-size: 13px; color: var(--dim); }
.region .mobs { display: flex; gap: 4px; align-items: flex-end; height: 70px; margin: 6px 0 4px; }
.region .mobs img { max-height: 70px; image-rendering: pixelated; filter: drop-shadow(0 4px 4px rgba(0,0,0,.6)); }
.aura-pantano { filter: drop-shadow(0 0 3px rgba(190, 80, 255, .9)) hue-rotate(70deg) saturate(1.2) !important; }

/* ── Galeria ──────────────────────────────────────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery figure { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); cursor: zoom-in; }
.gallery img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 8px 12px; font-size: 14px; color: var(--dim); }
.lightbox { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(4,3,14,.92); padding: 24px; cursor: zoom-out; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: var(--shadow); }

/* ── Ranking ──────────────────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--dim); cursor: pointer; font: 600 14px system-ui, sans-serif; }
.tab.on { color: #2a1a02; background: var(--gold); border-color: var(--gold); }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; margin-bottom: 6px; background: rgba(7,6,26,.5); border: 1px solid var(--line); }
.rank-list .pos { font-family: "Cinzel", serif; font-weight: 700; color: var(--muted); }
.rank-list li:nth-child(1) .pos { color: #ffd84d; }
.rank-list li:nth-child(2) .pos { color: #dadbe6; }
.rank-list li:nth-child(3) .pos { color: #d98c4f; }
.rank-list .nm { font-weight: 600; }
.rank-list .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.rank-list .val { color: var(--gold-2); font-weight: 700; text-align: right; }
.rank-empty { padding: 20px; text-align: center; color: var(--muted); }

/* ── CTA + rodapé ─────────────────────────────────────────────────────────────────────────── */
.cta-band { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line-strong); padding: 60px 30px; text-align: center; background: url("../img/bg/sombra.jpg") center/cover no-repeat; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: rgba(7,6,26,.72); }
.cta-band > * { position: relative; }
.cta-band p { color: var(--dim); max-width: 560px; margin: 0 auto 24px; }
footer { border-top: 1px solid var(--line); padding: 34px 0 50px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--dim); }

/* ── Janela de login/cadastro ─────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 3, 14, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal.on { display: flex; }
.modal-box { position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 18px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, #1c1846, #110e30); box-shadow: 0 30px 80px rgba(0,0,0,.6); padding: 28px; }
.modal-box .x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--dim); font-size: 18px; cursor: pointer; }
.modal-box .x:hover { color: var(--text); border-color: var(--gold); }
.modal-logo { display: block; width: 72px; height: 72px; margin: 0 auto 6px; }
.modal-box h3 { text-align: center; font-family: "Cinzel", serif; color: var(--gold-2); font-size: 24px; margin-bottom: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(7,6,26,.7); border: 1px solid var(--line); margin-bottom: 20px; }
.seg button { padding: 10px; border-radius: 999px; border: none; background: transparent; color: var(--dim); font: 600 15px system-ui, sans-serif; cursor: pointer; }
.seg button.on { background: var(--gold); color: #2a1a02; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--dim); margin-bottom: 6px; }
.field input { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(7,6,26,.75); color: var(--text); font: 16px system-ui, sans-serif; outline: none; }
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,196,106,.18); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--dim); margin: 4px 0 18px; }
.check input { margin-top: 3px; accent-color: var(--gold); }
.form-msg { min-height: 22px; font-size: 14px; margin: 0 0 12px; }
.form-msg.err { color: #ff8f84; }
.form-msg.ok { color: var(--green); }
.modal-box .btn { width: 100%; }
.server-state { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.off { background: var(--red); }

/* ── Wiki ─────────────────────────────────────────────────────────────────────────────────── */
.wiki-hero { padding: 54px 0 30px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(232,196,106,.06), transparent); }
.wiki-hero h1 { font-size: clamp(34px, 5vw, 52px); color: var(--gold-2); margin: 0 0 8px; }
.wiki-hero p { color: var(--dim); margin: 0 0 18px; max-width: 720px; }
.wiki-search { width: min(520px, 100%); padding: 13px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(7,6,26,.75); color: var(--text); font: 16px system-ui, sans-serif; outline: none; }
.wiki-layout { display: grid; grid-template-columns: 250px 1fr; gap: 36px; padding: 34px 0 80px; }
.wiki-layout > * { min-width: 0; }
.wiki-nav { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; }
.wiki-nav .grp { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.wiki-nav a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--dim); font-size: 15px; border-left: 2px solid transparent; }
.wiki-nav a:hover { color: var(--text); background: rgba(255,255,255,.03); }
.wiki-nav a.on { color: var(--gold-2); border-left-color: var(--gold); background: rgba(232,196,106,.07); }
.wiki-content section { scroll-margin-top: 84px; padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.wiki-content section.hidden { display: none; }
.wiki-content h2 { font-size: 30px; }
.wiki-content h3 { margin-top: 22px; color: var(--gold-2); font-family: system-ui, sans-serif; font-size: 18px; letter-spacing: 0; }
.wiki-content p, .wiki-content li { color: var(--dim); }
.wiki-content strong { color: var(--text); }
.tbl-wrap { overflow-x: auto; margin: 12px 0 6px; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(232,196,106,.12); vertical-align: middle; }
th { background: rgba(232,196,106,.08); color: var(--gold); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td img.mob { height: 54px; image-rendering: pixelated; }
td img.ico { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; border-radius: 8px; vertical-align: middle; }
td img.ico + img.ico { margin-left: 4px; }
.pieces { display: flex; flex-wrap: wrap; gap: 6px; }
.piece { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: rgba(7,6,26,.55); }
.piece img.ico { width: 38px; height: 38px; }
.wiki-content h3 img.mob { height: 46px; image-rendering: pixelated; vertical-align: middle; margin-right: 6px; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 12px 0 8px; }
.fx-card { border: 1px solid var(--line); border-radius: 12px; background: rgba(7,6,26,.55); overflow: hidden; }
.fx-img { height: 150px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 80%, rgba(232,196,106,.10), rgba(7,6,26,.9) 70%); }
.fx-img img { max-width: 92%; max-height: 140px; image-rendering: pixelated; }
.fx-txt { padding: 10px 12px 12px; }
.fx-txt p { margin: 6px 0 0; font-size: 14px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--gold-2); font: 600 11px system-ui, sans-serif; vertical-align: 2px; }
.note { padding: 12px 16px; border-radius: 10px; background: rgba(111,142,242,.08); border: 1px solid rgba(111,142,242,.3); color: var(--dim); font-size: 15px; margin: 12px 0; }
.kbd { display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-strong); background: rgba(7,6,26,.7); color: var(--gold-2); font: 600 13px system-ui, sans-serif; text-align: center; }
.no-results { display: none; color: var(--muted); padding: 30px 0; }

/* ── Celular ──────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 40px 0 60px; }
  .hero-art { height: 260px; order: -1; }
  .hero-hero img { height: 190px; } .hero-hero.h2 img { height: 210px; }
  .grid-3, .regions, .gallery { grid-template-columns: 1fr 1fr; }
  .class-panel { grid-template-columns: 1fr; }
  .class-stage { height: 300px; }
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-nav { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 4px; }
  .wiki-nav .grp { width: 100%; margin: 8px 0 2px; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
  .menu-btn { display: block; }
  .topbar .wrap { gap: 12px; }
  .brand span { display: none; }
  .who { display: none; }
  .top-actions { margin-left: auto; }
  .grid-3, .grid-2, .regions, .gallery, .skills { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .btn { padding: 10px 16px; }
}
