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

html, body {
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

body {
  background: url('../imagens/001.jpg') no-repeat center center fixed;
  background-size: cover;
  position: relative;
  transition: background-image 0.8s ease-in-out;
}

/* Fallback caso a imagem não carregue */
body.no-image {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.svg-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.overlay {
  position: relative;
  z-index: 1;
  background-color: rgba(15, 23, 42, 0.85);
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: rgba(30, 41, 59, 0.95);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  text-align: center;
  width: 100%;
  max-width: 550px;
  color: #f8fafc;
  animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

h1 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  color: #d1d5db;
}

#password, #testPassword {
  font-family: monospace;
  font-size: 0.9rem;
  background: #334155;
  color: #f1f5f9;
  padding: 10px;
  margin: 15px 0;
  border: none;
  border-radius: 8px;
  width: 100%;
  text-align: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#password:focus, #testPassword:focus {
  outline: none;
  background: #1e293b;
  box-shadow: 0 0 0 2px #3b82f6aa;
}

button {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease, transform 0.2s ease;
  margin-bottom: 0.8rem;
}

button:hover {
  background-color: #2563eb;
  transform: scale(1.03);
}

.options {
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: left;
  margin: 0.8rem 0;
  background: rgba(51, 65, 85, 0.3);
  padding: 0.8rem;
  border-radius: 8px;
}

.option-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.4rem;
  width: 100%;
}

.option-row label {
  margin-left: 0.4rem;
  flex: 1;
  font-size: 0.85rem;
}

.length-option {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 0.4rem;
}

.length-option > label {
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.range-slider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.range-slider input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #475569;
  border-radius: 3px;
  outline: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  transition: background 0.15s ease;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
  background: #2563eb;
}

.range-slider input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease;
}

.range-slider input[type="range"]::-moz-range-thumb:hover {
  background: #2563eb;
}

.range-slider input[type="number"] {
  width: 2.5rem;
  text-align: center;
  padding: 3px;
  border-radius: 4px;
  border: none;
  background: #334155;
  color: #fff;
  font-size: 0.8rem;
}

.strength-meter {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.3);
  text-align: left;
}

.strength-bar {
  height: 6px;
  width: 100%;
  background: #475569;
  border-radius: 3px;
  margin: 0.4rem 0 0.8rem;
  position: relative;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.5s ease, background-color 0.5s ease;
}

.strength-title {
  font-weight: bold;
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.strength-info {
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

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

.copy-feedback {
  position: absolute;
  right: 8px;
  top: -18px;
  background: #3b82f6;
  color: white;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 0.65rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.show-feedback {
  opacity: 1;
}

.tabs {
  display: flex;
  margin-bottom: 0.8rem;
  border-radius: 8px;
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 8px;
  cursor: pointer;
  background: #334155;
  color: #d1d5db;
  border: none;
  font-weight: bold;
  transition: background 0.3s ease;
  margin: 0;
  border-radius: 0;
  font-size: 0.8rem;
}

.tab-btn.active {
  background: #3b82f6;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  .container {
    padding: 1rem;
    border-radius: 10px;
    width: 95%;
  }
  h1 {
    font-size: 1.2rem;
  }
  .tab-btn {
    padding: 6px;
    font-size: 0.7rem;
  }
}
