/* ============================================================
   NPED — Design System "Ember & Steel"
   Design novo e distinto: tinta escura + acento âmbar (ember)
   + ciano de telemetria. Assinatura: consola de operações ao vivo.
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg: #070a12;
  --bg-2: #0b1120;
  --surface: #101828;
  --surface-2: #16213a;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.28);
  --ember: #f59e0b;
  --ember-strong: #fbbf24;
  --ember-soft: rgba(245, 158, 11, 0.12);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --text: #e6ebf5;
  --text-dim: #94a3b8;
  --text-faint: #64748b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --glow-ember: 0 0 40px -8px rgba(245, 158, 11, 0.35);
  --glow-cyan: 0 0 40px -8px rgba(34, 211, 238, 0.3);
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 68px;
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  /* grade técnica subtil */
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ember-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; color: var(--text); }

.container { width: min(1200px, 92%); margin: 0 auto; }

/* ── Tipografia utilitária ──────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before { content: "▸"; color: var(--cyan); }
.text-gradient {
  background: linear-gradient(120deg, var(--ember-strong), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.mono { font-family: var(--font-mono); }

/* ── Nav ────────────────────────────────────────────────── */
.ds-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 10, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.ds-nav.scrolled { box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.8); }
.ds-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
}
.ds-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
}
.ds-logo-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ember), var(--cyan));
  display: grid;
  place-items: center;
  color: #0b1120;
  font-size: 1.15rem;
  box-shadow: var(--glow-ember);
  transition: transform var(--transition);
}
.ds-logo:hover .ds-logo-icon { transform: rotate(-8deg) scale(1.06); }
.ds-logo-icon img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ds-logo-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  line-height: 1;
  margin-top: 2px;
}
.ds-nav-links { display: flex; align-items: center; gap: 2px; }
.ds-nav-link {
  position: relative;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all var(--transition);
}
.ds-nav-link:hover { color: var(--text); }
.ds-nav-link.active { color: var(--ember-strong); }
.ds-nav-link::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ember), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.ds-nav-link:hover::after, .ds-nav-link.active::after { transform: scaleX(1); }
.ds-nav-actions { display: flex; align-items: center; gap: 10px; }
.ds-burger.btn { display: none; }

/* ── Seletor de idioma (dropdown só com bandeiras) ────── */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 8px;
  min-width: 42px;
  min-height: 29px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lang-btn:hover { border-color: var(--cyan); background: rgba(255,255,255,0.06); }
.lang-btn img {
  display: block;
  width: 22px;
  height: 15px;
  min-width: 22px;
  min-height: 15px;
  max-width: none; /* anula img { max-width: 100% } global — a bandeira nunca encolhe */
  flex: 0 0 22px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 120;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu .lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 24px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid transparent;
  opacity: 0.55;
  filter: grayscale(0.4);
  transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
.lang-menu .lang-flag:hover,
.lang-menu .lang-flag:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  filter: grayscale(0);
  outline: none;
}
.lang-menu .lang-flag.active {
  opacity: 1;
  filter: grayscale(0);
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(80,200,255,0.35);
}
.lang-menu .lang-flag img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Dropdown móvel: menu centrado sobre o nav */
.ds-nav-mobile .lang-menu {
  right: auto;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
}
.ds-nav-mobile .lang-menu.open { transform: translateX(-50%) translateY(0); }

/* Em ecrãs pequenos o seletor mantém-se na barra, junto ao sino/búrguer
   (à direita). O dropdown é posicionado relativamente a .ds-nav-actions
   (que termina no búrguer, sempre dentro do ecrã) e alinhado à sua direita —
   assim nunca sai do ecrã, com ou sem sino/botões de conta. */
@media (max-width: 992px) {
  /* O dropdown passa a ser posicionado relativamente a .ds-nav-actions
     (que termina no búrguer, sempre dentro do ecrã) em vez do seletor: o
     seletor fica estático e o menu alinha-se à direita do actions. */
  .ds-nav-actions { position: relative; }
  .ds-nav-actions > .lang-switch { position: static; }
  .ds-nav-actions .lang-menu {
    left: auto;
    right: 0;
    transform: translateY(-6px);
  }
  .ds-nav-actions .lang-menu.open {
    transform: translateY(0);
  }
}
/* O seletor dentro do menu hamburger foi removido (vive só na barra superior) —
   o dropdown abre centrado sobre o seletor da barra (ver media query 992px). */
.lang-menu { max-width: calc(100vw - 24px); }

/* ── Notificações (dropdown junto ao nome da conta) ────── */
.ntf-wrap { position: relative; }
.ntf-btn { position: relative; }
.ntf-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.6);
  animation: ntfPulse 2.2s infinite;
}
@keyframes ntfPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.ntf-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 340px;
  max-width: 88vw;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow), 0 0 40px -10px rgba(34, 211, 238, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 1100;
  overflow: hidden;
}
.ntf-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.ntf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
}
.ntf-count { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-faint); font-weight: 600; }
.ntf-list { max-height: 340px; overflow-y: auto; }
.ntf-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}
.ntf-item:hover { background: var(--surface-2); }
.ntf-item.ntf-read { opacity: 0.55; }
.ntf-item.ntf-read .ntf-txt strong { color: var(--text-dim); }
.ntf-ic {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  background: var(--cyan-soft);
  color: var(--cyan);
}
.ntf-item.ticket .ntf-ic { background: var(--cyan-soft); color: var(--cyan); }
.ntf-item.license .ntf-ic { background: var(--ember-soft); color: var(--ember); }
.ntf-txt { min-width: 0; }
.ntf-txt strong { display: block; font-size: 0.82rem; color: var(--text); margin-bottom: 2px; }
.ntf-txt span { display: block; font-size: 0.76rem; color: var(--text-dim); line-height: 1.4; word-break: break-word; }
.ntf-more {
  display: block;
  text-align: center;
  padding: 11px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  background: var(--bg-2);
}
.ntf-more:hover { color: var(--ember-strong); background: var(--surface-2); }
.ntf-empty { padding: 26px 16px; text-align: center; color: var(--text-faint); font-size: 0.82rem; }

