/* --- START OF FILE shiyan.css --- */
.workspace
/* --- 全局重置 --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #050508;
  color: #e0e0e0;
  font-family: 'DengXian', 'SimHei', 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* 隐藏外层滚动条但保留功能 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: #2a2d33;
  border-radius: 3px;
}

::-webkit-scrollbar-track {
  background: #0b0d10;
}

.app-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}


/* header {
  height: 60px;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
} */

.header-left .back-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 14px;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.header-left .back-btn:hover {
  color: #ffffff;
}


/* --- 头部模块 --- */
.header-module {
  background-image: url('./实验室的拆分/实验室素材/左右上方的纹.png');
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 40px 20px 30px 20px;
  flex-shrink: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #1c2a3a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.main-title {
  font-size: 36px;
  font-weight: bold;
  background: linear-gradient(90deg, #5CA0F2 0%, #A38DF5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 3px;
  margin-bottom: 8px;
  display: inline-block;
}

.sub-title {
  font-size: 14px;
  color: #888;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.tagline {
  font-size: 13px;
  color: #666;
  font-style: italic;
  margin-top: 15px;
}

/* 流程图 */
.process-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  margin-bottom: -10px;
  flex-wrap: wrap;
  /* 允许小屏自动换行 */
}

.flow-step {
  min-width: 130px;
  padding: 10px 20px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #222;
  color: #666;
  font-size: 14px;
  transition: all 0.4s ease;
}

.step-num {
  font-family: 'Courier New', monospace;
  font-size: 15px;
}

.step-text {
  letter-spacing: 1px;
}

.flow-step.active,
.flow-step.completed {
  background: linear-gradient(135deg, rgba(17, 68, 75, 0.9) 0%, rgba(40, 30, 70, 0.9) 100%);
  border-color: #2f5e74;
  color: #fff;
  box-shadow: 0 0 15px rgba(35, 128, 142, 0.3);
}

.flow-step.active .step-num {
  color: #65d0ea;
  font-weight: bold;
}

.flow-line {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.2;
  transition: all 0.5s ease;
}

.flow-line img {
  width: 100%;
  height: auto;
  display: block;
}

.flow-line.active {
  opacity: 1;
  filter: drop-shadow(0 0 5px #4facfe) brightness(1.2);
}

/* --- 主工作区 Grid 响应式布局 --- */
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 280px 1fr 300px;
  grid-template-rows: minmax(500px, calc(100vh - 250px));
  gap: 20px;
  padding: 0 20px 48px 20px;
}

/* 面板通用样式 */
.panel {
  background-color: #0b0d10;
  border: 1px solid #1c2a3a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ph-left {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.ph-num {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 18px;
}

.ph-title {
  font-weight: bold;
  font-size: 16px;
  color: #fff;
  letter-spacing: 1px;
}

.ph-eng {
  font-size: 11px;
  font-weight: bold;
  color: #4a5568;
  letter-spacing: 1.5px;
}

.scroll-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* 内部小滚动条 */
.scroll-content::-webkit-scrollbar {
  width: 4px;
}

.scroll-content::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

/* 卡片通用 (载体与纹理) */
.card {
  background-color: #131519;
  border: 1px solid #2a2d33;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.card:hover {
  background-color: #1a1e24;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card.selected {
  background-color: #1a1e24;
}

/* 模块 01：选择载体 */
.panel-carrier .panel-header {
  background: linear-gradient(90deg, rgba(30, 60, 90, 0.6) 0%, rgba(10, 11, 16, 0) 80%);
}

.panel-carrier .ph-num {
  color: #65d0ea;
}

.panel-carrier .card.selected {
  border-color: #2f5e74;
  box-shadow: 0 0 15px rgba(79, 172, 254, 0.15);
}

.carrier-card {
  display: flex;
  align-items: center;
  gap: 15px;
}

.carrier-card .card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.carrier-card .card-icon img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.ci-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.ci-name {
  font-size: 15px;
  color: #e0e0e0;
}

.ci-code {
  font-size: 11px;
  color: #555;
  font-family: monospace;
}

.ci-sub {
  font-size: 12px;
  color: #777;
}

.panel-footer {
  background-color: #0f1115;
  border-top: 1px solid #1c2a3a;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #666;
}

.panel-carrier .highlight-num {
  color: #65d0ea;
  font-size: 14px;
  font-weight: bold;
}

