* {
  box-sizing: border-box;
}

:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8edf7;
  background: #0b1020;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #172044 0, #0b1020 45%, #070b15 100%);
}

.container {
  width: min(100% - 32px, 680px);
  margin: 0 auto;
  padding: 56px 0;
}

.card {
  background: rgba(20, 28, 49, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: #27365e;
  border-radius: 16px;
  font-size: 25px;
}

h1 {
  margin: 0;
  font-size: 27px;
}

.header p {
  margin: 5px 0 0;
  color: #9ba7c1;
}

.password-row {
  display: flex;
  gap: 10px;
}

#password {
  min-width: 0;
  flex: 1;
  border: 1px solid #3a486b;
  border-radius: 12px;
  padding: 15px;
  background: #0d1426;
  color: #fff;
  font-size: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  outline: none;
}

.icon-btn,
.primary,
.secondary {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  transition: transform .15s, opacity .15s;
}

.icon-btn:hover,
.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
}

.icon-btn {
  width: 54px;
  background: #27365e;
  color: #fff;
  font-size: 20px;
}

.strength {
  margin: 20px 0 25px;
}

.strength-head,
.length-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.strength-head {
  margin-bottom: 8px;
  color: #9ba7c1;
}

.strength-head strong {
  color: #e8edf7;
}

.bar {
  height: 8px;
  background: #273047;
  border-radius: 99px;
  overflow: hidden;
}

#strengthBar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #61d5a4;
  transition: width .2s ease;
}

.length-row {
  margin-bottom: 10px;
  color: #b8c2d8;
}

#lengthValue {
  font-weight: 700;
  color: #fff;
}

.range {
  width: 100%;
  accent-color: #7187ff;
  margin-bottom: 25px;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 25px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px;
  background: #111a30;
  border: 1px solid #283653;
  border-radius: 12px;
  cursor: pointer;
  color: #c8d0e2;
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: #7187ff;
}

.actions {
  display: flex;
  gap: 10px;
}

.primary,
.secondary {
  padding: 14px 18px;
  font-weight: 700;
}

.primary {
  flex: 1;
  background: #7187ff;
  color: white;
}

.secondary {
  background: #273047;
  color: #dbe2f1;
}

.error {
  min-height: 22px;
  margin: 14px 0 0;
  color: #ff8e8e;
  text-align: center;
}

footer {
  margin-top: 22px;
  color: #78849e;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 20px, 680px);
    padding: 20px 0;
  }

  .card {
    padding: 22px;
    border-radius: 18px;
  }

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

  .actions {
    flex-direction: column;
  }
}
