body {
  font-family: Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  margin-top: 8px;
  margin-bottom: 8px;
  color: rgb(0, 0, 0);
  position: relative;
  z-index: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(128, 0, 128, 0.4),
      rgba(0, 128, 0, 0.4)
    ),
    url("/media/keyboard/colorful_keyboard_in_grass.webp");
  background-size: cover;
  background-position-x: 50%;
  background-position-y: 50%;
  background-repeat: no-repeat;
  transform: rotate(0deg);
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
}

.container {
  display: flex;
  flex-direction: row; /* Default row for desktop */
  gap: 20px;
  width: 100%;
  justify-content: center; /* Center items horizontally on desktop */
}
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center; /* Center items in column */
    align-items: stretch; /* Stretch for full width */
  }

  #viewer-container {
    width: 100%;
    margin: 0 auto; /* Center horizontally */
  }

  #viewer-container2 {
    width: 100%;
    margin: 0 auto; /* Center horizontally */
  }

  #viewer-container3 {
    width: 100%;
    margin: 0 auto; /* Center horizontally */
  }

  .info-panel {
    width: 100%; /* Ensure full width */
    margin: 0 auto; /* Corrected from margin: 2 auto; to margin: 0 auto; */
    padding-right: 20px; /* Add right padding for mobile */
  }
}
#viewer-container {
  flex: 3;
  height: 500px;
  border: 1px solid #ddd;
}

.info-panel {
  flex: 1;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 5px;
}

.controls {
  margin-top: 20px;
  padding: 15px;
  background-color: #f0f8ff;
  border-radius: 5px;
}

hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 15px 0;
}

.toc a:hover {
  text-decoration: underline;
}
.fixed-toc-button {
  position: fixed;
  top: 10px;
  left: 10px;
  text-decoration: none;
  color: #0366d6;
}

p > .img-fluid.me-3 {
  float: right;
}

.toc {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.05);
}

.toc ul {
  list-style: none;
  margin: 0;
  padding-left: 1em;
}

.toc ul ul {
  padding-left: 1.5em;
  border-left: 2px solid #eee;
  margin-top: 8px;
  margin-bottom: 8px;
}

.toc li {
  margin: 6px 0;
  line-height: 1.4;
  position: relative;
}

/* Custom bullet dots */
.toc li::before {
  content: "•";
  position: absolute;
  left: -1.2em;
  color: #999;
  font-size: 14px;
  line-height: 1.2;
}

/* Links style */
.toc a {
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Section headers (top-level items) bold */
.toc > ul > li > a {
  color: #000; /* or inherit */
  font-weight: 600;
  font-size: 1.05em;
}

/* Nested links: default gray, turn blue on hover */
.toc ul ul a {
  color: #000; /* or inherit */
  font-weight: 600;
  font-size: 1.05em;
}

/* Optional: smooth scroll behavior if your page supports it */
html {
  scroll-behavior: smooth;
}
