* {
    box-sizing: border-box;
  }
  
  body {
    background-color: steelblue;
    display: flex;
    align-items: center;
    justify-content: center; /* 确保内容水平居中 */
    height: 100vh;
    overflow: auto;
    margin: 0;
    flex-direction: column;
    overflow-x: auto;
  }
  
  .before, .after {
    display: flex;
    justify-content: center; /* 修改：确保子元素水平居中 */
    align-items: center; /* 确保子元素垂直居中 */
    margin-bottom: 1vh;
    width: 60vw; /* 修改：减少宽度以适应小屏幕 */

}

.empty, .fill, .fix {
    font-size: 2.5vw; /* 修改：减小字体大小以优化横向占用空间 */
}

  .empty {
    height: 15vh;
    width: 15vh;
    margin: 1vh;
    border: solid 3px black;
    background: white;
    justify-content: center;
    align-items: center;
    font-size: 3vw; /* 使用相对单位 */
    display: flex;
  }
  
  .fill {
    background: rgb(215, 226, 16);
    height: 15vh;
    width: 15vh;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    font-size: 3vw; /* 使用相对单位 */
    display: flex;
  }
  
    
  .fix {
    background: rgb(53, 206, 11);
    height: 15vh;
    width: 15vh;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    font-size: 3vw; /* 使用相对单位 */
    display: flex;
  }

  .hold {
    border: solid 5px #ccc;
    opacity: 0.5;
  }
  
  .hovered {
    background-color: #333;
    border-color: white;
    border-style: dashed;
    background-color: lightgray;
  }

  .success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center; /* 确保缩放以中心为基准 */
    font-size: 2em;
    color: #4CAF50;
    background: rgba(171, 230, 171, 0.8);
    padding: 20px;
    border-radius: 15px;
    animation: celebration 1.5s ease-in-out;
    box-shadow: 0 0 20px rgba(36, 46, 36, 0.5);
    z-index: 9999;
}

  @keyframes celebration {
    0% { 
      transform: translate(-50%, -50%) scale(1); /* 同时包含定位和缩放 */
      opacity: 1;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2); /* 同时包含定位和缩放 */
        opacity: 0.8;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1); /* 同时包含定位和缩放 */
        opacity: 1;
    }
  }
  @media (max-width: 800px) {
    .before, .after {
        flex-direction: column; /* 在小屏幕设备上垂直排列子元素 */
        align-items: center; /* 居中对齐子元素 */
    }

    .empty, .fill, .fix {
        font-size: 6vw; /* 进一步缩小字体大小 */
    }
  }

  @media (min-width: 1200px) {
    .before, .after {
        flex-direction: row; /* 在宽屏设备上水平排列子元素 */
        justify-content: space-between; /* 子元素之间有间距 */
    }

    .empty, .fill, .fix {
        font-size: 3vw; /* 调整字体大小以适应更大的屏幕 */
    }
  }

