/**
 * Password Generator
 * Professional styling for secure password generation tool
 */

/* Root variables for theming */
:root {
  /* Dark theme (default) */
  --bg-color: #121212;
  --container-bg: #1e1e2e;
  --card-bg: #2d2d3f;
  --text-color: #f0f0f0;
  --text-secondary: #b0b0b0;
  --border-color: #3a3a50;
  --input-bg: #2a2a3d;
  --primary-color: #6d5acd;
  --primary-hover: #5a49b6;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --header-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Light theme */
body.light-mode {
  --bg-color: #f5f5f7;
  --container-bg: #ffffff;
  --card-bg: #f0f0f4;
  --text-color: #333333;
  --text-secondary: #666666;
  --border-color: #d1d5db;
  --input-bg: #ffffff;
  --primary-color: #5a49b6;
  --primary-hover: #4a3aa6;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --header-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Inter', 'Segoe UI', Roboto, -apple-system, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  min-height: 100vh;
  transition: all 0.3s ease;
}

/* Main container */
.container {
  background: var(--container-bg);
  max-width: 700px;
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header section */
.app-header {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: var(--header-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-title {
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-controls {
  display: flex;
  gap: 0.5rem;
}

/* Main content */
.app-content {
  padding: 2rem;
  flex: 1;
}

/* Form elements */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--input-bg);
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.2s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(109, 90, 205, 0.2);
}

.input-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.input-row .form-group {
  flex: 1;
  min-width: 200px;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-success {
  background: var(--success-color);
}

.btn-success:hover {
  background: #0da56f;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--primary-color);
}

/* Strength meter */
#strengthMeter {
  width: 100%;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  margin-top: 1rem;
  height: 8px;
  position: relative;
  overflow: hidden;
}

#strengthBar {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.3s, background 0.3s;
}

#strengthText {
  font-size: 0.9rem;
  display: block;
  margin-top: 0.5rem;
  font-weight: 500;
}

#strengthDetails {
  margin-top: 0.75rem;
  background: var(--card-bg);
  border-radius: 6px;
  padding: 1rem;
  display: none;
}

#strengthDetailsList {
  list-style: none;
}

#strengthDetailsList li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

#strengthDetailsList li.passed .check-icon {
  color: var(--success-color);
}

#strengthDetailsList li.failed .check-icon {
  color: var(--error-color);
}

/* Generated passwords section */
#output {
  margin-top: 2rem;
}

.passwords-container {
  margin-top: 1rem;
  background: var(--card-bg);
  border-radius: 6px;
  overflow: hidden;
}

.password-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

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

.password-index {
  font-weight: 600;
  margin-right: 0.75rem;
  color: var(--primary-color);
  min-width: 1.5rem;
}

.password-text {
  font-family: 'Roboto Mono', monospace;
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  padding-right: 1rem;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.copy-btn:hover {
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
}

/* Bulk actions */
#bulkActions {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Footer */
.app-footer {
  padding: 1rem 2rem;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.app-footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s;
}

.app-footer a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

/* Notification */
#notification {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  z-index: 1000;
  transition: bottom 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#notification.show {
  bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .app-controls {
    width: 100%;
    justify-content: flex-end;
  }
  
  .input-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
 }