:root {
  color-scheme: dark;
  --bg: #080b12;
  --card: rgba(20, 25, 36, 0.92);
  --surface: #0d111a;
  --border: #29303d;
  --muted: #939cab;
  --text: #f6f8fb;
  --accent: #71e6b5;
  --accent-dark: #081a14;
  --danger: #ff9a9a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(83, 139, 124, 0.17), transparent 35%),
    radial-gradient(circle at 10% 80%, rgba(63, 76, 117, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.page-shell {
  width: min(100% - 32px, 680px);
  margin: 0 auto;
  padding: 34px 0 28px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(113, 230, 181, 0.25);
  border-radius: 10px;
  background: rgba(113, 230, 181, 0.09);
  color: var(--accent);
}

.brand-icon svg {
  width: 21px;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #aeb6c3;
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(113, 230, 181, 0.09);
}

.generator-card {
  padding: clamp(24px, 6vw, 46px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(23, 29, 40, 0.97), rgba(14, 18, 27, 0.97));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), inset 0 1px rgba(255, 255, 255, 0.025);
}

.intro {
  text-align: center;
}

.eyebrow {
  margin: 0 0 9px !important;
  color: var(--accent) !important;
  font-size: 11px !important;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-size: clamp(27px, 6vw, 39px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.intro p {
  max-width: 450px;
  margin: 13px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.output-wrap {
  margin: 34px 0 32px;
  padding: 17px 17px 12px 21px;
  border: 1px solid #343d4d;
  border-radius: 15px;
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.output-wrap:focus-within,
.output-wrap.copied {
  border-color: rgba(113, 230, 181, 0.65);
  box-shadow: 0 0 0 3px rgba(113, 230, 181, 0.07);
}

.output-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

#passcode {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(23px, 6vw, 34px);
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  cursor: pointer;
  place-items: center;
  border: 1px solid #343c49;
  border-radius: 10px;
  background: #181e29;
  color: #bbc3ce;
  transition: 150ms ease;
}

.icon-button:hover {
  border-color: #526071;
  color: white;
  transform: translateY(-1px);
}

.icon-button:active {
  transform: translateY(0);
}

.icon-button svg {
  width: 20px;
}

.strength-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
}

.strength-track {
  height: 3px;
  flex: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #262d38;
}

.strength-track span {
  display: block;
  width: 70%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 250ms ease, background 250ms ease;
}

#strengthLabel {
  min-width: 52px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.setting-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.setting-heading label,
fieldset legend {
  color: #e9edf4;
  font-size: 13px;
  font-weight: 700;
}

.setting-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.length-value {
  display: grid;
  width: 44px;
  height: 36px;
  place-items: center;
  border: 1px solid #343c49;
  border-radius: 9px;
  background: #111620;
  color: var(--accent);
  font-family: monospace;
  font-size: 17px;
  font-weight: 700;
}

.range {
  width: 100%;
  height: 5px;
  margin: 0 0 31px;
  cursor: pointer;
  appearance: none;
  border-radius: 8px;
  outline: none;
  background: linear-gradient(to right, var(--accent) 20%, #313946 20%);
}

.range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 4px solid var(--accent);
  border-radius: 50%;
  background: #111820;
  box-shadow: 0 0 0 3px rgba(113, 230, 181, 0.09);
}

.range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 4px solid var(--accent);
  border-radius: 50%;
  background: #111820;
  box-shadow: 0 0 0 3px rgba(113, 230, 181, 0.09);
}

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

fieldset legend {
  margin-bottom: 13px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.option {
  position: relative;
  display: flex;
  min-width: 0;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid #2c3441;
  border-radius: 11px;
  background: rgba(13, 17, 26, 0.6);
  transition: border-color 150ms ease, background 150ms ease;
}

.option:hover {
  border-color: #465164;
  background: rgba(20, 25, 36, 0.8);
}

.option span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.option strong {
  overflow: hidden;
  color: #e7ebf1;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option small {
  overflow: hidden;
  color: #7e8898;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option i {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 31px;
  height: 18px;
  border-radius: 20px;
  background: #303846;
  transition: 160ms ease;
}

.option i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #aeb6c2;
  content: "";
  transition: 160ms ease;
}

.option input:checked + i {
  background: var(--accent);
}

.option input:checked + i::after {
  background: #0b2a20;
  transform: translateX(13px);
}

.option input:focus-visible + i {
  outline: 2px solid white;
  outline-offset: 3px;
}

.generate-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 27px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 8px 28px rgba(62, 197, 142, 0.12);
  color: #08251b;
  font-size: 13px;
  font-weight: 800;
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.generate-button:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 32px rgba(62, 197, 142, 0.2);
  transform: translateY(-1px);
}

.generate-button:active {
  transform: translateY(1px);
}

.generate-button svg {
  width: 18px;
}

.shortcut {
  margin: 13px 0 0;
  color: #727c8c;
  font-size: 10px;
  text-align: center;
}

kbd {
  padding: 2px 6px;
  border: 1px solid #363f4d;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #151a24;
  color: #a8b0bd;
  font-family: inherit;
  font-size: 9px;
}

footer {
  margin-top: 22px;
  color: #606a79;
  font-size: 10px;
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 5;
  padding: 10px 15px;
  border: 1px solid rgba(113, 230, 181, 0.3);
  border-radius: 9px;
  background: #17231f;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  color: #c8f8e4;
  font-size: 12px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 680px);
    padding-top: 20px;
  }

  .hero {
    margin-bottom: 18px;
  }

  .generator-card {
    border-radius: 19px;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .privacy-badge {
    font-size: 10px;
  }

  #passcode {
    letter-spacing: 0.08em;
  }
}

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