body {
  margin: 0;
  font-family: "Merriweather", "Georgia", serif;
  background: #f6f5f3;
  color: #2d2d2d;
}

header {
  background: url("header.jpg") center/cover no-repeat, #fff;
  color: #1b4482;
  padding: 32px 0 16px 0;
  text-align: center;
  border-bottom: 2px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  position: relative;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
header::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Soft blue overlay tint for the header image */
  background: linear-gradient(rgba(27, 68, 130, 0.22), rgba(58, 123, 213, 0.18)), rgba(255, 255, 255, 0.82);
  z-index: 0;
  pointer-events: none;
}
header h1,
header * {
  position: relative;
  z-index: 1;
}

h1 {
  font-family: "Merriweather", "Georgia", serif;
  font-size: 2.2em;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1b4482;
  margin: 0 0 8px 0;
  width: 100%;
  text-align: center;
}

main {
  padding: 24px 0 80px 0;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.verse-card {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 18px;
  margin: 24px 8px;
  max-width: 100%;
  padding: 24px 16px 18px 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.2s;
  cursor: pointer;
  position: relative; /* Needed for absolute positioning of check-btn */
}
.verse-card:hover {
  box-shadow: 0 8px 32px rgba(27, 68, 130, 0.13);
}
.verse-ref {
  font-family: "Merriweather", "Georgia", serif;
  font-weight: 700;
  color: #1b4482;
  margin-bottom: 18px;
  font-size: 1.1em;
  letter-spacing: 0.5px;
}
.verse-text {
  font-size: 1.15em;
  transition: filter 0.3s, color 0.3s;
  user-select: none;
  color: #2d2d2d;
  line-height: 1.7;
  font-family: "Merriweather", "Georgia", serif;
  text-indent: 1em;
}
.blurred {
  filter: blur(8px);
  color: #bdbdbd;
}
.partial .first-word {
  color: #1b4482;
  font-weight: bold;
}
.partial .rest-blur {
  filter: blur(8px);
  color: #bdbdbd;
}
footer {
  background: #fff;
  color: #1b4482;
  text-align: center;
  padding: 18px 0 12px 0;
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1em;
  border-top: 2px solid #e0e0e0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.03);
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 1;
}

footer .footer-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
.footer-main {
  margin: 0;
  font-size: 1em;
  color: #1b4482;
}

.collection-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  margin: 10px 0 0 0;
}

.collection-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  background: #1b4482;
  color: #fff;
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.1em;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  padding-right: 48px; /* extra space for badge */
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(27, 68, 130, 0.07);
  transition: background 0.2s, box-shadow 0.2s;
}
.collection-btn:hover,
.collection-btn:focus {
  background: #16325c;
  box-shadow: 0 4px 16px rgba(27, 68, 130, 0.13);
}
.collection-btn .collection-label {
  flex: 1 1 auto;
  text-align: center;
  z-index: 1;
}
.collection-btn .nou-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(90deg, #ff9800 60%, #ffb347 100%);
  color: #fff;
  font-size: 0.85em;
  font-weight: bold;
  border-radius: 12px;
  padding: 2px 10px 2px 10px;
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.13);
  letter-spacing: 0.5px;
  z-index: 2;
  pointer-events: none;
  animation: pop-nou 0.7s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
@keyframes pop-nou {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#collection-select-section {
  text-align: center;
  margin-top: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#collection-select-section > h2 {
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.4em;
  font-weight: 700;
  color: #1b4482;
  margin: 0 0 18px 0;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  transition: none;
}

#verses-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#action-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 5px;
  margin-bottom: 5px;
  padding-bottom: 8px;
  width: 100%;
  z-index: 2;
}
#action-buttons button {
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.08em;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 32px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
  outline: none;
  border: none;
  box-shadow: 0 2px 8px rgba(27, 68, 130, 0.09);
}
#refresh-btn {
  background: linear-gradient(90deg, #1b4482 60%, #3a7bd5 100%);
  color: #fff;
}
#refresh-btn:hover,
#refresh-btn:focus {
  background: linear-gradient(90deg, #16325c 60%, #1b4482 100%);
  box-shadow: 0 4px 16px rgba(27, 68, 130, 0.16);
  transform: translateY(-2px) scale(1.04);
}
#back-btn {
  background: #fff;
  color: #1b4482;
  border: 2px solid #1b4482;
  margin-left: 0;
}
#back-btn:hover,
#back-btn:focus {
  background: #1b4482;
  color: #fff;
  box-shadow: 0 4px 16px rgba(27, 68, 130, 0.13);
  transform: translateY(-2px) scale(1.04);
}

.mode-btn {
  background: #f6f5f3;
  color: #1b4482;
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.05em;
  font-weight: 600;
  border: 2px solid #1b4482;
  border-radius: 8px;
  padding: 8px 22px;
  cursor: pointer;
  margin: 0 2px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  outline: none;
}
.mode-btn.mode-active {
  background: #1b4482;
  color: #fff;
  box-shadow: 0 2px 8px rgba(27, 68, 130, 0.09);
}
.mode-btn:hover,
.mode-btn:focus {
  background: #3a7bd5;
  color: #fff;
}
#mode-buttons {
  margin-bottom: 8px;
  display: none;
  justify-content: center;
  gap: 10px;
}

