@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

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

body {
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f0f2f5;
}

.container {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  width: 90%;
  max-width: 450px;
}

.title {
  text-align: center;
  color: #1a1a1a;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.password-display {
  position: relative;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

#password {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: #1a1a1a;
  font-family: "Courier New", monospace;
  padding-right: 40px; /* Space for copy button */
}

.copy-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.copy-btn svg {
  width: 20px;
  height: 20px;
  color: #64748b;
}

.copy-btn:hover svg {
  color: #1a1a1a;
}

.length-container {
  margin-bottom: 1.5rem;
}

.length-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
  font-size: 0.9rem;
}

#lengthPass {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#lengthPass::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid white;
  box-shadow: 0 0 0 1px #3b82f6;
}

.check-box {
  margin-bottom: 1rem;
}

.option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.option-label {
  color: #1a1a1a;
  font-size: 0.9rem;
}

/* Modern Toggle Switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e2e8f0;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked + .slider {
  background-color: #22c55e;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

#btn {
  width: 100%;
  padding: 0.875rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

#btn:hover {
  background: #2563eb;
}

#btn:active {
  background: #1d4ed8;
}

@media (max-width: 480px) {
  .container {
    padding: 1.5rem;
    width: 95%;
  }

  .title {
    font-size: 1.5rem;
  }

  #password {
    font-size: 1rem;
  }
}

.strength-indicator {
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  text-align: center;
}

.strength-indicator.weak {
  background: #fee2e2;
  color: #dc2626;
}
.strength-indicator.medium {
  background: #fef3c7;
  color: #d97706;
}
.strength-indicator.good {
  background: #d1fae5;
  color: #059669;
}
.strength-indicator.strong {
  background: #dcfce7;
  color: #16a34a;
}
