#pdf-overlay {
  pointer-events: none;
  font-family: 'OpenDyslexic', Arial, sans-serif;
  white-space: pre;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
}

.dyslexia-mode #pdf-overlay {
  font-family: 'OpenDyslexic', Arial, sans-serif;
}

body {
  background-color:#272727;
  overflow: hidden;
}

.body-canvas {
  position: absolute;
  top: 50px;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  text-align: center;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #555 #333;
  z-index: 10;
}

.body-canvas::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.body-canvas::-webkit-scrollbar-thumb {
  background-color: rgba(100, 100, 100, 0.5);
  border-radius: 4px;
}

.body-canvas::-webkit-scrollbar-thumb:hover {
  background-color: rgba(130, 130, 130, 0.8);
}

#pdf-canvas {
  position: relative;
  display: inline-block;
  vertical-align: top;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.4);
  max-width: none;
  width: auto;
  height: auto;
}



/* ----- Toolbar ----- */



.toolbar {
  font-family: 'OpenDyslexic';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: rgb(50, 50, 50);
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0px;
  overflow: hidden;
  gap: 2px;
  z-index: 1000;
}

/* -- Toolbar Button -- */

.toolbar button {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  filter: invert(55%);
  transition: filter 0.1s ease-in-out;
}

.toolbar button img {
  width: 20px;
  height: 20px;
}

.toolbar button:hover {
  filter: invert(45%);
}

.toolbar button:active {
  filter: invert(30%);
  transition: filter 0.05s ease-in-out;
}

/* -- Toolbar Input -- */

.toolbar input {
  width: 40px;
  height: 28px;
  text-align: center;
  border: none;
  border-radius: 5px;
  outline: none;
  font-family: 'OpenDyslexic';
  font-size: 16px;
  justify-content: center;
  background-color: #444;
  color: white;
}

.toolbar input:hover {
  background-color: #525252;
  transition: background-color 0.1s ease-in-out;
}

.toolbar input:focus {
  background-color: #474747;
  transition: background-color 0.1s ease-in-out;
}

/* -- Toolbar Select -- */

.toolbar select {
  height: 28px;
  min-width: 60px;
  padding: 0 5px;
  border: none;
  border-radius: 5px;
  outline: none;
  font-family: 'OpenDyslexic';
  font-size: 16px;
  background-color: #444;
  color: white;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* --- Toolbar Separation --- */

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  padding-left: 15px;
  padding-right: 15px;
  overflow: visible;
}

.toolbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

#file-path {
  color: white;
  font-size: 12px;
  margin-left: 10px;

  display: flex;
  align-items: center;
  max-width: calc(50vw - 175px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

}

.page-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 35px;
  padding: 5px;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.settings-container {
  position: relative;
  display: inline-block;
}

.settings-dropdown {
  position: absolute;
  background-color: #444;
  border: 1px solid #555;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 180px;
  z-index: 2000;
}

.settings-dropdown label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'OpenDyslexic';
  color: white;
  font-size: 14px;
  cursor: pointer;
}

.settings-dropdown input[type="checkbox"] {
  accent-color: #888;
  transform: scale(1.1);
}