.prompt-label {
  text-align: center;
  margin: 1rem 0;
  /* Equal vertical spacing above and below */
  font-weight: 300;
  color: #555;
  font-size: 0.90rem;
}

.highlight-box {
  background: #f5f4f4;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  border: 0px solid gray;
  margin-top: -1rem;
}

body {
  background: white;
  margin: 0;
  /* padding: 4rem 2rem 2rem 2rem; */
  display: flex;
  /* justify-content: center; */
  color: var(--text-color);
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
button,
a,
input,
textarea {
  font-family: var(--font-main);
}

a {
  color: var(--text-color);
  text-decoration: none;
  /* Optional: removes underline */
}

.container {
  background: white;
  border-radius: 1rem;
  /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); */
  padding: 2rem;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
}

@media (max-width: 700px) {
  .container {
    padding: 2rem 0;
  }
}

textarea {
  display: block;
  width: 100%;
  min-height: 80px;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  cursor: pointer;
}

.pill.active {
  background: #dbeafe;
  border-color: #3b82f6;
}

.field {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  margin-top: 0.75rem;
  box-sizing: border-box;
}

.submit-btn {
  background: #203a61;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  margin-top: 1rem;
  cursor: pointer;
}

.example-prompts {
  display: flex;
  flex-wrap: nowrap;
  /* Prevent wrapping */
  gap: 1rem;
  overflow-x: auto;
  /* Add horizontal scroll if content overflows */
  white-space: nowrap;
  /* Prevent internal text wrapping, optional */
  width: 100%;
  max-width: 900px;
  margin-bottom: 2rem;
  justify-content: center;
}

.example-container > span {
  display: inline-block;
  margin-bottom: 2rem;
}

@media (max-width: 630px) {
  .prompt-hide.p630 {
    display: none;
  }
}

@media (max-width: 500px) {
  .prompt-hide.p500 {
    display: none;
  }

  .section-title, #story-title-section {
    margin: auto 0;
  }
}

.prompt-example {
  color: var(--text-color);
  background: #fff;
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: background 0.2s ease;
  /* Force wrap */
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  height: 100%;
  width: 100%;
  /* Takes full width within a fixed-size flex child */
  min-width: 100px;
  /* Minimum size it can shrink to */
  max-width: 180px;
  /* Maximum size it can grow to */
  flex: 1 0 auto;
  /* Grow but don’t shrink below min-width */
  /* Don't let it shrink below min-width */
  /* Allows responsiveness within reason */
}

.prompt-example:hover {
  background: #f3f4f6;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  display: none;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
}

.modal-actions {
  display: none;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.modal-actions.show {
  display: flex;
}

.modal-actions button {
  background: #e5e7eb;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.modal-actions a.toggle-books {
  color: var(text-color-modal-toggle-ads);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.modal-actions a.toggle-books:hover {
  text-decoration: underline;
}

.book-suggestions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  justify-content: center;
}

.book-suggestions div {
  text-align: center;
  width: 30%;
}

.book-suggestions img {
  width: 100px;
  height: 150px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.book-suggestions a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.9rem;
  display: inline-block;
  margin-top: 0.5rem;
}

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

.loading-message {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: center;
  color: var(--text-color-loading);
}

.loading-dots::after {
  content: '...';
  animation: blink 1s infinite;
  display: inline-block;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.scrolled-shadow {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.section-title {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
}

@media (max-width: 490px) {
  .link-menu {
    gap: 0px !important;
  }
}