/* ============================================
 * 滚动标尺特效
 * ============================================ */

.scroll-ruler {
  position: fixed;
  top: 0;
  width: 18px;
  height: 100vh;
  background: #F7F7F7;
  border: 1px solid #F5F5F5;
  z-index: 1000;
  overflow: hidden;
}

.scroll-ruler.left {
  left: 0;
  border-right: 1px solid #F5F5F5;
  border-left: none;
}

.scroll-ruler.right {
  right: 0;
  border-left: 1px solid #F5F5F5;
  border-right: none;
}

.ruler-container {
  position: relative;
  height: 100%;
}

.ruler-pointer {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ff0000;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
  z-index: 9999;
  transition: top 0.1s ease;
}

.ruler-pointer::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 8px solid #f00;
}

.ruler-mark {
  position: absolute;
  left: 0;
  width: 100%;
  height: 10px;
  font-size: 10px;
  color: #000;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.ruler-mark span {
  display: inline-block;
  white-space: nowrap;
  opacity: 0.9;
}

.ruler-mark::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: #000;
}

.ruler-mark.minor {
  font-size: 0;
  color: rgba(0, 0, 0, 0.5);
}

.ruler-mark.minor::before {
  width: 6px;
  height: 1px;
  background: rgba(0, 0, 0, 0.8);
}

.ruler-mark.minor span {
  display: none;
}

.ruler-mark.medium {
  font-size: 9px;
  color: rgba(0, 0, 0, 0.9);
}

.ruler-mark.medium::before {
  width: 10px;
  height: 1px;
  background: rgba(0, 0, 0, 0.9);
}

.ruler-mark.medium span {
  margin-left: 12px;
}

.ruler-mark.major {
  font-size: 10px;
  color: #000;
  font-weight: normal;
}

.ruler-mark.major::before {
  width: 14px;
  height: 1px;
  background: rgba(0, 0, 0, 1);
}

.ruler-mark.major span {
  margin-left: 16px;
}