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

body {
  background: #f3f4f6;
  color: #111827;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.nav { margin-bottom: 20px; }
.nav a {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.nav a:hover { color: #111827; }

.header { margin-bottom: 28px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e5f2ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.logo-wordmark { font-weight: 700; letter-spacing: -0.06em; }

h1 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.subtitle { color: #6b7280; font-size: 0.95rem; max-width: 560px; }

.ad-banner-top { margin-bottom: 24px; min-height: 20px; }

/* Tool wrapper */
.tool-wrapper { max-width: 560px; margin: 0 auto; }

.tool-section {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 28px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.04);
}

/* Password output */
.password-output-wrap {
  position: relative;
  margin-bottom: 12px;
}

.password-display {
  width: 100%;
  padding: 14px 48px 14px 14px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #111827;
  word-break: break-all;
  min-height: 56px;
  line-height: 1.4;
  resize: none;
  cursor: default;
  transition: border-color 0.15s;
}

.password-display:focus {
  outline: none;
  border-color: #1d4ed8;
}

.btn-copy-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy-pw:hover { color: #1d4ed8; background: #f0f4ff; }

/* Strength meter */
.strength-bar-wrap {
  height: 4px;
  background: #f3f4f6;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}

.strength-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0%;
}

.strength-label {
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 20px;
}

/* Options */
.options-section {
  border-top: 1px solid #f3f4f6;
  padding-top: 20px;
}

.option-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 14px;
}

.length-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.length-slider {
  flex: 1;
  accent-color: #1d4ed8;
  cursor: pointer;
  height: 4px;
}

.length-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  min-width: 80px;
  white-space: nowrap;
}

.checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1d4ed8;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-row input[type="checkbox"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.checkbox-row span {
  font-size: 0.875rem;
  color: #374151;
}

.btn-generate {
  width: 100%;
  padding: 11px;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-generate:hover { background: #1e40af; }

.bulk-toggle {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 0.8rem;
  color: #6b7280;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
  padding: 4px 0;
  transition: color 0.15s;
}

.bulk-toggle:hover { color: #374151; }

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

.bulk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: #374151;
}

.bulk-item span {
  flex: 1;
  word-break: break-all;
}

.bulk-copy {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.bulk-copy:hover { color: #1d4ed8; background: #f0f4ff; }

/* FAQ */
.faq { margin-top: 40px; }
.faq-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.faq-question {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  color: #111827;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; color: #6b7280; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
details[open] > .faq-question::after { content: '−'; }
.faq-answer {
  padding: 12px 16px 14px;
  border-top: 1px solid #f3f4f6;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.6;
}
.faq-answer p { margin-bottom: 8px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer code {
  font-family: 'Courier New', monospace;
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.85em;
}

/* Related tools */
.related-tools { margin-top: 32px; }
.related-title { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.related-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s;
}
.related-card:hover { border-color: #1d4ed8; }
.related-name { font-size: 0.875rem; font-weight: 500; color: #111827; }
.related-desc { font-size: 0.78rem; color: #6b7280; }

/* Bottom ad + footer */
.ad-banner-bottom { text-align: center; padding: 24px 0 0; overflow: hidden; }

.footer {
  margin-top: 32px;
  text-align: center;
  font-size: 0.78rem;
  color: #9ca3af;
}
.footer a { color: #6b7280; text-decoration: none; }
.footer a:hover { color: #111827; }

@media (max-width: 480px) {
  .page { padding: 16px 16px 60px; }
  .tool-section { padding: 20px 16px; }
}
