:root {
  --background-main-color: #161618;
  --category-title-color: #007bff;
  --hover-color: #1b1b1f;
}

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

html,body{
    width: 100%;
}
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    sans-serif;
  background: var(--background-main-color);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

main{
  width: 100%;
  max-width: 980px;
}

header {
  text-align: center;
  margin-bottom: 18px;
}
h1 {
  font-size: 28px;
  color: #ddd;
}
main{
    width: 980px;
    height: 400px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    border-radius: 4px;
    margin-bottom: 7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px;
}
main p{
    color: gray;
    text-align: center;
}
.showPassGenerated{
    width: 100%;
    height: 150px;
    background-color: var(--hover-color);
    border-radius: 4px;
    text-align: center;
    overflow-y: auto;
}
input[type="checkbox"]{
  accent-color: rgba(15, 138, 15, 0.774);
}
.passGenerated{
    width: 100%;
    height: 100%;
    font-size: 42px;
}

.configPassContainer{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: column;
}
#generatePass{
    padding: 12px;
    color: #fff;
    background-color: var(--hover-color);
    border: 1px solid #fff;
    border-radius: 4px;
    transition: 0.3s;
    font-weight: 900;
}
#generatePass:hover{
    cursor: pointer;
    background-color: #007bff;
}
#generatePass {
  margin: 0 auto; /* centraliza dentro do flex */
  display: block;
}
.actionButtons {
  margin: 10px 0;
  display: flex;
  gap: 10px;
}

.actionButtons button {
  padding: 8px 12px;
  background-color: var(--hover-color);
  border: 1px solid #fff;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  transition: 0.3s;
}

.actionButtons button:hover {
  cursor: pointer;
  background-color: #007bff;
}
.configPass{
    display: flex;
    gap: 20px;
}
.configPass label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}
/* Indicador de força */
.strengthContainer {
  width: 100%;
  margin: 15px 0;
  text-align: center;
}

.strengthBar {
  width: 100%;
  height: 12px;
  background: #333;
  border-radius: 6px;
  margin-top: 5px;
  overflow: hidden;
}

#strengthLevel {
  height: 100%;
  width: 0;
  background: red;
  transition: width 0.3s ease, background 0.3s ease;
  border-radius: 6px;
}

#strengthText {
  font-weight: bold;
}/* Container do slider */
.lengthControl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  margin-top: 10px;
  width: 100%;
  max-width: 300px;
  position: relative;
}

/* Tooltip */
.tooltip {
  position: absolute;
  top: -35px;
  left: 0;
  transform: translateX(-50%);
  background: #007bff;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.tooltip.show {
  opacity: 1;
}

/* Seta do tooltip */
.tooltip::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #007bff transparent transparent transparent;
}

#passLength {
  width: 70px;
  padding: 6px;
  border: 1px solid #fff;
  border-radius: 4px;
  background-color: var(--hover-color);
  color: #fff;
  font-weight: bold;
  text-align: center;
}

/* Remove as setinhas (já ajustado antes) */
#passLength::-webkit-outer-spin-button,
#passLength::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#passLength {
  -moz-appearance: textfield;
}

/* Slider estilizado */
#passRange {
  width: 100%;
  cursor: pointer;
  appearance: none;
  height: 6px;
  border-radius: 4px;
  background: #333;
}

#passRange::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
}
#passRange::-webkit-slider-thumb:hover {
  background: #0056b3;
}

#passRange::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
}

/* Footer */
.footer {
    width: 90%; /* aumenta a largura em telas menores */
    max-width: 1200px; /* mantém um limite em telas grandes */
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap; /* permite que os itens quebrem linha */
    justify-content: space-between;
    align-items: center;
    color: #555;
    font-weight: 600;
    padding: 20px 0;
    gap: 10px; /* espaçamento entre itens */
}

.footer p {
    margin: 0;
    flex: 1 1 100%; /* ocupa a largura toda em telas pequenas */
    text-align: center;
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 15px;
    flex: 1 1 100%; /* ocupa a largura toda em telas pequenas */
    justify-content: center;
    padding: 0;
    margin: 10px 0 0 0;
}

.footer-links a:hover {
    color: rgb(18, 38, 150);
}

a {
    text-decoration: none !important;
    color: inherit;
}

/* Media queries */
@media (min-width: 600px) {
    .footer {
        flex-wrap: nowrap; /* volta a ser em linha em telas maiores */
    }
    .footer p {
        flex: 1;
        text-align: left;
    }
    .footer-links {
        flex: 1;
        justify-content: flex-end;
        margin: 0;
    }
}
/* Telas pequenas (até 480px, celulares pequenos) */
@media (max-width: 480px) {
  main {
    width: 100%;
    height: auto;
    padding: 10px;
  }

  .passGenerated {
    font-size: 24px;
    word-wrap: break-word;
  }

  .configPass {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .actionButtons {
    flex-direction: column;
    width: 100%;
  }

  .actionButtons button {
    width: 100%;
  }
}

/* Telas médias (até 768px, tablets) */
@media (max-width: 768px) {
  main {
    width: 90%;
    height: auto;
  }

  .configPassContainer {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .configPass {
    justify-content: center;
    flex-wrap: wrap;
  }

  .lengthControl {
    width: 100%;
  }
}

/* Telas grandes (até 1024px, notebooks) */
@media (max-width: 1024px) {
  main {
    width: 95%;
  }

  .passGenerated {
    font-size: 32px;
  }
}

/* Telas muito grandes (ultrawide, acima de 1400px) */
@media (min-width: 1400px) {
  main {
    max-width: 1200px;
  }

  .passGenerated {
    font-size: 48px;
  }
}
