/* ==========================================================================
   Poke Jagger — tema profissional (cabeçalho escuro + conteúdo claro)
   Mantém os ids/classes do Znote AAC (#news, .sidebar, .form_settings, tabelas...)
   ========================================================================== */

:root {
  --navy-950: #070d1f;
  --navy-900: #0a1228;
  --navy-800: #101b3a;
  --navy-700: #17254d;
  --blue: #2f5bea;
  --blue-700: #2449c9;
  --blue-50: #eef3ff;
  --yellow: #ffcb05;
  --yellow-600: #e6b400;
  --red: #e53935;
  --green: #16a34a;
  --bg: #f2f4f9;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
article, aside, figure, footer, header, hgroup, nav, section { display: block; }

body {
  font: 400 15px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { border: 0; max-width: 100%; height: auto; }
p { padding: 0 0 16px; }
hr { width: 100%; border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
b, strong { font-weight: 600; }

a { color: var(--blue-700); text-decoration: none; outline: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 { color: var(--navy-800); font-family: var(--font); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; margin: 0 0 18px; padding: 0; }
h2 { font-size: 1.3rem; margin: 22px 0 10px; padding: 0; }
h3 { font-size: 1.1rem; margin: 18px 0 8px; padding: 0; }
h4 { font-size: 1rem; margin: 14px 0 6px; padding: 0; }
h5, h6 { font-size: .85rem; color: var(--muted); font-style: normal; padding: 0 0 8px; }

blockquote {
  margin: 16px 0; padding: 12px 18px;
  border-left: 4px solid var(--yellow); background: #fffbea; border-radius: 0 8px 8px 0;
}

ul { margin: 2px 0 18px 20px; }
ol { margin: 8px 0 18px 22px; }
li { margin: 0 0 6px; line-height: 1.55; }

.left { float: left; width: auto; margin-right: 10px; }
.right { float: right; width: auto; margin-left: 10px; }
.center { display: block; text-align: center; margin: 20px auto; }

/* ------------------------------------------------------------------ container */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------------ cabeçalho */
header {
  position: relative;
  color: #fff;
  background:
    radial-gradient(900px 320px at 50% -40%, rgba(47, 91, 234, .55), transparent 70%),
    radial-gradient(600px 260px at 85% 120%, rgba(255, 203, 5, .16), transparent 70%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900));
  border-bottom: 3px solid var(--yellow);
}

#logo {
  max-width: 1160px; margin: 0 auto; padding: 28px 20px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}

#logo .brand { display: block; flex: 0 1 560px; min-width: 0; }
#logo .brand img {
  display: block; width: 100%; max-width: 560px; height: auto;
  /* esmaece as bordas do banner para fundir com o fundo escuro */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
          mask-composite: intersect;
}

.hero-copy { flex: 1 1 260px; text-align: right; }
.hero-copy .eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 10px;
}
.hero-copy .hero-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.btn-cta, a.btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; font: 600 .95rem var(--font); text-decoration: none;
  background: var(--yellow); color: #1b1500; border: 1px solid var(--yellow-600);
  box-shadow: 0 6px 18px rgba(255, 203, 5, .25); transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-cta:hover { background: #ffd733; text-decoration: none; transform: translateY(-1px); }
.btn-cta.ghost, a.btn-cta.ghost {
  background: rgba(255, 255, 255, .06); color: #fff; border: 1px solid rgba(255, 255, 255, .22); box-shadow: none;
}
.btn-cta.ghost:hover { background: rgba(255, 255, 255, .14); }

/* ------------------------------------------------------------------ navegação */
nav#topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 18, 40, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.nav-brand { display: none; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 26px; height: 26px; }

.nav-toggle {
  display: none; background: transparent; border: 1px solid rgba(255, 255, 255, .25); color: #fff;
  width: 42px; height: 38px; border-radius: 8px; font-size: 1.2rem; cursor: pointer;
}

#menu_container { width: 100%; }
ul.sf-menu, ul.sf-menu ul { margin: 0; padding: 0; list-style: none; }
ul.sf-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
ul.sf-menu li { position: relative; list-style: none; margin: 0; padding: 0; background: none; }

ul#nav > li > a {
  display: block; padding: 15px 14px; color: #dbe4ff; font-size: .9rem; font-weight: 500; letter-spacing: .01em;
  transition: color .15s, background .15s;
}
ul#nav > li:hover > a, ul#nav > li:focus-within > a { color: #fff; background: rgba(255, 255, 255, .07); text-decoration: none; }
ul#nav > li > a:hover { text-decoration: none; }
ul#nav > li:has(> ul) > a::after { content: ""; display: inline-block; margin-left: 7px; width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; }

