body {
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  color: #333;
  margin: 0;
}

header {
  background: #007bff;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
}

#themeToggle {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
}

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin: 1.5rem auto;
  max-width: 900px;
}

.section-title {
  color: #007bff;
  text-align: center;
}

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

.password-box {
  position: relative;
  flex: 1;
}

.password-box input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.eye-icon {
  position: absolute;
  right: 10px;
  top: 10px;
  cursor: pointer;
  font-size: 1.2rem;
}

.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.btn.primary { background: #007bff; color: white; }
.btn.secondary { background: #6c757d; color: white; }
.btn.primary:hover { background: #0056b3; }
.btn.secondary:hover { background: #545b62; }

#strengthMeter {
  width: 100%;
  height: 10px;
  background: #e9ecef;
  border-radius: 6px;
  margin-top: 1rem;
}

#strengthBar {
  height: 10px;
  width: 0;
  border-radius: 6px;
  transition: width 0.4s ease, background-color 0.4s ease;
}

.tips-list {
  margin-top: 1rem;
  list-style: none;
  padding: 0;
  color: #007bff;
  font-size: 0.95rem;
}

.tips-list li { margin-bottom: 0.4rem; }

#toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #007bff;
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  opacity: 0;
  transition: all 0.5s ease;
}

#toast.show {
  bottom: 30px;
  opacity: 1;
}

.dark-mode {
  background: #1c1f26;
  color: #f1f1f1;
}

.dark-mode .card { background: #2a2f3a; }
.dark-mode header { background: #333; }
.dark-mode .btn.primary { background: #0d6efd; }
.dark-mode a { color: #aad4ff; }

.tips-box {
  background: #e9f5ff;
  border-left: 4px solid #007bff;
  padding: 1rem;
  border-radius: 6px;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: #f8f9fa;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.8rem;
  cursor: pointer;
  font-weight: bold;
}

.faq-answer {
  display: none;
  margin-top: 0.5rem;
  color: #333;
}

.faq-item.active .faq-answer { display: block; }

/* Two-column layout for controls */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.5rem;
}

.controls-left label {
  display: block;
  margin-bottom: 0.5rem;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.controls-right {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: flex-start;
}

.controls-right .btn {
  width: 100%;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }
  .controls-right {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .controls-right .btn {
    flex: 1;
  }
}
.controls-right {
  background: #f1f5ff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
/* Password Input + Copy Layout */
.password-wrapper {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.password-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.password-box input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem; /* space for eye icon */
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-sizing: border-box;
}

.eye-icon {
  position: absolute;
  right: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  color: #555;
}

#copyBtn {
  white-space: nowrap;
  padding: 0 1.2rem;
  border-radius: 6px;
  font-weight: 500;
}
@media (max-width: 600px) {
  .password-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  #copyBtn {
    width: 100%;
  }
}
footer {
  text-align: center;
  padding: 1rem;
  background: #f1f1f1;
  color: #333;
  margin-top: 3rem;
}
.note-box {
  text-align: center;
  margin: 2rem auto;
  padding: 1rem 1.5rem;
  max-width: 800px;
  border: 2px solid #007bff;
  border-radius: 8px;
  background: #e9f5ff;
  font-size: 1rem;
  font-weight: 500;
  color: #0056b3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.note-box p {
  margin: 0;
}
