:root {
  --bg: #0f1724;
  --card: #0b1220;
  --muted: #9aa4b2;
  --accent: #7c3aed;
  --radius: 14px;
  --text: #e6eef6;
  font-family: 'Poppins', system-ui, sans-serif;
}

/* Light theme */
body.light {
  --bg: #f4f6fb;
  --card: #ffffff;
  --muted: #5c5f66;
  --text: #111827;
  --accent: #5b21b6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  transition: background 0.4s, color 0.4s;
}

.card {
  width: 100%;
  max-width: 760px;
  background: var(--card);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: 0 6px 30px rgba(2,6,23,0.4);
  transition: background 0.4s;
}

h1 { margin: 0 0 6px; font-size: 20px; }
p.lead { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: inherit;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}
body.light .theme-toggle { border: 1px solid #ddd; }

.controls {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  align-items: flex-start;
}
@media (max-width: 640px) {
  .controls { grid-template-columns: 1fr; }
}

.output {
  display: flex;
  gap: 8px;
  align-items: center;
}
.password-box {
  flex: 1;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  font-family: monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}
body.light .password-box {
  background: rgba(0,0,0,0.05);
}

.btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px 12px;
  border-radius: 10px;
  color: inherit;
  cursor: pointer;
  transition: background 0.3s;
}
.btn:hover { background: rgba(255,255,255,0.07); }
.btn.primary {
  background: linear-gradient(90deg, var(--accent), #5b21b6);
  border: none;
  color: white;
}
body.light .btn.primary {
  background: linear-gradient(90deg, #5b21b6, #8b5cf6);
}

.options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.option {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255,255,255,0.02);
  padding: 8px 10px;
  border-radius: 10px;
}
body.light .option {
  background: rgba(0,0,0,0.04);
}

.meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.strength {
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  text-align: center;
}
body.light .strength {
  background: rgba(0,0,0,0.05);
}

aside {
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.02);
  min-width: 160px;
}
aside h2 {
  font-size: 14px;
  margin: 0 0 8px;
}
aside ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

footer {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer a.small {
  color: var(--accent);
  text-decoration: none;
}
