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

:root {
  --blue:       #0066ff;
  --blue-dark:  #0052cc;
  --bg:         #f8fafc;
  --card:       #ffffff;
  --text:       #0f172a;
  --text-muted: #64748b;
  --border:     #e2e8f0;
  --green:      #059669;
  --header-bg:  #0f172a;
  --r:          12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  font-size: 15px;
}

.site-header {
  background: var(--header-bg);
  padding: 0.875rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.07);
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo img { display: block; height: 38px; }
.header-back {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.header-back:hover { color: #fff; }

.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
}
.hero-inner { max-width: 600px; margin: 0 auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.hero p { color: rgba(255,255,255,0.72); font-size: 1rem; max-width: 480px; margin: 0 auto; }

.tool-section {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem 3rem;
}

/* ── Options Card ── */
.options-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.options-card h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ── Slider ── */
.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.slider-label { font-size: 0.875rem; font-weight: 600; min-width: 6rem; }
.slider-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue);
  min-width: 2.5rem;
  text-align: right;
}
input[type="range"] {
  flex: 1;
  accent-color: var(--blue);
  height: 4px;
  cursor: pointer;
}

/* ── Checkboxes ── */
.cb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.cb-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.cb-item:has(input:checked) { border-color: var(--blue); background: #eff6ff; }
.cb-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}
.cb-item span { font-size: 0.875rem; font-weight: 600; }
.cb-item small { font-size: 0.75rem; color: var(--text-muted); display: block; }

/* ── Count row ── */
.count-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.count-row label { font-size: 0.875rem; font-weight: 600; }
.count-row select {
  padding: 0.45rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  background: var(--bg);
  outline: none;
  cursor: pointer;
}
.count-row select:focus { border-color: var(--blue); }

/* ── Generate button ── */
.generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
  margin-top: 1.25rem;
}
.generate-btn:hover { background: var(--blue-dark); }

/* ── Password output ── */
.pw-list { display: flex; flex-direction: column; gap: 0.75rem; }

.pw-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1rem;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

.pw-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.pw-value {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  word-break: break-all;
  color: var(--text);
}
.copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--card);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  white-space: nowrap;
}
.copy-btn:hover  { background: var(--blue); border-color: var(--blue); color: #fff; }
.copy-btn.copied { background: var(--green); border-color: var(--green); color: #fff; }

/* ── Strength bar ── */
.strength-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s, background 0.3s;
}
.strength-label {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 3.5rem;
  text-align: right;
}

/* ── Privacy note ── */
.privacy-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #166534;
}

/* ── Footer ── */
.site-footer {
  background: var(--header-bg);
  color: rgba(255,255,255,0.75);
  padding: 1.25rem 1.5rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; font-size: 0.82rem; }
.footer-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s;
}
.footer-cta:hover { background: var(--blue-dark); }
.footer-home {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}
.footer-home:hover { color: #fff; }

@media (max-width: 640px) {
  .hero { padding: 2rem 1rem; }
  .cb-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
