/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 500px;
}

.password-generator {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 2rem;
  font-weight: 600;
}

/* Password Display */
.password-display {
  position: relative;
  margin-bottom: 30px;
}

#passwordOutput {
  width: 100%;
  padding: 15px 50px 15px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  font-family: "Courier New", monospace;
  background: #f8f9fa;
  color: #333;
  transition: all 0.3s ease;
}

#passwordOutput:focus {
  outline: none;
  border-color: #667eea;
  background: white;
}

.copy-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #667eea;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: #5a67d8;
  transform: translateY(-50%) scale(1.05);
}

.copy-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Settings */
.settings {
  margin-bottom: 25px;
}

.setting-group {
  margin-bottom: 25px;
}

.setting-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
}

.length-control {
  display: flex;
  align-items: center;
  gap: 15px;
}

#passwordLength {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
}

#passwordLength::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#passwordLength::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: none;
}

#lengthValue {
  min-width: 30px;
  text-align: center;
  font-weight: bold;
  color: #667eea;
  font-size: 18px;
}

/* Checkboxes */
.checkbox-group {
  margin-bottom: 25px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.checkbox-item:hover {
  background: rgba(102, 126, 234, 0.05);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
}

.checkbox-item label {
  cursor: pointer;
  font-weight: 500;
  color: #555;
  margin: 0;
}

/* Buttons */
.button-group {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.generate-btn,
.clear-btn {
  flex: 1;
  padding: 15px 25px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.generate-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.clear-btn {
  background: #f8f9fa;
  color: #666;
  border: 2px solid #e0e0e0;
}

.clear-btn:hover {
  background: #e9ecef;
  border-color: #dee2e6;
  transform: translateY(-2px);
}

/* Password Strength */
.password-strength {
  margin-top: 20px;
}

.strength-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

#strengthText {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

/* Strength levels */
.strength-weak {
  background: #ff6b6b !important;
  color: #ff6b6b !important;
}

.strength-medium {
  background: #feca57 !important;
  color: #feca57 !important;
}

.strength-strong {
  background: #48dbfb !important;
  color: #48dbfb !important;
}

.strength-very-strong {
  background: #1dd1a1 !important;
  color: #1dd1a1 !important;
}

/* Copy notification */
.copy-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1dd1a1;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.copy-notification.show {
  transform: translateX(0);
}

/* Responsive design */
@media (max-width: 768px) {
  .password-generator {
    padding: 25px;
    margin: 10px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .button-group {
    flex-direction: column;
  }

  .generate-btn,
  .clear-btn {
    width: 100%;
  }
}

/* Animation for password generation */
@keyframes generatePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.generating {
  animation: generatePulse 0.3s ease-in-out;
}
