@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap");

:root {
  --white: #ffffff;
  --black: #000000;

  --grey-950: #08070b;
  --grey-900: #14131b;
  --grey-850: #18171f;
  --grey-800: #24232c;
  --grey-700: #54535b;
  --grey-600: #817d92;
  --grey-200: #e6e5ea;

  --green-200: #a4ffaf;
  --yellow-300: #f8cd65;
  --orange-400: #fb7c58;
  --red-500: #f64a4a;
  --gradient1: linear-gradient(to right, #14131b, #08070b);

  --spacing-100: 8px;
  --spacing-200: 16px;
  --spacing-300: 24px;
  --spacing-400: 32px;
  --spacing-500: 40px;
  --spacing-600: 48px;
  --spacing-700: 56px;
  --spacing-1000: 80px;
  --spacing-1200: 96px;
  --spacing-1300: 104px;
  --spacing-1500: 120px;
  --spacing-1600: 128px;
  --spacing-2000: 160px;
  --spacing-2200: 176px;
  --spacing-2300: 184px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  /* font-weight: 400; */
}

h1,
h2,
h3,
p {
  margin: 0;
}
body {
  background-color: var(--grey-950);
  color: var(--white);
}
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.card {
  width: 343px;
}
.title {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: var(--spacing-200);
}
.group-password {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--grey-800);
}
.group-password > input {
  width: 100%;
  padding: var(--spacing-200) var(--spacing-200);
  border: none;
  background-color: var(--grey-800);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}
.group-password > input::placeholder {
  color: var(--grey-700);
}
.group-password > input:focus {
  outline: none;
}
.group-password > button {
  background-color: transparent;
  border: none;
  cursor: pointer;
}
.group-password > button > .icon-copy {
  width: 21px;
  height: 24px;
  fill: var(--white);
}
.settings {
  background-color: var(--grey-800);
  padding: var(--spacing-200) var(--spacing-200);
  margin-top: var(--spacing-300);
}
.settings > .group-length > .label-length {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings > .group-length > .label-length > span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-200);
}

.settings > .group-length > input {
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  background: transparent;
  cursor: pointer;
}

.settings > .group-length > input {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(to right, #a4ffaf 50%, #1c1b23 50%);
  outline: none;
}

.settings > .group-length > input::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 28px;
  width: 28px;
  background: var(--white);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.options {
  margin: var(--spacing-400) 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-200);
}
.options > .option {
  display: flex;
  align-items: center;
  gap: var(--spacing-200);
}
/* .options > .option > .style-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #f64a4a;
}
.options > .option > .style-checkbox:checked {
  accent-color: var(--green-200);
} */

/* Oculta visualmente pero permite estilizar */
.style-checkbox {
  appearance: none; /* quita el estilo del navegador */
  width: 24px;
  height: 24px;
  border: 3px solid var(--white);
  /* border-radius: 6px; */
  position: relative;
  cursor: pointer;
}
.style-checkbox:hover {
  border: 3px solid var(--green-200);
}

/* Palomita con ::before */
.style-checkbox::before {
  content: "✓";
  color: var(--grey-800);
  font-weight: bold;
  position: absolute;
  top: 0;
  left: 5px;
  font-size: 18px;
  opacity: 0;
}

/* Al hacer check */
.style-checkbox:checked {
  background-color: var(--green-200);
  border: none;
}

/* Mostrar la palomita */
.style-checkbox:checked::before {
  opacity: 1;
}

.strength {
  background-color: var(--grey-950);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.strength-text {
  font-weight: 700;
  color: var(--grey-600);
  text-align: center;
}
.strength-level-bar-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.strength-level-bar-container > .strength-level-text {
  font-size: 1.2rem;
  font-weight: 700;
  margin-right: 10px;
}
.strength-level-bar-container > .strength-level-bar {
  border: 1px solid var(--grey-200);
  width: 10px;
  height: 28px;
}

.settings > .generate-button {
  margin-top: var(--spacing-200);
  width: 100%;
  padding: var(--spacing-200);
  background-color: var(--green-200);
  border: none;
  color: var(--grey-850);
  font-weight: 700;
  cursor: pointer;
}

.settings > .generate-button:hover {
  border: 2px solid var(--green-200);
  background-color: var(--grey-950);
  color: var(--green-200);
}

.settings > .generate-button:hover > .generate-button-icon {
  fill: var(--green-200);
}

.settings > .generate-button > .generate-button-icon {
  fill: #24232c;
}
.group-password > .alert-copied {
  display: none;
  color: var(--green-200);
}