/* ── Botões ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.btn-primary {
  background: linear-gradient(135deg, var(--ember), #d97706);
  color: #0b1120;
  box-shadow: var(--glow-ember);
}
.btn-primary:hover { transform: translateY(-2px); color: #0b1120; box-shadow: 0 14px 40px -10px rgba(245, 158, 11, 0.5); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.btn-cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.3);
}
.btn-cyan:hover { background: var(--cyan); color: #0b1120; transform: translateY(-2px); }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; border-radius: 10px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 90px 0 60px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: -180px; right: -120px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16), transparent 65%);
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute;
  bottom: -160px; left: -140px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.13), transparent 65%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 26px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4rem); letter-spacing: -0.02em; margin-bottom: 22px; }
.hero p.lead { color: var(--text-dim); font-size: 1.08rem; max-width: 540px; margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stat .num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--text); }
.hero-stat .num span { color: var(--ember); }
.hero-stat .lbl { font-size: 0.78rem; color: var(--text-faint); letter-spacing: 0.06em; text-transform: uppercase; }

/* ── Consola ao vivo (assinatura) ───────────────────────── */
.console {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(11, 17, 32, 0.9);
  box-shadow: var(--shadow), var(--glow-cyan);
  overflow: hidden;
  font-family: var(--font-mono);
}
.console-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(22, 33, 58, 0.7);
}
.console-dots { display: flex; gap: 7px; }
.console-dots span { width: 11px; height: 11px; border-radius: 50%; }
.console-dots span:nth-child(1) { background: var(--danger); }
.console-dots span:nth-child(2) { background: var(--ember); }
.console-dots span:nth-child(3) { background: var(--success); }
.console-title { font-size: 0.72rem; color: var(--text-faint); letter-spacing: 0.1em; }
.console-body { padding: 18px 16px; font-size: 0.8rem; min-height: 200px; }
.console-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.08);
  animation: fadeSlide 0.5s both;
}
.console-cmd { color: var(--ember); font-weight: 700; }
.console-game { color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; }
.console-status .pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
}
.pill-online { background: var(--success-soft); color: var(--success); }
.pill-offline { background: var(--danger-soft); color: var(--danger); }
.pill-checking { background: var(--cyan-soft); color: var(--cyan); }
.console-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(7, 10, 18, 0.6);
  font-size: 0.68rem;
  color: var(--text-faint);
}
.cursor { display: inline-block; width: 9px; height: 15px; background: var(--cyan); animation: blink 1s steps(1) infinite; }

/* ── Terminal typing animation ──────────────────────────── */
.console-caret {
  display: inline-block;
  color: var(--cyan);
  font-weight: 400;
  animation: caretBlink 0.7s steps(1) infinite;
  margin-left: 2px;
}
@keyframes caretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.console-line {
  opacity: 0;
  transform: translateY(6px);
  animation: lineAppear 0.25s ease forwards;
}
.console-line-boot { opacity: 1; transform: none; animation: none; }
@keyframes lineAppear {
  to { opacity: 1; transform: translateY(0); }
}
.console-status .pill { transition: all 0.2s ease; }

/* ── Secções ────────────────────────────────────────────── */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-2); }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin: 14px 0 12px; }
.section-head p { color: var(--text-dim); }

/* ── Cards genéricos ────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: var(--shadow); }

/* ── Status em tempo real ───────────────────────────────── */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s, box-shadow 0.35s, background 0.35s;
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.status-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--success);
  opacity: 0.9;
  transition: opacity 0.35s, box-shadow 0.35s;
}
.status-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(560px circle at 50% 0%, var(--success-soft), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.status-card.offline::before { background: var(--danger); }
.status-card.offline::after { background: radial-gradient(560px circle at 50% 0%, var(--danger-soft), transparent 45%); }
.status-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.35);
  background: var(--surface-2);
  box-shadow: 0 26px 55px -22px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(52, 211, 153, 0.12), 0 0 32px -6px rgba(52, 211, 153, 0.28);
}
.status-card.offline:hover {
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: 0 26px 55px -22px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(248, 113, 113, 0.12), 0 0 32px -6px rgba(248, 113, 113, 0.25);
}
.status-card:hover::after { opacity: 1; }
.status-card:hover::before { box-shadow: 0 0 14px var(--success); }
.status-card.offline:hover::before { box-shadow: 0 0 14px var(--danger); }
.status-card .sc-name, .status-card .sc-badge, .status-card .sc-type, .status-card .sc-ping {
  transition: transform 0.3s, color 0.3s;
}
.status-card:hover .sc-name { color: #fff; transform: translateX(3px); }
.status-card:hover .sc-badge { transform: scale(1.08); }
.status-card:hover .sc-ping { color: var(--success); }
.status-card.offline:hover .sc-ping { color: var(--danger); }
.status-card:hover .sc-type { color: var(--cyan); letter-spacing: 0.16em; }
.status-card .sc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.status-card .sc-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.status-card .sc-type { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); }
.status-card .sc-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); display: flex; flex-direction: column; gap: 4px; }
.status-card .sc-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.online { color: var(--success); }
.offline { color: var(--danger); }

