/* ========================================================
   PQA 测试系列 · 通用样式
   在 styles.css 之上加载，只覆盖测试页特有部分
   品牌色：#dcfa14（柠绿，主色）/ #7fff7c（薄荷绿，强调点）
   ======================================================== */

:root {
  --pqa-accent: #dcfa14;
  --pqa-dot: #dcfa14;
  --pqa-bg: #f4f4f4;
  --pqa-card: #ffffff;
  --pqa-text: #1d1d1b;
  --pqa-muted: #656565;
  --pqa-border: #e1e1e1;
  --pqa-danger: #ff6b53;
}

/* 让中文字体更精致 */
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============== 测试页 Hero 区域 ============== */

.test-hero {
  padding: 14rem 0 6rem;
  text-align: center;
}
@media (max-width: 991.98px) { .test-hero { padding: 10rem 0 4rem; } }
@media (max-width: 767.98px) { .test-hero { padding: 8rem 0 3rem; } }

.test-hero h1 {
  font-size: clamp(3.4rem, 6vw, 6.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1.6rem;
  line-height: 1.15;
}
.test-hero h1 .dot {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--pqa-dot);
  margin-left: 0.1em;
  vertical-align: middle;
  transform: translateY(-0.1em);
}
.test-hero .subtitle {
  font-size: clamp(1.6rem, 2vw, 2rem);
  color: var(--pqa-muted);
  max-width: 60rem;
  margin: 0 auto 3rem;
  line-height: 1.5;
}
.test-hero .quote {
  font-size: 1.4rem;
  color: var(--pqa-muted);
  font-style: italic;
  margin-top: 2rem;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

/* 测试元数据徽章（"用时 / 报告样式"） */
.test-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
  margin: 2rem 0 0;
}
.test-meta .badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  background: #fff;
  border: 1px solid var(--pqa-border);
  border-radius: 999px;
  font-size: 1.3rem;
  color: var(--pqa-text);
}
.test-meta .badge-item::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pqa-dot);
}

/* ============== 表单区域 ============== */
.test-form-section {
  padding: 6rem 0;
  background: var(--pqa-bg);
}
.test-form-card {
  background: #fff;
  border-radius: 2rem;
  padding: 5rem 4rem;
  max-width: 72rem;
  margin: 0 auto;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.04);
}
@media (max-width: 767.98px) {
  .test-form-card { padding: 3rem 2rem; border-radius: 1.6rem; }
  .test-form-section { padding: 4rem 0; }
}

.test-form-card h2 {
  font-size: 2.4rem;
  margin: 0 0 0.8rem;
  font-weight: 600;
}
.test-form-card .form-intro {
  color: var(--pqa-muted);
  font-size: 1.5rem;
  margin-bottom: 3rem;
}

.field-group { margin-bottom: 2.8rem; }
.field-group:last-of-type { margin-bottom: 1.6rem; }

.field-group label {
  display: block;
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--pqa-text);
}
.field-group .help {
  display: block;
  font-size: 1.2rem;
  color: var(--pqa-muted);
  margin-top: 0.6rem;
}

.field-group input[type="number"],
.field-group input[type="text"],
.field-group input[type="date"],
.field-group select {
  width: 100%;
  padding: 1.2rem 1.4rem;
  font-size: 1.6rem;
  border: 1px solid var(--pqa-border);
  border-radius: 0.8rem;
  background: #fff;
  transition: border-color 0.15s;
  font-family: inherit;
  color: var(--pqa-text);
  -webkit-appearance: none;
  appearance: none;
}
.field-group input:focus,
.field-group select:focus {
  outline: none;
  border-color: var(--pqa-text);
}

/* 单选 / 多选按钮组 */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.radio-group label {
  flex: 1 1 calc(50% - 0.4rem);
  min-width: 8rem;
  margin: 0;
  cursor: pointer;
}
.radio-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-group .opt {
  display: block;
  padding: 1.1rem 1.4rem;
  text-align: center;
  border: 1px solid var(--pqa-border);
  border-radius: 0.8rem;
  font-size: 1.4rem;
  background: #fff;
  transition: all 0.15s;
}
.radio-group input[type="radio"]:checked + .opt {
  background: var(--pqa-text);
  color: #fff;
  border-color: var(--pqa-text);
}
.radio-group label:hover .opt {
  border-color: var(--pqa-text);
}

/* 提交按钮 */
.test-submit-btn {
  display: block;
  width: 100%;
  padding: 1.6rem 2rem;
  background: var(--pqa-accent);
  color: var(--pqa-text);
  border: none;
  border-radius: 0.8rem;
  font-size: 1.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, filter 0.15s;
  margin-top: 1.6rem;
  font-family: inherit;
}
.test-submit-btn:hover { filter: brightness(0.95); }
.test-submit-btn:active { transform: scale(0.99); }

/* ============== 结果区域 ============== */
.test-result-section {
  padding: 8rem 0;
  background: #fff;
  display: none;
}
.test-result-section.show { display: block; }
@media (max-width: 767.98px) {
  .test-result-section { padding: 5rem 0; }
}

