* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #000;
  text-align: center;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

img {
  border: 0;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ---------------- 加载中 ---------------- */
.loading-screen {
  height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #e9f5ff, transparent);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #c8dff5;
  border-top-color: #3b8fe0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  margin-top: 10px;
  font-size: 14px;
  color: #606266;
}

/* ---------------- 顶部 ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 30px 0;
}

.hero--plain {
  padding: 0;
}

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__logo {
  width: 75px;
  height: 75px;
}

.hero__company {
  font-size: 19px;
  color: #fff;
}

/* ---------------- 结果卡片 ---------------- */
.card {
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
  border-radius: 15px;
  margin: 15px;
  padding: 15px;
}

.card__icon {
  width: 60px;
  height: 60px;
  display: block;
  margin: 0 auto 10px;
}

.card__congrats,
.card__cert {
  margin: 8px 0;
}

.card__code-label {
  font-size: 16px;
  font-weight: bold;
  margin: 15px auto;
  display: block;
}

.card__code {
  background: #fff;
  padding: 8px;
  color: #f00;
  border-radius: 8px;
  font-size: 16px;
}

.card__count {
  margin: 15px 0;
  font-weight: bold;
}

.card__count b {
  color: #f00;
  font-size: 21px;
}

/* ---------------- 警告框 ---------------- */
.alert {
  background: rgba(255, 0, 0, 0.5);
  border: 1px solid #f00;
  text-align: center;
  border-radius: 15px;
  padding: 15px;
  font-size: 14px;
  color: #fff;
}

.alert--over {
  margin-top: 8px;
}

.alert--strong {
  background: rgba(255, 0, 0, 0.65);
  border: 0;
  margin: 30px 15px;
}

.alert p {
  margin: 8px 0;
}

.alert__title {
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert__notice {
  display: block;
  font-size: 18px;
}

.alert__bang {
  display: block;
  font-size: 20px;
  font-weight: bold;
  animation: alarmShake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
  transform-origin: center bottom;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

@keyframes alarmShake {
  0% {
    transform: rotateZ(0deg) translate3d(0, 0, 0);
  }
  15% {
    transform: rotateZ(-15deg) translateX(-5px);
  }
  30% {
    transform: rotateZ(12deg) translateX(4px);
  }
  45% {
    transform: rotateZ(-9deg) translateX(-3px);
  }
  60% {
    transform: rotateZ(6deg) translateX(2px);
  }
  75% {
    transform: rotateZ(-3deg) translateX(-1px);
  }
  90%,
  100% {
    transform: rotateZ(0deg) translate3d(0, 0, 0);
  }
}

/* ---------------- 产品信息表 ---------------- */
.section {
  padding-top: 25px;
}

.section__title {
  margin: 0 15px;
  text-align: left;
}

.section__title img {
  height: 19px;
  width: auto;
}

.section__table {
  margin: 0 15px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ebeef5;
}

.info-table th,
.info-table td {
  padding: 10px 12px;
  font-size: 14px;
  color: #000;
  border: 1px solid #ebeef5;
  font-weight: normal;
}

.info-table th {
  text-align: left;
  background: #fff;
}

.info-table td {
  text-align: right;
}

/* ---------------- 质检报告 PDF ---------------- */
.report {
  margin: 15px 15px 0;
  text-align: left;
}

.report__label {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
}

.report__viewer {
  border: 1px solid #ebeef5;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f9fc;
}

/* pdf.js 画布：禁止选中、拖拽与移动端长按保存菜单 */
.report__page {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.report__page + .report__page {
  border-top: 1px solid #ebeef5;
}

.report__status {
  margin-top: 8px;
  font-size: 13px;
  color: #909399;
}

/* ---------------- 标语 / 底部 ---------------- */
.slogan {
  padding: 30px 0;
}

.slogan span {
  display: block;
  font-size: 31px;
  font-weight: bold;
}

.footer-imgs img {
  width: 100%;
  display: block;
}

/* ---------------- 公司信息块（失败页） ---------------- */
.company-block {
  width: 100%;
  padding: 30px 0;
}

.company-block__name {
  font-size: 19px;
  color: #000;
}

/* ---------------- 异常弹窗 ---------------- */
.modal-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}

.modal {
  width: 80%;
  max-width: 320px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

.modal__title {
  padding: 20px 20px 0;
  font-size: 17px;
  font-weight: bold;
}

.modal__body {
  padding: 16px 20px 20px;
  font-size: 14px;
  color: #333;
}

.modal__footer {
  display: flex;
  border-top: 1px solid #ebedf0;
}

.modal__btn {
  flex: 1;
  padding: 12px 0;
  border: 0;
  background: #fff;
  font-size: 16px;
  color: #333;
  cursor: pointer;
}

.modal__btn + .modal__btn {
  border-left: 1px solid #ebedf0;
}

.modal__btn--primary {
  color: #07c160;
}
