:root {
  --bg: #05030a;
  --text: #f8f3ff;
  --muted: #c7b8ddaa;
  --line: rgba(216, 180, 254, 0.42);
  --line-strong: rgba(232, 121, 249, 0.85);
  --white: #ffffff;
  --input-text: #10071d;
  --violet: #8b5cf6;
  --purple: #a855f7;
  --fuchsia: #e879f9;
  --danger: #dbb4ff;
  --success: #dbb4ff;
  --radius: 6px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 14%, rgba(232, 121, 249, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 20%, rgba(139, 92, 246, 0.27), transparent 34rem),
    radial-gradient(circle at 52% 88%, rgba(168, 85, 247, 0.22), transparent 32rem),
    linear-gradient(135deg, #05030a 0%, #12071f 44%, #070314 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.shell {
  width: min(980px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 44px 0;
}

.generator {
  width: 100%;
}

h1 {
  margin: 0 0 34px;
  font-size: clamp(38px, 7vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-weight: 700;
  -webkit-background-clip: text;
  background-clip: text;
  color: white;
}

.form {
  display: grid;
  gap: 24px;
}

.field {
  display: grid;
  gap: 10px;
}

label,
.label {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--muted);
}

input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--input-text);
  font: inherit;
  font-size: 18px;
  padding: 16px 17px;
  outline: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 18px 44px rgba(0,0,0,0.24);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 5px rgba(232, 121, 249, 0.16), 0 18px 44px rgba(0,0,0,0.24);
}

.phrase-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.phrase-grid input {
  text-align: left;
}

.phrase-field {
  display: grid;
  gap: 8px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.button,
.copy-button {
  border: 2px solid var(--muted);;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.button:hover,
.copy-button:hover {
  border: 2px solid white;
}

.button:active,
.copy-button:active {
}

.button {
  border-radius: 6px;
  padding: 15px 22px;
}

.primary {
  color: black;
  background: linear-gradient(90deg, #c084fc, #a78bfa);
  box-shadow: 0 18px 42px rgba(168, 85, 247, 0.28);
}

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

.secondary {
  color: var(--muted);
  background: rgba(255,255,255,0.09);
  border: 2px solid rgba(255,255,255,0.14);
}

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


.result {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
  min-height: 64px;
}

.copy-button {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #170526;
  background: linear-gradient(90deg, #c084fc, #a78bfa);
  box-shadow: 0 18px 40px rgba(217, 70, 239, 0.22);
}

.copy-button svg {
  width: 29px;
  height: 29px;
  fill: black;
}

.copy-button:hover svg {
  width: 29px;
  height: 29px;
  fill: white;
} 


.password-output {
  min-width: 0;
  flex: 1 1 auto;
  color: #fdf7ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(15px, 2vw, 24px);
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: all;
  padding: 14px 0;
}

.password-output.is-empty {
  color: rgba(248, 243, 255, 0.48);
  user-select: none;
}

.status {
  min-height: 24px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.legal {
  color: var(--muted)
}

@media (max-width: 790px) {
  .shell {
    align-items: start;
    padding-top: 36px;
  }

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

  .phrase-grid input {
    text-align: left;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .result {
    align-items: flex-start;
  }
}
