/* Cyberpunk Terminal Style - Password Strength Analyzer */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg: #080c10;
  --surface: #0d1117;
  --surface2: #131920;
  --border: #1e2d3d;
  --accent: #1e6fff;    /* Neon Blue */
  --accent2: #00e5ff;   /* Neon Cyan */
  --accent3: #39ff14;   /* Neon Green */
  --warn: #ff9500;      /* Warning Orange */
  --danger: #ff3b30;    /* Alert Red */
  
  --text: #e6edf3;
  --text-muted: #6e7f8d;
  --text-dim: #3d5166;
  
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius: 4px;
  
  /* Glowing Shadows */
  --glow-accent: 0 0 20px rgba(30, 111, 255, 0.25);
  --glow-green: 0 0 20px rgba(57, 255, 20, 0.25);
  --glow-red: 0 0 20px rgba(255, 59, 48, 0.25);
  --glow-warn: 0 0 20px rgba(255, 149, 0, 0.25);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 40px;
}

/* Background Cyber Grid Lines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 111, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 111, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Background Radian Glow */
body::after {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(30, 111, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Background Tech Animated Canvas UI Overlay */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  opacity: 0.35;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  z-index: 1;
}

@media (min-width: 992px) {
  .container {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* Header */
header {
  text-align: center;
  margin-bottom: 40px;
  grid-column: 1 / -1;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent2);
  border: 1px solid var(--accent2);
  padding: 4px 14px;
  border-radius: 2px;
  margin-bottom: 20px;
  background: rgba(0, 229, 255, 0.05);
  font-family: var(--font-mono);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  animation: blink 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text);
}

header h1 span {
  color: var(--accent);
  position: relative;
}

header h1 span::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: var(--glow-accent);
}

.subtitle {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Card layout */
.card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--accent);
}

.card-header {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.card-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-left: 4px;
}

.ml-auto {
  margin-left: auto;
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.helper-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Form Inputs */
.input-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.input-group:focus-within {
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

.input-prefix {
  background: var(--surface2);
  border-right: 1px solid var(--border);
  padding: 0 14px;
  display: flex;
  align-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 14px 44px 14px 16px; /* Extra right padding for toggle button */
  min-width: 0;
}

.input-field::placeholder {
  color: var(--text-dim);
}

.toggle-password-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-password-btn:hover {
  color: var(--text-muted);
}

/* Option Chips (Tag Style checkboxes) */
.options-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.check-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  user-select: none;
}

.check-chip input[type="checkbox"] {
  display: none;
}

.check-chip.met {
  border-color: var(--accent3);
  color: var(--accent3);
  background: rgba(57, 255, 20, 0.06);
}

.check-chip.unmet {
  border-color: var(--border);
  color: var(--text-muted);
  background: var(--surface2);
}

.check-chip.warning {
  border-color: var(--warn);
  color: var(--warn);
  background: rgba(255, 149, 0, 0.06);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
  transition: background 0.2s;
}

.check-chip.met .chip-dot {
  background: var(--accent3);
  border-color: var(--accent3);
}

.check-chip.warning .chip-dot {
  background: var(--warn);
  border-color: var(--warn);
}

/* Progress Bar */
.progress-wrap {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 1px;
  transition: width 0.35s ease;
  box-shadow: 0 0 8px var(--accent);
}

/* Terminal System logs */
.terminal {
  background: #050709;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.terminal-bar {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-inner {
  padding: 14px 16px;
  min-height: 130px;
  max-height: 210px;
  overflow-y: auto;
  font-family: var(--font-mono);
}

.terminal-inner::-webkit-scrollbar {
  width: 4px;
}
.terminal-inner::-webkit-scrollbar-track {
  background: transparent;
}
.terminal-inner::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.log-line {
  display: flex;
  gap: 10px;
  margin-bottom: 3px;
  font-size: 12px;
  line-height: 1.6;
  flex-wrap: wrap;
}

.log-ts {
  color: var(--text-dim);
  flex-shrink: 0;
  font-size: 11px;
}

.c-info   { color: var(--text-muted); }
.c-ok     { color: var(--accent3); }
.c-warn   { color: var(--warn); }
.c-danger { color: var(--danger); }
.c-accent { color: var(--accent2); }

.cursor {
  display: inline-block;
  width: 8px;
  height: 13px;
  background: var(--accent2);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

/* Result Panel Dashboard */
.result-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeUp 0.4s ease both;
  display: flex;
  flex-direction: column;
}

.result-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: rgba(30, 111, 255, 0.04);
}

