/* ===========================
   1. 全局元素基础
   =========================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  outline: none;
}

:focus {
  outline: none !important;
}

/* ===========================
   2. HTML & Body
   =========================== */
@font-face {
  font-family: "SourceHanSansCN-Light";
  src: url(../assets/fonts/SourceHanSansCN-Light.woff2) format("woff2");
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "SourceHanSansCN-Regular";
  src: url(../assets/fonts/SourceHanSansCN-Regular.woff2) format("woff2");
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "SourceHanSansCN-Medium";
  src: url(../assets/fonts/SourceHanSansCN-Medium.woff2) format("woff2");
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "SourceHanSansCN-Bold";
  src: url(../assets/fonts/SourceHanSansCN-Bold.woff2) format("woff2");
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "SourceHanSansCN-Heavy";
  src: url(../assets/fonts/SourceHanSansCN-Heavy.woff2) format("woff2");
  font-style: normal;
  font-weight: normal;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  /* 禁止 iOS 自动调整字体 */
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  /* 响应式基准大小：桌面端1rem=100px，移动端1rem=50px */
  font-size: clamp(calc(100vw / 38.4), calc(100vw / 19.2), calc(100vw / 19.2));
}

/* 移动端基准大小调整 */
@media (max-width: 980px) {
  html {
    font-size: clamp(60px, 15vw, 100px);
  }

  .content-w {
    width: 100% !important;
    padding: 0 5% !important;
  }

  .text-\[0\.14rem\] {
    font-size: 0.20rem !important;
  }

  .text-\[0\.15rem\] {
    font-size: 0.22rem !important;
  }

  .text-\[0\.16rem\] {
    font-size: 0.24rem !important;
  }

  .text-\[0\.18rem\] {
    font-size: 0.26rem !important;
  }

  .text-\[0\.2rem\] {
    font-size: 0.26rem !important;
  }

  .text-\[0\.6rem\] {
    font-size: 0.42rem !important;
  }

  .text-\[0\.78rem\] {
    font-size: 0.58rem !important;
  }
}

body {
  font-size: clamp(14px, 2vw, 80px);
  font-family: "SourceHanSansCN-Bold", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #fff;
  color: #222222;
  min-height: 100vh;
  overflow-x: hidden;
}

