@import url(https://fonts.googleapis.com/css?family=Roboto:100,200,300,regular,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic);

:root {
  --primary-color: #4f46e5;
  --secondary-color: #06b6d4;

  --weak-color: #ef4444;
  --medium-color: #f59e0b;
  --strong-color: #10b981;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
}

body {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  padding: 2.5rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

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

h1::after {
  content: '';
  height: 3px;
  width: 60%;
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  border-radius: 3px;
}
.password-container {
  width: 100%;
  border: 2px solid #e2e8f0;
  background-color: #f8fafc;
  display: flex;
  justify-content: space-between;
  padding-right: 15px;
  align-items: center;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 1.2rem;
}
#password {
  padding: 15px;
  border: none;
  color: #4a5568;
  background-color: #f8fafc;
  outline: none;
  width: 100%;
}
#copy-btn {
  color: #718096;
  cursor: pointer;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 1.1rem;
  transition: color 0.3s;
}
#copy-btn:hover {
  color: var(--primary-color);
}
.options {
  background-color: #f8fafc;
  padding: 1.4rem;
  border-radius: 8px;
  margin-bottom: 1.4rem;
  overflow: hidden;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.07);
}

.option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.option:last-child {
  margin-bottom: 0;
}
.option label {
  color: #4a5568;
  font-size: 1rem;
  font-weight: 500;
}
.range-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 60%;
}
input[type='range'] {
  flex: 1;
  height: 6px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

input[type='checkbox'] {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  outline: none;
  appearance: none;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s;
}

input[type='checkbox']:checked {
  background-color: var(--primary-color);
}

input[type='checkbox']:checked::after {
  content: '\2714';
  color: white;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}

#length-value {
  width: 30px;
  color: var(--primary-color);
  font-weight: 600;
  background-color: #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  padding: 2px 4px;
}

button {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  width: 100%;
  padding: 0.9rem;
  border-radius: 0.8rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

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

button:active {
  transform: translateY(0);
}

.strength-container {
  margin-top: 0.8rem;
}
.strength-container p {
  margin-bottom: 0.8rem;
  color: #4a5568;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#strength-label {
  font-weight: 600;
}

.strength-meter {
  height: 10px;
  width: 100%;
  border-radius: 5px;
  background-color: #edf2f7;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.strength-bar {
  background-color: var(--weak-color);
  width: 0;
  min-width: 15%;
  height: 100%;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.weak {
  background: var(--weak-color);
}
.medium {
  background: var(--medium-color);
}
.strong {
  background: var(--strong-color);
}

@media (max-width: 768px) {
  .container {
    padding: 1.8rem;
    width: 95%;
  }
  h1 {
    font-size: 1.7rem;
  }
  .option label {
    font-size: 0.9rem;
  }
}
