/* ============================================================
   SECURE PASSWORD GENERATOR — Custom Styles
   ecn-apps.com  |  dark neon theme
   ============================================================ */

/* ── Page Layout ─────────────────────────────────────────── */
.page {
  --section-padding-top: 2.25rem;
  padding: var(--section-padding-top) 1rem;
  min-height: calc(100vh - 200px);
}

/* ── Security Notice ──────────────────────────────────────── */
.pg-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: rgba(57, 255, 20, 0.05);
  border: 1px solid rgba(57, 255, 20, 0.28);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  color: rgba(232, 233, 243, 0.85);
  margin: 1.75rem 0;
  line-height: 1.6;
}

.pg-notice__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

.pg-notice strong { color: #39ff14; }

.pg-notice code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.82em;
  background: rgba(255,255,255,0.07);
  padding: 0.1em 0.38em;
  border-radius: 4px;
  color: #00f0ff;
}

.pg-notice__link {
  color: #00f0ff;
  text-decoration: none;
  font-size: 0.83rem;
  margin-left: 0.3rem;
}
.pg-notice__link:hover { text-decoration: underline; }

/* ── Generator Card ───────────────────────────────────────── */
.pg-card {
  background: rgba(5, 12, 24, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  backdrop-filter: blur(18px);
  margin-bottom: 2rem;
}

/* ── Output Row ───────────────────────────────────────────── */
.pg-output-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pg-output {
  flex: 1;
  min-width: 0;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: clamp(0.9rem, 2.2vw, 1.25rem);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  color: #e8e9f3;
  word-break: break-all;
  min-height: 3rem;
  display: flex;
  align-items: center;
  letter-spacing: 0.04em;
  transition: border-color 0.2s;
}

.pg-output:focus-within,
.pg-output:hover {
  border-color: rgba(0, 240, 255, 0.38);
}

.pg-copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(0, 240, 255, 0.09);
  border: 1px solid rgba(0, 240, 255, 0.32);
  color: #00f0ff;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.pg-copy-btn svg {
  width: 14px;
  height: 14px;
}

.pg-copy-btn:hover {
  background: rgba(0, 240, 255, 0.16);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.14);
}

.pg-copy-btn.copied {
  color: #39ff14;
  border-color: rgba(57, 255, 20, 0.38);
  background: rgba(57, 255, 20, 0.08);
}

/* ── Strength Bar ─────────────────────────────────────────── */
.pg-strength-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pg-strength-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}

.pg-strength-fill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 0.35s ease, background 0.35s ease;
}

.pg-strength-fill.s-weak    { background: #ff4c4c; }
.pg-strength-fill.s-fair    { background: #ffc800; }
.pg-strength-fill.s-good    { background: #39c7ff; }
.pg-strength-fill.s-strong  { background: #39ff14; }
.pg-strength-fill.s-max     { background: linear-gradient(90deg, #39ff14, #00f0ff); }

.pg-strength-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  width: 6rem;
  flex-shrink: 0;
  text-align: right;
}

.pg-strength-label.s-weak   { color: #ff4c4c; }
.pg-strength-label.s-fair   { color: #ffc800; }
.pg-strength-label.s-good   { color: #39c7ff; }
.pg-strength-label.s-strong { color: #39ff14; }
.pg-strength-label.s-max    { color: #00f0ff; }

.pg-entropy-label {
  font-size: 0.75rem;
  color: rgba(168, 170, 190, 0.55);
  flex-shrink: 0;
}

/* ── Controls ─────────────────────────────────────────────── */
.pg-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
  margin-bottom: 1.5rem;
}

.pg-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pg-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(232, 233, 243, 0.7);
  letter-spacing: 0.02em;
}

.pg-value-badge {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  min-width: 2.5rem;
  text-align: center;
}

/* Range slider */
.pg-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(0, 240, 255, 0.18);
  outline: none;
  cursor: pointer;
  accent-color: #00f0ff;
}

.pg-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.pg-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.75);
}

.pg-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00f0ff;
  border: none;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
  cursor: pointer;
}

.pg-range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(168, 170, 190, 0.4);
  margin-top: -0.1rem;
}

/* Checkboxes */
.pg-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pg-checkbox {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.855rem;
  color: rgba(232, 233, 243, 0.78);
  cursor: pointer;
  user-select: none;
}

.pg-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #39ff14;
  cursor: pointer;
  flex-shrink: 0;
}

.pg-charset-preview {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.75rem;
  color: rgba(0, 240, 255, 0.55);
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
}

/* ── Generate Button ──────────────────────────────────────── */
.pg-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.pg-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 2rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.42);
  color: #39ff14;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.pg-generate-btn svg {
  width: 15px;
  height: 15px;
}

