/* reset & variables */
:root {
  --primary: #f97316;
  --secondary: #14b8a6;
  --weak: #ef4444;
  --medium: #f59e0b;
  --strong: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  padding: 20px;
}

/* container */
.container {
  background: #fff;
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 450px;
}

h1 {
  text-align: center;
  margin-bottom: 2.2rem;
  color: var(--primary);
  font-size: 1.8rem;
  position: relative;
}

h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

/* password input */
.password-container {
  margin-bottom: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding-right: 1rem;
}

#password {
  width: 100%;
  padding: 1.1rem;
  border: none;
  background: transparent;
  color: #4a5568;
  outline: none;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

#copy-btn {
  cursor: pointer;
  color: #718096;
  font-size: 1.1rem;
  transition: color 0.2s;
}

#copy-btn:hover { color: var(--primary); }

/* settings options */
.options {
  margin-bottom: 1.5rem;
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
}

.option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.option:last-child { margin-bottom: 0; }

.option label {
  font-size: 0.9rem;
  color: #4a5568;
  font-weight: 500;
}

.range-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 60%;
}

input[type="range"] {
  accent-color: var(--primary);
  height: 5px;
  cursor: pointer;
  flex: 1;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

#length-value {
  font-weight: 600;
  color: var(--primary);
  background: #e2e8f0;
  border-radius: 4px;
  padding: 2px 8px;
}

/* action button */
button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  margin-bottom: 1rem;
}

button:hover { transform: translateY(-2px); }
button:active { transform: translateY(0); }

/* pass strength meter */
.strength-container p {
  font-size: 0.9rem;
  color: #4a5568;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

#strength-label {
  font-weight: 700;
  color: var(--primary);
}

.strength-meter {
  height: 8px;
  background: #edf2f7;
  border-radius: 4px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: all 0.3s ease;
}