
#grid {
    display: grid;
    grid-gap: 1px; /* Space between cells */
    width: 100%; /* Container width */
    height: 100%; /* Container height */
    max-height: 500px; /* Optional max-height */
    margin: 0 auto;
    overflow: hidden;
}

.cell {
    width: 30px;
    height: 30px;
    background-color: #eee;
    border: 1px solid #ccc;
    box-sizing: border-box;
    text-align: center;
    line-height: 30px;
    font-size: 10px;
    user-select: none;
    cursor: pointer;
}

.click-start {
    border: 2px solid red;
}

.highlight {
    font-weight: bold;
    font-size: 9px;
}

.selection-item {
    margin: 5px 0;
    padding: 5px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    display: inline-block;
}

input[type="number"] {
    width: 60px;
}

input[type="text"] {
    width: 70px;
}

.origin-x, .origin-y {
    position: absolute;
    background-color: red;
    z-index: 10;
}

.origin-x {
    height: 2px;
    width: 100%;
    top: 0;
    left: 0;
}

.origin-y {
    width: 2px;
    height: 100%;
    top: 0;
    left: 0;
}
/* Add this CSS for the spinner */
/* Style for the spinner */
.spinner {
  border: 4px solid #f3f3f3; /* Light gray background */
  border-top: 4px solid #3498db; /* Blue color for the spinner */
  border-radius: 50%;
  width: 40px; /* Set spinner size */
  height: 40px; /* Set spinner size */
  animation: spin 2s linear infinite; /* Animate the spinner */
  margin: 20px auto; /* Center the spinner */
}

/* Keyframes for spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Center the loading message in the middle of the window */
#loadingMessage {
  position: fixed; /* Fixed positioning to stay in the same place */
  top: 50%; /* Center vertically */
  left: 50%; /* Center horizontally */
  transform: translate(-50%, -50%); /* Adjust for the size of the element */
  display: flex;
  flex-direction: column;
  align-items: center; /* Align spinner and text horizontally */
  justify-content: center; /* Align spinner and text vertically */
  z-index: 9999; /* Ensure it's on top of other content */
  background-color: rgba(255, 255, 255, 0.7); /* Optional: semi-transparent background */
  padding: 20px;
  border-radius: 10px;
}


/*#spinner:not([hidden]) {*/
/*            position: fixed;*/
/*            top: 0;*/
/*            left: 0;*/
/*            right: 0;*/
/*            bottom: 0;*/
/*            display: flex;*/
/*            justify-content: center;*/
/*            align-items: center;*/
/*        }*/

/*        #spinner::after {*/
/*            content: "";*/
/*            width: 85px;*/
/*            height: 85px;*/
/*            border: 8px solid #e3e3e357;*/
/*            border-top: 6px solid #3495f0b6;*/
/*            border-radius: 100%;*/
/*            will-change: transform;*/
/*            animation: spin 1s infinite linear*/
/*        }*/

/*        #spinner span {*/
/*            position: absolute;*/
/*            top: 50%;*/
/*            left: 50%;*/
/*            transform: translate(-50%, -50%);*/
/*            font-size: 20px;*/
/*            color: #191970; !* 确保百分比在暗色背景上可见 *!*/
/*        }*/

/*        #spinner::after {*/
/*            content: "";*/
/*            width: 70px;*/
/*            height: 70px;*/
/*            border: 8px solid #e3e3e3;*/
/*            border-top: 6px solid #191970;*/
/*            border-radius: 100%;*/
/*            will-change: transform;*/
/*            animation: spin 1s infinite linear*/
/*        }*/