﻿/* ==== CSS 样式 ==== */
/* 移除了颜色变量，直接使用RGB值 */

body {
  margin: 0px;
  overflow: hidden;
}

noscript {
  display: block;
  text-align: center;
  padding-top: 100px;
  font-size: 20px;
}

.v3d-container {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
}

.fullscreen-button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  background-size: 100% 100%;
  display: none;
  z-index: 1;
}

.fullscreen-open {
  background-image: url("media/fullscreen_open.svg");
}

.fullscreen-close {
  background-image: url("media/fullscreen_close.svg");
}

/* Configurator UI */
#configurator-ui {
  position: absolute;
  bottom: 0px; /* 电脑端默认值 */
  left: 0;
  width: 100%;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none; /* 默认隐藏，在3D加载完成后显示 */
}

/* 手机端样式（屏幕宽度小于768px） */
@media (max-width: 768px) {
  #configurator-ui {
    bottom: 0;
  }
}

/* Tab Navigation */
.config-tabs {
  display: flex;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.85);
  padding: 20px 0px 10px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.config-tab {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-transform: uppercase;
  font-weight: bold;
  padding: 10px 20px;
  margin: 0 5px;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.5px;
  border-radius: 2px;
  background: rgba(82, 82, 82, 0.32);
  transform: skew(-20deg);
  -webkit-transform: skew(20deg);
}

.config-tab span {
  display: block;
  transform: skew(-20deg);
  -webkit-transform: skew(-20deg);
}

.config-tab:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.08);
}

.config-tab.active {
  color: #000;
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Tab Content */
.config-sections {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.95) 100%
  );
  padding: 20px 0 40px;
}

.config-section {
  display: none;
}

.config-section.active {
  display: block;
}

/* Config Items */
.config-items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.config-item {
  width: 85px;
  height: 65px;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.5) 50%
  );
}

.config-item:hover,
.config-item.active {
  transform: none;
  box-shadow: none;
}

.config-item.active {
  border: 1px solid white;
}

.config-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  pointer-events: none;
}

.config-label {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 14px;
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}

/* 交互功能区域的标签样式 */
#interaction .config-label {
  display: block;
}

/* 脉冲动画 - 优化版 */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* 为按钮添加过渡效果 - 仅使用高效属性 */
.config-item {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  will-change: transform, box-shadow;
  /* 启用GPU加速 */
  transform: translateZ(0);
}

/* hover特效 - 简化动画 */
.config-item:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* 激活状态的脉冲效果 - 优化动画时间 */
.config-item.active {
  animation: pulse 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .config-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 12px 0;
  }

  .config-tab {
    font-size: 14px;
    padding: 6px 12px;
    flex-shrink: 0;
  }

  /* 为移动端第一个选项卡添加左边距，确保完全显示 */
  .config-tabs .config-tab:first-child {
    margin-left: 0px;
  }

  .config-items {
    gap: 10px;
  }

  .config-item {
    width: 55px;
    height: 40px;
    border: 1px solid transparent;
  }

  .config-item.active {
    border: 1px solid white;
  }

  .config-label {
    font-size: 9px;
    padding: 4px;
  }

  /* 移动端交互功能区域的标签样式 */
  #interaction .config-label {
    display: block;
    font-size: 9px;
    padding: 4px;
  }
}

/* ==== 颜色配置样式 ==== */
/* 颜色切换 */
#body-color-yellow {
  background-color: rgb(255, 215, 0);
}
#body-color-pink {
  background-color: rgb(255, 105, 180);
}
#body-color-skyblue {
  background-color: rgb(0, 120, 255);
}
#body-color-green {
  background-color: rgb(50, 205, 50);
}
#body-color-red {
  background-color: rgb(255, 0, 0);
}
#body-color-black {
  background-color: rgb(0, 0, 0);
}
#body-color-purple {
  background-color: rgb(128, 0, 128);
}
#body-color-orange {
  background-color: rgb(200, 65, 0);
}

/* 交互功能 */
#SI-size,
#SI-track,
#SI-animate,
#SI-logo {
  background-color: rgb(75, 67, 67);
}

/* removes tap blinking on ios devices */
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Color Swatch Element */
.color-swatch-container {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  background-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  z-index: 100;
}

.color-swatch {
  width: 140px;
  height: 140px;
  background-color: #fce300;
  /* border-radius: 4px; */
  /* border: 2px solid rgba(255, 255, 255, 0.8); */
  /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); */
  transition: all 0.3s ease;
}

.color-name {
  margin-top: 10px;
  font-size: 14px;
  /* font-weight: bold; */
  padding-left: 5px;
  color: #6f6d6b;
  text-align: left;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.color-value {
  margin: 3px 0;
  font-size: 14px;
  padding-left: 5px;
  color: #6f6d6b;
  text-align: left;
  transition: color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .color-swatch-container {
    top: 0;
    left: 3px;
    /* padding: 8px; */
    align-items: flex-start;
  }

  .color-swatch {
    width: 80px;
    height: 80px;
  }

  .color-name {
    font-size: 14px;
  }

  .color-value {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .color-swatch-container {
    top: 0;
    left: 0;
    /* padding: 6px; */
    align-items: flex-start;
  }

  .color-swatch {
    width: 80px;
    height: 80px;
  }

  .color-name {
    font-size: 12px;
  }

  .color-value {
    font-size: 12px;
  }
}

.v3d-simple-preloader-logo {
  background-image: url("media/logo001.png");
}

.v3d-simple-preloader-bar {
  background: linear-gradient(90deg, #d8fcfd, #013392);
  height: 3px;
  border-color: #013392;
}

.v3d-simple-preloader-container {
  --v3d-preloader-img-width: 150px;
  --v3d-preloader-img-height: 150px;
}