/* submenus */
ul#nav li > ul {
  position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px;
  background: #fff; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(7, 13, 31, .25);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
ul#nav li:hover > ul, ul#nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
ul#nav li > ul li { float: none; width: 100%; }
ul#nav li > ul a {
  display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: .9rem; font-weight: 500;
}
ul#nav li > ul a:hover { background: var(--blue-50); color: var(--blue-700); text-decoration: none; }

/* ------------------------------------------------------------------ grade principal */
#main { min-height: 100vh; display: flex; flex-direction: column; }

#site_content {
  flex: 1;
  width: 100%; max-width: 1160px; margin: 0 auto; padding: 28px 20px 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "content side"; gap: 28px; align-items: start;
}

.content {
  grid-area: content; min-width: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 32px; font-size: 1rem; text-align: left;
}
.content > h1:first-child { padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.content ul { margin: 2px 0 18px 20px; }

#sidebar_container { grid-area: side; width: auto; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 70px; }

/* ------------------------------------------------------------------ sidebar */
.sidebar {
  float: none; width: auto; margin: 0; padding: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; font-size: .92rem;
}
.sidebar h2, .sidebar h3 {
  margin: 0; padding: 13px 18px; font: 700 .72rem var(--font); letter-spacing: .12em; text-transform: uppercase;
  color: #cfd9ff; background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-bottom: 2px solid var(--yellow);
}
.sidebar .inner { padding: 16px 18px 18px; }
.sidebar > :not(h2):not(h3):not(.inner) { margin-left: 18px; margin-right: 18px; }
.sidebar > h3 + * { margin-top: 14px; }
.sidebar > br:last-child { display: none; }
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar li { list-style: none; background: none; margin: 0 0 10px; padding: 0; line-height: 1.45; }
.sidebar li:last-child { margin-bottom: 0; }
.sidebar li a, .sidebar a { color: var(--blue-700); }
.sidebar h4 { color: var(--muted); font-size: .85rem; margin: 4px 0 0; }
.sidebar center { display: block; text-align: left; margin-top: 8px; }
.sidebar center h3 { background: none; color: inherit; border: 0; padding: 0; margin: 10px 0 0; font: 600 .9rem var(--font); letter-spacing: 0; text-transform: none; }
.sidebar center h4 { margin: 6px 0 0; font-weight: 500; }
.sidebar input[type=text], .sidebar input[type=password] { width: 100%; margin-top: 4px; }
.sidebar input[type=submit] { width: 100%; margin-top: 6px; }
.sidebar > :last-child { margin-bottom: 18px; }
.sidebar .inner:last-child, .sidebar > .inner { margin: 0; }

/* ------------------------------------------------------------------ formulários */
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search],
input[type=url], input[type=tel], input[type=date], input:not([type]), textarea, select {
  font: 400 .95rem var(--font); color: var(--text);
  padding: 9px 12px; background: #fff; border: 1px solid #cbd5e1; border-radius: 9px;
  transition: border-color .15s, box-shadow .15s; max-width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 91, 234, .15); outline: none; }
textarea { width: 100%; min-height: 110px; resize: vertical; }
select { padding-right: 30px; cursor: pointer; }

