:root {
  --bg: #14111d;
  --card: #211a33;
  --accent: #b08cff;
  --accent-2: #cdb8ff;
  --text: #ece8f6;
  --muted: #a49eba;
  --border: #322b49;
  --weak: #f87171;
  --medium: #fbbf24;
  --strong: #34d399;
  --vstrong: #22c55e;
}

* { 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.6rem, 5vw, 2.4rem); margin: 0.5rem 0 0.25rem; }
.lead { color: var(--muted); margin-top: 0; }

.gen-card {
  background: linear-gradient(135deg, var(--card), #181222);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.output-row { display: flex; gap: 0.5rem; align-items: center; }

.password {
  flex: 1 1 auto;
  background: #181222;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 700;
  word-break: break-all;
  width: 100%;
}

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

.strength { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.strength-bar {
  flex: 1 1 auto;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.2s, background 0.2s;
}
.strength-label { font-size: 0.9rem; font-weight: 700; min-width: 90px; text-align: right; }

.controls {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}
.control-len label { display: block; margin-bottom: 0.5rem; color: var(--muted); }
.control-len strong { color: var(--accent-2); font-size: 1.1rem; }
#length {
  width: 100%;
  accent-color: var(--accent);
}

.control-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.control-opts label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  cursor: pointer;
}
.control-opts input { accent-color: var(--accent); width: 18px; height: 18px; }

.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); }
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); }
