body {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  color: white;
}

.box {
  width: 360px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
}
.box::selection{
  background-color:#00ffcc;
  color: #000;
}

h2 {
  margin-bottom: 15px;
}
#passwordgen{
  user-select: none;
}


#screen {
  background: #000;
  padding: 12px;
  border-radius: 8px;
  font-size: 18px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  word-break: break-all;
}

.len {
  display: block;
  margin-bottom: 10px;
}

.controls {
  text-align: left;
  margin: 10px 0;
  font-size: 14px;
}

.controls label {
  display: block;
  margin-bottom: 5px;
}

#strength {
  margin: 10px 0;
  font-weight: bold;
}

button {
  padding: 10px 20px;
  margin: 5px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #00ffcc;
  color: #000;
  font-weight: bold;
  transition: 0.3s;
}

button:hover {
  background: #00bfa6;
  transform: scale(1.05);
}

#history {
  list-style: none;
  padding: 0;
  max-height: 120px;
  overflow-y: auto;
  margin: 10px 0;
}

#history li {
  background: rgba(0,0,0,0.4);
  padding: 6px;
  margin-bottom: 5px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
}

#history li:hover {
  background: #00ffcc;
  color: black;
}

#clearHistory {
  background: crimson;
  color: white;
}

#clearHistory:hover {
  background: darkred;
}​body {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  color: white;
}

.box {
  width: 340px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

h2 {
  margin-bottom: 15px;
}

#screen {
  background: #000;
  padding: 12px;
  border-radius: 8px;
  font-size: 18px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  word-break: break-all;
}

.controls {
  text-align: left;
  margin: 10px 0;
  font-size: 14px;
}

.controls label {
  display: block;
  margin-bottom: 5px;
}

#strength {
  margin: 10px 0;
  font-weight: bold;
}

button {
  padding: 10px 20px;
  margin: 5px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #00ffcc;
  color: #000;
  font-weight: bold;
  transition: 0.3s;
}

button:hover {
  background: #00bfa6;
  transform: scale(1.05);
}
/* 📱 Mobile Responsive */
@media (max-width: 480px) {

  body {
    padding: 15px;
    align-items: flex-start;
  }

  .box {
    width: 100%;
    padding: 20px;
    margin-top: 40px;
    border-radius: 12px;
  }

  h2 {
    font-size: 20px;
  }

  #screen {
    font-size: 16px;
    padding: 10px;
    letter-spacing: 1px;
  }

  .controls {
    font-size: 13px;
  }

  .controls label {
    margin-bottom: 8px;
  }

  button {
    width: 100%;
    margin: 6px 0;
    padding: 12px;
    font-size: 15px;
  }

  #history {
    max-height: 100px;
  }

  #history li {
    font-size: 13px;
    padding: 8px;
  }
}