/* style.css — validador-de-email · base + tool */
:root {
  --bg: #0b1220;
  --bg-2: #0e1729;
  --panel: #101c31;
  --panel-2: #14233c;
  --linea: #1f3355;
  --texto: #e6edf7;
  --texto-2: #93a4bf;
  --texto-3: #5b6d8a;
  --accent: #4ade80;
  --accent-dim: rgba(74, 222, 128, .12);
  --rojo: #f87171;
  --rojo-dim: rgba(248, 113, 113, .1);
  --ambar: #fbbf24;
  --ambar-dim: rgba(251, 191, 36, .1);
  --radio: 12px;
  --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 32px -8px rgba(0, 0, 0, .5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(74, 222, 128, .07), transparent 60%),
    radial-gradient(700px 400px at 0% 0%, rgba(56, 130, 246, .05), transparent 55%),
    var(--bg);
  color: var(--texto);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(11, 18, 32, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linea);
}
.topbar__brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--texto); text-decoration: none;
  font-weight: 700; letter-spacing: -.02em; font-size: 1.05rem;
}
.topbar__brand-accent { color: var(--accent); }
.topbar__nav { display: flex; list-style: none; gap: clamp(10px, 2.5vw, 26px); }
.topbar__nav a {
  color: var(--texto-2); text-decoration: none; font-size: .86rem;
  font-weight: 500; transition: color .18s;
}
.topbar__nav a:hover, .topbar__nav a:focus-visible { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { max-width: 880px; margin: 0 auto; padding: clamp(28px, 6vw, 56px) 20px 40px; }
.hero__kicker {
  color: var(--accent); font-family: ui-monospace, Menlo, monospace;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  animation: subir .5s ease backwards;
}
.hero__title {
  font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -.035em;
  line-height: 1.08; margin: 10px 0 12px;
  background: linear-gradient(120deg, #fff 30%, #9ff5c0 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: subir .5s .06s ease backwards;
}
.hero__sub {
  color: var(--texto-2); font-size: clamp(.95rem, 2vw, 1.08rem); max-width: 60ch;
  animation: subir .5s .12s ease backwards;
}
@keyframes subir { from { transform: translateY(16px); } }

.reveal { animation: subir .55s .18s ease backwards; }

/* ---------- Panel del tool ---------- */
.panel {
  margin-top: 30px; background: var(--panel); border: 1px solid var(--linea);
  border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden;
}
.panel__tabs { display: flex; border-bottom: 1px solid var(--linea); background: var(--bg-2); }
.tab {
  appearance: none; border: 0; background: none; cursor: pointer;
  padding: 13px 20px; color: var(--texto-2); font: inherit; font-size: .88rem; font-weight: 600;
  border-bottom: 2px solid transparent; transition: color .18s, border-color .18s;
}
.tab:hover { color: var(--texto); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.panel__view { padding: clamp(16px, 3vw, 24px); }

/* ---------- Vista individual ---------- */
.live-row { display: flex; gap: 8px; align-items: stretch; }
.live-input {
  flex: 1; min-width: 0; background: var(--bg-2); border: 1.5px solid var(--linea);
  border-radius: 10px; padding: 14px 16px; color: var(--texto); font: inherit;
  font-size: 1.02rem; font-family: ui-monospace, Menlo, monospace;
  transition: border-color .2s, box-shadow .2s;
}
.live-input::placeholder { color: var(--texto-3); }
.live-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.btn-icono {
  appearance: none; border: 1.5px solid var(--linea); background: var(--bg-2);
  color: var(--texto-2); border-radius: 10px; width: 48px; cursor: pointer;
  display: grid; place-items: center; transition: color .18s, border-color .18s;
}
.btn-icono:hover { color: var(--rojo); border-color: var(--rojo); }

.veredicto {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--linea); background: var(--bg-2);
  transition: border-color .25s, background .25s;
}
.veredicto[data-estado="ok"]   { border-color: rgba(74, 222, 128, .45); background: var(--accent-dim); color: var(--accent); }
.veredicto[data-estado="bad"]  { border-color: rgba(248, 113, 113, .45); background: var(--rojo-dim); color: var(--rojo); }
.veredicto[data-estado="warn"] { border-color: rgba(251, 191, 36, .45); background: var(--ambar-dim); color: var(--ambar); }
.veredicto__icono { display: grid; place-items: center; flex-shrink: 0; }
.veredicto__texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.veredicto__msg { font-weight: 700; color: inherit; }
.veredicto__extra { font-size: .84rem; color: var(--texto-2); }
.sug-link {
  appearance: none; border: 0; background: none; cursor: pointer; padding: 0;
  color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline;
}
.btn-mini {
  appearance: none; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--linea); background: var(--panel-2); color: var(--texto);
  border-radius: 8px; padding: 8px 13px; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 600; min-height: 44px;
  transition: border-color .18s, background .18s, transform .15s;
}
.btn-mini:hover { border-color: var(--accent); }
.btn-mini:active { transform: scale(.97); }
.btn-mini--accent { background: var(--accent); border-color: var(--accent); color: #06281a; }
.btn-mini--accent:hover { filter: brightness(1.08); }

/* ---------- Checks ---------- */
.checks {
  list-style: none; margin-top: 14px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 7px 16px;
}
.checks__item { display: flex; align-items: center; gap: 8px; font-size: .83rem; color: var(--texto-2); }
.checks__dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--texto-3);
}
.checks__item.is-ok { color: var(--texto); }
.checks__item.is-ok .checks__dot { background: var(--accent); box-shadow: 0 0 6px rgba(74, 222, 128, .6); }
.checks__item.is-bad { color: var(--rojo); }
.checks__item.is-bad .checks__dot { background: var(--rojo); }
.checks__item.is-warn { color: var(--ambar); }
.checks__item.is-warn .checks__dot { background: var(--ambar); }

