* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef2ff, #fdf2f8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  background: #fff;
  padding: 25px;
  width: 360px;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

h2 {
  text-align: center;
  margin-bottom: 15px;
  color: #4f46e5;
}

.rules {
  font-size: 13px;
  margin-bottom: 15px;
  color: #6b7280;
}

.rules li.valid {
  color: #16a34a;
}

.field {
  position: relative;
  margin-bottom: 12px;
}

input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #f9fafb;
}

input:focus {
  outline: none;
  border-color: #6366f1;
}

.toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.error {
  font-size: 12px;
  color: #dc2626;
  display: none;
}

.progress {
  margin: 15px 0;
  position: relative;
}

.bar {
  height: 18px;
  border-radius: 10px;
  background: #e5e7eb;
  overflow: hidden;
}

.bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  background: red;
  transition: 0.3s;
}

.progress.weak .bar::after {
  width: 30%;
  background: #f87171;
}

.progress.medium .bar::after {
  width: 60%;
  background: #fbbf24;
}

.progress.strong .bar::after {
  width: 100%;
  background: #34d399;
}

.text {
  font-size: 13px;
  font-weight: 600;
}

button {
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.6;
}

button:enabled {
  opacity: 1;
}