/* ── Games / Universos ──────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 240px;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: all var(--transition);
}
.game-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.game-card:hover img { transform: scale(1.08); }
.game-card:hover { border-color: var(--ember); box-shadow: var(--glow-ember); }
.game-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(transparent 30%, rgba(7, 10, 18, 0.95));
}
.game-card-overlay h3 { font-size: 1.25rem; margin-bottom: 4px; }
.game-card-overlay p { font-size: 0.82rem; color: var(--text-dim); }
.game-tag {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(7, 10, 18, 0.75);
  border: 1px solid var(--line-strong);
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--cyan);
}

/* ── Serviços ───────────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.service-card { display: flex; flex-direction: column; }
.service-card .si {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  font-size: 1.4rem;
  transition: all var(--transition);
}
.service-card:hover .si { transform: scale(1.08) rotate(-4deg); }
.service-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.service-card p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 16px; flex-grow: 1; }
.service-examples {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.service-card .btn { width: 100%; }

/* ── Planos / Preços ────────────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  transition: all var(--transition);
}
.plan-card:hover { border-color: var(--ember); transform: translateY(-5px); box-shadow: var(--glow-ember); }
.plan-card.featured { border: 2px solid rgba(245, 158, 11, 0.4); background: linear-gradient(180deg, rgba(245, 158, 11, 0.06), var(--surface) 55%); }
.plan-badge {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--ember);
  color: #0b1120;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.plan-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.plan-price { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; }
.plan-period { color: var(--text-faint); font-size: 0.85rem; font-weight: 600; }
.plan-card p.desc { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 22px; flex-grow: 1; }
.plan-features { list-style: none; margin: 0 0 24px; display: grid; gap: 10px; }
.plan-features li { display: flex; gap: 10px; align-items: center; font-size: 0.88rem; color: var(--text); }
.plan-features i { color: var(--success); width: 16px; text-align: center; }
.plan-active-badge {
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-weight: 700;
  font-size: 0.85rem;
}
.plan-card .paypal-button-container { width: 100%; }
.paypal-detail-wrap { margin-top: 18px; }
.paypal-detail-wrap .paypal-detail-input { margin-bottom: 16px; }
.paypal-detail-wrap .paypal-button-container { margin-top: 0; }
.paypal-detail-input::placeholder { color: var(--text-faint); }
.plan-card form { margin-top: 4px; }

/* ── Motor NobleWars ────────────────────────────────────── */
.engine-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.engine-console {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(11, 17, 32, 0.9);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow: hidden;
}
.engine-console .row { display: flex; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid rgba(148, 163, 184, 0.08); }
.engine-console .row .k { color: var(--text-faint); }
.engine-console .row .v { color: var(--cyan); }
.engine-console .row .v.ember { color: var(--ember); }
.engine-console .row .v.green { color: var(--success); }

/* ── Consola do perfil público (engine-console + typing) ── */
.pp-console {
  margin: 28px 0 14px;
  box-shadow: var(--shadow), var(--glow-cyan);
}
.pp-console .console-body {
  /* reserva altura para evitar layout shift durante a animação */
  min-height: 260px;
  padding: 10px 0 6px;
}
.pp-console .row {
  padding: 9px 18px;
}
.pp-console .row .v {
  text-align: right;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 70%;
}
.pp-console .console-caret {
  margin-left: 0;
}
.pp-console .row .v a {
  border-bottom: 1px dashed rgba(34, 211, 238, 0.4);
  transition: border-color var(--transition);
}
.pp-console .row .v a:hover {
  border-bottom-color: var(--ember);
}
.pp-console .console-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Menos movimento: caret e cursor sem piscar, consola do perfil estática */
@media (prefers-reduced-motion: reduce) {
  .pp-console .console-caret,
  .pp-console .cursor { animation: none; }
}
/* Botão de repetir a animação (canto do header da consola) */
.console-replay {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-faint);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--transition);
}
.console-replay:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.5);
  background: var(--cyan-soft);
  transform: rotate(-90deg);
}
.console-replay:active { transform: scale(0.92); }
.key-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text-dim);
  word-break: break-all;
}

/* ── Downloads ──────────────────────────────────────────── */
.downloads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.download-card { display: flex; flex-direction: column; }
.download-card h4 { font-size: 1.05rem; margin-bottom: 8px; }
.download-card p { color: var(--text-dim); font-size: 0.86rem; margin-bottom: 16px; flex-grow: 1; }
.dl-meta { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); margin-bottom: 18px; }
.dl-meta span { display: inline-flex; align-items: center; gap: 6px; }
.dl-meta i { color: var(--cyan); }

/* ── FAQ ────────────────────────────────────────────────── */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--line-strong); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  text-align: left;
}
.faq-q i { color: var(--ember); transition: transform var(--transition); flex-shrink: 0; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a p { padding: 0 22px 20px; color: var(--text-dim); font-size: 0.92rem; }

/* ── Regras / Sobre ─────────────────────────────────────── */
.rules-list { list-style: none; display: grid; gap: 14px; counter-reset: rule; }
.rules-list li {
  counter-increment: rule;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.rules-list li::before {
  content: "0" counter(rule);
  font-family: var(--font-mono);
  color: var(--ember);
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--ember-soft);
  padding: 5px 9px;
  border-radius: 8px;
  flex-shrink: 0;
}
.rules-list li span { color: var(--text); font-weight: 600; }

/* ── Team / Sobre ───────────────────────────────────────── */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.team-card { text-align: center; padding: 26px 20px; }
.team-card .avatar {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ember), var(--cyan));
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #0b1120;
  margin: 0 auto 14px;
  box-shadow: var(--glow-ember);
}
.team-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid var(--line-strong);
  box-shadow: var(--glow-ember);
  margin: 0 auto 14px;
  display: block;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  background: var(--surface-2);
}
.team-card:hover img {
  transform: scale(1.05) translateY(-2px);
  border-color: var(--ember);
  box-shadow: 0 0 34px -4px rgba(245, 158, 11, 0.45);
}
.team-card h4 { font-size: 1.02rem; margin-bottom: 3px; }
.team-card p { color: var(--text-faint); font-size: 0.82rem; }
.team-card .team-role {
  color: var(--cyan);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.team-card .team-desc { font-size: 0.8rem; }

/* ── Contacto ───────────────────────────────────────────── */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; }
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 16px;
}
.contact-card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--ember-soft);
  color: var(--ember);
  margin-bottom: 14px;
  font-size: 1.1rem;
}
.contact-card h4 { font-size: 1.02rem; margin-bottom: 6px; }
.contact-card a, .contact-card p { color: var(--text-dim); font-size: 0.9rem; }
.contact-card a:hover { color: var(--cyan); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 7px; color: var(--text-dim); }
.form-control {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Auth (login/register/profile) ──────────────────────── */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.auth-box { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 40px; box-shadow: var(--shadow); }
.auth-box h2 { font-size: 1.7rem; margin-bottom: 8px; text-align: center; }
.auth-box .sub { text-align: center; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 28px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 0.85rem; color: var(--text-faint); }
.auth-alt a { color: var(--cyan); }
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.88rem;
}
.alert-error { background: var(--danger-soft); border: 1px solid rgba(248, 113, 113, 0.3); color: var(--danger); }
.alert-success { background: var(--success-soft); border: 1px solid rgba(52, 211, 153, 0.3); color: var(--success); }

