@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* 移除点击时的蓝色高亮 */
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Noto Sans SC", sans-serif;
  background-color: #fffdf2;
  padding: 5.3333vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* 首页 */
#home-page {
  flex-direction: column;
  align-items: center;
  padding: 5.3333vw;
  border: 0.5333vw solid #4b3f3f;
  border-radius: 5.3333vw;
  background-color: #ffffff;
}

.home-title-en {
  font-size: 5.8667vw;
  font-weight: 800;
  font-style: italic;
  color: #f6a7d1;
}

.home-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-title h1 {
  font-size: 9.3333vw;
  font-weight: 800;
  color: #4b3f3f;
  margin-top: 4vw;
}

.home-title span {
  font-weight: 800;
  font-size: 8.5333vw;
  color: #4b3f3f;
}

.home-title em {
  font-style: normal;
  color: #f35f6e;
}

.subtitle {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 1.3333vw;
  font-size: 3.7333vw;
}

.subtitle1 {
  text-align: left;
  padding: 0 1.0667vw;
  text-justify: inter-character;
  border-left: 0.5333vw solid #443335;
}

.subtitle2 {
  text-align: left;
  text-justify: inter-character;
}

.disclaimer-container {
  margin-top: 5.3333vw;
  padding: 2.6667vw;
  border: 0.2667vw solid #4b3f3f44;
  border-radius: 4vw;
  /* box-shadow: .5333vw .5333vw .8vw rgba(14, 14, 14, 0.062); */
  background-color: rgba(156, 163, 175, 0.062);
}

.dis-title {
  color: #5a5a5a;
  font-size: 3.2vw;
}

/* 免责声明 */
.checkbox-wrapper {
  margin-top: 5.3333vw;
}

.checkbox-box {
  display: flex;
  gap: 1.0667vw;
  align-items: center;
  /* 移除点击时的蓝色高亮 */
  -webkit-tap-highlight-color: transparent;
}

.checkbox-box span {
  color: #929292;
}

#agree-checkbox {
  opacity: 0;
  cursor: pointer;
  display: none;
}

.checkbox-wrapper span {
  font-size: 3.7333vw;
  cursor: pointer;
}

#agree-checkbox:checked ~ span {
  color: #222222;
}

.custom-checkbox {
  width: 4.2667vw;
  height: 4.2667vw;
  border: 0.6vw solid #d1d5db;
  border-radius: 1.0667vw;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.5333vw;
  cursor: pointer;
}

#agree-checkbox:checked + .custom-checkbox::after {
  display: block;
}

#agree-checkbox:checked + .custom-checkbox {
  background-color: #faf3cb; /* 选中时的背景色（可选） */
  border: 0.6vw solid #f7000000;
}

.custom-checkbox::after {
  content: "✓";
  font-size: 3.2vw;
  font-weight: bold;
  color: #4b3f3f;
  display: none;
}

/* 开始测试按钮 */
#start-btn {
  margin-top: 5.3333vw;
  font-size: 5.3333vw;
  padding: 2.6667vw 5.3333vw;
  width: 70%;
  border-radius: 4.8vw;
  border: 0.5333vw solid #4b3f3f44;
  background-color: #e2e2e2;
  font-weight: bold;
  transition: all 0.2s;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10+ */
  user-select: none; /* 标准语法 */
}

.checkbox-wrapper:has(#agree-checkbox:checked) + .btn {
  background-color: #faf3cb;
  color: #4b3f3f;
  border: 0.5333vw solid #4b3f3f;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 1.0667vw 1.0667vw 0vw #4b3f3f1f;
}

#start-btn:active {
  transform: translate(0.5333vw, 0.5333vw);
}

/* 邀请码 */
#invite-modal {
  position: fixed;
  top: 0;
  left: 0;
  /* 基础样式 */
  width: 100%;
  height: 100%;

  display: flex;
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */
  z-index: 1000;

  background: rgba(87, 79, 74, 0.603);
  padding: 5.3333vw;
  z-index: 1001;

  /* 核心属性：模糊背景后的内容 */
  backdrop-filter: blur(2.1333vw);
  -webkit-backdrop-filter: blur(2.1333vw); /* 兼容 Safari */
}

