/* =============================================
   CYBERLAB - Password Analyzer
   Archivo: analyzer.css
   Descripcion: Estilos especificos del modulo
   Nota: Este archivo se usa junto a style.css
   ============================================= */


/* =============================================
   BREADCRUMB
   ============================================= */

.breadcrumb {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 48px;
  padding-right: 48px;
  padding-top: 24px;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.breadcrumb a {
  color: #414d6b;
  transition: color 0.18s;
}

.breadcrumb a:hover {
  color: #3ed8e0;
}

.breadcrumb-sep {
  color: #272f45;
}

.breadcrumb-current {
  color: #7a85a3;
}


/* =============================================
   HERO DEL MODULO
   ============================================= */

#module-hero {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 48px;
  padding-right: 48px;
  padding-top: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid #1e2435;
}

.module-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #161b24;
  border: 1px solid #2a3148;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #414d6b;
  margin-bottom: 28px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #34d874;
  box-shadow: 0 0 6px rgba(52, 216, 116, 0.7);
  animation: pulse 2.4s ease infinite;
}

@keyframes pulse {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.6; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

#module-hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  max-width: 600px;
}

.module-desc {
  font-size: 0.85rem;
  color: #7a85a3;
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 36px;
}

/* Metadatos del modulo */
.module-meta {
  display: flex;
  align-items: center;
  gap: 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #414d6b;
}

.meta-value {
  font-size: 0.78rem;
  color: #dde3f0;
  font-weight: 500;
}

.meta-divider {
  width: 1px;
  height: 32px;
  background-color: #1e2435;
}


/* =============================================
   LAYOUT DE DOS COLUMNAS
   ============================================= */

.analyzer-layout {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 48px;
  padding-right: 48px;
  padding-top: 48px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.analyzer-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}


/* =============================================
   TOOL CARDS (cards de herramientas)
   ============================================= */

.tool-card {
  background-color: #10131a;
  border: 1px solid #1e2435;
  border-radius: 24px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: border-color 0.32s, box-shadow 0.32s;
}

.tool-card:focus-within {
  border-color: rgba(62, 216, 224, 0.25);
  box-shadow: 0 0 14px rgba(62, 216, 224, 0.08);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-tag {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #414d6b;
}

.card-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #34d874;
  box-shadow: 0 0 6px rgba(52, 216, 116, 0.7);
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #dde3f0;
  margin-top: -8px;
}


/* =============================================
   INPUT DE CONTRASENA
   ============================================= */

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #414d6b;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  background-color: #161b24;
  border: 1px solid #2a3148;
  border-radius: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
  padding-left: 18px;
  padding-right: 52px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: #dde3f0;
  outline: none;
  letter-spacing: 0.06em;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.input-wrap input::placeholder {
  color: #272f45;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.input-wrap input:focus {
  border-color: rgba(62, 216, 224, 0.4);
  box-shadow: 0 0 0 3px rgba(62, 216, 224, 0.06), 0 0 14px rgba(62, 216, 224, 0.12);
}

.btn-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #414d6b;
  font-size: 1rem;
  padding: 4px;
  transition: color 0.18s;
}

.btn-eye:hover {
  color: #3ed8e0;
}

.input-hint {
  font-size: 0.68rem;
  color: #414d6b;
  line-height: 1.6;
}


/* =============================================
   BARRA DE FORTALEZA
   ============================================= */

.strength-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.strength-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.strength-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #414d6b;
}

.strength-value {
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #414d6b;
  transition: color 0.3s;
}

.strength-track {
  height: 4px;
  background-color: #161b24;
  border-radius: 999px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background-color: #414d6b;
  transition: width 0.5s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}


/* =============================================
   CHECKLIST DE CRITERIOS
   ============================================= */

.checks-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #161b24;
  border: 1px solid #1e2435;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.72rem;
  color: #414d6b;
  transition: border-color 0.3s, color 0.3s;
}

.check-item.ok {
  border-color: rgba(52, 216, 116, 0.25);
  color: #34d874;
}

