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

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f1f5f9;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.5rem;
  font-weight: bold;
  background: linear-gradient(45deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

header p {
  color: #94a3b8;
  font-size: 1.1rem;
}

.password-card,
.settings-card,
.history-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.password-card h2,
.settings-card h2,
.history-card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #e2e8f0;
}

.password-display {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.password-display:hover {
  border-color: rgba(96, 165, 250, 0.3);
}

#passwordText {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: 600;
  color: #60a5fa;
  letter-spacing: 2px;
  flex: 1;
  margin-right: 12px;
  word-break: break-all;
}

#copyBtn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#copyBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

#copyBtn.copied {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.strength-indicator {
  margin-top: 16px;
}

.strength-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.strength-header span:first-child {
  color: #94a3b8;
  font-size: 0.9rem;
}

#strengthLevel {
  font-weight: 600;
  font-size: 0.9rem;
}

#strengthLevel.weak { color: #ef4444; }
#strengthLevel.medium { color: #f59e0b; }
#strengthLevel.strong { color: #22c55e; }
#strengthLevel.very-strong { color: #10b981; }

.strength-bar {
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: 3px;
  overflow: hidden;
}

#strengthBar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

#strengthBar.weak {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

#strengthBar.medium {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

#strengthBar.strong {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

#strengthBar.very-strong {
  background: linear-gradient(90deg, #10b981, #059669);
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.option:hover {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(59, 130, 246, 0.1);
}

.option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
}

.option span {
  color: #e2e8f0;
  font-weight: 500;
}

.buttons {
  display: flex;
  gap: 12px;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(96, 165, 250, 0.5);
}

#historyList {
  max-height: 200px;
  overflow-y: auto;
}

.history-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #60a5fa;
  word-break: break-all;
}

.history-item:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(96, 165, 250, 0.3);
}

.empty-history {
  text-align: center;
  color: #64748b;
  font-style: italic;
  padding: 20px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: #f1f5f9;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

@media (max-width: 640px) {
  .container {
    padding: 0 10px;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .password-card,
  .settings-card,
  .history-card {
    padding: 16px;
  }
  
  #passwordText {
    font-size: 1rem;
  }
  
  .options {
    grid-template-columns: 1fr;
  }
  
  .buttons {
    flex-direction: column;
  }
}
