:root {
  --bg: #0a0806;
  --bg-2: #131010;
  --panel: #191413;
  --panel-2: #211a18;
  --line: #332823;
  --line-soft: #241d1a;
  --text: #f2e9e1;
  --text-dim: #b0a29a;
  --text-faint: #7d6f68;
  --accent: #dba04a;
  --accent-2: #b3762a;
  --blood: #a52a1f;
  --ok: #4aa83d;
  --warn: #d9a441;
  --err: #cf4b3c;
  --radius: 14px;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Bebas Neue', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -12%, rgba(219, 160, 74, 0.14), transparent 62%),
    radial-gradient(900px 560px at 8% 8%, rgba(165, 42, 31, 0.16), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 3px);
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ------------------------------- topbar -------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 8, 6, 0.86);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 30px;
  color: #1a120a;
  background: linear-gradient(150deg, #e8b866, var(--accent-2));
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 220, 170, 0.24), 0 6px 18px rgba(219, 160, 74, 0.24);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--display); font-size: 25px; letter-spacing: 0.06em; }
.brand-text small { color: var(--text-faint); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

.topnav { display: flex; gap: 6px; margin-left: 10px; }

.topnav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}

.topnav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.topnav a.active { color: #1a120a; background: var(--accent); font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.pill.online { color: var(--text); }

/* -------------------------------- layout ------------------------------- */

#view { flex: 1; padding: 30px 28px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 30px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(120deg, rgba(219, 160, 74, 0.09), transparent 46%),
    var(--panel);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: -40% -10% auto auto;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(165, 42, 31, 0.22), transparent 66%);
  pointer-events: none;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 0.94;
  letter-spacing: 0.01em;
  margin: 10px 0 12px;
}

.hero h1 em { color: var(--accent); font-style: normal; }

.hero p.lead { color: var(--text-dim); font-size: 16.5px; line-height: 1.6; max-width: 54ch; margin: 0 0 22px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.hero-card h4 { margin: 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }

.spec { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); }
.spec:last-child { border-bottom: 0; }
.spec span:first-child { color: var(--text-dim); }
.spec span:last-child { font-family: var(--mono); color: var(--accent); }

/* --------------------------------- btn --------------------------------- */

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
}

.btn:hover:not(:disabled) { background: #2b2320; border-color: #4a3a32; transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn.primary {
  background: linear-gradient(160deg, #e6b463, var(--accent-2));
  border-color: #e8c184;
  color: #1a120a;
  box-shadow: 0 8px 24px rgba(219, 160, 74, 0.22);
}

.btn.primary:hover:not(:disabled) { background: linear-gradient(160deg, #f0c375, #c3832e); }

.btn.ghost { background: transparent; }
.btn.danger { border-color: #6d2a22; color: #ffb4a7; }
.btn.danger:hover:not(:disabled) { background: #3a1a15; }

.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 9px; }

/* -------------------------------- cards -------------------------------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 38px 0 18px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: 0.02em;
  margin: 0;
}

.section-head p { margin: 4px 0 0; color: var(--text-dim); font-size: 14px; }

.grid { display: grid; gap: 16px; }
.grid.games { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.rooms { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--panel), var(--bg-2));
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.16s, transform 0.16s;
}

.card:hover { border-color: #47372f; transform: translateY(-2px); }

.card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--card-accent, var(--accent));
  opacity: 0.85;
}

.card.locked { opacity: 0.94; }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }

.card h3 { margin: 0; font-size: 19px; line-height: 1.2; font-weight: 650; }

.card .sub { color: var(--text-faint); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--mono); }

.card p.desc { margin: 0; color: var(--text-dim); font-size: 13.6px; line-height: 1.55; flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--mono);
  white-space: nowrap;
}

.tag.ok { border-color: #2f5b28; color: #9adb87; background: rgba(74, 168, 61, 0.1); }
.tag.warn { border-color: #5f4a1f; color: #e9c877; background: rgba(217, 164, 65, 0.1); }
.tag.bad { border-color: #5f2a24; color: #f0a396; background: rgba(207, 75, 60, 0.1); }

.card-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.card-actions .btn { flex: 1; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.012);
}

.empty strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* ------------------------------- players ------------------------------- */

.player-list { display: grid; gap: 7px; }

.player {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
}

.player .avatar {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--panel-2);
  color: var(--accent);
  border: 1px solid var(--line);
}

.player .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .mic { font-size: 12px; opacity: 0.5; }
.player .mic.on { opacity: 1; color: var(--ok); text-shadow: 0 0 8px rgba(74, 168, 61, 0.7); }

.slot { border: 1px dashed var(--line-soft); color: var(--text-faint); }

/* -------------------------------- forms -------------------------------- */

.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field label { font-size: 12.5px; color: var(--text-dim); letter-spacing: 0.04em; }

input[type='text'],
input[type='password'],
input[type='number'],
select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--sans);
  width: 100%;
}

input:focus, select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(219, 160, 74, 0.14); }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ------------------------------- modal --------------------------------- */