.check-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #272f45;
  flex-shrink: 0;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.check-item.ok .check-dot {
  background-color: #34d874;
  box-shadow: 0 0 6px rgba(52, 216, 116, 0.6);
}


/* =============================================
   METRICAS (entropia y crack time)
   ============================================= */

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: #161b24;
  border: 1px solid #1e2435;
  border-radius: 10px;
  padding: 14px 16px;
}

.metric-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.metric-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metric-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #414d6b;
}

.metric-value {
  font-size: 0.88rem;
  color: #dde3f0;
  font-weight: 500;
  letter-spacing: 0.02em;
}


/* =============================================
   ACCIONES DE CARD
   ============================================= */

.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* =============================================
   RESULTADO DE BRECHA
   ============================================= */

.breach-result {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.78rem;
  border: 1px solid transparent;
  line-height: 1.6;
}

.breach-result.visible {
  display: flex;
}

.breach-result.safe {
  background-color: rgba(52, 216, 116, 0.05);
  border-color: rgba(52, 216, 116, 0.25);
  color: #34d874;
}

.breach-result.pwned {
  background-color: rgba(224, 80, 80, 0.06);
  border-color: rgba(224, 80, 80, 0.3);
  color: #e05050;
}

.breach-result.loading {
  background-color: rgba(62, 216, 224, 0.04);
  border-color: rgba(62, 216, 224, 0.15);
  color: #7a85a3;
}

.breach-result.error {
  background-color: rgba(224, 160, 48, 0.05);
  border-color: rgba(224, 160, 48, 0.2);
  color: #e0a030;
}


/* =============================================
   GENERADOR - OUTPUT
   ============================================= */

.gen-output-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: #161b24;
  border: 1px solid #1e2435;
  border-radius: 12px;
  padding: 16px 20px;
  min-height: 56px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.gen-output-wrap.has-value {
  border-color: rgba(62, 216, 224, 0.25);
  box-shadow: 0 0 14px rgba(62, 216, 224, 0.08);
}

.gen-output {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: #414d6b;
  letter-spacing: 0.08em;
  word-break: break-all;
  flex: 1;
  line-height: 1.5;
}

.gen-output.has-value {
  color: #3ed8e0;
}

.btn-copy {
  background: none;
  border: 1px solid #2a3148;
  border-radius: 6px;
  cursor: pointer;
  color: #414d6b;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 6px 12px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  transition: color 0.18s, border-color 0.18s;
}

.btn-copy:hover {
  color: #3ed8e0;
  border-color: rgba(62, 216, 224, 0.3);
}


/* =============================================
   GENERADOR - CONTROL DE LONGITUD
   ============================================= */

.length-control {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.length-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #414d6b;
}

.length-label span {
  color: #3ed8e0;
  font-weight: 500;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background-color: #161b24;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #3ed8e0;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(62, 216, 224, 0.5);
  transition: box-shadow 0.18s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 12px rgba(62, 216, 224, 0.7);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #3ed8e0;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px rgba(62, 216, 224, 0.5);
}


/* =============================================
   GENERADOR - OPCIONES DE CARACTERES
   ============================================= */

.gen-options {
  border: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.options-legend {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #414d6b;
  margin-bottom: 12px;
  display: block;
  width: 100%;
}

.option-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: #7a85a3;
  cursor: pointer;
  user-select: none;
  padding: 10px 14px;
  background-color: #161b24;
  border: 1px solid #1e2435;
  border-radius: 8px;
  transition: border-color 0.18s, color 0.18s;
}

.option-toggle:hover {
  border-color: #2a3148;
  color: #dde3f0;
}

.option-toggle input[type="checkbox"] {
  display: none;
}

.toggle-box {
  width: 15px;
  height: 15px;
  border: 1px solid #2a3148;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.option-toggle input[type="checkbox"]:checked + .toggle-box {
  background-color: rgba(62, 216, 224, 0.15);
  border-color: #3ed8e0;
  box-shadow: 0 0 6px rgba(62, 216, 224, 0.3);
}

