body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
}

#notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 1000;
  display: none;
  font-family: "Roboto", sans-serif;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 2.5em;
  font-family: "Roboto", sans-serif;
  font-weight: bold;
  color: #333;
  z-index: 10000;
  opacity: 1;
  transition: opacity 1s ease-out;
}

#loading-bar-container {
  width: 50%;
  height: 20px;
  background-color: #f3f3f3;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-top: 20px;
  overflow: hidden;
}

#loading-bar {
  height: 100%;
  width: 0%;
  background-color: #4caf50;
  border-radius: 5px;
  transition: width 0.5s ease-in-out;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

#attribution {
  position: fixed;
  top: 10px;
  right: 10px;
  font-size: 1em;
  font-family: "Roboto", sans-serif;
  color: #333;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 5px 10px;
  border-radius: 5px;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#attribution a {
  color: #007bff;
  text-decoration: none;
}

#attribution a:hover {
  text-decoration: underline;
}

canvas {
  cursor: crosshair;
  width: 100vw;
  height: 100vh;
}

.buttons-wrapper {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: row-reverse;
}

.buttons {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 0;
  transition: max-width 0.3s ease;
  padding: 0;
}

.buttons button {
  padding: 12px 16px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  cursor: pointer;
  margin: 2px 0;
  white-space: nowrap;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  transition: background-color 0.2s;
  min-width: 200px;
}

.buttons button:hover {
  background: rgba(240, 240, 240, 0.9);
}

.buttons button:first-child {
  border-radius: 8px 0 0 0;
}

.buttons button:last-child {
  border-radius: 0 0 0 8px;
}

.buttons-toggle-btn {
  width: 40px;
  height: 80px;
  background: #333;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px 0 0 8px;
  font-size: 16px;
  transition: background 0.3s;
}

.buttons-wrapper.open .buttons {
  width: 220px;
}

.buttons-wrapper.open .buttons-toggle-btn {
  transform: none;
}

.tp-btns {
  position: absolute;
  bottom: 0;
  right: 16px;
  display: flex;
  flex-direction: row;
  box-shadow: 2px 0 10px #00000030;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  padding: 4px 4px 0 4px;
  gap: 4px;
  background-color: #ffffff;
}

.tp-btns button {
  background-color: #ffffff;
  border: none;
  font-size: 16px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.colors-list {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 0%);
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0px 8px 0px 0px rgba(0, 0, 0, 0.17);
  border: 1px solid gray;
  background-color: white;
  padding: 20px;
}

.colors-list .color-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.color-indicator {
  position: fixed;
  margin: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  border: 2px solid black;
}

.eraser {
  padding-top: 5px;
}

.eraser img {
  width: 25px;
}

.erase-mod {
  box-shadow: inset 0px 0px 5px 12px rgba(255, 0, 0, 0.67);
}

.color-list-burger {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
}

.colors-list.active {
  display: flex;
  flex-direction: column-reverse;
  left: 80px;
  bottom: 80px;
}

.mobile-mode {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-size: 24px;
  background-color: #007bff;
  padding: 32px;
  padding-top: 12px;
  padding-bottom: 12px;
  border: none;
  border-radius: 24px;
  color: white;
}

@media screen and (max-width: 810px) {
  .colors-list {
    display: none;
  }
  .color-list-burger {
    display: initial;
  }
  .color-indicator {
    display: none;
  }
  .buttons-wrapper {
    top: auto;
    bottom: 20px;
    right: 0;
    transform: none;
  }
  .buttons {
    flex-direction: column;
  }
  .mobile-mode {
    display: initial;
  }
}
