body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  text-align: center;
  padding: 20px;
  background-image: url('negao.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #333;
  overflow-wrap: break-word; /* Ensures long words break and wrap */
}

.content-wrapper {
  background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
  padding: 20px;
  border-radius: 8px;
  max-width: 800px; /* Limit content width */
  margin: 20px auto; /* Center the content wrapper */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

h1 {
  font-size: 1.8em;
  color: #2c3e50;
}

.input-area {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
  justify-content: center;
  align-items: center;
  gap: 15px; /* Space between elements */
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.input-group label {
  margin-bottom: 5px;
  font-weight: bold;
}

.or-separator {
  font-weight: bold;
  margin: 0 10px;
}

input[type="date"],
input[type="number"],
select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
  width: 180px; /* Fixed width for inputs */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

button {
  padding: 10px 20px;
  border: none;
  background-color: #3498db;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #2980b9;
}

#result {
  margin-top: 20px;
  font-size: 1.8em; /* Increased font size */
  line-height: 1.6;
  font-weight: bold; /* Make the text bold */
}

#event-result {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-left: 5px solid #3498db;
    text-align: left;
}

#event-result p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

#todo-area {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

#todo-area input {
  display: block;
  width: 80%;
  max-width: 400px;
  margin: 10px auto;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.guidance-section {
  margin-top: 40px;
  text-align: left;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9); /* Slightly more opaque for content */
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.guidance-section h2 {
  font-size: 1.6em;
  color: #2c3e50;
  margin-bottom: 15px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
}

.guidance-section h3 {
  font-size: 1.3em;
  color: #34495e;
  margin-top: 25px;
  margin-bottom: 10px;
}

.guidance-section p {
  margin-bottom: 15px;
  line-height: 1.8;
}

.guidance-section ul,
.guidance-section ol {
  margin-bottom: 15px;
  padding-left: 20px;
}

.guidance-section li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.guidance-section a {
  color: #3498db;
  text-decoration: none;
}

.guidance-section a:hover {
  text-decoration: underline;
}

.book-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
  gap: 20px;
  margin-top: 30px;
}

.book-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease-in-out;
}

.book-card:hover {
  transform: translateY(-5px);
}

.book-cover {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.book-card h4 {
  font-size: 1.1em;
  color: #2c3e50;
  margin-bottom: 10px;
}

.book-card p {
  font-size: 0.95em;
  line-height: 1.6;
  color: #555;
  margin-bottom: 15px;
}

.book-card a {
  display: inline-block;
  background-color: #3498db;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9em;
  transition: background-color 0.3s;
}

.book-card a:hover {
  background-color: #2980b9;
  text-decoration: none;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .input-area {
    flex-direction: column; /* Stack elements vertically */
    align-items: center;
    gap: 10px;
  }

  .input-group {
    width: 90%; /* Make input groups wider */
    align-items: center;
  }

  input[type="date"],
  input[type="number"],
  select {
    width: 100%; /* Full width within the input group */
    max-width: 250px; /* Limit max width */
  }

  .or-separator {
    margin: 10px 0;
  }

  button {
    width: 90%;
    max-width: 250px;
  }

  body {
    padding: 10px;
  }

  h1 {
    font-size: 1.5em;
  }

  #result {
    font-size: 1.4em; /* Adjusted font size for mobile */
  }

  .guidance-section {
    padding: 15px;
  }

  .guidance-section h2 {
    font-size: 1.4em;
  }

  .guidance-section h3 {
    font-size: 1.1em;
  }

  .book-cards-container {
    grid-template-columns: 1fr; /* Stack cards on very small screens */
  }
}

/* Word break for very long words to prevent overflow */
p, h1, h2, h3, h4, li {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.accordion-prompt {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.accordion-header {
    cursor: pointer;
    padding: 15px;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-content {
    display: none;
    padding: 15px;
    border-top: 1px solid #ccc;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-icon.open {
    transform: rotate(180deg);
}

.audible-button {
    display: inline-block;
    background-color: #007bff;
    color: #ffffff !important; /* Ensure text color is white */
    padding: 15px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
}

.audible-button:hover {
    background-color: #0056b3;
    text-decoration: none !important;
}

.fas {
    margin-right: 10px;
}

.sns-bye-image {
    display: block;
    margin: 20px auto;
    max-width: 80%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