.result-card {
  max-width: 72rem;
  margin: 0 auto;
  text-align: center;
}
.result-card .result-label {
  font-size: 1.4rem;
  color: var(--pqa-muted);
  letter-spacing: 0.08em;
  margin-bottom: 1.6rem;
}
.result-card .result-num {
  font-size: clamp(6rem, 14vw, 11rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 1.4rem 0 0.8rem;
}
.result-card .result-num .unit {
  font-size: 0.4em;
  font-weight: 500;
  margin-left: 0.2em;
  color: var(--pqa-muted);
}
.result-card .result-num .dot {
  display: inline-block;
  width: 0.18em;
  height: 0.18em;
  border-radius: 50%;
  background: var(--pqa-dot);
  margin-left: 0.05em;
  vertical-align: middle;
  transform: translateY(-0.45em);
}
.result-card .result-text {
  font-size: 1.8rem;
  line-height: 1.6;
  margin: 2.4rem auto;
  max-width: 56rem;
  color: var(--pqa-text);
}
.result-card .result-text strong {
  color: var(--pqa-text);
  background: linear-gradient(180deg, transparent 60%, var(--pqa-dot) 60%);
  padding: 0 0.2em;
  font-weight: 600;
}

/* 改善建议列表 */
.advice-list {
  text-align: left;
  max-width: 56rem;
  margin: 4rem auto;
  background: var(--pqa-bg);
  padding: 3rem;
  border-radius: 1.2rem;
}
.advice-list h3 {
  font-size: 1.6rem;
  margin: 0 0 1.8rem;
  font-weight: 600;
}
.advice-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.advice-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1.2rem;
  font-size: 1.5rem;
  line-height: 1.55;
}
.advice-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pqa-dot);
}
.advice-list li:last-child { margin-bottom: 0; }

/* ============== 分享 / 下载按钮组 ============== */
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
  margin: 4rem auto 0;
  max-width: 56rem;
}
.share-btn {
  flex: 1 1 auto;
  min-width: 13rem;
  padding: 1.2rem 1.8rem;
  border: 1px solid var(--pqa-text);
  background: #fff;
  color: var(--pqa-text);
  border-radius: 0.8rem;
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.share-btn:hover { background: var(--pqa-text); color: #fff; }
.share-btn.primary {
  background: var(--pqa-text);
  color: #fff;
}
.share-btn.primary:hover { filter: brightness(1.2); }

/* ============== 方法说明（折叠） ============== */
.method-block {
  max-width: 72rem;
  margin: 6rem auto 0;
  padding: 0 2rem;
}
.method-block details {
  border-top: 1px solid var(--pqa-border);
  padding: 2rem 0;
}
.method-block details summary {
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--pqa-muted);
  list-style: none;
}
.method-block details summary::-webkit-details-marker { display: none; }
.method-block details summary::after {
  content: " +";
  float: right;
  font-size: 1.6rem;
}
.method-block details[open] summary::after { content: " −"; }
.method-block details p {
  margin: 1.4rem 0 0;
  font-size: 1.3rem;
  color: var(--pqa-muted);
  line-height: 1.6;
}

/* ============== 测试聚合页（卡片网格） ============== */
.tests-grid {
  padding: 6rem 0 10rem;
  background: var(--pqa-bg);
}
.tests-grid .grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
  gap: 2.4rem;
  max-width: 120rem;
  margin: 0 auto;
}
.test-card {
  background: #fff;
  border-radius: 1.6rem;
  padding: 3.2rem 2.8rem;
  text-decoration: none;
  color: var(--pqa-text);
  display: flex;
  flex-direction: column;
  min-height: 24rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}
.test-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border-color: var(--pqa-text);
  color: var(--pqa-text);
}
.test-card .card-num {
  font-size: 1.2rem;
  color: var(--pqa-muted);
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.test-card .card-num::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pqa-dot);
}
.test-card h3 {
  font-size: 2.2rem;
  font-weight: 600;
  margin: 0 0 1rem;
  line-height: 1.25;
}
.test-card p {
  color: var(--pqa-muted);
  font-size: 1.4rem;
  line-height: 1.55;
  margin: 0 0 2rem;
  flex: 1;
}
.test-card .card-meta {
  font-size: 1.2rem;
  color: var(--pqa-muted);
  border-top: 1px solid var(--pqa-border);
  padding-top: 1.4rem;
}

/* ============== 简化的 header / footer ============== */
.test-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 2.4rem 0;
}
.test-header .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
}
@media (max-width: 767.98px) {
  .test-header .container-fluid { padding: 0 2rem; }
}
.test-header .logo img {
  height: 4.8rem;
  display: block;
}
.test-header .nav-back {
  font-size: 1.4rem;
  color: var(--pqa-text);
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--pqa-text);
  border-radius: 999px;
  transition: all 0.15s;
}
.test-header .nav-back:hover {
  background: var(--pqa-text);
  color: #fff;
}

.test-footer {
  background: var(--pqa-text);
  color: #fff;
  padding: 6rem 0 4rem;
  text-align: center;
}
.test-footer .footer-logo {
  height: 4rem;
  margin-bottom: 1.6rem;
  /* 使用 pqa.full.logo.dark.svg：白色文字 + 绿点，无需 filter */
}
.test-footer .footer-slogan {
  font-size: 1.6rem;
  margin: 0 0 2.4rem;
  opacity: 0.85;
}
.test-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.4rem;
  margin: 0 0 3rem;
  padding: 0;
  list-style: none;
}
.test-footer .footer-links a {
  color: #fff;
  font-size: 1.3rem;
  text-decoration: none;
  opacity: 0.7;
}
.test-footer .footer-links a:hover { opacity: 1; }
.test-footer .copyright {
  font-size: 1.2rem;
  opacity: 0.5;
  margin: 0;
}

/* 通用 toast 提示 */
.toast-tip {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%) translateY(2rem);
  background: var(--pqa-text);
  color: #fff;
  padding: 1.2rem 2rem;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  z-index: 1000;
}
.toast-tip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 隐藏的报告 DOM（用于截图） */
.report-stage {
  position: absolute;
  left: -99999px;
  top: 0;
  width: 1080px;
}
