.pg-container {
  max-width: 1080px;
}

.pg-tool {
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  margin-top: 22px;
  padding: 18px;
}

.pg-output-card,
.pg-controls {
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 42, 67, .08);
}

.pg-output-card {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .11), rgba(124, 58, 237, .08)),
    #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: 92px minmax(0, 1fr);
  padding: 22px;
}

.pg-lock {
  align-items: center;
  background: linear-gradient(135deg, #102a43, #0f766e);
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 2.25rem;
  height: 92px;
  justify-content: center;
  width: 92px;
}

.pg-output-wrap label,
.pg-control label,
.pg-switch {
  color: #334155;
  font-weight: 700;
}

.pg-output-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 9px;
}

#pg-password {
  background: #101827;
  border: 1px solid #263850;
  border-radius: 8px;
  color: #f8fafc;
  font-family: Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .04em;
  min-height: 52px;
  overflow: hidden;
  padding: 12px 14px;
  text-overflow: ellipsis;
  width: 100%;
}

.pg-icon-btn {
  min-width: 92px;
}

.pg-meter {
  background: #e2e8f0;
  border-radius: 999px;
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
}

.pg-meter span {
  background: #ef4444;
  display: block;
  height: 100%;
  transition: width .2s ease, background .2s ease;
  width: 0;
}

.pg-strength {
  color: #334155;
  font-weight: 700;
  margin: 9px 0 0;
}

.pg-controls {
  background: #f8fafc;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.pg-control {
  display: grid;
  gap: 10px;
}

.pg-control-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

#pg-length-value {
  background: #102a43;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  min-width: 44px;
  padding: 5px 10px;
  text-align: center;
}

#pg-length,
#pg-length-number {
  width: 100%;
}

#pg-length-number {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-size: 1rem;
  min-height: 42px;
  padding: 9px 10px;
}

.pg-switch {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 32px;
  position: relative;
  touch-action: manipulation;
}

.pg-switch input {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  height: 28px;
  left: 0;
  margin: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 52px;
  z-index: 2;
}

.pg-switch input:focus-visible + .pg-switch-track {
  outline: 3px solid rgba(15, 118, 110, .28);
  outline-offset: 3px;
}

.pg-switch-track {
  background: #94a3b8;
  border-radius: 999px;
  height: 28px;
  position: relative;
  transition: background .2s ease;
  width: 52px;
}

.pg-switch-track::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 22px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform .2s ease;
  width: 22px;
}

.pg-switch input:checked + .pg-switch-track {
  background: #0f766e;
}

.pg-switch input:checked + .pg-switch-track::after {
  transform: translateX(24px);
}

.pg-actions {
  display: grid;
  gap: 10px;
}

.pg-actions button,
.pg-icon-btn {
  font-weight: 700;
}

.pg-copy-feedback {
  background: #102a43;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15, 42, 67, .22);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  left: 0;
  opacity: 0;
  padding: 7px 11px;
  pointer-events: none;
  position: fixed;
  top: 0;
  transform: translate(-50%, -140%) scale(.96);
  transition: opacity .16s ease, transform .16s ease;
  z-index: 100000;
}

.pg-copy-feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, -155%) scale(1);
}

@media (max-width: 860px) {
  .pg-tool {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .pg-tool {
    padding: 12px;
  }

  .pg-output-card {
    grid-template-columns: 1fr;
  }

  .pg-output-row {
    grid-template-columns: 1fr;
  }

  .pg-lock {
    height: 72px;
    width: 72px;
  }
}
