/* ═══════════════════════════════════════════
   HexScan — Professional Dark CSS
   Aesthetic: Navy slate / Cyan accent
   Fonts: Sora (display) + IBM Plex Mono
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg:        #0a0e1a;
  --bg2:       #0f1525;
  --bg3:       #141c30;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(34,211,238,0.35);
  --accent:    #22d3ee;
  --accent2:   #38bdf8;
  --accent3:   #6366f1;
  --green:     #10b981;
  --red:       #f43f5e;
  --yellow:    #f59e0b;
  --text:      #e2e8f4;
  --text-muted:#5a6a8a;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Fira Code', monospace;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --glow: 0 0 20px rgba(34,211,238,0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── LAYOUT ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,26,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.25), transparent);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  color: var(--accent);
  font-size: 1.4rem;
  filter: none;
  animation: none;
}

.logo-text strong { color: var(--accent); }

.nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  align-items: center;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  font-family: var(--font-display);
}

.nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* Espacio entre icono y texto */
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.hero-chip:hover {
  background: rgba(16, 185, 129, 0.1); /* Verde sutil al pasar el mouse */
  border-color: #10b981;
  color: #10b981;
  transform: translateY(-2px);
}

.chip-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8; /* Un poco más suave que el texto */
}

.hero-chip:hover .chip-icon {
  opacity: 1;
}

.nav-donate {
  background: rgba(34,211,238,0.08) !important;
  border: 1px solid rgba(34,211,238,0.22) !important;
  color: var(--accent) !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

.nav-donate:hover {
  background: rgba(34,211,238,0.14) !important;
  border-color: rgba(34,211,238,0.4) !important;
  box-shadow: var(--glow) !important;
}

/* ── HERO ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 60px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 420px;
  background: radial-gradient(ellipse at center, rgba(34,211,238,0.055) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after { display: none; }

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(34,211,238,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,211,238,0.07);
  border: 1px solid rgba(34,211,238,0.18);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
  animation: fadeDown 0.5s ease both;
}

.hero-badge::before {
  content: '●';
  font-size: 0.5rem;
  animation: blink 2.5s ease-in-out infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-transform: none;
  margin-bottom: 16px;
  animation: fadeDown 0.5s 0.1s ease both;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
  text-shadow: none;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-family: var(--font-display);
  max-width: 480px;
  margin: 0 auto 36px;
  animation: fadeDown 0.5s 0.2s ease both;
  line-height: 1.7;
}

.hero-tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  animation: fadeDown 0.5s 0.3s ease both;
}
.tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-key {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.hero-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 16px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  clip-path: none;
  transition: all 0.18s ease;
}

.hero-chip:hover {
  border-color: rgba(34,211,238,0.28);
  color: var(--accent);
  background: rgba(34,211,238,0.06);
  transform: translateY(-1px);
}

/* ── TOOLS CONTAINER ── */
.tools-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 40px;
  padding-bottom: 80px;
}

/* ── CATEGORY HEADERS ── */
.category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 48px 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.category-header:first-child { margin-top: 0; }

.category-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 56px; height: 1px;
  background: var(--accent);
  box-shadow: none;
}

.category-icon { font-size: 1.1rem; }

.category-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.category-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  margin-top: 2px;
}

.category-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── TOOL CARDS ── */
.tool-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  position: relative;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), rgba(34,211,238,0.3));
  opacity: 0.45;
  transition: opacity 0.25s;
  border-radius: 8px 0 0 8px;
}

.tool-card:hover {
  border-color: rgba(34,211,238,0.16);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(34,211,238,0.05);
  transform: translateY(-1px);
}

.tool-card:hover::before { opacity: 1; }

.tool-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 26px 0;
}

.tool-icon { font-size: 1.4rem; line-height: 1; }

.tool-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
}

.tool-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 3px;
  font-family: var(--font-display);
}

.tool-body { padding: 18px 26px 26px; }

/* ── INPUTS ── */
.text-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 10px 14px;
  width: 100%;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}

.text-input:focus {
  border-color: rgba(34,211,238,0.38);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.07);
}

.textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 12px 14px;
  width: 100%;
  min-height: 100px;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.textarea.tall { min-height: 130px; }

.textarea:focus {
  border-color: rgba(34,211,238,0.38);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.07);
}

.input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input-row .text-input { flex: 1; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent);
  color: #051217;
  border: none;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 22px;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.18s ease;
  letter-spacing: 0.01em;
  text-transform: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::before { display: none; }

.btn-primary:hover {
  background: #38e8f8;
  box-shadow: 0 4px 18px rgba(34,211,238,0.28);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); box-shadow: none; }

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  letter-spacing: 0.01em;
  text-transform: none;
}

.copy-btn:hover {
  border-color: rgba(34,211,238,0.28);
  color: var(--accent);
  background: rgba(34,211,238,0.06);
}

/* ── OUTPUT BOX ── */
.output-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 12px;
  min-height: 46px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  word-break: break-all;
  flex: 1;
}

.small { font-size: 0.78rem; }

/* ── OPTIONS ROW ── */
.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  align-items: center;
}

.options-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.options-row input[type="checkbox"] { accent-color: var(--accent); }
.options-row input[type="range"]    { accent-color: var(--accent); width: 100px; }

/* ── STRENGTH BAR ── */
.strength-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.strength-bar {
  height: 3px;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
  box-shadow: none;
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  margin-bottom: -1px;
  transition: all 0.18s;
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: none;
}

