/* ============================================
   Password Generator — Page Styles
   Theme: Neon Green (#22C55E)
   ============================================ */

:root {
  --accent: #22C55E;
  --accent-dim: rgba(34, 197, 94, 0.15);
  --accent-glow: rgba(34, 197, 94, 0.3);
}

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

/* --- Password Display --- */
.password-display { position: relative; }

.password-output {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  overflow-x: auto;
}

.password-text {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--accent);
  word-break: break-all;
  line-height: 1.4;
  flex: 1;
  user-select: all;
}

.password-actions {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}

.copy-feedback {
  position: absolute;
  top: var(--space-3);
  right: var(--space-5);
  background: var(--accent);
  color: var(--bg-primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s var(--ease-out);
  pointer-events: none;
}

.copy-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

/* --- Strength Meter --- */
.strength-meter {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.strength-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-out), background 0.5s;
}

.strength-fill.weak { width: 25%; background: #EF4444; }
.strength-fill.fair { width: 50%; background: #F59E0B; }
.strength-fill.strong { width: 75%; background: #22C55E; }
.strength-fill.uncrackable { width: 100%; background: linear-gradient(90deg, #22C55E, #06B6D4); }

.strength-info {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
}

.strength-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.strength-label.weak { color: #EF4444; }
.strength-label.fair { color: #F59E0B; }
.strength-label.strong { color: #22C55E; }
.strength-label.uncrackable { color: #06B6D4; }

.strength-time {
  color: var(--text-muted);
}

/* --- Mode Toggle --- */
.mode-toggle {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}

.mode-btn {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.mode-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.mode-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* --- Settings --- */
.setting-row {
  margin-bottom: var(--space-5);
}

.range-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  outline: none;
  margin-top: var(--space-2);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-dim);
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* --- Checkbox Items --- */
.charset-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

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

.checkbox-display {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-medium);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
  flex-shrink: 0;
}

.checkbox-item input:checked + .checkbox-display {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-item input:checked + .checkbox-display::after {
  content: '✓';
  color: var(--bg-primary);
  font-size: 12px;
  font-weight: 700;
}

.generate-btn {
  width: 100%;
  margin-top: var(--space-3);
}

/* --- Bulk Section --- */
.bulk-section { margin-top: var(--space-5); }

.bulk-header {
  margin-bottom: var(--space-4);
}

.bulk-header h2 { font-size: var(--text-xl); margin-bottom: var(--space-1); }
.bulk-desc { color: var(--text-secondary); font-size: var(--text-sm); }

.bulk-controls {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.bulk-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.bulk-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.bulk-item-num {
  color: var(--text-muted);
  font-size: var(--text-xs);
  min-width: 24px;
}

.bulk-item-text {
  flex: 1;
  word-break: break-all;
  user-select: all;
}

.bulk-item-copy {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);
  opacity: 0.5;
  transition: opacity var(--duration-fast);
}

.bulk-item-copy:hover { opacity: 1; }

/* --- Sidebar --- */
.sidebar-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
}

.security-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.security-list li::before {
  content: '✓ ';
  color: var(--accent);
  font-weight: 700;
}

.password-history {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 300px;
  overflow-y: auto;
}

.history-empty {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-style: italic;
}

.history-item {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  padding: var(--space-2);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  word-break: break-all;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.history-item:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* --- Passphrase Settings --- */
.passphrase-settings {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.passphrase-settings .form-group {
  max-width: 300px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .password-text { font-size: var(--text-base); }
  .bulk-controls { flex-direction: column; align-items: stretch; }
}
