/* ===== Front 1939 — identidade visual de época (Segunda Guerra Mundial) ===== */
:root {
  --bg: #1b1d14;
  --bg2: #23261a;
  --panel: #2b2f20;
  --panel2: #343926;
  --line: #4a503a;
  --paper: #e9dfc4;
  --paper2: #d8cba6;
  --ink: #2a261c;
  --text: #e8e2cf;
  --muted: #a9a68f;
  --brass: #c9a24a;
  --brass2: #e0bd68;
  --red: #a3312b;
  --green: #6b8a3a;
  --radius: 4px;
  --stencil: 'Black Ops One', 'Impact', sans-serif;
  --ui: 'Oswald', 'Arial Narrow', sans-serif;
  --type: 'Special Elite', 'Courier New', monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at top, rgba(201, 162, 74, 0.07), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 6px);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  min-height: 100vh;
}
a { color: var(--brass2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--stencil); font-weight: 400; letter-spacing: 0.04em; margin: 0 0 0.5em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.type { font-family: var(--type); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ===== Cabeçalho ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: #15170f; border-bottom: 3px solid var(--brass);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--stencil); font-size: 1.35rem; color: var(--paper); letter-spacing: 0.08em; }
.brand:hover { text-decoration: none; }
.brand .star { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--text); padding: 6px 10px; border-radius: var(--radius); text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.08em; }
.nav a:hover, .nav a.active { background: var(--panel2); text-decoration: none; color: var(--brass2); }
.topbar .menu-btn { display: none; }
.online-pill { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.online-pill[hidden] { display: none; }
.online-pill b { color: var(--paper); font-weight: 600; }
.online-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #7fb04a; box-shadow: 0 0 0 0 rgba(127, 176, 74, 0.6); animation: onlinePulse 2.4s ease-out infinite; }
@keyframes onlinePulse { 0% { box-shadow: 0 0 0 0 rgba(127, 176, 74, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(127, 176, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 176, 74, 0); } }
@media (prefers-reduced-motion: reduce) { .online-pill .dot { animation: none; } }
@media (max-width: 420px) { .online-pill span { display: none; } .online-pill::after { content: 'online'; } }
@media (max-width: 760px) {
  .topbar .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #15170f; flex-direction: column; padding: 10px; border-bottom: 3px solid var(--brass); }
  .nav.open { display: flex; }
}

/* ===== Estrutura ===== */
.container { max-width: 1140px; margin: 0 auto; padding: 28px 16px 60px; }
.narrow { max-width: 520px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.panel h2, .panel h3 { color: var(--paper); }

/* Papel datilografado (ordens, documentos) */
.paper {
  background: var(--paper); color: var(--ink); border-radius: 2px; padding: 22px 24px;
  font-family: var(--type); box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  background-image: linear-gradient(rgba(120,90,40,0.06) 1px, transparent 1px);
  background-size: 100% 1.6em;
  position: relative;
}
.paper h1, .paper h2, .paper h3 { color: var(--ink); }
.paper a { color: #6d3b12; }
.stamp {
  display: inline-block; font-family: var(--stencil); color: var(--red); border: 3px solid var(--red);
  padding: 2px 10px; transform: rotate(-6deg); letter-spacing: 0.12em; opacity: 0.85; font-size: 0.95rem;
}

/* ===== Botões e formulários ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ui); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); cursor: pointer; transition: transform 0.05s, background 0.15s;
}
.btn:hover { background: #3f452e; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--brass); color: #1b1606; border-color: #8f7230; font-weight: 600; }
.btn-primary:hover { background: var(--brass2); }
.btn-danger { background: #6e2420; border-color: #8c2f29; color: #fbe9e6; }
.btn-danger:hover { background: var(--red); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: 0.8rem; }
.btn-block { width: 100%; }

label { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; background: #1a1c13; border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius); font-family: var(--ui); font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--text); }
.check input { margin-top: 5px; }
.error { color: #ff9c8f; min-height: 1.2em; margin-top: 10px; }

/* ===== Avisos ===== */
.banner { padding: 10px 14px; border-radius: var(--radius); border: 1px dashed var(--brass); background: rgba(201,162,74,0.08); margin-bottom: 16px; }
.banner.red { border-color: var(--red); background: rgba(163,49,43,0.12); }
#toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 999;
  background: var(--paper); color: var(--ink); font-family: var(--type); padding: 12px 18px; border-radius: 2px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6); max-width: 92vw; display: none;
}
#toast.show { display: block; animation: drop 0.25s ease-out; }
#toast.err { border-left: 6px solid var(--red); }
@keyframes drop { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ===== Página inicial ===== */
.hero { position: relative; padding: 70px 16px 60px; text-align: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero h1 { color: var(--paper); text-shadow: 0 3px 0 #000; margin-bottom: 10px; }
.hero .lead { font-size: 1.2rem; color: var(--paper2); max-width: 640px; margin: 0 auto 26px; }
.hero .radar {
  position: absolute; width: 520px; height: 520px; right: -140px; top: -120px; border-radius: 50%;
  border: 1px solid rgba(201,162,74,0.25);
  background: repeating-radial-gradient(circle, transparent 0 58px, rgba(201,162,74,0.12) 59px 60px);
  opacity: 0.6; pointer-events: none;
}
.hero .radar::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(201,162,74,0.35), transparent 25%);
  animation: sweep 6s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero .radar::after { animation: none; } }
.feature { display: flex; gap: 14px; }
.feature .ico { flex: 0 0 44px; height: 44px; border: 2px solid var(--brass); border-radius: 50%; display: grid; place-items: center; color: var(--brass); font-family: var(--stencil); }

/* ===== Planos ===== */
.plan { display: flex; flex-direction: column; text-align: center; position: relative; }
.plan .rank { height: 64px; display: grid; place-items: center; margin: 4px 0 10px; }
.plan .price { font-family: var(--stencil); font-size: 2.1rem; color: var(--brass2); line-height: 1; }
.plan .per { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.plan .games { font-size: 1.05rem; margin: 10px 0 16px; }
.plan .games b { font-family: var(--stencil); font-size: 1.5rem; color: var(--paper); }
.plan.best { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass), 0 10px 30px rgba(0,0,0,0.5); }
.plan .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 0.75rem; padding: 2px 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { background: transparent; border: 0; color: var(--text); padding: 8px 14px; cursor: pointer; font-family: var(--ui); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.seg button.on { background: var(--brass); color: #1b1606; }

/* ===== Tabelas e listas ===== */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.95rem; }
th { text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.1em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; border: 1px solid var(--line); }
.tag.ok { border-color: var(--green); color: #b8d48a; }
.tag.warn { border-color: var(--brass); color: var(--brass2); }
.tag.bad { border-color: var(--red); color: #ff9c8f; }
.room { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg2); margin-bottom: 10px; flex-wrap: wrap; }
.room .title { font-family: var(--stencil); font-size: 1.05rem; color: var(--paper); }
.room.myturn { border-color: var(--brass); box-shadow: inset 4px 0 0 var(--brass); }
.meter { height: 8px; background: #15170f; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.meter > i { display: block; height: 100%; background: var(--brass); }

/* ===== Rodapé ===== */
footer { border-top: 1px solid var(--line); padding: 24px 16px; color: var(--muted); font-size: 0.85rem; text-align: center; }
footer a { color: var(--muted); text-decoration: underline; }
footer .footer-supplier { margin: 5px auto 0; max-width: 1000px; font-size: 0.68rem; line-height: 1.6; color: #929589; overflow-wrap: anywhere; }
footer .footer-supplier a { color: inherit; }

/* ===== Faixa de aviso do site (configurada pela administração) ===== */
.site-banner { padding: 8px 16px; text-align: center; font-size: 0.95rem; border-bottom: 1px solid var(--line); background: #23261a; color: var(--text); }
.site-banner.lvl-info { background: #1f2c33; border-color: #3d5a68; }
.site-banner.lvl-aviso { background: #3a3218; border-color: var(--brass); color: #f3e2b0; }
.site-banner.lvl-alerta { background: #4a1d19; border-color: var(--red); color: #ffd9d3; }
.site-banner b { font-weight: 600; letter-spacing: 0.04em; }
