:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1.25rem;
}

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

.tabs-header {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  flex-wrap: wrap;
}

.tab-button {
  padding: 1rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
}

.tab-button span {
  margin-right: 0.5rem;
  font-size: 1.2em;
}

.tab-button:hover {
  color: var(--primary-color);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.tool-card h2 {
  color: #1f2937;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

textarea,
input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

textarea {
  min-height: 120px;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  resize: vertical;
  margin-bottom: 1.5rem;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  cursor: pointer;
}

.settings {
  margin-bottom: 1.5rem;
}

.setting-group {
  margin-bottom: 1.5rem;
}

.checkbox-group {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  margin: 0;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.75rem;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.hash-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.hash-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hash-item input {
  background-color: #f9fafb;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.password-display {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.password-display input {
  flex: 1;
  background-color: #f9fafb;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 1rem;
  letter-spacing: 1px;
}

.output-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#text-output {
  background-color: #f9fafb;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.85rem;
  word-wrap: break-word;
  white-space: pre-wrap;
  min-height: 150px;
}

.copy-btn,
.btn-copy {
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.copy-btn.copied,
.btn-copy.copied {
  background: var(--success);
}

.btn-generate {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 6px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1.5rem;
}

.btn-generate:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.strength-meter {
  margin-bottom: 1rem;
}

.strength-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

#strength-text {
  color: var(--warning);
  font-weight: 700;
}

.strength-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  background: var(--warning);
  transition: all 0.3s ease;
}

.strength-fill.weak {
  width: 33%;
  background: var(--danger);
}

.strength-fill.medium {
  width: 66%;
  background: var(--warning);
}

.strength-fill.strong {
  width: 100%;
  background: var(--success);
}

.status-message {
  text-align: center;
  font-size: 0.85rem;
  color: var(--success);
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-message.show {
  opacity: 1;
}

@media (max-width: 768px) {
  .tool-card {
    padding: 1.5rem;
  }

  .tabs-header {
    gap: 0.25rem;
  }

  .tab-button {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .tab-button span {
    margin-right: 0.25rem;
  }

  .password-display {
    flex-direction: column;
  }

  .btn-copy {
    width: 100%;
  }
}