/* ---------- Vista lista ---------- */
.lote-input {
  width: 100%; resize: vertical; background: var(--bg-2); border: 1.5px solid var(--linea);
  border-radius: 10px; padding: 13px 15px; color: var(--texto); font: inherit;
  font-size: .95rem; font-family: ui-monospace, Menlo, monospace; min-height: 110px;
}
.lote-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.lote-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.lote-info { color: var(--texto-3); font-size: .84rem; }
.btn-gen {
  appearance: none; display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  background: linear-gradient(135deg, #34d399, #22c55e); color: #04241a;
  border: 0; border-radius: 10px; padding: 12px 20px; min-height: 46px;
  font: inherit; font-weight: 700; font-size: .92rem; letter-spacing: .01em;
  transition: filter .18s, transform .15s; text-decoration: none;
}
.btn-gen:hover { filter: brightness(1.1); }
.btn-gen:active { transform: scale(.98); }
.btn-gen kbd, .btn-gen--inline kbd {
  background: rgba(0, 0, 0, .18); border-radius: 5px; padding: 2px 6px;
  font-size: .72rem; font-weight: 600;
}

.resumen { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--linea);
}
.chip--ok { background: var(--accent-dim); color: var(--accent); border-color: rgba(74, 222, 128, .4); }
.chip--bad { background: var(--rojo-dim); color: var(--rojo); border-color: rgba(248, 113, 113, .4); }
.chip--warn { background: var(--ambar-dim); color: var(--ambar); border-color: rgba(251, 191, 36, .4); }
.resumen__spacer { flex: 1; }

.tabla-wrap { margin-top: 16px; overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 520px; }
.tabla th {
  text-align: left; color: var(--texto-3); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--linea);
}
.tabla td { padding: 9px 10px; border-bottom: 1px solid rgba(31, 51, 85, .5); vertical-align: top; }
.tabla tbody tr { transition: background .15s; }
.tabla tbody tr:hover { background: var(--bg-2); }
.tabla tr:last-child td { border-bottom: 0; }
.tabla__mail { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; word-break: break-all; }
.fila--ok .tabla__mail { color: var(--texto); }
.fila--bad .tabla__mail { color: var(--rojo); text-decoration: line-through; }
.pill {
  display: inline-block; font-size: .72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.pill--ok { background: var(--accent-dim); color: var(--accent); }
.pill--bad { background: var(--rojo-dim); color: var(--rojo); }
.pill--warn { background: var(--ambar-dim); color: var(--ambar); }

/* ---------- Ejemplos ---------- */
.card {
  background: var(--panel); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: clamp(16px, 3vw, 22px); box-shadow: var(--sombra);
}
.card--wide { margin-top: 18px; }
.card__title {
  display: flex; align-items: center; gap: 8px;
  font-size: .98rem; font-weight: 700; margin-bottom: 14px; color: var(--texto);
}
.card__title svg { color: var(--accent); flex-shrink: 0; }
.ejemplos { display: flex; flex-wrap: wrap; gap: 10px; }
.ejemplo {
  appearance: none; cursor: pointer; text-align: left;
  background: var(--bg-2); border: 1px solid var(--linea); border-radius: 10px;
  padding: 10px 14px; display: flex; flex-direction: column; gap: 3px;
  font: inherit; transition: border-color .18s, transform .15s;
}
.ejemplo:hover { border-color: var(--accent); transform: translateY(-2px); }
.ejemplo code { font-size: .82rem; color: var(--texto); }
.ejemplo span { font-size: .74rem; color: var(--rojo); }
