.toc-container {
  position: fixed;
  top: 100px;
  right: 25px;
  width: 300px;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
}
.toc-container.collapsed {
  width: 50px;
  height: 50px;
  overflow: hidden;
}
.toc-container.collapsed .toc-content {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}
.toc-container.collapsed .toc-toggle {
  opacity: 1;
  transform: scale(1);
}
.toc-content {
  background: linear-gradient(145deg, #fff0f5 0%, #ffe4e9 100%);
  border-radius: 10px;
  padding: 10px 15px;
  box-shadow: 0 4px 20px rgba(235,160,180,0.2);
  border: 1px solid rgba(255,230,235,0.5);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  font-family: 'Noto Serif SC', serif;
  color: #5a3e4b;
  transition: all 0.3s ease-in-out;
  transform-origin: top right;
}
.toc-content::-webkit-scrollbar {
  width: 6px;
}
.toc-content::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #f9c, #ff66b3);
  border-radius: 3px;
  box-shadow: inset 0 0 5px rgba(255,255,255,0.5);
}
.toc-content::-webkit-scrollbar-track {
  background: rgba(255,240,245,0.8);
  border-radius: 3px;
}
.toc-header {
  font-size: 1.1rem;
  font-weight: 800 !important;
  color: #ff4081;
  margin: 0 0 8px 0;
  padding-left: 0;
  display: flex;
  align-items: center;
}
.toc-header .toc-icon {
  margin-right: 6px;
  font-size: 1.1rem;
}
.fluid-toc {
  padding-left: 0;
  margin-left: 0;
}
.fluid-toc ol,
.fluid-toc ul {
  list-style: none !important;
  counter-reset: none !important;
  padding-left: 0 !important;
}
.fluid-toc li {
  counter-increment: none !important;
  padding-left: 20px !important;
  margin: 4px 0;
  line-height: 1.2;
}
.fluid-toc li::before,
.fluid-toc li::marker {
  content: none !important;
  display: none !important;
}
.fluid-toc li > a::before {
  content: "" !important;
  position: absolute;
  left: 0;
  color: #ff6b6b;
  font-size: 0.9em;
}
.fluid-toc li ol li {
  padding-left: 25px !important;
}
.fluid-toc li ol li > a::before {
  content: "" !important;
  left: 8px;
  color: #4dabf7;
  font-size: 0.8em;
}
.fluid-toc li ol ol li {
  padding-left: 30px !important;
}
.fluid-toc li ol ol li > a::before {
  content: "" !important;
  left: 15px;
  color: #69db7c;
  font-size: 0.8em;
}
.fluid-toc a {
  color: #7a5266;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 1px 6px;
  border-radius: 4px;
  display: block;
  font-weight: 700;
}
.fluid-toc a:hover {
  color: #ff66b3;
  text-decoration: underline;
  background: rgba(255,230,235,0.4);
}
.fluid-toc .active a {
  color: #ff4081;
  font-weight: 700;
  background: rgba(255,220,230,0.6);
  box-shadow: 0 2px 10px rgba(255,64,129,0.4);
}
.toc-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #f9c, #ff66b3);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(255,102,179,0.4);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  z-index: 1001;
}
@media (max-width: 1024px) {
  .toc-container {
    position: static;
    width: 100%;
    margin: 15px 0;
    right: auto;
    top: auto;
  }
  .toc-container.collapsed {
    display: none;
  }
  .toc-content {
    max-height: none;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(235,160,180,0.15);
    border: none;
  }
  .toc-toggle {
    display: none;
  }
}
