/* ================================
   PAGE LAYOUT
================================ */

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background: #0f1116;
  color: #fff;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #13161d;
  border-bottom: 1px solid #20242f;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #4f46e5;
}

.logo-text {
  font-size: 1rem;
  font-weight: 600;
}

.hint {
  opacity: 0.8;
  font-size: 0.85rem;
}

.pw-container {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 2rem;
}

@media (max-width: 900px) {
  .pw-container {
    grid-template-columns: 1fr;
  }
}

.pw-card {
  background: #151922;
  border-radius: 1rem;
  padding: 1.6rem 1.8rem;
  border: 1px solid #242a38;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

h1, h2 {
  margin: 0 0 1rem;
  font-weight: 600;
}

/* ================================
   INPUT FIELD
================================ */

.pw-input-wrapper label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

.pw-input-shell {
  display: flex;
  align-items: center;
  background: #0e1117;
  border-radius: 999px;
  padding: 0.4rem 0.55rem;
  border: 1px solid #2a3143;
}

.pw-input-shell input {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
  outline: none;
}

.icon-btn {
  border: none;
  background: transparent;
  color: #ccc;
  padding: 0.4rem 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  font-size: 1rem;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.08);
  opacity: 1;
}

.pw-copy-toast {
  font-size: 0.75rem;
  margin-top: 0.3rem;
  opacity: 0;
  transform: translateY(-4px);
  color: #86efac;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pw-copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   STRENGTH METER
================================ */

.pw-strength {
  margin-top: 1.4rem;
}

.pw-strength-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.pw-strength-bar {
  height: 0.55rem;
  border-radius: 999px;
  background: #1f2431;
  overflow: hidden;
}

#strengthFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
  transition: width 0.25s ease;
}

.pw-strength-meta {
  font-size: 0.78rem;
  margin-top: 0.4rem;
  opacity: 0.75;
  display: flex;
  gap: 0.7rem 1.2rem;
  flex-wrap: wrap;
}

/* ================================
   CHECKLIST
================================ */

.pw-checklist ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.pw-checklist li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 0.25rem 0;
}

.check-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border-radius: 50%;
  border: 1px solid #3b4252;
}

/* Filled state */
.pw-checklist li.ok .check-icon {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

/* ================================
   SUGGESTIONS
================================ */

.pw-suggestions ul {
  padding-left: 1.2rem;
}

.pw-suggestions li {
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0.3rem 0;
}

/* ================================
   GENERATOR PANEL
================================ */

.pw-generator .pw-gen-row {
  margin-bottom: 1.2rem;
}

#genLength {
  width: 100%;
}

.pw-gen-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 1rem;
  margin: 1rem 0;
}

.pw-gen-options label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.primary-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  font-size: 0.9rem;
  transition: 0.15s;
}

.primary-btn:hover {
  filter: brightness(1.05);
}

.pw-gen-hint {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.3rem;
}
