/* ================= Entrada (login / selecao / criacao) =================
   Cenario 3D de Armia ao fundo, vinheta, brasas e paineis de vidro escuro com
   cantos dourados. */
:root {
  --lb-gold: #d6b26a;
  --lb-gold-hi: #f6dfa2;
  --lb-gold-lo: #8a6a33;
  --lb-ink: #0b0806;
  --lb-glass: rgba(14, 10, 7, .72);
  --lb-line: rgba(214, 178, 106, .28);
  --lb-text: #ece3d1;
  --lb-muted: #a2967f;
  --lb-danger: #e0715c;
}

body.in-lobby .panel, body.in-lobby #topbar, body.in-lobby #hud, body.in-lobby .target-frame,
body.in-lobby #chat, body.in-lobby #damage-layer { display: none !important; }
body:not(.in-lobby) #lobby, body:not(.in-lobby) #embers { display: none; }

#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 15; pointer-events: none; }
#lobby { position: fixed; inset: 0; z-index: 20; font-family: Inter, "Segoe UI", sans-serif; color: var(--lb-text); }
.lb-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 35%, rgba(5, 3, 2, .55) 70%, rgba(3, 2, 1, .92) 100%),
    linear-gradient(to bottom, rgba(5, 3, 2, .55), transparent 22%, transparent 62%, rgba(5, 3, 2, .9));
}
.lb-screen { position: absolute; inset: 0; animation: lb-fade .8s ease both; }
@keyframes lb-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* barra superior: status do servidor e relogio */
.lb-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between;
  align-items: center; padding: 18px 28px; font-size: 12.5px; letter-spacing: .06em; color: var(--lb-muted);
}
.lb-status { display: flex; align-items: center; gap: 8px; }
.lb-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #5bd47a; box-shadow: 0 0 10px #5bd47a; }
.lb-status.off .dot { background: var(--lb-danger); box-shadow: 0 0 10px var(--lb-danger); }
.lb-clock { font: 600 13px Cinzel, serif; color: var(--lb-gold); letter-spacing: .12em; }

/* titulo */
#login-screen { display: grid; grid-template-rows: 1fr auto 1.1fr; justify-items: center; padding: 64px 16px 0; overflow: auto; }
.lb-hero { align-self: end; text-align: center; margin-bottom: 26px; }
.lb-logo {
  /* logo do Velynor (img/logo.webp, fundo transparente) */
  width: min(440px, 78vw); aspect-ratio: 1525 / 1022; margin: 0 auto -6px;
  background: url('../img/logo.webp') center / contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(255, 170, 60, .35)) drop-shadow(0 4px 6px #000);
  animation: lb-glow 4s ease-in-out infinite;
}
@keyframes lb-glow { 50% { filter: drop-shadow(0 0 24px rgba(255, 180, 70, .6)) drop-shadow(0 4px 6px #000); } }
.lb-sub {
  margin-top: 4px; font: 700 clamp(18px, 2.4vw, 26px) Cinzel, serif; letter-spacing: .5em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--lb-gold-hi), var(--lb-gold) 55%, var(--lb-gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-left: .5em;
}
.lb-sub span { color: var(--lb-gold); -webkit-text-fill-color: var(--lb-gold); }
.lb-tag { margin: 10px 0 0; color: var(--lb-muted); font-size: 14px; letter-spacing: .04em; font-style: italic; }

/* cartoes de vidro com cantos dourados */
.lb-card {
  position: relative; background: var(--lb-glass); border: 1px solid var(--lb-line);
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 230, 170, .06);
}
.lb-card .c { position: absolute; width: 16px; height: 16px; border-color: var(--lb-gold); border-style: solid; pointer-events: none; }
.lb-card .tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.lb-card .tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.lb-card .bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.lb-card .br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.lb-login { width: min(380px, 92vw); padding: 26px 28px 22px; display: flex; flex-direction: column; gap: 14px; align-self: start; }
.lb-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--lb-line); margin-bottom: 4px; }
.lb-tab {
  background: none; border: 0; color: var(--lb-muted); padding: 10px 0 12px; cursor: pointer;
  font: 700 13px Cinzel, serif; letter-spacing: .18em; text-transform: uppercase; position: relative;
}
.lb-tab.active { color: var(--lb-gold-hi); }
.lb-tab.active::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--lb-gold), transparent); }