.option-toggle input[type="checkbox"]:checked + .toggle-box::after {
  content: '✓';
  font-size: 0.65rem;
  color: #3ed8e0;
}


/* =============================================
   SIDEBAR
   ============================================= */

.analyzer-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background-color: #10131a;
  border: 1px solid #1e2435;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #dde3f0;
  line-height: 1.3;
}

.sidebar-desc {
  font-size: 0.75rem;
  color: #7a85a3;
  line-height: 1.75;
}

.sidebar-desc strong {
  color: #dde3f0;
}


/* Tips */
.tip-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.73rem;
  color: #7a85a3;
  line-height: 1.6;
}

.tip-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.tip-item strong {
  color: #dde3f0;
}


/* Como funciona */
.how-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.how-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.72rem;
  color: #7a85a3;
  line-height: 1.6;
}

.how-number {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(62, 216, 224, 0.08);
  border: 1px solid rgba(62, 216, 224, 0.2);
  color: #3ed8e0;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}


/* Escala de fortaleza */
.scale-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scale-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scale-bar {
  height: 4px;
  border-radius: 999px;
  flex-shrink: 0;
  width: 48px;
}

.scale-bar--1 { background-color: #e05050; width: 16px; }
.scale-bar--2 { background-color: #e07030; width: 24px; }
.scale-bar--3 { background-color: #e0a030; width: 32px; }
.scale-bar--4 { background-color: #7ec85a; width: 40px; }
.scale-bar--5 { background-color: #34d874; width: 48px; }
.scale-bar--6 { background-color: #3ed8e0; width: 48px; box-shadow: 0 0 6px rgba(62, 216, 224, 0.5); }

.scale-label {
  font-size: 0.7rem;
  color: #7a85a3;
  letter-spacing: 0.04em;
}


/* =============================================
   TOAST
   ============================================= */

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background-color: #161b24;
  border: 1px solid rgba(62, 216, 224, 0.3);
  color: #3ed8e0;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  box-shadow: 0 0 14px rgba(62, 216, 224, 0.15);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}


/* =============================================
   FOOTER (simplificado para modulo)
   ============================================= */

#site-footer {
  border-top: 1px solid #1e2435;
  margin-top: 0;
}

.footer-bottom {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 48px;
  padding-right: 48px;
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.65rem;
  color: #272f45;
}

.footer-disclaimer {
  font-size: 0.65rem;
  color: #272f45;
}

.footer-disclaimer a {
  color: #414d6b;
  transition: color 0.18s;
}

.footer-disclaimer a:hover {
  color: #3ed8e0;
}


/* =============================================
   SCROLLBAR
   ============================================= */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background-color: #0b0d12;
}

::-webkit-scrollbar-thumb {
  background-color: #2a3148;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #364060;
}


/* =============================================
   SELECCION DE TEXTO
   ============================================= */

::selection {
  background-color: rgba(62, 216, 224, 0.18);
  color: #3ed8e0;
}


/* =============================================
   RESPONSIVE - TABLET
   ============================================= */

@media (max-width: 960px) {
  .analyzer-layout {
    grid-template-columns: 1fr;
  }

  .analyzer-sidebar {
    position: static;
  }

  .sidebar-card {
    max-width: 100%;
  }
}


/* =============================================
   RESPONSIVE - MOVIL
   ============================================= */

@media (max-width: 640px) {
  .breadcrumb {
    padding-left: 20px;
    padding-right: 20px;
  }

  #module-hero {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  #module-hero h1 {
    font-size: 2.2rem;
  }

  .module-meta {
    flex-wrap: wrap;
    gap: 16px;
  }

  .analyzer-layout {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 32px;
  }

  .tool-card {
    padding: 24px 20px;
  }

  .checks-list {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .gen-options {
    grid-template-columns: 1fr;
  }

  .card-actions {
    flex-direction: column;
  }

  .card-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-bottom {
    padding-left: 20px;
    padding-right: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    text-align: center;
  }
}