:root {
  --ink: #f4f9f9;
  --muted: #afc1c5;
  --panel: rgba(31, 53, 64, .9);
  --panel-2: #25414e;
  --line: rgba(194, 222, 223, .2);
  --mint: #70ebc9;
  --mint-dark: #092e29;
  --orange: #ffb86b;
  --bg: #142832;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
button, input { font: inherit; }
button { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ambient { position: fixed; pointer-events: none; border-radius: 50%; filter: blur(10px); opacity: .38; }
.ambient-one { width: 560px; height: 560px; right: -250px; top: -210px; background: radial-gradient(circle, #249a80, transparent 67%); }
.ambient-two { width: 440px; height: 440px; left: -260px; top: 430px; background: radial-gradient(circle, #77633b, transparent 68%); }
.page-shell { width: min(980px, calc(100% - 40px)); margin: 0 auto; position: relative; }
.topbar { display: flex; align-items: center; gap: 22px; min-height: 84px; padding: 18px 4px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 800; letter-spacing: .17em; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--mint); border-radius: 8px; color: var(--mint); font-family: Georgia, serif; font-style: italic; font-size: 19px; }
.privacy-badge { display: flex; align-items: center; margin-left: auto; padding: 6px 12px; color: #cfe0e1; background: rgba(112, 235, 201, .09); border: 1px solid rgba(112, 235, 201, .25); border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.privacy-badge span { display: inline-block; width: 6px; height: 6px; margin: 0 6px 1px 0; background: var(--mint); border-radius: 50%; box-shadow: 0 0 10px var(--mint); }
h1 { margin: 0; color: #d9e7e8; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.generator-card { overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(38, 64, 76, .97), rgba(24, 45, 56, .97)); border-radius: 22px; box-shadow: 0 24px 65px rgba(0,0,0,.22); }
.result-wrap { padding: 28px 34px 20px; background: rgba(14, 31, 40, .3); border-bottom: 1px solid var(--line); }
.result-label, .setting-heading label, .quantity-setting label, legend, .exclude-setting label { display: block; color: #c5d1d2; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.result-row { display: flex; gap: 20px; align-items: center; min-height: 70px; }
.password { flex: 1; min-width: 0; max-height: 490px; overflow: auto; overflow-wrap: anywhere; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; color: #dce9ea; font-size: clamp(16px, 3vw, 22px); letter-spacing: .04em; }
.password.has-password { color: #fff; }
.password-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 4px; border-bottom: 1px solid rgba(194, 222, 223, .12); }
.password-row:last-child { border-bottom: 0; }
.password-row span { color: #789097; font: 11px/2 "SFMono-Regular", Consolas, monospace; text-align: right; }
.password-row code { font: inherit; user-select: all; }
.password-copy { padding: 5px 9px; border: 1px solid rgba(194, 222, 223, .2); background: rgba(112, 235, 201, .04); color: #a9bec2; border-radius: 7px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 9px; font-weight: 750; letter-spacing: .03em; cursor: pointer; }
.password-copy:hover, .password-copy:focus-visible { border-color: var(--mint); color: var(--mint); outline: 0; }
.copy-button { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); background: transparent; border-radius: 9px; font-size: 12px; cursor: pointer; }
.copy-button:disabled { opacity: .35; cursor: default; }
.copy-button:not(:disabled):hover { border-color: var(--mint); color: var(--mint); }
.copy-button svg, .generate-button svg, .local-note svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.strength-line { height: 3px; overflow: hidden; background: #3a535e; border-radius: 9px; }
.strength-line span { display: block; width: 0; height: 100%; background: var(--mint); transition: width .3s, background .3s; }
.strength-text { margin-top: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-align: right; text-transform: uppercase; }
.settings-grid { padding: 28px 34px 8px; }
.quantity-setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.quantity-setting p { margin: 4px 0 0; color: #8fa4a9; font-size: 10px; }
.quantity-input-wrap { display: flex; flex: 0 0 auto; align-items: center; border: 1px solid var(--line); border-radius: 9px; }
.quantity-input-wrap button { width: 36px; height: 35px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.quantity-input-wrap button:hover { color: var(--mint); }
#quantity { width: 58px; padding: 6px 4px; border: 0; border-inline: 1px solid var(--line); outline: 0; background: transparent; color: var(--ink); text-align: center; font-size: 14px; font-weight: 800; appearance: textfield; }
#quantity::-webkit-inner-spin-button { appearance: none; }
.setting-heading { display: flex; align-items: center; justify-content: space-between; }
.length-input-wrap { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; }
.length-input-wrap button { width: 32px; height: 31px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.length-input-wrap button:hover { color: var(--mint); }
#length { width: 48px; padding: 4px; border: 0; border-inline: 1px solid var(--line); outline: 0; background: transparent; color: var(--ink); text-align: center; font-size: 13px; font-weight: 800; appearance: textfield; }
#length::-webkit-inner-spin-button { appearance: none; }
#length-range { width: 100%; height: 4px; margin: 22px 0 0; appearance: none; background: linear-gradient(to right, var(--mint) var(--range, 16.7%), #30414a var(--range, 16.7%)); border-radius: 9px; accent-color: var(--mint); }
#length-range::-webkit-slider-thumb { width: 16px; height: 16px; appearance: none; background: var(--mint); border: 3px solid #15342f; border-radius: 50%; box-shadow: 0 0 0 2px var(--mint); cursor: pointer; }
#length-range::-moz-range-thumb { width: 12px; height: 12px; background: var(--mint); border: 2px solid #15342f; border-radius: 50%; box-shadow: 0 0 0 2px var(--mint); cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; margin-top: 6px; color: #82999f; font-size: 10px; }
.character-setting { margin: 22px 0 0; padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); }
.character-setting legend { transform: translateY(31px); }
.options-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 31px; }
.option { display: flex; align-items: center; gap: 11px; min-height: 59px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
.option:hover, .option:has(input:focus-visible) { border-color: rgba(99, 230, 194, .55); }
.option:has(input:checked) { background: rgba(99, 230, 194, .045); }
.option input { position: absolute; opacity: 0; }
.check { display: grid; place-items: center; flex: 0 0 auto; width: 17px; height: 17px; border: 1px solid #4e6268; border-radius: 4px; }
.option input:checked + .check { background: var(--mint); border-color: var(--mint); }
.option input:checked + .check::after { content: ""; width: 7px; height: 4px; border-left: 2px solid var(--mint-dark); border-bottom: 2px solid var(--mint-dark); transform: rotate(-45deg) translateY(-1px); }
.option b, .option small { display: block; }
.option b { font-size: 12px; }
.option small { color: #91a5aa; font: 10px/1.3 "SFMono-Regular", Consolas, monospace; }
.exclude-setting { margin-top: 23px; padding-top: 22px; border-top: 1px solid var(--line); }
.exclude-setting label span { color: #677a80; font-weight: 500; }
.exclude-setting input { width: 100%; margin-top: 10px; padding: 11px 13px; border: 1px solid var(--line); outline: 0; background: rgba(5, 13, 18, .35); color: var(--ink); border-radius: 9px; font-family: monospace; font-size: 13px; }
.exclude-setting input:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(99,230,194,.08); }
.exclude-setting p { margin: 6px 0 0; color: #8fa4a9; font-size: 10px; }
.error { margin: 10px 34px; padding: 10px 12px; color: #ffc4b9; background: rgba(255, 99, 71, .08); border: 1px solid rgba(255,99,71,.2); border-radius: 8px; font-size: 12px; }
.generate-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: calc(100% - 68px); margin: 18px 34px 13px; padding: 14px; border: 0; background: var(--mint); color: #0a2c28; border-radius: 10px; font-size: 13px; font-weight: 900; letter-spacing: .04em; cursor: pointer; box-shadow: 0 8px 25px rgba(99,230,194,.12); transition: transform .15s, filter .15s; }
.generate-button:hover { filter: brightness(1.07); transform: translateY(-1px); }
.generate-button:active { transform: translateY(1px); }
.local-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 24px; color: #8ba2a7; font-size: 10px; }
.local-note svg { width: 13px; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 45px 18px 40px; }
.trust article { text-align: center; }
.trust-icon { display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 10px; color: var(--mint); background: rgba(99,230,194,.06); border: 1px solid rgba(99,230,194,.14); border-radius: 50%; font-size: 18px; }
.trust h2 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 16px; font-weight: 400; }
.trust p { margin: 0; color: #94a9ae; font-size: 11px; }
footer { padding: 27px 20px 34px; border-top: 1px solid var(--line); color: #849ba0; text-align: center; }
.counters { display: flex; align-items: center; justify-content: center; gap: 13px; color: #9eb1b5; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.counters b { color: #bdccce; font-size: 12px; }
.counters i { width: 3px; height: 3px; background: #4b6166; border-radius: 50%; }
footer p { max-width: 720px; margin: 13px auto 0; font-size: 9px; line-height: 1.6; }
footer strong { color: #819399; }
.copyright { letter-spacing: .04em; }

@media (max-width: 650px) {
  .page-shell { width: min(100% - 24px, 900px); }
  .topbar { min-height: 70px; gap: 12px; padding: 14px 2px; }
  .topbar h1 { display: none; }
  .privacy-badge { margin-left: auto; }
  .result-wrap, .settings-grid { padding-left: 20px; padding-right: 20px; }
  .result-row { align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px 0; }
  .copy-button { align-self: flex-end; }
  .options-grid { grid-template-columns: repeat(2, 1fr); }
  .generate-button { width: calc(100% - 40px); margin-left: 20px; margin-right: 20px; }
  .trust { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 400px) {
  .options-grid { grid-template-columns: 1fr; }
  .counters { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
