:root {
  --bg: #14111d;
  --card: #211a33;
  --accent: #b08cff;
  --accent-2: #cdb8ff;
  --ok: #34d399;
  --err: #fb7185;
  --text: #ece8f6;
  --muted: #a49eba;
  --border: #322b49;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.topbar { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }

.container { max-width: 720px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

h1 { font-size: clamp(1.5rem, 5vw, 2.3rem); margin: 0.5rem 0 0.25rem; }
.lead { color: var(--muted); margin-top: 0; }

.tabs { display: flex; gap: 0.5rem; margin: 1.25rem 0; }
.tab {
  flex: 1;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.tab.active { background: var(--accent); color: #04121c; border-color: var(--accent); }

.panel.hidden { display: none; }

.block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.block h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }

.gen-row { display: flex; gap: 0.5rem; align-items: center; }
.doc-out {
  flex: 1 1 auto;
  background: #181222;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.icon-btn {
  flex: 0 0 auto;
  background: var(--border);
  color: var(--text);
  border: none;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--accent); color: #04121c; }

.chk { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; color: var(--muted); cursor: pointer; }
.chk input { accent-color: var(--accent); width: 17px; height: 17px; }

.val-row { display: flex; gap: 0.5rem; }
.doc-in {
  flex: 1 1 auto;
  background: #181222;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1.05rem;
}
.doc-in:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.btn {
  background: var(--border);
  color: var(--text);
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #04121c; }
.btn-primary:hover { background: var(--accent-2); }

.status { min-height: 1.5rem; margin-top: 0.6rem; font-weight: 700; font-size: 0.95rem; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

.ad-slot {
  margin: 1.75rem 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.ad-placeholder { color: var(--muted); font-size: 0.85rem; }

.faq h2 { font-size: 1.25rem; margin-top: 2rem; }
.faq h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.faq p { margin-top: 0; color: var(--muted); }
.disclaimer { font-size: 0.85rem; border-left: 3px solid var(--border); padding-left: 0.75rem; }
code { background: var(--card); padding: 0.1rem 0.4rem; border-radius: 5px; font-size: 0.9em; }

.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer a { color: var(--accent); }

/* ===================== FERRAMENTAI-BRAND-V2 ===================== */
/* Camada de identidade aplicada sobre o CSS base de cada ferramenta */
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image:
    radial-gradient(820px 380px at 50% -140px, rgba(176,140,255,.18), transparent 70%),
    radial-gradient(560px 280px at 100% 0, rgba(232,121,249,.10), transparent 72%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Header fixo com efeito de vidro */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}

/* Wordmark da marca com gradiente assinatura */
.brand {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(120deg, #a78bfa 8%, #e879f9 92%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

h1 { letter-spacing: -.03em; font-weight: 800; }
.lead { font-size: 1.02rem; }

/* Superfícies com profundidade suave (sombra violeta) */
.card, .stat, .result-card, .hash-card, .gen-card, .picker-card, .ip-card, .block {
  box-shadow: 0 1px 2px rgba(0,0,0,.28), 0 18px 38px -22px rgba(120,60,200,.55);
}

/* Microinterações */
.btn, .btn-primary, .copy-btn, .icon-btn, .tab, .mini-btn {
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, color .12s ease, border-color .15s ease;
}
.btn-primary { box-shadow: 0 10px 24px -10px rgba(176,140,255,.6); }
.btn-primary:hover, .icon-btn:hover, .tab:hover { transform: translateY(-1px); }

/* Foco acessível e consistente */
.input:focus, .area:focus, select:focus, textarea:focus, input:focus {
  outline: none; border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167,139,250,.24);
}
:focus-visible { outline: none; }
::selection { background: rgba(167,139,250,.32); color: #fff; }

/* Realce sutil nos cartões de resultado */
.result { box-shadow: inset 0 0 0 1px rgba(176,140,255,.14); }
/* =============================================================== */

/* Seletor de idioma (i18n) */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.langnav { display: flex; gap: .3rem; flex: 0 0 auto; }
.langnav a {
  color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 800;
  letter-spacing: .03em; padding: .25rem .55rem; border-radius: 7px; border: 1px solid var(--border);
}
.langnav a:hover { color: var(--accent); border-color: var(--accent); }
.langnav a[aria-current="true"] { background: var(--accent); color: #14111d; border-color: var(--accent); }
