:root {
  --poster-width: 962;
  --poster-height: 1635;
  --ink: #111820;
  --blue: #0512c9;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #eef4fb;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.poster {
  position: relative;
  width: min(100vw, calc(100vh * var(--poster-width) / var(--poster-height)));
  max-width: 962px;
  aspect-ratio: 962 / 1635;
  margin: 0 auto;
  overflow: hidden;
  --code-font-size: 24px;
  --code-letter-spacing: 4.6px;
  --query-font-size: 34px;
  --time-font-size: 30px;
  --record-title-size: 24px;
  --record-strong-size: 18px;
  --record-text-size: 15px;
  background: url("bg.png") center top / 100% 100% no-repeat;
}

.code-text,
.query-times,
.first-time {
  position: absolute;
  z-index: 1;
  color: var(--ink);
  text-align: center;
  line-height: 1.45;
  white-space: nowrap;
}

.code-text {
  left: 50%;
  top: 54.43%;
  width: 30%;
  height: 3.82%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, calc(-50% + 3px));
  overflow: hidden;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  color: #5F7FE8;
  font-size: clamp(14px, 3vw, 21px);
  font-weight: 600;
  letter-spacing: clamp(0px, 0.2vw, 0.8px);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  max-width: 90%;
  margin: 0;
  padding: 0;
}

.query-times {
  left: 20%;
  top: 67.45%;
  width: 60%;
  height: 3.1%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  color: #111111;
  font-size: clamp(15px, 4vw, 20px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.first-time {
  left: 5%;
  top: 71.62%;
  width: 90%;
  height: 3.1%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  color: #111111;
  font-size: clamp(13px, 3.55vw, 18px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  max-width: 94%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.record-hotspot {
  position: absolute;
  left: 31%;
  top: 81.16%;
  z-index: 2;
  width: 38.2%;
  height: 4.3%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.record-hotspot:active {
  background: rgba(255, 255, 255, 0.08);
}

.record-mask {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8%;
  background: rgba(0, 20, 45, 0.28);
}

.record-dialog {
  width: 100%;
  max-height: 64%;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(0, 20, 45, 0.28);
  overflow: hidden;
}

.record-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.record-title h1 {
  margin: 0;
  color: var(--blue);
  font-size: var(--record-title-size);
  font-weight: 700;
}

.close-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.record-list {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px 14px;
}

.record-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.record-item:last-child {
  border-bottom: 0;
}

.record-item strong,
.record-item span {
  display: block;
  line-height: 1.55;
  letter-spacing: 0;
}

.record-item strong {
  color: var(--blue);
  font-size: var(--record-strong-size);
}

.record-item span {
  color: #263544;
  font-size: var(--record-text-size);
}

@media (min-aspect-ratio: 962 / 1635) {
  .page {
    align-items: center;
  }
}

@media (max-width: 600px) {
  .code-text {
    font-size: 15px;
    letter-spacing: 0;
    max-width: 86%;
  }

  .query-times {
    font-size: 15px;
    max-width: 88%;
  }

  .first-time {
    font-size: clamp(13px, 3.4vw, 14px);
    max-width: 92%;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .code-text {
    font-size: 15px;
  }

  .query-times {
    font-size: 15px;
  }

  .first-time {
    font-size: clamp(13px, 3.4vw, 14px);
    max-width: 94%;
  }
}
