* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #0d1117; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #e6edf3;
}
#app { position: fixed; inset: 0; }
#app canvas { display: block; }

.ui { position: fixed; z-index: 10; pointer-events: none; }
.ui > * { pointer-events: auto; }

/* 顶部:标题 + 面包屑 */
#top {
  top: 0; left: 0; right: 0;
  padding: 18px 24px;
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(to bottom, rgba(13,17,23,.85), rgba(13,17,23,0));
}
#title {
  font-size: 14px; letter-spacing: 2px;
  color: #7d8590; text-transform: uppercase;
}
#breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 18px; }
.crumb { color: #4cc2ff; cursor: pointer; transition: color .15s; }
.crumb:hover { color: #ffe066; }
.crumb.active { color: #e6edf3; cursor: default; font-weight: 600; }
.sep { color: #484f58; }

/* 底部:信息面板 */
#panel {
  left: 24px; right: 24px; bottom: 0;
  padding: 20px 24px 22px;
  background: linear-gradient(to top, rgba(13,17,23,.9), rgba(13,17,23,0));
}
#panel-inner {
  max-width: 640px;
  background: rgba(22,27,34,.82);
  border: 1px solid #2d333b;
  border-radius: 0 0 12px 12px;
  border-top: none;
  padding: 14px 20px 16px;
  backdrop-filter: blur(6px);
}
/* 可折叠介绍面板:标题条 + 折叠态 */
#panel-header {
  max-width: 640px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(22,27,34,.86);
  border: 1px solid #2d333b;
  border-radius: 12px 12px 0 0;
  padding: 7px 14px;
  cursor: pointer; user-select: none;
  font-size: 13px; color: #8fd4ff; font-weight: 600;
  backdrop-filter: blur(6px);
}
#panel.collapsed #panel-header { border-radius: 12px; }
#panel.collapsed #panel-inner { display: none; }
#panel-toggle {
  background: none; border: none; color: #8fd4ff;
  font-size: 15px; line-height: 1; cursor: pointer; padding: 0 2px;
  transition: transform .18s ease;
}
#panel.collapsed #panel-toggle { transform: rotate(-90deg); }
#node-label { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
#node-desc { font-size: 14px; line-height: 1.7; color: #9aa4b2; }
#hover-hint { margin-top: 8px; font-size: 13px; color: #ffe066; min-height: 18px; }
#enter-tip {
  margin-top: 10px; font-size: 12px; color: #7d8590;
  display: flex; gap: 14px; flex-wrap: wrap;
}
#enter-tip b { color: #4cc2ff; font-weight: 600; }

/* 节点专属交互面板(汇编/ALU/缓存演示) */
.overlay-panel {
  right: 24px; top: 96px;
  pointer-events: auto;
}
.overlay-inner {
  width: 260px;
  background: rgba(22,27,34,.88);
  border: 1px solid #2d333b;
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(6px);
}
.overlay-title { font-size: 12px; color: #7d8590; margin-bottom: 8px; }
#asm-code {
  width: 100%; height: 96px;
  background: #0d1117; color: #9fe8b5;
  border: 1px solid #2d333b; border-radius: 6px;
  font: 13px/1.5 monospace;
  padding: 6px 8px; resize: vertical;
  outline: none;
}
#asm-code:focus { border-color: #4cc2ff; }
.overlay-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.overlay-btns button {
  background: #21262d; color: #e6edf3;
  border: 1px solid #388bfd40; border-radius: 6px;
  padding: 5px 10px; font-size: 12px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.overlay-btns button:hover { background: #2a3138; border-color: #4cc2ff; }
#asm-status, #alu-status, #cache-status {
  margin-top: 8px; font-size: 12px; color: #9fe8b5;
  font-family: monospace; min-height: 16px;
}
