/* layout.css - 页面布局：桌面三栏式（左 3D 60% + 右教学面板 40% + 底部操作栏），移动端降级 */

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 640px; /* 过矮窗口时页面可滚动而非裁剪 */
}

/* ---------- 顶栏 ---------- */
#top-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: #151b29;
  color: #e8ecf5;
  border-bottom: 1px solid #2a3450;
  min-height: 54px;
}

#top-bar .title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

#top-bar .progress-text {
  font-size: 14px;
  color: #aeb9d6;
  white-space: nowrap;
}

/* ---------- 主体两栏 ---------- */
#main {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

/* 左侧 3D 区域（60%） */
#viewport-wrap {
  flex: 0 0 60%;
  position: relative;
  min-width: 0;
  background: radial-gradient(ellipse at center, #232c42 0%, #151a28 100%);
}

#viewport {
  position: absolute;
  inset: 0;
  min-height: 500px; /* PRD：桌面端 3D 最小 500x500 */
}

#viewport-wrap .hint-overlay {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(215, 224, 244, 0.55);
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- 左下角平面确认条 ---------- */
#minimap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(15, 20, 33, 0.82);
  border: 1px solid rgba(72, 86, 128, 0.6);
  border-radius: 10px;
  backdrop-filter: blur(4px);
  max-width: calc(100% - 24px);
  overflow-x: auto;
}

/* 右侧教学面板（40%） */
#panel {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  background: #f5f7fb;
  border-left: 1px solid #dfe4ef;
  overflow: hidden;
}

/* ---------- 底部操作栏 ---------- */
#bottom-bar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  background: #151b29;
  border-top: 1px solid #2a3450;
  min-height: 78px;
}

/* ---------- 移动端降级（<=768px） ---------- */
@media (max-width: 768px) {
  #viewport {
    min-height: 0;
  }

  #main {
    flex-direction: column;
  }

  #viewport-wrap {
    flex: 1 1 55%;
  }

  /* 教学面板折叠为底部抽屉 */
  #panel {
    flex: 0 0 45%;
    min-width: 0;
    border-left: none;
    border-top: 1px solid #dfe4ef;
  }

  #top-bar .title {
    font-size: 15px;
  }
}