/* 模块 02：纹理基因库 */
.panel-texture {
  border-color: #38312c;
}

.panel-texture .panel-header {
  background: linear-gradient(90deg, rgba(60, 50, 20, 0.6) 0%, rgba(10, 11, 16, 0) 80%);
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.panel-texture .ph-num {
  color: #ffd700;
}

.panel-texture .card.selected {
  border-color: #8d8243;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.filter-bar {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #1c1c1c;
}

.filter-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  color: #888;
  border-radius: 4px;
  padding: 6px 4px;
  font-size: 11px;
  font-family: monospace;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  transition: all 0.3s;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ddd;
}

.filter-btn.active {
  background: #444;
  color: #fff;
  border-color: #666;
}

.texture-card {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.tex-img-box {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #333;
  flex-shrink: 0;
}

.tex-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tex-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ti-title {
  font-size: 15px;
  color: #e0e0e0;
}

.ti-desc {
  font-size: 11px;
  color: #777;
  line-height: 1.4;
}

.ti-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0f1113;
  padding: 5px 8px;
  border-radius: 4px;
  width: fit-content;
}

.tag-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
}

.tag-box.cyan {
  background-color: #213442;
  color: #56b0c8;
}

.tag-box.gold {
  background-color: #38312c;
  color: #c6a144;
}

.tag-box.green {
  background-color: #223336;
  color: #327c60;
}

.tag-box.ink {
  background-color: #242936;
  color: #798386;
}

.tag-text {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  color: #666;
  font-family: monospace;
}

/* --- 3D视口区 --- */
.viewport-area {
  position: relative;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: url("./实验室的拆分/实验室素材/中间实验部分.png") no-repeat center center;
  background-size: cover;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
}

.viewport-label {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #4a86b8;
  font-size: 13px;
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.viewport-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #458b9f;
  box-shadow: 0 0 8px #458b9f;
}

.empty-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 20px;
  z-index: 10;
}

.empty-icon-box {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.empty-icon {
  width: 60px;
  height: 60px;
  opacity: 0.8;
}

.empty-text-cn {
  color: #b0b8c4;
  font-size: 18px;
  letter-spacing: 2px;
}

.empty-text-en {
  color: #707884;
  font-size: 12px;
  letter-spacing: 3px;
}

.empty-bottom-tip {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #9098a4;
  font-size: 12px;
  padding: 8px 25px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  z-index: 10;
}

#vp-model-display {
  width: 100%;
  height: 100%;
  position: absolute;
  /* 绝对定位充满容器 */
  top: 0;
  left: 0;
  z-index: 5;
}

.hidden {
  display: none !important;
}

/* --- 模块 03 & 04 右侧栏 --- */
.right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  /* 继承 grid 的高度 */
}

.panel-material {
  flex: 3;
}

.panel-export {
  flex: 2;
}

.panel-material .panel-header {
  background: linear-gradient(90deg, rgba(60, 30, 90, 0.6) 0%, rgba(10, 11, 16, 0) 80%);
}

.panel-material .ph-num {
  color: #a18cd1;
}

.material-locked {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #666;
  font-size: 14px;
  padding: 40px 0;
}

.lock-icon {
  width: 60px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.material-content,
.export-content {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.section-label {
  font-size: 11px;
  color: #666;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  font-weight: bold;
}

.presets-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.btn-preset {
  flex: 1;
  background: #131519;
  border: 1px solid #2a2d33;
  color: #888;
  padding: 8px 0;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.3s;
}

.btn-preset:hover {
  background: #1a1e24;
  color: #bbb;
}

.btn-preset.active {
  border-color: #a18cd1;
  color: #a18cd1;
  background: rgba(161, 140, 209, 0.1);
}

.slider-group {
  margin-bottom: 16px;
}

.sg-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 8px;
}

.sg-val {
  font-family: monospace;
  color: #fff;
  color: #a18cd1;
}

input[type=range] {
  width: 100%;
  height: 4px;
  background: #222;
  border-radius: 2px;
  appearance: none;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #a18cd1;
  cursor: pointer;
  box-shadow: 0 0 8px #a18cd1;
}

.mat-stats {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid #1c2a3a;
  padding-top: 15px;
}

.stat-box {
  text-align: center;
}

.sb-label {
  font-size: 10px;
  color: #555;
  margin-bottom: 4px;
  font-family: monospace;
}

.sb-val {
  font-size: 16px;
  font-weight: bold;
  color: #e0e0e0;
  font-family: monospace;
}

/* 模块 04 铭刻 */
.panel-export .panel-header {
  background: linear-gradient(90deg, rgba(20, 60, 43, 0.6) 0%, rgba(10, 11, 16, 0) 80%);
}

.panel-export .ph-num {
  color: #6ad09d;
}

.input-name {
  width: 100%;
  background: #0f1115;
  border: 1px solid #1c2a3a;
  padding: 12px;
  color: #fff;
  font-size: 14px;
  border-radius: 6px;
  margin-bottom: 20px;
  outline: none;
  transition: 0.3s;
}

.input-name:focus {
  border-color: #6ad09d;
  box-shadow: 0 0 10px rgba(106, 208, 157, 0.2);
}

.seal-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-seal {
  padding: 6px 14px;
  background: #131519;
  border: 1px solid #2a2d33;
  color: #888;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.3s;
}

.btn-seal.active {
  border-color: #d63031;
  color: #d63031;
  background: rgba(214, 48, 49, 0.1);
}

.seal-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  height: 80px;
}

