/* 移除所有边距和填充 */
body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 移动端优化样式 */
@media screen and (max-width: 767px) {
    body {
        background-color: #f0f0f0;
    }
    #page-home {
        width: 100vw;
        max-width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        border: none;
    }
}

@media screen and (min-width: 768px) {
    body {
        background-color: #f0f0f0;
    }
    #page-home {
        max-width: 400px;
        margin: 2rem auto;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
    display: none;
}

/* 防止页面缩放 */
input, textarea {
    font-size: 16px !important;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
@keyframes scan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}
.scan-line {
  animation: scan 2s linear infinite;
}
#scanner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: none;
  flex-direction: column;
}
#video-container {
  position: relative;
  width: 100%;
  max-width: 375px;
  margin: 0 auto;
  height: 80vh;
}
#video-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 200px;
  border: 2px solid #00ff00;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
}
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #00ff00;
  animation: scanAnimation 2s linear infinite;
}
@keyframes scanAnimation {
  0% { top: 0; }
  100% { top: 100%; }
}
.scanner-header {
  background-color: #1e40af;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scanner-button {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}
.centered-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: white;
}

.scanner-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #1e40af;
}

.scanner-capture-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.scanner-capture-btn:hover {
  background-color: #2563eb;
  transform: scale(1.05);
}

.scanner-capture-btn:active {
  transform: scale(0.95);
}