.modal-content {
  display: flex;
  flex-direction: column;
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */

  width: 80vw;
  background: #fcfaf8;

  padding: 8vw;
  border-radius: 5.3333vw;
  border: 0.8vw solid #4b3f3f;

  box-shadow: 0vw 2.6667vw rgba(0, 0, 0, 0.199);
}

.modal-title {
  font-size: 8vw;
  color: #4b3f3f;
  font-weight: 800;
  margin-bottom: 8vw;
}

.invite-input {
  width: 100%;
  height: 21.3333vw;
  outline: none;
  border: 0.8vw solid #4b3f3f;
  border-radius: 5.3333vw;

  padding: 2.6667vw;
  text-align: center;
  text-indent: 2.6667vw;

  font-size: 10.6667vw;
  font-weight: 800;
  letter-spacing: 2.6667vw;
  color: #4b3f3f;
}

.invite-input::placeholder {
  letter-spacing: 2.6667vw;
  color: #a0949462;
  text-align: center;
}

.invite-input:focus::placeholder {
  color: transparent;
}

/* 验证码错误 */
#invite-error {
  color: #ef4444;
  font-weight: bold;
  margin-top: 5.3333vw;
}

/* 确认按钮 */
.btn-confirm {
  margin-top: 5.3333vw;
  width: 100%;
  height: 16vw;

  background-color: #4b3f3f;
  border: none;
  border-radius: 5.3333vw;

  color: #fdfaf7;
  line-height: 16vw;
  font-size: 5.3333vw;
  font-weight: 800;

  cursor: pointer;
}

.btn-cancle {
  margin-top: 2.6667vw;
  width: 100%;
  height: 16vw;

  /* background-color: #4b3f3f; */
  border: none;
  border-radius: 5.3333vw;

  color: #888888;
  line-height: 16vw;
  font-size: 5.3333vw;
  font-weight: 800;

  cursor: pointer;
}

/* 答题界面 */
#qText {
  padding: 8vw 5.3333vw;
  background-color: #fff;
  border-radius: 3.2vw;
  border: 0.5333vw solid #4b3f3f;
  box-shadow: 0 0.8vw rgba(0, 0, 0, 0.082);
  margin-bottom: 5.3333vw;

  font-size: 4.8vw;
  font-weight: 800;
  color: #4b3f3f;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 3.2vw;
}

.option-box {
  display: flex;
  gap: 2.6667vw;

  background-color: #fff;
  padding: 2.6667vw 5.3333vw;
  border-radius: 3.2vw;
  border: 0.5333vw solid #4b3f3f;
  box-shadow: 0 0.8vw rgba(0, 0, 0, 0.082);

  font-size: 4.2667vw;
  font-weight: bold;
  color: #4b3f3f;

  cursor: pointer; /* 必须加，让 iOS 识别它是可点击的 */
  -webkit-tap-highlight-color: transparent; /* 移除系统默认蓝框 */
  transition: all 0.3s ease; /* 缩短时间，让反馈更灵敏 */
}

.option-box:active {
  transform: scale(0.95) !important;
  background-color: #fffdf2;
}

.active {
  background-color: #fffdf2;
  border: 0.5333vw solid #d96c6c;
}

/* 进度条 */
#quiz-header {
  margin-bottom: 5.3333vw;
}

.progress-line {
  width: 100%;
  height: 3.4667vw;

  background: #ffffff;
  border-radius: 5.3333vw;
  border: 0.5333vw solid #4b3f3f;
}

.progress-inner {
  width: 0%;
  height: 100%;

  border-radius: 1.0667vw;
  transition: width 0.3s ease;
}