.seal-stamp {
  width: 50px;
  height: 50px;
  border: 3px solid #d63031;
  color: #d63031;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-family: 'SimSun', serif;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(214, 48, 49, 0.3);
  border-radius: 4px;
}

.btn-export {
  width: 100%;
  background: linear-gradient(90deg, #1d4332 0%, #152d24 100%);
  color: #6ad09d;
  border: 1px solid #255a42;
  padding: 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  margin-top: auto;
  letter-spacing: 2px;
}

.btn-export:hover {
  background: linear-gradient(90deg, #255a42 0%, #1d4332 100%);
  color: #fff;
  box-shadow: 0 0 15px rgba(106, 208, 157, 0.4);
}

.empty-center {
  position: relative;
  top: 110%;
}
.tag-box.custom {
  background-color: #2f2638;
  color: #d4b5ff;
}

.texture-upload-card {
  border-style: dashed;
}

.texture-upload-card:hover .tex-upload-box {
  border-color: #a18cd1;
  box-shadow: 0 0 12px rgba(161, 140, 209, 0.18);
}

.tex-upload-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(161, 140, 209, 0.12), rgba(79, 172, 254, 0.08));
  border: 1px dashed #555;
}

.upload-plus {
  font-size: 28px;
  color: #cbb6f7;
  font-weight: 300;
  line-height: 1;
}
/* =========================================
   响应式断点设置 (Media Queries)
   ========================================= */

/* 大笔记本屏幕 */
@media (max-width: 1400px) {
  .workspace {
    grid-template-columns: 240px 250px 1fr 260px;
    gap: 15px;
  }

  .panel-header {
    padding: 12px 15px;
  }
}

/* 平板屏幕 (竖屏排版) */
@media (max-width: 1024px) {
  .workspace {
    grid-template-columns: 1fr 1fr;
    /* 分左右两列 */
    grid-template-rows: auto 450px auto;
    /* 3D视图在上面 */
  }

  .viewport-area {
    grid-column: 1 / -1;
    /* 占据整行 */
    grid-row: 1;
    min-height: 500px;
  }

  .panel-carrier {
    grid-column: 1;
    grid-row: 2;
  }

  .panel-texture {
    grid-column: 2;
    grid-row: 2;
  }

  .right-column {
    grid-column: 1 / -1;
    grid-row: 3;
    flex-direction: row;
    /* 底部设置横排组合 */
  }

  .panel-material,
  .panel-export {
    flex: 1;
    min-height: 350px;
  }
}

/* 手机屏幕 (流式排布) */
@media (max-width: 768px) {
  .workspace {
    display: flex;
    flex-direction: column;
    /* 全部单列向下排 */
  }

  .viewport-area {
    min-height: 380px;
    order: -1;
    margin-bottom: 20px;
  }

  /* 把视口顶上去 */
  .right-column {
    flex-direction: column;
  }

  .panel-carrier,
  .panel-texture,
  .panel-material,
  .panel-export {
    max-height: 500px;
  }

  .process-flow {
    gap: 10px;
  }

  .flow-step {
    min-width: auto;
    padding: 8px 12px;
    font-size: 12px;
  }

  .flow-line {
    width: 25px;
  }
}