:root {
  --bg: #030712;
  --bg-alt: rgba(15, 23, 42, 0.9);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --accent-strong: #0ea5e9;
  --danger: #f97373;
  --warning: #fbbf24;
  --success: #4ade80;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --card-radius: 20px;
  --shadow-soft: 0 22px 45px rgba(15, 23, 42, 0.75);
  --blur: 18px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  min-height: 100vh;
  padding: 20px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.page::after {
  content: "";
  position: fixed;
  inset: -40%;
  background-image:
    linear-gradient(
      rgba(148, 163, 184, 0.6) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(148, 163, 184, 0.6) 1px,
      transparent 1px
    );
  background-size: 82px 82px;
  opacity: 0.85;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: -1;
}

.page-gradient {
  position: fixed;
  inset: -40%;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.09), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.12), transparent 60%),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.08), transparent 60%);
  pointer-events: none;
  z-index: -2;
}

.header,
.footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header {
  justify-content: center;
  padding-inline: 4px;
}

.footer {
  justify-content: space-between;
}

.main {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #e0f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.4),
    0 0 30px rgba(56, 189, 248, 0.5);
}

.brand-logo-glyph {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.card {
  position: relative;
  border-radius: var(--card-radius);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.93),
    rgba(15, 23, 42, 0.88)
  );
  box-shadow: var(--shadow-soft);
  padding: 18px 16px 16px;
  backdrop-filter: blur(var(--blur));
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.55), transparent 55%);
  opacity: 0.15;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-secondary {
  background: linear-gradient(
    135deg,
    rgba(17, 24, 39, 0.96),
    rgba(15, 23, 42, 0.96)
  );
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
}

.card-description {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.card-title-small {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 500;
}

.strength-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.3), transparent 70%);
  background-color: rgba(15, 23, 42, 0.85);
  font-size: 11px;
}

.strength-pill-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.strength-pill-value {
  font-weight: 600;
}

.password-output {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 999px;
  background: radial-gradient(circle at left top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.password-field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  padding: 3px 0;
  min-width: 0;
}

.password-field::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.icon-button {
  border: none;
  outline: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #e0f2fe, #bae6fd);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.5),
    0 10px 20px rgba(15, 23, 42, 0.7);
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    filter 0.12s ease-out;
}

.icon-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.7),
    0 16px 26px rgba(15, 23, 42, 0.85);
  filter: brightness(1.03);
}

.icon-button:active {
  transform: translateY(0);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.7),
    0 10px 18px rgba(15, 23, 42, 0.8);
}

.icon-copy {
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 3px;
  border: 1.5px solid #0f172a;
}

.icon-copy::before {
  content: "";
  position: absolute;
  inset: 2px 2px auto auto;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1.5px solid #0f172a;
  background: rgba(15, 23, 42, 0.2);
}

.strength-meter {
  margin-top: 4px;
}

.strength-bar-bg {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle at left, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
  overflow: hidden;
}

.strength-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97373, #facc15, #4ade80, #22c55e);
  transition:
    width 0.18s ease-out,
    transform 0.18s ease-out;
  transform-origin: left;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.control-group {
  padding: 10px 12px;
  border-radius: 16px;
  background: radial-gradient(
    120% 140% at 0% 0%,
    rgba(56, 189, 248, 0.12),
    rgba(15, 23, 42, 0.95)
  );
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.control-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.control-value {
  font-size: 16px;
  font-weight: 600;
}

.range {
  width: 100%;
  margin: 4px 0 6px;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  outline: none;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #e0f2fe, #bae6fd);
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, 0.25),
    0 8px 16px rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #e0f2fe, #bae6fd);
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, 0.25),
    0 8px 16px rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.control-row {
  margin-top: -2px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.checkbox-row.subtle {
  opacity: 0.9;
}

.checkbox-row input {
  display: none;
}

.checkbox-custom {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: radial-gradient(circle at 30% 20%, rgba(226, 232, 240, 0.4), transparent);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.checkbox-row input:checked + .checkbox-custom {
  border-color: rgba(56, 189, 248, 0.9);
  background: radial-gradient(circle at 30% 20%, #e0f2fe, #bae6fd);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 0 0 4px rgba(56, 189, 248, 0.3);
}

.checkbox-row input:checked + .checkbox-custom::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #0f172a;
}

.checkbox-label {
  color: var(--text-primary);
}

.checkbox-hint {
  color: var(--text-secondary);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.primary-button,
.ghost-button {
  position: relative;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    background 0.12s ease-out,
    color 0.12s ease-out;
}

.primary-button {
  flex: 1.2;
  background: radial-gradient(circle at 20% 0%, #22c55e, #16a34a);
  color: #0f172a;
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.7),
    0 16px 30px rgba(15, 23, 42, 0.85);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.9),
    0 22px 36px rgba(15, 23, 42, 0.95);
}

.primary-button:active {
  transform: translateY(0);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.9),
    0 12px 24px rgba(15, 23, 42, 0.9);
}

.ghost-button {
  flex: 0.9;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-primary);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.8);
}

.ghost-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.8);
}

.tips {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.85;
}

.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;
}

@media (min-width: 720px) {
  .page {
    padding: 28px 32px 32px;
  }

  .header {
    max-width: 640px;
    margin: 0 auto;
    justify-content: flex-start;
  }

  .main {
    max-width: 640px;
    margin: 12px auto 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .card-main {
    padding: 22px 20px 18px;
    max-width: 100%;
    margin-inline: 0;
  }

  .card-secondary {
    padding: 18px 18px 16px;
  }

  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


