/* ===== 页面样式 ===== */

/* ----- 首页 index ----- */
.index-container {
  width: 100%;
  min-height: 100vh;
}
/* 顶部导航栏：与小程序一致，透明浮层覆盖在轮播图之上，Logo 居中 */
.index-top-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--nav-height) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 1rem;
  padding-right: 1rem;
  background-color: transparent;
  z-index: 10;
}
.index-top-logo {
  height: var(--nav-height);
  object-fit: contain;
}

/* 推广区 middle —— 与小程序 middle 组件绝对定位分层布局保持一致
   （设计基准 750rpx；容器宽度对应 670rpx，各偏移换算为百分比，
   字号使用容器查询单位 cqw 随卡片等比缩放） */
.index-middle-container {
  position: relative;
  container-type: inline-size;
  margin: -7rem 5.33%;
  aspect-ratio: 670 / 300;
  z-index: 3;
}
/* 底层纯色卡片（solid-bg：670×200rpx，占容器高 66.67%） */
.index-middle-solid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 66.67%;
  border-radius: 0.8rem;
  background-color: #35b4ae;
  z-index: 1;
}
/* 装饰背景图，向下偏移 40rpx（13.33%），叠加在纯色卡片之上 */
.index-middle-bg {
  position: absolute;
  top: 13.33%;
  left: 0;
  width: 100%;
  height: 66.67%;
  border-radius: 0.8rem;
  object-fit: contain;
  z-index: 2;
}
/* 文案区（左 250rpx=37.31%，上 100rpx=33.33%，宽 300rpx=44.78%） */
.index-middle-text-container {
  position: absolute;
  top: 33.33%;
  left: 32%;
  width: 65%;
  z-index: 3;
}
.index-middle-text-container.ch {
  left: 37%;
}
.index-middle-title {
  font-size: 3.5cqw;
  letter-spacing: 0.1em;
  font-weight: bold;
  color: var(--color-text);
}
.index-middle-title.ch {
  font-size: 6cqw;
  letter-spacing: 0.3em;
}
.index-middle-slogan {
  margin-top: 1.5cqw;
  font-size: 2.5cqw;
  letter-spacing: 0.1em;
  color: rgb(143, 137, 137);
}
.index-middle-slogan.ch {
  letter-spacing: 0.2em;
}
/* 机器人形象，溢出容器左上角（左 -50rpx=-7.46%，上 -50rpx=-16.67%，300×300rpx） */
.index-middle-robox {
  position: absolute;
  top: -16.67%;
  left: -7.46%;
  width: 44.78%;
  height: 100%;
  object-fit: contain;
  z-index: 4;
}