/* ── Profile ────────────────────────────────────────────── */
.profile-head { display: flex; align-items: center; gap: 22px; margin-bottom: 36px; flex-wrap: wrap; }
.profile-head .p-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ember), var(--cyan));
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #0b1120;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-head .p-avatar img {
  border-radius: 50%;
}
.profile-head h2 { font-size: 1.7rem; }
.profile-head .lbl { color: var(--text-faint); font-size: 0.85rem; }
.badge-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
}
.badge-pill.premium { background: var(--ember-soft); color: var(--ember); border-color: rgba(245, 158, 11, 0.35); }
.badge-pill.admin { background: var(--cyan-soft); color: var(--cyan); border-color: rgba(34, 211, 238, 0.35); }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 64px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 48px; }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; color: var(--text); }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a { color: var(--text-dim); font-size: 0.88rem; }
.footer a:hover { color: var(--ember-strong); }
.footer .about p { color: var(--text-dim); font-size: 0.9rem; margin: 16px 0 20px; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  transition: all var(--transition);
}
.socials a:hover { color: #0b1120; background: var(--ember); border-color: var(--ember); transform: translateY(-3px); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.footer-status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.72rem; }

/* ── Page header (interior) ─────────────────────────────── */
.page-head { padding: 70px 0 30px; position: relative; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.page-head p { color: var(--text-dim); max-width: 620px; }

/* ── Animações ──────────────────────────────────────────── */
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Modal (admin) ──────────────────────────────────────── */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  /* flex-start + margin:auto no card: evita o clipping clássico do flexbox
     centrado, que cortava o topo do modal (e o botão ×) no telemóvel quando
     o teclado abria ou o card excedia o viewport */
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(6px);
}
.admin-modal.open { display: flex; animation: fadeIn 0.2s ease; }
.admin-modal-card {
  margin: auto;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 44px -10px rgba(34, 211, 238, 0.25);
  padding: 28px;
  animation: modalPop 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Header do modal fixo: o × fica sempre visível mesmo com scroll no card */
.admin-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
@keyframes modalPop {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.msg-line { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.msg-body {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow-y: auto;
}
.admin-modal-head h3 { font-size: 1.15rem; margin: 0; }
.admin-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all var(--transition);
}
.admin-modal-close:hover { color: var(--danger); background: var(--danger-soft); }

/* ── Abas de Planos ─────────────────────────────────────── */
.plans-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 38px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
.plans-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.plans-tab:hover { color: var(--text); background: var(--surface-2); }
.plans-tab.active {
  background: linear-gradient(135deg, var(--ember), var(--cyan));
  color: #0b1120;
  box-shadow: var(--glow-ember);
}
.plans-panel { display: none; }
.plans-panel.active { display: block; animation: fadeInUp 0.4s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ── Tabela (admin/keys) ────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.tbl th {
  text-align: left;
  padding: 13px 16px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--line-strong);
  background: var(--bg-2);
  white-space: nowrap;
}
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text-dim); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(22, 33, 58, 0.5); }

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 0.88rem;
  z-index: 2000;
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90%;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

/* ── Empty state ────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 50px 24px;
  color: var(--text-dim);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty i { font-size: 2rem; color: var(--text-faint); margin-bottom: 14px; display: block; }

/* ── Banner de Cookies ──────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  max-width: 360px;
  width: calc(100% - 48px);
}
.cookie-card {
  background: rgba(16, 24, 40, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: var(--shadow), 0 0 40px -10px rgba(245, 158, 11, 0.2);
  padding: 22px;
  animation: cookieSlideInRight 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cookie-banner.hiding .cookie-card { animation: cookieSlideOutRight 0.4s ease forwards; }
@keyframes cookieSlideInRight {
  0% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes cookieSlideOutRight {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}
.cookie-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cookie-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--ember-soft);
  color: var(--ember);
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: var(--glow-ember);
}
.cookie-header h3 { margin: 0; font-size: 0.98rem; font-weight: 700; }
.cookie-text { margin: 0 0 16px; font-size: 0.82rem; line-height: 1.6; color: var(--text-dim); }
.cookie-text a { color: var(--cyan); font-weight: 700; text-decoration: underline; }
.cookie-text a:hover { color: var(--ember-strong); }
.cookie-actions { display: flex; gap: 8px; }
.cookie-accept {
  flex: 1;
  background: linear-gradient(135deg, var(--ember), #d97706);
  color: #0b1120;
  border: none;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--glow-ember);
}
.cookie-accept:hover { transform: translateY(-2px); filter: brightness(1.08); }
.cookie-reject {
  padding: 11px 16px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.cookie-reject:hover { border-color: var(--cyan); color: var(--cyan); }
.cookie-footer { text-align: center; margin-top: 12px; }
.cookie-settings-link {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color var(--transition);
}
.cookie-settings-link:hover { color: var(--cyan); }

/* Modal de configurações de cookies */
.cookie-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
.cookie-settings-content {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 44px -10px rgba(34, 211, 238, 0.25);
  animation: modalPop 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.cookie-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.cookie-settings-header h3 { margin: 0; font-size: 1.1rem; }
.cookie-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all var(--transition);
}
.cookie-close:hover { color: var(--danger); background: var(--danger-soft); }
.cookie-settings-body { padding: 8px 24px; }
.cookie-option {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cookie-option:last-child { border-bottom: none; }
.cookie-option-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
}
.cookie-option-header input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--ember);
  cursor: pointer;
}
.cookie-option-desc { margin: 0; font-size: 0.8rem; color: var(--text-dim); padding-left: 27px; }
.cookie-settings-footer { padding: 16px 24px 22px; text-align: right; }
.cookie-save {
  background: linear-gradient(135deg, var(--ember), #d97706);
  color: #0b1120;
  border: none;
  border-radius: 12px;
  padding: 11px 22px;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--glow-ember);
}
.cookie-save:hover { transform: translateY(-2px); filter: brightness(1.08); }
@media (max-width: 640px) {
  .cookie-banner { bottom: 16px; right: 16px; width: calc(100% - 32px); }
}

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .engine-wrap { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ds-nav-links { display: none; }
  .ds-burger.btn { display: grid; }
  /* No mobile, os botões de conta vivem apenas no menu hamburger — esconder
     os do topo para não ficarem repetidos. O seletor de idioma (bandeiras)
     e as mensagens (chat-nav) mantêm-se visíveis na barra, junto ao sino,
     para usar sem ter de abrir o menu. */
  .ds-nav-actions > .btn:not(.ds-burger):not(.chat-nav) { display: none; }
  /* Botões da barra mais compactos para caber bandeira+mensagens+sino+búrguer
     em ecrãs estreitos (a 320px) sem overflow. */
  .ds-nav-actions .btn-sm { padding: 8px 10px; }
}
@media (max-width: 640px) {
  .hero { padding: 60px 0 40px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .section { padding: 60px 0; }
}

/* ── Acessibilidade ─────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

/* ── Skip-link (acessibilidade) ─────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 9999;
  background: var(--ember);
  color: #070A12;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.25s ease;
}
.skip-link:focus { top: 12px; }

/* ── Apoiadores card hover ── */
.supporter-card { transition: transform 0.2s ease, border-color 0.2s ease; border: 1px solid transparent; }
.supporter-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 8px 30px rgba(0,0,0,0.25); }

