.math-display {
  text-align: center;
  margin: 1em 0;
}
.text-content {
  text-align: left;
}

.notification-banner {
  padding: 1.6em;
  background-color: var(--banner-bg);
  text-align: center;
  color: var(--banner-text);
}    


/* Standardized font-family to match main styles - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

html, body, * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

html { font-size: 16px; }
body {
  text-align: justify;
  font-size: 1rem !important;
  line-height: 1.6;
}

@media (max-width: 640px) {
  body {
    font-size: 0.95rem !important;
    line-height: 1.55;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
}

.modal-content {
  display: block;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.zoom-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  padding: 10px;
  display: flex;
  gap: 15px;
  z-index: 150;
}

.zoom-btn {
  color: white;
  background-color: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.zoom-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.close {
  position: fixed;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 150;
}

.article-image {
  cursor: pointer;
  transition: all 0.3s;
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 8px;
}

.article-image:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .modal-content {
    touch-action: pinch-zoom;
  }
}
.math {
  margin: 1rem 0;
  overflow-x: auto;
  overflow-y: visible;
  text-align: center;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0.5rem;
  line-height: 1.5;
  min-height: fit-content;
  font-size: 1rem;
}

@media (max-width: 640px) {
  .math {
    margin: 0.75rem 0;
    padding: 0.5rem 0.5rem;
    font-size: 0.95rem;
    line-height: 1.45;
  }
}

pre {
  background-color: var(--bg-secondary);
  padding: 0.75rem;
  border-radius: 8px;
  line-height: 1.5;
  overflow-x: auto;
  margin: 1rem 0;
}

@media (max-width: 640px) {
  main {
    padding: 1rem;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
  
  .article-image {
    width: 100%;
    max-width: 100%;
  }
  
  /* Ensure equations are visible on mobile with proper spacing */
  .equation {
    font-size: 0.95rem !important;
    padding: 0.5rem 0.5rem !important;
    margin: 0.75rem 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    line-height: 1.45 !important;
    min-height: fit-content !important;
  }
  
  /* Ensure abstract text is visible */
  .abstract {
    font-size: 0.95rem !important;
    padding: 0.75rem !important;
    margin: 0.75rem 0 !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Algorithm blocks */
  .algorithm {
    font-size: 0.9rem !important;
    padding: 0.75rem !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
  
  /* Tables */
  table {
    font-size: 0.875rem !important;
  }
  
  th, td {
    padding: 0.4rem !important;
    font-size: 0.875rem !important;
  }
}

h2, h3, h4, table {
  text-align: center;
}

.image-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  width: 100%;
}

