/* Footer styles */
.footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 1rem;
  color: #6366f1;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.92;
  animation: fadeIn 1.2s 0.2s backwards;
}
.footer a {
  color: #2d3748;
  text-decoration: underline dotted;
  transition: color 0.2s;
}
.footer a:hover {
  color: #6366f1;
}
/* Reset & base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, pink, blue  100%);
  color: #222;
}
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container {
  background: rgba(255,255,255,0.95);
  border-radius: 2rem;
  box-shadow: 0 8px 32px 0 rgba(60,60,120,0.18), 0 1.5px 8px 0 rgba(99,102,241,0.08);
  padding: 2.2rem 2.7rem;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  animation: fadeIn 1s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(2.5px);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
section {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
h1 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.7rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.3s;
  outline: none;
  background: #f8fafc;
  box-shadow: 0 1.5px 8px 0 rgba(99,102,241,0.04);
}
input[type="password"]:focus,
input[type="text"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px #6366f1aa;
}
.strength-meter {
  width: 100%;
  height: 0.6rem;
  background: #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
}
.strength-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ef4444, #f59e42, #22c55e);
  border-radius: 0.5rem;
  transition: width 0.5s cubic-bezier(.4,0,.2,1), background 0.4s, box-shadow 0.3s;
  box-shadow: 0 0 8px 0 rgba(34,197,94,0.15);
  will-change: width, background;
}
.strength-text {
  font-size: 1rem;
  font-weight: 600;
  min-height: 1.2em;
  letter-spacing: 0.01em;
  transition: color 0.3s, transform 0.3s;
  will-change: color, transform;
}
.generator-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.option-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.option-row label {
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
}
input[type="range"] {
  accent-color: #6366f1;
  width: 120px;
}
#length-value {
  min-width: 2ch;
  display: inline-block;
  font-weight: 500;
}
button {
  background: linear-gradient(90deg, #17bfce 0%, #e92719 100%);
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(55,48,163,0.12);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
button:active {
  transform: scale(0.97) rotate(-1deg);
  box-shadow: 0 1px 4px rgba(99,102,241,0.12);
}
button:focus {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px #6366f1aa;
}
.output-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.5rem;
}
#generated-password {
  flex: 1;
  font-size: 1.1rem;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.7rem;
  padding: 0.7rem 1rem;
  transition: border-color 0.2s, box-shadow 0.3s, transform 0.2s;
  box-shadow: 0 1.5px 8px 0 rgba(99,102,241,0.04);
}
.copy-msg {
  min-height: 1.2em;
  font-size: 0.98rem;
  color: #22c55e;
  margin-top: 0.2rem;
  transition: opacity 0.3s;
  opacity: 0;
}
.copy-msg.visible {
  opacity: 1;
  animation: popIn 0.5s cubic-bezier(.4,0,.2,1);
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.9) rotate(-2deg); }
  60% { opacity: 1; transform: scale(1.05) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
@media (max-width: 600px) {
  html, body {
    font-size: 15px;
  }
  .container {
    padding: 1rem 0.2rem;
    max-width: 99vw;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(60,60,120,0.13);
    gap: 1.2rem;
  }
  h1 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }
  .option-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
  }
  .output-row {
    flex-direction: column;
    gap: 0.3rem;
    align-items: stretch;
  }
  input[type="password"],
  input[type="text"] {
    font-size: 0.98rem;
    padding: 0.6rem 0.7rem;
  }
  #generated-password {
    font-size: 1rem;
    padding: 0.6rem 0.7rem;
  }
  button {
    font-size: 0.98rem;
    padding: 0.6rem 1rem;
  }
  .strength-text {
    font-size: 0.95rem;
  }
  .strength-meter {
    height: 0.5rem;
  }
}
@media (max-width: 400px) {
  .container {
    padding: 0.5rem 0.1rem;
    border-radius: 0.7rem;
  }
  h1 {
    font-size: 0.92rem;
  }
  button {
    font-size: 0.92rem;
    padding: 0.5rem 0.7rem;
  }
}