/* ── Perfil público ──────────────────────────────────────── */
.pp-wrap { padding-bottom: 70px; }
.pp-banner {
  position: relative;
  height: 230px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: #0e1320;
}
.pp-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,15,25,0.15), rgba(11,15,25,0.05) 45%, rgba(11,15,25,0.75));
  pointer-events: none;
}
.pp-banner-default {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(245,158,11,0.24), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(34,211,238,0.2), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(169,112,255,0.08), transparent 60%),
    linear-gradient(120deg, #101827, #0c1017);
}
.pp-head {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: -56px;
  padding-bottom: 26px;
}
.pp-avatar {
  width: 122px;
  height: 122px;
  border-radius: 26px;
  border: 4px solid var(--bg);
  background: linear-gradient(135deg, var(--ember), var(--cyan));
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 2px rgba(245,158,11,0.35),
    0 0 0 5px rgba(11,15,25,1),
    0 16px 38px rgba(0,0,0,0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pp-avatar:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 0 0 2px rgba(34,211,238,0.45),
    0 0 0 5px rgba(11,15,25,1),
    0 20px 44px rgba(0,0,0,0.55);
}
.pp-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-avatar span {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  color: #0b1120;
  text-shadow: 0 2px 12px rgba(255,255,255,0.25);
}
.pp-id { flex: 1; min-width: 220px; padding-top: 62px; }
.pp-id h1 { margin: 0; font-size: 1.9rem; line-height: 1.1; }
.pp-handle { color: var(--text-faint); font-size: 0.95rem; margin-top: 3px; }
.pp-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pp-stats {
  display: flex;
  gap: 30px;
  padding: 14px 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 6px;
  backdrop-filter: blur(8px);
}
.pp-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; }
.pp-stat i { font-size: 0.85rem; color: var(--text-faint); transition: color 0.2s ease, transform 0.2s ease; }
.pp-stat:hover i { color: var(--cyan); transform: translateY(-1px); }
.pp-stat b { font-family: var(--font-display); font-size: 1.3rem; color: var(--ember); line-height: 1; }
.pp-stat span { font-size: 0.66rem; letter-spacing: 0.07em; color: var(--text-dim); text-transform: uppercase; }
.pp-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  margin-bottom: 26px;
  border: 1px solid rgba(245,158,11,0.28);
  border-left: 4px solid var(--ember);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(245,158,11,0.09), rgba(245,158,11,0.02));
  color: var(--text);
  font-size: 0.98rem;
}
.pp-status i { color: var(--ember); font-size: 1.05rem; flex-shrink: 0; }
.pp-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f5b54d;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(245,181,77,0.7);
  animation: pp-pulse 2s ease-in-out infinite;
}
@keyframes pp-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}
.pp-private-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin-bottom: 22px;
  border: 1px solid rgba(231,76,60,0.3);
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  background: rgba(231,76,60,0.08);
  color: var(--text);
  font-size: 0.88rem;
}
.pp-private-note i { color: var(--danger); }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.pp-card { padding: 24px; }
.pp-card-title {
  margin: 0 0 16px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 9px;
}
.pp-bio { margin: 0 0 18px; line-height: 1.7; white-space: pre-wrap; }
.pp-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 10px;
}
.pp-meta i { width: 16px; text-align: center; color: var(--cyan); }
.pp-meta a { color: var(--cyan); text-decoration: none; }
.pp-meta a:hover { text-decoration: underline; }
.pp-empty { color: var(--text-faint); font-size: 0.9rem; margin: 0; }
.pp-socials { display: flex; flex-wrap: wrap; gap: 10px; }
.pp-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 0.85rem;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.pp-social i { color: var(--sc); font-size: 1rem; }
.pp-social em { font-style: normal; }
.pp-social:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--sc);
  background: color-mix(in srgb, var(--sc) 10%, transparent);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 0 1px color-mix(in srgb, var(--sc) 35%, transparent);
}
.pp-social:hover i { transform: scale(1.15); }
.pp-social i { transition: transform 0.2s ease; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(169,112,255,0.12);
  border: 1px solid rgba(169,112,255,0.3);
  color: #c9b0ff;
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.pp-tag:hover {
  transform: translateY(-2px);
  background: rgba(169,112,255,0.2);
  border-color: rgba(169,112,255,0.5);
}
.pp-tag-emoji { font-size: 0.95rem; line-height: 1; }
.pp-tag-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid rgba(169,112,255,0.4);
  box-shadow: 0 0 0 2px rgba(169,112,255,0.12);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.pp-tag:hover .pp-tag-icon {
  transform: scale(1.08);
  border-color: rgba(169,112,255,0.8);
  box-shadow: 0 0 0 3px rgba(169,112,255,0.2);
}
.pp-card { animation: pp-card-in 0.5s cubic-bezier(0.21, 1.02, 0.73, 1) both; }
.pp-grid .pp-card:nth-child(2) { animation-delay: 0.08s; }
.pp-grid .pp-card:nth-child(3) { animation-delay: 0.16s; }
@keyframes pp-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.pp-foot { margin-top: 28px; display: flex; justify-content: center; }

/* ── Membros (grid de perfis públicos) ── */
.membros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.membros-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: pp-card-in 0.5s cubic-bezier(0.21, 1.02, 0.73, 1) both;
}
.membros-grid .membros-card:nth-child(2n) { animation-delay: 0.06s; }
.membros-grid .membros-card:nth-child(3n) { animation-delay: 0.12s; }
.membros-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,0.45);
  box-shadow: 0 14px 34px rgba(0,0,0,0.45), 0 0 0 1px rgba(34,211,238,0.18);
}
.membros-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.membros-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.membros-crown {
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ember);
  color: #1a120b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 2px solid var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.membros-body { min-width: 0; }
