body {
    transition: background-color 0.3s, color 0.3s;
}
@font-face {
  font-family: "VanillaExtract";
  src: url("/media/VanillaExtract.ttf");
}
.navbar-brand {
    font-family: "VanillaExtract";
    font-size: 2em;
}
body {
  font-family: 'Arial', sans-serif;
}
h1, h2, h3 {
  color: #343a40;
}
h1 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.help-header {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #343a40;
}
#mainContent {
  background: #ffffff;
}
.card {
  margin-bottom: 1.5rem;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.card-header {
  background-color: #e9ecef;
  font-weight: 600;
}
.table {
  font-size: 0.9rem;
}
code {
  background-color: #f1f3f5;
  padding: 2px 4px;
  border-radius: 4px;
}
pre {
  background-color: #f1f3f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}
.topic {
  margin-bottom: 2rem;
}
.codeblock {
  background-color: #f1f1f1;
  padding: 1rem;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  display: block;
  margin: 1rem 0;
}
.inline {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f1f1f1;
  padding: 2px 4px;
  border-radius: 3px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
th, td {
  border: 1px solid #dee2e6;
  padding: 0.75rem;
  text-align: left;
}
th {
  background-color: #e9ecef;
}
.path a {
  text-decoration: none;
  color: #007bff;
}
.subreddit, a {
  color: #007bff;
  text-decoration: none;
}
.subreddit:hover {
  text-decoration: underline;
}
.faq-item {
  margin-bottom: 1.5rem;
}
.sidebar {
  position: sticky;
  top: 20px;
  height: auto;
  max-height: 100vh;
  overflow-y: auto;
  padding: 1rem;
  background-color: var(--bs-body-bg);
  border-right: 1px solid #dee2e6;
}
.sidebar a {
  display: block;
  padding: 0.5rem 1rem;
  color: #343a40;
  text-decoration: none;
}
.sidebar a:hover {
  background-color: #f1f1f1;
  border-radius: 5px;
}
.sidebar-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #343a40;
}

@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 20px;
    height: calc(100vh - 80px);
  }
  .sidebar-close {
    display: none; /* Hide close button on desktop */
  }
}

@media (max-width: 767px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -100%; /* Hidden off-screen */
    width: 250px; /* Fixed width for mobile */
    height: 100vh;
    z-index: 1000; /* Above other content */
  }
  .sidebar.show {
    left: 0; /* Slide in when toggled */
  }
}
footer {
    background-color: transparent;
    padding: 1.5rem 0;
    border-top: 1px solid #dee2e6;
}
footer a {
    color: #0d6efd;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
}
.scroll-to-top.show {
  display: block;
}





/* Dark Theme Adjustments */
[data-bs-theme="dark"] {
  background-color: #212529 !important;
  color: #e9ecef !important;
}

/* Ensure Bootstrap components respect dark mode */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-check-input {
  background-color: #343a40 !important;
  color: #e9ecef !important;
  border-color: #495057 !important;
}

/* Fix text contrast on buttons */
[data-bs-theme="dark"] .btn-outline-secondary {
  color: #e9ecef !important;
  border-color: #6c757d !important;
}

/* Ensure dropdown items have proper contrast */
[data-bs-theme="dark"] .dropdown-item {
  color: #e9ecef !important;
  background-color: #343a40 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: #495057 !important;
  color: #ffffff !important;
}

/* Fix form switch in dark mode */
[data-bs-theme="dark"] .form-check-label {
  color: #e9ecef !important;
}

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-white {
  background-color: #343a40 !important;
}
[data-bs-theme="dark"] #mainContent,
[data-bs-theme="dark"] code,
[data-bs-theme="dark"] pre,
[data-bs-theme="dark"] .card-header {
  background-color: #222 !important;
}
[data-bs-theme="dark"] .sidebar,
[data-bs-theme="dark"] .sidebar a,
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3 {
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .sidebar a:hover {
  background-color: transparent;
  text-decoration: underline;
}