.Bold {
  font-family: "SourceHanSansCN-Bold", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.Medium {
  font-family: "SourceHanSansCN-Medium", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.Heavy {
  font-family: "SourceHanSansCN-Heavy", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.Regular {
  font-family: "SourceHanSansCN-Regular", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.Light {
  font-family: "SourceHanSansCN-Light", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===========================
   3. 链接 & 图片
   =========================== */
a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===========================
   4. 列表
   =========================== */
ul,
ol {
  list-style: none;
}

/* ===========================
   5. 表格
   =========================== */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ===========================
   6. 表单元素
   =========================== */
input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

button {
  cursor: pointer;
  background-color: transparent;
  border: none;
  padding: 0;
}

/* ===========================
   7. 块元素
   =========================== */
main,
header,
footer,
section,
article,
aside,
nav {
  display: block;
}

/* ===========================
   8. 滚动条
   =========================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ===========================
   9. 强制继承 line-height
   =========================== */
p,
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
pre {
  margin: 0;
  line-height: inherit;
}

/* ===========================
   10. 媒体元素
   =========================== */
iframe,
embed,
object {
  max-width: 100%;
}

/* ===========================
   11. 交互辅助
   =========================== */
:focus {
  outline: 2px solid #3b82f6;
  /* Tailwind 默认蓝色 focus */
  outline-offset: 2px;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

input[type="file"] {
  display: inline-block;
  line-height: 0.54rem;
  text-align: left;
  /* 文字居中 */
  /* 微调，避免按钮把文字挤到左边 */
}

/* 内容容器 */
.content-w {
  width: 13.28rem;
  margin: 0 auto;
}

/* 按钮 */
.red-button {
  display: flex;
  align-items: center;
  padding: 0.09rem 0.28rem;
  background: #ce202f;
  border-radius: 50px;
  cursor: pointer;
  color: #fff;
  font-size: 0.18rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.white-button {
  background: white;
  color: #222222;
}

.red-button svg {
  margin-left: 0.07rem;
  width: 0.19rem;
}

.loading-button svg {
  transform: rotate(90deg);
}

.red-button::after,
.header .pre::after {
  background: linear-gradient(110deg, #ce202f 26.94%, #091f40 112.28%);
  bottom: 0;
  content: "";
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  transform: translate(20%);
  transition: all 0.25s ease;
  z-index: -1;
  opacity: 0;
}

.white-button:hover {
  color: #fff;
}

.red-button:hover::after,
.header .pre:hover::after {
  opacity: 1;
  transform: none;
}

/* 标签 2 */
.tag2 {
  color: #fff;
  font-size: 0.16rem;
}

.tag2 span {
  display: inline-block;
  background: rgba(206, 32, 47, 0.56);
  padding: 0.02rem 0.15rem;
}

/* 登录框 */
.form-container {
  padding: 0.6rem 0;
  margin: 0.6rem 0;
  position: relative;
  z-index: 1;
}

.form-container::after {
  content: "";
  width: 155vw;
  height: 100%;
  background: #333;
  position: absolute;
  top: 0.2rem;
  left: -85vw;
  z-index: -1;
  transform: rotateZ(-2deg);
}

.form-container .flex {
  width: 100%;
  margin-bottom: 0.3rem;
  justify-content: center;
  gap: 0.4rem;
}

.form-container .form-item {
  width: 6.2rem;
}

.form-container .form-item .label {
  color: #fff;
  font-size: 0.2rem;
  margin-bottom: 0.18rem;
  display: inline-block;
}

.form-container .form-item .label span {
  color: #ce202f;
}

.form-container .form-item .value {
  position: relative;
  height: 0.54rem;
  background: #707070;
  border-radius: 2px;
  display: flex;
  align-items: center;
  padding: 0 0.24rem;
}

.form-container .form-item .value input,
.form-container .form-item .value select {
  appearance: none;
  /* 去掉系统默认样式 */
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  height: 100%;
  color: #fff;
  background: #707070;
  pointer-events: auto;
  font-size: 0.18rem;
}

.form-container .form-item .value select {
  padding-right: 0.5rem;
}

.form-container .form-item .value input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-container .form-item .value.select::after {
  content: "";
  position: absolute;
  right: 0.2rem;
  width: 0;
  height: 0;
  border-left: 0.08rem solid transparent;
  border-right: 0.08rem solid transparent;
  border-top: 0.08rem solid #fff;
  pointer-events: none;
}

.form-container .form-item .yzm {
  display: flex;
  flex-direction: row;
  width: 100%;
  align-items: center;
}

.form-container .form-item #resendBtn {
  font-size: 0.2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  color: #fff;
  padding: 0.1rem;
  flex-shrink: 0;
}

.form-button {
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  height: 0.5rem;
}

.form-button .red-button {
  margin: 0 auto;
}

.crumbs {
  display: flex;
  align-items: center;
  font-size: 0.18rem;
  padding: 0.6rem 0;
  font-family: "SourceHanSansCN-Regular";
}

.crumbs a {
  padding-right: 0.3rem;
  display: flex;
  align-items: center;
  position: relative;
  margin-right: 0.3rem;
  color: #444;
  transition: all 0.3s;
}

.crumbs a:hover {
  color: #ce202f;
}

.crumbs a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  background: url(../assets/img/crumbs-icon2.png) no-repeat;
  background-size: cover;
  width: 0.08rem;
  height: 0.14rem;
  transform: translateY(-50%);
}

.crumbs a:last-child::after {
  display: none;
}

.crumbs span {
  width: 0.2rem;
  height: 0.2rem;
  background: url(../assets/img/crumbs-icon1.png) no-repeat;
  background-size: cover;
  margin-right: 0.1rem;
}

.crumbs .back {
  position: relative;
  padding-left: 0.3rem;
}

.crumbs .back::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  background: url(../assets/img/crumbs-icon2.png) no-repeat;
  background-size: cover;
  width: 0.08rem;
  height: 0.14rem;
  transform: translateY(-50%) rotate(180deg);
}


/* 移动端汉堡菜单按钮 */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 0.3rem;
  height: 0.25rem;
  cursor: pointer;
  z-index: 1000;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 0.03rem;
  background-color: #222;
  transition: all 0.3s ease;
  transform-origin: center;
  /* ⭐ 旋转基点设置为中心 */
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(0.04rem, 0.04rem);
  position: relative;
  top: 0.02rem;
  /* 根据需要微调 */
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.04rem, -0.04rem);
  position: relative;
  top: -0.09rem;
  /* 根据需要微调 */
}

/* 移动端导航菜单 */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 80%;
  height: 100%;
  background-color: #fff;
  padding: 1.5rem 0.5rem 0.5rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-nav.active .mobile-nav-content {
  transform: translateX(0);
}

.mobile-nav-item {
  border-bottom: 1px solid #eee;
}

.mobile-nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.24rem;
  color: #222;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: #ce202f;
}

.mobile-arrow {
  font-size: 0.24rem;
  transition: transform 0.3s ease;
}

.mobile-nav-item.active .mobile-arrow {
  transform: rotate(90deg);
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-nav-item.active .mobile-submenu {
  max-height: 5rem;
}

.mobile-submenu a {
  display: block;
  padding: 0.2rem 0.3rem;
  font-size: 0.2rem;
  color: #666;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.3s ease;
}

.mobile-submenu a:hover {
  color: #ce202f;
  border-left-color: #ce202f;
  background-color: #f8f8f8;
}

@media (max-width: 980px) {
  .mobile-menu-btn {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }
}

/* 隐藏原生复选框 */
input[type="checkbox"] {
  display: none;
}

/* 自定义复选框容器 */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

/* 自定义复选框样式 */
.checkbox-wrapper .custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  transition: all 0.2s ease;
  background-color: #D9D9D9;
}

/* 勾选状态 */
.checkbox-wrapper input[type="checkbox"]:checked+.custom-checkbox {
  background-color: #1B1B1B;
  border-color: #1B1B1B;
}

/* 勾选的对勾 */
.checkbox-wrapper .custom-checkbox::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: all 0.2s ease;
}

/* 勾选后显示对勾 */
.checkbox-wrapper input[type="checkbox"]:checked+.custom-checkbox::after {
  opacity: 1;
}

/* 鼠标悬浮效果 */
.checkbox-wrapper:hover .custom-checkbox {
  border-color: #888;
}

.slider-container {
  width: 2.4rem;
  position: relative;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

/* 滑轨背景 */
.slider-line {
  position: relative;
  height: 0.06rem;
  margin-top: 0.06rem;
}

.slider-track {
  position: absolute;
  height: 0.06rem;
  background: #ddd;
  width: 100%;
  border-radius: 3px;
  top: 50%;
  transform: translateY(-50%);
}

/* 选中范围进度条 */
.slider-range {
  position: absolute;
  height: 0.06rem;
  background: #1B1B1B;
  border-radius: 3px;
  top: 50%;
  transform: translateY(-50%);
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  position: absolute;
  pointer-events: none;
  /* 防止滑轨遮挡滑块 */
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.18rem;
  height: 0.18rem;
  border-radius: 50%;
  background: #1B1B1B;
  cursor: pointer;
  pointer-events: all;
  /* 滑块可拖动 */
  border: 2px solid #fff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  transition: background 0.3s;
}

input[type=range]::-moz-range-thumb {
  width: 0.18rem;
  height: 0.18rem;
  border-radius: 50%;
  background: #4CAF50;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.value-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.2rem;
  font-family: 'SourceHanSansCN-Regular';
}


/* 去掉 Chrome/Edge 自动填充时的浅蓝色背景 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #707070 inset !important; /* 用你想要的背景色覆盖 */
  box-shadow: 0 0 0 1000px #707070 inset !important;
  -webkit-text-fill-color: #fff !important;  /* 输入文字颜色 */
  transition: background-color 5000s ease-in-out 0s; /* 防止闪烁 */
}