body {
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  height: 100vh;
  background-color: #121212;
  color: #e0e0e0; 
}

::-webkit-scrollbar {
  width: 2px;
}

::-webkit-scrollbar-track {
  background: #313131;
  display: none;
}

::-webkit-scrollbar-track:hover {
  display: block;
}

::-webkit-scrollbar-thumb {
  background: #A4A4A3;
}

::-webkit-scrollbar-thumb:hover {
  background: #C9C9C7;
}

::-webkit-scrollbar:horizontal {
  height: 2px;
}

/* --------------------------------------------------------------------------- */
.doc-title {
  margin-top: 30px;
  margin-bottom: 45px;
  color: #fff;
}

p > img {
  max-width: 80%;
  height: auto;
}

.content {
  width: 100%;
  padding: 30px;
  overflow-y: auto;
  box-sizing: border-box;
  transition: width 0.3s ease;
}

.hljs {
  display: block;
  padding: 12px;
  font-size: 13px;
  overflow-x: auto; 
  background-color: #202020;
  border-radius: 5px;
  box-sizing: border-box;
  width: max-content; 
  min-width: 100px; 
}

.doc-content h1 {padding-left: 0px;}
.doc-content h2 {padding-left: 10px;}
.doc-content h3 {padding-left: 20px;}
.doc-content h4 {padding-left: 30px;}
.doc-content h5 {padding-left: 40px;}
.doc-content h6 {padding-left: 50px;}

.content a {
  color: var(--highlight-color);
}

.content a:hover {
  color: color-mix(in srgb, rgb(var(--highlight-color-rgb)) 70%, white 30%);
}

.hljs code {
  padding: 0;
  font-family: "Fira Code", monospace;
  font-size: inherit;
  background: none;
  border: none;
}

code {
  font-family: "Fira Code", monospace;
  font-size: 13px;
  padding: 1px 5px 1px 5px;
  border: 1px solid #cccccc81;
  border-radius: 5px;
  background: #0f0f0f;
}

.katex {
  color: #e0e0e0;
}

table {
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 14px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
}

thead {
  background-color: #222;
}

th,
td {
  border: 1px solid #333;
  padding: 8px 12px;
  text-align: left;
}

tr:nth-child(even) {
  background-color: #1e1e1e;
}

tr:hover {
  background-color: #2a2a2a;
}

th {
  font-weight: bold;
}

.header-link {
  margin-left: 8px; 
  text-decoration: none;
  color: #888; 
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
  vertical-align: middle; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
}

.doc-content h1:hover .header-link,
.doc-content h2:hover .header-link,
.doc-content h3:hover .header-link {
  opacity: 0.8;
}

.header-link i {
  color: #888;
}

.header-link i:hover {
  opacity: 0.7;
}

.header-link:hover {
  opacity: 1;
  color: #000;
}

.header-link i {
  font-size: 0.75em;
  vertical-align: middle;
  vertical-align: middle; 
  display: inline-flex; 
  align-items: center;
  justify-content: center;
}

blockquote {
  border-left: var(--highlight-color) solid 3px;
  padding-left: 10px; 
}

.katex-html {
  display: none;
}

.task-list-item {
  list-style-type: none;
}

.task-list-item input[type="checkbox"] {
  margin-right: 8px;
  vertical-align: middle;
  accent-color: var(--highlight-color);
}

.task-list-item input[type="checkbox"]:checked + label {
  opacity: 0.7;
  text-decoration: line-through;
}

/* --------------------------------------------------------------------------- */

.doc-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #505050;
  gap: 20px;
  box-sizing: border-box;
}

.doc-nav a {
  margin-top: 20px;
  text-decoration: none;
  font-weight: bold;
  box-sizing: border-box;
  padding: 20px 25px;
  color: var(--highlight-color);
  border-radius: 5px;
  transition: 0.3s ease-in-out;
  flex-grow: 1;
  border: #353535 solid 1px;
}

.doc-nav-next {
  text-align: right;
}

