/* 基准字体大小 */
html {
  font-size: 16px; /* PC 默认 */
}

/* 移动端（屏幕宽度 ≤ 768px） */
@media screen and (max-width: 768px) {
  html {
    font-size: 14px; /* 移动端稍小 */
  }
}

/* PC 端（屏幕宽度 ≥ 1024px） */
@media screen and (min-width: 1024px) {
  html {
    font-size: 18px; /* PC 放大 */
  }
  .main {
    /* max-width: 1200px; 限制最大宽度 */
    margin: 0 auto; /* 居中 */
  }
}

body {
  position: relative;
  margin: 0 auto;
  background: #fefeff;
}

body::-webkit-scrollbar {
  width: 0px;
  height: 0;
}

.main {
  position: relative;
  width: 100%;
  /* max-width: 750px; */
  height: 100vh;
  font-size: 0.875rem; /* 14px / 16px */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.main .btn {
  display: block;
  width: 149px;
  height: 45px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 1.5rem; /* 24px / 16px */
  cursor: pointer;
  margin-top: 120px;
}

/* 调整 logo 的内联样式 */
.logo {
  width: 50vw; /* 适配屏幕，约 200px 在 375px 屏幕上 */
  max-width: 12.5rem; /* 200px / 16px */
  height: auto; /* 保持比例 */
}

/* Document
 * ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */

:where(html) {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  text-size-adjust: 100%; /* 2 */
}

/* Sections
 * ========================================================================== */

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Edge, Firefox, and Safari.
 */

:where(h1) {
  font-size: 2em;
  margin-block-end: 0.67em;
  margin-block-start: 0.67em;
}

/* Grouping content
 * ========================================================================== */

/**
 * Remove the margin on nested lists in Chrome, Edge, and Safari.
 */

:where(dl, ol, ul) :where(dl, ol, ul) {
  margin-block-end: 0;
  margin-block-start: 0;
}

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Correct the inheritance of border color in Firefox.
 */

:where(hr) {
  box-sizing: content-box; /* 1 */
  color: inherit; /* 2 */
  height: 0; /* 1 */
}
.custom-toast {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 24px 40px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.custom-toast.hide {
  opacity: 0;
  transition: opacity 0.5s ease;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
/**
 * 圆形进度条
 */
.progress-circle {
  position: relative;
  width: 160px;
  height: 160px;
}

.progress-circle svg {
  transform: rotate(-90deg);
}

.progress-circle circle {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}

.bg {
  stroke: #ddd;
}

.progress {
  stroke: #007bff;
  stroke-dasharray: 440;
  stroke-dashoffset: 435;
  animation: progressAnim 2s linear forwards;
}

@keyframes progressAnim {
  from {
    stroke-dashoffset: 435;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.6em;
  font-weight: bold;
  color: #333;
  font-family: sans-serif;
}
#main-content,
#app {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.footer-tip {
  position: fixed;
  bottom: 10px;
  left: 0;
  right: 0;
  padding: 0 10px;
  text-align: center;
  font-size: clamp(6px, 2.5vw, 13px);
  color: #666;
  line-height: 1.6;
  word-break: break-word;
  z-index: 99;
  background-color: transparent;
}
/* #desktop-tip {
  display: none;
  text-align: center;
} */
/* #access-denied {
  display: none;
  text-align: center;
} */
#desktop-tip .tip {
  max-width: 90%;
  height: auto;
  text-align: center;
  margin-bottom: 20px;
}

/* PC 模式强制隐藏主内容 */
/* body.pc-mode #app {
  display: none !important;
}
body.pc-mode #desktop-tip {
  display: block !important;
} */
#desktop-tip .main .tip {
  /* 向上偏移一点 */
  transform: translateY(-30px);
}
#desktop-tip .main .qrcodeframe {
  width: 318px;
  height: 318px;
  transform: translateY(35%);
  display: flex;
  justify-content: center;
  align-items: center;
  background-size: cover;
}
#desktop-tip .main .qrcode {
  /* 向上偏移一点 */
  /* transform: translateY(30%);
  width: 10rem; */
  width: 95%;
  height: 95%;
}

/* 禁止访问模式 */
/* .access-denied #app {
  display: none !important;
}
.access-denied #access-denied {
  display: block !important;
}
.access-denied #desktop-tip {
  display: none !important;
}
.access-denied #footer-tip {
  display: none !important;
} */

.access-denied {
  margin: 0;
  padding: 0;
  text-align: center;
  font-family: "宋体", "微软雅黑", sans-serif;
  background: #f5f5f5;
  color: #333;
}

/* 容器：移动端适配 */
.news-container {
  max-width: 750px;
  width: 94%;
  margin: 30px auto;
  background: #fff;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* 标题区 */
.header {
  text-align: center;
  margin-bottom: 15px;
}
.header h1 {
  font-size: 22px;
  color: #003366;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

/* 小字内容 */
.keywords,
.date {
  text-align: center;
  font-size: 13px;
  color: #777;
  margin-bottom: 15px;
}

/* 分隔线 */
.divider {
  border-top: 2px solid #003366;
  margin: 15px 0;
}

/* 正文段落 */
p {
  text-indent: 2em;
  line-height: 1.6;
  font-size: 15px;
  margin-bottom: 16px;
}

/* 首段首字特效 */
p:first-of-type::first-letter {
  font-size: 1.8em;
  font-weight: bold;
  color: #003366;
  margin-right: 4px;
  float: left;
  line-height: 1;
}

/* 责任编辑 */
.editor {
  text-align: right;
  margin-top: 30px;
  font-size: 13px;
  color: #555;
  border-top: 1px dashed #bbb;
  padding-top: 10px;
}

/* 移动端专用微调 */
@media screen and (max-width: 768px) {
  .news-container {
    padding: 16px;
  }
  .header h1 {
    font-size: 20px;
  }
  p {
    font-size: 14px;
  }
  .keywords,
  .date,
  .editor {
    font-size: 12px;
  }
  #desktop-tip .main .qrcodeframe {
    width: 150px;
    height: 150px;
    transform: translateY(35%);
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
  }
  #desktop-tip .main .qrcode {
    /* 向上偏移一点 */
    /* transform: translateY(30%);
  width: 10rem; */
    width: 90%;
    height: 90%;
  }
}
