:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 60px; /* Add this to ensure extra scroll space at the very bottom */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  margin-bottom: 40px; /* Add this line to create a gap below the header */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

/* Generator Card */
main {
  margin-top: 40px;
  padding-bottom: 40px;
}

.generator-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px; /* Add this to force space directly below the card */
}

h1 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.8rem;
}

/* Password Display area */
.display-container {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

#password-display {
  flex-grow: 1;
  padding: 15px;
  font-size: 1.2rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-main);
  letter-spacing: 1px;
}

.icon-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0 20px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--primary-hover);
}

/* Controls */
.control-group {
  margin-bottom: 20px;
}

.control-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}

input[type="range"] {
  width: 100%;
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.primary-btn {
  width: 100%;
  padding: 15px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-btn:hover {
  background-color: var(--primary-hover);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .nav-container {
    flex-direction: column;
    gap: 15px;
  }
  .generator-card {
    padding: 20px;
  }
  .display-container {
    flex-direction: column;
  }
  .icon-btn {
    padding: 15px;
  }
}

/* SEO Content Section (How-To & FAQ) */
.seo-content-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.seo-content-section h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.6rem;
  color: var(--text-main);
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.step-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
  text-align: center;
  border: 1px solid var(--border-color);
}

.step-number {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0 auto 15px auto;
}

.step-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* FAQ Accordion */
.faq-section {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: normal;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-content {
  padding: 0 20px 20px 20px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 25px 0;
  margin-top: auto; /* Pushes the footer to the bottom if content is short */
  text-align: center;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}
