@import "reveal.css";
@import "slides.css";
.comments-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.two-cols {
  display: flex;
}
.comment {
  background: rgba(76, 175, 80, 0.92);
  border-radius: 6px;
  margin: 16px 0;
  padding: 12px 18px;
  position: relative;
  box-shadow: 0 2px 8px;
  transition: background 0.2s;
}
.comment-header {
  display: flex;
  align-items: baseline;
  margin-bottom: 6px;
  color: #333;
}
.comment-header .comment-author {
  font-weight: bold;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1em;
  margin-right: 10px;
}
.comment-header .comment-date {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85em;
  font-weight: normal;
  color: #333;
}
.svg {
  color: #333;
}
.comment-content {
  max-height: 4.5em;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s;
  word-break: break-word;
  color: #333;
}
.comment-content.expanded {
  max-height: none;
}
.comment-content.expanded:after {
  opacity: 0;
}
.show-more-link {
  display: block;
  text-align: right;
  font-size: 0.85em;
  color: #333;
  cursor: pointer;
  margin-top: 2px;
  text-decoration: underline;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  float: right;
  position: relative;
  bottom: 20px;
}
#content {
  flex: 1;
  /* 占据剩余空间 */
  padding: 20px 10px;
  /* 添加内边距 */
  font-size: 1.2em;
  line-height: 1.5em;
  margin: 0;
  background: #f0f0f0;
  color: #333;
  height: 100vh;
  /* 设置高度为视口高度 */
  transition: all 0.3s ease;
  /* 平滑过渡效果 */
  overflow-y: auto;
  /* 如果内容过长，允许滚动 */
}
#content .time {
  font-size: 0.8em;
  font-family: monospace;
  line-height: 1em;
}
#content a:hover {
  color: #0056b3;
  /* Darker blue on hover */
  text-decoration: none;
  /* Remove underline on hover */
}
/* style for a line */
.line {
  width: 100%;
  height: 2px;
  background-color: #4CAF50;
  /* Light gray color */
  margin: 5px 0;
  /* Margin for spacing */
}
.button {
  background-color: #4CAF50;
  color: #333;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease;
}
.button:hover {
  background-color: #5fda63;
  color: #666;
}
/* Sidebar container */
#sidebar {
  flex: 0 0 30%;
  width: 30%;
  max-width: 300px;
  background-color: #4CAF50;
  transition: all 0.3s ease;
  height: 100vh;
  overflow-y: auto;
  padding: 1px;
}
#sidebar a {
  text-decoration: none;
  /* remove default underline */
  color: #333;
}
#sidebar .sidebar-item {
  padding: 5px;
  cursor: pointer;
  border-radius: 5px;
  display: block;
}
#sidebar .sidebar-item:hover {
  background-color: #5fda63;
}
#sidebar .sidebar-subitems {
  margin-left: 20px;
  display: none;
}
#sidebar.collapsed {
  flex: 0 0 0px;
  display: hidden;
}
#toggleButton {
  flex: 0 0 40px;
  /* always on the top layer */
  z-index: 1000;
  position: relative;
  height: 30px;
  width: 40px;
  left: -5px;
  /* top: 0px;
  left: 255px; */
  background-color: #4CAF50;
  color: #333;
  border: none;
  /* padding: 10px; */
  cursor: pointer;
  border-radius: 5px;
  transition: left 0.3s ease;
  /* Smooth animation */
}
#toggleButton:hover {
  background-color: #5fda63;
}
@media (max-width: 500px) {
  #sidebar {
    flex: 0 0 100vw;
    max-width: inherit;
    overflow-y: auto;
  }
  #sidebar.collapsed {
    flex: 0 0 0px;
  }
  #toggleButton {
    position: fixed;
    flex: unset;
  }
  #toggleButton:not(.collapsed) {
    background-color: #4CAF50;
    flex: unset;
    position: fixed;
    top: 10px;
    right: 10px;
    left: auto;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    /* Optionally, make the toggle button always visible */
  }
  #toggleButton:not(.collapsed):hover {
    background-color: #5fda63;
  }
}
#toolbar-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: #4CAF50;
  color: #333;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  cursor: pointer;
  transition: background 0.2s;
}
#toolbar-button:hover {
  background: #5fda63;
}
#bgmName {
  overflow: hidden;
}
#toolbar {
  position: fixed;
  bottom: 0;
  display: hidden;
  right: -340px;
  width: 300px;
  height: fit-content;
  border-radius: 9px;
  background: #4CAF50;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.toolbar-color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  padding: 2px;
  margin-top: 9px;
  cursor: pointer;
  outline: none;
  transition: box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.toolbar-color-btn:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  border-color: #888;
}
#toolbar.open {
  right: 0;
}
.toolbar-section {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toolbar-thm {
  color: #333;
  padding: 6px 12px;
  margin: 0 2px;
}
.toolbar-btn {
  background: #4CAF50;
  color: #333;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  margin: 0 2px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}
.toolbar-btn:hover {
  background: #5fda63;
}
#page-header {
  position: absolute;
  top: 0;
  height: 30px;
  z-index: 30;
  background: #f0f0f0;
  border-bottom: 1px solid #4CAF50;
  padding: 8px 10px;
}
.page-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.page-nav-link {
  display: inline-block;
  background-color: #4CAF50;
  color: #333;
  border-radius: 6px;
  padding: 4px 10px;
  text-decoration: none;
  line-height: 1.4;
}
.page-nav-link:hover {
  background-color: #5fda63;
}
#page-main {
  padding: 30px 0 0 0;
}
#page-footer {
  margin-top: 24px;
  padding: 14px 10px 22px;
  border-top: 1px solid #4CAF50;
}
.page-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.page-top-link {
  display: inline-block;
  color: #333;
  background: #4CAF50;
  text-decoration: none;
  border-radius: 6px;
  padding: 2px 8px;
}
.page-top-link:hover {
  background: #5fda63;
}
.page-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.page-footer-links a {
  color: inherit;
}
body {
  background-color: #f0f0f0;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-url) no-repeat center center fixed;
  background-size: cover;
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}
body {
  margin: 0;
  display: flex;
  flex-direction: row;
  height: 100vh;
  /* 设置高度为视口高度 */
  overflow: hidden;
  /* 隐藏溢出内容 */
}
@media (max-width: 500px) {
  #content {
    padding: 5px;
  }
}
/* ul.passage-list {
  padding-left: 0;
  margin: 0;
  list-style: none;
}
ul.passage-list li.passage-item {
  margin-bottom: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  flex-direction: column;
  display: flex;
} 
*/
ul.passage-list li.passage-item {
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1.5px solid #e0e7ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
  display: flex;
  opacity: 0.7;
  flex-direction: column;
}
ul.passage-list li.passage-item:hover {
  background: #f8fbff;
  border-color: #b6d4fe;
  box-shadow: 0 4px 16px rgba(33, 150, 243, 0.1);
}
.preview {
  display: inline-block;
  white-space: nowrap;
  /* 不换行，超出会横向滚动 */
}
ul.passage-list a {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 2px;
  text-decoration: none;
  color: #3366cc;
}
ul.passage-list div {
  font-size: 12px;
  color: #555;
  line-height: 1.4;
  max-height: 60px;
  overflow: hidden;
}
ul.passage-list * {
  display: inline;
}
ul.passage-list br {
  display: none;
}
.proof-block {
  position: relative;
}
.proof-block::after {
  content: "";
  position: absolute;
  right: 1em;
  bottom: 0.7em;
  width: 0.9em;
  height: 0.9em;
  background: #6366f1;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.15);
  opacity: 0.8;
  pointer-events: none;
}
.theorem-block {
  border-left: 4px solid rgba(59, 130, 246, 0.6);
  background: rgba(234, 243, 255, 0.3);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 6px;
}
.theorem-block::before {
  content: attr(name);
  position: relative;
  top: -0.8em;
  left: -1.2em;
  background-color: rgba(59, 130, 246, 0.6);
  border-radius: 4px 4px 4px 0;
  padding: 3px 3px;
}
.proposition-block {
  border-left: 4px solid rgba(16, 185, 129, 0.6);
  background: rgba(230, 249, 242, 0.3);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 6px;
}
.proposition-block::before {
  content: attr(name);
  position: relative;
  top: -0.8em;
  left: -1.2em;
  background-color: rgba(16, 185, 129, 0.6);
  border-radius: 4px 4px 4px 0;
  padding: 3px 3px;
}
.definition-block {
  border-left: 4px solid rgba(230, 178, 87, 0.6);
  background: rgba(252, 248, 242, 0.3);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 6px;
}
.definition-block::before {
  content: attr(name);
  position: relative;
  top: -0.8em;
  left: -1.2em;
  background-color: rgba(230, 178, 87, 0.6);
  border-radius: 4px 4px 4px 0;
  padding: 3px 3px;
}
.proof-block {
  border-left: 4px solid rgba(99, 102, 241, 0.6);
  background: rgba(243, 244, 253, 0.3);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 6px;
  font-style: italic;
}
.proof-block::before {
  content: attr(name);
  position: relative;
  top: -0.8em;
  left: -1.2em;
  background-color: rgba(99, 102, 241, 0.6);
  border-radius: 4px 4px 4px 0;
  padding: 3px 3px;
}
.lemma-block {
  border-left: 4px solid rgba(244, 63, 94, 0.6);
  background: rgba(255, 238, 242, 0.3);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 6px;
}
.lemma-block::before {
  content: attr(name);
  position: relative;
  top: -0.8em;
  left: -1.2em;
  background-color: rgba(244, 63, 94, 0.6);
  border-radius: 4px 4px 4px 0;
  padding: 3px 3px;
}
.remarks-block {
  border-left: 4px solid rgba(167, 139, 250, 0.6);
  background: rgba(243, 240, 255, 0.3);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 6px;
}
.remarks-block::before {
  content: attr(name);
  position: relative;
  top: -0.8em;
  left: -1.2em;
  background-color: rgba(167, 139, 250, 0.6);
  border-radius: 4px 4px 4px 0;
  padding: 3px 3px;
}
.example-block {
  border-left: 4px solid rgba(234, 179, 8, 0.6);
  background: rgba(255, 250, 235, 0.3);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 6px;
}
.example-block::before {
  content: attr(name);
  position: relative;
  top: -0.8em;
  left: -1.2em;
  background-color: rgba(234, 179, 8, 0.6);
  border-radius: 4px 4px 4px 0;
  padding: 3px 3px;
}
