:root {
  color: #f4f6f8;
  background: #10151d;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #10151d;
  --surface: rgba(24, 31, 41, 0.88);
  --surface-light: #202a36;
  --border: rgba(214, 225, 236, 0.12);
  --muted: #8e9aa9;
  --accent: #d5f06e;
  --accent-dark: #25300d;
  --cyan: #81d9d1;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 90% 4%,
      rgba(129, 217, 209, 0.16),
      transparent 27rem
    ),
    radial-gradient(
      circle at 4% 43%,
      rgba(213, 240, 110, 0.08),
      transparent 24rem
    ),
    var(--background);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100% - 40px, 720px);
  margin: 0 auto;
  padding: 36px 0 34px;
}

.brand {
  display: inline-block;
  margin-bottom: 78px;
  color: #f4f6f8;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand span {
  color: var(--muted);
  font-weight: 500;
}

.eyebrow,
.card-kicker {
  margin: 0;
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin: 18px 0 18px;
  color: #fbfcfd;
  font-size: clamp(3.6rem, 14vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.1em;
  line-height: 0.85;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

.lead {
  margin-bottom: 48px;
  color: #b0bbc8;
  font-size: 1rem;
  line-height: 1.8;
}

.generator-card {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.card-heading h2 {
  margin: 9px 0 0;
  color: #f4f6f8;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(129, 217, 209, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.secure-badge span {
  font-size: 0.9rem;
}

.output-wrap {
  display: flex;
  gap: 10px;
  padding: 7px;
  border: 1px solid rgba(213, 240, 110, 0.22);
  border-radius: 16px;
  background: #111820;
}

#password-output {
  min-width: 0;
  flex: 1;
  padding: 12px 10px 12px 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1rem, 3.6vw, 1.35rem);
  letter-spacing: 0.02em;
}

.copy-button {
  min-width: 80px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: var(--surface-light);
  color: #f4f6f8;
  font-size: 0.78rem;
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: #2b3949;
}

.copy-button[data-copied="true"] {
  background: var(--accent);
  color: var(--accent-dark);
}

.strength {
  margin: 18px 2px 30px;
}

.strength-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.72rem;
}

.strength-meta span:first-child {
  color: #c7d0db;
}

.strength-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #2b3541;
}

.strength-track span {
  display: block;
  width: var(--strength, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f29c74, var(--accent));
  transition: width 180ms ease;
}

.settings {
  border-top: 1px solid var(--border);
}

.setting-row {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.setting-label,
.setting-label label,
.setting-label legend {
  color: #e4e9ee;
  font-size: 0.84rem;
  font-weight: 700;
}

.setting-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.setting-label output {
  min-width: 36px;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.85rem;
  text-align: right;
}

.length-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

#length-range {
  flex: 1;
  accent-color: var(--accent);
}

#length-number {
  width: 58px;
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: 0;
  background: #131a22;
  color: #f4f6f8;
  font-size: 0.84rem;
  text-align: center;
}

#length-number:focus-visible {
  border-color: var(--accent);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}

legend.setting-label {
  width: 100%;
  padding: 0;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: #dce3e9;
  font-size: 0.8rem;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.check-option:has(input:checked) {
  border-color: rgba(213, 240, 110, 0.38);
  background: rgba(213, 240, 110, 0.06);
}

.check-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-box {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #657281;
  border-radius: 5px;
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 900;
}

.check-option input:checked + .check-box {
  border-color: var(--accent);
  background: var(--accent);
}

.check-option input:focus-visible + .check-box {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.check-option small {
  margin-left: 3px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
}

.empty-message {
  margin: 14px 0 0;
  color: #f2a987;
  font-size: 0.78rem;
}

.generate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 28px;
  padding: 15px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 800;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.generate-button span {
  font-size: 1.1rem;
}

.generate-button:hover,
.generate-button:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.generate-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.8);
  opacity: 0.5;
  transform: none;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  color: #687585;
  font-size: 0.7rem;
}

.page-footer span:first-child {
  color: var(--cyan);
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 28px, 720px);
    padding-top: 24px;
  }

  .brand {
    margin-bottom: 62px;
  }

  h1 {
    font-size: clamp(3.3rem, 18vw, 5.5rem);
  }

  .lead {
    margin-bottom: 36px;
  }

  .card-heading {
    align-items: flex-end;
    flex-direction: column;
    gap: 14px;
  }

  .secure-badge {
    align-self: flex-start;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }
}
