.hidden {
    display: none !important;
}

.toast-overlay {
  position: fixed;
  bottom: 10%;
  left: 0;
  right: 0;
  width: 100%;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.toast-text {
  padding: 8px 10px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  color: white;
  font-family: sans-serif;
  font-size: 14px;
  text-align: center;
}

.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.1); /* 遮罩 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-container {
  width: 100px;
  height: 100px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: sans-serif;
}

.circle-track {
  width: 40px;
  height: 40px;
  position: relative;
  margin-bottom: 8px;
}

.dot {
  width: 6px;
  height: 6px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  animation: rotate-dot 1.2s linear infinite;
}

/* 8个点的延迟动画形成流动感 */
.dot:nth-child(1) { transform: rotate(0deg) translateX(15px); animation-delay: 0s; opacity: 1; }
.dot:nth-child(2) { transform: rotate(45deg) translateX(15px); animation-delay: 0.15s; }
.dot:nth-child(3) { transform: rotate(90deg) translateX(15px); animation-delay: 0.3s; }
.dot:nth-child(4) { transform: rotate(135deg) translateX(15px); animation-delay: 0.45s; }
.dot:nth-child(5) { transform: rotate(180deg) translateX(15px); animation-delay: 0.6s; }
.dot:nth-child(6) { transform: rotate(225deg) translateX(15px); animation-delay: 0.75s; }
.dot:nth-child(7) { transform: rotate(270deg) translateX(15px); animation-delay: 0.9s; }
.dot:nth-child(8) { transform: rotate(315deg) translateX(15px); animation-delay: 1.05s; }

@keyframes rotate-dot {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

.loading-text {
  font-size: 14px;
}




























.scan {
    position: fixed;
    top:0;
    bottom: 0;
    left:0;
    right: 0;
}

#scanner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 1000;
    background-color: black;
}
#videoElement {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#scanRegion {
    position: absolute;
    top: 20vh;
    left: 5vw;
    /*transform: translate(-20%, -20%);*/
    width: 80vw;
    height: 50vh;
    /*border: 2px solid rgba(255, 255, 255, 0.5)*/
    /*box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);*/
}
/*#scanLine {*/
/*    position: absolute;*/
/*    left: 5vw;*/
/*    width: 80vw;*/
/*    height: 5vh;*/
    /*background-color: #00ff00;*/
/*    animation: scan 2s linear infinite;*/
/*}*/
#scanLine {
    position: absolute;
    left: 5vw;
    width: 80vw;
    height: 12px; /* 线条高度 */
    animation: scan 2s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 伪元素用于创建球形顶端和两端虚化效果 */
#scanLine::before {
    content: '';
    width: 100%;
    height: 200%; /* 高度增加以包含顶部的球形效果 */
    background: radial-gradient(circle at center top, rgba(0, 255, 0, 1), rgba(0, 255, 0, 0.2) 70%, rgba(0, 255, 0, 0) 100%);
    position: absolute;
    top: -5px; /* 调整位置以使得球形位于顶部 */
    left: 0;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}
#closeButton {
    position: absolute;
    top: 10px;
    left:0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
#closeButton svg {
    width: 100%;
    height: 100%;
    fill: white;
}