.pg-generate-btn:hover {
  background: rgba(57, 255, 20, 0.18);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.18);
  transform: translateY(-1px);
}

.pg-generate-btn:active {
  transform: translateY(0);
}

/* ── Bulk Generator ───────────────────────────────────────── */
.pg-bulk-details {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1rem;
  margin-top: 0.25rem;
}

.pg-bulk-summary {
  font-size: 0.82rem;
  color: rgba(168, 170, 190, 0.65);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
  transition: color 0.2s;
}

.pg-bulk-summary::-webkit-details-marker { display: none; }

.pg-bulk-summary::before {
  content: '▸';
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.pg-bulk-details[open] .pg-bulk-summary::before {
  transform: rotate(90deg);
}

.pg-bulk-summary:hover {
  color: rgba(0, 240, 255, 0.8);
}

.pg-bulk-body {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pg-bulk-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.pg-bulk-input {
  width: 5rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 7px;
  color: #e8e9f3;
  font-size: 0.875rem;
  padding: 0.3rem 0.6rem;
  outline: none;
  text-align: center;
  transition: border-color 0.2s;
}

.pg-bulk-input:focus {
  border-color: #00f0ff;
}

.pg-btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(57, 255, 20, 0.09);
  border: 1px solid rgba(57, 255, 20, 0.32);
  color: #39ff14;
  transition: background 0.2s;
}

.pg-btn-sm:hover {
  background: rgba(57, 255, 20, 0.16);
}

.pg-btn-sm--ghost {
  background: transparent;
  border-color: rgba(168, 170, 190, 0.22);
  color: rgba(168, 170, 190, 0.7);
}

.pg-btn-sm--ghost:hover {
  background: rgba(168, 170, 190, 0.07);
  color: #c8cadc;
}

.pg-bulk-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 340px;
  overflow-y: auto;
}

.pg-bulk-list li {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.8rem;
  color: rgba(232, 233, 243, 0.72);
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.pg-bulk-list li::before {
  content: attr(data-n);
  color: rgba(0, 240, 255, 0.35);
  font-size: 0.7rem;
  min-width: 1.2rem;
  flex-shrink: 0;
}

/* ── FAQ Section ──────────────────────────────────────────── */
.faq-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(57, 255, 20, 0.14);
  margin-bottom: 2rem;
  scroll-margin-top: 72px;
}

.faq-title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: #fff;
}

.faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: rgba(5, 12, 24, 0.75);
  border: 1px solid rgba(57, 255, 20, 0.11);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease, background 0.3s ease;
  backdrop-filter: blur(12px);
}

.faq-item:hover {
  border-color: rgba(57, 255, 20, 0.32);
  background: rgba(57, 255, 20, 0.025);
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #39ff14;
}

.faq-answer {
  font-size: 0.9375rem;
  line-height: 1.72;
  color: rgba(232, 233, 243, 0.7);
  margin: 0;
}

.faq-answer strong { color: rgba(232, 233, 243, 0.9); }

.faq-answer code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.82em;
  background: rgba(255,255,255,0.07);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  color: #39ff14;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 680px) {
  .pg-card {
    padding: 1.25rem 1rem;
  }

  .pg-controls {
    grid-template-columns: 1fr;
  }

  .pg-output {
    font-size: 0.82rem;
  }

  .pg-strength-label {
    width: auto;
  }
}

@media (max-width: 420px) {
  .pg-output-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pg-copy-btn {
    justify-content: center;
  }

  .pg-bulk-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
