/* GB Nostalgic Brasil — tema escuro com acentos dourados */
:root {
  --bg: #08142b;
  --bg-2: #0c1d3d;
  --surface: #10254a;
  --surface-2: #163262;
  --line: rgba(120, 170, 255, .16);
  --line-strong: rgba(120, 170, 255, .32);
  --text: #eaf1ff;
  --muted: #93a8cc;
  --gold: #ffc83d;
  --gold-2: #ffdd7a;
  --gold-dark: #c98a00;
  --cyan: #45c8ff;
  --green: #38d17a;
  --ok: #46d98a;
  --err: #ff7a7a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --display: 'Lilita One', 'Arial Black', sans-serif;
  /* aliases usados por templates antigos */
  --yellow: var(--gold);
  --navy: var(--bg);
  --navy-2: var(--surface-2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(69, 200, 255, .16), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 200, 61, .10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 600px) fixed;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3, .card-title, .btn, .medal, .price { font-family: var(--display); font-weight: 400; letter-spacing: .3px; }
h1 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 .6rem; }
h2 { font-size: 1.45rem; margin: 0 0 .8rem; color: var(--gold); }
h3 { font-size: 1.15rem; margin: 1.2rem 0 .5rem; }
p { margin: 0 0 .8rem; }
code, pre { font-family: Consolas, 'Cascadia Mono', monospace; font-size: .9em; }
pre { background: rgba(0, 0, 0, .35); padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; border: 1px solid var(--line); }
code { background: rgba(0, 0, 0, .3); padding: 1px 6px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
main.page { flex: 1; padding-top: 28px; padding-bottom: 56px; }

/* ---------- Topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 20, 43, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; padding: 6px 0; }
.logo-compact { height: 48px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav a, .nav .nav-link {
  color: var(--text); font-weight: 600; font-size: .92rem;
  padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav a:hover, .nav .nav-link:hover { background: rgba(255, 255, 255, .06); color: var(--gold-2); }
.nav a.on { color: var(--gold); background: rgba(255, 200, 61, .1); }
.nav .btn { color: #1a1300; margin-left: 4px; }
.nav-sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 6px; }
.nav-user { border: 1px solid var(--line-strong); }
.menu-toggle, .menu-btn { display: none; }

/* ---------- Componentes ---------- */
.card, .panel {
  background: linear-gradient(180deg, rgba(22, 50, 98, .72), rgba(16, 37, 74, .72));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.card-head, .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2, .panel-head h1, .panel-head h2 { margin: 0; }
.card-title { font-size: 1.35rem; color: var(--gold); margin: 0 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1300;
  border: 0;
  border-radius: 999px;
  padding: 11px 24px;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--gold-dark), 0 8px 18px rgba(255, 200, 61, .18);
  transition: transform .12s, filter .12s, box-shadow .12s;
}
.btn:hover { filter: brightness(1.06); color: #1a1300; transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--gold-dark); }
.btn-small { padding: 7px 16px; font-size: .92rem; box-shadow: 0 3px 0 var(--gold-dark); }
.btn-lg { padding: 14px 30px; font-size: 1.2rem; }
.btn-ghost { background: transparent; color: var(--gold); border: 2px solid rgba(255, 200, 61, .7); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 200, 61, .1); color: var(--gold-2); }
.btn[disabled] { filter: grayscale(1); opacity: .55; cursor: not-allowed; transform: none; }
.link { background: none; border: 0; cursor: pointer; font: inherit; color: var(--cyan); padding: 0; }
.inline { display: inline; margin: 0; }

.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; border: 1px solid; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-ok { background: rgba(70, 217, 138, .12); border-color: rgba(70, 217, 138, .5); }
.flash-err { background: rgba(255, 122, 122, .12); border-color: rgba(255, 122, 122, .5); }
.note { background: rgba(255, 200, 61, .08); border: 1px solid rgba(255, 200, 61, .25); border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: var(--radius-sm); font-size: .93rem; }

.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.more { font-weight: 700; font-size: .9rem; }

.tag { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 6px; background: rgba(69, 200, 255, .15); color: var(--cyan); border: 1px solid rgba(69, 200, 255, .35); }
.tag-event { background: rgba(255, 200, 61, .14); color: var(--gold); border-color: rgba(255, 200, 61, .4); }
.tag-maintenance { background: rgba(255, 122, 122, .14); color: var(--err); border-color: rgba(255, 122, 122, .4); }
.guild { font-size: .75rem; font-weight: 800; background: rgba(69, 200, 255, .12); color: var(--cyan); border: 1px solid rgba(69, 200, 255, .35); padding: 1px 8px; border-radius: 6px; }
.guild.big { font-size: 1rem; padding: 3px 10px; }

.medal { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong); font-size: .95rem; padding: 0 4px; }
.medal.m1 { background: linear-gradient(#ffe680, #e0a800); border-color: #fff3b0; color: #2b1d00; }
.medal.m2 { background: linear-gradient(#f2f6fa, #a7b4c2); border-color: #fff; color: #1d2733; }
.medal.m3 { background: linear-gradient(#ffc18a, #c06a2b); border-color: #ffe0c4; color: #2b1300; }

/* ---------- Página inicial ---------- */
.hero { display: grid; grid-template-columns: 1.7fr 1fr; gap: 24px; align-items: center; margin: 6px 0 24px; }
.hero-main { text-align: center; }
.hero-logo .logo-full { width: 100%; max-width: 640px; height: auto; }
.hero-lead { font-size: 1.12rem; color: #c9d7f2; max-width: 600px; margin: 4px auto 22px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.status-card { margin: 0; }
.status { font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.status.up .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(70, 217, 138, .2), 0 0 12px var(--ok); }
.status.down .dot { background: var(--err); box-shadow: 0 0 0 4px rgba(255, 122, 122, .2); }
.stats-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.feature {
  display: flex; flex-direction: column; align-items: flex-start; color: var(--text);
  background: linear-gradient(180deg, rgba(22, 50, 98, .6), rgba(16, 37, 74, .6));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  transition: transform .15s, border-color .15s;
}
.feature:hover { transform: translateY(-3px); border-color: rgba(255, 200, 61, .45); color: var(--text); }
.feature img { height: 64px; width: auto; margin-bottom: 8px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.feature h3 { margin: 0 0 6px; color: var(--gold); }
.feature p { font-size: .9rem; color: var(--muted); margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-2 > .card, .grid-2 > .panel { margin-bottom: 0; }

.news-list, .top-list { list-style: none; margin: 0; padding: 0; }
.news-list li, .top-list li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.news-list li:last-child, .top-list li:last-child { border-bottom: 0; }
.news-list a, .top-list > li > a:not(.guild) { font-weight: 700; color: var(--text); }
.news-list a:hover, .top-list a:hover { color: var(--gold-2); }
.top-list .gp { margin-left: auto; color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Tabelas ---------- */
.tabs { display: flex; gap: 6px; background: rgba(0, 0, 0, .25); padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.tabs a { padding: 7px 16px; border-radius: 999px; font-weight: 700; color: var(--muted); }
.tabs a.on { background: var(--gold); color: #1a1300; }
.search { display: flex; gap: 8px; margin-bottom: 14px; }
.search input { flex: 1; max-width: 300px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.rank { width: 100%; border-collapse: collapse; }
.rank th { text-align: left; font-size: .74rem; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-strong); font-weight: 700; }
.rank td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.rank tbody tr { transition: background .12s; }
.rank tbody tr:hover { background: rgba(255, 255, 255, .035); }
.rank td a { color: var(--text); font-weight: 700; }
.rank td a:hover { color: var(--gold-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

progress.bar { width: 120px; height: 8px; vertical-align: middle; appearance: none; border: 0; border-radius: 6px; overflow: hidden; background: rgba(0, 0, 0, .35); }
progress.bar::-webkit-progress-bar { background: rgba(0, 0, 0, .35); }
progress.bar::-webkit-progress-value { background: linear-gradient(90deg, var(--cyan), var(--ok)); }
progress.bar::-moz-progress-bar { background: linear-gradient(90deg, var(--cyan), var(--ok)); }

/* ---------- Estatísticas ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.stats div, .stats-mini div { background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.stats dt, .stats-mini dt { font-size: .72rem; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stats dd, .stats-mini dd { margin: 4px 0 0; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats dd.gold { color: var(--gold); }
.stats dd.small-dd { font-size: .95rem; word-break: break-all; }

/* ---------- Formulários ---------- */
.form-panel { max-width: 680px; margin-left: auto; margin-right: auto; }
.form-panel.narrow { max-width: 440px; }
.form { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .93rem; }
.form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, select, textarea {
  font: inherit; font-size: .95rem;
  color: var(--text);
  background: rgba(4, 12, 28, .55);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #6f86ad; }
select option { background: var(--bg-2); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 200, 61, .2); }
.radios { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.radios legend { font-weight: 600; margin-bottom: 6px; }
.form .radios label, .form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.form label.check { align-items: flex-start; }
.form label.check input { margin-top: 4px; }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); width: auto; }
.form .btn { align-self: flex-start; }

.steps { padding-left: 22px; }
.steps li { margin-bottom: 18px; }
.steps li::marker { font-family: var(--display); color: var(--gold); font-size: 1.3rem; }
.news-body p { line-height: 1.7; }

/* ---------- Rodapé ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(4, 10, 24, .6); padding: 28px 0 18px; font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-brand p { margin: 0; color: var(--muted); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-weight: 600; }
.footer-links a:hover { color: var(--gold-2); }
.footer-legal { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.footer-legal p { color: #6f86ad; font-size: .78rem; margin: 0; }

/* ---------- Ícones de rank ---------- */
.rank-icon { width: 25px; height: 15px; image-rendering: pixelated; vertical-align: middle; flex-shrink: 0; }
.nick-cell { white-space: nowrap; }
.rank-banner { display: flex; align-items: center; gap: 12px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 14px 0 0; }
.rank-banner .rank-icon { width: 50px; height: 30px; }
.rank-banner div { display: flex; flex-direction: column; }

/* Campo isca anti-robô do cadastro */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Eventos ---------- */
.event-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(100deg, #2a0f4a 0%, #6b1f6e 45%, #e8701a 100%);
  border: 1px solid rgba(255, 200, 61, .5); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 24px; color: #fff;
  box-shadow: var(--shadow);
}
.event-banner:hover { color: #fff; filter: brightness(1.05); }
.event-banner strong { font-family: var(--display); font-weight: 400; font-size: 1.45rem; }
.event-banner .event-tag { background: var(--gold); color: #2a0f4a; font-weight: 800; font-size: .72rem; letter-spacing: .5px; padding: 4px 9px; border-radius: 6px; }
.event-banner.live .event-tag { background: #ff4d4d; color: #fff; animation: pulse 2s infinite; }
.event-banner .event-perks { font-weight: 700; }
.event-banner .event-when { margin-left: auto; font-weight: 600; opacity: .9; }
.event-rules li { margin: 6px 0; }
@keyframes pulse { 50% { opacity: .65; } }

/* ---------- Loja do site ---------- */
.wallet { display: flex; gap: 10px; flex-wrap: wrap; }
.wallet-item { display: flex; flex-direction: column; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 200, 61, .45); border-radius: var(--radius-sm); padding: 6px 16px; }
.wallet-item small { font-size: .68rem; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.wallet-item strong { font-size: 1.3rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.shop-card { background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; transition: transform .15s, border-color .15s; }
.shop-card:hover { transform: translateY(-3px); border-color: rgba(255, 200, 61, .45); }
.shop-card.owned { border-color: rgba(70, 217, 138, .6); }
.shop-card h3 { margin: 4px 0 0; }
.shop-card .tag { align-self: flex-start; }
.shop-card .price { font-size: 1.55rem; color: var(--gold); margin: auto 0 6px; }
.shop-card .price small { font-family: 'Inter', sans-serif; font-size: .8rem; color: var(--muted); }
.shop-pic { height: 160px; display: flex; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(circle at 50% 60%, rgba(69, 200, 255, .2), rgba(0, 0, 0, .1) 70%); border-radius: var(--radius-sm); margin-bottom: 4px; }
.shop-pic img { height: 120px; width: auto; max-width: 48%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.shop-pic img:only-child { height: 148px; max-width: 92%; }
.no-pic { color: var(--muted); font-size: .8rem; }
.owned-label { color: var(--ok); font-weight: 800; }
.buy-form { margin: 0; }
.gm-thumb { height: 36px; width: auto; vertical-align: middle; }

/* ---------- Painel GM: grade de avatares ---------- */
.catalog-picker { display: flex; flex-direction: column; gap: 8px; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; max-height: 380px; overflow-y: auto; padding: 8px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.catalog-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border: 2px solid transparent; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04); cursor: pointer; text-align: center; font-weight: 700; font-size: .78rem; }
.catalog-tile:hover { border-color: var(--cyan); }
.catalog-tile:has(input:checked) { border-color: var(--gold); background: rgba(255, 200, 61, .14); }
.catalog-tile input { position: absolute; opacity: 0; pointer-events: none; }
.catalog-tile:has(input:focus-visible) { outline: 3px solid var(--gold); }
.tile-pic { height: 64px; display: flex; align-items: center; justify-content: center; }
.tile-pic img { max-height: 64px; max-width: 90px; width: auto; height: auto; }
.tile-name { line-height: 1.15; }
.catalog-tile small { color: var(--muted); font-weight: 600; font-size: .68rem; }

/* ---------- Clãs ---------- */
td.actions { white-space: nowrap; }
td.actions form + form { margin-left: 4px; }
.danger-zone { border-top: 1px solid rgba(255, 122, 122, .35); padding-top: 14px; }
.danger-zone .btn-ghost { color: var(--err); border-color: var(--err); }

/* ---------- Celular ---------- */
@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .hero, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .form .row-2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .logo-compact { height: 40px; }

  .menu-btn { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px; }
  .menu-btn span { width: 26px; height: 3px; background: var(--gold); border-radius: 2px; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 14px; }
  .nav-sep { display: none; }
  .menu-toggle:checked ~ .nav { display: flex; }
  .nav .btn { text-align: center; margin: 6px 0 0; }
  .event-banner .event-when { margin-left: 0; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  h1 { font-size: 1.7rem; }
  .card, .panel { padding: 18px; }
}