.rest-ques {
  padding: 0.5333vw 1.0667vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cur-question {
  font-style: italic;
  font-weight: 800;
  font-size: 5.3333vw;
  color: #f6a6d1;
}

.question-index {
  font-size: 3.7333vw;
  color: #a8a29f;
  font-weight: bold;
}

/* 返回按钮 */
.pre-box {
  display: flex;
  justify-content: flex-end;
}

.prev-btn {
  margin-top: 5.3333vw;

  font-size: 3.7333vw;
  font-weight: bold;
  color: #7d756e;
  text-align: right;

  transition: all 0.3s ease;
  cursor: pointer;
}

.prev-btn:hover {
  color: #4e4a46;
}

.prev-btn:active {
  transform: scale(0.9);
}

/* 结果页面 */
#result-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.result-page-box .title {
  width: 100%;
  text-align: center;
  font-size: 3.7333vw;
  color: #a57d72;
  font-weight: bold;
  padding: 10px;
  border-bottom: 1px solid #bdbdbd3a;
}

.result-page-box {
  width: 100%;
  max-width: 138.6667vw;
  padding: 5.3333vw 2.6667vw;
  background: #fff;
  border: 0.6vw solid #4b3f40;
  border-radius: 4.2667vw;
  box-shadow: 0 2.1333vw 6.4vw rgba(75, 63, 63, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4.2667vw;
  align-items: center;
}

.result-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.2vw;
}

.result-score-circle {
  width: 34.1333vw;
  height: 34.1333vw;
  border-radius: 50%;
  border: 1.6vw solid #fff1e6;
  background: linear-gradient(180deg, #fffaf2, #fff7f7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.0667vw 0;
  box-shadow: 0 1.6vw 4.8vw rgba(217, 108, 108, 0.08);
}

.score-label {
  font-size: 3.4667vw;
  color: #7d756e;
  font-weight: 800;
  letter-spacing: 0.1333vw;
}

.score-val {
  font-size: 9.0667vw;
  font-weight: 900;
  color: #222;
}

.tag-container {
  font-weight: 900;
  color: #d96c6c;
  font-size: 4vw;
  text-align: center;
  padding: 1.6vw 3.2vw;
  border-radius: 2.6667vw;
  background: #fff5f5;
}

.social-type {
  font-weight: 800;
  color: #4b3f40;
}

.result-desc {
  width: 90%;
  border: 0.6vw solid #4b3f40;
  border-radius: 2.6667vw;
  box-shadow: 0 0.8vw rgba(0, 0, 0, 0.082);
  font-size: 3.7333vw;
  color: #4b3f40;
  font-weight: bold;
  text-align: center;
  padding: 5.3333vw;
  background: #fffbf0;
  text-align: left;
}

.result-breakdown {
  width: 100%;
  margin-top: 1.6vw;
  display: flex;
  flex-direction: column;
  gap: 2.1333vw;
}

.dim-row {
  display: flex;
  align-items: center;
  gap: 3.2vw;
}

.dim-name {
  width: 25.6vw;
  font-weight: 700;
  color: #6c7280;
}

.dim-bar {
  flex: 1;
  height: 3.2vw;
  background: #f3f3f3;
  border-radius: 3px;
  overflow: hidden;
}

.dim-bar-inner {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.dim-desc {
  margin-left: 29.3333vw;
  color: #6b6b6b;
  font-size: 3.2vw;
  margin-bottom: 1.6vw;
}

.dim-score {
  width: 12.2667vw;
  text-align: right;
  font-weight: 800;
  color: #333;
}

.return-home-btn {
  margin-top: 3.2vw;
  padding: 2.6667vw 5.8667vw;
  background: #4b3f3f;
  color: #fff;
  border-radius: 2.1333vw;
  font-weight: 800;
  cursor: pointer;
  border: none;
  box-shadow: 0 3px rgba(0, 0, 0, 0.082);
}

.result-actions {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* 雷达图 */
.canvas-box {
  width: 85.3333vw;
  height: 85.3333vw;
  margin: 1.6vw auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-type div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.6667vw;
}

.renge1 {
  color: #6b7280;
}

.renge2 {
  color: #bf4df1;
  font-size: 30px;
}

.sax {
  border-radius: 2.6667vw;
  padding: 3.2vw;
  border: 0.2667vw solid #d6d6d6;
  box-shadow: 0 0 0.8vw rgba(0, 0, 0, 0.082);
  color: #65443c;
}
#radarCanvas {
  max-width: 100%;
  height: auto;
}
/* 公共属性 */
.hidden {
  display: none !important;
}

.flex {
  display: flex;
}
