/* Basic Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f3f4f6;
  color: #333;
  line-height: 1.4;
  overflow-x: hidden;
}

/* Main & Favorite Containers */
.main-container,
.favorite-main-container {
  width: 95%;
  max-width: 1250px;
  margin: 1rem auto;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  background-color: #fff;
}

.title-h {
  font-size: 1.4rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subtitle {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #6b7280;
}

/* Generator Grid Layout */
.generator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 768px) {
  .generator-grid {
    grid-template-columns: 1fr;
  }
}

/* Form Section */
.form-section {
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  background-color: #fff;
}
.form-section label {
  display: block;
  font-weight: bold;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #374151;
}
.form-section input[type="text"],
.form-section select,
.form-section textarea {
  width: 100%;
  padding: 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  border: 1px solid #d1d5db;
  background: transparent;
  color: inherit;
}

/* Relative & Word Count */
.relative {
  position: relative;
}
.word-count {
  text-align: right;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: -0.4rem;
  margin-bottom: 0.6rem;
}

/* Icon button */
.icon-buttons {
  position: absolute;
  right: 0.4rem;
  top: 2.05rem;
}
.icon-buttons button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #6b7280;
}
.icon-buttons button:hover {
  color: #111827;
}

/* Collapsible */
.collapsible-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0 0.5rem 0;
  font-weight: bold;
  font-size: 0.9rem;
  color: #374151;
}
.collapsible-body {
  display: none;
  margin-bottom: 1rem;
}

/* Buttons */
.bg-gradient {
  background: linear-gradient(90deg, #553c9a, #ee4b2b) !important;
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bg-gradient:hover {
  transform: scale(1.02);
  opacity: 0.9;
}
.button-container {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}
#resetBtn {
  background-color: #f3f4f6;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
}
#resetBtn:hover {
  background-color: #e2e3e5;
}

/* Result Section */
.result-section {
  min-height: 400px;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  background-color: #fff;
}
#loadingIndicator {
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  min-height: 40px;
}
.loader {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-left-color: #000;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#placeholderPreview {
  color: #666;
  font-style: italic;
  margin-top: 1rem;
}

/* Reply List & Saved */
.reply-list {
  margin-top: 1rem;
}
.reply-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  margin-bottom: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
}
.reply-item p {
  flex: 1;
  margin-right: 0.5rem;
  font-size: 0.85rem;
}
.btn-icon {
  background: none;
  border: none;
  padding: 0.25rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: #374151;
}
.btn-icon:hover {
  color: #000;
}

/* Toast Notification */
.toast {
  visibility: hidden;
  position: fixed;
  left: 50%;
  bottom: -60px;
  transform: translateX(-50%);
  background-color: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
  transition: all 0.5s ease;
  z-index: 9999;
}
.toast.show {
  visibility: visible;
  bottom: 20px;
}

/* Hidden helper */
.hidden {
  display: none !important;
}

  .step {
      background-color: #f9f9f9;
      padding: 20px;
    }
    @media screen and (max-width: 768px) {
      .step {
        padding: 15px;
        margin-bottom: 20px;
        max-width: 100%;
        overflow-x: hidden;
      }
    }
    .step-description {
      font-size: 16px;
      color: #666;
    }