.modal {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  padding: 0;
  max-width: 520px;
  width: min(92vw, 520px);
}

.modal::backdrop { background: rgba(0, 0, 0, 0.68); backdrop-filter: blur(3px); }
.modal-inner { padding: 24px; }
.modal h3 { font-family: var(--display); font-size: 28px; margin: 0 0 16px; letter-spacing: 0.02em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 20px 0 0; padding: 0; }

/* ------------------------------- toasts -------------------------------- */

.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 90; }

.toast {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 11px;
  font-size: 13.5px;
  max-width: 360px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.18s ease-out;
}

.toast.err { border-left-color: var(--err); }
.toast.ok { border-left-color: var(--ok); }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------ game view ------------------------------ */

.play-wrap {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.play-frame { flex: 1; width: 100%; border: 0; display: block; background: #000; }

.play-hud {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  background: rgba(10, 8, 6, 0.94);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text-dim);
}

.play-hud .spacer { flex: 1; }
.play-hud .indicator { display: inline-flex; align-items: center; gap: 6px; }

.mic-btn {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.mic-btn.live { border-color: var(--ok); color: #b6f0a6; background: rgba(74, 168, 61, 0.16); }
.mic-btn.muted { border-color: #6d2a22; color: #ffb4a7; }

.vu { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.vu i { width: 3px; background: var(--text-faint); border-radius: 1px; height: 3px; transition: height 0.07s, background 0.07s; }
.vu i.on { background: var(--ok); }

/* ------------------------------- footer -------------------------------- */

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 22px 28px;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.6;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

.footer p { margin: 0; max-width: 100ch; }

/* ------------------------------ utilities ------------------------------ */

.mono { font-family: var(--mono); }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.mt0 { margin-top: 0; }
.hidden { display: none !important; }

.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 34px 20px;
  text-align: center;
  color: var(--text-dim);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.dropzone.hot { border-color: var(--accent); background: rgba(219, 160, 74, 0.07); }
.dropzone strong { color: var(--text); display: block; margin-bottom: 6px; font-size: 16px; }

table.files { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.files th, table.files td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
table.files th { color: var(--text-faint); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
table.files td.mono { color: var(--text-dim); }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .topnav { order: 3; width: 100%; overflow-x: auto; }
  #view { padding: 20px 16px 48px; }
  .row { grid-template-columns: 1fr; }
}

/* --------------------- Seção: Quake 100% traduzido ---------------------- */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  display: flex;
  flex-direction: column;
}

.shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  image-rendering: auto;
  background: #000;
}

.shot figcaption {
  padding: 10px 13px 12px;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--line-soft);
}

.shot figcaption strong {
  color: var(--text);
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.shot figcaption small {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11.5px;
}

.wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.wiki-card h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 17px;
  margin: 0 0 2px;
}

.wiki-card h3 small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wiki-card p { margin: 0 0 8px; color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.wiki-card p:last-child { margin-bottom: 0; }

.wiki-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.wiki-list li { font-size: 13.5px; color: var(--text-dim); display: flex; justify-content: space-between; gap: 10px; }
.wiki-list li span:last-child { color: var(--text-faint); font-family: var(--mono); font-size: 12px; }

.enemy-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.enemy-row span:last-child { color: var(--text-faint); font-family: var(--mono); font-size: 12px; }