.membros-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-display);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.membros-handle {
  font-size: 0.8rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.membros-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.membros-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.45;
}
.membros-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px var(--ember);
  flex-shrink: 0;
  animation: pp-pulse 2.2s ease-in-out infinite;
}
.membros-loc {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.membros-loc i { color: var(--cyan); font-size: 0.75rem; }
.membros-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.membros-mini {
  padding: 4px 10px;
  font-size: 0.74rem;
  gap: 6px;
}
.membros-more {
  background: rgba(34,211,238,0.1);
  border-color: rgba(34,211,238,0.3);
  color: var(--cyan);
}
.membros-tag-active {
  background: rgba(34,211,238,0.18) !important;
  border-color: rgba(34,211,238,0.45) !important;
  color: var(--cyan) !important;
}
.membros-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-faint);
}
.membros-foot i { color: var(--cyan); font-size: 0.7rem; margin-right: 5px; }
.membros-cta {
  color: var(--cyan);
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.15s ease;
}
.membros-card:hover .membros-cta i { transform: translateX(3px); }
.membros-cta i { transition: transform 0.15s ease; margin: 0 0 0 4px; }
@media (max-width: 640px) {
  .pp-head { margin-top: -46px; }
  .pp-avatar { width: 96px; height: 96px; border-radius: 20px; }
  .pp-avatar span { font-size: 2.7rem; }
  .pp-id { padding-top: 50px; }
  .pp-banner { height: 150px; }
  .pp-stats { gap: 20px; }
}