input[type=submit], input[type=button], button, .btn, a.btn {
  display: inline-block; cursor: pointer; font: 600 .92rem var(--font); line-height: 1.2;
  padding: 10px 20px; border-radius: 9px; border: 1px solid var(--yellow-600);
  background: var(--yellow); color: #1b1500; transition: background .15s, transform .15s, box-shadow .15s;
}
input[type=submit]:hover, input[type=button]:hover, button:hover, .btn:hover { background: #ffd733; text-decoration: none; box-shadow: 0 4px 12px rgba(255, 203, 5, .35); }
.btn-info, input.btn-info { background: var(--blue); border-color: var(--blue-700); color: #fff; }
.btn-info:hover { background: var(--blue-700); box-shadow: 0 4px 12px rgba(47, 91, 234, .3); }
.btn-danger { background: var(--red); border-color: #c62828; color: #fff; }
.btn-danger:hover { background: #c62828; }

.nav-toggle, .nav-toggle:hover { box-shadow: none; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: auto; padding: 0; }

.form_settings { margin: 14px 0 0; max-width: 720px; }
.form_settings p { padding: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.form_settings span { float: none; flex: 0 0 200px; width: auto; text-align: left; font-weight: 500; color: var(--navy-800); }
.form_settings input:not([type=checkbox]):not([type=submit]):not([type=radio]), .form_settings textarea { flex: 1 1 260px; width: auto; max-width: 420px; }
.form_settings textarea { max-width: 100%; }
.form_settings select { flex: 1 1 260px; width: auto; max-width: 420px; }
.form_settings .submit { margin: 0 0 0 214px; width: auto; height: auto; padding: 10px 24px; background: var(--yellow); color: #1b1500; }
.form_settings .checkbox { margin: 4px 0; padding: 0; width: 16px; border: 0; background: none; }

.separator { width: 100%; height: 0; border-top: 1px solid var(--border); margin: 0 0 20px; }

/* ------------------------------------------------------------------ tabelas */
.content table, table {
  width: 100%; margin: 14px 0 26px; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: .93rem;
}
table tr th, table tr td {
  background: #fff; color: var(--text); padding: 11px 14px; text-align: left; vertical-align: middle;
  border: 0; border-top: 1px solid var(--border);
}
table tr:first-child th, table tr:first-child td { border-top: 0; }
table tr:nth-child(even) td { background: #f8faff; }
table.table-hover tr:hover td, table.tbl-hover tr:hover td, table tr:hover td.hover { background: var(--blue-50); }

table tr th, table tr.yellow td, tr.yellow td {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); color: #e8eeff;
  font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; border-top: 0;
}
table tr.yellow td a, table tr th a { color: var(--yellow); }
table tr.yellow:nth-child(even) td { background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); }

tr.special { cursor: pointer; }
tr.special:hover td { background: var(--blue-50); }
ul.war_list li { font-size: 1.05rem; }

.outfitColumn { position: relative; width: 60px; background: initial; border-top: none; }
.outfitColumn img { position: absolute; top: -38px; right: 4px; }

/* ------------------------------------------------------------------ notícias */
table#news, #news {
  width: 100%; margin: 0 0 22px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff;
}
#news tr.yellow td, #news .zheadline {
  background: linear-gradient(180deg, #fffdf2, #fff7d1); color: var(--navy-800); text-transform: none; letter-spacing: 0;
  font-size: .9rem; font-weight: 500; padding: 14px 20px; border-bottom: 1px solid #f0e3a0; border-left: 4px solid var(--yellow);
}
#news tr.yellow td a { color: var(--blue-700); }
#news tr.yellow td b { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: var(--navy-800); color: var(--yellow); font-size: .72rem; letter-spacing: .06em; }
#news tr:nth-child(even) td { background: #fff; }
#news td { padding: 18px 20px; }
#news p { padding: 0; }
#news img { border-radius: 10px; margin-top: 8px; }
#changelogTable { width: 100%; }
.galleryImage { max-width: 100%; border-radius: 10px; }

select[name=newspage] { margin: 4px 0 0; }

/* ------------------------------------------------------------------ cores legadas (legíveis no tema claro) */
font[color=red], font[color=Red], font[color=RED] { color: #c62828; }
font[color=green], font[color=Green] { color: #15803d; }
font[color=orange] { color: #c2410c; }
font[color=grey], font[color=gray] { color: var(--muted); }
font[color=black] { color: var(--text); }

/* ------------------------------------------------------------------ fórum (Znote) */
.adminTable { margin: 0; padding: 0; position: relative; display: block; top: -32px; border: 0; }
.adminTable tr td { width: 210px; }
.adminTable tr td form input { width: 150px; height: 35px; }
.postButton { margin: 0; padding: 0; position: relative; display: block; float: left; top: -30px; }
.editThread { margin: 0; padding: 0; position: relative; display: block; float: left; top: -36px; }
.editThread tr, .editThread tr td, .editThread tr td form, .editThread tr td form input { margin: 0; padding: 0; height: 20px; }
.updateTable tr td input { width: 100%; max-width: 500px; }
#progress { width: 100%; max-width: 400px; position: relative; padding: 3px; }
#percent { position: absolute; margin-left: 175px; }
#bar { height: 20px; background-color: var(--green); border: 1px solid #14532d; border-radius: 6px; }
.ThreadTable td { word-break: break-word; }
.ThreadTable td.avatar { min-width: 100px; vertical-align: top; text-align: center; }
#ThreadTitle { word-wrap: break-word; }

div.youtube { width: 100%; max-width: 560px; }
div.aspectratio { width: 100%; padding-bottom: 56.25%; position: relative; }
div.aspectratio > iframe { position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; border-radius: 10px; }

#categoryNavigator { background: var(--navy-800); max-width: 100%; margin-top: 20px; border-radius: 10px; overflow: hidden; }
#categoryNavigator a { color: #fff; font-weight: 600; padding: 10px 16px; display: inline-block; text-decoration: none; border-right: 1px solid rgba(255, 255, 255, .12); }
#categoryNavigator a:hover { background: var(--blue); }
table.hide { display: none; }

/* ------------------------------------------------------------------ rodapé */
footer {
  width: 100%; margin: 0; padding: 30px 20px 26px; text-align: center; height: auto;
  background: var(--navy-950); color: #94a3c4; font-size: .88rem; border-top: 3px solid var(--yellow);
}
footer p { padding: 0; line-height: 1.8; }
footer a { color: #cbd5f5; }
footer a:hover { color: #fff; text-decoration: none; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 14px; }
.footer-links a { font-weight: 500; }

/* ------------------------------------------------------------------ voltar ao topo */
#scroll {
  position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; margin: 0; padding: 0; background: none; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s;
}
#scroll.show { opacity: 1; visibility: visible; transform: none; }
#scroll a {
  float: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy-800); color: var(--yellow); border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 8px 20px rgba(7, 13, 31, .35);
}
#scroll a:hover { background: var(--blue); color: #fff; text-decoration: none; }
#scroll a img { display: none; }
#scroll a::before { content: ""; width: 9px; height: 9px; border-left: 2.5px solid currentColor; border-top: 2.5px solid currentColor; transform: translateY(2px) rotate(45deg); }

/* ------------------------------------------------------------------ tabelas largas (rolagem horizontal) */
.table-scroll {
  width: 100%; max-width: 100%; margin: 14px 0 26px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: 12px;
}
.table-scroll > table { margin: 0; border: 0; border-radius: 0; display: table; width: 100%; }
.table-scroll table tr th, .table-scroll table tr td { padding: 9px 5px; }
.table-scroll table tr td { font-size: .82rem; }
.table-scroll table tr th { font-size: .66rem; letter-spacing: .02em; }
.table-scroll table tr td:first-child { min-width: 130px; }

/* ------------------------------------------------------------------ responsivo */
@media (max-width: 960px) {
  #site_content { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content" "side"; padding-top: 20px; }
  #sidebar_container { position: static; }
  .content { padding: 22px 20px; }
  #logo { flex-direction: column; text-align: center; padding: 20px 20px 24px; }
  #logo .brand { flex: none; width: 100%; max-width: 440px; }
  .hero-copy { flex: none; }
  .hero-copy { text-align: center; }
  .hero-copy .hero-actions { justify-content: center; }
}

@media (max-width: 860px) {
  .nav-inner { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .nav-brand { display: inline-flex; }
  .nav-toggle { display: inline-block; }
  #menu_container { display: none; padding-bottom: 8px; }
  nav#topnav.open #menu_container { display: block; }
  ul.sf-menu { flex-direction: column; align-items: stretch; gap: 0; }
  ul#nav > li > a { padding: 12px 8px; border-top: 1px solid rgba(255, 255, 255, .07); }
  ul#nav li > ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: rgba(255, 255, 255, .05); padding: 4px 0 6px 10px; }
  ul#nav li > ul a { color: #dbe4ff; padding: 8px 10px; }
  ul#nav li > ul a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  ul#nav > li:has(> ul) > a::after { display: none; }
  .form_settings span { flex-basis: 100%; }
  .form_settings .submit { margin-left: 0; }
  table { font-size: .85rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #news { display: table; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ widgets */
.toplist { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.toplist li { counter-increment: rank; display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 0; border-top: 1px solid var(--border); }
.toplist li:first-child { border-top: 0; padding-top: 0; }
.toplist li::before {
  content: counter(rank); flex: 0 0 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-50); color: var(--blue-700); font-size: .75rem; font-weight: 700;
}
.toplist li:nth-child(1)::before { background: var(--yellow); color: #1b1500; }
.toplist .lvl { margin-left: auto; color: var(--muted); font-size: .8rem; }

.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }
.status-on { color: var(--green); }
.status-off { color: var(--red); }

/* página inicial: as notícias já são cartões, sem moldura dupla */
.content:has(> #news:first-child) { background: none; border: 0; box-shadow: none; padding: 0; }
