
@import url('data:text/css,');
/* Password Forge — all visual effects are local CSS. */

:root {
  color-scheme: dark;
  --bg: #090c12;
  --panel: #10151e;
  --panel-2: #141b26;
  --border: #242e3d;
  --text: #edf4fc;
  --muted: #8998aa;
  --faint: #5d6b7d;
  --accent: #64e7ff;
  --accent-2: #8b8aff;
  --good: #68e8c2;
  --warning: #ffc16b;
  --danger: #ff706d;
  --input: #0b1018;
  --shadow: 0 20px 60px #0004;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 12% 0%, #17304733, transparent 38%),
    radial-gradient(ellipse at 90% 38%, #25316a18, transparent 35%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.55;
  transition: background .25s, color .25s;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }

.app-shell { width: min(1440px, 100%); margin: 0 auto; padding: 0 38px; }

.topbar {
  height: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #3d758a;
  border-radius: 12px;
  color: var(--accent);
  font-size: 27px;
  background: linear-gradient(145deg, #193342, #10151e);
  box-shadow: inset 0 0 15px #4adfff14;
}
.brand strong { display: block; letter-spacing: 2px; font-size: 13px; }
.brand small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
  margin-top: 2px;
}
.top-actions { display: flex; align-items: center; gap: 20px; }

.privacy-label, .stage-topline, .section-kicker, .tiny-tag,
.metric-label, .shortcut-hint, .footer {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 1.3px;
  font-size: 10px;
}
.privacy-label { display: flex; align-items: center; gap: 8px; color: var(--muted); }

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 9px #68e8c288;
  flex: 0 0 auto;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 17px;
  transition: border-color .2s, color .2s, background .2s;
}
.icon-button:hover { border-color: var(--accent); color: var(--accent); }

.intro { padding: 43px 0 34px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font: 10px "SFMono-Regular", Consolas, monospace;
  letter-spacing: 1.7px;
}
.eyebrow span { width: 18px; height: 1px; background: var(--accent); }
.intro h1 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -1.7px;
  line-height: 1.15;
  margin: 17px 0 12px;
  font-weight: 750;
}
.intro h1 span {
  color: transparent;
  background: linear-gradient(90deg, #62e6ff, #8a91ff 75%);
  background-clip: text;
  -webkit-background-clip: text;
}
.intro p { color: var(--muted); font-size: 14px; margin: 0; max-width: 590px; }

.forge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr);
  gap: 22px;
  align-items: start;
}

