/* ============ SHARED STYLES ============ */

/* 响应式根字号：仅根据视口宽度平滑缩放文字大小（最小 15px / 最大 17px）。
   字体族、字重等其它样式在各设备保持一致，不随设备变化。
   Tailwind 的 text-* 类基于 rem，会随根字号等比缩放，从而在每个手机上都有合适的显示效果。 */
html {
  font-size: clamp(15px, 4.1vw, 17px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.fade-in {
  animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide-in {
  animation: slideIn 0.4s ease-out;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.option-btn {
  transition: all 0.2s ease;
}
.option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(38, 50, 76, 0.1);
}
.option-btn:active {
  transform: translateY(0);
}
.gradient-bg {
  background:
    radial-gradient(120% 55% at 50% -8%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #f7f8fd 0%, #eef1fa 45%, #e6eaf7 100%);
}
/* ============ RESULT PAGE（报告页）深蓝 + 砖红 + 米白 ============ */
.result-bg {
  background:
    radial-gradient(120% 55% at 50% -8%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #f7f8fd 0%, #eef1fa 45%, #e6eaf7 100%);
  color: #26324c;
}
.result-brand { display: inline-flex; align-items: center; gap: 10px; }
.result-brand-line { width: 26px; height: 1px; background: linear-gradient(90deg, transparent, rgba(38, 50, 76, 0.35)); }
.result-brand-line:last-child { background: linear-gradient(90deg, rgba(38, 50, 76, 0.35), transparent); }
.result-brand-text { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.32em; color: #26324c; }

.result-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e8f2;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(38, 50, 76, 0.07);
}
.result-card-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, rgba(176, 68, 58, 0.55), transparent);
}
.result-title {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #26324c;
}
.result-title .result-tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 2px;
  border-radius: 8px;
  background: #b0443a;
  color: #ffffff;
  font-size: 0.94em;
  line-height: 1.5;
  vertical-align: 2px;
}
.result-subtitle { font-size: 0.72rem; line-height: 1.6; color: #7b8298; }
.result-footnote { font-size: 0.62rem; text-align: center; color: #9aa0b2; }

.result-panel { position: relative; overflow: hidden; border-radius: 16px; padding: 14px 10px; text-align: center; }
.result-panel-sin {
  background: #efeff2;
  color: #26324c;
  box-shadow: inset 0 0 0 1px rgba(38, 50, 76, 0.06);
}
.result-panel-virtue {
  background: #f6ece9;
  color: #b0443a;
  border: 1px solid #ead7d1;
}
.result-panel-label { font-size: 0.66rem; letter-spacing: 0.1em; opacity: 0.7; margin-bottom: 6px; }
.result-panel-name {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}
.result-panel-score { margin-top: 6px; font-size: 0.66rem; opacity: 0.7; }
.result-panel-score b { font-size: 0.9rem; font-weight: 700; margin-right: 2px; }

.result-diff {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f4f5f9;
  border: 1px solid #e9ebf3;
}
.result-diff-label { font-size: 0.66rem; color: #7b8298; letter-spacing: 0.04em; }
.result-diff-value { font-size: 0.92rem; font-weight: 700; color: #b0443a; }
.result-diff.is-pos .result-diff-value { color: #b0443a; }
.result-diff.is-neg .result-diff-value { color: #26324c; }
.result-diff-hint { font-size: 0.6rem; padding: 1px 7px; border-radius: 999px; background: rgba(176, 68, 58, 0.08); color: #b0443a; }

.result-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(38, 50, 76, 0.12), transparent); }

.result-section-head { display: flex; align-items: center; justify-content: space-between; }
.result-section-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #26324c;
}
.result-section-badge { font-size: 0.58rem; letter-spacing: 0.12em; color: #b0443a; padding: 2px 8px; background: #fbece9; border: 1px solid #f0d5cf; border-radius: 999px; }

.result-group-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; font-size: 0.88rem; font-weight: 700; }
.result-group-head.sin { background: #f1f2f6; color: #26324c; border: 1px solid #e9ebf3; }
.result-group-head.virtue { background: #f6ece9; color: #b0443a; border: 1px solid #ead7d1; }
.result-group-dot { width: 5px; height: 15px; border-radius: 999px; background: currentColor; opacity: 0.8; }

.result-dim { padding-bottom: 12px; border-bottom: 1px dashed #eaecf4; }
.result-dim:last-child { padding-bottom: 0; border-bottom: 0; }
.result-dim-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.result-dim-name { font-size: 0.9rem; font-weight: 700; }
.result-dim.sin .result-dim-name { color: #26324c; }
.result-dim.virtue .result-dim-name { color: #b0443a; }
.result-dim-score { font-size: 1rem; font-weight: 700; color: #26324c; }
.result-dim-score i { font-style: normal; font-size: 0.62rem; font-weight: 500; margin-left: 2px; color: #8a91a6; }
.result-track { height: 6px; border-radius: 999px; background: #eceef5; overflow: hidden; }
.result-fill { height: 100%; border-radius: 999px; transition: width 0.8s ease-out; }
.result-fill.sin { background: linear-gradient(90deg, #5b5f70, #2b2b2b); }
.result-fill.virtue { background: linear-gradient(90deg, #cf8878, #b0443a); }
.result-dim-desc { margin-top: 6px; font-size: 0.76rem; line-height: 1.7; color: #7b8298; }

.result-note {
  padding: 16px 18px;
  border-radius: 16px;
  background: #f6f7fb;
  border-left: 3px solid rgba(176, 68, 58, 0.45);
}
.result-note h3 { font-size: 0.88rem; font-weight: 700; color: #26324c; margin-bottom: 8px; }
.result-note p { font-size: 0.76rem; line-height: 1.75; color: #7b8298; margin-bottom: 6px; }
.result-note p:last-child { margin-bottom: 0; }

.result-home-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #b0443a 0%, #96362e 100%);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px rgba(176, 68, 58, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.result-home-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(176, 68, 58, 0.32); }
.result-home-btn:active { transform: translateY(0); }

/* 报告页内嵌组件配色适配 */
.result-bg .comment-container { margin: 24px 0 0; }
.result-bg .comment-box {
  margin: 24px 0 0;
  background: #ffffff;
  border-color: #e5e8f2;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(38, 50, 76, 0.07);
}
.result-bg .comment-box-button,
.result-bg .copy_button,
.result-bg .thank_button { background-color: #b0443a; }
#footerWidgets .qr-content {
  margin: 16px 0 24px;
  padding: 24px 18px;
  background: #ffffff;
  border: 1px solid #e5e8f2;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(38, 50, 76, 0.07);
}
#footerWidgets .qr-content .qr-text { color: #5d667e; }
#footerWidgets .qr-content .qr-text span { color: #b0443a; font-weight: 700; }
.result-bg .qr-popup .qr-text span { color: #b0443a; }

.start-btn {
  background: linear-gradient(135deg, #b0443a 0%, #96362e 100%);
  box-shadow: 0 10px 30px rgba(176, 68, 58, 0.28);
  transition: all 0.3s ease;
}
.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 38px rgba(176, 68, 58, 0.36);
}
.start-btn:active {
  transform: translateY(0);
}
.progress-bar {
  transition: width 0.4s ease;
}
.dimension-bar {
  transition: width 0.8s ease-out;
}
.scroll-container::-webkit-scrollbar {
  display: none;
}
.scroll-container {
  scrollbar-width: none;
}
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0.7; }
}
.pulse-ring {
  animation: pulse-ring 2s ease-in-out infinite;
}
.lazy-option, .eager-option {
  transition: all 0.25s ease;
}
.lazy-option:hover, .eager-option:hover {
  transform: translateY(-1px);
}
.likert-circle {
  transition: all 0.25s ease;
  cursor: pointer;
}
.likert-circle:hover {
  transform: scale(1.05);
}
.likert-circle:active {
  transform: scale(0.95);
}
.likert-label {
  font-size: 0.625rem;
  text-align: center;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.progress-text {
  animation: fadeIn 0.3s ease;
}
#questionContent, #questionContent h2 {
  transition: opacity 0.15s ease;
}