/* ── Toasts (notificações discretas) ─────────────────────── */
.toast-container {
  position: fixed;
  top: 78px;
  right: 18px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(22, 25, 34, 0.97);
  border: 1px solid var(--line);
  border-left-width: 4px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 0.88rem;
  animation: toast-in 0.28s cubic-bezier(0.21, 1.02, 0.73, 1);
}
.toast.hide { animation: toast-out 0.25s ease forwards; }
.toast-ic { font-size: 1.05rem; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.45; }
.toast-close {
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.toast-close:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.toast-success { border-left-color: var(--success); }
.toast-success .toast-ic { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error .toast-ic { color: var(--danger); }
.toast-warning { border-left-color: var(--ember); }
.toast-warning .toast-ic { color: var(--ember); }
.toast-info { border-left-color: var(--cyan); }
.toast-info .toast-ic { color: var(--cyan); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(24px); }
}
@media (max-width: 640px) {
  .toast-container { top: 70px; right: 12px; left: 12px; max-width: none; }
}

/* ── Página 404 — tela de GAME OVER estilo arcade ── */
.p404 { padding: 40px 0 70px; }
.p404-screen {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background: #0a0e15;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(34,211,238,0.08), 0 24px 60px rgba(0,0,0,0.55), 0 0 60px rgba(34,211,238,0.05);
  animation: pp-card-in 0.5s cubic-bezier(0.21, 1.02, 0.73, 1) both;
}
/* Scanlines CRT */
.p404-crt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0) 4px
  );
  mix-blend-mode: multiply;
}
.p404-crt::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(34,211,238,0.05) 0%, rgba(0,0,0,0.25) 100%);
}
.p404-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.p404-titlebar-dots { display: flex; gap: 6px; }
.p404-titlebar-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger); display: block;
}
.p404-titlebar-dots i:nth-child(2) { background: var(--ember); }
.p404-titlebar-dots i:nth-child(3) { background: var(--success); }
.p404-titlebar-text { flex: 1; text-align: center; color: var(--text); }
.p404-titlebar-text .blink { color: var(--danger); font-weight: 700; }
.p404-titlebar-hint { color: var(--text-faint); }
.p404-head { padding: 44px 24px 8px; text-align: center; }
.p404-eyebrow {
  display: inline-flex;
  align-items: right;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.p404-eyebrow i { color: var(--ember); }
/* Número 404 com glitch RGB */
.p404-big { position: relative; display: inline-block; }
.p404-glitch {
  font-family: var(--font-display);
  font-size: clamp(5.2rem, 14vw, 9rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 40px rgba(34,211,238,0.35);
  animation: p404-glitch-shift 3s infinite steps(1);
}
.p404-glitch::before,
.p404-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.p404-glitch::before {
  color: #22d3ee;
  transform: translate(-2px, -1px);
  clip-path: inset(0 0 55% 0);
  animation: p404-glitch-a 2.7s infinite steps(1);
  opacity: 0.85;
}
.p404-glitch::after {
  color: #f59e0b;
  transform: translate(2px, 1px);
  clip-path: inset(55% 0 0 0);
  animation: p404-glitch-b 3.1s infinite steps(1);
  opacity: 0.85;
}
@keyframes p404-glitch-shift {
  0%, 86%, 100% { transform: none; }
  88% { transform: translate(1px, -1px) skewX(2deg); }
  90% { transform: translate(-2px, 1px) skewX(-3deg); }
  92% { transform: none; }
  96% { transform: translate(1px, 0); }
  98% { transform: none; }
}
@keyframes p404-glitch-a {
  0%, 90%, 100% { clip-path: inset(0 0 55% 0); transform: translate(-2px, -1px); }
  92% { clip-path: inset(20% 0 40% 0); transform: translate(-4px, 2px); }
  95% { clip-path: inset(0 0 70% 0); transform: translate(3px, -2px); }
}
@keyframes p404-glitch-b {
  0%, 90%, 100% { clip-path: inset(55% 0 0 0); transform: translate(2px, 1px); }
  93% { clip-path: inset(30% 0 30% 0); transform: translate(4px, -1px); }
  96% { clip-path: inset(60% 0 0 0); transform: translate(-3px, 2px); }
}
.p404-body {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 18px 34px 30px;
  flex-wrap: wrap;
  justify-content: center;
}
.p404-sprite { text-align: center; flex-shrink: 0; }
.p404-sprite-emoji {
  display: inline-block;
  font-size: 4.4rem;
  line-height: 1;
  animation: p404-bounce 1.1s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(34,211,238,0.25));
}
.p404-sprite-shadow {
  width: 56px;
  height: 10px;
  margin: 6px auto 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  animation: p404-shadow 1.1s ease-in-out infinite;
}
@keyframes p404-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes p404-shadow {
  0%, 100% { transform: scaleX(1); opacity: 0.5; }
  50% { transform: scaleX(0.6); opacity: 0.3; }
}
.p404-info { flex: 1; min-width: 260px; }
.p404-hp,
.p404-xp { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.p404-hp-label,
.p404-xp-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  width: 26px;
  letter-spacing: 0.08em;
}
.p404-hp-label { color: var(--danger); }
.p404-xp-label { color: var(--cyan); }
.p404-hp-bar,
.p404-xp-bar {
  flex: 1;
  height: 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  overflow: hidden;
}
.p404-hp-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff3b3b, #ff6b4a);
  box-shadow: 0 0 12px rgba(255,59,59,0.5);
  animation: p404-hp-drain 2.6s cubic-bezier(0.5, 0, 0.7, 1) both;
}
.p404-xp-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22d3ee, #34d399);
  box-shadow: 0 0 12px rgba(34,211,238,0.4);
  animation: p404-xp-drain 2.6s cubic-bezier(0.5, 0, 0.7, 1) both;
}
@keyframes p404-hp-drain {
  from { width: 100%; }
  to { width: 1%; }
}
@keyframes p404-xp-drain {
  from { width: 100%; }
  to { width: 25%; } /* <--- Agora a barra para em 40% (pouco menos da metade) */
  
}
.p404-hp-num,
.p404-xp-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  min-width: 58px;
  text-align: right;
}
.p404-msg {
  margin: 14px 0 6px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}
.p404-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.6;
}
.p404-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding: 4px 34px 30px;
}
.p404-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.p404-btn i { color: var(--cyan); }
.p404-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34,211,238,0.5);
  background: rgba(34,211,238,0.08);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.p404-btn-primary {
  grid-column: 1 / -1;
  border-color: rgba(34,211,238,0.5);
  background: linear-gradient(135deg, rgba(34,211,238,0.16), rgba(34,211,238,0.06));
  animation: p404-start-blink 1.6s ease-in-out infinite;
}
.p404-btn-primary i { color: var(--ember); }
@keyframes p404-start-blink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0.35); }
  50% { box-shadow: 0 0 24px 2px rgba(34,211,238,0.25); }
}
.p404-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  font-size: 0.78rem;
  color: var(--text-faint);
  text-align: center;
}
.p404-foot-sep { opacity: 0.4; }
.p404-discord {
  color: #8b96f5;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.p404-discord:hover { text-decoration: underline; }
.blink-slow { animation: p404-blink 2s steps(1) infinite; }
@keyframes p404-blink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0; }
}
@media (max-width: 560px) {
  .p404-body { padding: 14px 20px 24px; }
  .p404-actions { padding: 2px 20px 24px; }
  .p404-head { padding-top: 30px; }
}

