/* Password Generator — golden luxury */

.tool-container {
  margin: 0 auto;
  padding: 0;
}

.tool-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.generator-section,
.tester-section {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 14px 36px -24px rgba(94, 65, 30, 0.35);
  border: 1px solid rgba(145, 103, 48, 0.2);
}

.generator-section h2,
.tester-section h2 {
  color: #5e4329;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.generator-section h2 i,
.tester-section h2 i {
  color: #b98b3b;
}

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

.option-group label {
  display: block;
  color: #4f3a24;
  font-weight: 500;
  margin-bottom: 10px;
}

.range-container {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
}

#length {
  flex: 1;
  height: 8px;
  border-radius: 15px;
  background: linear-gradient(to right, rgba(145, 103, 48, 0.12) 0%, rgba(145, 103, 48, 0.12) 100%);
  background-image: linear-gradient(to right, #bc8e3d 0%, #bc8e3d 100%);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  outline: none;
  -webkit-appearance: none;
  border: 1px solid rgba(145, 103, 48, 0.35);
  box-shadow: 0 0 6px rgba(171, 124, 52, 0.15);
}

#length::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #bc8e3d, #9f742f);
  cursor: pointer;
  border: 3px solid #fffaf2;
  box-shadow: 0 2px 8px rgba(94, 65, 30, 0.25);
  transition: all 0.3s ease;
}

#length::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 12px rgba(171, 124, 52, 0.45);
}

#length::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #bc8e3d, #9f742f);
  cursor: pointer;
  border: 3px solid #fffaf2;
  box-shadow: 0 2px 8px rgba(94, 65, 30, 0.25);
}

#lengthValue {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(145, 103, 48, 0.25);
  border: 1px solid rgba(145, 103, 48, 0.2);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-item input[type='checkbox'] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(145, 103, 48, 0.45);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-item input[type='checkbox']:checked {
  background: linear-gradient(180deg, #bc8e3d, #9f742f);
  border-color: #9f742f;
}

.checkbox-item input[type='checkbox']:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff8ef;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-item label {
  color: #4a351f;
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0;
}

.password-output {
  margin-top: 20px;
}

.password-display {
  position: relative;
  display: flex;
  align-items: center;
}

#generatedPassword {
  flex: 1;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.28);
  border-radius: 8px;
  padding: 12px 50px 12px 15px;
  color: #4a351f;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  outline: none;
}

.copy-btn {
  position: absolute;
  right: 5px;
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: linear-gradient(180deg, #c89a4a 0%, #aa7d34 100%);
  transform: scale(1.05);
}

.test-input {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

#testPassword {
  width: 100%;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.28);
  border-radius: 8px;
  padding: 12px 15px;
  color: #4a351f;
  font-size: 1rem;
  outline: none;
}

.strength-display {
  margin-bottom: 20px;
}

.strength-bar {
  width: 100%;
  height: 8px;
  background: rgba(145, 103, 48, 0.12);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.strength-progress {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.strength-text {
  color: #4f3a24;
  font-weight: 500;
  text-align: center;
}

.strength-progress.weak {
  background: #c94a3a;
  width: 25%;
}

.strength-progress.fair {
  background: #d97a4a;
  width: 50%;
}

.strength-progress.good {
  background: #c9a03a;
  width: 75%;
}

.strength-progress.strong {
  background: linear-gradient(90deg, #9a7a3a, #5a7c3a);
  width: 100%;
}

.strength-details h3 {
  color: #5e4329;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.strength-details ul {
  list-style: none;
  padding: 0;
}

.strength-details li {
  color: rgba(88, 64, 38, 0.75);
  margin-bottom: 8px;
  padding-left: 25px;
  position: relative;
  transition: color 0.3s ease;
}

.strength-details li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #c94a3a;
  font-weight: bold;
}

.strength-details li.met {
  color: #7a5526;
}

.strength-details li.met::before {
  content: '✓';
  color: #5a7c3a;
}

.btn-primary {
  margin: 20px 20px;
}

@media (max-width: 768px) {
  .generator-section,
  .tester-section {
    padding: 20px;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .checkbox-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(145, 103, 48, 0.1);
  }

  .checkbox-item:last-child {
    border-bottom: none;
  }

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

  #generatedPassword {
    padding: 10px 40px 10px 12px;
    font-size: 0.9rem;
    border-width: 1px;
  }

  #testPassword {
    padding: 10px 12px;
    font-size: 0.9rem;
    border-width: 1px;
  }

  #length {
    height: 6px !important;
    border-radius: 15px !important;
    border-width: 1px !important;
    box-shadow: 0 0 4px rgba(171, 124, 52, 0.15) !important;
    background: rgba(145, 103, 48, 0.12) !important;
  }

  #length::-webkit-slider-thumb {
    width: 26px !important;
    height: 26px !important;
    border-width: 2px !important;
  }

  #length::-moz-range-thumb {
    width: 26px !important;
    height: 26px !important;
    border-width: 2px !important;
  }
}

@media (max-width: 480px) {
  .range-container {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    padding: 15px 0;
  }

  #length {
    height: 4px !important;
    border-radius: 15px !important;
    border-width: 1px !important;
    box-shadow: 0 0 3px rgba(171, 124, 52, 0.12) !important;
    background: rgba(145, 103, 48, 0.12) !important;
  }

  #length::-webkit-slider-thumb {
    width: 28px !important;
    height: 28px !important;
    border-width: 2px !important;
  }

  #length::-moz-range-thumb {
    width: 28px !important;
    height: 28px !important;
    border-width: 2px !important;
  }

  #lengthValue {
    align-self: center;
    padding: 10px 20px;
    font-size: 1.2rem;
    min-width: 60px;
    box-shadow: 0 3px 10px rgba(145, 103, 48, 0.2);
  }
}