.lb-field { display: flex; flex-direction: column; gap: 6px; }
.lb-field > span { font: 600 10.5px Inter, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--lb-gold); }
.lb-field input {
  background: rgba(0, 0, 0, .45); border: 1px solid rgba(214, 178, 106, .22); border-radius: 2px; color: var(--lb-text);
  padding: 12px 14px; font: 500 15px Inter, sans-serif; outline: none; transition: border-color .2s, box-shadow .2s;
}
.lb-field input::placeholder { color: #6d6253; }
.lb-field input:focus { border-color: var(--lb-gold); box-shadow: 0 0 0 3px rgba(214, 178, 106, .15), 0 0 18px rgba(214, 178, 106, .15); }

.lb-btn {
  position: relative; overflow: hidden; cursor: pointer; border-radius: 2px; padding: 13px 22px;
  font: 700 13px Cinzel, serif; letter-spacing: .22em; text-transform: uppercase; transition: transform .15s, box-shadow .25s, filter .2s;
}
.lb-btn.primary {
  border: 1px solid #f3d38e; color: #2a1a07;
  background: linear-gradient(180deg, #f8e3a6 0%, #d9b264 45%, #b98a3c 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 8px 24px rgba(214, 160, 70, .28), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.lb-btn.primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg);
  animation: lb-shine 3.6s ease-in-out infinite;
}
@keyframes lb-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.lb-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 10px 34px rgba(240, 180, 80, .5), inset 0 1px 0 rgba(255, 255, 255, .5); }
.lb-btn.primary:active { transform: translateY(1px); }
.lb-btn.big { padding: 17px 54px; font-size: 15px; }
.lb-btn.ghost { background: rgba(0, 0, 0, .35); border: 1px solid var(--lb-line); color: var(--lb-text); }
.lb-btn.ghost:hover { border-color: var(--lb-gold); color: var(--lb-gold-hi); }
.lb-btn.small { padding: 9px 14px; font-size: 11px; letter-spacing: .14em; }
.lb-btn.danger:hover { border-color: var(--lb-danger); color: var(--lb-danger); }
.lb-btn:disabled { opacity: .4; cursor: default; transform: none; filter: grayscale(.5); }
.lb-msg { min-height: 18px; font-size: 13px; color: #ffb59c; text-align: center; text-shadow: 0 1px 2px #000; }
.lb-msg.ok { color: #a6f0b5; }

/* colunas da selecao e criacao */
.lb-col { position: absolute; top: 74px; bottom: 150px; width: min(360px, 30vw); display: flex; flex-direction: column; gap: 14px; overflow: auto; padding: 4px; }
.lb-col.left { left: 32px; }
.lb-col.right { right: 32px; }
.lb-head h2 { margin: 0 0 4px; font: 700 22px Cinzel, serif; letter-spacing: .14em; text-transform: uppercase; color: var(--lb-gold-hi); text-shadow: 0 2px 8px #000; }
.lb-muted { color: var(--lb-muted); font-size: 12.5px; }
.lb-row { display: flex; gap: 10px; justify-content: space-between; }
.lb-row.center { justify-content: center; }
.lb-cta { position: absolute; left: 50%; bottom: 42px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(520px, 92vw); }

/* cartoes de personagem (estilo "ficha") */
.lb-slots { display: flex; flex-direction: column; gap: 10px; }
.lb-slot {
  position: relative; display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; text-align: left;
  padding: 14px 16px; cursor: pointer; color: var(--lb-text); font: inherit;
  background: linear-gradient(90deg, rgba(30, 22, 14, .82), rgba(14, 10, 7, .7));
  border: 1px solid rgba(214, 178, 106, .18); transition: border-color .2s, transform .2s, box-shadow .2s;
}
.lb-slot:hover { border-color: rgba(214, 178, 106, .55); transform: translateX(3px); }
.lb-slot.selected { border-color: var(--lb-gold); box-shadow: 0 0 0 1px rgba(214, 178, 106, .4), 0 0 26px rgba(214, 178, 106, .18); }
.lb-slot.selected::before { content: ''; position: absolute; left: -1px; top: 10%; bottom: 10%; width: 3px; background: var(--lb-gold); box-shadow: 0 0 12px var(--lb-gold); }
.lb-slot .nick { font: 700 18px Cinzel, serif; color: var(--lb-gold-hi); letter-spacing: .06em; }
.lb-slot .meta { font-size: 12px; color: var(--lb-muted); margin-top: 3px; }
.lb-slot .lv { font: 700 22px Cinzel, serif; color: var(--lb-gold); text-align: right; line-height: 1; }
.lb-slot .lv small { display: block; font: 600 9.5px Inter, sans-serif; letter-spacing: .2em; color: var(--lb-muted); }
.lb-slot.empty { grid-template-columns: 1fr; text-align: center; color: var(--lb-muted); border-style: dashed; font-style: italic; padding: 22px; }
.lb-slot.empty:hover { color: var(--lb-gold-hi); }

/* escudo com a sigla da classe */
.lb-shield {
  width: 50px; height: 58px; display: grid; place-items: center; font: 700 15px Cinzel, serif; color: var(--lb-gold-hi);
  background: linear-gradient(180deg, #3a2c1c, #17110b);
  clip-path: polygon(50% 0, 100% 12%, 100% 55%, 50% 100%, 0 55%, 0 12%);
  position: relative; letter-spacing: .04em;
}
.lb-shield::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  clip-path: inherit; background: linear-gradient(180deg, var(--lb-gold-hi), var(--lb-gold-lo));
}
.lb-shield { box-shadow: inset 0 0 0 2px rgba(214, 178, 106, .55); }

/* ficha do personagem selecionado */
.lb-sheet { padding: 22px 22px 18px; }
.lb-sheet h3 { margin: 0; font: 900 30px Cinzel, serif; color: var(--lb-gold-hi); letter-spacing: .06em; text-shadow: 0 2px 10px #000; }
.lb-sheet .cls { color: var(--lb-gold); font: 600 12px Inter, sans-serif; letter-spacing: .22em; text-transform: uppercase; margin: 4px 0 16px; }
.lb-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lb-kpi { border: 1px solid rgba(214, 178, 106, .18); background: rgba(0, 0, 0, .3); padding: 10px 12px; position: relative; }
.lb-kpi b { display: block; font: 700 22px Cinzel, serif; color: var(--lb-text); }
.lb-kpi span { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--lb-muted); }
.lb-expbar { margin-top: 14px; }
.lb-expbar .track { height: 6px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(214, 178, 106, .2); }
.lb-expbar .fill { height: 100%; background: linear-gradient(90deg, #7a3fd1, #c8a6ff); box-shadow: 0 0 10px #a070ff; }
.lb-expbar .lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--lb-muted); margin-bottom: 5px; letter-spacing: .08em; }

/* classes na criacao */
.lb-classes { display: flex; flex-direction: column; gap: 10px; }
.lb-class {
  display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: center; text-align: left; cursor: pointer;
  padding: 14px 16px; color: var(--lb-text); font: inherit;
  background: linear-gradient(90deg, rgba(30, 22, 14, .82), rgba(14, 10, 7, .7));
  border: 1px solid rgba(214, 178, 106, .18); transition: all .2s;
}
.lb-class:hover { border-color: rgba(214, 178, 106, .55); transform: translateX(3px); }
.lb-class.active { border-color: var(--lb-gold); box-shadow: 0 0 26px rgba(214, 178, 106, .22); background: linear-gradient(90deg, rgba(58, 40, 20, .9), rgba(20, 14, 9, .75)); }
.lb-class .n { font: 700 17px Cinzel, serif; color: var(--lb-gold-hi); letter-spacing: .06em; }
.lb-class .r { font-size: 12px; color: var(--lb-muted); margin-top: 2px; }
.lb-classinfo { padding: 22px; }
.lb-classname { font: 900 32px Cinzel, serif; color: var(--lb-gold-hi); letter-spacing: .06em; text-shadow: 0 2px 10px #000; }
.lb-role { color: var(--lb-gold); font: 600 11.5px Inter, sans-serif; letter-spacing: .22em; text-transform: uppercase; margin: 4px 0 16px; }
.lb-stats { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.lb-stat { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--lb-muted); }
.lb-stat .track { height: 6px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(214, 178, 106, .15); }
.lb-stat .fill { height: 100%; background: linear-gradient(90deg, var(--lb-gold-lo), var(--lb-gold-hi)); box-shadow: 0 0 8px rgba(214, 178, 106, .5); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.lb-desc { font-size: 14px; line-height: 1.6; color: #d8cdb8; margin: 0; }
.lb-field.nick { width: min(360px, 90vw); }
.lb-field.nick input { text-align: center; font: 700 18px Cinzel, serif; letter-spacing: .1em; }

/* confirmacao de exclusao */
.lb-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(4, 2, 1, .72); backdrop-filter: blur(3px); }
.lb-modal.hidden { display: none; }
.lb-modal-card { width: min(440px, 100%); padding: 26px 28px 22px; display: flex; flex-direction: column; gap: 14px; animation: lb-pop .25s ease-out; }
.lb-modal-card h3 { margin: 0; font: 900 24px Cinzel, serif; color: var(--lb-danger); letter-spacing: .08em; text-shadow: 0 2px 10px #000; }
.lb-warn { margin: 0; font-size: 14px; line-height: 1.55; color: #e6d9c2; }
.lb-warn b { color: var(--lb-gold-hi); }
.lb-btn.danger-solid { background: linear-gradient(180deg, #c4503c, #7a2216); color: #fff3ea; border: 1px solid #e0715c; box-shadow: 0 6px 22px rgba(200, 70, 50, .35); }
.lb-btn.danger-solid:not(:disabled):hover { filter: brightness(1.12); }
@keyframes lb-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .lb-col { position: static; width: auto; max-height: none; padding: 0 16px; }
  #select-screen, #create-screen { overflow: auto; padding: 70px 0 40px; }
  .lb-col.right { margin-top: 14px; }
  .lb-cta { position: static; transform: none; margin: 18px auto 0; }
}

/* ate 15 herois por conta: lista com rolagem e "+ junto" (entrar com varios herois online) */
.lb-slots { max-height: min(62vh, 640px); overflow: hidden auto; padding-right: 4px; scrollbar-width: thin; }
.lb-along { position: absolute; right: 10px; bottom: 6px; font: 600 10px Inter, sans-serif; letter-spacing: .06em; padding: 2px 7px; border-radius: 9px;
  border: 1px solid rgba(214, 178, 106, .35); color: var(--lb-muted); background: rgba(0, 0, 0, .35); cursor: pointer; }
.lb-along:hover { color: var(--lb-gold-hi); border-color: var(--lb-gold); }
.lb-along.on { color: #1b1208; background: var(--lb-gold); border-color: var(--lb-gold); }

/* conta ja conectada em outro lugar */
.lb-online { margin: 0; padding: 0 0 0 18px; color: var(--lb-gold-hi); font-size: 13px; line-height: 1.6; }
.lb-modal-card p { margin: 0; color: var(--lb-text); font-size: 13.5px; line-height: 1.45; }
.lb-modal-card .lb-warn { color: #ffb3a3; }
.lb-confirm-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.lb-confirm-row .lb-btn { white-space: nowrap; padding: 12px 18px; flex: 0 0 auto; }
.lb-tag a { color: var(--lb-gold); font-style: normal; letter-spacing: .08em; text-decoration: none; border-bottom: 1px solid var(--lb-line); }
.lb-tag a:hover { color: var(--lb-gold-hi); }

/* conta: esqueci a senha (codigo por e-mail), trocar senha e e-mail */
.lb-link { align-self: center; background: none; border: 0; padding: 2px 6px; cursor: pointer; font: 500 12.5px Inter, sans-serif; color: var(--lb-muted); text-decoration: underline; text-underline-offset: 3px; }
.lb-link:hover { color: var(--lb-gold-hi); }
.lb-acct h3 { color: var(--lb-gold-hi); }
.lb-acct .lb-ok { margin: 0; font-size: 14px; color: #a6f0b5; }
.lb-acct-actions { display: flex; flex-direction: column; gap: 10px; }