/* ═══ Chat entre amigos (mensagens.php) ═══════════════════ */
.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 540px;
  height: calc(100vh - 300px);
  padding: 0;
  margin: 0;
  overflow: hidden;
}
.chat-list {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(11, 17, 32, 0.5);
}
.chat-list-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-list-head strong {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}
.chat-scroll {
  overflow-y: auto;
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-list-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 18px;
  color: var(--text-dim);
}
.chat-list-empty p { font-size: 0.82rem; margin-top: 6px; }
.chat-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition);
  position: relative;
}
.chat-item:hover { background: var(--surface-2); }
.chat-item.active {
  background: var(--cyan-soft);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.28);
}
.chat-item-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
  overflow: hidden;
  text-decoration: none;
}
.chat-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.chat-item-top strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item-top time {
  font-size: 0.68rem;
  color: var(--text-faint);
  flex-shrink: 0;
}
.chat-item-preview {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-unread-pill {
  min-width: 20px;
  height: 20px;
  border-radius: 20px;
  background: var(--cyan);
  color: #071018;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 6px;
  flex-shrink: 0;
  box-shadow: 0 0 14px -2px rgba(34, 211, 238, 0.5);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.chat-head .chat-item-avatar { width: 40px; height: 40px; border-radius: 10px; }
.chat-head-id {
  flex: 1;
  min-width: 0;
}
.chat-head-id strong { display: block; font-size: 0.95rem; }
.chat-head-id span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-back { display: none; }
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(600px 200px at 85% -10%, rgba(34, 211, 238, 0.05), transparent 60%),
    radial-gradient(500px 200px at 10% 110%, rgba(245, 158, 11, 0.04), transparent 60%);
}
.chat-msg {
  max-width: 72%;
  display: flex;
  flex-direction: column;
}
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}
.chat-msg.mine .chat-bubble {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(34, 211, 238, 0.07));
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-bottom-right-radius: 5px;
  color: #eaf7ff;
}
.chat-msg.theirs .chat-bubble {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}
.chat-meta {
  font-size: 0.66rem;
  color: var(--text-faint);
  margin-top: 3px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.chat-sender {
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.chat-msg.mine .chat-sender { color: var(--cyan); }
.chat-ticks.read { color: var(--cyan); }
.chat-first-hint {
  align-self: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  padding: 14px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(22, 33, 58, 0.4);
}
.chat-form {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  align-items: flex-end;
}
.chat-input {
  resize: none;
  max-height: 120px;
  min-height: 44px;
}
.chat-send-btn {
  flex-shrink: 0;
  height: 44px;
  padding: 0 18px;
}
.chat-emoji-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
}
.chat-emoji-btn {
  height: 44px;
  padding: 0 12px;
  font-size: 1.15rem;
  line-height: 1;
  transition: border-color var(--transition), color var(--transition);
}
.chat-emoji-btn:hover { border-color: var(--cyan); }
.chat-emoji-btn.active { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-soft); }
.chat-emoji-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: 304px;
  max-height: 250px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px;
  z-index: 50;
}
.chat-emoji-panel[hidden] { display: none; }
.chat-emoji-tabs {
  display: flex;
  gap: 4px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}
.chat-emoji-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 1.15rem;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.chat-emoji-tab:hover { background: var(--surface); transform: scale(1.1); }
.chat-emoji-tab.active {
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.35);
}
.chat-emoji-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.chat-emoji-cell {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 1.25rem;
  padding: 6px 0;
  cursor: pointer;
  line-height: 1;
  transition: background var(--transition), transform var(--transition);
}
.chat-emoji-cell:hover {
  background: var(--cyan-soft);
  transform: scale(1.14);
}
/* Bandeiras emoji → imagens Twemoji (o Windows não as desenha como emoji) */
.emoji-flag {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  border-radius: 3px;
  object-fit: cover;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.chat-emoji-cell .emoji-flag {
  width: 1.3em;
  height: 1.3em;
  vertical-align: middle;
}
/* Scrollbars temáticos do chat (lista de conversas, janela e picker) */
.chat-scroll::-webkit-scrollbar,
.chat-body::-webkit-scrollbar,
.chat-emoji-panel::-webkit-scrollbar,
.chat-emoji-tabs::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.chat-scroll::-webkit-scrollbar-track,
.chat-body::-webkit-scrollbar-track,
.chat-emoji-panel::-webkit-scrollbar-track,
.chat-emoji-tabs::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb,
.chat-body::-webkit-scrollbar-thumb,
.chat-emoji-panel::-webkit-scrollbar-thumb,
.chat-emoji-tabs::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.22);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background var(--transition);
}
.chat-scroll::-webkit-scrollbar-thumb:hover,
.chat-body::-webkit-scrollbar-thumb:hover,
.chat-emoji-panel::-webkit-scrollbar-thumb:hover,
.chat-emoji-tabs::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.5);
  background-clip: content-box;
}
.chat-scroll,
.chat-body,
.chat-emoji-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.35) transparent;
}
@media (max-width: 560px) {
  .chat-emoji-panel { right: -10px; width: 280px; }
}
.chat-empty {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}
.chat-msg-enter { animation: chatIn 0.18s ease; }
@keyframes chatIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .chat-layout {
    grid-template-columns: 1fr;
    height: calc(100vh - 260px);
    min-height: 460px;
  }
  .chat-list { display: none; }
  .chat-panel { display: none; }
  .chat-layout.chat-open .chat-panel { display: flex; }
  .chat-layout:not(.chat-open) .chat-list { display: flex; }
  .chat-back { display: inline-flex; }
  .chat-msg { max-width: 85%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  /* O blink com steps() + 0.01ms podia deixar o texto invisível — força visível */
  .blink-slow { animation: none; opacity: 1; }
}
