/* Modern typography and spacing */
.prose {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.75;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose h1 {
  margin-bottom: 2rem;
  font-weight: 700;
}

/* Visual hierarchy */
.navbar {
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
}

article.prose {
  padding: 2rem;
  background: white;
}

/* Modern link styling */
.prose a:not(.btn) {
  color: #6b7280;
  transition: color 0.2s ease;
}

.prose a:not(.btn):hover {
  color: #374151;
}

img.inline-math {
  display: inline-block;
}

img.display-math {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
  margin-left: auto;
  margin-right: auto;
}

div.book-navigation {
  padding: 1.5rem 0;
  width: 100%;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

div.book-navigation-parent {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  width: 100%;
}

div.book-navigation-parent a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border-radius: 0.5rem;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

div.book-navigation-parent a:hover {
  background: #f9fafb;
  color: #374151;
}

div.book-navigation-section {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

div.book-navigation-previous, div.book-navigation-next {
  flex: 1;
}

div.book-navigation-previous a, div.book-navigation-next a {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  background: transparent;
  border-radius: 0.5rem;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  min-height: 3rem;
}

div.book-navigation-previous a:hover, div.book-navigation-next a:hover {
  background: #f9fafb;
  color: #374151;
}

div.book-navigation-next {
  text-align: right;
}

div.book-navigation-next a {
  justify-content: flex-end;
  text-align: right;
}

div.book-navigation-previous a::before {
  content: "←";
  margin-right: 0.5rem;
  flex-shrink: 0;
  font-weight: bold;
}

div.book-navigation-next a::after {
  content: "→";
  margin-left: 0.5rem;
  flex-shrink: 0;
  font-weight: bold;
}

/* Mobile color consistency fixes */
@media (max-width: 768px) {
  .prose a:not(.btn) {
    color: #6b7280 !important;
  }
  
  .prose a:not(.btn):hover {
    color: #374151 !important;
  }
  
  .bg-gradient-to-r {
    background: #fef7f0 !important;
  }
}

/* Google Translate styling */
.google-translate-container {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

#google_translate_element {
  display: inline-block;
}

/* Hide Google Translate branding and improve appearance */
.goog-te-banner-frame {
  display: none !important;
}

.goog-te-gadget {
  font-family: inherit !important;
  font-size: 0.875rem !important;
}

.goog-te-gadget-simple {
  background-color: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.5rem !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
}

.goog-te-gadget-simple .goog-te-menu-value {
  color: #374151 !important;
}

code {
  font-family: "DejaVu Sans Mono", monospace;
  background: #f1f5f9;
  border-radius: 0.375rem;
  padding: 0.125rem 0.25rem;
}

pre code {
  display: block;
  padding: 0.2em 1rem;
  margin: 0;
}

pre {
  padding: 0.2em 1rem;
  margin: 0 0 1rem 0;
  background: #f1f5f9;
  border-radius: 0.375rem;
  overflow-x: auto;
}

.sourceCode pre {
  margin: 0;
  padding: 0;
  background: none;
}

.prose pre:not(.sourceCode pre) {
  margin-bottom: 1.25rem;
}
.sourceCode {
  padding: 1rem;
  font-family: "DejaVu Sans Mono", monospace;
  line-height: 140%;
  white-space: pre;
  overflow-x: auto;
  background: #f1f5f9;
  border-radius: 0.375rem;
}