/* 推荐系列 */
.recommand-series-container {
  padding: 5rem 1rem 0 1rem;
}
.recommand-model-container {
  padding: 0 1rem;
}
.recommand-series-title-container,
.recommand-model-title-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: bold;
  margin-bottom: 1rem;
}
.recommand-series-title-left,
.recommand-model-title-left {
  display: flex;
  align-items: center;
}
.recommand-series-flex {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.recommand-series-list {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}
.recommand-series-list img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 造型列表 model-list */
.model-list-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.model-list {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.15s;
}
.model-list:active { transform: scale(0.98); }
.model-list-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.model-list-info-container {
  padding: 0.5rem 0.7rem;
}
.model-list-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-list-info {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* ----- 系列页 series ----- */
.series-container {
  width: 100%;
  padding: 1rem;
}
.series-flex {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.series-list {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.series-list-info-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem 0 1rem;
}
.series-list-title {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
}
.series-list-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

/* ----- 详情页 detail ----- */
.detail-container {
  width: 100%;
  padding: 1rem;
}
.detail-cover {
  width: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-bottom: 0.8rem;
}
.detail-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 1.05rem;
  font-weight: bold;
}
.detail-list-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.detail-list {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.15s;
}
.detail-list:active { transform: scale(0.98); }
.detail-list-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.detail-list-info-container {
  padding: 0.5rem 0.7rem;
}
.detail-list-title {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----- 反馈页 comment ----- */
.comment-container {
  width: 100%;
  padding: 1.2rem;
}
.comment-section {
  margin-bottom: 1.5rem;
}
.comment-label {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.comment-required { color: #ee0a24; margin-right: 0.2rem; }
.comment-rate-wrapper { padding: 0.5rem 0; }
.comment-footer {
  margin-top: 2rem;
}

/* ----- 3D 拼搭页 surface ----- */
.surface-container {
  position: fixed;
  left: 0;
  top: calc(var(--nav-height) + var(--safe-top));
  width: 100vw;
  height: 100vh;
  background-color: rgb(243, 243, 243);
  overflow: hidden;
}
.surface-load-mask {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.surface-mask {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 998;
}
.surface-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 60%;
  background-color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.surface-popup canvas {
  width: 100%;
  flex: 1 1 80%;
  display: block;
}
.surface-description {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: rgba(196, 193, 193, 0.733);
  padding: 0.6rem 1rem;
  height: 20%;
}
.surface-description-row { width: 100%; }
.surface-description-title {
  font-weight: bolder;
  display: inline-block;
}
.surface-main-container {
  width: 100vw;
  height: 100vh;
  background-color: rgb(243, 243, 243);
  overflow: hidden;
  position: relative;
}
#mainGl {
  width: 100%;
  display: block;
}
.surface-footer {
  width: 100%;
  display: grid;
  grid-template-rows: auto auto;
  padding: 0.5rem 0 1rem;
}
.surface-slider-container {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 1.2rem;
  margin-top: 0.8rem;
}
.surface-slider { flex: 1; }
.surface-slider-text {
  font-size: 0.95rem;
  margin-left: 0.8rem;
  white-space: nowrap;
}
.surface-btn-container {
  display: flex;
  width: 100%;
  justify-content: space-evenly;
  align-items: center;
  padding-top: 0.6rem;
}
.surface-btn-back {
  width: 10rem;
  height: 2.6rem;
  font-size: 0.9rem;
  white-space: nowrap;
}
.surface-btn-next {
  width: 12rem;
  height: 2.6rem;
  font-size: 0.9rem;
  white-space: nowrap;
}
.surface-preview-footer {
  padding: 1rem 8% 6rem;
}
.surface-preview-part-icon {
  display: block;
  margin: 0 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
}
.surface-preview-title {
  display: flex;
  height: 1.6rem;
  align-items: center;
  font-size: 1.05rem;
  font-weight: bold;
}
.surface-preview-box {
  display: inline-block;
  margin-right: 0.5rem;
  width: 0.3rem;
  height: 1.1rem;
  background-color: var(--color-primary);
  border-radius: 0 0.3rem 0.3rem 0;
}
.surface-qr { margin-left: 0.5rem; cursor: pointer; }
.surface-preview-description {
  padding: 0.8rem 0;
  font-size: 0.95rem;
  color: var(--color-text-light);
}
.surface-preview-part-total,
.surface-preview-difficulty {
  display: inline;
  font-size: 0.95rem;
  font-weight: bold;
}
.surface-preview-difficulty { margin-left: 3rem; }
.surface-preview-step-total {
  margin-top: 0.8rem;
  padding-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: bold;
  border-bottom: 1px solid var(--color-border);
}
.surface-btn-start {
  position: fixed;
  left: 50%;
  bottom: 6%;
  transform: translate(-50%, 0);
  width: 65%;
  height: 3rem;
}
/* 左下角 / 右下角悬浮元素：静态位置在 build-view 顶部（主画布 70vh 之下、
   footer/滑动条之上），通过负 margin-top 上移到滑动条上方，
   与小程序 surface.scss 中各图标的负 margin-top 布局保持一致。 */
.surface-strip-icon {
  position: absolute;
  z-index: 996;
  display: block;
  object-fit: contain;
  left: 0;
  margin-top: -5.9rem;
  width: 1.2rem;
  height: 4.5rem;
}
.surface-stage,
.surface-complete {
  position: absolute;
  z-index: 996;
  display: block;
  object-fit: contain;
  left: 1.2rem;
  border-radius: 1.5rem;
  box-shadow: 0px 0px 26px 6px var(--color-shadow);
  background-color: rgb(243, 243, 243);
  width: 3rem;
  height: 3rem;
  cursor: pointer;
}
.surface-stage { margin-top: -6.9rem; }
.surface-complete { margin-top: -2.7rem; }
.surface-part-icon {
  position: absolute;
  z-index: 996;
  display: block;
  right: 1rem;
  margin-top: -1.8rem;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
}
.surface-reset-icon {
  position: absolute;
  z-index: 996;
  display: block;
  left: 50%;
  transform: translate(-50%, 0);
  margin-top: -1.8rem;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
}
.surface-focus-icon,
.surface-focus-icon-active {
  position: absolute;
  z-index: 996;
  display: block;
  right: 3.5rem;
  margin-top: -1.8rem;
  border-radius: 5rem;
	border: 1px solid rgba(192, 191, 191, 0.767);
  padding: 6px;
  width: calc(2.2rem - 2px);
  height: calc(2.2rem - 2px);
  cursor: pointer;
  background-color: transparent;
}
.surface-focus-icon-active { background-color: var(--color-primary); }
.surface-tips-icon {
  position: absolute;
  z-index: 996;
  right: 1rem;
  margin-top: -4.5rem;
  font-weight: bold;
  color: red;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  letter-spacing: 0.15rem;
  cursor: pointer;
}
.surface-tips-icon img {
  width: 2.2rem;
  height: 2.2rem;
  animation: blink-animation 1s infinite;
}
@keyframes blink-animation {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 零件表 part-list */
.part-list-container {
  position: fixed;
  top: calc(var(--nav-height) + var(--safe-top));
  left: 0;
  width: 100%;
  z-index: 998;
  height: calc(100vh - var(--nav-height) - var(--safe-top));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.part-list-flex {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 90%;
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem;
  background: #fff;
  border-radius: var(--radius-lg);
}
.part-list-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 0.8rem;
  background-color: rgb(196, 196, 196);
  box-shadow: 2px 2px 8px 4px var(--color-shadow);
  cursor: pointer;
}
.part-list-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-top-left-radius: 0.8rem;
  border-top-right-radius: 0.8rem;
  background-color: rgb(243, 243, 243);
}
.part-list-text-container { text-align: center; }
.part-list-text { font-size: 0.8rem; }
.part-list-bottom {
  margin-top: 1rem;
  color: #999;
  font-size: 1.6rem;
  cursor: pointer;
}

/* 步骤配件横向列表 step-part-list */
.step-part-list-container {
  position: absolute;
  top: 1rem;
  left: 0;
  width: 100%;
  z-index: 5;
}
.step-part-list-scroll-x {
  display: flex;
  overflow-x: auto;
  padding: 0 1rem;
  gap: 0.6rem;
  -webkit-overflow-scrolling: touch;
}
.step-part-list-content {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 4.2rem;
  overflow: hidden;
  cursor: pointer;
}
.step-part-list-img {
  width: 4.2rem;
  height: 4.2rem;
  object-fit: contain;
  background-color: rgb(243, 243, 243);
  border: 1px solid rgba(192, 191, 191, 0.767);
  border-radius: 0.8rem;
}
.step-part-list-text-container { text-align: center; }
.step-part-list-text { 
  font-size: 0.7rem; 
  width: 4.2rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ===== 响应式：PC 端 3D 页与列表页优化 ===== */
@media (min-width: 768px) {
  .series-flex,
  .recommand-series-flex {
    grid-template-columns: repeat(2, 1fr);
  }
  .model-list-container,
  .detail-list-container {
    grid-template-columns: repeat(3, 1fr);
  }
  .part-list-flex {
    grid-template-columns: repeat(4, 1fr);
  }
  .surface-popup {
    width: 50%;
    max-width: 600px;
  }
}
@media (min-width: 1024px) {
  .series-flex,
  .recommand-series-flex {
    grid-template-columns: repeat(2, 1fr);
  }
  .model-list-container,
  .detail-list-container {
    grid-template-columns: repeat(4, 1fr);
  }
  .part-list-flex {
    grid-template-columns: repeat(5, 1fr);
  }
}
