:root {
  --bg: #05050d;
  --panel: #0d0f22;
  --panel2: #141738;
  --line: #2c3168;
  --line2: #454c94;
  --txt: #d8dcff;
  --dim: #8a90c4;
  --gold: #ffd34a;
  --cyan: #5fd3ff;
  --good: #6dff9e;
  --bad: #ff5c6c;
  --rare: #7dffb2;
  --pix: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --logo: 'Press Start 2P', monospace;
  --mono: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); font-family: var(--mono); font-size: 15.5px; }
canvas { image-rendering: auto; }
.hidden { display: none !important; }
button, input, select { font-family: var(--mono); font-size: 15px; }

.panel {
  background: var(--panel);
  border: 3px solid var(--line);
  box-shadow: inset 0 0 0 2px #070818, 0 0 0 2px #000;
}
.btn {
  background: var(--panel2); color: var(--txt); border: 2px solid var(--line2);
  padding: 4px 12px; cursor: pointer; box-shadow: inset -2px -2px 0 #0008, inset 2px 2px 0 #fff1;
}
.btn:hover:not(:disabled) { border-color: var(--cyan); color: #fff; }
.btn:active:not(:disabled) { box-shadow: inset 2px 2px 0 #0008; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: #1f3b6e; border-color: var(--cyan); }
.btn.gold { background: #4a3a10; border-color: var(--gold); color: var(--gold); }
.btn.danger { background: #4a1520; border-color: var(--bad); }
.btn.tiny { padding: 1px 8px; font-size: 13.5px; }
.btn.on { background: #1c4a2e; border-color: var(--good); color: var(--good); }
input, select {
  background: #05061a; color: var(--txt); border: 2px solid var(--line2); padding: 3px 6px; outline: none;
}
input:focus, select:focus { border-color: var(--cyan); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.err { color: var(--bad); min-height: 1.2em; margin: 6px 0 0; }
.ok { color: var(--good, #5ad17a); min-height: 1.2em; margin: 6px 0 0; }
.lg-forgot { text-align: center; margin-top: 8px; }
.dim { color: var(--dim); }
.goldtxt { color: var(--gold); }
.good { color: var(--good); }
.bad { color: var(--bad); }

/* ------------------------------------------------ login */
.screen { position: fixed; inset: 0; }
#login { display: grid; place-items: center; }
#loginBg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-box { position: relative; padding: 28px 32px; width: min(440px, 92vw); text-align: center; }
.logo { font-family: var(--logo); color: var(--gold); text-shadow: 3px 3px 0 #a3420f, 6px 6px 0 #000; letter-spacing: 2px; line-height: 1.4; margin: 0 0 10px; font-size: 28px; }
.logo.small { font-size: 11px; text-shadow: 2px 2px 0 #a3420f; margin: 0; }
.tagline { color: var(--dim); margin: 0 0 18px; }
#loginForm label, #forgotForm label, #resetForm label { display: block; text-align: left; margin-bottom: 10px; color: var(--dim); }
#loginForm input, #forgotForm input, #resetForm input { width: 100%; margin-top: 2px; }
#loginForm .row, #forgotForm .row, #resetForm .row { justify-content: center; margin-top: 14px; }

/* ------------------------------------------------ layout do jogo */
#game { display: flex; flex-direction: column; gap: 6px; padding: 6px; }
.topbar { display: flex; align-items: center; gap: 22px; padding: 6px 14px; }
.stat { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.stat small { color: var(--dim); }
.stat.gold b { color: var(--gold); font-size: 20.5px; }
.coin { width: 28px; height: 28px; image-rendering: auto; vertical-align: middle; }
.stat.lvl b { color: var(--cyan); }
.bar { width: 130px; height: 12px; background: #05061a; border: 2px solid var(--line2); position: relative; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--cyan); box-shadow: inset 0 -3px 0 #0006; }
.bar.xp i { background: #8a6dff; }
.bar.dur i { background: var(--good); }
.bar.dur.low i { background: var(--bad); }
.bar.prog i { background: var(--gold); }
.badge { font-family: var(--pix); font-size: 13px; background: #4a1a6e; color: #fff; padding: 4px 6px; border: 2px solid #b47cff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { filter: brightness(1.5); } }
.spacer { flex: 1; }
.galaxy { color: var(--cyan); font-family: var(--pix); font-size: 14px; }

.resbar { display: flex; gap: 18px; padding: 4px 14px; flex-wrap: wrap; }
.res { display: flex; align-items: center; gap: 5px; }
.res img, .ico { width: 22px; height: 22px; image-rendering: auto; vertical-align: -5px; }
.res b { font-weight: normal; color: #fff; }

.layout { flex: 1; display: flex; gap: 6px; min-height: 0; }
.scene-wrap { position: relative; flex: 1; display: grid; place-items: center; min-width: 0; overflow: hidden; background: #000; }
#scene { width: 100%; height: 100%; object-fit: contain; }
.side { width: 460px; display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 3px solid var(--line); }
.tabs button {
  flex: 1 0 auto; background: none; border: none; color: var(--dim); padding: 6px 8px; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -3px; font-size: 14px;
}
.tabs button.active { color: var(--gold); border-bottom-color: var(--gold); background: var(--panel2); }
.tabs button:hover { color: #fff; }
.tab-body { flex: 1; overflow-y: auto; padding: 10px; }
.tab-body::-webkit-scrollbar { width: 10px; }
.tab-body::-webkit-scrollbar-thumb { background: var(--line2); }
h3 { font-family: var(--pix); font-size: 15px; color: var(--gold); margin: 6px 0 10px; letter-spacing: 1px; }
.hint { color: var(--dim); font-size: 13.5px; margin: 0 0 10px; }

.card { background: var(--panel2); border: 2px solid var(--line); padding: 8px 10px; margin-bottom: 10px; }
.card.locked { opacity: .55; }
.card-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card-head .name { font-family: var(--pix); font-size: 14px; color: #fff; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; font-size: 14px; }
.kv span:nth-child(odd) { color: var(--dim); }
.ship-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.ship-grid .btn { width: 100%; font-size: 13.5px; text-align: left; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 3px 0; }
.planet-card { display: flex; gap: 10px; }
.planet-card > img { width: 72px; height: 72px; object-fit: contain; image-rendering: auto; flex: none; }
.planet-card .info { flex: 1; }
.tag { font-size: 11.5px; padding: 0 5px; border: 1px solid var(--line2); color: var(--dim); }
.tag.premium { border-color: var(--gold); color: var(--gold); }

.skill { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.pips { display: flex; gap: 2px; margin-top: 2px; }
.pips i { width: 9px; height: 9px; background: #05061a; border: 1px solid var(--line2); }
.pips i.on { background: var(--cyan); border-color: var(--cyan); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 3px 4px; text-align: right; }
th { color: var(--dim); font-weight: normal; border-bottom: 2px solid var(--line); }
td:first-child, th:first-child { text-align: left; }
tr.ask td { color: #ff8f9a; }
tr.bid td { color: var(--good); }
.book { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.chips .btn { padding: 2px 8px; font-size: 13.5px; }
.chips .btn.active { border-color: var(--gold); color: var(--gold); }
#chart { width: 100%; height: 120px; background: #05061a; border: 2px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.form-grid input { width: 100%; }
.seg { display: flex; }
.seg .btn { flex: 1; }
.seg .btn.active.buy { background: #1c4a2e; border-color: var(--good); color: var(--good); }
.seg .btn.active.sell { background: #4a1520; border-color: var(--bad); color: #ff8f9a; }
.eco-bar { height: 12px; background: var(--bad); margin: 2px 0 6px; }
.log-item { padding: 3px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.log-item time { color: var(--dim); margin-right: 6px; }
.log-item.good { color: var(--good); } .log-item.bad { color: #ff8f9a; } .log-item.rare { color: var(--rare); }

/* ------------------------------------------------ itens voando ate a barra de recursos */
.fly { position: fixed; width: 24px; height: 24px; image-rendering: auto; z-index: 40; pointer-events: none;
  transition: transform .9s cubic-bezier(.5,-0.3,.6,1), opacity .9s; }
.res.bump b { color: var(--gold); text-shadow: 0 0 6px var(--gold); }
.res { transition: transform .15s; }
.res.bump { transform: scale(1.25); }

/* ------------------------------------------------ tutorial */
.tutorial { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
.tut-box { position: fixed; max-width: 380px; padding: 14px 16px; pointer-events: auto; border-color: var(--gold); box-shadow: 0 0 0 2px #000, 0 0 24px #ffd34a55; }
.tut-box p { margin: 0 0 10px; white-space: pre-line; }
.tut-glow { outline: 3px solid var(--gold) !important; outline-offset: 2px; box-shadow: 0 0 22px #ffd34a99 !important; }

/* ------------------------------------------------ toasts e modal */
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 50; }
.toast { background: var(--panel); border: 2px solid var(--cyan); padding: 6px 12px; max-width: 380px; animation: slide .2s; }
.toast.err { border-color: var(--bad); color: #ffb3bb; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.modal { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; z-index: 60; }
.modal-box { padding: 20px 24px; max-width: 460px; }
.modal-box p { white-space: pre-line; margin-top: 0; }
.modal-box .row { justify-content: flex-end; }


/* tabela do offline (100% x 60%) */
.off-table { margin: 8px 0; white-space: normal; }
.off-table td, .off-table th { padding: 2px 6px; }


/* inventario */
.inv-item { display: flex; gap: 10px; padding: 8px; border: 2px solid var(--line); background: var(--panel2, #12153a); margin-bottom: 6px; }
.inv-item.empty { opacity: 0.55; }
.inv-ico .ico { width: 36px; height: 36px; }
.inv-main { flex: 1; min-width: 0; }
.inv-qty { color: #fff; font-size: 17px; margin-left: 6px; }
.inv-actions { margin-top: 4px; gap: 4px; flex-wrap: wrap; }
.drop { padding: 3px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.drop .ico { width: 18px; height: 18px; }


/* loja */
.stat.nucleos { cursor: pointer; color: #8fe8ff; } .stat.nucleos b { color: #bff4ff; }
.stat.vip { cursor: pointer; color: #ffd34a; font-family: var(--pix); font-size: 14px; }
.nuctxt { color: #8fe8ff; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 8px 0; }
.shop-card { border: 2px solid var(--line); background: #12153a; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.shop-card .big { font-size: 18.5px; color: #fff; }
.shop-card .ico { width: 22px; height: 22px; }
.shop-card.skin.r-rara { border-color: #5fd3ff; } .shop-card.skin.r-pica { border-color: #b47cff; } .shop-card.skin.r-lendria { border-color: #ffd34a; } .shop-card.skin.r-vip { border-color: #ff9a2a; }
.skin-prev { width: 90px; height: 90px; image-rendering: auto; }
.perks { margin: 6px 0 0 18px; padding: 0; font-size: 13.5px; }
/* boss semanal */
.card.weekly { border-color: #ffd34a; background: linear-gradient(180deg, #2a1a08, #12153a); }
.weekly-body { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; }
.weekly-img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 0 8px #ffd34a88); }
.rw { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.rw .ico { width: 14px; height: 14px; }
table.rank tr.me td { color: #ffd34a; }

/* painel dev */
.dev-btn { background: #4a1a6e; border-color: #b47cff; color: #fff; }
.tabs button.dev-tab { color: #d0a8ff; }

/* ================================================ dungeon */
.stat.power { color: var(--gold); cursor: pointer; }
.stat.power b { color: #ffb35a; }
body.dg-open { overflow: hidden; }
.dungeon { position: fixed; inset: 0; z-index: 58; background: #000; display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.dg-top, .dg-bottom { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--panel); border-bottom: 2px solid var(--line); }
.dg-bottom { border-top: 2px solid var(--line); border-bottom: 0; }
.dg-title { font-family: var(--pix); font-size: 15px; color: var(--gold); }
.dg-stage { flex: 1; min-height: 0; position: relative; }
/* a arena (16:9) sempre cabe inteira na area disponivel, sem cortar */
#dgCanvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: crosshair; }
.dg-help { font-size: 13.5px; }
@media (max-height: 520px) {
  .dg-top, .dg-bottom { padding: 2px 8px; }
  .dg-help { font-size: 11px !important; }
}
@media (max-width: 760px), (max-height: 520px) {
  .dg-title { font-size: 11px; }
  .dg-help { font-size: 11.5px; }
}
/* celular em pe: sobra espaco embaixo para arrastar o dedo sem cobrir a nave */
@media (max-aspect-ratio: 1/1) {
  .dg-stage { flex: none; aspect-ratio: 16 / 9; width: 100%; }
  .dg-bottom { flex: 1; flex-wrap: wrap; justify-content: center; align-content: center; gap: 14px;
    background: repeating-linear-gradient(45deg, #0d0f22, #0d0f22 12px, #10132a 12px, #10132a 24px); }
  .dg-help { width: 100%; text-align: center; order: 2; }
}

/* ================================================ responsivo (PC, tablet e celular) */
#scene, .btn, .tabs button, .res, .badge { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tabs, .resbar { scrollbar-width: none; }
.tabs::-webkit-scrollbar, .resbar::-webkit-scrollbar { display: none; }
#game { padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); padding-bottom: max(6px, env(safe-area-inset-bottom)); }
.tut-box { max-width: min(380px, calc(100vw - 20px)); }
.modal-box { max-width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); overflow-y: auto; }

/* cabecalho: nada quebra linha; em telas medias os botoes ficam so com o icone */
.topbar .btn, .topbar .stat, .topbar .logo.small { white-space: nowrap; }
.topbar .logo.small br { display: none; }
@media (max-width: 2100px) { #hUser { display: none; } }
@media (max-width: 1800px) { .stat.galaxy { display: none; } }
@media (max-width: 1500px) { .topbar .btn .lbl, .hb .lbl { display: none; } .topbar { gap: 12px; } .stat.galaxy, #hUser, .stat.gold small, .stat.power small { display: none; } .res small { display: none; } .resbar { gap: 18px; } }
@media (max-width: 1250px) { .topbar .logo.small { display: none; } }

/* telas de toque: botoes e campos maiores para o dedo */
@media (pointer: coarse) {
  .btn { min-height: 38px; }
  .btn.tiny { min-height: 34px; }
  input, select { min-height: 38px; }
  .tabs button { min-height: 40px; }
}

/* notebook / tablet deitado: painel lateral mais estreito */
@media (max-width: 1280px) and (min-aspect-ratio: 1/1) {
  .side { width: clamp(320px, 36vw, 460px); }
  .topbar { gap: 14px; }
}

/* tablet e celular em pe: cena em cima, painel embaixo (com rolagem propria) */
@media (max-aspect-ratio: 1/1) {
  .layout { flex-direction: column; }
  .scene-wrap { flex: none; aspect-ratio: 16 / 9; width: 100%; }
  .side { width: auto; flex: 1; min-height: 0; }
  .topbar { flex-wrap: wrap; gap: 10px; }
}

/* celular */
@media (max-width: 760px), (max-height: 520px) {
  html, body { font-size: 14px; }
  button, input, select { font-size: 13.5px; }
  #game { gap: 4px; padding-top: max(4px, env(safe-area-inset-top)); }
  .topbar { flex-wrap: nowrap; gap: 8px; padding: 4px 8px; }
  .topbar .logo.small, #hUser, .topbar .spacer, .stat.galaxy { display: none; }
  .btn .lbl { display: none; }
  .stat.gold b { font-size: 17px; }
  .coin { width: 22px; height: 22px; }
  .pcard { flex: 1; min-width: 0; padding: 3px 8px; }
  .pcard .pc-xp small, .pcard .pc-title { display: none; }
  .pcard .pc-name { font-size: 11px; }
  .hbtns { gap: 4px; } .hsep { display: none; }
  .badge { font-size: 11px; padding: 3px 4px; }
  /* recursos numa linha so, arrastando para o lado */
  .resbar { flex-wrap: nowrap; overflow-x: auto; gap: 14px; padding: 3px 8px; }
  .res { flex: none; }
  .res small { display: none; }
  /* abas numa linha so, arrastando para o lado */
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs button { flex: none; padding: 6px 10px; font-size: 13.5px; }
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .tab-body { padding: 8px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .hint { font-size: 12.5px; }
  .card { padding: 6px 8px; }
  .kv, table, .log-item { font-size: 12.5px; }
  .planet-card > img { width: 56px; height: 56px; }
  #toasts { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; }
  .login-box { padding: 20px 16px; }
  .logo { font-size: 17px; }
}

/* celular em pe, tela estreita */
@media (max-width: 480px) {
  /* cabecalho em 2 linhas: ouro, poder e botoes em cima; nivel e XP embaixo */
  .topbar { flex-wrap: wrap; row-gap: 4px; }
  .stat.gold small, .stat.power small { display: none; }
  .topbar { gap: 6px; padding: 4px 6px; }
  .topbar .btn.tiny { padding: 1px 6px; min-width: 36px; }
  .stat.gold b { font-size: 15.5px; }
  .coin { width: 20px; height: 20px; }
  .stat.power { margin-right: auto; }
  .pcard { order: -1; flex: 1 1 100%; }
  .pcard .pc-xp small, .pcard .pc-title { display: inline; font-size: 11px; }
  .pcard .pc-title { font-size: 11px; }
  .stat.power { margin-right: 0; }
  .hbtns { margin-left: auto; }
  .hb, .hb.ico-only { height: 30px; min-width: 30px; width: auto; padding: 0 5px; }
  #hSp { order: 0; }
  #hSp { order: 11; }
  .book { grid-template-columns: 1fr; }
  .ship-grid .btn { font-size: 12.5px; padding: 4px 6px; }
}

/* celular deitado: cena a esquerda, painel a direita */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .layout { flex-direction: row; }
  .scene-wrap { flex: 1; aspect-ratio: auto; }
  .side { width: clamp(280px, 44vw, 420px); flex: none; }
  .resbar { padding: 2px 8px; }
  h3 { margin: 2px 0 6px; }
}

/* premio de login diario */
.login-btn.pulse { animation: lpulse 1.2s ease-in-out infinite; border-color: #ffd34a; }
@keyframes lpulse { 0%,100% { box-shadow: 0 0 0 0 #ffd34a00; } 50% { box-shadow: 0 0 10px 2px #ffd34aaa; } }
.login-cal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0; white-space: normal; }
.lday { background: #0d1030; border: 2px solid #2a2f6a; padding: 6px 4px; min-width: 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 104px; }
.lday small { font-family: var(--pix); font-size: 11px; color: #8a90c4; }
.lday .li { font-size: 20.5px; line-height: 1.2; }
.lday .ln { font-size: 11px; line-height: 1.05; color: #d8dcff; }
.lday.done { opacity: .5; }
.lday.today { border-color: #ffd34a; background: #2a2208; box-shadow: 0 0 12px #ffd34a66; }
.lday.big { border-color: #b47cff; }
.lday.big.today { border-color: #ffd34a; }
@media (max-width: 420px) { .login-cal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.lday .li { display: flex; gap: 2px; justify-content: center; align-items: center; min-height: 34px; }
.lday .li img { width: 30px; height: 30px; image-rendering: pixelated; object-fit: contain; }

/* nick e nivel em cima da nave-mae (sem quadro) */
.ship-tag { position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap; z-index: 2;
  font: 700 15px "Segoe UI", "Trebuchet MS", Arial, sans-serif; letter-spacing: .2px; color: #fff;
  text-shadow: 0 0 3px #000, 0 1px 2px #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.ship-tag .lv { color: #ffd34a; margin-right: 6px; }
@media (max-width: 700px) { .ship-tag { font-size: 11px; } }

/* ---------- cabecalho: cartao do jogador, botoes ---------- */
.tab-ico { width: 20px; height: 20px; object-fit: contain; vertical-align: -4px; image-rendering: auto; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 4px 10px 5px; min-width: 230px;
  border: 2px solid #2a2f6a; background: linear-gradient(180deg, #11143a, #0a0c26); border-radius: 4px; }
.pcard .pc-top { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pcard .pc-name { font: 700 16px "Segoe UI", "Trebuchet MS", Arial, sans-serif; color: #fff; }
.pcard .pc-title { font-family: var(--pix); font-size: 11px; color: #b47cff; letter-spacing: .5px; text-transform: uppercase; }
.pcard .pc-btn { margin-left: auto; background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }
.pcard .pc-btn img { width: 22px; height: 22px; image-rendering: pixelated; transition: transform .15s; }
.pcard .pc-btn:hover img { transform: scale(1.15) rotate(-8deg); }
.pcard .pc-xp { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pcard .pc-lv { color: var(--dim); } .pcard .pc-lv b { color: var(--cyan); }
.pcard .pc-xp .bar { flex: 1; min-width: 70px; width: auto; }
.pcard .pc-xp small { color: var(--dim); font-size: 11px; }
/* molduras */
.pcard.f-bronze { border-color: #b8743a; box-shadow: inset 0 0 0 1px #5a3414, 0 0 6px #b8743a55; }
.pcard.f-prata { border-color: #cfd6e8; box-shadow: inset 0 0 0 1px #5a6078, 0 0 8px #cfd6e855; }
.pcard.f-ouro { border-color: #ffd34a; box-shadow: inset 0 0 0 1px #7a5a10, 0 0 10px #ffd34a77; }
.pcard.f-estelar { border-color: #8fd8ff; box-shadow: 0 0 12px #8fd8ffaa, inset 0 0 8px #8fd8ff44; animation: fglow 2.4s ease-in-out infinite; }
.pcard.f-nebulosa { border: 2px solid transparent; background: linear-gradient(180deg, #11143a, #0a0c26) padding-box, linear-gradient(120deg, #ff4f86, #b47cff, #3affd0, #ff4f86) border-box; background-size: 100% 100%, 300% 300%; animation: fneb 6s linear infinite; }
.pcard.f-vazio { border-color: #b47cff; box-shadow: 0 0 14px #6a2aff99, inset 0 0 10px #000; background: radial-gradient(ellipse at 50% 120%, #2a0a4a, #05020e 70%); }
.pcard.f-arena { border-color: #ff5c6c; box-shadow: inset 0 0 0 1px #5a1020, 0 0 10px #ff5c6c77; }
.pcard.f-campeao { border: 2px solid transparent; background: linear-gradient(180deg, #1a1606, #0a0c26) padding-box, linear-gradient(90deg, #ffd34a, #fff6c0, #ffb35a, #ffd34a) border-box; background-size: 100% 100%, 300% 100%; animation: fneb 3s linear infinite; box-shadow: 0 0 12px #ffd34a88; }
.pcard.f-vip { border-color: #ffd34a; background: linear-gradient(180deg, #2a1e04, #120c02); box-shadow: 0 0 12px #ffd34a99; }
@keyframes fglow { 50% { box-shadow: 0 0 20px #8fd8ffdd, inset 0 0 10px #8fd8ff66; } }
@keyframes fneb { to { background-position: 0 0, 300% 0; } }
/* botoes do canto direito: todos do mesmo tamanho */
.hbtns { display: flex; align-items: center; gap: 6px; }
.hb { height: 32px; min-width: 32px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: #11143a; color: #d8dcff; border: 2px solid #2a2f6a; border-radius: 4px; font: 12.5px var(--mono); }
.hb:hover { border-color: #5fd3ff; color: #fff; }
.hb.ico-only { padding: 0; justify-content: center; width: 32px; font-size: 12.5px; }
.hb .lbl { font-family: var(--pix); font-size: 11px; letter-spacing: .5px; }
.hb.vote-btn { border-color: #3a8a5a; } .hb.vote-btn:hover { border-color: #6dff9e; }
.hb.dev-btn { border-color: #8a4aa0; }
.hsep { width: 1px; height: 22px; background: #2a2f6a; margin: 0 2px; }
.login-btn.pulse { border-color: #ffd34a; }
/* janela de conquistas */
.modal.wide .modal-box { max-width: min(860px, calc(100vw - 24px)); }
.modal.wide .modal-box p { white-space: normal; }
.ach-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; margin-top: 10px; }
.ach-cols h4 { font-family: var(--pix); font-size: 13px; color: #8a90c4; margin: 0 0 6px; }
.frame-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.frame-pick { min-width: 0; cursor: pointer; text-align: left; color: inherit; }
.frame-pick b { font: 700 14px "Segoe UI", Arial, sans-serif; color: #fff; }
.frame-pick small { font-size: 11px; color: #8a90c4; }
.frame-pick.on { outline: 2px solid #6dff9e; outline-offset: 2px; }
.frame-pick:disabled:not(.on) { cursor: default; opacity: .45; } .frame-pick.on { cursor: default; }
.ach-list { display: flex; flex-direction: column; gap: 4px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.ach { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: #0d1030; border: 1px solid #2a2f6a; }
.ach.lock { opacity: .55; } .ach.on { border-color: #ffd34a; }
.ach-i { font-size: 15.5px; } .ach-t { display: flex; flex-direction: column; flex: 1; line-height: 1.05; }
.ach-t small { color: #8a90c4; font-size: 11px; }
@media (max-width: 700px) { .ach-cols { grid-template-columns: 1fr; } .pcard { min-width: 0; } .hb .lbl { display: none; } .hb { padding: 0 6px; } }

/* ---------- tela de login ---------- */
#login { overflow: hidden; }
.login-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(5,5,13,0.55) 0%, rgba(5,5,13,0.15) 38%, rgba(5,5,13,0) 60%, rgba(5,5,13,0.55) 100%); }
.login-box { position: relative; padding: 26px 30px 22px; width: min(500px, 92vw); text-align: center;
  background: linear-gradient(180deg, rgba(14,16,48,0.78), rgba(6,7,24,0.86));
  border: 2px solid rgba(95,211,255,0.35); border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.6), 0 0 40px rgba(95,140,255,0.18), inset 0 0 30px rgba(95,211,255,0.06);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: lgIn .7s ease-out both; }
.login-box::before { content: ''; position: absolute; left: 12px; right: 12px; top: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, #5fd3ff, #ffd34a, #5fd3ff, transparent); opacity: .8; }
.login-logo { display: flex; flex-direction: column; gap: 6px; font-size: 26.5px; margin-bottom: 6px;
  background: linear-gradient(180deg, #fff6c0 0%, #ffd34a 45%, #ff9a2a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(3px 3px 0 #a3420f) drop-shadow(3px 3px 0 #000) drop-shadow(0 0 14px rgba(255,190,60,0.45)); animation: lgGlow 3.2s ease-in-out infinite; }
.login-box .tagline { color: #bfc6ff; margin: 4px 0 12px; letter-spacing: .5px; }
.login-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 16px; }
.login-feats span { display: flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 11.5px; color: #d8dcff;
  background: rgba(20,24,70,0.55); border: 1px solid rgba(95,211,255,0.18); border-radius: 4px; text-align: left; }
.login-feats img { width: 22px; height: 22px; object-fit: contain; image-rendering: auto; flex: none; }
#loginForm input, #forgotForm input, #resetForm input { background: rgba(5,6,20,0.85); }
#loginForm .row .btn, #forgotForm .row .btn, #resetForm .row .btn { min-width: 130px; }
@keyframes lgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes lgGlow { 50% { filter: drop-shadow(3px 3px 0 #a3420f) drop-shadow(3px 3px 0 #000) drop-shadow(0 0 22px rgba(255,200,80,0.7)); } }
@media (max-width: 760px), (max-height: 520px) { .login-logo { font-size: 18.5px; } .login-feats span { font-size: 11px; } .login-box { padding: 18px 16px; } }
@media (max-height: 520px) { .login-feats { display: none; } }

/* abas Entrar / Criar conta */
.lg-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 12px; border: 2px solid #2a2f6a; border-radius: 4px; overflow: hidden; }
.lg-tabs button { background: rgba(10,12,36,0.8); color: #8a90c4; border: 0; padding: 8px 0; font: 14px var(--mono); cursor: pointer; }
.lg-tabs button.active { background: linear-gradient(180deg, #1c2a6a, #12184a); color: #fff; box-shadow: inset 0 -2px 0 #5fd3ff; }
#loginForm .reg-only { display: none; }
#loginForm.reg .reg-only { display: block; }
.lg-rules { margin: -4px 0 4px; font-size: 11px; text-align: left; }

/* botao do especial (Esquadrao): grande, redondo, no canto da arena */
.dg-squad { position: absolute; right: max(14px, 2.2%); bottom: max(14px, 4%); width: clamp(84px, 11vw, 124px); aspect-ratio: 1; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: radial-gradient(circle at 50% 38%, #3a2a08 0%, #1a1204 70%); color: #ffe7a0; box-shadow: 0 0 0 3px #000a, 0 6px 18px #000c; touch-action: manipulation; }
.dg-squad .sq-ring { position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(#ffd34a var(--fill, 360deg), rgba(255,211,74,0.15) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); }
.dg-squad .sq-ico { font-size: clamp(26px, 3.6vw, 40px); line-height: 1; filter: drop-shadow(0 0 6px #ffd34a); }
.dg-squad .sq-lbl { font-family: var(--pix); font-size: clamp(6px, .75vw, 9px); letter-spacing: .5px; }
.dg-squad .sq-sub { font-family: var(--pix); font-size: clamp(6px, .7vw, 8px); color: #fff; opacity: .85; }
.dg-squad.ready { animation: sqPulse 1.1s ease-in-out infinite; background: radial-gradient(circle at 50% 38%, #7a5a10 0%, #2a1c04 75%); }
.dg-squad.on { background: radial-gradient(circle at 50% 38%, #2a8a5a 0%, #0a2a1a 75%); color: #c8ffd8; }
.dg-squad.on .sq-ring { background: conic-gradient(#6dff9e var(--fill, 360deg), rgba(109,255,158,0.15) 0); }
.dg-squad.cool { filter: grayscale(.7) brightness(.8); }
.dg-squad.cool .sq-ico { filter: none; opacity: .6; }
@keyframes sqPulse { 50% { box-shadow: 0 0 0 3px #000a, 0 0 26px 6px #ffd34aaa; transform: scale(1.05); } }
/* celular em pe: o botao fica embaixo da arena, centralizado e bem grande */
@media (max-aspect-ratio: 1/1) { .dg-squad { position: fixed; right: 50%; transform: translateX(50%); bottom: calc(18px + env(safe-area-inset-bottom)); width: 112px; }
  .dg-squad.ready { animation: sqPulseM 1.1s ease-in-out infinite; } @keyframes sqPulseM { 50% { box-shadow: 0 0 0 3px #000a, 0 0 26px 6px #ffd34aaa; } } }

/* ---------- avisos (ponto vermelho com numero) ---------- */
[data-badge] { position: relative; }
[data-badge]::after { content: attr(data-badge); position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  border-radius: 9px; background: #ff3049; color: #fff; font: 700 10px/16px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px #0b1020, 0 0 8px #ff3049; pointer-events: none; z-index: 3;
  animation: badgePulse 1.6s ease-in-out infinite; }
[data-badge=""]::after { min-width: 10px; width: 10px; height: 10px; padding: 0; top: -3px; right: -3px; }
#tabs [data-badge]::after { top: 2px; right: 2px; }
@keyframes badgePulse { 50% { transform: scale(1.18); } }

/* ---------- configuracoes ---------- */
.cfg { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; text-align: left; min-width: min(420px, 80vw); }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 10px; border: 1px solid #23324f; border-radius: 8px; background: #0e1730; cursor: pointer; }
.cfg-row > span { display: flex; flex-direction: column; }
.cfg-row small { color: #8ea0c4; font-size: 11px; }
.cfg-row input[type=range] { width: 150px; accent-color: #5fd3ff; }
.cfg-sw { appearance: none; width: 40px; height: 22px; border-radius: 11px; background: #33405e; position: relative; cursor: pointer; flex: none; transition: background .2s; }
.cfg-sw::before { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
.cfg-sw:checked { background: #2fbf71; }
.cfg-sw:checked::before { left: 21px; }

/* ---------- cenario desligado ---------- */
.scene-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: #9fb3d9;
  background: radial-gradient(ellipse at center, #121c38 0%, #070b18 75%); border-radius: inherit; min-height: 180px; }
.scene-off b { font-size: 14px; color: #dfe9ff; }
.scene-off.hidden { display: none; }

/* ---------- correio ---------- */
.mail-head { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 6px; }
.mail-list { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow: auto; text-align: left; padding-right: 4px; }
.mail { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #23324f; border-radius: 8px; background: #0e1730; }
.mail-i { font-size: 17px; }
.mail-t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mail-t small { color: #7f8fb0; font-size: 11px; }
.mail-it { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; }
.mail-empty { margin: 24px 0; font-size: 11.5px; }

/* ---------- analise ---------- */
.an-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 10px 0; text-align: left; }
.an-kpi > div { background: #0e1730; border: 1px solid #23324f; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.an-kpi small { color: #8ea0c4; font-size: 11px; }
.an-kpi b { font-size: 13.5px; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.an-chart { background: #0b1328; border: 1px solid #1f2c48; border-radius: 8px; padding: 6px 8px; text-align: left; }
.an-lbl { font-size: 11px; color: #c9d6f2; margin-bottom: 4px; }
.an-bars { display: flex; align-items: flex-end; gap: 2px; height: 70px; }
.an-bars span { flex: 1; height: var(--h); background: var(--c); border-radius: 2px 2px 0 0; opacity: .85; min-height: 0; }
.an-bars span:hover { opacity: 1; filter: brightness(1.3); }
.an-axis { display: flex; justify-content: space-between; font-size: 11px; color: #6f7fa0; margin-top: 2px; }
.scene-wrap:has(#scene.hidden) .ship-tag { display: none; }
#tabs [data-badge]::after { top: -2px; right: -2px; }

/* ---------- DEV: jogadores ---------- */
.adm .row { flex-wrap: wrap; gap: 6px; }
.adm-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 60vh; overflow: auto; padding-right: 4px; }
.adm-row { border: 1px solid #23324f; border-radius: 8px; padding: 8px; background: #0b1328; display: flex; flex-direction: column; gap: 6px; }
.adm-row.on { border-color: #2fbf71; }
.adm-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.adm-who small { width: 100%; color: #7f8fb0; font-size: 11px; }
.adm-dot { width: 9px; height: 9px; border-radius: 50%; background: #4a5470; flex: none; }
.adm-row.on .adm-dot { background: #2fbf71; box-shadow: 0 0 6px #2fbf71; }
.adm-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; }
.adm-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.al-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 62vh; overflow: auto; text-align: left; padding-right: 4px; }
.al-row { border: 1px solid #23324f; border-left: 4px solid #e8c547; border-radius: 8px; padding: 8px 10px; background: #0b1328; }
.al-row.sev-alta { border-left-color: #ff3049; }
.al-row.sev-media { border-left-color: #ff9a2a; }
.al-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.al-head .tag.sev { margin-left: auto; }
.al-row ul { margin: 6px 0; padding-left: 18px; font-size: 11px; }
.al-row li.sev-alta { color: #ff8a96; }
.al-row li.sev-media { color: #ffc17a; }
.al-row li.sev-baixa { color: #c9d0e0; }

/* ---------- abas em grupos ---------- */
.tabs { flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 2px 0 0; }
.tab-grp { display: flex; align-items: stretch; border-top: 1px solid #1c2645; }
.tab-grp:first-child { border-top: 0; }
.tg-l { flex: none; width: 78px; display: flex; align-items: center; gap: 4px; padding: 0 6px; font-size: 11px; color: #6f7fa0; letter-spacing: .5px; text-transform: uppercase; border-right: 1px solid #1c2645; }
.tg-l b { font-weight: 600; }
.tab-grp button { flex: 1 1 0; min-width: 0; white-space: nowrap; font-size: 12.5px; padding: 6px 4px; }
.tabs button.locked { opacity: .5; }
.tabs button .lk { font-size: 11px; margin-left: 3px; color: #ffd34a; }
.tabs button.guide-target, .hb.guide-target { animation: guidePulse 1.1s ease-in-out infinite; color: #fff; }
@keyframes guidePulse { 0%, 100% { box-shadow: inset 0 0 0 2px #ffd34a00; } 50% { box-shadow: inset 0 0 0 2px #ffd34a, 0 0 14px #ffd34a88; background: #ffd34a1a; } }
@media (max-width: 760px) {
  .tabs { flex-direction: row; overflow-x: auto; }
  .tab-grp { display: contents; }
  .tg-l { width: auto; border: 0; padding: 0 4px 0 10px; font-size: 11px; }
  .tg-l b { display: none; }
  .tab-grp button { flex: none; }
}

/* ---------- guia de primeiros passos ---------- */
.guide { margin: 8px 10px 0; border: 1px solid #ffd34a66; border-radius: 10px; background: linear-gradient(180deg, #1d1a0e, #10131f); padding: 8px 10px; box-shadow: 0 0 18px #ffd34a1a; }
.guide.hidden { display: none; }
.g-top { display: flex; align-items: center; gap: 8px; }
.g-tag { font-size: 11px; color: #ffd34a; letter-spacing: .5px; white-space: nowrap; }
.g-prog { flex: 1; height: 5px; background: #2a2f4a; border-radius: 3px; overflow: hidden; }
.g-prog i { display: block; height: 100%; background: linear-gradient(90deg, #ffd34a, #ff9a2a); }
.g-x { background: none; border: 0; color: #8a90b0; font-size: 14px; cursor: pointer; line-height: 1; padding: 0 2px; }
.g-body b { display: block; margin-top: 4px; font-size: 13.5px; color: #fff; }
.g-body p { margin: 2px 0 6px; font-size: 11px; color: #c6cde4; line-height: 1.25; }
.g-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.g-pulse { animation: badgePulse 1.2s ease-in-out infinite; }
/* ajuste: grupos com icone, 4 colunas iguais */
.tg-l { width: 30px; justify-content: center; padding: 0; font-size: 11px; }
.tg-l b { display: none; }
.tab-grp { display: grid; grid-template-columns: 30px repeat(4, minmax(0, 1fr)); }
.tab-grp button { font-size: 11px; padding: 7px 3px; overflow: hidden; text-overflow: ellipsis; }
.tab-grp button .tab-ico { width: 16px; height: 16px; }
.tab-grp:nth-child(1) .tg-l { color: #5fd3ff; } .tab-grp:nth-child(2) .tg-l { color: #ff6a7a; } .tab-grp:nth-child(3) .tg-l { color: #ffd34a; } .tab-grp:nth-child(4) .tg-l { color: #b98cff; }
@media (max-width: 760px) { .tab-grp { display: contents; } .tab-grp button { font-size: 12.5px; padding: 6px 10px; } }
details.info { margin: 6px 0 10px; border: 1px solid #23324f; border-radius: 8px; background: #0b1328; padding: 4px 8px; }
details.info summary { cursor: pointer; color: #9fc6ff; font-size: 11.5px; list-style: none; }
details.info summary::before { content: '▸ '; }
details.info[open] summary::before { content: '▾ '; }
details.info .hint { margin: 6px 0 2px; }
.tab-grp { grid-template-columns: 24px repeat(4, minmax(0, 1fr)); }
.tg-l { width: 24px; font-size: 11px; }
.tab-grp button { font-size: 11px; padding: 7px 2px; position: relative; letter-spacing: -.2px; }
.tabs button .lk { position: absolute; top: 1px; right: 2px; font-size: 11px; margin: 0; line-height: 1; }
@media (max-width: 760px) { .tab-grp button { font-size: 12.5px; padding: 6px 10px; } .tabs button .lk { position: static; margin-left: 3px; } }
.tab-grp { display: flex; }
.tab-grp .tg-l { flex: 0 0 24px; }
.tab-grp button { flex: 1 1 0; }
@media (max-width: 760px) { .tab-grp { display: contents; } .tab-grp button { flex: none; } }
.adm .card-head { flex-wrap: wrap; gap: 4px 10px; }

/* ranking semanal e indicacao */
.sub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.ref-ul { margin: 8px 0; padding-left: 18px; text-align: left; line-height: 1.5; }
.ref-link { display: flex; gap: 6px; margin: 8px 0; }
.ref-link input { flex: 1; min-width: 0; background: #0b1020; color: #cfe; border: 1px solid #2a3a66; border-radius: 6px; padding: 6px 8px; }

.chk { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 8px; font-size: 11px; text-align: left; }
.chk input { width: auto !important; margin-top: 3px; }
.chk a { color: #7fe8ff; }
.legal { max-width: 820px; margin: 0 auto; padding: 24px 18px 60px; color: #dfe6ff; line-height: 1.6; font-family: system-ui, sans-serif; }
.legal h1 { color: #ffd34a; } .legal h2 { color: #7fe8ff; margin-top: 26px; } .legal a { color: #7fe8ff; }
.legal .warn { background: #2a1f00; border: 1px solid #7a5a00; border-radius: 8px; padding: 10px 14px; font-size: 11px; }
body.legal-page { overflow: auto !important; height: auto !important; background: #070a1c; }
.league-box { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.lg-big { font-size: 31px; line-height: 1; }
.scene-wrap { position: relative; }
.buff-hud { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 5; pointer-events: none; max-width: 46%; }
.buff-hud.hidden { display: none; }
.buff-hud .bf { display: flex; align-items: center; gap: 6px; background: rgba(8, 12, 32, .78); border: 1px solid #3a4a8a; border-radius: 8px; padding: 3px 8px; font-size: 11px; color: #dfe8ff; backdrop-filter: blur(2px); }
.buff-hud .bf i { font-style: normal; font-size: 11.5px; }
.buff-hud .bf b { font-weight: 600; }
.buff-hud .bf small { color: #7fe8ff; margin-left: auto; padding-left: 8px; font-variant-numeric: tabular-nums; }
.buff-hud .bf.vip { border-color: #b8901c; } .buff-hud .bf.vip small { color: #ffd34a; }
.buff-hud .bf.ev { border-color: #3a9a5a; } .buff-hud .bf.ev small { color: #8dffb0; }

/* equipamentos, missoes, craft */
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.gear { border: 1px solid var(--rc, #3a4a8a); border-radius: 8px; padding: 6px 8px; background: rgba(10, 14, 38, .7); box-shadow: inset 0 0 12px color-mix(in srgb, var(--rc, #3a4a8a) 25%, transparent); font-size: 11px; }
.gear.empty { opacity: .55; border-style: dashed; }
.gear .g-h { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.gear .g-h b { color: var(--rc, #fff); } .gear .g-r { font-size: 11px; text-transform: uppercase; color: var(--rc, #aaa); }
.gear .row { gap: 4px; margin-top: 4px; }
.mis { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid #1d2850; }
.mis:first-of-type { border-top: 0; }
.mis .mis-t { flex: 1; min-width: 0; } .mis .bar { height: 6px; margin: 3px 0; } .mis .bar i { background: #4aa8ff; }
.mis.ready .bar i { background: #5ee07a; } .mis.done { opacity: .55; }
.ev-card { border-color: #3a9a5a; background: rgba(20, 60, 30, .4); }
.mis .bar { width: 100%; }
.hbar { display: inline-block; height: 8px; background: #4aa8ff; border-radius: 2px; }

/* chat */
.chat{position:fixed;left:12px;bottom:12px;z-index:60;font-size: 11px}
.chat.hidden,.chat .hidden{display:none}
.chat-pill{display:flex;align-items:center;gap:8px;background:rgba(10,12,22,.82);border:1px solid #2c3550;color:#cfd6ee;border-radius:22px;padding:7px 14px;cursor:pointer;font-weight:700;letter-spacing:.06em;font-size: 11px;position:relative}
.chat-pill:hover{border-color:#5b6ea8}
.chat-pill kbd{background:#e8ecf8;color:#10131f;border-radius:5px;padding:1px 7px;font-size: 11px;font-family:inherit}
.chat-pill i{background:#e5484d;color:#fff;border-radius:10px;font-style:normal;font-size: 11px;padding:1px 6px;margin-left:2px}
.chat-box{width:340px;max-width:calc(100vw - 24px);background:rgba(10,12,22,.92);border:1px solid #2c3550;border-radius:10px;display:flex;flex-direction:column;overflow:hidden}
.chat-tabs{display:flex;border-bottom:1px solid #232b44}
.chat-tabs button{flex:1;background:none;border:0;color:#8f9ac0;padding:7px 4px;cursor:pointer;font-weight:700;font-size: 11px}
.chat-tabs button.on{color:#fff;background:#1a2036}
.chat-tabs button.x{flex:0 0 32px}
.chat-tabs button.un::after{content:" •";color:#e5484d}
.chat-log{height:200px;overflow-y:auto;padding:8px;display:flex;flex-direction:column;gap:3px;word-break:break-word}
.chat-log .m b{cursor:pointer;color:#7fb2ff}
.chat-log .m.me b{color:#ffd166}
.chat-log .m.sys{color:#8f9ac0;font-style:italic}
.chat-send{display:flex;gap:4px;padding:6px;border-top:1px solid #232b44}
.chat-send input{flex:1;min-width:0;background:#0b0e1a;border:1px solid #2c3550;color:#e8ecf8;border-radius:6px;padding:6px 8px}
.chat-send #chatTo{flex:0 0 90px}

/* =====================================================================
   VISUAL MODERNO: fonte legivel, botoes em cartoes, cabecalho que nao corta
   ===================================================================== */
:root { --ui-r: 10px; --ui-line: #28345e; --ui-bg1: #17204a; --ui-bg2: #0f1636; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; letter-spacing: .005em; line-height: 1.35; }
.ach-cols h4, .badge, .card-head .name, .dg-squad .sq-lbl, .dg-squad .sq-sub, .dg-title, .galaxy, .hb .lbl, .pcard .pc-title, .stat.vip, h3 { font-weight: 700; letter-spacing: .05em; }
h3 { font-size: 15px; }
.card-head .name { font-size: 13px; }
.btn { border-radius: 8px; font-weight: 600; }

/* ---- cabecalho: quebra linha em vez de cortar ---- */
.topbar { flex-wrap: wrap; row-gap: 6px; gap: 14px; }
.topbar .spacer { flex: 1 1 20px; }
.hbtns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; justify-content: flex-end; }
.hbtns .hb { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 7px 12px; font-size: 14px; font-weight: 600;
  background: linear-gradient(180deg, var(--ui-bg1), var(--ui-bg2)); border: 1px solid var(--ui-line); transition: transform .12s, border-color .12s, box-shadow .12s; }
.hbtns .hb:hover { transform: translateY(-1px); border-color: #5b78d6; box-shadow: 0 4px 14px #0008; }
.hbtns .hb.ico-only { padding: 7px 10px; }
@media (max-width: 2300px) { .topbar .btn .lbl, .hb .lbl { display: none; } .stat.gold small, .stat.power small { display: none; } }
@media (max-width: 1250px) { .topbar .logo.small { display: none; } }

/* ---- painel da direita mais largo ---- */
@media (min-width: 1100px) { .side { width: clamp(500px, 31vw, 680px); } }

/* ---- abas: cartoes em grade, sem texto cortado (so em tela grande; no celular continua a barra rolavel) ---- */
@media (min-width: 761px) {
  .tabs { display: flex; flex-direction: column; gap: 4px; padding: 8px 8px 6px; border-bottom: 1px solid var(--ui-line); }
  .tab-grp { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; border: 0; padding: 0; }
  .tab-grp + .tab-grp { margin-top: 4px; }
  .tg-l { grid-column: 1 / -1; width: auto; flex: none; display: flex; align-items: center; gap: 6px; padding: 2px 4px 0; border: 0; justify-content: flex-start;
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7f8fbf; }
  .tg-l b { display: inline; font-weight: 700; }
  .tg-l::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, #2b3866, transparent); }
  .tab-grp button { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; flex: none; min-width: 0; overflow: visible;
    padding: 8px 8px; min-height: 38px; border-radius: var(--ui-r); border: 1px solid var(--ui-line); margin: 0; white-space: nowrap; letter-spacing: 0;
    font-size: 14px; font-weight: 600; color: #b9c4ea; text-overflow: clip;
    background: linear-gradient(180deg, var(--ui-bg1), var(--ui-bg2)); transition: transform .12s, border-color .12s, box-shadow .12s, color .12s; }
  .tab-grp button:hover { color: #fff; border-color: #5b78d6; transform: translateY(-1px); box-shadow: 0 6px 16px #0009; }
  .tab-grp button.active { color: #fff3c2; border-color: var(--gold); background: linear-gradient(180deg, #4a3a12, #2a2008); box-shadow: 0 0 0 1px #ffd34a55, 0 6px 18px #ffd34a22; transform: none; }
  .tab-grp button .tab-ico { width: 20px; height: 20px; flex: none; }
  .tab-grp button.locked { opacity: .55; }
  .tab-grp button.dev-tab { color: #d9b8ff; border-color: #5b3d8f; }
  .tabs button .lk { position: absolute; top: -6px; right: -4px; margin: 0; padding: 1px 5px; border-radius: 8px; background: #2a2008; border: 1px solid #ffd34a88; color: #ffd34a; font-size: 10px; line-height: 1.2; }
  .tab-grp:nth-child(1) .tg-l { color: #5fd3ff; } .tab-grp:nth-child(2) .tg-l { color: #ff7a8a; } .tab-grp:nth-child(3) .tg-l { color: #ffd34a; } .tab-grp:nth-child(4) .tg-l { color: #b98cff; }
}

/* ---- chat maior ---- */
.chat { font-size: 15px; }
.chat-pill { font-size: 13px; padding: 9px 16px; }
.chat-box { width: 480px; max-width: calc(100vw - 24px); border-radius: 14px; }
.chat-tabs button { font-size: 14px; padding: 10px 6px; }
.chat-log { height: 340px; padding: 10px 12px; gap: 5px; font-size: 15px; line-height: 1.4; }
.chat-send { padding: 8px; gap: 6px; }
.chat-send input { font-size: 15px; padding: 9px 10px; border-radius: 8px; }
.chat-send #chatTo { flex: 0 0 120px; }
@media (max-height: 760px) { .chat-log { height: 220px; } }

/* molduras compradas com creditos + forja */
.pcard.f-cobre { border-color: #d9803a; box-shadow: inset 0 0 0 1px #6a3a12, 0 0 10px #d9803a66; }
.pcard.f-esmeralda { border-color: #3ee08a; box-shadow: inset 0 0 0 1px #0f5a30, 0 0 12px #3ee08a77; background: linear-gradient(180deg, #0a2a1a, #060c1a); }
.pcard.f-safira { border-color: #4a90ff; box-shadow: inset 0 0 0 1px #12306a, 0 0 14px #4a90ff88; background: linear-gradient(180deg, #0a1a3a, #060a1a); }
.pcard.f-rubi { border-color: #ff4a6a; box-shadow: inset 0 0 0 1px #6a1226, 0 0 16px #ff4a6a99; background: radial-gradient(ellipse at 50% 120%, #4a0a1a, #0a0510 70%); }
.forge-d { margin: 4px 0; }
.forge-d summary { cursor: pointer; font-size: 12px; color: #9fd0ff; }
.forge-d .row { flex-wrap: wrap; gap: 4px; margin-top: 4px; }

#buildTag{position:fixed;right:6px;bottom:3px;font:10px/1 monospace;color:#9fb4ff;opacity:.55;pointer-events:none;z-index:9999;text-shadow:0 0 3px #000}

/* login: a caixa dos Termos so aparece ao criar conta; links legiveis no fundo escuro */
#loginForm:not(.reg) .chk { display: none !important; }
.lg-forgot a { color: #7fe8ff; }

/* olhinho da senha */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; box-sizing: border-box; padding-right: 40px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center; background: none; border: 0; box-shadow: none; color: #9fb4c8; cursor: pointer; }
.pw-eye:hover { color: #5fd3ff; }
