#search-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-bottom: 100px;
}

/* ============================================
   课节范围滑动条
   ==========================================

/* 课节选择标签 */
.period-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}== */
.period-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 400px;
  user-select: none;
  -webkit-user-select: none;
  padding: 0 12px;
  box-sizing: border-box;
  touch-action: pan-x;
  -ms-touch-action: pan-x;
}

.period-range-wrapper {
  flex: 1;
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.period-range-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  touch-action: none;
  cursor: pointer;
  margin: 0 10px;
}

.period-range-highlight {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--text);
  border-radius: 3px;
  pointer-events: none;
  opacity: 0.5;
}

.period-range-thumb {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--text);
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 2;
  touch-action: none;
  transition: transform 0.1s, opacity 0.2s;
  opacity: 0.5;
}

.period-range-thumb.dragging {
  transform: translate(-50%, -50%) scale(1.25);
  cursor: grabbing;
  opacity: 1;
}

.period-range-thumb.active {
  opacity: 1;
}

.period-range-labels {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  height: 16px;
  pointer-events: none;
}

.period-range-labels span {
  position: absolute;
  font-size: 11px;
  color: var(--subtext);
  width: 16px;
  text-align: center;
}

.period-clear-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 12px;
  font-size: 13px;
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.period-clear-btn:active {
  transform: scale(0.95);
}

/* ============================================
   教学楼筛选栏（横向滑动）
   ============================================ */
.building-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 16px;
  padding-bottom: 4px;
  width: 100%;
  max-width: 400px;
}

.building-filter-bar::-webkit-scrollbar {
  display: none;
}

.building-filter-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 16px;
  font-size: 13px;
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.building-filter-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  font-weight: 600;
}

.building-filter-btn:active {
  transform: scale(0.95);
}

/* ============================================
   分类标题
   ============================================ */
.room-category-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 8px;
  padding-left: 4px;
}

/* ============================================
   标签列表
   ============================================ */
.room-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

/* ============================================
   教室标签
   ============================================ */
.room-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.room-tag:active {
  transform: scale(0.95);
  background: rgba(128, 128, 128, 0.15);
}

.room-tag-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.room-tag-notes {
  font-size: 12px;
  color: var(--subtext);
  opacity: 0.7;
  font-weight: 400;
}

.room-tag-status {
  font-size: 12px;
  font-weight: 500;
}

.room-tag-status.status-busy {
  color: #ff4757;
}

.room-tag-status.status-soon {
  color: #ff9800;
}

.room-tag-status.status-free {
  color: #999;
}

.room-tag-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}

.room-tag-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  font-size: 14px;
}

.room-tag-btn:hover {
  background: var(--text-light);
}

.room-tag-btn:active {
  transform: scale(0.9);
}

/* ============================================
   空状态与加载
   ============================================ */
.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.search-empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
  color: var(--subtext);
}

.search-empty-state p {
  font-size: 15px;
  color: var(--subtext);
  margin: 0;
}

.search-loading {
  text-align: center;
  font-size: 13px;
  color: var(--subtext);
  padding: 12px 0;
}

.no-result {
  text-align: center;
  color: var(--subtext);
  padding: 40px 20px;
  opacity: 0.5;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .room-tag-name {
    color: #fff;
  }
  .room-tag-status.status-free {
    color: #888;
  }
  .period-range-thumb {
    border-color: var(--bg);
  }
}