/* Paint Overlay */
      #paintOverlay {
        position: fixed;
        top: 50%;
        left: 50%;
        width: 360px;
        max-width: 360px;
        max-height: 400px;
        min-height: 100px;
        min-width: 100px;
        height: 400px;
        background: #fff;
        border: 2px solid #3c3639;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: none;
        resize: both;
        overflow: hidden; /* wichtig für das interne Overlay */
        user-select: none;
      }

body.dark #paintOverlay {
  background: #474147;
}

      #paintHeader {
        background: #ffb3d9;
        color: #fff;
        padding: 6px 10px;
        cursor: move;
        display: flex;
        justify-content: space-between;
        align-items: center;
        user-select: none;
      }

      #closePaintBtn {
        background: #ff5555;
        border: none;
        color: white;
        font-weight: bold;
        cursor: pointer;
        padding: 3px 8px;
        border-radius: 3px;
        font-size: 16px;
      }

      #paintBody {
        padding: 10px;
      }

      #paintCanvas {
        border: 2px solid black;
        background-color: #ffffff;
        cursor: crosshair;
        touch-action: none;
        display: block;
        user-select: none;
      }

      .toolbar {
        margin-bottom: 10px;
        user-select: none;
      }

      button {
        background-color: transparent;
        margin-left: 5px;
        cursor: pointer;
        width: 40px;
        height: 40px;
        border: none;
        align-content: center;
        justify-content: center;
        transition: scale 0.3s ease;
      }

      .status {
        margin-top: 10px;
        font-weight: bold;
      }

      /* Bestätigungs-Popup innerhalb des Paint-Fensters */
      #confirmOverlay {
        position: absolute;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.6);
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: none;
        justify-content: center;
        align-items: center;
      }

      #confirmBox {
        background: white;
        padding: 20px;
        border: 2px solid black;
        border-radius: 8px;
        text-align: center;
        max-width: 300px;
      }

body.dark #confirmBox {
  background: #262431;}

/* DARK MODE */

.dark-mode #confirmBox {
          background: #474242;
}

.dark-mode #paintOverlay{
  background: #877878;
}

.dark-mode #paintHeader {
  color: #595444;
}

      #confirmBox p {
        margin-bottom: 19px;
        font-weight: bold;
      }

      #confirmBox button {
        margin: 0 10px;
        padding: 5px 15px;
        font-weight: bold;
        border-radius: 5px;
        width: 180px;
        border: none;
        cursor: pointer;
      }

#confirmBox button:hover{
  scale: 1.2;
}

      #confirmYes {
        background-color: #e46e8c;
        color: white;
      }

      #confirmCancel {
        background-color: #8ab5fe;
        color: white;
      }