.panel {
  background: linear-gradient(145deg, var(--panel), color-mix(in srgb, var(--panel) 85%, #182537));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.workspace { overflow: hidden; }
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.workspace > .panel-heading { padding: 24px 25px 18px; }
.section-kicker { color: var(--accent); font-size: 9px; }
.panel h2 { font-size: 17px; letter-spacing: -.3px; margin: 5px 0 0; }
.tiny-tag {
  border: 1px solid #2c5c59;
  color: var(--good);
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 8px;
  white-space: nowrap;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 0 24px;
  padding: 5px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.mode-tab {
  padding: 11px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  transition: .2s;
}
.mode-tab span { margin-right: 5px; }
.mode-tab:hover { color: var(--text); }
.mode-tab.active {
  background: linear-gradient(120deg, #1b3644, #20243b);
  color: var(--accent);
  border-color: #305364;
  box-shadow: inset 0 0 16px #4cdafa0b;
}

.password-stage {
  margin: 18px 24px 0;
  padding: 15px 18px 21px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background:
    linear-gradient(180deg, #101824, #0b1018 80%);
  position: relative;
  overflow: hidden;
}
.password-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image: linear-gradient(#5b779b0b 1px, transparent 1px),
    linear-gradient(90deg, #5b779b0b 1px, transparent 1px);
  background-size: 18px 18px;
}
.stage-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 9px;
}
.stage-topline > span:first-child { display: flex; align-items: center; gap: 7px; }

.ingot-wrap {
  height: 186px;
  display: grid;
  place-items: center;
  position: relative;
  margin: 0 auto 4px;
  isolation: isolate;
  --forge-glow: #65eaff;
}
.ingot-aura {
  position: absolute;
  width: 180px;
  height: 100px;
  border-radius: 50%;
  background: var(--forge-glow);
  filter: blur(55px);
  opacity: .13;
  transition: background .5s, opacity .5s;
}
.ingot {
  position: relative;
  z-index: 1;
  width: min(245px, 75%);
  overflow: visible;
  filter: drop-shadow(0 9px 9px #0007);
  animation: floatIngot 4s ease-in-out infinite;
}
.ingot-front, .ingot-top, .ingot-side {
  transition: fill .45s, stroke .45s, opacity .45s;
}
.crack {
  fill: none;
  stroke: #351b1b;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity .3s;
}
.crystal {
  fill: #8ef5ff;
  stroke: #d9fcff;
  stroke-width: 1;
  opacity: 0;
  filter: url(#metalGlow);
  transform-origin: center;
}
.forge-line { fill: none; stroke: #e8f8ff; stroke-width: 1.2; opacity: .22; }
.ingot-shadow { fill: #000; opacity: .35; }
.ingot-caption {
  position: absolute;
  bottom: 0;
  color: var(--forge-glow);
  font: 9px "SFMono-Regular", Consolas, monospace;
  letter-spacing: 2px;
  text-shadow: 0 0 15px var(--forge-glow);
}
.ingot-wrap[data-strength="weak"] { --forge-glow: #ff554b; }
.ingot-wrap[data-strength="fair"] { --forge-glow: #ffb54f; }
.ingot-wrap[data-strength="strong"] { --forge-glow: #55d6ff; }
.ingot-wrap[data-strength="fortress"] { --forge-glow: #9b9bff; }

.ingot-wrap[data-strength="weak"] .ingot-aura { opacity: .22; }
.ingot-wrap[data-strength="weak"] .ingot-front { fill: #633e3b; }
.ingot-wrap[data-strength="weak"] .ingot-top { fill: #ad7160; }
.ingot-wrap[data-strength="weak"] .crack { opacity: .9; }
.ingot-wrap[data-strength="weak"] .forge-line { opacity: .08; }

.ingot-wrap[data-strength="fair"] .ingot-front { fill: #ae7138; }
.ingot-wrap[data-strength="fair"] .ingot-side { fill: #714522; }
.ingot-wrap[data-strength="fair"] .ingot-top { fill: #ffc46c; }
.ingot-wrap[data-strength="fair"] .ingot-aura { opacity: .27; }

.ingot-wrap[data-strength="strong"] .ingot-front { fill: #387d9e; }
.ingot-wrap[data-strength="strong"] .ingot-side { fill: #1c4d72; }
.ingot-wrap[data-strength="strong"] .ingot-top { fill: #a3f0ff; }
.ingot-wrap[data-strength="strong"] .ingot-aura { opacity: .4; }
.ingot-wrap[data-strength="strong"] .forge-line { opacity: .7; }

.ingot-wrap[data-strength="fortress"] .ingot-front { fill: #5665a9; }
.ingot-wrap[data-strength="fortress"] .ingot-side { fill: #282d68; }
.ingot-wrap[data-strength="fortress"] .ingot-top { fill: #e1e9ff; }
.ingot-wrap[data-strength="fortress"] .ingot-aura { opacity: .55; }
.ingot-wrap[data-strength="fortress"] .crystal { opacity: .9; }
.ingot-wrap[data-strength="fortress"] .forge-line { opacity: .9; }

@keyframes floatIngot {
  0%, 100% { transform: translateY(2px) rotate(-.5deg); }
  50% { transform: translateY(-4px) rotate(.5deg); }
}

.password-output-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #34465a;
  background: #080d14;
  border-radius: 10px;
  min-height: 65px;
  padding: 13px 12px 13px 16px;
}
.password-output {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #f1f8ff;
  font: 600 clamp(16px, 2.1vw, 23px)/1.55 "SFMono-Regular", Consolas, monospace;
  letter-spacing: -.5px;
  word-break: break-word;
  user-select: text;
}
.password-output.is-hidden { filter: blur(7px); user-select: none; }
.output-actions { display: flex; gap: 7px; flex-shrink: 0; }
.output-actions .icon-button { width: 34px; height: 34px; font-size: 15px; }
.copy-status { min-height: 19px; padding-top: 4px; font-size: 11px; color: var(--good); }

.strength-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 7px 0 9px;
  color: var(--muted);
  font: 10px "SFMono-Regular", Consolas, monospace;
  letter-spacing: .7px;
}
#strengthLabel { color: var(--accent); font-weight: 700; }
.strength-track {
  height: 5px;
  background: #27303d;
  border-radius: 10px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--danger), var(--warning), var(--accent), #b8a4ff);
  transition: width .4s ease;
  box-shadow: 0 0 13px #63e8ff55;
}

.generate-button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 53px;
  margin-top: 18px;
  padding: 13px 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid #8bf1ff;
  border-radius: 10px;
  color: #061019;
  background: linear-gradient(105deg, #7aeaff, #91c7ff 65%, #b6b5ff);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 7px 24px #52cde91e;
  transition: transform .15s, filter .2s, box-shadow .2s;
}
.generate-button:hover { filter: brightness(1.08); box-shadow: 0 7px 28px #52cde933; }
.generate-button:active { transform: translateY(1px) scale(.995); }
.button-arrow { position: absolute; right: 17px; font-size: 17px; }
.shortcut-hint { text-align: center; color: var(--faint); margin: 12px 0 0; font-size: 8px; }
kbd {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 4px;
  color: var(--muted);
  font-size: 9px;
}

.settings { padding: 27px 25px 25px; }
.settings-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 23px;
}
.settings-title h3, .why-heading h3 { font-size: 13px; margin: 0; }
.settings-title > span { font: 8px Consolas, monospace; color: var(--faint); letter-spacing: 1px; }

.setting-block { margin-bottom: 22px; }
.setting-block > label, .setting-block legend {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 11px;
}
.setting-block fieldset, fieldset.setting-block {
  border: 0;
  padding: 0;
  min-width: 0;
}
fieldset.setting-block legend { padding: 0; }
.setting-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.setting-label-row label { font-size: 12px; font-weight: 600; }
.setting-label-row output {
  min-width: 35px;
  text-align: center;
  padding: 3px 7px;
  border-radius: 5px;
  background: #1a2c3a;
  color: var(--accent);
  font: 12px Consolas, monospace;
}
input[type="range"] {
  width: 100%;
  display: block;
  accent-color: var(--accent);
  cursor: pointer;
}
.range-labels { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font-size: 10px; }

.toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.toggle-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
  transition: border-color .2s;
}
.toggle-option:hover { border-color: #456075; }
.toggle-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.toggle-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1px solid #526175;
  border-radius: 4px;
  display: grid;
  place-items: center;
}
.toggle-option input:checked + .toggle-box {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-option input:checked + .toggle-box::after {
  content: "✓";
  color: #07111b;
  font-size: 11px;
  font-weight: 900;
}
.toggle-option input:focus-visible + .toggle-box { outline: 2px solid var(--accent); outline-offset: 3px; }
.toggle-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.single-toggle { margin-bottom: 23px; }
.optional { color: var(--faint); font: 9px Consolas, monospace; margin-left: 6px; }
.text-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--input);
  color: var(--text);
  font-size: 12px;
}
.text-input::placeholder { color: var(--faint); }
.field-note { font-size: 10px; line-height: 1.6; color: var(--muted); margin: 8px 0 0; }
.option-list { display: grid; gap: 9px; margin: 5px 0 17px; }
.option-list .toggle-option { min-height: 40px; }
.mode-panel[hidden] { display: none !important; }

.side-column { display: grid; gap: 18px; }
.analyzer, .history-panel { padding: 22px; }
.analysis-icon { font-size: 27px; color: var(--accent); }
.analysis-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 0 17px;
  margin-top: 10px;
  border-bottom: 1px solid var(--border);
}
.metric-label { color: var(--muted); font-size: 9px; display: block; }
.analysis-score strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -.6px;
  overflow-wrap: anywhere;
}
.metric-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid #305165;
  border-radius: 12px;
  background: #16303e;
  color: var(--accent);
  font-size: 23px;
}
.metric-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 11px; }
.metric-row span { color: var(--muted); }
.metric-row strong { text-align: right; font-size: 11px; font-weight: 600; }
.divider { height: 1px; background: var(--border); margin: 8px 0 17px; }
.why-heading { display: flex; justify-content: space-between; align-items: center; }
.info-symbol {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #415166;
  border-radius: 50%;
  color: var(--muted);
  font: 10px Georgia, serif;
}
.why-text { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 12px 0 0; }
.warning-list { display: grid; gap: 7px; margin-top: 14px; }
.warning-item {
  padding: 9px 10px;
  border-radius: 7px;
  background: #32251b;
  border: 1px solid #65452d;
  color: #ffd5a5;
  font-size: 10px;
  line-height: 1.5;
}
.warning-item::before { content: "⚠ "; }
.warning-item.info-warning { background: #1a2938; border-color: #304d65; color: #b9ddf4; }
.warning-item.info-warning::before { content: "ⓘ "; }

.text-button {
  border: 0;
  padding: 5px 0 5px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.text-button:hover { color: var(--danger); }
.history-note { color: var(--muted); font-size: 10px; margin: 9px 0 12px; }
.history-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--input);
}
.history-empty { color: var(--faint); font-size: 11px; }
.history-password {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font: 10px Consolas, monospace;
}
.history-copy {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 2px 3px;
  font-size: 10px;
}
.security-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 17px;
  border: 1px solid #24463f;
  border-radius: 12px;
  background: linear-gradient(120deg, #11241f, #101b21);
  color: var(--good);
}
.security-note > span { font-size: 21px; }
.security-note p { margin: 0; color: #a5b9b5; font-size: 10px; line-height: 1.8; }
.security-note strong { color: var(--good); font-size: 11px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 30px 0 25px;
  margin-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 8px;
}
.footer-dot { color: var(--accent); margin: 0 5px; }
.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;
}
.noscript { margin: 20px; color: var(--danger); }

body.light-theme {
  color-scheme: light;
  --bg: #edf2f8;
  --panel: #ffffff;
  --panel-2: #f1f5fa;
  --border: #d5dfeb;
  --text: #172436;
  --muted: #5d6b7d;
  --faint: #748195;
  --accent: #087c9e;
  --accent-2: #6654c8;
  --good: #087a5a;
  --warning: #9a5700;
  --danger: #b42b2b;
  --input: #f5f8fc;
  --shadow: 0 15px 35px #1e3a5a0d;
  background:
    radial-gradient(ellipse at 12% 0%, #b2d9ec50, transparent 38%),
    var(--bg);
}
.light-theme .password-stage { background: linear-gradient(180deg, #e8f0f8, #f5f8fc); }
.light-theme .password-output-wrap { background: #fff; border-color: #d5dfeb; }
.light-theme .password-output { color: #172436; }
.light-theme .mode-tabs { background: #f5f8fc; }
.light-theme .mode-tab.active { background: #e0f3fa; border-color: #abdbe9; }
.light-theme .setting-label-row output { background: #e0f3fa; }
.light-theme .warning-item { color: #773900; background: #fff1df; border-color: #f0c994; }
.light-theme .warning-item.info-warning { color: #174e70; background: #eaf6ff; border-color: #c2e1f4; }
.light-theme .security-note { background: #e8f5ef; border-color: #c5e4d5; }
.light-theme .security-note p { color: #3f6557; }
.light-theme .password-stage::before { opacity: .6; }
.light-theme .ingot-shadow { opacity: .16; }

@media (min-width: 1500px) {
  .app-shell { padding: 0 50px; }
}

@media (max-width: 1000px) {
  .app-shell { padding: 0 22px; }
  .forge-layout { grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr); gap: 16px; }
  .workspace > .panel-heading { padding: 21px 20px 16px; }
  .mode-tabs { margin: 0 18px; }
  .mode-tab { font-size: 11px; }
  .password-stage { margin-left: 18px; margin-right: 18px; padding-left: 13px; padding-right: 13px; }
  .settings { padding: 23px 20px; }
  .analyzer, .history-panel { padding: 18px; }
}

@media (max-width: 760px) {
  .app-shell { padding: 0 16px; }
  .topbar { height: 72px; }
  .brand strong { font-size: 11px; }
  .brand-mark { width: 37px; height: 37px; }
  .privacy-label { display: none; }
  .intro { padding: 32px 0 25px; }
  .intro h1 { font-size: clamp(29px, 7vw, 40px); }
  .intro p { font-size: 13px; }
  .forge-layout { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr; }
  .workspace > .panel-heading { padding: 20px 18px 15px; }
  .mode-tabs { margin: 0 14px; }
  .mode-tab { padding: 10px 4px; font-size: 10px; }
  .mode-tab span { display: block; margin: 0 0 2px; font-size: 15px; }
  .password-stage { margin: 15px 14px 0; }
  .settings { padding: 24px 18px; }
  .analyzer, .history-panel { padding: 20px; }
  .footer { flex-direction: column; line-height: 1.8; }
}

@media (max-width: 380px) {
  .app-shell { padding: 0 10px; }
  .mode-tabs { margin: 0 9px; }
  .password-stage { margin-left: 9px; margin-right: 9px; padding: 13px 10px 18px; }
  .password-output-wrap { padding-left: 10px; }
  .output-actions { gap: 4px; }
  .output-actions .icon-button { width: 30px; height: 32px; }
  .toggle-grid { gap: 7px; }
  .toggle-option { padding: 8px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