.doc-nav a:hover {
  transition: 0.3s ease-in-out;
  background-color: #50505083;
  border: var(--highlight-color) solid 1px;
}

/* --------------------------------------------------------------------------- */

.breadcrumbs {
  margin-top: 50px;
  padding: 6px 10px;
  overflow-y: auto;
  border-radius: 5px;
  display: flex;
  font-weight: bold;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0; 
  max-width: 250px; 
  word-wrap: break-word; 
  border-left: 1px solid #333;
  min-width: 200px;
}
.breadcrumbs > div {
  padding: 6px 10px;
  overflow-y: auto;
  border-radius: 5px;
  display: flex;
  font-weight: bold;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0; 
  max-width: 250px; 
  word-wrap: break-word; 
  min-width: 200px;
}

.breadcrumbs > div a {
  display: block;
  color: #bbb;
  text-decoration: none;
  white-space: normal;
  text-overflow: ellipsis;
}

.breadcrumbs a:hover {
  color: #fff;
}

.breadcrumbs h2 {
  margin-bottom: -3px;
}

.breadcrumbs a.active {
  color: var(--highlight-color);
}
/* --------------------------------------------------------------------------- */

.sidebar {
  max-width: 300px;
  background-color: #131313;
  padding: 10px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  border-right: 1px solid #333;
}

.sidebar h1 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #fff;
}

.sidebar new-category {
  margin-top: 55px;
  width: 80%;
  color: #ccc;
}
.sidebar h2 {
  font-size: 20px;
  margin-top: 55px;
  padding: 5px 2px 5px 5px;
  color: #ccc;
  transition: 0.3s ease-in-out;
}

.sidebar h2:hover {
  background-color: #333;
  border-radius: 5px;
  transition: 0.3s ease-in-out;
}

.sidebar h2.active {
  position: relative;
  color: var(--highlight-color); 
  background-color: #333;
  border-radius: 5px;
  transition: 0.3s ease-in-out;
}

.sidebar h2.active::after {
  content: "";
  position: absolute;
  right: 0; 
  top: 0;
  bottom: 0;
  width: 5px; 
  background-color: var(--highlight-color); 
  border-radius: 0 0px 0px 0; 
}

.sidebar i {
  color: #888;
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
  width: 100%;
}

.sidebar li {
  margin: 0px 0;
  margin-bottom: 10px;
  color: #bbb;
  padding: 8px 10px;
  width: 96%;
  transition: width 0.3s ease-in-out;
}

.sidebar a {
  text-decoration: none;
  font-weight: bold;
  color: inherit;
  transition: width 0.3s ease-in-out;
}

.sidebar a:hover {
  color: #fff; 
  transition: width 0.3s ease-in-out;
}

.sidebar li:hover {
  background-color: #333;
  border-radius: 5px;
  transition: 0.3s ease-in-out;
}

.sidebar li.active {
  position: relative;
  color: var(--highlight-color); 
  background-color: #333;
  border-radius: 5px;
  transition: 0.3s ease-in-out;
}

.sidebar li.active::after {
  content: "";
  position: absolute;
  right: 0; 
  top: 0;
  bottom: 0;
  width: 5px; 
  background-color: var(--highlight-color); 
  border-radius: 0; 
}

/* --------------------------------------------------------------------------- */


.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background-color: #12121285;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px); 
  -webkit-backdrop-filter: blur(5px); 
  font-family: sans-serif;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.navbar a:hover {
  text-decoration: underline;
}

.nav-left span,
.nav-right span {
  color: #ecf0f1;
  font-weight: normal;
}

/* --------------------------------------------------------------------------- */


.toast-container {
  position: fixed; 
  bottom: 20px;
  right: 20px;
  z-index: 9999; 
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none; 
}

.toast {
  background-color: #333;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  border: var(--highlight-color) 1px solid;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  opacity: 0;
  transform: translateY(20px);
  animation: toast-in 0.3s forwards, toast-out 0.3s forwards 2.3s;
  pointer-events: auto;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}
