:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --muted: #91a8b9;
  --dim: #607b8f;
  --navy-950: #03111e;
  --navy-900: #071b2d;
  --navy-800: #0a263b;
  --panel: rgba(8, 30, 47, 0.82);
  --line: rgba(152, 190, 211, 0.14);
  --mint: #47e6bd;
  --mint-bright: #85f5d8;
  --danger: #ff8d9d;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--navy-950);
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 12% 28%, rgba(25, 108, 116, 0.2), transparent 31rem),
    linear-gradient(135deg, #041320 0%, #071c2d 54%, #051725 100%);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(71, 230, 189, 0.45);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(75px);
  opacity: 0.17;
  pointer-events: none;
}

.ambient-one {
  top: -12rem;
  right: -7rem;
  background: #40ddb6;
}

.ambient-two {
  bottom: -16rem;
  left: 20%;
  background: #1479a1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-decoration: none;
}

.brand-light {
  color: #7995a8;
  font-weight: 600;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(71, 230, 189, 0.28);
  border-radius: 11px;
  color: var(--mint);
  background: rgba(71, 230, 189, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-mark svg,
.privacy-note svg,
.card-foot svg,
.icon-button svg,
.primary-button svg,
.copy-hint svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.brand-mark svg {
  width: 22px;
}

.privacy-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #a9bdcb;
  background: rgba(6, 23, 37, 0.58);
  font-size: 0.76rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(71, 230, 189, 0.09), 0 0 13px rgba(71, 230, 189, 0.65);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(410px, 0.78fr);
  gap: clamp(50px, 9vw, 126px);
  align-items: center;
  width: min(1080px, calc(100% - 48px));
  min-height: calc(100vh - 176px);
  margin: 0 auto;
  padding: 46px 0 72px;
}

.intro {
  max-width: 570px;
}

.eyebrow,
.step-label {
  color: var(--mint);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 {
  margin: 20px 0 22px;
  font-size: clamp(2.9rem, 6.3vw, 5.5rem);
  line-height: 0.99;
  letter-spacing: -0.058em;
}

h1 span {
  color: #9fb2c0;
  font-weight: 480;
}

.lede {
  max-width: 485px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.compatibility {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  color: #c1d1dc;
  font-size: 0.77rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compatibility i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #49677a;
}

.privacy-note {
  display: flex;
  gap: 16px;
  max-width: 485px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.privacy-note svg {
  flex: 0 0 auto;
  width: 23px;
  color: var(--mint);
}

.privacy-note strong {
  display: block;
  margin-bottom: 5px;
  color: #dbe7ee;
  font-size: 0.82rem;
}

.privacy-note p {
  margin: 0;
  color: var(--dim);
  font-size: 0.78rem;
  line-height: 1.65;
}

.generator-card {
  position: relative;
  padding: clamp(25px, 4vw, 38px);
  border: 1px solid rgba(139, 183, 205, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px);
}

.generator-card::before {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 72px;
  height: 72px;
  border-top: 1px solid rgba(71, 230, 189, 0.14);
  border-right: 1px solid rgba(71, 230, 189, 0.14);
  border-radius: 0 12px 0 0;
  content: "";
  pointer-events: none;
}

.card-head,
.result-topline,
.countdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-head {
  margin-bottom: 28px;
}

.card-head h2 {
  margin: 6px 0 0;
  font-size: 1.38rem;
  letter-spacing: -0.03em;
}

.provider-badge {
  position: relative;
  z-index: 1;
  padding: 7px 10px;
  border: 1px solid rgba(71, 230, 189, 0.17);
  border-radius: 999px;
  color: var(--mint-bright);
  background: rgba(71, 230, 189, 0.07);
  font-size: 0.68rem;
  font-weight: 700;
}

.field-label,
.advanced label span {
  display: block;
  margin-bottom: 9px;
  color: #a9bdca;
  font-size: 0.76rem;
  font-weight: 700;
}

.secret-field {
  position: relative;
}

.secret-field input,
.advanced select {
  width: 100%;
  border: 1px solid rgba(139, 183, 205, 0.18);
  color: var(--ink);
  background: rgba(2, 15, 25, 0.58);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.secret-field input {
  min-height: 54px;
  padding: 0 51px 0 16px;
  border-radius: 12px;
  letter-spacing: 0.065em;
}

.secret-field input::placeholder {
  color: #405d70;
}

.secret-field input:hover,
.advanced select:hover {
  border-color: rgba(139, 183, 205, 0.31);
}

.secret-field input:focus,
.advanced select:focus {
  border-color: rgba(71, 230, 189, 0.62);
  outline: none;
  background: rgba(2, 15, 25, 0.82);
  box-shadow: 0 0 0 4px rgba(71, 230, 189, 0.07);
}

.secret-field input[aria-invalid="true"] {
  border-color: rgba(255, 141, 157, 0.65);
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #7892a4;
  background: transparent;
}

.icon-button:hover {
  color: var(--mint);
  background: rgba(255, 255, 255, 0.035);
}

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

.icon-button .eye-closed,
.icon-button[aria-pressed="true"] .eye-open {
  display: none;
}

.icon-button[aria-pressed="true"] .eye-closed {
  display: block;
}

.field-help,
.form-error {
  min-height: 18px;
  margin: 8px 1px 0;
  color: var(--dim);
  font-size: 0.69rem;
  line-height: 1.5;
}

.field-help code {
  color: #86a1b4;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.67rem;
}

.form-error {
  min-height: 0;
  margin-top: 4px;
  color: var(--danger);
}

.form-error:not(:empty) {
  min-height: 18px;
}

.advanced {
  margin: 19px 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.advanced summary {
  padding: 15px 1px;
  color: #a8bdca;
  font-size: 0.75rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary::after {
  float: right;
  color: var(--mint);
  content: "+";
  font-size: 1rem;
  font-weight: 400;
}

.advanced[open] summary::after {
  content: "−";
}

.advanced summary span {
  margin-left: 5px;
  color: #506c7f;
  font-size: 0.65rem;
  font-weight: 500;
}

.advanced-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 10px;
  padding: 2px 0 17px;
}

.advanced label span {
  margin-bottom: 6px;
  color: var(--dim);
  font-size: 0.67rem;
}

.advanced select {
  height: 40px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 0.73rem;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 53px;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  color: #062117;
  background: linear-gradient(135deg, var(--mint-bright), var(--mint));
  box-shadow: 0 12px 28px rgba(27, 198, 155, 0.17);
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 15px 36px rgba(27, 198, 155, 0.24);
}

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

.primary-button svg {
  width: 18px;
  transition: transform 160ms ease;
}

.primary-button:hover svg {
  transform: translateX(2px);
}

.result-panel {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid rgba(71, 230, 189, 0.16);
  border-radius: 15px;
  background: rgba(71, 230, 189, 0.035);
  animation: reveal 260ms ease both;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-label {
  display: block;
  color: #8ca5b5;
  font-size: 0.7rem;
  font-weight: 700;
}

.account-label {
  display: block;
  max-width: 260px;
  margin-top: 3px;
  overflow: hidden;
  color: #577487;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-button {
  padding: 5px 0;
  border: 0;
  color: #698497;
  background: transparent;
  font-size: 0.68rem;
}

.text-button:hover {
  color: var(--danger);
}

.code-button {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  margin: 17px 0 14px;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(2.1rem, 6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(71, 230, 189, 0.1);
}

.copy-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 4px;
  color: #658093;
  font-size: 0.64rem;
  white-space: nowrap;
}

.copy-hint svg {
  width: 14px;
}

.code-button:hover .copy-hint {
  color: var(--mint);
}

progress {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  color: var(--mint);
  background: rgba(255, 255, 255, 0.07);
  accent-color: var(--mint);
}

progress::-webkit-progress-bar {
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

progress::-webkit-progress-value {
  border-radius: 99px;
  background: linear-gradient(90deg, #1cc89f, var(--mint-bright));
  transition: width 220ms linear;
}

progress::-moz-progress-bar {
  border-radius: 99px;
  background: linear-gradient(90deg, #1cc89f, var(--mint-bright));
}

.countdown-row {
  margin-top: 9px;
  color: #617e91;
  font-size: 0.64rem;
}

.countdown-row strong {
  color: #a8becc;
  font-variant-numeric: tabular-nums;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  color: #4e697c;
  font-size: 0.63rem;
}

.card-foot svg {
  width: 14px;
}

footer {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: #466174;
  font-size: 0.68rem;
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  padding: 11px 15px;
  transform: translateY(18px);
  border: 1px solid rgba(71, 230, 189, 0.21);
  border-radius: 10px;
  color: #c7f9ea;
  background: rgba(5, 27, 39, 0.96);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
  font-size: 0.74rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 880px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 620px;
    padding-top: 50px;
  }

  .intro {
    text-align: center;
  }

  .lede,
  .privacy-note {
    margin-right: auto;
    margin-left: auto;
  }

  .compatibility {
    justify-content: center;
  }

  .privacy-note {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .site-header,
  .shell,
  footer {
    width: min(100% - 28px, 100%);
  }

  .site-header {
    padding-top: 18px;
  }

  .privacy-pill {
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  .brand-light {
    display: none;
  }

  .shell {
    min-height: auto;
    padding: 35px 0 56px;
  }

  h1 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

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

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

  .advanced-grid label:first-child {
    grid-column: 1 / -1;
  }

  .result-panel {
    padding: 18px;
  }

  .code {
    letter-spacing: 0.075em;
  }

  .copy-hint span {
    display: none;
  }
}

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