.hero {
  background: #eaf1fa;
  border-radius: 18px;
  margin: 0 auto 12px auto;
  max-width: 600px;
  padding: 10px 14px 6px 14px;
  box-shadow: 0 2px 12px rgba(27, 68, 130, 0.07);
  text-align: center;
  transition: box-shadow 0.2s, background 0.2s;
}
.hero blockquote {
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.12em;
  font-style: italic;
  color: #1b4482;
  margin: 0 0 4px 0;
  line-height: 1.5;
  letter-spacing: 0.2px;
}
.hero-ref {
  display: block;
  font-size: 0.98em;
  color: #3a7bd5;
  margin-top: 2px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.hero:hover {
  box-shadow: 0 4px 24px rgba(27, 68, 130, 0.13);
  background: #dbeafe;
}

.verses-count-label {
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.1em;
  font-weight: 600;
  color: #1b4482;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 0;
  margin-top: 0;
  text-align: center;
  letter-spacing: 0.5px;
}

.collection-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  margin-top: 8px;
  background: #eaf1fa;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(27, 68, 130, 0.07);
  padding: 10px 18px 8px 18px;
  max-width: 600px;
  width: 100%;
  text-align: center;
}
.collection-title {
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.18em;
  font-weight: 700;
  color: #1b4482;
  letter-spacing: 0.5px;
  margin-right: 4px;
}
.collection-title-arrow {
  font-size: 1.2em;
  color: #1b4482;
  margin: 0 8px 0 8px;
  user-select: none;
}

.check-btn {
  position: absolute;
  right: 12px;
  bottom: 16px;
  background: rgba(58, 123, 213, 0.07);
  border: none;
  border-radius: 50%;
  padding: 12px;
  min-width: 44px;
  min-height: 44px;
  box-shadow: none;
  transition: background 0.2s, box-shadow 0.2s, filter 0.2s, transform 0.15s;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.check-btn svg {
  display: block;
  opacity: 0.82;
  width: 26px;
  height: 26px;
  transition: opacity 0.2s, filter 0.2s;
}
.check-btn:hover,
.check-btn:focus {
  background: rgba(58, 123, 213, 0.16);
  box-shadow: 0 4px 16px rgba(27, 68, 130, 0.13);
  filter: brightness(1.1);
  opacity: 1;
  transform: scale(1.08);
}
.check-btn:active {
  background: rgba(58, 123, 213, 0.22);
  filter: brightness(1.13);
}
.check-btn.checked {
  background: rgba(58, 123, 213, 0.04);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Style for summary/details block for hidden collections */
#hidden-collections-summary {
  font-size: 1.08em;
  color: #3b5ba9;
  background: #f0f4fa;
  border-radius: 8px 8px 0 0;
  padding: 10px 16px;
  margin-bottom: 0;
  border: 1.5px solid #e0e0e0;
  border-bottom: none;
  transition: background 0.2s;
}
#hidden-collections-summary:hover {
  background: #e6eaf3;
}
#hidden-collections-details {
  border: 1.5px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
  background: #f8fafc;
  margin-top: 0;
  padding: 0 0 10px 0;
  box-shadow: 0 2px 8px rgba(27, 68, 130, 0.04);
}
#hidden-collections-details[open] > summary {
  color: #1b4482;
  font-weight: 300;
  padding-bottom: 1em;
}
#hidden-collections-details summary {
  font-size: 1em;
  color: #3b5ba9;
  background: transparent;
  padding: 10px 16px 6px 16px;
  cursor: pointer;
  font-weight: 600;
  outline: none;
  border-radius: 0 0 8px 8px;
  transition: background 0.2s;
}
#hidden-collections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 0 16px;
}

@media (max-width: 600px) {
  header {
    background-size: cover;
    padding: 18px 0 10px 0;
  }
  h1 {
    font-size: 2em;
    margin-bottom: 8px;
  }
  main {
    max-width: 100vw;
  }
  .verse-card {
    margin: 16px 4px;
    padding: 14px 6px 12px 6px;
    border-radius: 12px;
  }
  .verse-ref {
    font-size: 1em;
    margin-bottom: 10px;
  }
  .verse-text {
    font-size: 1em;
  }
  footer {
    font-size: 0.95em;
    padding: 10px 0 8px 0;
  }
  .collection-btn {
    font-size: 1em;
    padding: 10px 16px;
  }
  #collection-select-section {
    margin-top: 18px;
  }
  #action-buttons {
    margin-bottom: 60px; /* Add extra space for the fixed footer */
    display: none;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
  }
  #action-buttons button {
    font-size: 0.98em;
    padding: 9px 18px;
  }
  #action-buttons {
    margin-top: 10px;
  }
  .hero {
    padding: 6px 3px 4px 3px;
    font-size: 1em;
    margin-bottom: 8px;
  }
  .hero blockquote {
    font-size: 0.98em;
  }
  .verses-count-label {
    font-size: 1em;
    padding: 0;
    margin-bottom: 5px;
  }
  .collection-title-row {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    padding: 7px 8px 6px 8px;
  }
  .collection-title {
    font-size: 1.05em;
  }
  .collection-title-arrow {
    margin: 0 4px 0 4px;
    font-size: 1.1em;
  }
  .check-btn {
    right: 8px;
    bottom: 12px;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
  }
}

@media (min-width: 601px) {
  header {
    padding: 56px 0 32px 0;
  }
  h1 {
    font-size: 2.8em;
    margin-bottom: 18px;
  }
}
