/* ===== 页面内容样式 ===== */
.container {
  margin: 1.875rem auto; /* 30px */
  max-width: 80rem;
  padding: 1.25rem; /* 20px */
  background: #fdfdfd;
  border-radius: 0.625rem; /* 10px */
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.1); /* 8px */
}

/* ===== 序列展示 ===== */
.sequence-container {
  margin-top: 1.25rem; /* 20px */
  font-family: monospace;
  word-wrap: break-word;
  line-height: 1.5;
  background-color: #f0f0f0;
  padding: 0.75rem; /* 12px */
  border-radius: 0.375rem; /* 6px */
  font-size: 0.8rem;
}

.aa-letter {
  display: inline-block;
  padding: 0.0625rem 0.125rem; /* 1px 2px */
  margin: 0.0625rem; /* 1px */
  border-radius: 0.25rem; /* 4px */
  transition: background-color 0.2s ease;
}

.aa-letter.highlight {
  background-color: #ffe066;
}

/* ===== word卡片样式 ===== */
.word-card-container {
  margin-top: 1.25rem; /* 20px */
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;   /* 行在纵向顶部对齐，剩余空间留在底部 */
  align-items: flex-start;     /* 每行内项目在顶部对齐，避免被拉伸 */
  justify-content: flex-start; /* 水平从左到右排布 */
  gap: 1rem;            
  height: 600px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 10px;
  box-sizing: border-box;
}

.word-card {
  background-color: #e2ecf8;
  border-left: 0.25rem solid #4a90e2; /* 4px */
  padding: 0.625rem 1rem; /* 10px 16px */
  border-radius: 0.375rem; /* 6px */
  cursor: pointer;
  transition: background 0.2s ease;
  min-width: 11.25rem; /* 180px */
  flex: 0 0 auto;     /* 固定内容高度，不均分 */
  height: auto;       /* 由内容决定高度 */
  align-self: flex-start; /* 防止被父容器拉伸 */
}

.word-card:hover {
  background-color: #d4e6f9;
}

.uniprot-link {
  color: #0056b3;
  font-weight: bold;
  text-decoration: none;
}

.uniprot-link:hover {
  text-decoration: underline;
}

.view-toggle {
  margin-bottom: 15px;
}

.view-toggle button {
  padding: 6px 12px;
  margin-right: 10px;
  border: none;
  background-color: #ccc;
  cursor: pointer;
  font-weight: bold;
}

.view-toggle button.active {
  background-color: #888;
  color: white;
}

/* 限制 mol* viewer 展示区域尺寸 */
.viewer-wrapper {
  border: 1px solid #ccc;
  box-sizing: border-box;
  margin-bottom: 20px;
}
#structure-viewer {
  width: 100%;
  height: 500px;
  position: relative;
}

.view-section { display: block; }           
.view-section:not(.active) {
  visibility: hidden;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}
  