.tab:hover:not(.active) { color: var(--text); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── RESULTS ── */
.result-box {
  margin-top: 12px;
  padding: 12px 16px;
  border-left: 3px solid var(--border);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg3);
}

.result-box.safe    { border-left-color: var(--green);  color: var(--green);  background: rgba(16,185,129,0.05); }
.result-box.danger  { border-left-color: var(--red);    color: var(--red);    background: rgba(244,63,94,0.05); }
.result-box.warning { border-left-color: var(--yellow); color: var(--yellow); background: rgba(245,158,11,0.05); }

.result-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.83rem;
  background: var(--bg3);
  transition: border-color 0.18s;
}

.result-item.pass { border-left: 3px solid var(--green); }
.result-item.fail { border-left: 3px solid var(--red); }
.result-item.warn { border-left: 3px solid var(--yellow); }

.result-item .label {
  font-weight: 600;
  min-width: 200px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.result-item .detail { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.78rem; }

/* ── CODE OUTPUT ── */
.code-output {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  border-left: 3px solid rgba(34,211,238,0.35);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow-x: auto;
  margin-top: 12px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── CSP GRID ── */
.csp-grid { display: flex; flex-direction: column; gap: 10px; }

.csp-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 12px;
}

.csp-row label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-align: right;
  letter-spacing: 0.01em;
}

/* ── MISC ── */
.hidden { display: none !important; }
.mt { margin-top: 12px; }

.tool-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
  font-family: var(--font-display);
}

.tool-note a { color: var(--accent); text-decoration: none; }

/* ── AD SLOT ── */
.ad-slot {
  text-align: center;
  padding: 20px 0;
  min-height: 90px;
  background: var(--bg2);
  border: 1px dashed rgba(255,255,255,0.05);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent);
  color: #051217;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 10px 20px;
  font-size: 0.82rem;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.22s ease;
  pointer-events: none;
  z-index: 999;
  clip-path: none;
  box-shadow: 0 4px 20px rgba(34,211,238,0.22);
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ── DONATION SECTION ── */
.donation-section { padding: 40px 0 20px; }

.donation-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.donation-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.22), transparent);
}

.donation-left { display: flex; gap: 20px; align-items: flex-start; flex: 1; }
.donation-icon { font-size: 2rem; line-height: 1; }

.donation-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 8px;
  color: var(--text);
}

.donation-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-display);
  max-width: 380px;
  line-height: 1.65;
  margin-bottom: 14px;
}

.donation-perks { display: flex; gap: 8px; flex-wrap: wrap; }

.perk {
  background: rgba(34,211,238,0.07);
  border: 1px solid rgba(34,211,238,0.16);
  color: var(--accent);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.donation-right { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.donation-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  text-transform: none;
  border-radius: 7px;
}

.donation-btn.paypal {
  background: #0070e0;
  color: #fff;
  border: 1px solid rgba(0,112,224,0.4);
}

.donation-btn.paypal:hover {
  background: #1a85f5;
  box-shadow: 0 4px 20px rgba(0,112,224,0.3);
  transform: translateY(-1px);
}

.donation-note { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-display); }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-display);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.35), transparent);
}

.footer-links { margin-top: 8px; }
.footer-links a { color: var(--text-muted); text-decoration: none; margin: 0 6px; transition: color 0.18s; }
.footer-links a:hover { color: var(--accent); }

/* ── ANIMATIONS ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .tool-header { flex-direction: column; gap: 8px; }
  .csp-row { grid-template-columns: 1fr; }
  .csp-row label { text-align: left; }
  .input-row { flex-direction: column; }
  .nav a { font-size: 0.75rem; padding: 5px 8px; }
  .donation-card { padding: 20px; }
  .donation-left { flex-direction: column; gap: 10px; }
  .hero-title { letter-spacing: -0.02em; }
}
/* ═══════════════════════════════════════════
   HexScan — Loading States & Micro-interactions
   Pegar al final del style.css
   ═══════════════════════════════════════════ */

/* ── Spinner ── */
.hx-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(34,211,238,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: hxSpin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes hxSpin {
  to { transform: rotate(360deg); }
}

/* ── Progress bar ── */
.hx-progress-track {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.hx-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}

.hx-progress-bar.hx-indeterminate {
  width: 40%;
  animation: hxIndeterminate 1.4s ease-in-out infinite;
}

@keyframes hxIndeterminate {
  0%   { transform: translateX(-100%); width: 40%; }
  50%  { width: 60%; }
  100% { transform: translateX(280%); width: 40%; }
}

/* ── Skeleton rows ── */
.hx-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: hxShimmer 1.6s ease-in-out infinite;
  border-radius: 3px;
}

@keyframes hxShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.hx-skeleton-row {
  border-left: 3px solid rgba(255,255,255,0.05) !important;
  pointer-events: none;
}

/* ── Input shake ── */
@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ── Copy btn feedback ── */
.copy-btn.copied {
  border-color: rgba(16,185,129,0.4);
  color: var(--green);
  background: rgba(16,185,129,0.07);
}
/* Soporte para Heroicons en Tool Cards */
.tool-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent); /* Usa tu variable de cyan #22d3ee */
  display: block;
}

/* Ajuste opcional para el contenedor del icono */
.tool-header .tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
}