.result-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.result-score {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}

.result-body {
  padding: 16px 20px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.stat-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.stat-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 13px;
  font-weight: 700;
}

/* Brute Force Durations styles */
.brute-force-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #050709;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.grid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(30, 45, 61, 0.5);
}

.grid-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.grid-row .attacker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.grid-row .attacker svg {
  color: var(--text-dim);
  flex-shrink: 0;
}

.grid-row .time {
  font-weight: 700;
  color: var(--text);
}

/* Suggestion Result Panel (Generator) */
.suggestion-panel {
  background: #050709;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.suggestion-text {
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
  user-select: all;
  color: var(--accent2);
}

.btn-copy {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy:hover {
  color: var(--text-muted);
  transform: scale(1.08);
}

/* Length Slider (Generator) */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.slider-header span.length-val {
  font-weight: 700;
  color: var(--text);
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s, background-color 0.2s;
  border: 1.5px solid var(--bg);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: var(--accent2);
}

/* Buttons */
.btn-container {
  display: flex;
  gap: 8px;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: #2979ff;
  box-shadow: var(--glow-accent);
}

.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-secondary:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--text-muted);
}

/* Mock Database Sandbox */
.db-badge {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.15);
  color: var(--accent2);
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  align-self: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.small-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(8, 12, 16, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease;
}

.small-input:focus {
  border-color: var(--accent);
}

.history-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.history-item span.hash {
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(150%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
  border-color: var(--accent);
}

/* Educational Hub section */
.edu-hub {
  grid-column: 1 / -1;
  margin-top: 16px;
}

.edu-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.edu-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.2s ease;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.edu-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.edu-tab.active {
  color: var(--accent2);
  border-bottom-color: var(--accent);
  background: rgba(30, 111, 255, 0.03);
}

.edu-content-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  animation: fadeIn 0.3s ease;
}

.edu-content-panel.active {
  display: flex;
}

.edu-content-panel h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.edu-content-panel p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
}

.edu-formula {
  background: #050709;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent2);
  text-align: center;
  margin: 8px 0;
}

.edu-list {
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.edu-list li strong {
  color: var(--text);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Dynamic State colors for javascript bindings */
.text-weak { color: var(--danger) !important; }
.text-fair { color: var(--warn) !important; }
.text-good { color: #ffd60a !important; } /* Soft warning yellow */
.text-strong { color: var(--accent) !important; }
.text-excellent { color: var(--accent3) !important; }

/* Verdict Color Classes on Result Panel */
.status-weak .result-header { background: rgba(255, 59, 48, 0.04); }
.status-weak .result-title, .status-weak .result-score { color: var(--danger); }

.status-fair .result-header { background: rgba(255, 149, 0, 0.04); }
.status-fair .result-title, .status-fair .result-score { color: var(--warn); }

.status-good .result-header { background: rgba(255, 214, 10, 0.04); }
.status-good .result-title, .status-good .result-score { color: #ffd60a; }

.status-strong .result-header { background: rgba(30, 111, 255, 0.04); }
.status-strong .result-title, .status-strong .result-score { color: var(--accent); }

.status-excellent .result-header { background: rgba(57, 255, 20, 0.04); }
.status-excellent .result-title, .status-excellent .result-score { color: var(--accent3); }

/* Custom Page Footer styled exactly like the model */
.page-footer {
  margin-top: 48px;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.page-footer a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.2s;
  font-weight: 700;
}

.page-footer a:hover {
  color: var(--accent2);
}
